@sme.up/ketchup-react 10.0.1 → 10.1.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.
@@ -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';
@@ -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
- // Cast as a MutableRef so we can assign current
8
- ref.current = value;
9
- }
10
- };
11
- export const mergeRefs = (...refs) => {
12
- return (value) => {
13
- refs.forEach((ref) => {
14
- setRef(ref, value);
15
- });
16
- };
17
- };
18
- export const createForwardRef = (ReactComponent, displayName) => {
19
- const forwardRef = (props, ref) => {
20
- return React.createElement(ReactComponent, { ...props, forwardedRef: ref });
21
- };
22
- forwardRef.displayName = displayName;
23
- return React.forwardRef(forwardRef);
24
- };
25
- export const defineCustomElement = (tagName, customElement) => {
26
- if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
27
- customElements.define(tagName, customElement);
28
- }
29
- };
30
- export * from './attachProps';
31
- export * from './case';