@databricks/design-system 1.8.0 → 1.9.0

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,8 @@
1
+ import type { ReactWrapper } from 'enzyme';
2
+ /**
3
+ * Open a dropdown menu by simulating a pointerDown event on the dropdown button.
4
+ *
5
+ * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.
6
+ */
7
+ export declare const openDropdownMenu: (dropdownButton: ReactWrapper) => void;
8
+ //# sourceMappingURL=enzyme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enzyme.d.ts","sourceRoot":"","sources":["../../src/test-utils/enzyme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mBAAoB,YAAY,SAE5D,CAAC"}
@@ -0,0 +1,16 @@
1
+ // eslint-disable-next-line @databricks/no-restricted-imports-regexp
2
+
3
+ /**
4
+ * Open a dropdown menu by simulating a pointerDown event on the dropdown button.
5
+ *
6
+ * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.
7
+ */
8
+ const openDropdownMenu = dropdownButton => {
9
+ dropdownButton.hostNodes().simulate('pointerDown', {
10
+ button: 0,
11
+ ctrlKey: false
12
+ });
13
+ };
14
+
15
+ export { openDropdownMenu };
16
+ //# sourceMappingURL=enzyme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enzyme.js","sources":["../../src/test-utils/enzyme.ts"],"sourcesContent":["// eslint-disable-next-line @databricks/no-restricted-imports-regexp\nimport type { ReactWrapper } from 'enzyme';\n\n/**\n * Open a dropdown menu by simulating a pointerDown event on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = (dropdownButton: ReactWrapper) => {\n dropdownButton.hostNodes().simulate('pointerDown', { button: 0, ctrlKey: false });\n};\n"],"names":["openDropdownMenu","dropdownButton","hostNodes","simulate","button","ctrlKey"],"mappings":"AAAA;;AAGA;AACA;AACA;AACA;AACA;MACaA,gBAAgB,GAAIC,cAA4B,IAAK;EAChEA,cAAc,CAACC,SAAS,EAAE,CAACC,QAAQ,CAAC,aAAa,EAAE;IAAEC,MAAM,EAAE,CAAC;IAAEC,OAAO,EAAE;GAAO,CAAC;AACnF;;;;"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Opens the dropdown menu by clicking on the dropdown button.
3
+ *
4
+ * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.
5
+ */
6
+ export declare const openDropdownMenu: (dropdownButton: HTMLElement) => Promise<void>;
7
+ //# sourceMappingURL=rtl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtl.d.ts","sourceRoot":"","sources":["../../src/test-utils/rtl.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mBAA0B,WAAW,kBAEjE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import userEvent from '@testing-library/user-event';
2
+
3
+ /**
4
+ * Opens the dropdown menu by clicking on the dropdown button.
5
+ *
6
+ * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.
7
+ */
8
+ const openDropdownMenu = async dropdownButton => {
9
+ await userEvent.click(dropdownButton);
10
+ };
11
+
12
+ export { openDropdownMenu };
13
+ //# sourceMappingURL=rtl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtl.js","sources":["../../src/test-utils/rtl.ts"],"sourcesContent":["import userEvent from '@testing-library/user-event';\n\n/**\n * Opens the dropdown menu by clicking on the dropdown button.\n *\n * @param dropdownButton - The Dropdown Trigger button that opens the menu when clicked.\n */\nexport const openDropdownMenu = async (dropdownButton: HTMLElement) => {\n await userEvent.click(dropdownButton);\n};\n"],"names":["openDropdownMenu","dropdownButton","userEvent","click"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;MACaA,gBAAgB,GAAG,MAAOC,cAA2B,IAAK;EACrE,MAAMC,SAAS,CAACC,KAAK,CAACF,cAAc,CAAC;AACvC;;;;"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file is used to check that the test utilities exposed are the same for
3
+ * both Enzyme and RTL. Specifically, we simply compare that the export identifiers
4
+ * are the same between `enzyme.ts` and `rtl.ts`. Note that this does not compare
5
+ * the input/output types for each export because Enzyme and RTL have very different
6
+ * types and it would be hard to enforce consistency of the exact API types. `testUtilsEqual`
7
+ * is required to be `true` through the type system. so if the Enzyme and RTL APIs
8
+ * diverge, this file will produce a type error.
9
+ */
10
+ type EnzymeTestUtils = keyof typeof import('./enzyme');
11
+ type RTLTestUtils = keyof typeof import('./rtl');
12
+ type Equal<U1, U2> = [U1] extends [U2] ? ([U2] extends [U1] ? true : false) : false;
13
+ type TestUtilsEqual = Equal<EnzymeTestUtils, RTLTestUtils>;
14
+ declare const testUtilsEqual: TestUtilsEqual;
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/test-utils/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,KAAK,eAAe,GAAG,MAAM,cAAc,UAAU,CAAC,CAAC;AAGvD,KAAK,YAAY,GAAG,MAAM,cAAc,OAAO,CAAC,CAAC;AAEjD,KAAK,KAAK,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC;AACpF,KAAK,cAAc,GAAG,KAAK,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AAI3D,QAAA,MAAM,cAAc,EAAE,cAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/design-system",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "DuBois Design System",
5
5
  "keywords": [],
