@mongodb-js/compass-components 0.6.0 → 0.9.1
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/lib/compass-ui-colors.d.ts +3 -0
- package/lib/compass-ui-colors.js +7 -0
- package/lib/compass-ui-colors.js.map +1 -0
- package/lib/components/accordion.d.ts +7 -0
- package/lib/components/accordion.js +71 -0
- package/lib/components/accordion.js.map +1 -0
- package/lib/components/cancel-loader.d.ts +8 -0
- package/lib/components/cancel-loader.js +64 -0
- package/lib/components/cancel-loader.js.map +1 -0
- package/lib/components/confirmation-modal.d.ts +3 -1
- package/lib/components/confirmation-modal.js +5 -0
- package/lib/components/confirmation-modal.js.map +1 -1
- package/lib/components/content-with-fallback.d.ts +17 -0
- package/lib/components/content-with-fallback.js +119 -0
- package/lib/components/content-with-fallback.js.map +1 -0
- package/lib/components/file-input.d.ts +20 -0
- package/lib/components/file-input.js +121 -0
- package/lib/components/file-input.js.map +1 -0
- package/lib/components/inline-definition.d.ts +7 -0
- package/lib/components/inline-definition.js +31 -0
- package/lib/components/inline-definition.js.map +1 -0
- package/lib/components/placeholder.d.ts +8 -0
- package/lib/components/placeholder.js +68 -0
- package/lib/components/placeholder.js.map +1 -0
- package/lib/components/resize-handle.d.ts +15 -0
- package/lib/components/resize-handle.js +117 -0
- package/lib/components/resize-handle.js.map +1 -0
- package/lib/components/spin-loader.d.ts +12 -0
- package/lib/components/spin-loader.js +53 -0
- package/lib/components/spin-loader.js.map +1 -0
- package/lib/components/tooltip.d.ts +13 -0
- package/lib/components/tooltip.js +52 -0
- package/lib/components/tooltip.js.map +1 -0
- package/lib/hooks/use-dom-rect.d.ts +5 -0
- package/lib/hooks/use-dom-rect.js +28 -0
- package/lib/hooks/use-dom-rect.js.map +1 -0
- package/lib/hooks/use-focus-hover.d.ts +14 -0
- package/lib/hooks/use-focus-hover.js +57 -0
- package/lib/hooks/use-focus-hover.js.map +1 -0
- package/lib/index.d.ts +41 -1
- package/lib/index.js +140 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/merge-props.d.ts +2 -0
- package/lib/utils/merge-props.js +24 -0
- package/lib/utils/merge-props.js.map +1 -0
- package/package.json +47 -11
- package/lib/.esm-wrapper.mjs +0 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mergeProps = void 0;
|
|
4
|
+
const utils_1 = require("@react-aria/utils");
|
|
5
|
+
function mergeProps(...props) {
|
|
6
|
+
const propsWithRefs = props.filter((prop) => prop.ref);
|
|
7
|
+
return {
|
|
8
|
+
...(0, utils_1.mergeProps)(...props),
|
|
9
|
+
...(propsWithRefs.length > 0 && {
|
|
10
|
+
ref(val) {
|
|
11
|
+
propsWithRefs.forEach(({ ref }) => {
|
|
12
|
+
if (typeof ref === 'function') {
|
|
13
|
+
ref(val);
|
|
14
|
+
}
|
|
15
|
+
else if (ref && typeof ref === 'object') {
|
|
16
|
+
ref.current = val;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.mergeProps = mergeProps;
|
|
24
|
+
//# sourceMappingURL=merge-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-props.js","sourceRoot":"","sources":["../../src/utils/merge-props.ts"],"names":[],"mappings":";;;AACA,6CAA8D;AAE9D,SAAgB,UAAU,CACxB,GAAG,KAA2B;IAE9B,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,OAAO;QAEL,GAAG,IAAA,kBAAW,EAAC,GAAG,KAAK,CAAC;QACxB,GAAG,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI;YAC9B,GAAG,CAAC,GAAM;gBACR,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;oBAChC,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;wBAC7B,GAAG,CAAC,GAAG,CAAC,CAAC;qBACV;yBAAM,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;wBACxC,GAAiC,CAAC,OAAO,GAAG,GAAG,CAAC;qBAClD;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC;AAnBD,gCAmBC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongodb-js/compass-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "React Components used in Compass",
|
|
5
5
|
"license": "SSPL",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
8
|
+
"types": "./lib/index.d.ts",
|
|
9
|
+
"webpack": "./src/index.ts",
|
|
8
10
|
"require": "./lib/index.js",
|
|
9
11
|
"import": "./lib/.esm-wrapper.mjs"
|
|
10
12
|
},
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
"prepublishOnly": "npm run compile",
|
|
20
22
|
"clean": "rimraf lib",
|
|
21
23
|
"precompile": "npm run clean",
|
|
22
|
-
"compile": "tsc -p tsconfig.json
|
|
24
|
+
"compile": "tsc -p tsconfig.json",
|
|
23
25
|
"eslint": "eslint",
|
|
24
26
|
"prettier": "prettier",
|
|
25
27
|
"lint": "npm run eslint . && npm run prettier -- --check .",
|
|
@@ -33,32 +35,66 @@
|
|
|
33
35
|
"reformat": "npm run prettier -- --write ."
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"@leafygreen-ui/
|
|
38
|
+
"@leafygreen-ui/badge": "^4.0.4",
|
|
39
|
+
"@leafygreen-ui/banner": "^3.0.8",
|
|
40
|
+
"@leafygreen-ui/button": "^12.0.5",
|
|
41
|
+
"@leafygreen-ui/card": "^5.1.3",
|
|
42
|
+
"@leafygreen-ui/checkbox": "^6.0.5",
|
|
43
|
+
"@leafygreen-ui/confirmation-modal": "^2.2.1",
|
|
44
|
+
"@leafygreen-ui/emotion": "^4.0.0",
|
|
45
|
+
"@leafygreen-ui/form-footer": "^0.9.0",
|
|
46
|
+
"@leafygreen-ui/icon": "^11.4.0",
|
|
47
|
+
"@leafygreen-ui/icon-button": "^9.1.6",
|
|
48
|
+
"@leafygreen-ui/leafygreen-provider": "^2.1.2",
|
|
49
|
+
"@leafygreen-ui/logo": "^6.1.0",
|
|
50
|
+
"@leafygreen-ui/menu": "^11.0.1",
|
|
51
|
+
"@leafygreen-ui/modal": "^7.0.0",
|
|
52
|
+
"@leafygreen-ui/palette": "^3.2.2",
|
|
53
|
+
"@leafygreen-ui/portal": "^3.1.3",
|
|
54
|
+
"@leafygreen-ui/radio-box-group": "^6.1.4",
|
|
55
|
+
"@leafygreen-ui/segmented-control": "^0.9.1",
|
|
56
|
+
"@leafygreen-ui/select": "^3.0.8",
|
|
57
|
+
"@leafygreen-ui/table": "^2.0.5",
|
|
58
|
+
"@leafygreen-ui/tabs": "^5.1.3",
|
|
59
|
+
"@leafygreen-ui/text-area": "^4.0.3",
|
|
60
|
+
"@leafygreen-ui/text-input": "^6.0.3",
|
|
61
|
+
"@leafygreen-ui/toast": "^0.4.10",
|
|
62
|
+
"@leafygreen-ui/toggle": "^7.0.4",
|
|
63
|
+
"@leafygreen-ui/tokens": "^0.5.3",
|
|
64
|
+
"@leafygreen-ui/tooltip": "^6.2.2",
|
|
65
|
+
"@leafygreen-ui/typography": "^8.0.2",
|
|
66
|
+
"@mongodb-js/compass-logging": "^0.6.1",
|
|
67
|
+
"@react-aria/interactions": "^3.6.0",
|
|
68
|
+
"@react-aria/tooltip": "^3.1.3",
|
|
69
|
+
"@react-aria/utils": "^3.9.0",
|
|
70
|
+
"@react-stately/tooltip": "^3.0.5"
|
|
37
71
|
},
|
|
38
72
|
"peerDependencies": {
|
|
39
|
-
"@
|
|
73
|
+
"@emotion/css": "^11.5.0",
|
|
40
74
|
"react": "^16.14.0"
|
|
41
75
|
},
|
|
42
76
|
"devDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@mongodb-js/
|
|
45
|
-
"@mongodb-js/
|
|
46
|
-
"@mongodb-js/
|
|
77
|
+
"@emotion/css": "^11.5.0",
|
|
78
|
+
"@mongodb-js/eslint-config-compass": "^0.5.0",
|
|
79
|
+
"@mongodb-js/mocha-config-compass": "^0.7.0",
|
|
80
|
+
"@mongodb-js/prettier-config-compass": "^0.4.0",
|
|
81
|
+
"@mongodb-js/tsconfig-compass": "^0.4.0",
|
|
82
|
+
"@testing-library/dom": "^8.11.1",
|
|
47
83
|
"@testing-library/react": "^12.0.0",
|
|
84
|
+
"@testing-library/user-event": "^13.5.0",
|
|
48
85
|
"@types/chai": "^4.2.21",
|
|
49
86
|
"@types/chai-dom": "^0.0.10",
|
|
50
87
|
"@types/mocha": "^9.0.0",
|
|
51
88
|
"@types/react": "^17.0.5",
|
|
52
89
|
"chai": "^4.3.4",
|
|
53
90
|
"eslint": "^7.25.0",
|
|
54
|
-
"jsdom-global": "^3.0.2",
|
|
55
91
|
"mocha": "^8.4.0",
|
|
56
92
|
"nyc": "^15.0.0",
|
|
57
93
|
"prettier": "2.3.2",
|
|
58
94
|
"react": "^16.14.0",
|
|
59
95
|
"react-dom": "^16.14.0",
|
|
60
96
|
"rimraf": "^3.0.2",
|
|
61
|
-
"
|
|
97
|
+
"sinon": "^9.0.0",
|
|
62
98
|
"typescript": "^4.3.5"
|
|
63
99
|
},
|
|
64
100
|
"repository": {
|
|
@@ -69,5 +105,5 @@
|
|
|
69
105
|
"publishConfig": {
|
|
70
106
|
"access": "public"
|
|
71
107
|
},
|
|
72
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "75710b287ad6e3ea08bc36b15e0be5ebb8f62050"
|
|
73
109
|
}
|
package/lib/.esm-wrapper.mjs
DELETED