@public-ui/react 1.6.0-rc.1 → 1.6.0-rc.3

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/dist/index.cjs CHANGED
@@ -56,6 +56,13 @@ const getClassName = (classList, newProps, oldProps) => {
56
56
  incomingPropClasses.forEach((s) => finalClassNames.push(s));
57
57
  return finalClassNames.join(" ");
58
58
  };
59
+ const transformReactEventName = (eventNameSuffix) => {
60
+ switch (eventNameSuffix) {
61
+ case "doubleclick":
62
+ return "dblclick";
63
+ }
64
+ return eventNameSuffix;
65
+ };
59
66
  /**
60
67
  * Checks if an event is supported in the current execution environment.
61
68
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
@@ -64,7 +71,7 @@ const isCoveredByReact = (eventNameSuffix) => {
64
71
  if (typeof document === "undefined") {
65
72
  return true;
66
73
  } else {
67
- const eventName = "on" + eventNameSuffix;
74
+ const eventName = "on" + transformReactEventName(eventNameSuffix);
68
75
  let isSupported = eventName in document;
69
76
  if (!isSupported) {
70
77
  const element = document.createElement("div");
package/dist/index.mjs CHANGED
@@ -48,6 +48,13 @@ const getClassName = (classList, newProps, oldProps) => {
48
48
  incomingPropClasses.forEach((s) => finalClassNames.push(s));
49
49
  return finalClassNames.join(" ");
50
50
  };
51
+ const transformReactEventName = (eventNameSuffix) => {
52
+ switch (eventNameSuffix) {
53
+ case "doubleclick":
54
+ return "dblclick";
55
+ }
56
+ return eventNameSuffix;
57
+ };
51
58
  /**
52
59
  * Checks if an event is supported in the current execution environment.
53
60
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
@@ -56,7 +63,7 @@ const isCoveredByReact = (eventNameSuffix) => {
56
63
  if (typeof document === "undefined") {
57
64
  return true;
58
65
  } else {
59
- const eventName = "on" + eventNameSuffix;
66
+ const eventName = "on" + transformReactEventName(eventNameSuffix);
60
67
  let isSupported = eventName in document;
61
68
  if (!isSupported) {
62
69
  const element = document.createElement("div");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/react",
3
- "version": "1.6.0-rc.1",
3
+ "version": "1.6.0-rc.3",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": "https://github.com/public-ui/kolibri",
@@ -46,20 +46,20 @@
46
46
  "prepack": "unbuild"
47
47
  },
48
48
  "devDependencies": {
49
- "@public-ui/components": "1.6.0-rc.1",
49
+ "@public-ui/components": "1.6.0-rc.3",
50
50
  "@types/minimatch": "5.1.2",
51
51
  "@types/minimist": "1.2.2",
52
52
  "@types/node": "ts4.9",
53
53
  "@types/normalize-package-data": "2.4.1",
54
- "@types/react": "18.2.8",
55
- "@types/react-dom": "18.2.4",
54
+ "@types/react": "18.2.13",
55
+ "@types/react-dom": "18.2.6",
56
56
  "react": "18.2.0",
57
57
  "react-dom": "18.2.0",
58
58
  "typescript": "5.0.4",
59
59
  "unbuild": "0.8.11"
60
60
  },
61
61
  "peerDependencies": {
62
- "@public-ui/components": "1.6.0-rc.1",
62
+ "@public-ui/components": "1.6.0-rc.3",
63
63
  "react": ">=16.14.0",
64
64
  "react-dom": ">=16.14.0"
65
65
  },