6
6
  "license": "ISC",
@@ -31,7 +31,8 @@
31
31
  "build:deps": "yarn workspaces foreach -piR --topological-dev --from @databricks/design-system --exclude @databricks/design-system run build",
32
32
  "build:js:base": "databricks-pkgr build --no-clean",
33
33
  "build:js": "yarn build:js:base",
34
- "build:styles": "npm-run-all --parallel build:styles-default-theme build:styles-dark-theme",
34
+ "build:styles": "npm-run-all --parallel build:styles-default-theme build:styles-dark-theme build:styles:mfe",
35
+ "build:styles:mfe": "BUILD_FOR_MFE=true npm-run-all --parallel build:styles-default-theme build:styles-dark-theme",
35
36
  "build:styles-default-theme": "rollup --configPlugin typescript -c ./src/rollup.styles.config.ts",
36
37
  "build:styles-dark-theme": "BUILD_DARK_MODE=true rollup --configPlugin typescript -c ./src/rollup.styles.config.ts",
37
38
  "watch": "yarn build:js:base -w",
@@ -85,7 +86,8 @@
85
86
  "@svgr/cli": "^5.5.0",
86
87
  "@testing-library/jest-dom": "^5.14.1",
87
88
  "@testing-library/react": "^12.1.2",
88
- "@testing-library/user-event": "^14.0.0",
89
+ "@types/chroma-js": "^2.1.3",
90
+ "@types/enzyme": "^3.10.8",
89
91
  "@types/glob": "^7.2.0",
90
92
  "@types/jest": "^28.1.6",
91
93
  "@types/jscodeshift": "^0.11.2",
@@ -93,6 +95,7 @@
93
95
  "@types/node": "^16.0.0",
94
96
  "@types/react": "^17.0.50",
95
97
  "@types/react-dom": "^17.0.17",
98
+ "@types/react-resizable": "^3.0.3",
96
99
  "babel-loader": "^8.2.2",
97
100
  "babel-plugin-react-require": "^3.1.3",
98
101
  "cross-env": "^7.0.3",
@@ -141,12 +144,13 @@
141
144
  "@radix-ui/react-dropdown-menu": "^1.0.0",
142
145
  "@radix-ui/react-popover": "^1.0.0",
143
146
  "@rollup/plugin-node-resolve": "^13.1.1",
144
- "@types/chroma-js": "^2.1.3",
145
- "@types/react-resizable": "^3.0.3",
147
+ "@testing-library/user-event": "^14.0.0",
146
148
  "antd": "4.16.8",
147
149
  "chroma-js": "^2.4.2",
148
150
  "classnames": "^2.3.1",
151
+ "enzyme": "^3.11.0",
149
152
  "lodash": "^4.17.21",
153
+ "postcss-prefixwrap": "^1.37.0",
150
154
  "react-hook-form": "^7.36.0",
151
155
  "react-resizable": "^3.0.4",
152
156
  "tslib": "^2.4.1"