@public-ui/react 3.0.1-rc.0 → 3.0.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/dist/index.cjs +4 -12
- package/dist/index.d.cts +69 -0
- package/dist/index.d.mts +69 -0
- package/dist/index.mjs +4 -12
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -127,16 +127,14 @@ const createForwardRef = (ReactComponent, displayName) => {
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) => {
|
|
130
|
-
if (defineCustomElement !== void 0) {
|
|
131
|
-
defineCustomElement();
|
|
132
|
-
}
|
|
133
130
|
const displayName = dashToPascalCase(tagName);
|
|
134
131
|
const ReactComponent = class extends React__default.Component {
|
|
132
|
+
componentEl;
|
|
133
|
+
setComponentElRef = (element) => {
|
|
134
|
+
this.componentEl = element;
|
|
135
|
+
};
|
|
135
136
|
constructor(props) {
|
|
136
137
|
super(props);
|
|
137
|
-
this.setComponentElRef = (element) => {
|
|
138
|
-
this.componentEl = element;
|
|
139
|
-
};
|
|
140
138
|
}
|
|
141
139
|
componentDidMount() {
|
|
142
140
|
this.componentDidUpdate(this.props);
|
|
@@ -161,9 +159,6 @@ const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFun
|
|
|
161
159
|
}
|
|
162
160
|
return acc;
|
|
163
161
|
}, {});
|
|
164
|
-
if (manipulatePropsFunction) {
|
|
165
|
-
propsToPass = manipulatePropsFunction(this.props, propsToPass);
|
|
166
|
-
}
|
|
167
162
|
const newProps = {
|
|
168
163
|
...propsToPass,
|
|
169
164
|
ref: mergeRefs(forwardedRef, this.setComponentElRef),
|
|
@@ -176,9 +171,6 @@ const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFun
|
|
|
176
171
|
return displayName;
|
|
177
172
|
}
|
|
178
173
|
};
|
|
179
|
-
if (ReactComponentContext) {
|
|
180
|
-
ReactComponent.contextType = ReactComponentContext;
|
|
181
|
-
}
|
|
182
174
|
return createForwardRef(ReactComponent, displayName);
|
|
183
175
|
};
|
|
184
176
|
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { JSX } from '@public-ui/components';
|
|
3
|
+
|
|
4
|
+
interface StyleReactProps {
|
|
5
|
+
class?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type TagNameTransformer = (tagName: string) => string;
|
|
13
|
+
declare const setTagNameTransformer: (_tagNameTransformer: TagNameTransformer) => void;
|
|
14
|
+
|
|
15
|
+
declare const KolAbbr: react.ForwardRefExoticComponent<JSX.KolAbbr & Omit<react.HTMLAttributes<HTMLKolAbbrElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAbbrElement>>;
|
|
16
|
+
declare const KolAccordion: react.ForwardRefExoticComponent<JSX.KolAccordion & Omit<react.HTMLAttributes<HTMLKolAccordionElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAccordionElement>>;
|
|
17
|
+
declare const KolAlert: react.ForwardRefExoticComponent<JSX.KolAlert & Omit<react.HTMLAttributes<HTMLKolAlertElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAlertElement>>;
|
|
18
|
+
declare const KolAvatar: react.ForwardRefExoticComponent<JSX.KolAvatar & Omit<react.HTMLAttributes<HTMLKolAvatarElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAvatarElement>>;
|
|
19
|
+
declare const KolBadge: react.ForwardRefExoticComponent<JSX.KolBadge & Omit<react.HTMLAttributes<HTMLKolBadgeElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolBadgeElement>>;
|
|
20
|
+
declare const KolBreadcrumb: react.ForwardRefExoticComponent<JSX.KolBreadcrumb & Omit<react.HTMLAttributes<HTMLKolBreadcrumbElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolBreadcrumbElement>>;
|
|
21
|
+
declare const KolButton: react.ForwardRefExoticComponent<JSX.KolButton & Omit<react.HTMLAttributes<HTMLKolButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolButtonElement>>;
|
|
22
|
+
declare const KolButtonLink: react.ForwardRefExoticComponent<JSX.KolButtonLink & Omit<react.HTMLAttributes<HTMLKolButtonLinkElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolButtonLinkElement>>;
|
|
23
|
+
declare const KolCard: react.ForwardRefExoticComponent<JSX.KolCard & Omit<react.HTMLAttributes<HTMLKolCardElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolCardElement>>;
|
|
24
|
+
declare const KolCombobox: react.ForwardRefExoticComponent<JSX.KolCombobox & Omit<react.HTMLAttributes<HTMLKolComboboxElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolComboboxElement>>;
|
|
25
|
+
declare const KolDetails: react.ForwardRefExoticComponent<JSX.KolDetails & Omit<react.HTMLAttributes<HTMLKolDetailsElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolDetailsElement>>;
|
|
26
|
+
declare const KolDrawer: react.ForwardRefExoticComponent<JSX.KolDrawer & Omit<react.HTMLAttributes<HTMLKolDrawerElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolDrawerElement>>;
|
|
27
|
+
declare const KolForm: react.ForwardRefExoticComponent<JSX.KolForm & Omit<react.HTMLAttributes<HTMLKolFormElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolFormElement>>;
|
|
28
|
+
declare const KolHeading: react.ForwardRefExoticComponent<JSX.KolHeading & Omit<react.HTMLAttributes<HTMLKolHeadingElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolHeadingElement>>;
|
|
29
|
+
declare const KolIcon: react.ForwardRefExoticComponent<JSX.KolIcon & Omit<react.HTMLAttributes<HTMLKolIconElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolIconElement>>;
|
|
30
|
+
declare const KolImage: react.ForwardRefExoticComponent<JSX.KolImage & Omit<react.HTMLAttributes<HTMLKolImageElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolImageElement>>;
|
|
31
|
+
declare const KolInputCheckbox: react.ForwardRefExoticComponent<JSX.KolInputCheckbox & Omit<react.HTMLAttributes<HTMLKolInputCheckboxElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputCheckboxElement>>;
|
|
32
|
+
declare const KolInputColor: react.ForwardRefExoticComponent<JSX.KolInputColor & Omit<react.HTMLAttributes<HTMLKolInputColorElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputColorElement>>;
|
|
33
|
+
declare const KolInputDate: react.ForwardRefExoticComponent<JSX.KolInputDate & Omit<react.HTMLAttributes<HTMLKolInputDateElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputDateElement>>;
|
|
34
|
+
declare const KolInputEmail: react.ForwardRefExoticComponent<JSX.KolInputEmail & Omit<react.HTMLAttributes<HTMLKolInputEmailElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputEmailElement>>;
|
|
35
|
+
declare const KolInputFile: react.ForwardRefExoticComponent<JSX.KolInputFile & Omit<react.HTMLAttributes<HTMLKolInputFileElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputFileElement>>;
|
|
36
|
+
declare const KolInputNumber: react.ForwardRefExoticComponent<JSX.KolInputNumber & Omit<react.HTMLAttributes<HTMLKolInputNumberElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputNumberElement>>;
|
|
37
|
+
declare const KolInputPassword: react.ForwardRefExoticComponent<JSX.KolInputPassword & Omit<react.HTMLAttributes<HTMLKolInputPasswordElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputPasswordElement>>;
|
|
38
|
+
declare const KolInputRadio: react.ForwardRefExoticComponent<JSX.KolInputRadio & Omit<react.HTMLAttributes<HTMLKolInputRadioElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputRadioElement>>;
|
|
39
|
+
declare const KolInputRange: react.ForwardRefExoticComponent<JSX.KolInputRange & Omit<react.HTMLAttributes<HTMLKolInputRangeElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputRangeElement>>;
|
|
40
|
+
declare const KolInputText: react.ForwardRefExoticComponent<JSX.KolInputText & Omit<react.HTMLAttributes<HTMLKolInputTextElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputTextElement>>;
|
|
41
|
+
declare const KolKolibri: react.ForwardRefExoticComponent<JSX.KolKolibri & Omit<react.HTMLAttributes<HTMLKolKolibriElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolKolibriElement>>;
|
|
42
|
+
declare const KolLink: react.ForwardRefExoticComponent<JSX.KolLink & Omit<react.HTMLAttributes<HTMLKolLinkElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolLinkElement>>;
|
|
43
|
+
declare const KolLinkButton: react.ForwardRefExoticComponent<JSX.KolLinkButton & Omit<react.HTMLAttributes<HTMLKolLinkButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolLinkButtonElement>>;
|
|
44
|
+
declare const KolModal: react.ForwardRefExoticComponent<JSX.KolModal & Omit<react.HTMLAttributes<HTMLKolModalElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolModalElement>>;
|
|
45
|
+
declare const KolNav: react.ForwardRefExoticComponent<JSX.KolNav & Omit<react.HTMLAttributes<HTMLKolNavElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolNavElement>>;
|
|
46
|
+
declare const KolPagination: react.ForwardRefExoticComponent<JSX.KolPagination & Omit<react.HTMLAttributes<HTMLKolPaginationElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolPaginationElement>>;
|
|
47
|
+
declare const KolPopoverButton: react.ForwardRefExoticComponent<JSX.KolPopoverButton & Omit<react.HTMLAttributes<HTMLKolPopoverButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolPopoverButtonElement>>;
|
|
48
|
+
declare const KolPopoverButtonWc: react.ForwardRefExoticComponent<JSX.KolPopoverButtonWc & Omit<react.HTMLAttributes<HTMLKolPopoverButtonWcElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolPopoverButtonWcElement>>;
|
|
49
|
+
declare const KolProgress: react.ForwardRefExoticComponent<JSX.KolProgress & Omit<react.HTMLAttributes<HTMLKolProgressElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolProgressElement>>;
|
|
50
|
+
declare const KolQuote: react.ForwardRefExoticComponent<JSX.KolQuote & Omit<react.HTMLAttributes<HTMLKolQuoteElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolQuoteElement>>;
|
|
51
|
+
declare const KolSelect: react.ForwardRefExoticComponent<JSX.KolSelect & Omit<react.HTMLAttributes<HTMLKolSelectElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSelectElement>>;
|
|
52
|
+
declare const KolSingleSelect: react.ForwardRefExoticComponent<JSX.KolSingleSelect & Omit<react.HTMLAttributes<HTMLKolSingleSelectElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSingleSelectElement>>;
|
|
53
|
+
declare const KolSkipNav: react.ForwardRefExoticComponent<JSX.KolSkipNav & Omit<react.HTMLAttributes<HTMLKolSkipNavElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSkipNavElement>>;
|
|
54
|
+
declare const KolSpin: react.ForwardRefExoticComponent<JSX.KolSpin & Omit<react.HTMLAttributes<HTMLKolSpinElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSpinElement>>;
|
|
55
|
+
declare const KolSplitButton: react.ForwardRefExoticComponent<JSX.KolSplitButton & Omit<react.HTMLAttributes<HTMLKolSplitButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSplitButtonElement>>;
|
|
56
|
+
declare const KolTableStateful: react.ForwardRefExoticComponent<JSX.KolTableStateful & Omit<react.HTMLAttributes<HTMLKolTableStatefulElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTableStatefulElement>>;
|
|
57
|
+
declare const KolTableStateless: react.ForwardRefExoticComponent<JSX.KolTableStateless & Omit<react.HTMLAttributes<HTMLKolTableStatelessElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTableStatelessElement>>;
|
|
58
|
+
declare const KolTabs: react.ForwardRefExoticComponent<JSX.KolTabs & Omit<react.HTMLAttributes<HTMLKolTabsElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTabsElement>>;
|
|
59
|
+
declare const KolTextarea: react.ForwardRefExoticComponent<JSX.KolTextarea & Omit<react.HTMLAttributes<HTMLKolTextareaElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTextareaElement>>;
|
|
60
|
+
declare const KolToastContainer: react.ForwardRefExoticComponent<JSX.KolToastContainer & Omit<react.HTMLAttributes<HTMLKolToastContainerElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolToastContainerElement>>;
|
|
61
|
+
declare const KolToolbar: react.ForwardRefExoticComponent<JSX.KolToolbar & Omit<react.HTMLAttributes<HTMLKolToolbarElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolToolbarElement>>;
|
|
62
|
+
declare const KolTree: react.ForwardRefExoticComponent<JSX.KolTree & Omit<react.HTMLAttributes<HTMLKolTreeElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTreeElement>>;
|
|
63
|
+
declare const KolTreeItem: react.ForwardRefExoticComponent<JSX.KolTreeItem & Omit<react.HTMLAttributes<HTMLKolTreeItemElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTreeItemElement>>;
|
|
64
|
+
declare const KolTreeItemWc: react.ForwardRefExoticComponent<JSX.KolTreeItemWc & Omit<react.HTMLAttributes<HTMLKolTreeItemWcElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTreeItemWcElement>>;
|
|
65
|
+
declare const KolVersion: react.ForwardRefExoticComponent<JSX.KolVersion & Omit<react.HTMLAttributes<HTMLKolVersionElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolVersionElement>>;
|
|
66
|
+
|
|
67
|
+
declare function createReactRenderElement(hostElement: HTMLElement): HTMLDivElement;
|
|
68
|
+
|
|
69
|
+
export { KolAbbr, KolAccordion, KolAlert, KolAvatar, KolBadge, KolBreadcrumb, KolButton, KolButtonLink, KolCard, KolCombobox, KolDetails, KolDrawer, KolForm, KolHeading, KolIcon, KolImage, KolInputCheckbox, KolInputColor, KolInputDate, KolInputEmail, KolInputFile, KolInputNumber, KolInputPassword, KolInputRadio, KolInputRange, KolInputText, KolKolibri, KolLink, KolLinkButton, KolModal, KolNav, KolPagination, KolPopoverButton, KolPopoverButtonWc, KolProgress, KolQuote, KolSelect, KolSingleSelect, KolSkipNav, KolSpin, KolSplitButton, KolTableStateful, KolTableStateless, KolTabs, KolTextarea, KolToastContainer, KolToolbar, KolTree, KolTreeItem, KolTreeItemWc, KolVersion, createReactRenderElement, setTagNameTransformer };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { JSX } from '@public-ui/components';
|
|
3
|
+
|
|
4
|
+
interface StyleReactProps {
|
|
5
|
+
class?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type TagNameTransformer = (tagName: string) => string;
|
|
13
|
+
declare const setTagNameTransformer: (_tagNameTransformer: TagNameTransformer) => void;
|
|
14
|
+
|
|
15
|
+
declare const KolAbbr: react.ForwardRefExoticComponent<JSX.KolAbbr & Omit<react.HTMLAttributes<HTMLKolAbbrElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAbbrElement>>;
|
|
16
|
+
declare const KolAccordion: react.ForwardRefExoticComponent<JSX.KolAccordion & Omit<react.HTMLAttributes<HTMLKolAccordionElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAccordionElement>>;
|
|
17
|
+
declare const KolAlert: react.ForwardRefExoticComponent<JSX.KolAlert & Omit<react.HTMLAttributes<HTMLKolAlertElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAlertElement>>;
|
|
18
|
+
declare const KolAvatar: react.ForwardRefExoticComponent<JSX.KolAvatar & Omit<react.HTMLAttributes<HTMLKolAvatarElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolAvatarElement>>;
|
|
19
|
+
declare const KolBadge: react.ForwardRefExoticComponent<JSX.KolBadge & Omit<react.HTMLAttributes<HTMLKolBadgeElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolBadgeElement>>;
|
|
20
|
+
declare const KolBreadcrumb: react.ForwardRefExoticComponent<JSX.KolBreadcrumb & Omit<react.HTMLAttributes<HTMLKolBreadcrumbElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolBreadcrumbElement>>;
|
|
21
|
+
declare const KolButton: react.ForwardRefExoticComponent<JSX.KolButton & Omit<react.HTMLAttributes<HTMLKolButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolButtonElement>>;
|
|
22
|
+
declare const KolButtonLink: react.ForwardRefExoticComponent<JSX.KolButtonLink & Omit<react.HTMLAttributes<HTMLKolButtonLinkElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolButtonLinkElement>>;
|
|
23
|
+
declare const KolCard: react.ForwardRefExoticComponent<JSX.KolCard & Omit<react.HTMLAttributes<HTMLKolCardElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolCardElement>>;
|
|
24
|
+
declare const KolCombobox: react.ForwardRefExoticComponent<JSX.KolCombobox & Omit<react.HTMLAttributes<HTMLKolComboboxElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolComboboxElement>>;
|
|
25
|
+
declare const KolDetails: react.ForwardRefExoticComponent<JSX.KolDetails & Omit<react.HTMLAttributes<HTMLKolDetailsElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolDetailsElement>>;
|
|
26
|
+
declare const KolDrawer: react.ForwardRefExoticComponent<JSX.KolDrawer & Omit<react.HTMLAttributes<HTMLKolDrawerElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolDrawerElement>>;
|
|
27
|
+
declare const KolForm: react.ForwardRefExoticComponent<JSX.KolForm & Omit<react.HTMLAttributes<HTMLKolFormElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolFormElement>>;
|
|
28
|
+
declare const KolHeading: react.ForwardRefExoticComponent<JSX.KolHeading & Omit<react.HTMLAttributes<HTMLKolHeadingElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolHeadingElement>>;
|
|
29
|
+
declare const KolIcon: react.ForwardRefExoticComponent<JSX.KolIcon & Omit<react.HTMLAttributes<HTMLKolIconElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolIconElement>>;
|
|
30
|
+
declare const KolImage: react.ForwardRefExoticComponent<JSX.KolImage & Omit<react.HTMLAttributes<HTMLKolImageElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolImageElement>>;
|
|
31
|
+
declare const KolInputCheckbox: react.ForwardRefExoticComponent<JSX.KolInputCheckbox & Omit<react.HTMLAttributes<HTMLKolInputCheckboxElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputCheckboxElement>>;
|
|
32
|
+
declare const KolInputColor: react.ForwardRefExoticComponent<JSX.KolInputColor & Omit<react.HTMLAttributes<HTMLKolInputColorElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputColorElement>>;
|
|
33
|
+
declare const KolInputDate: react.ForwardRefExoticComponent<JSX.KolInputDate & Omit<react.HTMLAttributes<HTMLKolInputDateElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputDateElement>>;
|
|
34
|
+
declare const KolInputEmail: react.ForwardRefExoticComponent<JSX.KolInputEmail & Omit<react.HTMLAttributes<HTMLKolInputEmailElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputEmailElement>>;
|
|
35
|
+
declare const KolInputFile: react.ForwardRefExoticComponent<JSX.KolInputFile & Omit<react.HTMLAttributes<HTMLKolInputFileElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputFileElement>>;
|
|
36
|
+
declare const KolInputNumber: react.ForwardRefExoticComponent<JSX.KolInputNumber & Omit<react.HTMLAttributes<HTMLKolInputNumberElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputNumberElement>>;
|
|
37
|
+
declare const KolInputPassword: react.ForwardRefExoticComponent<JSX.KolInputPassword & Omit<react.HTMLAttributes<HTMLKolInputPasswordElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputPasswordElement>>;
|
|
38
|
+
declare const KolInputRadio: react.ForwardRefExoticComponent<JSX.KolInputRadio & Omit<react.HTMLAttributes<HTMLKolInputRadioElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputRadioElement>>;
|
|
39
|
+
declare const KolInputRange: react.ForwardRefExoticComponent<JSX.KolInputRange & Omit<react.HTMLAttributes<HTMLKolInputRangeElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputRangeElement>>;
|
|
40
|
+
declare const KolInputText: react.ForwardRefExoticComponent<JSX.KolInputText & Omit<react.HTMLAttributes<HTMLKolInputTextElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolInputTextElement>>;
|
|
41
|
+
declare const KolKolibri: react.ForwardRefExoticComponent<JSX.KolKolibri & Omit<react.HTMLAttributes<HTMLKolKolibriElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolKolibriElement>>;
|
|
42
|
+
declare const KolLink: react.ForwardRefExoticComponent<JSX.KolLink & Omit<react.HTMLAttributes<HTMLKolLinkElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolLinkElement>>;
|
|
43
|
+
declare const KolLinkButton: react.ForwardRefExoticComponent<JSX.KolLinkButton & Omit<react.HTMLAttributes<HTMLKolLinkButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolLinkButtonElement>>;
|
|
44
|
+
declare const KolModal: react.ForwardRefExoticComponent<JSX.KolModal & Omit<react.HTMLAttributes<HTMLKolModalElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolModalElement>>;
|
|
45
|
+
declare const KolNav: react.ForwardRefExoticComponent<JSX.KolNav & Omit<react.HTMLAttributes<HTMLKolNavElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolNavElement>>;
|
|
46
|
+
declare const KolPagination: react.ForwardRefExoticComponent<JSX.KolPagination & Omit<react.HTMLAttributes<HTMLKolPaginationElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolPaginationElement>>;
|
|
47
|
+
declare const KolPopoverButton: react.ForwardRefExoticComponent<JSX.KolPopoverButton & Omit<react.HTMLAttributes<HTMLKolPopoverButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolPopoverButtonElement>>;
|
|
48
|
+
declare const KolPopoverButtonWc: react.ForwardRefExoticComponent<JSX.KolPopoverButtonWc & Omit<react.HTMLAttributes<HTMLKolPopoverButtonWcElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolPopoverButtonWcElement>>;
|
|
49
|
+
declare const KolProgress: react.ForwardRefExoticComponent<JSX.KolProgress & Omit<react.HTMLAttributes<HTMLKolProgressElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolProgressElement>>;
|
|
50
|
+
declare const KolQuote: react.ForwardRefExoticComponent<JSX.KolQuote & Omit<react.HTMLAttributes<HTMLKolQuoteElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolQuoteElement>>;
|
|
51
|
+
declare const KolSelect: react.ForwardRefExoticComponent<JSX.KolSelect & Omit<react.HTMLAttributes<HTMLKolSelectElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSelectElement>>;
|
|
52
|
+
declare const KolSingleSelect: react.ForwardRefExoticComponent<JSX.KolSingleSelect & Omit<react.HTMLAttributes<HTMLKolSingleSelectElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSingleSelectElement>>;
|
|
53
|
+
declare const KolSkipNav: react.ForwardRefExoticComponent<JSX.KolSkipNav & Omit<react.HTMLAttributes<HTMLKolSkipNavElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSkipNavElement>>;
|
|
54
|
+
declare const KolSpin: react.ForwardRefExoticComponent<JSX.KolSpin & Omit<react.HTMLAttributes<HTMLKolSpinElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSpinElement>>;
|
|
55
|
+
declare const KolSplitButton: react.ForwardRefExoticComponent<JSX.KolSplitButton & Omit<react.HTMLAttributes<HTMLKolSplitButtonElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolSplitButtonElement>>;
|
|
56
|
+
declare const KolTableStateful: react.ForwardRefExoticComponent<JSX.KolTableStateful & Omit<react.HTMLAttributes<HTMLKolTableStatefulElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTableStatefulElement>>;
|
|
57
|
+
declare const KolTableStateless: react.ForwardRefExoticComponent<JSX.KolTableStateless & Omit<react.HTMLAttributes<HTMLKolTableStatelessElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTableStatelessElement>>;
|
|
58
|
+
declare const KolTabs: react.ForwardRefExoticComponent<JSX.KolTabs & Omit<react.HTMLAttributes<HTMLKolTabsElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTabsElement>>;
|
|
59
|
+
declare const KolTextarea: react.ForwardRefExoticComponent<JSX.KolTextarea & Omit<react.HTMLAttributes<HTMLKolTextareaElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTextareaElement>>;
|
|
60
|
+
declare const KolToastContainer: react.ForwardRefExoticComponent<JSX.KolToastContainer & Omit<react.HTMLAttributes<HTMLKolToastContainerElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolToastContainerElement>>;
|
|
61
|
+
declare const KolToolbar: react.ForwardRefExoticComponent<JSX.KolToolbar & Omit<react.HTMLAttributes<HTMLKolToolbarElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolToolbarElement>>;
|
|
62
|
+
declare const KolTree: react.ForwardRefExoticComponent<JSX.KolTree & Omit<react.HTMLAttributes<HTMLKolTreeElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTreeElement>>;
|
|
63
|
+
declare const KolTreeItem: react.ForwardRefExoticComponent<JSX.KolTreeItem & Omit<react.HTMLAttributes<HTMLKolTreeItemElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTreeItemElement>>;
|
|
64
|
+
declare const KolTreeItemWc: react.ForwardRefExoticComponent<JSX.KolTreeItemWc & Omit<react.HTMLAttributes<HTMLKolTreeItemWcElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolTreeItemWcElement>>;
|
|
65
|
+
declare const KolVersion: react.ForwardRefExoticComponent<JSX.KolVersion & Omit<react.HTMLAttributes<HTMLKolVersionElement>, "style"> & StyleReactProps & react.RefAttributes<HTMLKolVersionElement>>;
|
|
66
|
+
|
|
67
|
+
declare function createReactRenderElement(hostElement: HTMLElement): HTMLDivElement;
|
|
68
|
+
|
|
69
|
+
export { KolAbbr, KolAccordion, KolAlert, KolAvatar, KolBadge, KolBreadcrumb, KolButton, KolButtonLink, KolCard, KolCombobox, KolDetails, KolDrawer, KolForm, KolHeading, KolIcon, KolImage, KolInputCheckbox, KolInputColor, KolInputDate, KolInputEmail, KolInputFile, KolInputNumber, KolInputPassword, KolInputRadio, KolInputRange, KolInputText, KolKolibri, KolLink, KolLinkButton, KolModal, KolNav, KolPagination, KolPopoverButton, KolPopoverButtonWc, KolProgress, KolQuote, KolSelect, KolSingleSelect, KolSkipNav, KolSpin, KolSplitButton, KolTableStateful, KolTableStateless, KolTabs, KolTextarea, KolToastContainer, KolToolbar, KolTree, KolTreeItem, KolTreeItemWc, KolVersion, createReactRenderElement, setTagNameTransformer };
|
package/dist/index.mjs
CHANGED
|
@@ -121,16 +121,14 @@ const createForwardRef = (ReactComponent, displayName) => {
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) => {
|
|
124
|
-
if (defineCustomElement !== void 0) {
|
|
125
|
-
defineCustomElement();
|
|
126
|
-
}
|
|
127
124
|
const displayName = dashToPascalCase(tagName);
|
|
128
125
|
const ReactComponent = class extends React.Component {
|
|
126
|
+
componentEl;
|
|
127
|
+
setComponentElRef = (element) => {
|
|
128
|
+
this.componentEl = element;
|
|
129
|
+
};
|
|
129
130
|
constructor(props) {
|
|
130
131
|
super(props);
|
|
131
|
-
this.setComponentElRef = (element) => {
|
|
132
|
-
this.componentEl = element;
|
|
133
|
-
};
|
|
134
132
|
}
|
|
135
133
|
componentDidMount() {
|
|
136
134
|
this.componentDidUpdate(this.props);
|
|
@@ -155,9 +153,6 @@ const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFun
|
|
|
155
153
|
}
|
|
156
154
|
return acc;
|
|
157
155
|
}, {});
|
|
158
|
-
if (manipulatePropsFunction) {
|
|
159
|
-
propsToPass = manipulatePropsFunction(this.props, propsToPass);
|
|
160
|
-
}
|
|
161
156
|
const newProps = {
|
|
162
157
|
...propsToPass,
|
|
163
158
|
ref: mergeRefs(forwardedRef, this.setComponentElRef),
|
|
@@ -170,9 +165,6 @@ const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFun
|
|
|
170
165
|
return displayName;
|
|
171
166
|
}
|
|
172
167
|
};
|
|
173
|
-
if (ReactComponentContext) {
|
|
174
|
-
ReactComponent.contextType = ReactComponentContext;
|
|
175
|
-
}
|
|
176
168
|
return createForwardRef(ReactComponent, displayName);
|
|
177
169
|
};
|
|
178
170
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/react",
|
|
3
|
-
"version": "3.0.1
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
"@types/minimist": "1.2.5",
|
|
50
50
|
"@types/normalize-package-data": "2.4.4",
|
|
51
51
|
"@types/react": "18.3.4",
|
|
52
|
-
"@types/react-dom": "18.3.
|
|
53
|
-
"react": "18.
|
|
54
|
-
"react-dom": "18.
|
|
55
|
-
"typescript": "5.8.
|
|
56
|
-
"unbuild": "
|
|
57
|
-
"@public-ui/components": "3.0.1
|
|
52
|
+
"@types/react-dom": "18.3.7",
|
|
53
|
+
"react": "18.3.1",
|
|
54
|
+
"react-dom": "18.3.1",
|
|
55
|
+
"typescript": "5.8.3",
|
|
56
|
+
"unbuild": "3.5.0",
|
|
57
|
+
"@public-ui/components": "3.0.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": ">=16.14.0",
|
|
61
61
|
"react-dom": ">=16.14.0",
|
|
62
|
-
"@public-ui/components": "3.0.1
|
|
62
|
+
"@public-ui/components": "3.0.1"
|
|
63
63
|
},
|
|
64
64
|
"sideEffects": false,
|
|
65
65
|
"type": "module",
|