@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.
- package/.eslintrc.js +8 -1
- package/.husky/commit-msg +4 -0
- package/.nvmrc +1 -1
- package/.stylelintrc +2 -3
- package/.tool-versions +1 -1
- package/CHANGELOG.md +2 -0
- package/bitrise.yml +31 -27
- package/jest.setup.js +2 -1
- package/lib/cjs/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/cjs/Dropdown/Dropdown.js +6 -8
- package/lib/cjs/Dropdown/Dropdown.js.map +1 -1
- package/lib/cjs/Dropdown/DropdownMenu.css +1 -1
- package/lib/cjs/Placement/Placement.css +17 -35
- package/lib/cjs/Placement/Placement.d.ts +5 -8
- package/lib/cjs/Placement/Placement.d.ts.map +1 -1
- package/lib/cjs/Placement/Placement.js.map +1 -1
- package/lib/cjs/Placement/PlacementPopper.d.ts +3 -4
- package/lib/cjs/Placement/PlacementPopper.d.ts.map +1 -1
- package/lib/cjs/Placement/PlacementPopper.js +52 -19
- package/lib/cjs/Placement/PlacementPopper.js.map +1 -1
- package/lib/cjs/Tooltip/Tooltip.d.ts +1 -1
- package/lib/cjs/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/cjs/hooks/useEventListener.d.ts.map +1 -1
- package/lib/cjs/hooks/useEventListener.js +0 -1
- package/lib/cjs/hooks/useEventListener.js.map +1 -1
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +2 -4
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/esn/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/esn/Dropdown/Dropdown.js +6 -5
- package/lib/esn/Dropdown/Dropdown.js.map +1 -1
- package/lib/esn/Dropdown/DropdownMenu.css +1 -1
- package/lib/esn/Placement/Placement.css +17 -35
- package/lib/esn/Placement/Placement.d.ts +5 -8
- package/lib/esn/Placement/Placement.d.ts.map +1 -1
- package/lib/esn/Placement/Placement.js.map +1 -1
- package/lib/esn/Placement/PlacementPopper.d.ts +3 -4
- package/lib/esn/Placement/PlacementPopper.d.ts.map +1 -1
- package/lib/esn/Placement/PlacementPopper.js +53 -30
- package/lib/esn/Placement/PlacementPopper.js.map +1 -1
- package/lib/esn/Tooltip/Tooltip.d.ts +1 -1
- package/lib/esn/Tooltip/Tooltip.d.ts.map +1 -1
- package/lib/esn/hooks/useEventListener.d.ts.map +1 -1
- package/lib/esn/hooks/useEventListener.js +0 -1
- package/lib/esn/hooks/useEventListener.js.map +1 -1
- package/lib/esn/index.d.ts +0 -1
- package/lib/esn/index.d.ts.map +1 -1
- package/lib/esn/index.js +0 -1
- package/lib/esn/index.js.map +1 -1
- package/lib/esn/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -35
- package/postcss.config.js +9 -5
- package/site/components/Documentation/Components/SectionButtons.tsx +1 -47
- package/site/components/Documentation/Components/SectionDropdowns.tsx +1 -1
- package/site/components/Documentation/Components/SectionPlacement.tsx +4 -1
- package/site/components/Documentation/Documentation.tsx +1 -6
- package/src/Dropdown/Dropdown.tsx +13 -8
- package/src/Dropdown/DropdownMenu.css +1 -1
- package/src/Placement/Placement.css +17 -35
- package/src/Placement/Placement.tsx +5 -8
- package/src/Placement/PlacementPopper.tsx +78 -50
- package/src/Tooltip/Tooltip.tsx +1 -1
- package/src/hooks/useEventListener.ts +25 -5
- package/src/index.ts +0 -4
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts +0 -19
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +0 -1
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js +0 -55
- package/lib/cjs/ButtonWithDropdown/ButtonWithDropdown.js.map +0 -1
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts +0 -19
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.d.ts.map +0 -1
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js +0 -12
- package/lib/esn/ButtonWithDropdown/ButtonWithDropdown.js.map +0 -1
- package/src/ButtonWithDropdown/ButtonWithDropdown.tsx +0 -81
package/.eslintrc.js
CHANGED
|
@@ -12,7 +12,14 @@ module.exports = {
|
|
|
12
12
|
'import/no-extraneous-dependencies': [
|
|
13
13
|
'error',
|
|
14
14
|
{
|
|
15
|
-
devDependencies: [
|
|
15
|
+
devDependencies: [
|
|
16
|
+
'**/*.stories.tsx',
|
|
17
|
+
'**/*.test.tsx',
|
|
18
|
+
'jest.setup.js',
|
|
19
|
+
'scripts/*.ts',
|
|
20
|
+
'site/**/*.*',
|
|
21
|
+
'postcss.config.js',
|
|
22
|
+
],
|
|
16
23
|
},
|
|
17
24
|
],
|
|
18
25
|
'react-hooks/exhaustive-deps': 'off',
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v16.14.2
|
package/.stylelintrc
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"function-linear-gradient-no-nonstandard-direction": true,
|
|
47
47
|
"function-name-case": "lower",
|
|
48
48
|
"function-parentheses-space-inside": "never-single-line",
|
|
49
|
-
"function-url-scheme-
|
|
49
|
+
"function-url-scheme-allowed-list": ["data", "/^http/"],
|
|
50
50
|
"function-url-quotes": "always",
|
|
51
51
|
"function-whitespace-after": "always",
|
|
52
52
|
"indentation": 2,
|
|
@@ -276,10 +276,9 @@
|
|
|
276
276
|
"shorthand-property-no-redundant-values": true,
|
|
277
277
|
"string-no-newline": true,
|
|
278
278
|
"string-quotes": "single",
|
|
279
|
-
"unit-
|
|
279
|
+
"unit-disallowed-list": ["em", "px"],
|
|
280
280
|
"unit-case": "lower",
|
|
281
281
|
"unit-no-unknown": true,
|
|
282
|
-
"value-keyword-case": "lower",
|
|
283
282
|
"value-list-comma-space-after": "always-single-line",
|
|
284
283
|
"value-list-comma-space-before": "never",
|
|
285
284
|
"value-list-max-empty-lines": 0,
|
package/.tool-versions
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
nodejs 14.
|
|
1
|
+
nodejs 16.14.2
|
package/CHANGELOG.md
CHANGED
package/bitrise.yml
CHANGED
|
@@ -1,62 +1,66 @@
|
|
|
1
1
|
---
|
|
2
2
|
format_version: '8'
|
|
3
|
-
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
|
|
3
|
+
default_step_lib_source: 'https://github.com/bitrise-io/bitrise-steplib.git'
|
|
4
4
|
project_type: other
|
|
5
5
|
trigger_map:
|
|
6
6
|
- push_branch: master
|
|
7
7
|
workflow: Master
|
|
8
8
|
- push_branch: alpha
|
|
9
9
|
workflow: AlphaBranch
|
|
10
|
-
- pull_request_source_branch:
|
|
10
|
+
- pull_request_source_branch: '*'
|
|
11
11
|
workflow: PullRequests
|
|
12
12
|
pull_request_target_branch: master
|
|
13
13
|
workflows:
|
|
14
|
+
AlphaBranch:
|
|
15
|
+
before_run:
|
|
16
|
+
- Primary
|
|
17
|
+
steps:
|
|
18
|
+
- yarn@0.1:
|
|
19
|
+
inputs:
|
|
20
|
+
- command: semantic-release
|
|
21
|
+
title: Publish from alpha branch (... if needed)
|
|
22
|
+
Master:
|
|
23
|
+
before_run:
|
|
24
|
+
- Primary
|
|
25
|
+
steps:
|
|
26
|
+
- yarn@0.0.8:
|
|
27
|
+
inputs:
|
|
28
|
+
- command: semantic-release
|
|
29
|
+
title: Publish (... if needed)
|
|
14
30
|
Primary:
|
|
15
31
|
steps:
|
|
16
|
-
- activate-ssh-key@4.
|
|
32
|
+
- activate-ssh-key@4.1:
|
|
17
33
|
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
|
|
18
|
-
- git-clone@
|
|
19
|
-
- nvm@1: {}
|
|
20
|
-
- yarn@0.
|
|
34
|
+
- git-clone@6.1: {}
|
|
35
|
+
- nvm@1.3: {}
|
|
36
|
+
- yarn@0.1:
|
|
21
37
|
title: Install Dependencies
|
|
22
|
-
- yarn@0.
|
|
38
|
+
- yarn@0.1:
|
|
23
39
|
title: Run Linting
|
|
24
40
|
inputs:
|
|
25
41
|
- command: lint
|
|
26
|
-
- yarn@0.
|
|
42
|
+
- yarn@0.1:
|
|
27
43
|
inputs:
|
|
28
44
|
- command: test
|
|
29
45
|
title: Run Tests
|
|
30
|
-
- yarn@0.
|
|
46
|
+
- yarn@0.1:
|
|
31
47
|
title: Build Library and Style Guide
|
|
32
48
|
inputs:
|
|
33
49
|
- command: build
|
|
34
|
-
Master:
|
|
35
|
-
before_run:
|
|
36
|
-
- Primary
|
|
37
|
-
steps:
|
|
38
|
-
- yarn@0.0.8:
|
|
39
|
-
inputs:
|
|
40
|
-
- command: semantic-release
|
|
41
|
-
title: Publish (... if needed)
|
|
42
|
-
AlphaBranch:
|
|
43
|
-
before_run:
|
|
44
|
-
- Primary
|
|
45
|
-
steps:
|
|
46
|
-
- yarn@0.0.8:
|
|
47
|
-
inputs:
|
|
48
|
-
- command: semantic-release
|
|
49
|
-
title: Publish from alpha branch (... if needed)
|
|
50
50
|
PullRequests:
|
|
51
51
|
before_run:
|
|
52
52
|
- Primary
|
|
53
53
|
steps:
|
|
54
54
|
- script@1.1.5:
|
|
55
55
|
inputs:
|
|
56
|
-
- content:
|
|
56
|
+
- content: >
|
|
57
57
|
#!/bin/bash
|
|
58
|
+
|
|
58
59
|
set -ex
|
|
59
60
|
|
|
61
|
+
|
|
60
62
|
# Check for malformed commit messages
|
|
61
|
-
|
|
63
|
+
|
|
64
|
+
git log --pretty=format:'%s' origin/master...$BITRISE_GIT_COMMIT |
|
|
65
|
+
yarn commitlint
|
|
62
66
|
title: Lint Commits
|
package/jest.setup.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
2
|
const Enzyme = require('enzyme');
|
|
3
|
-
const Adapter = require('enzyme-adapter-react-
|
|
3
|
+
const Adapter = require('@wojtekmaj/enzyme-adapter-react-17');
|
|
4
4
|
const { JSDOM } = require('jsdom');
|
|
5
5
|
|
|
6
6
|
const jsdom = new JSDOM('<!doctype html><html><body></body></html>', {
|
|
@@ -24,6 +24,7 @@ global.navigator = {
|
|
|
24
24
|
|
|
25
25
|
global.requestAnimationFrame = (cb) => setTimeout(cb, 0);
|
|
26
26
|
global.cancelAnimationFrame = (id) => clearTimeout(id);
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
27
28
|
global.window.requestAnimationFrame = (cb) => setTimeout(cb, 0);
|
|
28
29
|
global.window.cancelAnimationFrame = (id) => clearTimeout(id);
|
|
29
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAuB,EAAE,KAAK,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQhF,aAAK,aAAa,GAAG,GAAG,CAAC;AACzB,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,KAAM,SAAQ,mBAAmB;IAChD,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,4CAA4C;IAC5C,OAAO,EAAE,CAAC,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC;IAClC,sCAAsC;IACtC,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAuB,EAAE,KAAK,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQhF,aAAK,aAAa,GAAG,GAAG,CAAC;AACzB,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,KAAM,SAAQ,mBAAmB;IAChD,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,4CAA4C;IAC5C,OAAO,EAAE,CAAC,MAAM,GAAG,WAAW,CAAC,EAAE,CAAC;IAClC,sCAAsC;IACtC,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAuD5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -66,27 +66,25 @@ var useState = React.useState;
|
|
|
66
66
|
var Dropdown = function (props) {
|
|
67
67
|
var children = props.children, options = props.options, onChange = props.onChange, selected = props.selected, maxHeight = props.maxHeight, rest = __rest(props, ["children", "options", "onChange", "selected", "maxHeight"]);
|
|
68
68
|
var _a = useState(false), visible = _a[0], setVisible = _a[1];
|
|
69
|
-
var handleToggleVisible = function () { return setVisible(!visible); };
|
|
70
69
|
var handleChange = function (value) {
|
|
71
70
|
if (onChange) {
|
|
72
71
|
onChange(value);
|
|
73
72
|
}
|
|
74
|
-
|
|
73
|
+
setVisible(false);
|
|
75
74
|
};
|
|
76
75
|
var renderOption = function (_a) {
|
|
77
76
|
var text = _a.text, value = _a.value;
|
|
78
|
-
return (React.createElement(DropdownMenuItem_1.default, { onClick: function () { return handleChange(value); }, selected: selected === value }, text));
|
|
77
|
+
return (React.createElement(DropdownMenuItem_1.default, { onClick: function () { return handleChange(value); }, selected: selected === value, width: "100%" }, text));
|
|
79
78
|
};
|
|
80
79
|
return (React.createElement(PlacementManager_1.default, null,
|
|
81
80
|
React.createElement(PlacementReference_1.default, null, function (_a) {
|
|
82
81
|
var ref = _a.ref;
|
|
83
|
-
return (React.createElement(DropdownButton_1.default, __assign({}, rest, { alignChildrenHorizontal: "start", innerRef: ref, onClick:
|
|
82
|
+
return (React.createElement(DropdownButton_1.default, __assign({}, rest, { alignChildrenHorizontal: "start", innerRef: ref, onClick: function () {
|
|
83
|
+
setVisible(!visible);
|
|
84
|
+
} }),
|
|
84
85
|
React.createElement(Text_1.default, { ellipsis: true }, children)));
|
|
85
86
|
}),
|
|
86
|
-
React.createElement(Placement_1.default, { onClose:
|
|
87
|
-
var width = _a.width;
|
|
88
|
-
return (React.createElement(DropdownMenu_1.default, { maxHeight: maxHeight, width: width }, options.map(function (option) { return (React.createElement(React.Fragment, { key: option.text }, 'options' in option ? (React.createElement(DropdownMenuItemGroup_1.default, { text: option.text }, option.options.map(function (groupOption) { return (React.createElement(React.Fragment, { key: groupOption.value }, renderOption(groupOption))); }))) : (renderOption(option)))); })));
|
|
89
|
-
})));
|
|
87
|
+
React.createElement(Placement_1.default, { onClose: function () { return setVisible(false); }, sameWidth: true, visible: visible }, function () { return (React.createElement(DropdownMenu_1.default, { maxHeight: maxHeight, width: "100%" }, options.map(function (option) { return (React.createElement(React.Fragment, { key: option.text }, 'options' in option ? (React.createElement(DropdownMenuItemGroup_1.default, { text: option.text }, option.options.map(function (groupOption) { return (React.createElement(React.Fragment, { key: groupOption.value }, renderOption(groupOption))); }))) : (renderOption(option)))); }))); })));
|
|
90
88
|
};
|
|
91
89
|
exports.default = Dropdown;
|
|
92
90
|
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../src/Dropdown/Dropdown.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,qEAA+C;AAC/C,mFAA6D;AAC7D,uFAAiE;AACjE,sDAAgC;AAChC,oEAAgF;AAChF,gEAA0C;AAC1C,wEAAkD;AAClD,kFAA4D;AAEpD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;AAwB3B;;;;GAIG;AACH,IAAM,QAAQ,GAAmC,UAAC,KAAY;IACpD,IAAA,QAAQ,GAAsD,KAAK,SAA3D,EAAE,OAAO,GAA6C,KAAK,QAAlD,EAAE,QAAQ,GAAmC,KAAK,SAAxC,EAAE,QAAQ,GAAyB,KAAK,SAA9B,EAAE,SAAS,GAAc,KAAK,UAAnB,EAAK,IAAI,UAAK,KAAK,EAArE,4DAA6D,CAAF,CAAW;IACtE,IAAA,KAAwB,QAAQ,CAAC,KAAK,CAAC,EAAtC,OAAO,QAAA,EAAE,UAAU,QAAmB,CAAC;IAE9C,IAAM,
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["../../../src/Dropdown/Dropdown.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,qEAA+C;AAC/C,mFAA6D;AAC7D,uFAAiE;AACjE,sDAAgC;AAChC,oEAAgF;AAChF,gEAA0C;AAC1C,wEAAkD;AAClD,kFAA4D;AAEpD,IAAA,QAAQ,GAAK,KAAK,SAAV,CAAW;AAwB3B;;;;GAIG;AACH,IAAM,QAAQ,GAAmC,UAAC,KAAY;IACpD,IAAA,QAAQ,GAAsD,KAAK,SAA3D,EAAE,OAAO,GAA6C,KAAK,QAAlD,EAAE,QAAQ,GAAmC,KAAK,SAAxC,EAAE,QAAQ,GAAyB,K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CACvB,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,MAAM,CAAC,IAAI,IAC7B,SAAS,IAAI,MAAM,CAAC,CAAC,CAAC,CACrB,oBAAC,+BAAqB,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,IACrC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,WAAW,IAAK,OAAA,CACnC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,WAAW,CAAC,KAAK,IAAG,YAAY,CAAC,WAAW,CAAC,CAAkB,CACrF,EAFoC,CAEpC,CAAC,CACoB,CACzB,CAAC,CAAC,CAAC,CACF,YAAY,CAAC,MAAM,CAAC,CACrB,CACc,CAClB,EAZwB,CAYxB,CAAC,CACW,CAChB,EAhBM,CAgBN,CACS,CACK,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
:root {
|
|
3
|
-
--Placement-arrow-size: var(--size--x3);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
2
|
.Placement {
|
|
7
3
|
position: absolute;
|
|
8
|
-
margin: var(--Placement-arrow-size);
|
|
9
4
|
z-index: var(--z-index-Placement--below-modal);
|
|
10
5
|
pointer-events: none;
|
|
11
6
|
}
|
|
12
7
|
|
|
13
|
-
.Placement--disable-margin {
|
|
14
|
-
margin: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.Placement--disable-margin-top-bottom {
|
|
18
|
-
margin-top: 0;
|
|
19
|
-
margin-bottom: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.Placement--disable-margin-left-right {
|
|
23
|
-
margin-right: 0;
|
|
24
|
-
margin-left: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
8
|
.Placement--animate {
|
|
28
9
|
transition-property: transform;
|
|
29
10
|
transition-duration: var(--transition-duration--fast);
|
|
@@ -83,50 +64,51 @@
|
|
|
83
64
|
border-top: 0.0625rem solid var(--color-gray--2);
|
|
84
65
|
}
|
|
85
66
|
|
|
86
|
-
.Placement__arrow
|
|
67
|
+
.Placement__arrow,
|
|
68
|
+
.Placement__arrow::before {
|
|
87
69
|
position: absolute;
|
|
88
|
-
width: var(--
|
|
89
|
-
height: var(--
|
|
70
|
+
width: var(--size--x3);
|
|
71
|
+
height: var(--size--x3);
|
|
90
72
|
}
|
|
91
73
|
|
|
92
74
|
.Placement__arrow,
|
|
93
75
|
.Placement__arrow:first-child,
|
|
94
76
|
.Placement__arrow:last-child {
|
|
95
|
-
|
|
77
|
+
visibility: hidden;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.Placement__arrow::before {
|
|
81
|
+
content: '';
|
|
82
|
+
display: block;
|
|
83
|
+
transform: rotate(45deg);
|
|
84
|
+
background: inherit;
|
|
85
|
+
visibility: visible;
|
|
96
86
|
}
|
|
97
87
|
|
|
98
88
|
.Placement--top .Placement__arrow,
|
|
99
89
|
.Placement--top-start .Placement__arrow,
|
|
100
90
|
.Placement--top-end .Placement__arrow {
|
|
101
91
|
top: 100%;
|
|
102
|
-
|
|
103
|
-
translateY(calc(-50% + var(--Placement-arrow-size) * -1))
|
|
104
|
-
rotate(45deg);
|
|
92
|
+
margin-top: -0.375rem;
|
|
105
93
|
}
|
|
106
94
|
|
|
107
95
|
.Placement--right .Placement__arrow,
|
|
108
96
|
.Placement--right-start .Placement__arrow,
|
|
109
97
|
.Placement--right-end .Placement__arrow {
|
|
110
98
|
right: 100%;
|
|
111
|
-
|
|
112
|
-
translateX(calc(50% - var(--Placement-arrow-size) * -1))
|
|
113
|
-
rotate(45deg);
|
|
99
|
+
margin-right: -0.375rem;
|
|
114
100
|
}
|
|
115
101
|
|
|
116
102
|
.Placement--bottom .Placement__arrow,
|
|
117
103
|
.Placement--bottom-start .Placement__arrow,
|
|
118
104
|
.Placement--bottom-end .Placement__arrow {
|
|
119
105
|
bottom: 100%;
|
|
120
|
-
|
|
121
|
-
translateY(calc(50% - var(--Placement-arrow-size) * -1))
|
|
122
|
-
rotate(45deg);
|
|
106
|
+
margin-bottom: -0.375rem;
|
|
123
107
|
}
|
|
124
108
|
|
|
125
109
|
.Placement--left .Placement__arrow,
|
|
126
110
|
.Placement--left-start .Placement__arrow,
|
|
127
111
|
.Placement--left-end .Placement__arrow {
|
|
128
112
|
left: 100%;
|
|
129
|
-
|
|
130
|
-
translateX(calc(-50% + var(--Placement-arrow-size) * -1))
|
|
131
|
-
rotate(45deg);
|
|
113
|
+
margin-left: -0.375rem;
|
|
132
114
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Placement as TypePlacement
|
|
2
|
+
import { Placement as TypePlacement } from '@popperjs/core';
|
|
3
3
|
import { Props as BaseProps } from '../Base/Base';
|
|
4
4
|
import './Placement.css';
|
|
5
5
|
export interface Props extends BaseProps {
|
|
@@ -10,18 +10,14 @@ export interface Props extends BaseProps {
|
|
|
10
10
|
animatePosition?: boolean;
|
|
11
11
|
/**
|
|
12
12
|
* A render callback function that provides a
|
|
13
|
-
*
|
|
13
|
+
* update function to trigger a reposition,
|
|
14
14
|
* and the width of the target that is being positioned
|
|
15
15
|
* around.
|
|
16
16
|
*/
|
|
17
17
|
children: (props: {
|
|
18
|
-
|
|
18
|
+
update: () => void;
|
|
19
19
|
width?: number;
|
|
20
20
|
}) => React.ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* Flag that disables margin around the Placement.
|
|
23
|
-
*/
|
|
24
|
-
disableMargin?: boolean | 'top-bottom' | 'left-right';
|
|
25
21
|
/**
|
|
26
22
|
* Flag that disables repositioning on scroll and resize events.
|
|
27
23
|
*/
|
|
@@ -45,7 +41,8 @@ export interface Props extends BaseProps {
|
|
|
45
41
|
/**
|
|
46
42
|
* An optional reference element to be used as the target.
|
|
47
43
|
*/
|
|
48
|
-
referenceElement?:
|
|
44
|
+
referenceElement?: any;
|
|
45
|
+
sameWidth?: boolean;
|
|
49
46
|
/**
|
|
50
47
|
* The visibilty of the positioned content.
|
|
51
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placement.d.ts","sourceRoot":"","sources":["../../../src/Placement/Placement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"Placement.d.ts","sourceRoot":"","sources":["../../../src/Placement/Placement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,iBAAiB,CAAC;AAEzB,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7E;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAM7C,CAAC;AAOF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placement.js","sourceRoot":"","sources":["../../../src/Placement/Placement.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAG/B,sDAAqD;AACrD,sEAAgD;AAChD,2BAAyB;
|
|
1
|
+
{"version":3,"file":"Placement.js","sourceRoot":"","sources":["../../../src/Placement/Placement.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAG/B,sDAAqD;AACrD,sEAAgD;AAChD,2BAAyB;AAkDzB;;;;;;;;;GASG;AACH,IAAM,SAAS,GAAmC,UAAC,KAAY;IAC7D,OAAO,CACL,oBAAC,2BAAY,CAAC,QAAQ,QACnB,UAAC,EAAgB;YAAd,YAAY,kBAAA;QAAO,OAAA,oBAAC,yBAAe,eAAK,KAAK,IAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,CAAC,YAAY,IAAI;IAAzF,CAAyF,CAC1F,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG;IACvB,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,kBAAe,SAAS,CAAC"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Placement as TypePlacement
|
|
2
|
+
import { Placement as TypePlacement } from '@popperjs/core';
|
|
3
3
|
import { Props as BaseProps } from '../Base/Base';
|
|
4
4
|
import './Placement.css';
|
|
5
5
|
export interface Props extends BaseProps {
|
|
6
6
|
animatePosition?: boolean;
|
|
7
7
|
children: (props: {
|
|
8
|
-
|
|
8
|
+
update: () => void;
|
|
9
9
|
width?: number;
|
|
10
10
|
}) => React.ReactNode;
|
|
11
11
|
closeElement?: null | HTMLElement;
|
|
12
|
-
disableMargin?: boolean | 'top-bottom' | 'left-right';
|
|
13
12
|
disableReposition?: boolean;
|
|
14
13
|
flip?: boolean;
|
|
15
14
|
isInsideModal?: boolean;
|
|
16
15
|
onClose?: (event: MouseEvent) => void;
|
|
17
16
|
placement?: TypePlacement;
|
|
18
|
-
referenceElement?:
|
|
17
|
+
referenceElement?: any;
|
|
19
18
|
visible?: boolean;
|
|
20
19
|
timeout?: number;
|
|
21
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlacementPopper.d.ts","sourceRoot":"","sources":["../../../src/Placement/PlacementPopper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlacementPopper.d.ts","sourceRoot":"","sources":["../../../src/Placement/PlacementPopper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,IAAI,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAM5E,OAAa,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,iBAAiB,CAAC;AAgBzB,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7E,YAAY,CAAC,EAAE,IAAI,GAAG,WAAW,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CA0InD,CAAC;AAOF,eAAe,eAAe,CAAC"}
|
|
@@ -44,10 +44,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
44
44
|
}
|
|
45
45
|
return t;
|
|
46
46
|
};
|
|
47
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
48
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
49
|
+
if (ar || !(i in from)) {
|
|
50
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
51
|
+
ar[i] = from[i];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
55
|
+
};
|
|
47
56
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
58
|
};
|
|
50
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
+
/* eslint-disable react/default-props-match-prop-types */
|
|
51
61
|
var React = __importStar(require("react"));
|
|
52
62
|
var react_dom_1 = require("react-dom");
|
|
53
63
|
var react_popper_1 = require("react-popper");
|
|
@@ -72,19 +82,23 @@ var transitionClasses = {
|
|
|
72
82
|
exitDone: 'Placement__content-exit-done',
|
|
73
83
|
};
|
|
74
84
|
var PlacementPopper = function (props) {
|
|
75
|
-
var animatePosition = props.animatePosition, backgroundColor = props.backgroundColor, children = props.children, closeElement = props.closeElement,
|
|
85
|
+
var animatePosition = props.animatePosition, backgroundColor = props.backgroundColor, children = props.children, closeElement = props.closeElement, disableReposition = props.disableReposition, flip = props.flip, isInsideModal = props.isInsideModal, onClose = props.onClose, desiredPlacement = props.placement, referenceElement = props.referenceElement, sameWidth = props.sameWidth, visible = props.visible, _a = props.timeout, timeout = _a === void 0 ? variables_1.transitionDurationFast : _a, rest = __rest(props, ["animatePosition", "backgroundColor", "children", "closeElement", "disableReposition", "flip", "isInsideModal", "onClose", "placement", "referenceElement", "sameWidth", "visible", "timeout"]);
|
|
76
86
|
var ref = useRef();
|
|
77
87
|
var _b = useState(visible), render = _b[0], setRender = _b[1];
|
|
88
|
+
var _c = useState(undefined), reference = _c[0], setReference = _c[1];
|
|
78
89
|
useEffect(function () {
|
|
79
90
|
if (visible) {
|
|
80
91
|
setRender(true);
|
|
81
92
|
}
|
|
82
93
|
}, [visible]);
|
|
83
94
|
(0, hooks_1.useEventListener)(closeElement || document, 'click', function (event) {
|
|
84
|
-
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
96
|
+
/* @ts-ignore */
|
|
97
|
+
var isReferenceInPath = __spreadArray([], event.composedPath(), true).includes(reference);
|
|
98
|
+
if (onClose && ref.current && !ref.current.contains(event.target) && !isReferenceInPath) {
|
|
85
99
|
onClose(event);
|
|
86
100
|
}
|
|
87
|
-
}, [onClose]);
|
|
101
|
+
}, [onClose, reference]);
|
|
88
102
|
(0, hooks_1.useEventListener)(ref.current || null, 'transitionend', function () {
|
|
89
103
|
if (!visible) {
|
|
90
104
|
setRender(false);
|
|
@@ -93,36 +107,55 @@ var PlacementPopper = function (props) {
|
|
|
93
107
|
if (!render) {
|
|
94
108
|
return null;
|
|
95
109
|
}
|
|
110
|
+
var modifiers = [
|
|
111
|
+
{
|
|
112
|
+
name: 'offset',
|
|
113
|
+
options: {
|
|
114
|
+
offset: [0, 12],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
if (sameWidth) {
|
|
119
|
+
modifiers.push({
|
|
120
|
+
enabled: true,
|
|
121
|
+
name: 'sameWidth',
|
|
122
|
+
phase: 'beforeWrite',
|
|
123
|
+
requires: ['computeStyles'],
|
|
124
|
+
fn: function (_a) {
|
|
125
|
+
var state = _a.state;
|
|
126
|
+
// eslint-disable-next-line no-param-reassign
|
|
127
|
+
state.styles.popper.width = "".concat(state.rects.reference.width, "px");
|
|
128
|
+
},
|
|
129
|
+
effect: function (_a) {
|
|
130
|
+
var state = _a.state;
|
|
131
|
+
// eslint-disable-next-line no-param-reassign
|
|
132
|
+
state.elements.popper.style.width = "".concat(state.elements.reference.getBoundingClientRect().width || 0, "px");
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
}
|
|
96
136
|
var popperProps = {
|
|
97
137
|
children: function () { return null; },
|
|
98
|
-
eventsEnabled: !disableReposition,
|
|
99
138
|
placement: desiredPlacement,
|
|
100
|
-
modifiers:
|
|
101
|
-
preventOverflow: {
|
|
102
|
-
boundariesElement: 'window',
|
|
103
|
-
},
|
|
104
|
-
flip: {
|
|
105
|
-
behavior: 'flip',
|
|
106
|
-
enabled: flip,
|
|
107
|
-
},
|
|
108
|
-
},
|
|
139
|
+
modifiers: modifiers,
|
|
109
140
|
};
|
|
110
141
|
if (referenceElement) {
|
|
111
142
|
popperProps.referenceElement = referenceElement;
|
|
112
143
|
}
|
|
113
144
|
return (0, react_dom_1.createPortal)(
|
|
114
145
|
// eslint-disable-next-line no-return-assign
|
|
115
|
-
React.createElement(react_popper_1.Popper, __assign({}, popperProps, {
|
|
116
|
-
|
|
146
|
+
React.createElement(react_popper_1.Popper, __assign({}, popperProps, {
|
|
147
|
+
// eslint-disable-next-line no-return-assign
|
|
148
|
+
innerRef: function (el) { return (ref.current = el || null); }, onFirstUpdate: function (state) {
|
|
149
|
+
var _a;
|
|
150
|
+
setReference((_a = state.elements) === null || _a === void 0 ? void 0 : _a.reference);
|
|
151
|
+
} }), function (_a) {
|
|
152
|
+
var arrowProps = _a.arrowProps, placement = _a.placement, ref = _a.ref, update = _a.update, style = _a.style;
|
|
117
153
|
return (
|
|
118
154
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
119
155
|
React.createElement(PlacementArrowPropsContext_1.PlacementArrowPropsContext.Provider, { value: __assign(__assign({}, arrowProps), { backgroundColor: backgroundColor }) },
|
|
120
156
|
React.createElement("div", { className: (0, classnames_1.default)('Placement', "Placement--".concat(placement), {
|
|
121
157
|
'Placement--above-modal': isInsideModal,
|
|
122
158
|
'Placement--animate': animatePosition,
|
|
123
|
-
'Placement--disable-margin': disableMargin === true,
|
|
124
|
-
'Placement--disable-margin-top-bottom': disableMargin === 'top-bottom',
|
|
125
|
-
'Placement--disable-margin-left-right': disableMargin === 'left-right',
|
|
126
159
|
}), ref: ref, style: style },
|
|
127
160
|
React.createElement(react_transition_group_1.CSSTransition, { appear: visible, classNames: transitionClasses, in: visible, timeout: timeout },
|
|
128
161
|
React.createElement("div", { className: "Placement__content" },
|
|
@@ -130,7 +163,7 @@ var PlacementPopper = function (props) {
|
|
|
130
163
|
React.createElement(PlacementManagerContext_1.PlacementManagerContext.Consumer, null, function (_a) {
|
|
131
164
|
var referenceNode = _a.referenceNode;
|
|
132
165
|
return children({
|
|
133
|
-
|
|
166
|
+
update: update,
|
|
134
167
|
width: (referenceNode && referenceNode.clientWidth) || undefined,
|
|
135
168
|
});
|
|
136
169
|
})))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlacementPopper.js","sourceRoot":"","sources":["../../../src/Placement/PlacementPopper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlacementPopper.js","sourceRoot":"","sources":["../../../src/Placement/PlacementPopper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,2CAA+B;AAC/B,uCAAyC;AAEzC,6CAAmD;AACnD,iEAAuD;AACvD,0DAAoC;AACpC,kCAA4C;AAC5C,0CAAsD;AACtD,sDAAwD;AACxD,2EAA0E;AAC1E,qEAAoE;AACpE,2BAAyB;AAEjB,IAAA,SAAS,GAAuB,KAAK,UAA5B,EAAE,MAAM,GAAe,KA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AAE,OAAO;oBAC1F,6BAAK,SAAS,EAAC,oBAAoB;wBACjC,oBAAC,cAAI,eAAK,IAAI,IAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAC,mBAAmB;4BAC7E,oBAAC,iDAAuB,CAAC,QAAQ,QAC9B,UAAC,EAAiB;oCAAf,aAAa,mBAAA;gCACf,OAAA,QAAQ,CAAC;oCACP,MAAM,QAAA;oCACN,KAAK,EAAE,CAAC,aAAa,IAAI,aAAa,CAAC,WAAW,CAAC,IAAI,SAAS;iCACjE,CAAC;4BAHF,CAGE,CAE6B,CAC9B,CACH,CACQ,CACZ,CAC8B,CACvC,CAAC;IACJ,CAAC,CACM,EACT,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG;IAC7B,eAAe,EAAE,OAAO;IACxB,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReferenceChildrenProps } from 'react-popper';
|
|
3
|
-
import { Placement as TypePlacement } from '
|
|
3
|
+
import { Placement as TypePlacement } from '@popperjs/core';
|
|
4
4
|
import { Props as BaseProps } from '../Base/Base';
|
|
5
5
|
interface TooltipChildrenProps extends ReferenceChildrenProps {
|
|
6
6
|
onMouseEnter?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAUlD,UAAU,oBAAqB,SAAQ,sBAAsB;IAC3D,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,KAAK,CAAC,SAAS,CAAC;IAC3D,mDAAmD;IACnD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED;;;GAGG;AACH,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CA+C3C,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAEA,aAAK,6BAA6B,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AACrE,UAAU,qCAAsC,SAAQ,mBAAmB,EAAE,gBAAgB,EAAE,cAAc;CAAG;AAGhH,iBAAS,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"useEventListener.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAEA,aAAK,6BAA6B,GAAG,WAAW,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version":3,"file":"useEventListener.js","sourceRoot":"","sources":["../../../src/hooks/useEventListener.ts"],"names":[],"mappings":";;AAAA,+BAAkC;
|
|
1
|
+
{"version":3,"file":"useEventListener.js","sourceRoot":"","sources":["../../../src/hooks/useEventListener.ts"],"names":[],"mappings":";;AAAA,+BAAkC;AA8BlC,SAAS,gBAAgB,CAAC,EAAO,EAAE,IAAY,EAAE,OAAY,EAAE,KAAa;IAC1E,IAAA,iBAAS,EAAC;QACR,IAAI,EAAE,EAAE;YACN,EAAE,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SACpC;QAED,OAAO;YACL,IAAI,EAAE,EAAE;gBACN,EAAE,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;aACvC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export { default as Base, Props as BaseProps, TypeColors, TypeSizes } from './Ba
|
|
|
20
20
|
export { default as Bounds, Props as BoundsProps } from './Bounds/Bounds';
|
|
21
21
|
export { default as Button, Props as ButtonProps } from './Button/Button';
|
|
22
22
|
export { default as Buttons, Props as ButtonsProps } from './Button/Buttons';
|
|
23
|
-
export { default as ButtonWithDropdown, Props as ButtonWithDropdownProps, } from './ButtonWithDropdown/ButtonWithDropdown';
|
|
24
23
|
export { default as Card, Props as CardProps } from './Card/Card';
|
|
25
24
|
export { default as CardButton, Props as CardButtonProps } from './Card/CardButton';
|
|
26
25
|
export { default as CardContent, Props as CardContentProps } from './Card/CardContent';
|