@public-ui/react 1.6.0-rc.2 → 1.6.0-rc.21

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
@@ -1,13 +1,10 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  const React = require('react');
6
- require('react-dom');
7
4
 
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
9
6
 
10
- const React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ const React__default = /*#__PURE__*/_interopDefaultCompat(React);
11
8
 
12
9
  const dashToPascalCase = (str) => str.toLowerCase().split("-").map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join("");
13
10
  const camelToDashCase = (str) => str.replace(/([A-Z])/g, (m) => `-${m[0].toLowerCase()}`);
@@ -56,6 +53,13 @@ const getClassName = (classList, newProps, oldProps) => {
56
53
  incomingPropClasses.forEach((s) => finalClassNames.push(s));
57
54
  return finalClassNames.join(" ");
58
55
  };
56
+ const transformReactEventName = (eventNameSuffix) => {
57
+ switch (eventNameSuffix) {
58
+ case "doubleclick":
59
+ return "dblclick";
60
+ }
61
+ return eventNameSuffix;
62
+ };
59
63
  /**
60
64
  * Checks if an event is supported in the current execution environment.
61
65
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
@@ -64,7 +68,7 @@ const isCoveredByReact = (eventNameSuffix) => {
64
68
  if (typeof document === "undefined") {
65
69
  return true;
66
70
  } else {
67
- const eventName = "on" + eventNameSuffix;
71
+ const eventName = "on" + transformReactEventName(eventNameSuffix);
68
72
  let isSupported = eventName in document;
69
73
  if (!isSupported) {
70
74
  const element = document.createElement("div");
@@ -175,6 +179,8 @@ const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFun
175
179
  const KolAbbr = /* @__PURE__ */ createReactComponent("kol-abbr");
176
180
  const KolAccordion = /* @__PURE__ */ createReactComponent("kol-accordion");
177
181
  const KolAlert = /* @__PURE__ */ createReactComponent("kol-alert");
182
+ const KolAvatar = /* @__PURE__ */ createReactComponent("kol-avatar");
183
+ const KolAvatarWc = /* @__PURE__ */ createReactComponent("kol-avatar-wc");
178
184
  const KolBadge = /* @__PURE__ */ createReactComponent("kol-badge");
179
185
  const KolBreadcrumb = /* @__PURE__ */ createReactComponent("kol-breadcrumb");
180
186
  const KolButton = /* @__PURE__ */ createReactComponent("kol-button");
@@ -228,6 +234,8 @@ const KolVersion = /* @__PURE__ */ createReactComponent("kol-version");
228
234
  exports.KolAbbr = KolAbbr;
229
235
  exports.KolAccordion = KolAccordion;
230
236
  exports.KolAlert = KolAlert;
237
+ exports.KolAvatar = KolAvatar;
238
+ exports.KolAvatarWc = KolAvatarWc;
231
239
  exports.KolBadge = KolBadge;
232
240
  exports.KolBreadcrumb = KolBreadcrumb;
233
241
  exports.KolButton = KolButton;
