@bitrise/bitkit 9.4.1 → 9.4.2

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.
Files changed (75) hide show
  1. package/.eslintrc.js +8 -1
  2. package/.husky/commit-msg +4 -0
  3. package/.nvmrc +1 -1
  4. package/.stylelintrc +2 -3
  5. package/.tool-versions +1 -1
  6. package/CHANGELOG.md +2 -0
  7. package/bitrise.yml +31 -27
  8. package/jest.setup.js +2 -1
  9. package/lib/cjs/Dropdown/Dropdown.d.ts.map +1 -1
  10. package/lib/cjs/Dropdown/Dropdown.js +6 -8
  11. package/lib/cjs/Dropdown/Dropdown.js.map +1 -1
  12. package/lib/cjs/Dropdown/DropdownMenu.css +1 -1
  13. package/lib/cjs/Placement/Placement.css +17 -35
  14. package/lib/cjs/Placement/Placement.d.ts +5 -8
  15. package/lib/cjs/Placement/Placement.d.ts.map +1 -1
  16. package/lib/cjs/Placement/Placement.js.map +1 -1
  17. package/lib/cjs/Placement/PlacementPopper.d.ts +3 -4
  18. package/lib/cjs/Placement/PlacementPopper.d.ts.map +1 -1
  19. package/lib/cjs/Placement/PlacementPopper.js +52 -19
  20. package/lib/cjs/Placement/PlacementPopper.js.map +1 -1
  21. package/lib/cjs/Tooltip/Tooltip.d.ts +1 -1
  22. package/lib/cjs/Tooltip/Tooltip.d.ts.map +1 -1
  23. package/lib/cjs/hooks/useEventListener.d.ts.map +1 -1
  24. package/lib/cjs/hooks/useEventListener.js +0 -1
  25. package/lib/cjs/hooks/useEventListener.js.map +1 -1
  26. package/lib/cjs/index.d.ts +0 -1
  27. package/lib/cjs/index.d.ts.map +1 -1
  28. package/lib/cjs/index.js +2 -4
  29. package/lib/cjs/index.js.map +1 -1
  30. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  31. package/lib/esn/Dropdown/Dropdown.d.ts.map +1 -1
  32. package/lib/esn/Dropdown/Dropdown.js +6 -5
  33. package/lib/esn/Dropdown/Dropdown.js.map +1 -1
  34. package/lib/esn/Dropdown/DropdownMenu.css +1 -1
  35. package/lib/esn/Placement/Placement.css +17 -35
  36. package/lib/esn/Placement/Placement.d.ts +5 -8
  37. package/lib/esn/Placement/Placement.d.ts.map +1 -1
  38. package/lib/esn/Placement/Placement.js.map +1 -1
  39. package/lib/esn/Placement/PlacementPopper.d.ts +3 -4
  40. package/lib/esn/Placement/PlacementPopper.d.ts.map +1 -1
  41. package/lib/esn/Placement/PlacementPopper.js +53 -30
  42. package/lib/esn/Placement/PlacementPopper.js.map +1 -1
  43. package/lib/esn/Tooltip/Tooltip.d.ts +1 -1
  44. package/lib/esn/Tooltip/Tooltip.d.ts.map +1 -1
  45. package/lib/esn/hooks/useEventListener.d.ts.map +1 -1
  46. package/lib/esn/hooks/useEventListener.js +0 -1
  47. package/lib/esn/hooks/useEventListener.js.map +1 -1
  48. package/lib/esn/index.d.ts +0 -1
  49. package/lib/esn/index.d.ts.map +1 -1
  50. package/lib/esn/index.js +0 -1
  51. package/lib/esn/index.js.map +1 -1
  52. package/lib/esn/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +34 -35
  54. package/postcss.config.js +9 -5
  55. package/site/components/Documentation/Components/SectionButtons.tsx +1 -47
  56. package/site/components/Documentation/Components/SectionDropdowns.tsx +1 -1
  57. package/site/components/Documentation/Components/SectionPlacement.tsx +4 -1
  58. package/site/components/Documentation/Documentation.tsx +1 -6
  59. package/src/Dropdown/Dropdown.tsx +13 -8
  60. package/src/Dropdown/DropdownMenu.css +1 -1
  61. package/src/Placement/Placement.css +17 -35
  62. package/src/Placement/Placement.tsx +5 -8
  63. package/src/Placement/PlacementPopper.tsx +78 -50
  64. package/src/Tooltip/Tooltip.tsx +1 -1
  65. package/src/hooks/useEventListener.ts +25 -5
  66. package/src/index.ts +0 -4
  67. package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts +0 -19
  68. package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +0 -1
  69. package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js +0 -55
  70. package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js.map +0 -1
  71. package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts +0 -19
  72. package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +0 -1
  73. package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js +0 -12
  74. package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js.map +0 -1
  75. package/src/ButtonWithDropdown/ButtonWithDropdown.tsx +0 -81
