@ukic/canary-react 2.0.0-canary.2 → 2.0.0-canary.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,16 @@
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
- /**
4
- * Transforms a React event name to a browser event name.
5
- */
6
- export declare const transformReactEventName: (eventNameSuffix: string) => string;
7
- /**
8
- * Checks if an event is supported in the current execution environment.
9
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
10
- */
11
- export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
12
- export declare const syncEvent: (node: Element & {
13
- __events?: {
14
- [key: string]: (e: Event) => any;
15
- };
16
- }, eventName: string, newEventHandler?: (e: Event) => any) => void;
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
+ /**
4
+ * Transforms a React event name to a browser event name.
5
+ */
6
+ export declare const transformReactEventName: (eventNameSuffix: string) => string;
7
+ /**
8
+ * Checks if an event is supported in the current execution environment.
9
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
10
+ */
11
+ export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
12
+ export declare const syncEvent: (node: Element & {
13
+ __events?: {
14
+ [key: string]: (e: Event) => any;
15
+ };
16
+ }, eventName: string, newEventHandler?: (e: Event) => any) => void;
@@ -1,107 +1,108 @@
1
- import { camelToDashCase } from './case';
2
- export const attachProps = (node, newProps, oldProps = {}) => {
3
- // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first
4
- if (node instanceof Element) {
5
- // add any classes in className to the class list
6
- const className = getClassName(node.classList, newProps, oldProps);
7
- if (className !== '') {
8
- node.className = className;
9
- }
10
- Object.keys(newProps).forEach((name) => {
11
- if (name === 'children' ||
12
- name === 'style' ||
13
- name === 'ref' ||
14
- name === 'class' ||
15
- name === 'className' ||
16
- name === 'forwardedRef') {
17
- return;
18
- }
19
- if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
20
- const eventName = name.substring(2);
21
- const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
22
- if (!isCoveredByReact(eventNameLc)) {
23
- syncEvent(node, eventNameLc, newProps[name]);
24
- }
25
- }
26
- else {
27
- node[name] = newProps[name];
28
- const propType = typeof newProps[name];
29
- if (propType === 'string') {
30
- node.setAttribute(camelToDashCase(name), newProps[name]);
31
- }
32
- }
33
- });
34
- }
35
- };
36
- export const getClassName = (classList, newProps, oldProps) => {
37
- const newClassProp = newProps.className || newProps.class;
38
- const oldClassProp = oldProps.className || oldProps.class;
39
- // map the classes to Maps for performance
40
- const currentClasses = arrayToMap(classList);
41
- const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
42
- const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
43
- const finalClassNames = [];
44
- // loop through each of the current classes on the component
45
- // to see if it should be a part of the classNames added
46
- currentClasses.forEach((currentClass) => {
47
- if (incomingPropClasses.has(currentClass)) {
48
- // add it as its already included in classnames coming in from newProps
49
- finalClassNames.push(currentClass);
50
- incomingPropClasses.delete(currentClass);
51
- }
52
- else if (!oldPropClasses.has(currentClass)) {
53
- // add it as it has NOT been removed by user
54
- finalClassNames.push(currentClass);
55
- }
56
- });
57
- incomingPropClasses.forEach((s) => finalClassNames.push(s));
58
- return finalClassNames.join(' ');
59
- };
60
- /**
61
- * Transforms a React event name to a browser event name.
62
- */
63
- export const transformReactEventName = (eventNameSuffix) => {
64
- switch (eventNameSuffix) {
65
- case 'doubleclick':
66
- return 'dblclick';
67
- }
68
- return eventNameSuffix;
69
- };
70
- /**
71
- * Checks if an event is supported in the current execution environment.
72
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
73
- */
74
- export const isCoveredByReact = (eventNameSuffix) => {
75
- if (typeof document === 'undefined') {
76
- return true;
77
- }
78
- else {
79
- const eventName = 'on' + transformReactEventName(eventNameSuffix);
80
- let isSupported = eventName in document;
81
- if (!isSupported) {
82
- const element = document.createElement('div');
83
- element.setAttribute(eventName, 'return;');
84
- isSupported = typeof element[eventName] === 'function';
85
- }
86
- return isSupported;
87
- }
88
- };
89
- export const syncEvent = (node, eventName, newEventHandler) => {
90
- const eventStore = node.__events || (node.__events = {});
91
- const oldEventHandler = eventStore[eventName];
92
- // Remove old listener so they don't double up.
93
- if (oldEventHandler) {
94
- node.removeEventListener(eventName, oldEventHandler);
95
- }
96
- // Bind new listener.
97
- node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {
98
- if (newEventHandler) {
99
- newEventHandler.call(this, e);
100
- }
101
- }));
102
- };
103
- const arrayToMap = (arr) => {
104
- const map = new Map();
105
- arr.forEach((s) => map.set(s, s));
106
- return map;
107
- };
1
+ import { camelToDashCase } from './case';
2
+ export var attachProps = function (node, newProps, oldProps) {
3
+ if (oldProps === void 0) { oldProps = {}; }
4
+ // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first
5
+ if (node instanceof Element) {
6
+ // add any classes in className to the class list
7
+ var className = getClassName(node.classList, newProps, oldProps);
8
+ if (className !== '') {
9
+ node.className = className;
10
+ }
11
+ Object.keys(newProps).forEach(function (name) {
12
+ if (name === 'children' ||
13
+ name === 'style' ||
14
+ name === 'ref' ||
15
+ name === 'class' ||
16
+ name === 'className' ||
17
+ name === 'forwardedRef') {
18
+ return;
19
+ }
20
+ if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
21
+ var eventName = name.substring(2);
22
+ var eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
23
+ if (!isCoveredByReact(eventNameLc)) {
24
+ syncEvent(node, eventNameLc, newProps[name]);
25
+ }
26
+ }
27
+ else {
28
+ node[name] = newProps[name];
29
+ var propType = typeof newProps[name];
30
+ if (propType === 'string') {
31
+ node.setAttribute(camelToDashCase(name), newProps[name]);
32
+ }
33
+ }
34
+ });
35
+ }
36
+ };
37
+ export var getClassName = function (classList, newProps, oldProps) {
38
+ var newClassProp = newProps.className || newProps.class;
39
+ var oldClassProp = oldProps.className || oldProps.class;
40
+ // map the classes to Maps for performance
41
+ var currentClasses = arrayToMap(classList);
42
+ var incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
43
+ var oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
44
+ var finalClassNames = [];
45
+ // loop through each of the current classes on the component
46
+ // to see if it should be a part of the classNames added
47
+ currentClasses.forEach(function (currentClass) {
48
+ if (incomingPropClasses.has(currentClass)) {
49
+ // add it as its already included in classnames coming in from newProps
50
+ finalClassNames.push(currentClass);
51
+ incomingPropClasses.delete(currentClass);
52
+ }
53
+ else if (!oldPropClasses.has(currentClass)) {
54
+ // add it as it has NOT been removed by user
55
+ finalClassNames.push(currentClass);
56
+ }
57
+ });
58
+ incomingPropClasses.forEach(function (s) { return finalClassNames.push(s); });
59
+ return finalClassNames.join(' ');
60
+ };
61
+ /**
62
+ * Transforms a React event name to a browser event name.
63
+ */
64
+ export var transformReactEventName = function (eventNameSuffix) {
65
+ switch (eventNameSuffix) {
66
+ case 'doubleclick':
67
+ return 'dblclick';
68
+ }
69
+ return eventNameSuffix;
70
+ };
71
+ /**
72
+ * Checks if an event is supported in the current execution environment.
73
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
74
+ */
75
+ export var isCoveredByReact = function (eventNameSuffix) {
76
+ if (typeof document === 'undefined') {
77
+ return true;
78
+ }
79
+ else {
80
+ var eventName = 'on' + transformReactEventName(eventNameSuffix);
81
+ var isSupported = eventName in document;
82
+ if (!isSupported) {
83
+ var element = document.createElement('div');
84
+ element.setAttribute(eventName, 'return;');
85
+ isSupported = typeof element[eventName] === 'function';
86
+ }
87
+ return isSupported;
88
+ }
89
+ };
90
+ export var syncEvent = function (node, eventName, newEventHandler) {
91
+ var eventStore = node.__events || (node.__events = {});
92
+ var oldEventHandler = eventStore[eventName];
93
+ // Remove old listener so they don't double up.
94
+ if (oldEventHandler) {
95
+ node.removeEventListener(eventName, oldEventHandler);
96
+ }
97
+ // Bind new listener.
98
+ node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {
99
+ if (newEventHandler) {
100
+ newEventHandler.call(this, e);
101
+ }
102
+ }));
103
+ };
104
+ var arrayToMap = function (arr) {
105
+ var map = new Map();
106
+ arr.forEach(function (s) { return map.set(s, s); });
107
+ return map;
108
+ };
@@ -1,2 +1,2 @@
1
- export declare const dashToPascalCase: (str: string) => string;
2
- export declare const camelToDashCase: (str: string) => string;
1
+ export declare const dashToPascalCase: (str: string) => string;
2
+ export declare const camelToDashCase: (str: string) => string;
@@ -1,6 +1,8 @@
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()}`);
1
+ export var dashToPascalCase = function (str) {
2
+ return str
3
+ .toLowerCase()
4
+ .split('-')
5
+ .map(function (segment) { return segment.charAt(0).toUpperCase() + segment.slice(1); })
6
+ .join('');
7
+ };
8
+ export var camelToDashCase = function (str) { return str.replace(/([A-Z])/g, function (m) { return "-".concat(m[0].toLowerCase()); }); };
@@ -1,2 +1,2 @@
1
- export declare const isDevMode: () => boolean;
2
- export declare const deprecationWarning: (key: string, message: string) => void;
1
+ export declare const isDevMode: () => boolean;
2
+ export declare const deprecationWarning: (key: string, message: string) => void;
@@ -1,12 +1,12 @@
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
- };
1
+ export var isDevMode = function () {
2
+ return process && process.env && process.env.NODE_ENV === 'development';
3
+ };
4
+ var warnings = {};
5
+ export var deprecationWarning = function (key, message) {
6
+ if (isDevMode()) {
7
+ if (!warnings[key]) {
8
+ console.warn(message);
9
+ warnings[key] = true;
10
+ }
11
+ }
12
+ };
@@ -1,10 +1,10 @@
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<PropType & Omit<React.HTMLAttributes<ElementType>, "style"> & StyleReactProps> & React.RefAttributes<ElementType>>;
8
- export declare const defineCustomElement: (tagName: string, customElement: any) => void;
9
- export * from './attachProps';
10
- export * from './case';
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<PropType & Omit<React.HTMLAttributes<ElementType>, "style"> & StyleReactProps> & React.RefAttributes<ElementType>>;
8
+ export declare const defineCustomElement: (tagName: string, customElement: any) => void;
9
+ export * from './attachProps';
10
+ export * from './case';
@@ -1,31 +1,46 @@
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, Object.assign({}, 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';
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from 'react';
13
+ export var setRef = function (ref, value) {
14
+ if (typeof ref === 'function') {
15
+ ref(value);
16
+ }
17
+ else if (ref != null) {
18
+ // Cast as a MutableRef so we can assign current
19
+ ref.current = value;
20
+ }
21
+ };
22
+ export var mergeRefs = function () {
23
+ var refs = [];
24
+ for (var _i = 0; _i < arguments.length; _i++) {
25
+ refs[_i] = arguments[_i];
26
+ }
27
+ return function (value) {
28
+ refs.forEach(function (ref) {
29
+ setRef(ref, value);
30
+ });
31
+ };
32
+ };
33
+ export var createForwardRef = function (ReactComponent, displayName) {
34
+ var forwardRef = function (props, ref) {
35
+ return React.createElement(ReactComponent, __assign({}, props, { forwardedRef: ref }));
36
+ };
37
+ forwardRef.displayName = displayName;
38
+ return React.forwardRef(forwardRef);
39
+ };
40
+ export var defineCustomElement = function (tagName, customElement) {
41
+ if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
42
+ customElements.define(tagName, customElement);
43
+ }
44
+ };
45
+ export * from './attachProps';
46
+ export * from './case';
package/package.json CHANGED
@@ -3,19 +3,25 @@
3
3
  "sideEffects": [
4
4
  "*.css"
5
5
  ],
6
- "version": "2.0.0-canary.2",
6
+ "version": "2.0.0-canary.20",
7
7
  "description": "React-wrapped web components compiled using StencilJS",
8
8
  "scripts": {
9
9
  "build": "npm run clean && npm run compile && npm run copy:core-css && npm run copy:normalize-css",
10
+ "cypress": "cypress run --component --headed",
11
+ "cypress:open": "cypress open",
12
+ "cypress:component": "cypress run --component --headless",
13
+ "cypress:ci": "cross-env CYPRESS_CI=true npm run cypress:component",
10
14
  "clean": "rimraf dist",
11
15
  "compile": "npm run tsc",
12
16
  "tsc": "tsc -p .",
13
17
  "rollup": "rollup -c",
14
- "storybook": "start-storybook -p 6007 --no-manager-cache",
15
- "build-storybook": "rimraf ./storybook-static && build-storybook -s public",
18
+ "storybook": "storybook dev -p 6009",
19
+ "build-storybook": "rimraf ./storybook-static && storybook build",
16
20
  "audit": "echo 'Audit for: @ukic/canary-react' && audit-ci -m --config ../../audit-ci.json",
17
- "copy:core-css": "echo 'Copy core.css from: @ukic/canary-web-components' && mkdirp -p ./dist/core && ncp ../web-components/dist/core/core.css ./dist/core/core.css",
18
- "copy:normalize-css": "echo 'Copy normalize.css from: @ukic/canary-web-components' && ncp ../web-components/dist/core/normalize.css ./dist/core/normalize.css"
21
+ "copy:core-css": "echo 'Copy core.css from: @ukic/canary-web-components' && mkdirp -p ./dist/core && ncp ../canary-web-components/dist/core/core.css ./dist/core/core.css",
22
+ "copy:normalize-css": "echo 'Copy normalize.css from: @ukic/canary-web-components' && ncp ../canary-web-components/dist/core/normalize.css ./dist/core/normalize.css",
23
+ "prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore src --check",
24
+ "prettier:fix": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore src --write"
19
25
  },
20
26
  "main": "./dist/index.js",
21
27
  "module": "./dist/index.js",
@@ -24,28 +30,39 @@
24
30
  "dist/"
25
31
  ],
26
32
  "dependencies": {
27
- "@ukic/canary-web-components": "^2.0.0-canary.2",
28
- "@ukic/fonts": "^2.3.0"
33
+ "@ukic/canary-web-components": "^2.0.0-canary.20",
34
+ "@ukic/react": "^2.25.0",
35
+ "@ukic/web-components": "^2.25.0"
29
36
  },
30
37
  "devDependencies": {
31
38
  "@babel/core": "^7.16.0",
39
+ "@babel/preset-env": "^7.23.9",
40
+ "@babel/preset-react": "^7.23.3",
41
+ "@babel/preset-typescript": "^7.23.3",
42
+ "@cypress/react": "^8.0.0",
43
+ "@cypress/webpack-preprocessor": "^6.0.0",
32
44
  "@mdi/js": "^7.2.96",
33
45
  "@stencil/react-output-target": "^0.5.3",
34
- "@storybook/addon-a11y": "^6.4.8",
35
- "@storybook/addon-actions": "^6.4.8",
36
- "@storybook/addon-docs": "^6.4.8",
37
- "@storybook/addon-essentials": "^6.4.8",
38
- "@storybook/addon-links": "^6.4.8",
46
+ "@storybook/addon-a11y": "^7.6.10",
47
+ "@storybook/addon-actions": "^7.6.10",
48
+ "@storybook/addon-docs": "^7.6.10",
49
+ "@storybook/addon-essentials": "^7.6.10",
50
+ "@storybook/addon-links": "^7.6.10",
51
+ "@storybook/addon-mdx-gfm": "^7.6.10",
39
52
  "@storybook/addon-postcss": "^2.0.0",
40
- "@storybook/builder-webpack5": "^6.5.14",
41
- "@storybook/manager-webpack5": "^6.5.14",
42
- "@storybook/react": "^6.5.15",
53
+ "@storybook/react": "^7.6.10",
54
+ "@storybook/react-webpack5": "^7.6.10",
43
55
  "@types/jest": "27.0.3",
44
56
  "@types/node": "^16.11.11",
45
57
  "@types/react": "^17.0.37",
46
58
  "@types/react-dom": "^17.0.11",
47
59
  "babel-loader": "^8.2.3",
48
- "github-markdown-css": "^5.2.0",
60
+ "cross-env": "^7.0.3",
61
+ "cypress": "^13.3.1",
62
+ "cypress-axe": "^1.5.0",
63
+ "cypress-image-diff-js": "^1.32.0",
64
+ "eslint-plugin-cypress": "^2.15.1",
65
+ "github-markdown-css": "^5.5.0",
49
66
  "jest": "^27.4.1",
50
67
  "jest-dom": "^4.0.0",
51
68
  "mkdirp": "^1.0.4",
@@ -56,10 +73,14 @@
56
73
  "react-markdown": "^8.0.7",
57
74
  "react-router-dom": "^6.3.0",
58
75
  "remark-gfm": "^3.0.1",
76
+ "storybook": "^7.6.10",
77
+ "ts-loader": "^9.5.0",
59
78
  "typescript": "^4.5.2",
79
+ "url-loader": "^4.1.1",
60
80
  "webpack": "^5.76.0"
61
81
  },
62
82
  "peerDependencies": {
83
+ "@ukic/fonts": "^2.6.0",
63
84
  "react": "^16.7.0 || ^17.0.2 || ^18.2.0",
64
85
  "react-dom": "^16.7.0 || ^17.0.2 || ^18.2.0"
65
86
  },
@@ -71,5 +92,6 @@
71
92
  "dist"
72
93
  ]
73
94
  },
74
- "license": "MIT"
95
+ "license": "MIT",
96
+ "gitHead": "eb7aab0b104807bab72ff8030dbd57f847480fd7"
75
97
  }
@@ -1,2 +0,0 @@
1
- import { FC } from "react";
2
- export declare const SlottedSVG: FC<any>;
@@ -1,24 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React from "react";
13
- const defaultProps = {
14
- xmlns: "http://www.w3.org/2000/svg",
15
- };
16
- function slot(name = "") {
17
- return { ref: (e) => (e ? e.setAttribute("slot", name) : null) };
18
- }
19
- export const SlottedSVG = (_a) => {
20
- var { path, slot: slotName, children } = _a, props = __rest(_a, ["path", "slot", "children"]);
21
- return (React.createElement("svg", Object.assign({}, slot(slotName), props, defaultProps),
22
- !!path && React.createElement("path", { d: path }),
23
- children));
24
- };