package/dist/index.d.ts CHANGED
@@ -12,6 +12,8 @@ interface StyleReactProps {
12
12
  declare const KolAbbr: react.ForwardRefExoticComponent<JSX.KolAbbr & Omit<react.HTMLAttributes<HTMLKolAbbrElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAbbrElement>>;
13
13
  declare const KolAccordion: react.ForwardRefExoticComponent<JSX.KolAccordion & Omit<react.HTMLAttributes<HTMLKolAccordionElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAccordionElement>>;
14
14
  declare const KolAlert: react.ForwardRefExoticComponent<JSX.KolAlert & Omit<react.HTMLAttributes<HTMLKolAlertElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAlertElement>>;
15
+ declare const KolAvatar: react.ForwardRefExoticComponent<JSX.KolAvatar & Omit<react.HTMLAttributes<HTMLKolAvatarElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAvatarElement>>;
16
+ declare const KolAvatarWc: react.ForwardRefExoticComponent<JSX.KolAvatarWc & Omit<react.HTMLAttributes<HTMLKolAvatarWcElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAvatarWcElement>>;
15
17
  declare const KolBadge: react.ForwardRefExoticComponent<JSX.KolBadge & Omit<react.HTMLAttributes<HTMLKolBadgeElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolBadgeElement>>;
16
18
  declare const KolBreadcrumb: react.ForwardRefExoticComponent<JSX.KolBreadcrumb & Omit<react.HTMLAttributes<HTMLKolBreadcrumbElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolBreadcrumbElement>>;
17
19
  declare const KolButton: react.ForwardRefExoticComponent<JSX.KolButton & Omit<react.HTMLAttributes<HTMLKolButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolButtonElement>>;
@@ -62,4 +64,4 @@ declare const KolToast: react.ForwardRefExoticComponent<JSX.KolToast & Omit<reac
62
64
  declare const KolTooltip: react.ForwardRefExoticComponent<JSX.KolTooltip & Omit<react.HTMLAttributes<HTMLKolTooltipElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTooltipElement>>;
63
65
  declare const KolVersion: react.ForwardRefExoticComponent<JSX.KolVersion & Omit<react.HTMLAttributes<HTMLKolVersionElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolVersionElement>>;
64
66
 
65
- export { KolAbbr, KolAccordion, KolAlert, KolBadge, KolBreadcrumb, KolButton, KolButtonGroup, KolButtonGroupWc, KolButtonLink, KolCard, KolDetails, KolForm, KolHeading, KolIcon, KolIconFontAwesome, KolIconIcofont, KolImage, KolIndentedText, KolInputAdapterLeanup, KolInputCheckbox, KolInputColor, KolInputDate, KolInputEmail, KolInputFile, KolInputNumber, KolInputPassword, KolInputRadio, KolInputRange, KolInputText, KolKolibri, KolLink, KolLinkButton, KolLinkGroup, KolLogo, KolModal, KolNav, KolPagination, KolPopover, KolProgress, KolQuote, KolSelect, KolSkipNav, KolSpan, KolSpin, KolSplitButton, KolSymbol, KolTable, KolTabs, KolTextarea, KolToast, KolTooltip, KolVersion };
67
+ export { KolAbbr, KolAccordion, KolAlert, KolAvatar, KolAvatarWc, KolBadge, KolBreadcrumb, KolButton, KolButtonGroup, KolButtonGroupWc, KolButtonLink, KolCard, KolDetails, KolForm, KolHeading, KolIcon, KolIconFontAwesome, KolIconIcofont, KolImage, KolIndentedText, KolInputAdapterLeanup, KolInputCheckbox, KolInputColor, KolInputDate, KolInputEmail, KolInputFile, KolInputNumber, KolInputPassword, KolInputRadio, KolInputRange, KolInputText, KolKolibri, KolLink, KolLinkButton, KolLinkGroup, KolLogo, KolModal, KolNav, KolPagination, KolPopover, KolProgress, KolQuote, KolSelect, KolSkipNav, KolSpan, KolSpin, KolSplitButton, KolSymbol, KolTable, KolTabs, KolTextarea, KolToast, KolTooltip, KolVersion };
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
1
  import React, { createElement } from 'react';
2
- import 'react-dom';
3
2
 
4
3
  const dashToPascalCase = (str) => str.toLowerCase().split("-").map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join("");
5
4
  const camelToDashCase = (str) => str.replace(/([A-Z])/g, (m) => `-${m[0].toLowerCase()}`);
@@ -48,6 +47,13 @@ const getClassName = (classList, newProps, oldProps) => {
48
47
  incomingPropClasses.forEach((s) => finalClassNames.push(s));
49
48
  return finalClassNames.join(" ");
50
49
  };
50
+ const transformReactEventName = (eventNameSuffix) => {
51
+ switch (eventNameSuffix) {
52
+ case "doubleclick":
53
+ return "dblclick";
54
+ }
55
+ return eventNameSuffix;
56
+ };
51
57
  /**
52
58
  * Checks if an event is supported in the current execution environment.
53
59
  * @license Modernizr 3.0.0pre (Custom Build) | MIT
@@ -56,7 +62,7 @@ const isCoveredByReact = (eventNameSuffix) => {
56
62
  if (typeof document === "undefined") {
57
63
  return true;
58
64
  } else {
59
- const eventName = "on" + eventNameSuffix;
65
+ const eventName = "on" + transformReactEventName(eventNameSuffix);
60
66
  let isSupported = eventName in document;
61
67
  if (!isSupported) {
62
68
  const element = document.createElement("div");
@@ -167,6 +173,8 @@ const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFun
167
173
  const KolAbbr = /* @__PURE__ */ createReactComponent("kol-abbr");
168
174
  const KolAccordion = /* @__PURE__ */ createReactComponent("kol-accordion");
169
175
  const KolAlert = /* @__PURE__ */ createReactComponent("kol-alert");
176
+ const KolAvatar = /* @__PURE__ */ createReactComponent("kol-avatar");
177
+ const KolAvatarWc = /* @__PURE__ */ createReactComponent("kol-avatar-wc");
170
178
  const KolBadge = /* @__PURE__ */ createReactComponent("kol-badge");
171
179
  const KolBreadcrumb = /* @__PURE__ */ createReactComponent("kol-breadcrumb");
172
180
  const KolButton = /* @__PURE__ */ createReactComponent("kol-button");
@@ -217,4 +225,4 @@ const KolToast = /* @__PURE__ */ createReactComponent("kol-toast");
217
225
  const KolTooltip = /* @__PURE__ */ createReactComponent("kol-tooltip");
218
226
  const KolVersion = /* @__PURE__ */ createReactComponent("kol-version");
219
227
 
220
- export { KolAbbr, KolAccordion, KolAlert, KolBadge, KolBreadcrumb, KolButton, KolButtonGroup, KolButtonGroupWc, KolButtonLink, KolCard, KolDetails, KolForm, KolHeading, KolIcon, KolIconFontAwesome, KolIconIcofont, KolImage, KolIndentedText, KolInputAdapterLeanup, KolInputCheckbox, KolInputColor, KolInputDate, KolInputEmail, KolInputFile, KolInputNumber, KolInputPassword, KolInputRadio, KolInputRange, KolInputText, KolKolibri, KolLink, KolLinkButton, KolLinkGroup, KolLogo, KolModal, KolNav, KolPagination, KolPopover, KolProgress, KolQuote, KolSelect, KolSkipNav, KolSpan, KolSpin, KolSplitButton, KolSymbol, KolTable, KolTabs, KolTextarea, KolToast, KolTooltip, KolVersion };
228
+ export { KolAbbr, KolAccordion, KolAlert, KolAvatar, KolAvatarWc, KolBadge, KolBreadcrumb, KolButton, KolButtonGroup, KolButtonGroupWc, KolButtonLink, KolCard, KolDetails, KolForm, KolHeading, KolIcon, KolIconFontAwesome, KolIconIcofont, KolImage, KolIndentedText, KolInputAdapterLeanup, KolInputCheckbox, KolInputColor, KolInputDate, KolInputEmail, KolInputFile, KolInputNumber, KolInputPassword, KolInputRadio, KolInputRange, KolInputText, KolKolibri, KolLink, KolLinkButton, KolLinkGroup, KolLogo, KolModal, KolNav, KolPagination, KolPopover, KolProgress, KolQuote, KolSelect, KolSkipNav, KolSpan, KolSpin, KolSplitButton, KolSymbol, KolTable, KolTabs, KolTextarea, KolToast, KolTooltip, KolVersion };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/react",
3
- "version": "1.6.0-rc.2",
3
+ "version": "1.6.0-rc.21",
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.2",
49
+ "@public-ui/components": "1.6.0-rc.21",
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.16",
55
+ "@types/react-dom": "18.2.7",
56
56
  "react": "18.2.0",
57
57
  "react-dom": "18.2.0",
58
- "typescript": "5.0.4",
59
- "unbuild": "0.8.11"
58
+ "typescript": "5.1.6",
59
+ "unbuild": "1.2.1"
60
60
  },
61
61
  "peerDependencies": {
62
- "@public-ui/components": "1.6.0-rc.2",
62
+ "@public-ui/components": "1.6.0-rc.21",
63
63
  "react": ">=16.14.0",
64
64
  "react-dom": ">=16.14.0"
65
65
  },