@public-ui/react-standalone 2.1.5-rc.0 → 2.1.5-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.mjs +243 -2
- package/package.json +4 -6
- package/dist/index.mjs.LICENSE.txt +0 -9
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,243 @@
|
|
|
1
|
-
|
|
2
|
-
(()=>{"use strict";var e={19:(e,t)=>{var o=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.iterator,y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,m={};function k(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||y}function h(){}function v(e,t,o){this.props=e,this.context=t,this.refs=m,this.updater=o||y}k.prototype.isReactComponent={},k.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},k.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},h.prototype=k.prototype;var K=v.prototype=new h;K.constructor=v,b(K,k.prototype),K.isPureReactComponent=!0;var _=Array.isArray,g=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function w(e,t,r){var n,l={},u=null,a=null;if(null!=t)for(n in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)g.call(t,n)&&!E.hasOwnProperty(n)&&(l[n]=t[n]);var i=arguments.length-2;if(1===i)l.children=r;else if(1<i){for(var s=Array(i),c=0;c<i;c++)s[c]=arguments[c+2];l.children=s}if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===l[n]&&(l[n]=i[n]);return{$$typeof:o,type:e,key:u,ref:a,props:l,_owner:S.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var R=/\/+/g;function x(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,n,l,u){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case o:case r:i=!0}}if(i)return u=u(i=e),e=""===l?"."+x(i,0):l,_(u)?(n="",null!=e&&(n=e.replace(R,"$&/")+"/"),T(u,t,n,"",(function(e){return e}))):null!=u&&(C(u)&&(u=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(u,n+(!u.key||i&&i.key===u.key?"":(""+u.key).replace(R,"$&/")+"/")+e)),t.push(u)),1;if(i=0,l=""===l?".":l+":",_(e))for(var s=0;s<e.length;s++){var c=l+x(a=e[s],s);i+=T(a,t,n,c,u)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),s=0;!(a=e.next()).done;)i+=T(a=a.value,t,n,c=l+x(a,s++),u);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function j(e,t,o){if(null==e)return e;var r=[],n=0;return T(e,r,"","",(function(e){return t.call(o,e,n++)})),r}function I(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var $={current:null},O={transition:null},P={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:O,ReactCurrentOwner:S};t.Children={map:j,forEach:function(e,t,o){j(e,(function(){t.apply(this,arguments)}),o)},count:function(e){var t=0;return j(e,(function(){t++})),t},toArray:function(e){return j(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=k,t.Fragment=n,t.Profiler=u,t.PureComponent=v,t.StrictMode=l,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=b({},e.props),l=e.key,u=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,a=S.current),void 0!==t.key&&(l=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(s in t)g.call(t,s)&&!E.hasOwnProperty(s)&&(n[s]=void 0===t[s]&&void 0!==i?i[s]:t[s])}var s=arguments.length-2;if(1===s)n.children=r;else if(1<s){i=Array(s);for(var c=0;c<s;c++)i[c]=arguments[c+2];n.children=i}return{$$typeof:o,type:e.type,key:l,ref:u,props:n,_owner:a}},t.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=w,t.createFactory=function(e){var t=w.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return $.current.useCallback(e,t)},t.useContext=function(e){return $.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return $.current.useDeferredValue(e)},t.useEffect=function(e,t){return $.current.useEffect(e,t)},t.useId=function(){return $.current.useId()},t.useImperativeHandle=function(e,t,o){return $.current.useImperativeHandle(e,t,o)},t.useInsertionEffect=function(e,t){return $.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return $.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return $.current.useMemo(e,t)},t.useReducer=function(e,t,o){return $.current.useReducer(e,t,o)},t.useRef=function(e){return $.current.useRef(e)},t.useState=function(e){return $.current.useState(e)},t.useSyncExternalStore=function(e,t,o){return $.current.useSyncExternalStore(e,t,o)},t.useTransition=function(){return $.current.useTransition()},t.version="18.2.0"},832:(e,t,o)=>{e.exports=o(19)}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,o),l.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{KolAbbr:()=>d,KolAccordion:()=>y,KolAlert:()=>b,KolAvatar:()=>m,KolBadge:()=>k,KolBreadcrumb:()=>h,KolButton:()=>v,KolButtonGroup:()=>K,KolButtonLink:()=>_,KolCard:()=>g,KolCombobox:()=>S,KolDetails:()=>E,KolDrawer:()=>w,KolForm:()=>C,KolHeading:()=>R,KolIcon:()=>x,KolImage:()=>T,KolIndentedText:()=>j,KolInputCheckbox:()=>I,KolInputColor:()=>$,KolInputDate:()=>O,KolInputEmail:()=>P,KolInputFile:()=>L,KolInputNumber:()=>A,KolInputPassword:()=>N,KolInputRadio:()=>D,KolInputRange:()=>U,KolInputText:()=>M,KolKolibri:()=>B,KolLink:()=>V,KolLinkButton:()=>F,KolLinkGroup:()=>q,KolLogo:()=>H,KolModal:()=>W,KolNav:()=>z,KolPagination:()=>G,KolProgress:()=>Q,KolQuote:()=>Y,KolSelect:()=>Z,KolSkipNav:()=>J,KolSpin:()=>X,KolSplitButton:()=>ee,KolSymbol:()=>te,KolTable:()=>oe,KolTableStateful:()=>re,KolTableStateless:()=>ne,KolTabs:()=>le,KolTextarea:()=>ue,KolToastContainer:()=>ae,KolToolbar:()=>ie,KolTree:()=>se,KolTreeItem:()=>ce,KolTreeItemWc:()=>fe,KolTreeWc:()=>pe,KolVersion:()=>de,createReactRenderElement:()=>ye,setTagNameTransformer:()=>c});var n=o(832);const l=e=>e.replace(/([A-Z])/g,(e=>`-${e[0].toLowerCase()}`)),u=e=>{if("undefined"==typeof document)return!0;{const t="on"+(e=>"doubleclick"===e?"dblclick":e)(e);let o=t in document;if(!o){const e=document.createElement("div");e.setAttribute(t,"return;"),o="function"==typeof e[t]}return o}},a=(e,t,o)=>{const r=e.__events||(e.__events={}),n=r[t];n&&e.removeEventListener(t,n),e.addEventListener(t,r[t]=function(e){o&&o.call(this,e)})},i=e=>{const t=new Map;return e.forEach((e=>t.set(e,e))),t};let s;const c=e=>{s=e},f=(...e)=>t=>{e.forEach((e=>{((e,t)=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})(e,t)}))},p=(e,t,o,r)=>{void 0!==r&&r();const c=e.toLowerCase().split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(""),p=class extends n.Component{constructor(e){super(e),this.setComponentElRef=e=>{this.componentEl=e}}componentDidMount(){this.componentDidUpdate(this.props)}componentDidUpdate(e){((e,t,o={})=>{if(e instanceof Element){const r=((e,t,o)=>{const r=t.className||t.class,n=o.className||o.class,l=i(e),u=i(r?r.split(" "):[]),a=i(n?n.split(" "):[]),s=[];return l.forEach((e=>{u.has(e)?(s.push(e),u.delete(e)):a.has(e)||s.push(e)})),u.forEach((e=>s.push(e))),s.join(" ")})(e.classList,t,o);""!==r&&(e.className=r),Object.keys(t).forEach((o=>{if("children"!==o&&"style"!==o&&"ref"!==o&&"class"!==o&&"className"!==o&&"forwardedRef"!==o)if(0===o.indexOf("on")&&o[2]===o[2].toUpperCase()){const r=o.substring(2),n=r[0].toLowerCase()+r.substring(1);u(n)||a(e,n,t[o])}else e[o]=t[o],"string"==typeof t[o]&&e.setAttribute(l(o),t[o])}))}})(this.componentEl,this.props,e)}render(){const{children:t,forwardedRef:r,style:a,className:i,ref:c,...p}=this.props;let d=Object.keys(p).reduce(((e,t)=>{const o=p[t];if(0===t.indexOf("on")&&t[2]===t[2].toUpperCase()){const r=t.substring(2).toLowerCase();"undefined"!=typeof document&&u(r)&&(e[t]=o)}else{const r=typeof o;"string"!==r&&"boolean"!==r&&"number"!==r||(e[l(t)]=o)}return e}),{});o&&(d=o(this.props,d));const y={...d,ref:f(r,this.setComponentElRef),style:a},b="function"==typeof s?s(e):e;return(0,n.createElement)(b,y,t)}static get displayName(){return c}};return t&&(p.contextType=t),((e,t)=>{const o=(t,o)=>n.createElement(e,{...t,forwardedRef:o});return o.displayName=t,n.forwardRef(o)})(p,c)},d=p("kol-abbr"),y=p("kol-accordion"),b=p("kol-alert"),m=p("kol-avatar"),k=p("kol-badge"),h=p("kol-breadcrumb"),v=p("kol-button"),K=p("kol-button-group"),_=p("kol-button-link"),g=p("kol-card"),S=p("kol-combobox"),E=p("kol-details"),w=p("kol-drawer"),C=p("kol-form"),R=p("kol-heading"),x=p("kol-icon"),T=p("kol-image"),j=p("kol-indented-text"),I=p("kol-input-checkbox"),$=p("kol-input-color"),O=p("kol-input-date"),P=p("kol-input-email"),L=p("kol-input-file"),A=p("kol-input-number"),N=p("kol-input-password"),D=p("kol-input-radio"),U=p("kol-input-range"),M=p("kol-input-text"),B=p("kol-kolibri"),V=p("kol-link"),F=p("kol-link-button"),q=p("kol-link-group"),H=p("kol-logo"),W=p("kol-modal"),z=p("kol-nav"),G=p("kol-pagination"),Q=p("kol-progress"),Y=p("kol-quote"),Z=p("kol-select"),J=p("kol-skip-nav"),X=p("kol-spin"),ee=p("kol-split-button"),te=p("kol-symbol"),oe=p("kol-table"),re=p("kol-table-stateful"),ne=p("kol-table-stateless"),le=p("kol-tabs"),ue=p("kol-textarea"),ae=p("kol-toast-container"),ie=p("kol-toolbar"),se=p("kol-tree"),ce=p("kol-tree-item"),fe=p("kol-tree-item-wc"),pe=p("kol-tree-wc"),de=p("kol-version");function ye(e){const t=document.createElement("div");return t.setAttribute("role","presentation"),e.innerHTML="",e.appendChild(t),t}Object.entries(r).forEach((([e,t])=>{window[e]=t}))})();
|
|
1
|
+
import React, { createElement } from 'react';
|
|
2
|
+
|
|
3
|
+
const dashToPascalCase = (str) => str.toLowerCase().split("-").map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join("");
|
|
4
|
+
const camelToDashCase = (str) => str.replace(/([A-Z])/g, (m) => `-${m[0].toLowerCase()}`);
|
|
5
|
+
|
|
6
|
+
const attachProps = (node, newProps, oldProps = {}) => {
|
|
7
|
+
if (node instanceof Element) {
|
|
8
|
+
const className = getClassName(node.classList, newProps, oldProps);
|
|
9
|
+
if (className !== "") {
|
|
10
|
+
node.className = className;
|
|
11
|
+
}
|
|
12
|
+
Object.keys(newProps).forEach((name) => {
|
|
13
|
+
if (name === "children" || name === "style" || name === "ref" || name === "class" || name === "className" || name === "forwardedRef") {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (name.indexOf("on") === 0 && name[2] === name[2].toUpperCase()) {
|
|
17
|
+
const eventName = name.substring(2);
|
|
18
|
+
const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
|
19
|
+
if (!isCoveredByReact(eventNameLc)) {
|
|
20
|
+
syncEvent(node, eventNameLc, newProps[name]);
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
node[name] = newProps[name];
|
|
24
|
+
const propType = typeof newProps[name];
|
|
25
|
+
if (propType === "string") {
|
|
26
|
+
node.setAttribute(camelToDashCase(name), newProps[name]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const getClassName = (classList, newProps, oldProps) => {
|
|
33
|
+
const newClassProp = newProps.className || newProps.class;
|
|
34
|
+
const oldClassProp = oldProps.className || oldProps.class;
|
|
35
|
+
const currentClasses = arrayToMap(classList);
|
|
36
|
+
const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(" ") : []);
|
|
37
|
+
const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(" ") : []);
|
|
38
|
+
const finalClassNames = [];
|
|
39
|
+
currentClasses.forEach((currentClass) => {
|
|
40
|
+
if (incomingPropClasses.has(currentClass)) {
|
|
41
|
+
finalClassNames.push(currentClass);
|
|
42
|
+
incomingPropClasses.delete(currentClass);
|
|
43
|
+
} else if (!oldPropClasses.has(currentClass)) {
|
|
44
|
+
finalClassNames.push(currentClass);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
incomingPropClasses.forEach((s) => finalClassNames.push(s));
|
|
48
|
+
return finalClassNames.join(" ");
|
|
49
|
+
};
|
|
50
|
+
const transformReactEventName = (eventNameSuffix) => {
|
|
51
|
+
switch (eventNameSuffix) {
|
|
52
|
+
case "doubleclick":
|
|
53
|
+
return "dblclick";
|
|
54
|
+
}
|
|
55
|
+
return eventNameSuffix;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Checks if an event is supported in the current execution environment.
|
|
59
|
+
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
60
|
+
*/
|
|
61
|
+
const isCoveredByReact = (eventNameSuffix) => {
|
|
62
|
+
if (typeof document === "undefined") {
|
|
63
|
+
return true;
|
|
64
|
+
} else {
|
|
65
|
+
const eventName = "on" + transformReactEventName(eventNameSuffix);
|
|
66
|
+
let isSupported = eventName in document;
|
|
67
|
+
if (!isSupported) {
|
|
68
|
+
const element = document.createElement("div");
|
|
69
|
+
element.setAttribute(eventName, "return;");
|
|
70
|
+
isSupported = typeof element[eventName] === "function";
|
|
71
|
+
}
|
|
72
|
+
return isSupported;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const syncEvent = (node, eventName, newEventHandler) => {
|
|
76
|
+
const eventStore = node.__events || (node.__events = {});
|
|
77
|
+
const oldEventHandler = eventStore[eventName];
|
|
78
|
+
if (oldEventHandler) {
|
|
79
|
+
node.removeEventListener(eventName, oldEventHandler);
|
|
80
|
+
}
|
|
81
|
+
node.addEventListener(
|
|
82
|
+
eventName,
|
|
83
|
+
eventStore[eventName] = function handler(e) {
|
|
84
|
+
if (newEventHandler) {
|
|
85
|
+
newEventHandler.call(this, e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
const arrayToMap = (arr) => {
|
|
91
|
+
const map = /* @__PURE__ */ new Map();
|
|
92
|
+
arr.forEach((s) => map.set(s, s));
|
|
93
|
+
return map;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
let tagNameTransformer;
|
|
97
|
+
const setTagNameTransformer = (_tagNameTransformer) => {
|
|
98
|
+
tagNameTransformer = _tagNameTransformer;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const setRef = (ref, value) => {
|
|
102
|
+
if (typeof ref === "function") {
|
|
103
|
+
ref(value);
|
|
104
|
+
} else if (ref != null) {
|
|
105
|
+
ref.current = value;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const mergeRefs = (...refs) => {
|
|
109
|
+
return (value) => {
|
|
110
|
+
refs.forEach((ref) => {
|
|
111
|
+
setRef(ref, value);
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
const createForwardRef = (ReactComponent, displayName) => {
|
|
116
|
+
const forwardRef = (props, ref) => {
|
|
117
|
+
return /* @__PURE__ */ React.createElement(ReactComponent, { ...props, forwardedRef: ref });
|
|
118
|
+
};
|
|
119
|
+
forwardRef.displayName = displayName;
|
|
120
|
+
return React.forwardRef(forwardRef);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) => {
|
|
124
|
+
if (defineCustomElement !== void 0) {
|
|
125
|
+
defineCustomElement();
|
|
126
|
+
}
|
|
127
|
+
const displayName = dashToPascalCase(tagName);
|
|
128
|
+
const ReactComponent = class extends React.Component {
|
|
129
|
+
constructor(props) {
|
|
130
|
+
super(props);
|
|
131
|
+
this.setComponentElRef = (element) => {
|
|
132
|
+
this.componentEl = element;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
componentDidMount() {
|
|
136
|
+
this.componentDidUpdate(this.props);
|
|
137
|
+
}
|
|
138
|
+
componentDidUpdate(prevProps) {
|
|
139
|
+
attachProps(this.componentEl, this.props, prevProps);
|
|
140
|
+
}
|
|
141
|
+
render() {
|
|
142
|
+
const { children, forwardedRef, style, className, ref, ...cProps } = this.props;
|
|
143
|
+
let propsToPass = Object.keys(cProps).reduce((acc, name) => {
|
|
144
|
+
const value = cProps[name];
|
|
145
|
+
if (name.indexOf("on") === 0 && name[2] === name[2].toUpperCase()) {
|
|
146
|
+
const eventName = name.substring(2).toLowerCase();
|
|
147
|
+
if (typeof document !== "undefined" && isCoveredByReact(eventName)) {
|
|
148
|
+
acc[name] = value;
|
|
149
|
+
}
|
|
150
|
+
} else {
|
|
151
|
+
const type = typeof value;
|
|
152
|
+
if (type === "string" || type === "boolean" || type === "number") {
|
|
153
|
+
acc[camelToDashCase(name)] = value;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return acc;
|
|
157
|
+
}, {});
|
|
158
|
+
if (manipulatePropsFunction) {
|
|
159
|
+
propsToPass = manipulatePropsFunction(this.props, propsToPass);
|
|
160
|
+
}
|
|
161
|
+
const newProps = {
|
|
162
|
+
...propsToPass,
|
|
163
|
+
ref: mergeRefs(forwardedRef, this.setComponentElRef),
|
|
164
|
+
style
|
|
165
|
+
};
|
|
166
|
+
const newTagName = typeof tagNameTransformer === "function" ? tagNameTransformer(tagName) : tagName;
|
|
167
|
+
return createElement(newTagName, newProps, children);
|
|
168
|
+
}
|
|
169
|
+
static get displayName() {
|
|
170
|
+
return displayName;
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
if (ReactComponentContext) {
|
|
174
|
+
ReactComponent.contextType = ReactComponentContext;
|
|
175
|
+
}
|
|
176
|
+
return createForwardRef(ReactComponent, displayName);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const KolAbbr = /* @__PURE__ */ createReactComponent("kol-abbr");
|
|
180
|
+
const KolAccordion = /* @__PURE__ */ createReactComponent("kol-accordion");
|
|
181
|
+
const KolAlert = /* @__PURE__ */ createReactComponent("kol-alert");
|
|
182
|
+
const KolAvatar = /* @__PURE__ */ createReactComponent("kol-avatar");
|
|
183
|
+
const KolBadge = /* @__PURE__ */ createReactComponent("kol-badge");
|
|
184
|
+
const KolBreadcrumb = /* @__PURE__ */ createReactComponent("kol-breadcrumb");
|
|
185
|
+
const KolButton = /* @__PURE__ */ createReactComponent("kol-button");
|
|
186
|
+
const KolButtonGroup = /* @__PURE__ */ createReactComponent("kol-button-group");
|
|
187
|
+
const KolButtonLink = /* @__PURE__ */ createReactComponent("kol-button-link");
|
|
188
|
+
const KolCard = /* @__PURE__ */ createReactComponent("kol-card");
|
|
189
|
+
const KolCombobox = /* @__PURE__ */ createReactComponent("kol-combobox");
|
|
190
|
+
const KolDetails = /* @__PURE__ */ createReactComponent("kol-details");
|
|
191
|
+
const KolDrawer = /* @__PURE__ */ createReactComponent("kol-drawer");
|
|
192
|
+
const KolForm = /* @__PURE__ */ createReactComponent("kol-form");
|
|
193
|
+
const KolHeading = /* @__PURE__ */ createReactComponent("kol-heading");
|
|
194
|
+
const KolIcon = /* @__PURE__ */ createReactComponent("kol-icon");
|
|
195
|
+
const KolImage = /* @__PURE__ */ createReactComponent("kol-image");
|
|
196
|
+
const KolIndentedText = /* @__PURE__ */ createReactComponent("kol-indented-text");
|
|
197
|
+
const KolInputCheckbox = /* @__PURE__ */ createReactComponent("kol-input-checkbox");
|
|
198
|
+
const KolInputColor = /* @__PURE__ */ createReactComponent("kol-input-color");
|
|
199
|
+
const KolInputDate = /* @__PURE__ */ createReactComponent("kol-input-date");
|
|
200
|
+
const KolInputEmail = /* @__PURE__ */ createReactComponent("kol-input-email");
|
|
201
|
+
const KolInputFile = /* @__PURE__ */ createReactComponent("kol-input-file");
|
|
202
|
+
const KolInputNumber = /* @__PURE__ */ createReactComponent("kol-input-number");
|
|
203
|
+
const KolInputPassword = /* @__PURE__ */ createReactComponent("kol-input-password");
|
|
204
|
+
const KolInputRadio = /* @__PURE__ */ createReactComponent("kol-input-radio");
|
|
205
|
+
const KolInputRange = /* @__PURE__ */ createReactComponent("kol-input-range");
|
|
206
|
+
const KolInputText = /* @__PURE__ */ createReactComponent("kol-input-text");
|
|
207
|
+
const KolKolibri = /* @__PURE__ */ createReactComponent("kol-kolibri");
|
|
208
|
+
const KolLink = /* @__PURE__ */ createReactComponent("kol-link");
|
|
209
|
+
const KolLinkButton = /* @__PURE__ */ createReactComponent("kol-link-button");
|
|
210
|
+
const KolLinkGroup = /* @__PURE__ */ createReactComponent("kol-link-group");
|
|
211
|
+
const KolLogo = /* @__PURE__ */ createReactComponent("kol-logo");
|
|
212
|
+
const KolModal = /* @__PURE__ */ createReactComponent("kol-modal");
|
|
213
|
+
const KolNav = /* @__PURE__ */ createReactComponent("kol-nav");
|
|
214
|
+
const KolPagination = /* @__PURE__ */ createReactComponent("kol-pagination");
|
|
215
|
+
const KolProgress = /* @__PURE__ */ createReactComponent("kol-progress");
|
|
216
|
+
const KolQuote = /* @__PURE__ */ createReactComponent("kol-quote");
|
|
217
|
+
const KolSelect = /* @__PURE__ */ createReactComponent("kol-select");
|
|
218
|
+
const KolSkipNav = /* @__PURE__ */ createReactComponent("kol-skip-nav");
|
|
219
|
+
const KolSpin = /* @__PURE__ */ createReactComponent("kol-spin");
|
|
220
|
+
const KolSplitButton = /* @__PURE__ */ createReactComponent("kol-split-button");
|
|
221
|
+
const KolSymbol = /* @__PURE__ */ createReactComponent("kol-symbol");
|
|
222
|
+
const KolTable = /* @__PURE__ */ createReactComponent("kol-table");
|
|
223
|
+
const KolTableStateful = /* @__PURE__ */ createReactComponent("kol-table-stateful");
|
|
224
|
+
const KolTableStateless = /* @__PURE__ */ createReactComponent("kol-table-stateless");
|
|
225
|
+
const KolTabs = /* @__PURE__ */ createReactComponent("kol-tabs");
|
|
226
|
+
const KolTextarea = /* @__PURE__ */ createReactComponent("kol-textarea");
|
|
227
|
+
const KolToastContainer = /* @__PURE__ */ createReactComponent("kol-toast-container");
|
|
228
|
+
const KolToolbar = /* @__PURE__ */ createReactComponent("kol-toolbar");
|
|
229
|
+
const KolTree = /* @__PURE__ */ createReactComponent("kol-tree");
|
|
230
|
+
const KolTreeItem = /* @__PURE__ */ createReactComponent("kol-tree-item");
|
|
231
|
+
const KolTreeItemWc = /* @__PURE__ */ createReactComponent("kol-tree-item-wc");
|
|
232
|
+
const KolTreeWc = /* @__PURE__ */ createReactComponent("kol-tree-wc");
|
|
233
|
+
const KolVersion = /* @__PURE__ */ createReactComponent("kol-version");
|
|
234
|
+
|
|
235
|
+
function createReactRenderElement(hostElement) {
|
|
236
|
+
const renderElement = document.createElement("div");
|
|
237
|
+
renderElement.setAttribute("role", "presentation");
|
|
238
|
+
hostElement.innerHTML = "";
|
|
239
|
+
hostElement.appendChild(renderElement);
|
|
240
|
+
return renderElement;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export { KolAbbr, KolAccordion, KolAlert, KolAvatar, KolBadge, KolBreadcrumb, KolButton, KolButtonGroup, KolButtonLink, KolCard, KolCombobox, KolDetails, KolDrawer, KolForm, KolHeading, KolIcon, KolImage, KolIndentedText, KolInputCheckbox, KolInputColor, KolInputDate, KolInputEmail, KolInputFile, KolInputNumber, KolInputPassword, KolInputRadio, KolInputRange, KolInputText, KolKolibri, KolLink, KolLinkButton, KolLinkGroup, KolLogo, KolModal, KolNav, KolPagination, KolProgress, KolQuote, KolSelect, KolSkipNav, KolSpin, KolSplitButton, KolSymbol, KolTable, KolTableStateful, KolTableStateless, KolTabs, KolTextarea, KolToastContainer, KolToolbar, KolTree, KolTreeItem, KolTreeItemWc, KolTreeWc, KolVersion, createReactRenderElement, setTagNameTransformer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/react-standalone",
|
|
3
|
-
"version": "2.1.5-rc.
|
|
3
|
+
"version": "2.1.5-rc.3",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -47,14 +47,12 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"cpy-cli": "5.0.0",
|
|
49
49
|
"rimraf": "5.0.7",
|
|
50
|
-
"
|
|
51
|
-
"webpack-cli": "5.1.4",
|
|
52
|
-
"@public-ui/react": "2.1.5-rc.0"
|
|
50
|
+
"@public-ui/react": "2.1.5-rc.3"
|
|
53
51
|
},
|
|
54
52
|
"peerDependencies": {
|
|
55
53
|
"react": ">=16.14.0",
|
|
56
54
|
"react-dom": ">=16.14.0",
|
|
57
|
-
"@public-ui/components": "2.1.5-rc.
|
|
55
|
+
"@public-ui/components": "2.1.5-rc.3"
|
|
58
56
|
},
|
|
59
57
|
"sideEffects": false,
|
|
60
58
|
"type": "module",
|
|
@@ -68,6 +66,6 @@
|
|
|
68
66
|
"dist"
|
|
69
67
|
],
|
|
70
68
|
"scripts": {
|
|
71
|
-
"build": "
|
|
69
|
+
"build": "pnpm prepare && node scripts/make-standalone.js"
|
|
72
70
|
}
|
|
73
71
|
}
|