@@ -1,19 +0,0 @@
1
- import * as React from 'react';
2
- import { ButtonProps, DropdownMenuItemProps, PlacementProps } from '@bitrise/bitkit';
3
- export interface ItemProps extends DropdownMenuItemProps {
4
- component?: string;
5
- disabled?: boolean;
6
- href?: string;
7
- target?: string;
8
- text: string;
9
- }
10
- export interface Props {
11
- buttonProps?: ButtonProps;
12
- children?: React.ReactElement | React.ReactNodeArray;
13
- dropdownWidth?: string;
14
- items: ItemProps[];
15
- placementProps?: PlacementProps;
16
- }
17
- declare const ButtonWithDropdown: ({ buttonProps, children, dropdownWidth, items, placementProps, }: Props) => JSX.Element;
18
- export default ButtonWithDropdown;
19
- //# sourceMappingURL=ButtonWithDropdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ButtonWithDropdown.d.ts","sourceRoot":"","sources":["../../../src/ButtonWithDropdown/ButtonWithDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,WAAW,EAGX,qBAAqB,EAIrB,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,SAAU,SAAQ,qBAAqB;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,KAAK;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,QAAA,MAAM,kBAAkB,qEAMrB,KAAK,KAAG,WA0CV,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { Button, DropdownMenu, DropdownMenuItem, Icon, Placement, PlacementManager, PlacementReference, } from '@bitrise/bitkit';
3
- const ButtonWithDropdown = ({ buttonProps = {}, children, dropdownWidth, items, placementProps, }) => {
4
- const [visible, setVisible] = React.useState(false);
5
- return (React.createElement(PlacementManager, null,
6
- React.createElement(PlacementReference, null, ({ ref }) => (React.createElement(Button, { innerRef: ref, onClick: () => setVisible(true), ...buttonProps },
7
- children,
8
- React.createElement(Icon, { name: "ChevronDown" })))),
9
- !buttonProps.disabled && (React.createElement(Placement, { disableMargin: "left-right", onClose: () => setVisible(false), placement: "bottom-end", visible: visible, ...placementProps }, () => (React.createElement(DropdownMenu, { width: dropdownWidth, withArrow: true }, items.map(({ component, disabled, href, icon, onClick, target, text }) => (React.createElement(DropdownMenuItem, { Component: component || 'div', disabled: disabled, href: href, icon: icon, key: text, onClick: onClick, target: target }, text)))))))));
10
- };
11
- export default ButtonWithDropdown;
12
- //# sourceMappingURL=ButtonWithDropdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ButtonWithDropdown.js","sourceRoot":"","sources":["../../../src/ButtonWithDropdown/ButtonWithDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,EAEN,YAAY,EACZ,gBAAgB,EAEhB,IAAI,EACJ,SAAS,EACT,gBAAgB,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ACgB,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,81 +0,0 @@
1
- import * as React from 'react';
2
- import {
3
- Button,
4
- ButtonProps,
5
- DropdownMenu,
6
- DropdownMenuItem,
7
- DropdownMenuItemProps,
8
- Icon,
9
- Placement,
10
- PlacementManager,
11
- PlacementProps,
12
- PlacementReference,
13
- } from '@bitrise/bitkit';
14
-
15
- export interface ItemProps extends DropdownMenuItemProps {
16
- component?: string;
17
- disabled?: boolean;
18
- href?: string;
19
- target?: string;
20
- text: string;
21
- }
22
-
23
- export interface Props {
24
- buttonProps?: ButtonProps;
25
- children?: React.ReactElement | React.ReactNodeArray;
26
- dropdownWidth?: string;
27
- items: ItemProps[];
28
- placementProps?: PlacementProps;
29
- }
30
-
31
- const ButtonWithDropdown = ({
32
- buttonProps = {},
33
- children,
34
- dropdownWidth,
35
- items,
36
- placementProps,
37
- }: Props): JSX.Element => {
38
- const [visible, setVisible] = React.useState(false);
39
-
40
- return (
41
- <PlacementManager>
42
- <PlacementReference>
43
- {({ ref }) => (
44
- <Button innerRef={ref} onClick={() => setVisible(true)} {...buttonProps}>
45
- {children}
46
- <Icon name="ChevronDown" />
47
- </Button>
48
- )}
49
- </PlacementReference>
50
- {!buttonProps.disabled && (
51
- <Placement
52
- disableMargin="left-right"
53
- onClose={() => setVisible(false)}
54
- placement="bottom-end"
55
- visible={visible}
56
- {...placementProps}
57
- >
58
- {() => (
59
- <DropdownMenu width={dropdownWidth} withArrow>
60
- {items.map(({ component, disabled, href, icon, onClick, target, text }) => (
61
- <DropdownMenuItem
62
- Component={component || 'div'}
63
- disabled={disabled}
64
- href={href}
65
- icon={icon}
66
- key={text}
67
- onClick={onClick}
68
- target={target}
69
- >
70
- {text}
71
- </DropdownMenuItem>
72
- ))}
73
- </DropdownMenu>
74
- )}
75
- </Placement>
76
- )}
77
- </PlacementManager>
78
- );
79
- };
80
-
81
- export default ButtonWithDropdown;