@swisspost/design-system-components-react 10.0.0-next.40 → 10.0.0-next.41
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.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/index.server.js +2 -0
- package/dist/index.server.js.map +1 -0
- package/dist/stencil-generated/components.js +301 -0
- package/dist/stencil-generated/components.js.map +1 -0
- package/dist/stencil-generated/server/components.js +3 -0
- package/dist/stencil-generated/server/components.js.map +1 -0
- package/dist/stencil-generated/server/components.server.js +594 -0
- package/dist/stencil-generated/server/components.server.js.map +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.server.d.ts +1 -0
- package/dist/types/stencil-generated/components.d.ts +144 -0
- package/dist/types/stencil-generated/server/components.d.ts +1 -0
- package/dist/types/stencil-generated/server/components.server.d.ts +144 -0
- package/package.json +27 -14
- package/dist/components/index.js +0 -2
- package/dist/components/index.js.map +0 -1
- package/dist/components/stencil-generated/index.js +0 -40
- package/dist/components/stencil-generated/index.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/createComponent.js +0 -69
- package/dist/components/stencil-generated/react-component-lib/createComponent.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/createOverlayComponent.js +0 -97
- package/dist/components/stencil-generated/react-component-lib/createOverlayComponent.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/index.js +0 -3
- package/dist/components/stencil-generated/react-component-lib/index.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/interfaces.js +0 -2
- package/dist/components/stencil-generated/react-component-lib/interfaces.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/utils/attachProps.js +0 -92
- package/dist/components/stencil-generated/react-component-lib/utils/attachProps.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/utils/case.js +0 -7
- package/dist/components/stencil-generated/react-component-lib/utils/case.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/utils/dev.js +0 -13
- package/dist/components/stencil-generated/react-component-lib/utils/dev.js.map +0 -1
- package/dist/components/stencil-generated/react-component-lib/utils/index.js +0 -31
- package/dist/components/stencil-generated/react-component-lib/utils/index.js.map +0 -1
- package/dist/types/components/index.d.ts +0 -1
- package/dist/types/components/stencil-generated/index.d.ts +0 -37
- package/dist/types/components/stencil-generated/react-component-lib/createComponent.d.ts +0 -10
- package/dist/types/components/stencil-generated/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/dist/types/components/stencil-generated/react-component-lib/index.d.ts +0 -2
- package/dist/types/components/stencil-generated/react-component-lib/interfaces.d.ts +0 -29
- package/dist/types/components/stencil-generated/react-component-lib/utils/attachProps.d.ts +0 -9
- package/dist/types/components/stencil-generated/react-component-lib/utils/case.d.ts +0 -2
- package/dist/types/components/stencil-generated/react-component-lib/utils/dev.d.ts +0 -2
- package/dist/types/components/stencil-generated/react-component-lib/utils/index.d.ts +0 -10
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { camelToDashCase } from './case';
|
|
2
|
-
export const attachProps = (node, newProps, oldProps = {}) => {
|
|
3
|
-
if (node instanceof Element) {
|
|
4
|
-
const className = getClassName(node.classList, newProps, oldProps);
|
|
5
|
-
if (className !== '') {
|
|
6
|
-
node.className = className;
|
|
7
|
-
}
|
|
8
|
-
Object.keys(newProps).forEach((name) => {
|
|
9
|
-
if (name === 'children' ||
|
|
10
|
-
name === 'style' ||
|
|
11
|
-
name === 'ref' ||
|
|
12
|
-
name === 'class' ||
|
|
13
|
-
name === 'className' ||
|
|
14
|
-
name === 'forwardedRef') {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
18
|
-
const eventName = name.substring(2);
|
|
19
|
-
const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
|
20
|
-
if (!isCoveredByReact(eventNameLc)) {
|
|
21
|
-
syncEvent(node, eventNameLc, newProps[name]);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
node[name] = newProps[name];
|
|
26
|
-
const propType = typeof newProps[name];
|
|
27
|
-
if (propType === 'string') {
|
|
28
|
-
node.setAttribute(camelToDashCase(name), newProps[name]);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
export const getClassName = (classList, newProps, oldProps) => {
|
|
35
|
-
const newClassProp = newProps.className || newProps.class;
|
|
36
|
-
const oldClassProp = oldProps.className || oldProps.class;
|
|
37
|
-
const currentClasses = arrayToMap(classList);
|
|
38
|
-
const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
|
|
39
|
-
const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
|
|
40
|
-
const finalClassNames = [];
|
|
41
|
-
currentClasses.forEach((currentClass) => {
|
|
42
|
-
if (incomingPropClasses.has(currentClass)) {
|
|
43
|
-
finalClassNames.push(currentClass);
|
|
44
|
-
incomingPropClasses.delete(currentClass);
|
|
45
|
-
}
|
|
46
|
-
else if (!oldPropClasses.has(currentClass)) {
|
|
47
|
-
finalClassNames.push(currentClass);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
incomingPropClasses.forEach((s) => finalClassNames.push(s));
|
|
51
|
-
return finalClassNames.join(' ');
|
|
52
|
-
};
|
|
53
|
-
export const transformReactEventName = (eventNameSuffix) => {
|
|
54
|
-
switch (eventNameSuffix) {
|
|
55
|
-
case 'doubleclick':
|
|
56
|
-
return 'dblclick';
|
|
57
|
-
}
|
|
58
|
-
return eventNameSuffix;
|
|
59
|
-
};
|
|
60
|
-
export const isCoveredByReact = (eventNameSuffix) => {
|
|
61
|
-
if (typeof document === 'undefined') {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
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
|
-
export 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(eventName, (eventStore[eventName] = function handler(e) {
|
|
82
|
-
if (newEventHandler) {
|
|
83
|
-
newEventHandler.call(this, e);
|
|
84
|
-
}
|
|
85
|
-
}));
|
|
86
|
-
};
|
|
87
|
-
const arrayToMap = (arr) => {
|
|
88
|
-
const map = new Map();
|
|
89
|
-
arr.forEach((s) => map.set(s, s));
|
|
90
|
-
return map;
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=attachProps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attachProps.js","sourceRoot":"","sources":["../../../../../src/components/stencil-generated/react-component-lib/utils/attachProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAE,QAAa,EAAE,WAAgB,EAAE,EAAE,EAAE;IAElF,IAAI,IAAI,YAAY,OAAO,EAAE,CAAC;QAE5B,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACnE,IAAI,SAAS,KAAK,EAAE,EAAE,CAAC;YACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE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,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const dashToPascalCase = (str) => str
|
|
2
|
-
.toLowerCase()
|
|
3
|
-
.split('-')
|
|
4
|
-
.map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
|
|
5
|
-
.join('');
|
|
6
|
-
export const camelToDashCase = (str) => str.replace(/([A-Z])/g, (m) => `-${m[0].toLowerCase()}`);
|
|
7
|
-
//# sourceMappingURL=case.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"case.js","sourceRoot":"","sources":["../../../../../src/components/stencil-generated/react-component-lib/utils/case.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE,CAC9C,GAAG;KACA,WAAW,EAAE;KACb,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACpE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const isDevMode = () => {
|
|
2
|
-
return process && process.env && process.env.NODE_ENV === 'development';
|
|
3
|
-
};
|
|
4
|
-
const warnings = {};
|
|
5
|
-
export const deprecationWarning = (key, message) => {
|
|
6
|
-
if (isDevMode()) {
|
|
7
|
-
if (!warnings[key]) {
|
|
8
|
-
console.warn(message);
|
|
9
|
-
warnings[key] = true;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=dev.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["../../../../../src/components/stencil-generated/react-component-lib/utils/dev.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,OAAO,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,QAAQ,GAA+B,EAAE,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAE,OAAe,EAAE,EAAE;IACjE,IAAI,SAAS,EAAE,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtB,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACvB,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export const setRef = (ref, value) => {
|
|
3
|
-
if (typeof ref === 'function') {
|
|
4
|
-
ref(value);
|
|
5
|
-
}
|
|
6
|
-
else if (ref != null) {
|
|
7
|
-
ref.current = value;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
export const mergeRefs = (...refs) => {
|
|
11
|
-
return (value) => {
|
|
12
|
-
refs.forEach((ref) => {
|
|
13
|
-
setRef(ref, value);
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export const createForwardRef = (ReactComponent, displayName) => {
|
|
18
|
-
const forwardRef = (props, ref) => {
|
|
19
|
-
return React.createElement(ReactComponent, { ...props, forwardedRef: ref });
|
|
20
|
-
};
|
|
21
|
-
forwardRef.displayName = displayName;
|
|
22
|
-
return React.forwardRef(forwardRef);
|
|
23
|
-
};
|
|
24
|
-
export const defineCustomElement = (tagName, customElement) => {
|
|
25
|
-
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
26
|
-
customElements.define(tagName, customElement);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export * from './attachProps';
|
|
30
|
-
export * from './case';
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/stencil-generated/react-component-lib/utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAA+D,EAAE,KAAU,EAAE,EAAE;IACpG,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;QAC9B,GAAG,CAAC,KAAK,CAAC,CAAC;IACb,CAAC;SAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAEtB,GAAmC,CAAC,OAAO,GAAG,KAAK,CAAC;IACvD,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,GAAG,IAAoE,EAC/C,EAAE;IAC1B,OAAO,CAAC,KAAU,EAAE,EAAE;QACpB,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAwB,cAAmB,EAAE,WAAmB,EAAE,EAAE;IAClG,MAAM,UAAU,GAAG,CACjB,KAAuD,EACvD,GAA0C,EAC1C,EAAE;QACF,OAAO,oBAAC,cAAc,OAAK,KAAK,EAAE,YAAY,EAAE,GAAG,GAAI,CAAC;IAC1D,CAAC,CAAC;IACF,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;IAErC,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAe,EAAE,aAAkB,EAAE,EAAE;IACzE,IAAI,aAAa,KAAK,SAAS,IAAI,OAAO,cAAc,KAAK,WAAW,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QACzG,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAChD,CAAC;AACH,CAAC,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./stencil-generated/index";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { JSX } from '@swisspost/design-system-components';
|
|
2
|
-
export declare const PostAccordion: import("react").ForwardRefExoticComponent<JSX.PostAccordion & Omit<import("react").HTMLAttributes<HTMLPostAccordionElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostAccordionElement>>;
|
|
3
|
-
export declare const PostAccordionItem: import("react").ForwardRefExoticComponent<JSX.PostAccordionItem & Omit<import("react").HTMLAttributes<HTMLPostAccordionItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostAccordionItemElement>>;
|
|
4
|
-
export declare const PostAvatar: import("react").ForwardRefExoticComponent<JSX.PostAvatar & Omit<import("react").HTMLAttributes<HTMLPostAvatarElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostAvatarElement>>;
|
|
5
|
-
export declare const PostBackToTop: import("react").ForwardRefExoticComponent<JSX.PostBackToTop & Omit<import("react").HTMLAttributes<HTMLPostBackToTopElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostBackToTopElement>>;
|
|
6
|
-
export declare const PostBanner: import("react").ForwardRefExoticComponent<JSX.PostBanner & Omit<import("react").HTMLAttributes<HTMLPostBannerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostBannerElement>>;
|
|
7
|
-
export declare const PostBreadcrumbItem: import("react").ForwardRefExoticComponent<JSX.PostBreadcrumbItem & Omit<import("react").HTMLAttributes<HTMLPostBreadcrumbItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostBreadcrumbItemElement>>;
|
|
8
|
-
export declare const PostBreadcrumbs: import("react").ForwardRefExoticComponent<JSX.PostBreadcrumbs & Omit<import("react").HTMLAttributes<HTMLPostBreadcrumbsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostBreadcrumbsElement>>;
|
|
9
|
-
export declare const PostCardControl: import("react").ForwardRefExoticComponent<JSX.PostCardControl & Omit<import("react").HTMLAttributes<HTMLPostCardControlElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostCardControlElement>>;
|
|
10
|
-
export declare const PostClosebutton: import("react").ForwardRefExoticComponent<JSX.PostClosebutton & Omit<import("react").HTMLAttributes<HTMLPostClosebuttonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostClosebuttonElement>>;
|
|
11
|
-
export declare const PostCollapsible: import("react").ForwardRefExoticComponent<JSX.PostCollapsible & Omit<import("react").HTMLAttributes<HTMLPostCollapsibleElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostCollapsibleElement>>;
|
|
12
|
-
export declare const PostCollapsibleTrigger: import("react").ForwardRefExoticComponent<JSX.PostCollapsibleTrigger & Omit<import("react").HTMLAttributes<HTMLPostCollapsibleTriggerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostCollapsibleTriggerElement>>;
|
|
13
|
-
export declare const PostFooter: import("react").ForwardRefExoticComponent<JSX.PostFooter & Omit<import("react").HTMLAttributes<HTMLPostFooterElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostFooterElement>>;
|
|
14
|
-
export declare const PostHeader: import("react").ForwardRefExoticComponent<JSX.PostHeader & Omit<import("react").HTMLAttributes<HTMLPostHeaderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostHeaderElement>>;
|
|
15
|
-
export declare const PostIcon: import("react").ForwardRefExoticComponent<JSX.PostIcon & Omit<import("react").HTMLAttributes<HTMLPostIconElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostIconElement>>;
|
|
16
|
-
export declare const PostLanguageOption: import("react").ForwardRefExoticComponent<JSX.PostLanguageOption & Omit<import("react").HTMLAttributes<HTMLPostLanguageOptionElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostLanguageOptionElement>>;
|
|
17
|
-
export declare const PostLanguageSwitch: import("react").ForwardRefExoticComponent<JSX.PostLanguageSwitch & Omit<import("react").HTMLAttributes<HTMLPostLanguageSwitchElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostLanguageSwitchElement>>;
|
|
18
|
-
export declare const PostLinkarea: import("react").ForwardRefExoticComponent<JSX.PostLinkarea & Omit<import("react").HTMLAttributes<HTMLPostLinkareaElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostLinkareaElement>>;
|
|
19
|
-
export declare const PostList: import("react").ForwardRefExoticComponent<JSX.PostList & Omit<import("react").HTMLAttributes<HTMLPostListElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostListElement>>;
|
|
20
|
-
export declare const PostListItem: import("react").ForwardRefExoticComponent<JSX.PostListItem & Omit<import("react").HTMLAttributes<HTMLPostListItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostListItemElement>>;
|
|
21
|
-
export declare const PostLogo: import("react").ForwardRefExoticComponent<JSX.PostLogo & Omit<import("react").HTMLAttributes<HTMLPostLogoElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostLogoElement>>;
|
|
22
|
-
export declare const PostMainnavigation: import("react").ForwardRefExoticComponent<JSX.PostMainnavigation & Omit<import("react").HTMLAttributes<HTMLPostMainnavigationElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostMainnavigationElement>>;
|
|
23
|
-
export declare const PostMegadropdown: import("react").ForwardRefExoticComponent<JSX.PostMegadropdown & Omit<import("react").HTMLAttributes<HTMLPostMegadropdownElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostMegadropdownElement>>;
|
|
24
|
-
export declare const PostMegadropdownTrigger: import("react").ForwardRefExoticComponent<JSX.PostMegadropdownTrigger & Omit<import("react").HTMLAttributes<HTMLPostMegadropdownTriggerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostMegadropdownTriggerElement>>;
|
|
25
|
-
export declare const PostMenu: import("react").ForwardRefExoticComponent<JSX.PostMenu & Omit<import("react").HTMLAttributes<HTMLPostMenuElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostMenuElement>>;
|
|
26
|
-
export declare const PostMenuItem: import("react").ForwardRefExoticComponent<JSX.PostMenuItem & Omit<import("react").HTMLAttributes<HTMLPostMenuItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostMenuItemElement>>;
|
|
27
|
-
export declare const PostMenuTrigger: import("react").ForwardRefExoticComponent<JSX.PostMenuTrigger & Omit<import("react").HTMLAttributes<HTMLPostMenuTriggerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostMenuTriggerElement>>;
|
|
28
|
-
export declare const PostPopover: import("react").ForwardRefExoticComponent<JSX.PostPopover & Omit<import("react").HTMLAttributes<HTMLPostPopoverElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostPopoverElement>>;
|
|
29
|
-
export declare const PostPopovercontainer: import("react").ForwardRefExoticComponent<JSX.PostPopovercontainer & Omit<import("react").HTMLAttributes<HTMLPostPopovercontainerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostPopovercontainerElement>>;
|
|
30
|
-
export declare const PostRating: import("react").ForwardRefExoticComponent<JSX.PostRating & Omit<import("react").HTMLAttributes<HTMLPostRatingElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostRatingElement>>;
|
|
31
|
-
export declare const PostTabHeader: import("react").ForwardRefExoticComponent<JSX.PostTabHeader & Omit<import("react").HTMLAttributes<HTMLPostTabHeaderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostTabHeaderElement>>;
|
|
32
|
-
export declare const PostTabPanel: import("react").ForwardRefExoticComponent<JSX.PostTabPanel & Omit<import("react").HTMLAttributes<HTMLPostTabPanelElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostTabPanelElement>>;
|
|
33
|
-
export declare const PostTabs: import("react").ForwardRefExoticComponent<JSX.PostTabs & Omit<import("react").HTMLAttributes<HTMLPostTabsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostTabsElement>>;
|
|
34
|
-
export declare const PostTag: import("react").ForwardRefExoticComponent<JSX.PostTag & Omit<import("react").HTMLAttributes<HTMLPostTagElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostTagElement>>;
|
|
35
|
-
export declare const PostTogglebutton: import("react").ForwardRefExoticComponent<JSX.PostTogglebutton & Omit<import("react").HTMLAttributes<HTMLPostTogglebuttonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostTogglebuttonElement>>;
|
|
36
|
-
export declare const PostTooltip: import("react").ForwardRefExoticComponent<JSX.PostTooltip & Omit<import("react").HTMLAttributes<HTMLPostTooltipElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostTooltipElement>>;
|
|
37
|
-
export declare const PostTooltipTrigger: import("react").ForwardRefExoticComponent<JSX.PostTooltipTrigger & Omit<import("react").HTMLAttributes<HTMLPostTooltipTriggerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLPostTooltipTriggerElement>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface HTMLStencilElement extends HTMLElement {
|
|
3
|
-
componentOnReady(): Promise<this>;
|
|
4
|
-
}
|
|
5
|
-
interface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
|
|
6
|
-
forwardedRef: React.RefObject<ElementType>;
|
|
7
|
-
ref?: React.Ref<any>;
|
|
8
|
-
}
|
|
9
|
-
export declare const createReactComponent: <PropType, ElementType extends HTMLStencilElement, ContextStateType = {}, ExpandedPropsTypes = {}>(tagName: string, ReactComponentContext?: React.Context<ContextStateType>, manipulatePropsFunction?: (originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import("./utils").StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
|
|
10
|
-
export {};
|
package/dist/types/components/stencil-generated/react-component-lib/createOverlayComponent.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { OverlayEventDetail } from './interfaces';
|
|
3
|
-
import { StencilReactForwardedRef } from './utils';
|
|
4
|
-
interface OverlayElement extends HTMLElement {
|
|
5
|
-
present: () => Promise<void>;
|
|
6
|
-
dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
|
|
7
|
-
}
|
|
8
|
-
export interface ReactOverlayProps {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
isOpen: boolean;
|
|
11
|
-
onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
12
|
-
onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
13
|
-
onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
14
|
-
onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(tagName: string, controller: {
|
|
17
|
-
create: (options: any) => Promise<OverlayType>;
|
|
18
|
-
}, customElement?: any) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
|
|
19
|
-
forwardedRef?: StencilReactForwardedRef<OverlayType>;
|
|
20
|
-
}> & React.RefAttributes<OverlayType>>;
|
|
21
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface EventEmitter<T = any> {
|
|
2
|
-
emit: (data?: T) => CustomEvent<T>;
|
|
3
|
-
}
|
|
4
|
-
export interface StyleReactProps {
|
|
5
|
-
class?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
style?: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export interface OverlayEventDetail<T = any> {
|
|
12
|
-
data?: T;
|
|
13
|
-
role?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface OverlayInterface {
|
|
16
|
-
el: HTMLElement;
|
|
17
|
-
animated: boolean;
|
|
18
|
-
keyboardClose: boolean;
|
|
19
|
-
overlayIndex: number;
|
|
20
|
-
presented: boolean;
|
|
21
|
-
enterAnimation?: any;
|
|
22
|
-
leaveAnimation?: any;
|
|
23
|
-
didPresent: EventEmitter<void>;
|
|
24
|
-
willPresent: EventEmitter<void>;
|
|
25
|
-
willDismiss: EventEmitter<OverlayEventDetail>;
|
|
26
|
-
didDismiss: EventEmitter<OverlayEventDetail>;
|
|
27
|
-
present(): Promise<void>;
|
|
28
|
-
dismiss(data?: any, role?: string): Promise<boolean>;
|
|
29
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void;
|
|
2
|
-
export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
|
|
3
|
-
export declare const transformReactEventName: (eventNameSuffix: string) => string;
|
|
4
|
-
export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
|
|
5
|
-
export declare const syncEvent: (node: Element & {
|
|
6
|
-
__events?: {
|
|
7
|
-
[key: string]: ((e: Event) => any) | undefined;
|
|
8
|
-
};
|
|
9
|
-
}, eventName: string, newEventHandler?: (e: Event) => any) => void;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleReactProps } from '../interfaces';
|
|
3
|
-
export type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
|
|
4
|
-
export type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
|
|
5
|
-
export declare const setRef: (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => void;
|
|
6
|
-
export declare const mergeRefs: (...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]) => React.RefCallback<any>;
|
|
7
|
-
export declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
|
|
8
|
-
export declare const defineCustomElement: (tagName: string, customElement: any) => void;
|
|
9
|
-
export * from './attachProps';
|
|
10
|
-
export * from './case';
|