@vertexvis/ui-react 0.1.5-testing.0 → 1.0.0-canary.0
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/README.md +0 -18
- package/README.template.md +0 -18
- package/dist/bundle.cjs +477 -0
- package/dist/bundle.cjs.map +1 -0
- package/dist/bundle.js +423 -0
- package/dist/bundle.js.map +1 -0
- package/dist/generated/components.d.ts +202 -0
- package/dist/index.d.ts +2 -2
- package/dist/loader.d.ts +1 -1
- package/package.json +28 -15
- package/dist/bundle.cjs.js +0 -320
- package/dist/bundle.cjs.js.map +0 -1
- package/dist/bundle.cjs.min.js +0 -2
- package/dist/bundle.cjs.min.js.map +0 -1
- package/dist/bundle.esm.js +0 -266
- package/dist/bundle.esm.js.map +0 -1
- package/dist/bundle.esm.min.js +0 -2
- package/dist/bundle.esm.min.js.map +0 -1
- package/dist/generated/react-component-lib/createComponent.d.ts +0 -10
- package/dist/generated/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/dist/generated/react-component-lib/index.d.ts +0 -2
- package/dist/generated/react-component-lib/interfaces.d.ts +0 -29
- package/dist/generated/react-component-lib/utils/attachProps.d.ts +0 -16
- package/dist/generated/react-component-lib/utils/case.d.ts +0 -2
- package/dist/generated/react-component-lib/utils/dev.d.ts +0 -2
- package/dist/generated/react-component-lib/utils/index.d.ts +0 -10
- package/dist/generated/ui.d.ts +0 -43
package/dist/bundle.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.cjs.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/ui.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/ui';\n\nimport { defineCustomElements } from '@vertexvis/ui/loader';\n\ndefineCustomElements();\nexport const VertexAutoResizeTextarea = /*@__PURE__*/createReactComponent<JSX.VertexAutoResizeTextarea, HTMLVertexAutoResizeTextareaElement>('vertex-auto-resize-textarea');\nexport const VertexAvatar = /*@__PURE__*/createReactComponent<JSX.VertexAvatar, HTMLVertexAvatarElement>('vertex-avatar');\nexport const VertexAvatarGroup = /*@__PURE__*/createReactComponent<JSX.VertexAvatarGroup, HTMLVertexAvatarGroupElement>('vertex-avatar-group');\nexport const VertexBadge = /*@__PURE__*/createReactComponent<JSX.VertexBadge, HTMLVertexBadgeElement>('vertex-badge');\nexport const VertexBanner = /*@__PURE__*/createReactComponent<JSX.VertexBanner, HTMLVertexBannerElement>('vertex-banner');\nexport const VertexButton = /*@__PURE__*/createReactComponent<JSX.VertexButton, HTMLVertexButtonElement>('vertex-button');\nexport const VertexCard = /*@__PURE__*/createReactComponent<JSX.VertexCard, HTMLVertexCardElement>('vertex-card');\nexport const VertexCardGroup = /*@__PURE__*/createReactComponent<JSX.VertexCardGroup, HTMLVertexCardGroupElement>('vertex-card-group');\nexport const VertexChip = /*@__PURE__*/createReactComponent<JSX.VertexChip, HTMLVertexChipElement>('vertex-chip');\nexport const VertexClickToEditTextfield = /*@__PURE__*/createReactComponent<JSX.VertexClickToEditTextfield, HTMLVertexClickToEditTextfieldElement>('vertex-click-to-edit-textfield');\nexport const VertexCollapsible = /*@__PURE__*/createReactComponent<JSX.VertexCollapsible, HTMLVertexCollapsibleElement>('vertex-collapsible');\nexport const VertexColorCirclePicker = /*@__PURE__*/createReactComponent<JSX.VertexColorCirclePicker, HTMLVertexColorCirclePickerElement>('vertex-color-circle-picker');\nexport const VertexColorPicker = /*@__PURE__*/createReactComponent<JSX.VertexColorPicker, HTMLVertexColorPickerElement>('vertex-color-picker');\nexport const VertexColorSwatch = /*@__PURE__*/createReactComponent<JSX.VertexColorSwatch, HTMLVertexColorSwatchElement>('vertex-color-swatch');\nexport const VertexContextMenu = /*@__PURE__*/createReactComponent<JSX.VertexContextMenu, HTMLVertexContextMenuElement>('vertex-context-menu');\nexport const VertexDialog = /*@__PURE__*/createReactComponent<JSX.VertexDialog, HTMLVertexDialogElement>('vertex-dialog');\nexport const VertexDraggablePopover = /*@__PURE__*/createReactComponent<JSX.VertexDraggablePopover, HTMLVertexDraggablePopoverElement>('vertex-draggable-popover');\nexport const VertexDropdownMenu = /*@__PURE__*/createReactComponent<JSX.VertexDropdownMenu, HTMLVertexDropdownMenuElement>('vertex-dropdown-menu');\nexport const VertexExpandable = /*@__PURE__*/createReactComponent<JSX.VertexExpandable, HTMLVertexExpandableElement>('vertex-expandable');\nexport const VertexHelpTooltip = /*@__PURE__*/createReactComponent<JSX.VertexHelpTooltip, HTMLVertexHelpTooltipElement>('vertex-help-tooltip');\nexport const VertexIcon = /*@__PURE__*/createReactComponent<JSX.VertexIcon, HTMLVertexIconElement>('vertex-icon');\nexport const VertexIconButton = /*@__PURE__*/createReactComponent<JSX.VertexIconButton, HTMLVertexIconButtonElement>('vertex-icon-button');\nexport const VertexLogoLoading = /*@__PURE__*/createReactComponent<JSX.VertexLogoLoading, HTMLVertexLogoLoadingElement>('vertex-logo-loading');\nexport const VertexMenu = /*@__PURE__*/createReactComponent<JSX.VertexMenu, HTMLVertexMenuElement>('vertex-menu');\nexport const VertexMenuDivider = /*@__PURE__*/createReactComponent<JSX.VertexMenuDivider, HTMLVertexMenuDividerElement>('vertex-menu-divider');\nexport const VertexMenuItem = /*@__PURE__*/createReactComponent<JSX.VertexMenuItem, HTMLVertexMenuItemElement>('vertex-menu-item');\nexport const VertexPopover = /*@__PURE__*/createReactComponent<JSX.VertexPopover, HTMLVertexPopoverElement>('vertex-popover');\nexport const VertexRadio = /*@__PURE__*/createReactComponent<JSX.VertexRadio, HTMLVertexRadioElement>('vertex-radio');\nexport const VertexRadioGroup = /*@__PURE__*/createReactComponent<JSX.VertexRadioGroup, HTMLVertexRadioGroupElement>('vertex-radio-group');\nexport const VertexResizable = /*@__PURE__*/createReactComponent<JSX.VertexResizable, HTMLVertexResizableElement>('vertex-resizable');\nexport const VertexResultList = /*@__PURE__*/createReactComponent<JSX.VertexResultList, HTMLVertexResultListElement>('vertex-result-list');\nexport const VertexSearchBar = /*@__PURE__*/createReactComponent<JSX.VertexSearchBar, HTMLVertexSearchBarElement>('vertex-search-bar');\nexport const VertexSelect = /*@__PURE__*/createReactComponent<JSX.VertexSelect, HTMLVertexSelectElement>('vertex-select');\nexport const VertexSlider = /*@__PURE__*/createReactComponent<JSX.VertexSlider, HTMLVertexSliderElement>('vertex-slider');\nexport const VertexSpinner = /*@__PURE__*/createReactComponent<JSX.VertexSpinner, HTMLVertexSpinnerElement>('vertex-spinner');\nexport const VertexTab = /*@__PURE__*/createReactComponent<JSX.VertexTab, HTMLVertexTabElement>('vertex-tab');\nexport const VertexTabs = /*@__PURE__*/createReactComponent<JSX.VertexTabs, HTMLVertexTabsElement>('vertex-tabs');\nexport const VertexTextfield = /*@__PURE__*/createReactComponent<JSX.VertexTextfield, HTMLVertexTextfieldElement>('vertex-textfield');\nexport const VertexToast = /*@__PURE__*/createReactComponent<JSX.VertexToast, HTMLVertexToastElement>('vertex-toast');\nexport const VertexToggle = /*@__PURE__*/createReactComponent<JSX.VertexToggle, HTMLVertexToggleElement>('vertex-toggle');\nexport const VertexTooltip = /*@__PURE__*/createReactComponent<JSX.VertexTooltip, HTMLVertexTooltipElement>('vertex-tooltip');\n"],"names":["React","__extends","createElement","defineCustomElements"],"mappings":";;;;;;;;;;;;AAAO,IAAM,gBAAgB,GAAG,UAAC,GAAW;IAC1C,OAAA,GAAG;SACA,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAA,CAAC;SACpE,IAAI,CAAC,EAAE,CAAC;AAJX,CAIW,CAAC;AACP,IAAM,eAAe,GAAG,UAAC,GAAW,IAAK,OAAA,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,UAAC,CAAS,IAAK,OAAA,WAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAE,GAAA,CAAC,GAAA;;ACJzG,IAAM,WAAW,GAAG,UAAC,IAAiB,EAAE,QAAa,EAAE,QAAkB;IAAlB,yBAAA,EAA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,IAAa,WAAW,iBAAgB,oBAAoB,CAA0C,cAAc,CAAC,CAAC;AACtH,IAAa,gBAAgB,iBAAgB,oBAAoB,CAAoD,oBAAoB,CAAC,CAAC;AAC3I,IAAa,eAAe,iBAAgB,oBAAoB,CAAkD,kBAAkB,CAAC,CAAC;AACtI,IAAa,gBAAgB,iBAAgB,oBAAoB,CAAoD,oBAAoB,CAAC,CAAC;AAC3I,IAAa,eAAe,iBAAgB,oBAAoB,CAAkD,mBAAmB,CAAC,CAAC;AACvI,IAAa,YAAY,iBAAgB,oBAAoB,CAA4C,eAAe,CAAC,CAAC;AAC1H,IAAa,YAAY,iBAAgB,oBAAoB,CAA4C,eAAe,CAAC,CAAC;AAC1H,IAAa,aAAa,iBAAgB,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC;AAC9H,IAAa,SAAS,iBAAgB,oBAAoB,CAAsC,YAAY,CAAC,CAAC;AAC9G,IAAa,UAAU,iBAAgB,oBAAoB,CAAwC,aAAa,CAAC,CAAC;AAClH,IAAa,eAAe,iBAAgB,oBAAoB,CAAkD,kBAAkB,CAAC,CAAC;AACtI,IAAa,WAAW,iBAAgB,oBAAoB,CAA0C,cAAc,CAAC,CAAC;AACtH,IAAa,YAAY,iBAAgB,oBAAoB,CAA4C,eAAe,CAAC,CAAC;AAC1H,IAAa,aAAa,iBAAgB,oBAAoB,CAA8C,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/bundle.cjs.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),r=require("react"),o=(e=r)&&"object"==typeof e&&"default"in e?e.default:e;require("react-dom");var n=require("@vertexvis/ui/loader"),s=function(e){return e.replace(/([A-Z])/g,(function(e){return"-".concat(e[0].toLowerCase())}))},i=function(e,t,r){var o=t.className||t.class,n=r.className||r.class,s=p(e),i=p(o?o.split(" "):[]),a=p(n?n.split(" "):[]),x=[];return s.forEach((function(e){i.has(e)?(x.push(e),i.delete(e)):a.has(e)||x.push(e)})),i.forEach((function(e){return x.push(e)})),x.join(" ")},a=function(e){if("undefined"==typeof document)return!0;var t="on"+function(e){switch(e){case"doubleclick":return"dblclick"}return e}(e),r=t in document;if(!r){var o=document.createElement("div");o.setAttribute(t,"return;"),r="function"==typeof o[t]}return r},x=function(e,t,r){var o=e.__events||(e.__events={}),n=o[t];n&&e.removeEventListener(t,n),e.addEventListener(t,o[t]=function(e){r&&r.call(this,e)})},p=function(e){var t=new Map;return e.forEach((function(e){return t.set(e,e)})),t},c=function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)},u=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){e.forEach((function(e){c(e,t)}))}},l=function(e,n,p,c){void 0!==c&&c();var l=e.toLowerCase().split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join(""),f=function(o){function n(e){var t=o.call(this,e)||this;return t.setComponentElRef=function(e){t.componentEl=e},t}return t.__extends(n,o),n.prototype.componentDidMount=function(){this.componentDidUpdate(this.props)},n.prototype.componentDidUpdate=function(e){!function(e,t,r){if(void 0===r&&(r={}),e instanceof Element){var o=i(e.classList,t,r);""!==o&&(e.className=o),Object.keys(t).forEach((function(r){if("children"!==r&&"style"!==r&&"ref"!==r&&"class"!==r&&"className"!==r&&"forwardedRef"!==r)if(0===r.indexOf("on")&&r[2]===r[2].toUpperCase()){var o=r.substring(2),n=o[0].toLowerCase()+o.substring(1);a(n)||x(e,n,t[r])}else{e[r]=t[r],"string"===typeof t[r]&&e.setAttribute(s(r),t[r])}}))}}(this.componentEl,this.props,e)},n.prototype.render=function(){var o=this.props,n=o.children,i=o.forwardedRef,x=o.style,c=(o.className,o.ref,t.__rest(o,["children","forwardedRef","style","className","ref"])),l=Object.keys(c).reduce((function(e,t){var r=c[t];if(0===t.indexOf("on")&&t[2]===t[2].toUpperCase()){var o=t.substring(2).toLowerCase();"undefined"!=typeof document&&a(o)&&(e[t]=r)}else{var n=typeof r;"string"!==n&&"boolean"!==n&&"number"!==n||(e[s(t)]=r)}return e}),{});p&&(l=p(this.props,l));var f=t.__assign(t.__assign({},l),{ref:u(i,this.setComponentElRef),style:x});return r.createElement(e,f,n)},Object.defineProperty(n,"displayName",{get:function(){return l},enumerable:!1,configurable:!0}),n}(o.Component);return n&&(f.contextType=n),function(e,r){var n=function(r,n){return o.createElement(e,t.__assign({},r,{forwardedRef:n}))};return n.displayName=r,o.forwardRef(n)}(f,l)};n.defineCustomElements();var f=l("vertex-auto-resize-textarea"),v=l("vertex-avatar"),d=l("vertex-avatar-group"),V=l("vertex-badge"),m=l("vertex-banner"),b=l("vertex-button"),h=l("vertex-card"),g=l("vertex-card-group"),y=l("vertex-chip"),C=l("vertex-click-to-edit-textfield"),E=l("vertex-collapsible"),_=l("vertex-color-circle-picker"),w=l("vertex-color-picker"),R=l("vertex-color-swatch"),k=l("vertex-context-menu"),T=l("vertex-dialog"),L=l("vertex-draggable-popover"),j=l("vertex-dropdown-menu"),M=l("vertex-expandable"),N=l("vertex-help-tooltip"),O=l("vertex-icon"),A=l("vertex-icon-button"),D=l("vertex-logo-loading"),P=l("vertex-menu"),B=l("vertex-menu-divider"),S=l("vertex-menu-item"),U=l("vertex-popover"),q=l("vertex-radio"),z=l("vertex-radio-group"),G=l("vertex-resizable"),I=l("vertex-result-list"),H=l("vertex-search-bar"),Z=l("vertex-select"),F=l("vertex-slider"),J=l("vertex-spinner"),K=l("vertex-tab"),Q=l("vertex-tabs"),W=l("vertex-textfield"),X=l("vertex-toast"),Y=l("vertex-toggle"),$=l("vertex-tooltip");Object.keys(n).forEach((function(e){"default"!==e&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})})),exports.VertexAutoResizeTextarea=f,exports.VertexAvatar=v,exports.VertexAvatarGroup=d,exports.VertexBadge=V,exports.VertexBanner=m,exports.VertexButton=b,exports.VertexCard=h,exports.VertexCardGroup=g,exports.VertexChip=y,exports.VertexClickToEditTextfield=C,exports.VertexCollapsible=E,exports.VertexColorCirclePicker=_,exports.VertexColorPicker=w,exports.VertexColorSwatch=R,exports.VertexContextMenu=k,exports.VertexDialog=T,exports.VertexDraggablePopover=L,exports.VertexDropdownMenu=j,exports.VertexExpandable=M,exports.VertexHelpTooltip=N,exports.VertexIcon=O,exports.VertexIconButton=A,exports.VertexLogoLoading=D,exports.VertexMenu=P,exports.VertexMenuDivider=B,exports.VertexMenuItem=S,exports.VertexPopover=U,exports.VertexRadio=q,exports.VertexRadioGroup=z,exports.VertexResizable=G,exports.VertexResultList=I,exports.VertexSearchBar=H,exports.VertexSelect=Z,exports.VertexSlider=F,exports.VertexSpinner=J,exports.VertexTab=K,exports.VertexTabs=Q,exports.VertexTextfield=W,exports.VertexToast=X,exports.VertexToggle=Y,exports.VertexTooltip=$;
|
|
2
|
-
//# sourceMappingURL=bundle.cjs.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.cjs.min.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/ui.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/ui';\n\nimport { defineCustomElements } from '@vertexvis/ui/loader';\n\ndefineCustomElements();\nexport const VertexAutoResizeTextarea = /*@__PURE__*/createReactComponent<JSX.VertexAutoResizeTextarea, HTMLVertexAutoResizeTextareaElement>('vertex-auto-resize-textarea');\nexport const VertexAvatar = /*@__PURE__*/createReactComponent<JSX.VertexAvatar, HTMLVertexAvatarElement>('vertex-avatar');\nexport const VertexAvatarGroup = /*@__PURE__*/createReactComponent<JSX.VertexAvatarGroup, HTMLVertexAvatarGroupElement>('vertex-avatar-group');\nexport const VertexBadge = /*@__PURE__*/createReactComponent<JSX.VertexBadge, HTMLVertexBadgeElement>('vertex-badge');\nexport const VertexBanner = /*@__PURE__*/createReactComponent<JSX.VertexBanner, HTMLVertexBannerElement>('vertex-banner');\nexport const VertexButton = /*@__PURE__*/createReactComponent<JSX.VertexButton, HTMLVertexButtonElement>('vertex-button');\nexport const VertexCard = /*@__PURE__*/createReactComponent<JSX.VertexCard, HTMLVertexCardElement>('vertex-card');\nexport const VertexCardGroup = /*@__PURE__*/createReactComponent<JSX.VertexCardGroup, HTMLVertexCardGroupElement>('vertex-card-group');\nexport const VertexChip = /*@__PURE__*/createReactComponent<JSX.VertexChip, HTMLVertexChipElement>('vertex-chip');\nexport const VertexClickToEditTextfield = /*@__PURE__*/createReactComponent<JSX.VertexClickToEditTextfield, HTMLVertexClickToEditTextfieldElement>('vertex-click-to-edit-textfield');\nexport const VertexCollapsible = /*@__PURE__*/createReactComponent<JSX.VertexCollapsible, HTMLVertexCollapsibleElement>('vertex-collapsible');\nexport const VertexColorCirclePicker = /*@__PURE__*/createReactComponent<JSX.VertexColorCirclePicker, HTMLVertexColorCirclePickerElement>('vertex-color-circle-picker');\nexport const VertexColorPicker = /*@__PURE__*/createReactComponent<JSX.VertexColorPicker, HTMLVertexColorPickerElement>('vertex-color-picker');\nexport const VertexColorSwatch = /*@__PURE__*/createReactComponent<JSX.VertexColorSwatch, HTMLVertexColorSwatchElement>('vertex-color-swatch');\nexport const VertexContextMenu = /*@__PURE__*/createReactComponent<JSX.VertexContextMenu, HTMLVertexContextMenuElement>('vertex-context-menu');\nexport const VertexDialog = /*@__PURE__*/createReactComponent<JSX.VertexDialog, HTMLVertexDialogElement>('vertex-dialog');\nexport const VertexDraggablePopover = /*@__PURE__*/createReactComponent<JSX.VertexDraggablePopover, HTMLVertexDraggablePopoverElement>('vertex-draggable-popover');\nexport const VertexDropdownMenu = /*@__PURE__*/createReactComponent<JSX.VertexDropdownMenu, HTMLVertexDropdownMenuElement>('vertex-dropdown-menu');\nexport const VertexExpandable = /*@__PURE__*/createReactComponent<JSX.VertexExpandable, HTMLVertexExpandableElement>('vertex-expandable');\nexport const VertexHelpTooltip = /*@__PURE__*/createReactComponent<JSX.VertexHelpTooltip, HTMLVertexHelpTooltipElement>('vertex-help-tooltip');\nexport const VertexIcon = /*@__PURE__*/createReactComponent<JSX.VertexIcon, HTMLVertexIconElement>('vertex-icon');\nexport const VertexIconButton = /*@__PURE__*/createReactComponent<JSX.VertexIconButton, HTMLVertexIconButtonElement>('vertex-icon-button');\nexport const VertexLogoLoading = /*@__PURE__*/createReactComponent<JSX.VertexLogoLoading, HTMLVertexLogoLoadingElement>('vertex-logo-loading');\nexport const VertexMenu = /*@__PURE__*/createReactComponent<JSX.VertexMenu, HTMLVertexMenuElement>('vertex-menu');\nexport const VertexMenuDivider = /*@__PURE__*/createReactComponent<JSX.VertexMenuDivider, HTMLVertexMenuDividerElement>('vertex-menu-divider');\nexport const VertexMenuItem = /*@__PURE__*/createReactComponent<JSX.VertexMenuItem, HTMLVertexMenuItemElement>('vertex-menu-item');\nexport const VertexPopover = /*@__PURE__*/createReactComponent<JSX.VertexPopover, HTMLVertexPopoverElement>('vertex-popover');\nexport const VertexRadio = /*@__PURE__*/createReactComponent<JSX.VertexRadio, HTMLVertexRadioElement>('vertex-radio');\nexport const VertexRadioGroup = /*@__PURE__*/createReactComponent<JSX.VertexRadioGroup, HTMLVertexRadioGroupElement>('vertex-radio-group');\nexport const VertexResizable = /*@__PURE__*/createReactComponent<JSX.VertexResizable, HTMLVertexResizableElement>('vertex-resizable');\nexport const VertexResultList = /*@__PURE__*/createReactComponent<JSX.VertexResultList, HTMLVertexResultListElement>('vertex-result-list');\nexport const VertexSearchBar = /*@__PURE__*/createReactComponent<JSX.VertexSearchBar, HTMLVertexSearchBarElement>('vertex-search-bar');\nexport const VertexSelect = /*@__PURE__*/createReactComponent<JSX.VertexSelect, HTMLVertexSelectElement>('vertex-select');\nexport const VertexSlider = /*@__PURE__*/createReactComponent<JSX.VertexSlider, HTMLVertexSliderElement>('vertex-slider');\nexport const VertexSpinner = /*@__PURE__*/createReactComponent<JSX.VertexSpinner, HTMLVertexSpinnerElement>('vertex-spinner');\nexport const VertexTab = /*@__PURE__*/createReactComponent<JSX.VertexTab, HTMLVertexTabElement>('vertex-tab');\nexport const VertexTabs = /*@__PURE__*/createReactComponent<JSX.VertexTabs, HTMLVertexTabsElement>('vertex-tabs');\nexport const VertexTextfield = /*@__PURE__*/createReactComponent<JSX.VertexTextfield, HTMLVertexTextfieldElement>('vertex-textfield');\nexport const VertexToast = /*@__PURE__*/createReactComponent<JSX.VertexToast, HTMLVertexToastElement>('vertex-toast');\nexport const VertexToggle = /*@__PURE__*/createReactComponent<JSX.VertexToggle, HTMLVertexToggleElement>('vertex-toggle');\nexport const VertexTooltip = /*@__PURE__*/createReactComponent<JSX.VertexTooltip, HTMLVertexTooltipElement>('vertex-tooltip');\n"],"names":["camelToDashCase","str","replace","m","toLowerCase","getClassName","classList","newProps","oldProps","newClassProp","className","class","oldClassProp","currentClasses","arrayToMap","incomingPropClasses","split","oldPropClasses","finalClassNames","forEach","currentClass","has","push","delete","s","join","isCoveredByReact","eventNameSuffix","document","eventName","transformReactEventName","isSupported","element","createElement","setAttribute","syncEvent","node","newEventHandler","eventStore","__events","oldEventHandler","removeEventListener","addEventListener","e","call","this","arr","map","Map","set","setRef","ref","value","current","mergeRefs","_i","refs","createReactComponent","tagName","ReactComponentContext","manipulatePropsFunction","defineCustomElement","undefined","displayName","segment","charAt","toUpperCase","slice","ReactComponent","props","_super","_this","componentEl","__extends","class_1","componentDidUpdate","prevProps","Element","Object","keys","name","indexOf","substring","eventNameLc","attachProps","_a","children","forwardedRef","style","cProps","propsToPass","reduce","acc","type","setComponentElRef","React","Component","contextType","forwardRef","createForwardRef","loader","VertexAutoResizeTextarea","VertexAvatar","VertexAvatarGroup","VertexBadge","VertexBanner","VertexButton","VertexCard","VertexCardGroup","VertexChip","VertexClickToEditTextfield","VertexCollapsible","VertexColorCirclePicker","VertexColorPicker","VertexColorSwatch","VertexContextMenu","VertexDialog","VertexDraggablePopover","VertexDropdownMenu","VertexExpandable","VertexHelpTooltip","VertexIcon","VertexIconButton","VertexLogoLoading","VertexMenu","VertexMenuDivider","VertexMenuItem","VertexPopover","VertexRadio","VertexRadioGroup","VertexResizable","VertexResultList","VertexSearchBar","VertexSelect","VertexSlider","VertexSpinner","Vertex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sE,qBACrGoD,EAA0BpD,EAA4D,eACtFqD,EAA0CrD,EAA4F,kCACtIsD,EAAiCtD,EAA0E,sBAC3GuD,EAAuCvD,EAAsF,8BAC7HwD,EAAiCxD,EAA0E,uBAC3GyD,EAAiCzD,EAA0E,uBAC3G0D,EAAiC1D,EAA0E,uBAC3G2D,EAA4B3D,EAAgE,iBAC5F4D,EAAsC5D,EAAoF,4BAC1H6D,EAAkC7D,EAA4E,wBAC9G8D,EAAgC9D,EAAwE,qBACxG+D,EAAiC/D,EAA0E,uBAC3GgE,EAA0BhE,EAA4D,eACtFiE,EAAgCjE,EAAwE,sBACxGkE,EAAiClE,EAA0E,uBAC3GmE,EAA0BnE,EAA4D,eACtFoE,EAAiCpE,EAA0E,uBAC3GqE,EAA8BrE,EAAoE,oBAClGsE,EAA6BtE,EAAkE,kBAC/FuE,EAA2BvE,EAA8D,gBACzFwE,EAAgCxE,EAAwE,sBACxGyE,EAA+BzE,EAAsE,oBACrG0E,EAAgC1E,EAAwE,sBACxG2E,EAA+B3E,EAAsE,qBACrG4E,EAA4B5E,EAAgE,iBAC5F6E,EAA4B7E,EAAgE,iBAC5F8E,EAA6B9E,EAAkE,kBAC/F+E,EAAyB/E,EAA0D,cACnFgF,EAA0BhF,EAA4D,eACtFiF,EAA+BjF,EAAsE,oBACrGkF,EAA2BlF,EAA8D,gBACzFmF,EAA4BnF,EAAgE,iBAC5FoF,EAA6BpF,EAAkE"}
|
package/dist/bundle.esm.js
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import { __assign, __extends, __rest } from 'tslib';
|
|
2
|
-
import React, { createElement } from 'react';
|
|
3
|
-
import 'react-dom';
|
|
4
|
-
import { defineCustomElements } from '@vertexvis/ui/loader';
|
|
5
|
-
export * from '@vertexvis/ui/loader';
|
|
6
|
-
|
|
7
|
-
var dashToPascalCase = function (str) {
|
|
8
|
-
return str
|
|
9
|
-
.toLowerCase()
|
|
10
|
-
.split('-')
|
|
11
|
-
.map(function (segment) { return segment.charAt(0).toUpperCase() + segment.slice(1); })
|
|
12
|
-
.join('');
|
|
13
|
-
};
|
|
14
|
-
var camelToDashCase = function (str) { return str.replace(/([A-Z])/g, function (m) { return "-".concat(m[0].toLowerCase()); }); };
|
|
15
|
-
|
|
16
|
-
var attachProps = function (node, newProps, oldProps) {
|
|
17
|
-
if (oldProps === void 0) { oldProps = {}; }
|
|
18
|
-
// some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first
|
|
19
|
-
if (node instanceof Element) {
|
|
20
|
-
// add any classes in className to the class list
|
|
21
|
-
var className = getClassName(node.classList, newProps, oldProps);
|
|
22
|
-
if (className !== '') {
|
|
23
|
-
node.className = className;
|
|
24
|
-
}
|
|
25
|
-
Object.keys(newProps).forEach(function (name) {
|
|
26
|
-
if (name === 'children' ||
|
|
27
|
-
name === 'style' ||
|
|
28
|
-
name === 'ref' ||
|
|
29
|
-
name === 'class' ||
|
|
30
|
-
name === 'className' ||
|
|
31
|
-
name === 'forwardedRef') {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
35
|
-
var eventName = name.substring(2);
|
|
36
|
-
var eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
|
37
|
-
if (!isCoveredByReact(eventNameLc)) {
|
|
38
|
-
syncEvent(node, eventNameLc, newProps[name]);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
node[name] = newProps[name];
|
|
43
|
-
var propType = typeof newProps[name];
|
|
44
|
-
if (propType === 'string') {
|
|
45
|
-
node.setAttribute(camelToDashCase(name), newProps[name]);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
var getClassName = function (classList, newProps, oldProps) {
|
|
52
|
-
var newClassProp = newProps.className || newProps.class;
|
|
53
|
-
var oldClassProp = oldProps.className || oldProps.class;
|
|
54
|
-
// map the classes to Maps for performance
|
|
55
|
-
var currentClasses = arrayToMap(classList);
|
|
56
|
-
var incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
|
|
57
|
-
var oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
|
|
58
|
-
var finalClassNames = [];
|
|
59
|
-
// loop through each of the current classes on the component
|
|
60
|
-
// to see if it should be a part of the classNames added
|
|
61
|
-
currentClasses.forEach(function (currentClass) {
|
|
62
|
-
if (incomingPropClasses.has(currentClass)) {
|
|
63
|
-
// add it as its already included in classnames coming in from newProps
|
|
64
|
-
finalClassNames.push(currentClass);
|
|
65
|
-
incomingPropClasses.delete(currentClass);
|
|
66
|
-
}
|
|
67
|
-
else if (!oldPropClasses.has(currentClass)) {
|
|
68
|
-
// add it as it has NOT been removed by user
|
|
69
|
-
finalClassNames.push(currentClass);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
incomingPropClasses.forEach(function (s) { return finalClassNames.push(s); });
|
|
73
|
-
return finalClassNames.join(' ');
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Transforms a React event name to a browser event name.
|
|
77
|
-
*/
|
|
78
|
-
var transformReactEventName = function (eventNameSuffix) {
|
|
79
|
-
switch (eventNameSuffix) {
|
|
80
|
-
case 'doubleclick':
|
|
81
|
-
return 'dblclick';
|
|
82
|
-
}
|
|
83
|
-
return eventNameSuffix;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Checks if an event is supported in the current execution environment.
|
|
87
|
-
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
88
|
-
*/
|
|
89
|
-
var isCoveredByReact = function (eventNameSuffix) {
|
|
90
|
-
if (typeof document === 'undefined') {
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
var eventName = 'on' + transformReactEventName(eventNameSuffix);
|
|
95
|
-
var isSupported = eventName in document;
|
|
96
|
-
if (!isSupported) {
|
|
97
|
-
var element = document.createElement('div');
|
|
98
|
-
element.setAttribute(eventName, 'return;');
|
|
99
|
-
isSupported = typeof element[eventName] === 'function';
|
|
100
|
-
}
|
|
101
|
-
return isSupported;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
var syncEvent = function (node, eventName, newEventHandler) {
|
|
105
|
-
var eventStore = node.__events || (node.__events = {});
|
|
106
|
-
var oldEventHandler = eventStore[eventName];
|
|
107
|
-
// Remove old listener so they don't double up.
|
|
108
|
-
if (oldEventHandler) {
|
|
109
|
-
node.removeEventListener(eventName, oldEventHandler);
|
|
110
|
-
}
|
|
111
|
-
// Bind new listener.
|
|
112
|
-
node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {
|
|
113
|
-
if (newEventHandler) {
|
|
114
|
-
newEventHandler.call(this, e);
|
|
115
|
-
}
|
|
116
|
-
}));
|
|
117
|
-
};
|
|
118
|
-
var arrayToMap = function (arr) {
|
|
119
|
-
var map = new Map();
|
|
120
|
-
arr.forEach(function (s) { return map.set(s, s); });
|
|
121
|
-
return map;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
var setRef = function (ref, value) {
|
|
125
|
-
if (typeof ref === 'function') {
|
|
126
|
-
ref(value);
|
|
127
|
-
}
|
|
128
|
-
else if (ref != null) {
|
|
129
|
-
// Cast as a MutableRef so we can assign current
|
|
130
|
-
ref.current = value;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
var mergeRefs = function () {
|
|
134
|
-
var refs = [];
|
|
135
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
136
|
-
refs[_i] = arguments[_i];
|
|
137
|
-
}
|
|
138
|
-
return function (value) {
|
|
139
|
-
refs.forEach(function (ref) {
|
|
140
|
-
setRef(ref, value);
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
var createForwardRef = function (ReactComponent, displayName) {
|
|
145
|
-
var forwardRef = function (props, ref) {
|
|
146
|
-
return React.createElement(ReactComponent, __assign({}, props, { forwardedRef: ref }));
|
|
147
|
-
};
|
|
148
|
-
forwardRef.displayName = displayName;
|
|
149
|
-
return React.forwardRef(forwardRef);
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
var createReactComponent = function (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) {
|
|
153
|
-
if (defineCustomElement !== undefined) {
|
|
154
|
-
defineCustomElement();
|
|
155
|
-
}
|
|
156
|
-
var displayName = dashToPascalCase(tagName);
|
|
157
|
-
var ReactComponent = /** @class */ (function (_super) {
|
|
158
|
-
__extends(class_1, _super);
|
|
159
|
-
function class_1(props) {
|
|
160
|
-
var _this = _super.call(this, props) || this;
|
|
161
|
-
_this.setComponentElRef = function (element) {
|
|
162
|
-
_this.componentEl = element;
|
|
163
|
-
};
|
|
164
|
-
return _this;
|
|
165
|
-
}
|
|
166
|
-
class_1.prototype.componentDidMount = function () {
|
|
167
|
-
this.componentDidUpdate(this.props);
|
|
168
|
-
};
|
|
169
|
-
class_1.prototype.componentDidUpdate = function (prevProps) {
|
|
170
|
-
attachProps(this.componentEl, this.props, prevProps);
|
|
171
|
-
};
|
|
172
|
-
class_1.prototype.render = function () {
|
|
173
|
-
var _a = this.props, children = _a.children, forwardedRef = _a.forwardedRef, style = _a.style, className = _a.className, ref = _a.ref, cProps = __rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
|
|
174
|
-
var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
|
|
175
|
-
var value = cProps[name];
|
|
176
|
-
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
|
177
|
-
var eventName = name.substring(2).toLowerCase();
|
|
178
|
-
if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
|
|
179
|
-
acc[name] = value;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
// we should only render strings, booleans, and numbers as attrs in html.
|
|
184
|
-
// objects, functions, arrays etc get synced via properties on mount.
|
|
185
|
-
var type = typeof value;
|
|
186
|
-
if (type === 'string' || type === 'boolean' || type === 'number') {
|
|
187
|
-
acc[camelToDashCase(name)] = value;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
return acc;
|
|
191
|
-
}, {});
|
|
192
|
-
if (manipulatePropsFunction) {
|
|
193
|
-
propsToPass = manipulatePropsFunction(this.props, propsToPass);
|
|
194
|
-
}
|
|
195
|
-
var newProps = __assign(__assign({}, propsToPass), { ref: mergeRefs(forwardedRef, this.setComponentElRef), style: style });
|
|
196
|
-
/**
|
|
197
|
-
* We use createElement here instead of
|
|
198
|
-
* React.createElement to work around a
|
|
199
|
-
* bug in Vite (https://github.com/vitejs/vite/issues/6104).
|
|
200
|
-
* React.createElement causes all elements to be rendered
|
|
201
|
-
* as <tagname> instead of the actual Web Component.
|
|
202
|
-
*/
|
|
203
|
-
return createElement(tagName, newProps, children);
|
|
204
|
-
};
|
|
205
|
-
Object.defineProperty(class_1, "displayName", {
|
|
206
|
-
get: function () {
|
|
207
|
-
return displayName;
|
|
208
|
-
},
|
|
209
|
-
enumerable: false,
|
|
210
|
-
configurable: true
|
|
211
|
-
});
|
|
212
|
-
return class_1;
|
|
213
|
-
}(React.Component));
|
|
214
|
-
// If context was passed to createReactComponent then conditionally add it to the Component Class
|
|
215
|
-
if (ReactComponentContext) {
|
|
216
|
-
ReactComponent.contextType = ReactComponentContext;
|
|
217
|
-
}
|
|
218
|
-
return createForwardRef(ReactComponent, displayName);
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
/* eslint-disable */
|
|
222
|
-
defineCustomElements();
|
|
223
|
-
var VertexAutoResizeTextarea = /*@__PURE__*/ createReactComponent('vertex-auto-resize-textarea');
|
|
224
|
-
var VertexAvatar = /*@__PURE__*/ createReactComponent('vertex-avatar');
|
|
225
|
-
var VertexAvatarGroup = /*@__PURE__*/ createReactComponent('vertex-avatar-group');
|
|
226
|
-
var VertexBadge = /*@__PURE__*/ createReactComponent('vertex-badge');
|
|
227
|
-
var VertexBanner = /*@__PURE__*/ createReactComponent('vertex-banner');
|
|
228
|
-
var VertexButton = /*@__PURE__*/ createReactComponent('vertex-button');
|
|
229
|
-
var VertexCard = /*@__PURE__*/ createReactComponent('vertex-card');
|
|
230
|
-
var VertexCardGroup = /*@__PURE__*/ createReactComponent('vertex-card-group');
|
|
231
|
-
var VertexChip = /*@__PURE__*/ createReactComponent('vertex-chip');
|
|
232
|
-
var VertexClickToEditTextfield = /*@__PURE__*/ createReactComponent('vertex-click-to-edit-textfield');
|
|
233
|
-
var VertexCollapsible = /*@__PURE__*/ createReactComponent('vertex-collapsible');
|
|
234
|
-
var VertexColorCirclePicker = /*@__PURE__*/ createReactComponent('vertex-color-circle-picker');
|
|
235
|
-
var VertexColorPicker = /*@__PURE__*/ createReactComponent('vertex-color-picker');
|
|
236
|
-
var VertexColorSwatch = /*@__PURE__*/ createReactComponent('vertex-color-swatch');
|
|
237
|
-
var VertexContextMenu = /*@__PURE__*/ createReactComponent('vertex-context-menu');
|
|
238
|
-
var VertexDialog = /*@__PURE__*/ createReactComponent('vertex-dialog');
|
|
239
|
-
var VertexDraggablePopover = /*@__PURE__*/ createReactComponent('vertex-draggable-popover');
|
|
240
|
-
var VertexDropdownMenu = /*@__PURE__*/ createReactComponent('vertex-dropdown-menu');
|
|
241
|
-
var VertexExpandable = /*@__PURE__*/ createReactComponent('vertex-expandable');
|
|
242
|
-
var VertexHelpTooltip = /*@__PURE__*/ createReactComponent('vertex-help-tooltip');
|
|
243
|
-
var VertexIcon = /*@__PURE__*/ createReactComponent('vertex-icon');
|
|
244
|
-
var VertexIconButton = /*@__PURE__*/ createReactComponent('vertex-icon-button');
|
|
245
|
-
var VertexLogoLoading = /*@__PURE__*/ createReactComponent('vertex-logo-loading');
|
|
246
|
-
var VertexMenu = /*@__PURE__*/ createReactComponent('vertex-menu');
|
|
247
|
-
var VertexMenuDivider = /*@__PURE__*/ createReactComponent('vertex-menu-divider');
|
|
248
|
-
var VertexMenuItem = /*@__PURE__*/ createReactComponent('vertex-menu-item');
|
|
249
|
-
var VertexPopover = /*@__PURE__*/ createReactComponent('vertex-popover');
|
|
250
|
-
var VertexRadio = /*@__PURE__*/ createReactComponent('vertex-radio');
|
|
251
|
-
var VertexRadioGroup = /*@__PURE__*/ createReactComponent('vertex-radio-group');
|
|
252
|
-
var VertexResizable = /*@__PURE__*/ createReactComponent('vertex-resizable');
|
|
253
|
-
var VertexResultList = /*@__PURE__*/ createReactComponent('vertex-result-list');
|
|
254
|
-
var VertexSearchBar = /*@__PURE__*/ createReactComponent('vertex-search-bar');
|
|
255
|
-
var VertexSelect = /*@__PURE__*/ createReactComponent('vertex-select');
|
|
256
|
-
var VertexSlider = /*@__PURE__*/ createReactComponent('vertex-slider');
|
|
257
|
-
var VertexSpinner = /*@__PURE__*/ createReactComponent('vertex-spinner');
|
|
258
|
-
var VertexTab = /*@__PURE__*/ createReactComponent('vertex-tab');
|
|
259
|
-
var VertexTabs = /*@__PURE__*/ createReactComponent('vertex-tabs');
|
|
260
|
-
var VertexTextfield = /*@__PURE__*/ createReactComponent('vertex-textfield');
|
|
261
|
-
var VertexToast = /*@__PURE__*/ createReactComponent('vertex-toast');
|
|
262
|
-
var VertexToggle = /*@__PURE__*/ createReactComponent('vertex-toggle');
|
|
263
|
-
var VertexTooltip = /*@__PURE__*/ createReactComponent('vertex-tooltip');
|
|
264
|
-
|
|
265
|
-
export { VertexAutoResizeTextarea, VertexAvatar, VertexAvatarGroup, VertexBadge, VertexBanner, VertexButton, VertexCard, VertexCardGroup, VertexChip, VertexClickToEditTextfield, VertexCollapsible, VertexColorCirclePicker, VertexColorPicker, VertexColorSwatch, VertexContextMenu, VertexDialog, VertexDraggablePopover, VertexDropdownMenu, VertexExpandable, VertexHelpTooltip, VertexIcon, VertexIconButton, VertexLogoLoading, VertexMenu, VertexMenuDivider, VertexMenuItem, VertexPopover, VertexRadio, VertexRadioGroup, VertexResizable, VertexResultList, VertexSearchBar, VertexSelect, VertexSlider, VertexSpinner, VertexTab, VertexTabs, VertexTextfield, VertexToast, VertexToggle, VertexTooltip };
|
|
266
|
-
//# sourceMappingURL=bundle.esm.js.map
|
package/dist/bundle.esm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.esm.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/ui.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/ui';\n\nimport { defineCustomElements } from '@vertexvis/ui/loader';\n\ndefineCustomElements();\nexport const VertexAutoResizeTextarea = /*@__PURE__*/createReactComponent<JSX.VertexAutoResizeTextarea, HTMLVertexAutoResizeTextareaElement>('vertex-auto-resize-textarea');\nexport const VertexAvatar = /*@__PURE__*/createReactComponent<JSX.VertexAvatar, HTMLVertexAvatarElement>('vertex-avatar');\nexport const VertexAvatarGroup = /*@__PURE__*/createReactComponent<JSX.VertexAvatarGroup, HTMLVertexAvatarGroupElement>('vertex-avatar-group');\nexport const VertexBadge = /*@__PURE__*/createReactComponent<JSX.VertexBadge, HTMLVertexBadgeElement>('vertex-badge');\nexport const VertexBanner = /*@__PURE__*/createReactComponent<JSX.VertexBanner, HTMLVertexBannerElement>('vertex-banner');\nexport const VertexButton = /*@__PURE__*/createReactComponent<JSX.VertexButton, HTMLVertexButtonElement>('vertex-button');\nexport const VertexCard = /*@__PURE__*/createReactComponent<JSX.VertexCard, HTMLVertexCardElement>('vertex-card');\nexport const VertexCardGroup = /*@__PURE__*/createReactComponent<JSX.VertexCardGroup, HTMLVertexCardGroupElement>('vertex-card-group');\nexport const VertexChip = /*@__PURE__*/createReactComponent<JSX.VertexChip, HTMLVertexChipElement>('vertex-chip');\nexport const VertexClickToEditTextfield = /*@__PURE__*/createReactComponent<JSX.VertexClickToEditTextfield, HTMLVertexClickToEditTextfieldElement>('vertex-click-to-edit-textfield');\nexport const VertexCollapsible = /*@__PURE__*/createReactComponent<JSX.VertexCollapsible, HTMLVertexCollapsibleElement>('vertex-collapsible');\nexport const VertexColorCirclePicker = /*@__PURE__*/createReactComponent<JSX.VertexColorCirclePicker, HTMLVertexColorCirclePickerElement>('vertex-color-circle-picker');\nexport const VertexColorPicker = /*@__PURE__*/createReactComponent<JSX.VertexColorPicker, HTMLVertexColorPickerElement>('vertex-color-picker');\nexport const VertexColorSwatch = /*@__PURE__*/createReactComponent<JSX.VertexColorSwatch, HTMLVertexColorSwatchElement>('vertex-color-swatch');\nexport const VertexContextMenu = /*@__PURE__*/createReactComponent<JSX.VertexContextMenu, HTMLVertexContextMenuElement>('vertex-context-menu');\nexport const VertexDialog = /*@__PURE__*/createReactComponent<JSX.VertexDialog, HTMLVertexDialogElement>('vertex-dialog');\nexport const VertexDraggablePopover = /*@__PURE__*/createReactComponent<JSX.VertexDraggablePopover, HTMLVertexDraggablePopoverElement>('vertex-draggable-popover');\nexport const VertexDropdownMenu = /*@__PURE__*/createReactComponent<JSX.VertexDropdownMenu, HTMLVertexDropdownMenuElement>('vertex-dropdown-menu');\nexport const VertexExpandable = /*@__PURE__*/createReactComponent<JSX.VertexExpandable, HTMLVertexExpandableElement>('vertex-expandable');\nexport const VertexHelpTooltip = /*@__PURE__*/createReactComponent<JSX.VertexHelpTooltip, HTMLVertexHelpTooltipElement>('vertex-help-tooltip');\nexport const VertexIcon = /*@__PURE__*/createReactComponent<JSX.VertexIcon, HTMLVertexIconElement>('vertex-icon');\nexport const VertexIconButton = /*@__PURE__*/createReactComponent<JSX.VertexIconButton, HTMLVertexIconButtonElement>('vertex-icon-button');\nexport const VertexLogoLoading = /*@__PURE__*/createReactComponent<JSX.VertexLogoLoading, HTMLVertexLogoLoadingElement>('vertex-logo-loading');\nexport const VertexMenu = /*@__PURE__*/createReactComponent<JSX.VertexMenu, HTMLVertexMenuElement>('vertex-menu');\nexport const VertexMenuDivider = /*@__PURE__*/createReactComponent<JSX.VertexMenuDivider, HTMLVertexMenuDividerElement>('vertex-menu-divider');\nexport const VertexMenuItem = /*@__PURE__*/createReactComponent<JSX.VertexMenuItem, HTMLVertexMenuItemElement>('vertex-menu-item');\nexport const VertexPopover = /*@__PURE__*/createReactComponent<JSX.VertexPopover, HTMLVertexPopoverElement>('vertex-popover');\nexport const VertexRadio = /*@__PURE__*/createReactComponent<JSX.VertexRadio, HTMLVertexRadioElement>('vertex-radio');\nexport const VertexRadioGroup = /*@__PURE__*/createReactComponent<JSX.VertexRadioGroup, HTMLVertexRadioGroupElement>('vertex-radio-group');\nexport const VertexResizable = /*@__PURE__*/createReactComponent<JSX.VertexResizable, HTMLVertexResizableElement>('vertex-resizable');\nexport const VertexResultList = /*@__PURE__*/createReactComponent<JSX.VertexResultList, HTMLVertexResultListElement>('vertex-result-list');\nexport const VertexSearchBar = /*@__PURE__*/createReactComponent<JSX.VertexSearchBar, HTMLVertexSearchBarElement>('vertex-search-bar');\nexport const VertexSelect = /*@__PURE__*/createReactComponent<JSX.VertexSelect, HTMLVertexSelectElement>('vertex-select');\nexport const VertexSlider = /*@__PURE__*/createReactComponent<JSX.VertexSlider, HTMLVertexSliderElement>('vertex-slider');\nexport const VertexSpinner = /*@__PURE__*/createReactComponent<JSX.VertexSpinner, HTMLVertexSpinnerElement>('vertex-spinner');\nexport const VertexTab = /*@__PURE__*/createReactComponent<JSX.VertexTab, HTMLVertexTabElement>('vertex-tab');\nexport const VertexTabs = /*@__PURE__*/createReactComponent<JSX.VertexTabs, HTMLVertexTabsElement>('vertex-tabs');\nexport const VertexTextfield = /*@__PURE__*/createReactComponent<JSX.VertexTextfield, HTMLVertexTextfieldElement>('vertex-textfield');\nexport const VertexToast = /*@__PURE__*/createReactComponent<JSX.VertexToast, HTMLVertexToastElement>('vertex-toast');\nexport const VertexToggle = /*@__PURE__*/createReactComponent<JSX.VertexToggle, HTMLVertexToggleElement>('vertex-toggle');\nexport const VertexTooltip = /*@__PURE__*/createReactComponent<JSX.VertexTooltip, HTMLVertexTooltipElement>('vertex-tooltip');\n"],"names":[],"mappings":";;;;;;AAAO,IAAM,gBAAgB,GAAG,UAAC,GAAW;IAC1C,OAAA,GAAG;SACA,WAAW,EAAE;SACb,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,MAAM,CAAC,CAAC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B,CAAC;;;;"}
|
package/dist/bundle.esm.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{__assign as e,__extends as t,__rest as r}from"tslib";import n,{createElement as o}from"react";import"react-dom";import{defineCustomElements as i}from"@vertexvis/ui/loader";export*from"@vertexvis/ui/loader";var a=function(e){return e.replace(/([A-Z])/g,(function(e){return"-".concat(e[0].toLowerCase())}))},c=function(e,t,r){var n=t.className||t.class,o=r.className||r.class,i=f(e),a=f(n?n.split(" "):[]),c=f(o?o.split(" "):[]),s=[];return i.forEach((function(e){a.has(e)?(s.push(e),a.delete(e)):c.has(e)||s.push(e)})),a.forEach((function(e){return s.push(e)})),s.join(" ")},s=function(e){if("undefined"==typeof document)return!0;var t="on"+function(e){switch(e){case"doubleclick":return"dblclick"}return e}(e),r=t in document;if(!r){var n=document.createElement("div");n.setAttribute(t,"return;"),r="function"==typeof n[t]}return r},u=function(e,t,r){var n=e.__events||(e.__events={}),o=n[t];o&&e.removeEventListener(t,o),e.addEventListener(t,n[t]=function(e){r&&r.call(this,e)})},f=function(e){var t=new Map;return e.forEach((function(e){return t.set(e,e)})),t},v=function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)},l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){e.forEach((function(e){v(e,t)}))}},p=function(i,f,v,p){void 0!==p&&p();var d=i.toLowerCase().split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join(""),x=function(n){function f(e){var t=n.call(this,e)||this;return t.setComponentElRef=function(e){t.componentEl=e},t}return t(f,n),f.prototype.componentDidMount=function(){this.componentDidUpdate(this.props)},f.prototype.componentDidUpdate=function(e){!function(e,t,r){if(void 0===r&&(r={}),e instanceof Element){var n=c(e.classList,t,r);""!==n&&(e.className=n),Object.keys(t).forEach((function(r){if("children"!==r&&"style"!==r&&"ref"!==r&&"class"!==r&&"className"!==r&&"forwardedRef"!==r)if(0===r.indexOf("on")&&r[2]===r[2].toUpperCase()){var n=r.substring(2),o=n[0].toLowerCase()+n.substring(1);s(o)||u(e,o,t[r])}else{e[r]=t[r],"string"===typeof t[r]&&e.setAttribute(a(r),t[r])}}))}}(this.componentEl,this.props,e)},f.prototype.render=function(){var t=this.props,n=t.children,c=t.forwardedRef,u=t.style,f=(t.className,t.ref,r(t,["children","forwardedRef","style","className","ref"])),p=Object.keys(f).reduce((function(e,t){var r=f[t];if(0===t.indexOf("on")&&t[2]===t[2].toUpperCase()){var n=t.substring(2).toLowerCase();"undefined"!=typeof document&&s(n)&&(e[t]=r)}else{var o=typeof r;"string"!==o&&"boolean"!==o&&"number"!==o||(e[a(t)]=r)}return e}),{});v&&(p=v(this.props,p));var d=e(e({},p),{ref:l(c,this.setComponentElRef),style:u});return o(i,d,n)},Object.defineProperty(f,"displayName",{get:function(){return d},enumerable:!1,configurable:!0}),f}(n.Component);return f&&(x.contextType=f),function(t,r){var o=function(r,o){return n.createElement(t,e({},r,{forwardedRef:o}))};return o.displayName=r,n.forwardRef(o)}(x,d)};i();var d=p("vertex-auto-resize-textarea"),x=p("vertex-avatar"),m=p("vertex-avatar-group"),h=p("vertex-badge"),b=p("vertex-banner"),g=p("vertex-button"),y=p("vertex-card"),E=p("vertex-card-group"),w=p("vertex-chip"),C=p("vertex-click-to-edit-textfield"),N=p("vertex-collapsible"),k=p("vertex-color-circle-picker"),L=p("vertex-color-picker"),R=p("vertex-color-swatch"),j=p("vertex-context-menu"),O=p("vertex-dialog"),U=p("vertex-draggable-popover"),A=p("vertex-dropdown-menu"),_=p("vertex-expandable"),D=p("vertex-help-tooltip"),z=p("vertex-icon"),M=p("vertex-icon-button"),P=p("vertex-logo-loading"),T=p("vertex-menu"),Z=p("vertex-menu-divider"),q=p("vertex-menu-item"),B=p("vertex-popover"),F=p("vertex-radio"),G=p("vertex-radio-group"),H=p("vertex-resizable"),I=p("vertex-result-list"),J=p("vertex-search-bar"),K=p("vertex-select"),Q=p("vertex-slider"),S=p("vertex-spinner"),V=p("vertex-tab"),W=p("vertex-tabs"),X=p("vertex-textfield"),Y=p("vertex-toast"),$=p("vertex-toggle"),ee=p("vertex-tooltip");export{d as VertexAutoResizeTextarea,x as VertexAvatar,m as VertexAvatarGroup,h as VertexBadge,b as VertexBanner,g as VertexButton,y as VertexCard,E as VertexCardGroup,w as VertexChip,C as VertexClickToEditTextfield,N as VertexCollapsible,k as VertexColorCirclePicker,L as VertexColorPicker,R as VertexColorSwatch,j as VertexContextMenu,O as VertexDialog,U as VertexDraggablePopover,A as VertexDropdownMenu,_ as VertexExpandable,D as VertexHelpTooltip,z as VertexIcon,M as VertexIconButton,P as VertexLogoLoading,T as VertexMenu,Z as VertexMenuDivider,q as VertexMenuItem,B as VertexPopover,F as VertexRadio,G as VertexRadioGroup,H as VertexResizable,I as VertexResultList,J as VertexSearchBar,K as VertexSelect,Q as VertexSlider,S as VertexSpinner,V as VertexTab,W as VertexTabs,X as VertexTextfield,Y as VertexToast,$ as VertexToggle,ee as VertexTooltip};
|
|
2
|
-
//# sourceMappingURL=bundle.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.esm.min.js","sources":["../src/generated/react-component-lib/utils/case.ts","../src/generated/react-component-lib/utils/attachProps.ts","../src/generated/react-component-lib/utils/index.tsx","../src/generated/react-component-lib/createComponent.tsx","../src/generated/ui.ts"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps';\nexport * from './case';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib';\n\nimport type { JSX } from '@vertexvis/ui';\n\nimport { defineCustomElements } from '@vertexvis/ui/loader';\n\ndefineCustomElements();\nexport const VertexAutoResizeTextarea = /*@__PURE__*/createReactComponent<JSX.VertexAutoResizeTextarea, HTMLVertexAutoResizeTextareaElement>('vertex-auto-resize-textarea');\nexport const VertexAvatar = /*@__PURE__*/createReactComponent<JSX.VertexAvatar, HTMLVertexAvatarElement>('vertex-avatar');\nexport const VertexAvatarGroup = /*@__PURE__*/createReactComponent<JSX.VertexAvatarGroup, HTMLVertexAvatarGroupElement>('vertex-avatar-group');\nexport const VertexBadge = /*@__PURE__*/createReactComponent<JSX.VertexBadge, HTMLVertexBadgeElement>('vertex-badge');\nexport const VertexBanner = /*@__PURE__*/createReactComponent<JSX.VertexBanner, HTMLVertexBannerElement>('vertex-banner');\nexport const VertexButton = /*@__PURE__*/createReactComponent<JSX.VertexButton, HTMLVertexButtonElement>('vertex-button');\nexport const VertexCard = /*@__PURE__*/createReactComponent<JSX.VertexCard, HTMLVertexCardElement>('vertex-card');\nexport const VertexCardGroup = /*@__PURE__*/createReactComponent<JSX.VertexCardGroup, HTMLVertexCardGroupElement>('vertex-card-group');\nexport const VertexChip = /*@__PURE__*/createReactComponent<JSX.VertexChip, HTMLVertexChipElement>('vertex-chip');\nexport const VertexClickToEditTextfield = /*@__PURE__*/createReactComponent<JSX.VertexClickToEditTextfield, HTMLVertexClickToEditTextfieldElement>('vertex-click-to-edit-textfield');\nexport const VertexCollapsible = /*@__PURE__*/createReactComponent<JSX.VertexCollapsible, HTMLVertexCollapsibleElement>('vertex-collapsible');\nexport const VertexColorCirclePicker = /*@__PURE__*/createReactComponent<JSX.VertexColorCirclePicker, HTMLVertexColorCirclePickerElement>('vertex-color-circle-picker');\nexport const VertexColorPicker = /*@__PURE__*/createReactComponent<JSX.VertexColorPicker, HTMLVertexColorPickerElement>('vertex-color-picker');\nexport const VertexColorSwatch = /*@__PURE__*/createReactComponent<JSX.VertexColorSwatch, HTMLVertexColorSwatchElement>('vertex-color-swatch');\nexport const VertexContextMenu = /*@__PURE__*/createReactComponent<JSX.VertexContextMenu, HTMLVertexContextMenuElement>('vertex-context-menu');\nexport const VertexDialog = /*@__PURE__*/createReactComponent<JSX.VertexDialog, HTMLVertexDialogElement>('vertex-dialog');\nexport const VertexDraggablePopover = /*@__PURE__*/createReactComponent<JSX.VertexDraggablePopover, HTMLVertexDraggablePopoverElement>('vertex-draggable-popover');\nexport const VertexDropdownMenu = /*@__PURE__*/createReactComponent<JSX.VertexDropdownMenu, HTMLVertexDropdownMenuElement>('vertex-dropdown-menu');\nexport const VertexExpandable = /*@__PURE__*/createReactComponent<JSX.VertexExpandable, HTMLVertexExpandableElement>('vertex-expandable');\nexport const VertexHelpTooltip = /*@__PURE__*/createReactComponent<JSX.VertexHelpTooltip, HTMLVertexHelpTooltipElement>('vertex-help-tooltip');\nexport const VertexIcon = /*@__PURE__*/createReactComponent<JSX.VertexIcon, HTMLVertexIconElement>('vertex-icon');\nexport const VertexIconButton = /*@__PURE__*/createReactComponent<JSX.VertexIconButton, HTMLVertexIconButtonElement>('vertex-icon-button');\nexport const VertexLogoLoading = /*@__PURE__*/createReactComponent<JSX.VertexLogoLoading, HTMLVertexLogoLoadingElement>('vertex-logo-loading');\nexport const VertexMenu = /*@__PURE__*/createReactComponent<JSX.VertexMenu, HTMLVertexMenuElement>('vertex-menu');\nexport const VertexMenuDivider = /*@__PURE__*/createReactComponent<JSX.VertexMenuDivider, HTMLVertexMenuDividerElement>('vertex-menu-divider');\nexport const VertexMenuItem = /*@__PURE__*/createReactComponent<JSX.VertexMenuItem, HTMLVertexMenuItemElement>('vertex-menu-item');\nexport const VertexPopover = /*@__PURE__*/createReactComponent<JSX.VertexPopover, HTMLVertexPopoverElement>('vertex-popover');\nexport const VertexRadio = /*@__PURE__*/createReactComponent<JSX.VertexRadio, HTMLVertexRadioElement>('vertex-radio');\nexport const VertexRadioGroup = /*@__PURE__*/createReactComponent<JSX.VertexRadioGroup, HTMLVertexRadioGroupElement>('vertex-radio-group');\nexport const VertexResizable = /*@__PURE__*/createReactComponent<JSX.VertexResizable, HTMLVertexResizableElement>('vertex-resizable');\nexport const VertexResultList = /*@__PURE__*/createReactComponent<JSX.VertexResultList, HTMLVertexResultListElement>('vertex-result-list');\nexport const VertexSearchBar = /*@__PURE__*/createReactComponent<JSX.VertexSearchBar, HTMLVertexSearchBarElement>('vertex-search-bar');\nexport const VertexSelect = /*@__PURE__*/createReactComponent<JSX.VertexSelect, HTMLVertexSelectElement>('vertex-select');\nexport const VertexSlider = /*@__PURE__*/createReactComponent<JSX.VertexSlider, HTMLVertexSliderElement>('vertex-slider');\nexport const VertexSpinner = /*@__PURE__*/createReactComponent<JSX.VertexSpinner, HTMLVertexSpinnerElement>('vertex-spinner');\nexport const VertexTab = /*@__PURE__*/createReactComponent<JSX.VertexTab, HTMLVertexTabElement>('vertex-tab');\nexport const VertexTabs = /*@__PURE__*/createReactComponent<JSX.VertexTabs, HTMLVertexTabsElement>('vertex-tabs');\nexport const VertexTextfield = /*@__PURE__*/createReactComponent<JSX.VertexTextfield, HTMLVertexTextfieldElement>('vertex-textfield');\nexport const VertexToast = /*@__PURE__*/createReactComponent<JSX.VertexToast, HTMLVertexToastElement>('vertex-toast');\nexport const VertexToggle = /*@__PURE__*/createReactComponent<JSX.VertexToggle, HTMLVertexToggleElement>('vertex-toggle');\nexport const VertexTooltip = /*@__PURE__*/createReactComponent<JSX.VertexTooltip, HTMLVertexTooltipElement>('vertex-tooltip');\n"],"names":["camelToDashCase","str","replace","m","toLowerCase","getClassName","classList","newProps","oldProps","newClassProp","className","class","oldClassProp","currentClasses","arrayToMap","incomingPropClasses","split","oldPropClasses","finalClassNames","forEach","currentClass","has","push","delete","s","join","isCoveredByReact","eventNameSuffix","document","eventName","transformReactEventName","isSupported","element","createElement","setAttribute","syncEvent","node","newEventHandler","eventStore","__events","oldEventHandler","removeEventListener","addEventListener","e","call","this","arr","map","Map","set","setRef","ref","value","current","mergeRefs","_i","refs","createReactComponent","tagName","ReactComponentContext","manipulatePropsFunction","defineCustomElement","undefined","displayName","segment","charAt","toUpperCase","slice","ReactComponent","props","_super","_this","componentEl","__extends","class_1","componentDidUpdate","prevProps","Element","Object","keys","name","indexOf","substring","eventNameLc","attachProps","_a","children","forwardedRef","style","cProps","propsToPass","reduce","acc","type","setComponentElRef","React","Component","contextType","forwardRef","createForwardRef","defineCustomElements","VertexAutoResizeTextarea","VertexAvatar","VertexAvatarGroup","VertexBadge","VertexBanner","VertexButton","VertexCard","VertexCardGroup","VertexChip","VertexClickToEditTextfield","VertexCollapsible","VertexColorCirclePicker","VertexColorPicker","VertexColorSwatch","VertexContextMenu","VertexDialog","VertexDraggablePopover","VertexDropdownMenu","VertexExpandable","VertexHelpTooltip","VertexIcon","VertexIconButton","VertexLogoLoading","VertexMenu","VertexMenuDivider","VertexMenuItem","VertexPopover","VertexRadio","VertexRadioGroup","VertexResizable","VertexResultList","VertexSearchBar","VertexSelect","VertexSlider","VertexSpinner","VertexTab","VertexTabs","VertexTextfield","VertexToast","VertexToggle","VertexTooltip"],"mappings":"qNAAO,IAMMA,EAAkB,SAACC,GAAgB,OAAAA,EAAIC,QAAQ,YAAY,SAACC,GAAc,MAAA,WAAIA,EAAE,GAAGC,mBCkCnFC,EAAe,SAACC,EAAyBC,EAAeC,GACnE,IAAMC,EAAuBF,EAASG,WAAaH,EAASI,MACtDC,EAAuBJ,EAASE,WAAaF,EAASG,MAEtDE,EAAiBC,EAAWR,GAC5BS,EAAsBD,EAAWL,EAAeA,EAAaO,MAAM,KAAO,IAC1EC,EAAiBH,EAAWF,EAAeA,EAAaI,MAAM,KAAO,IACrEE,EAA4B,GAclC,OAXAL,EAAeM,SAAQ,SAACC,GAClBL,EAAoBM,IAAID,IAE1BF,EAAgBI,KAAKF,GACrBL,EAAoBQ,OAAOH,IACjBH,EAAeI,IAAID,IAE7BF,EAAgBI,KAAKF,MAGzBL,EAAoBI,SAAQ,SAACK,GAAM,OAAAN,EAAgBI,KAAKE,MACjDN,EAAgBO,KAAK,MAkBjBC,EAAmB,SAACC,GAC/B,GAAwB,oBAAbC,SACT,OAAO,EAEP,IAAMC,EAAY,KAhBiB,SAACF,GACtC,OAAQA,GACN,IAAK,cACH,MAAO,WAEX,OAAOA,EAWoBG,CAAwBH,GAC7CI,EAAcF,KAAaD,SAE/B,IAAKG,EAAa,CAChB,IAAMC,EAAUJ,SAASK,cAAc,OACvCD,EAAQE,aAAaL,EAAW,WAChCE,EAAqD,mBAA/BC,EAAgBH,GAGxC,OAAOE,GAIEI,EAAY,SACvBC,EACAP,EACAQ,GAEA,IAAMC,EAAaF,EAAKG,WAAaH,EAAKG,SAAW,IAC/CC,EAAkBF,EAAWT,GAG/BW,GACFJ,EAAKK,oBAAoBZ,EAAWW,GAItCJ,EAAKM,iBACHb,EACCS,EAAWT,GAAa,SAAiBc,GACpCN,GACFA,EAAgBO,KAAKC,KAA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AAgE,iBAC5FkD,EAA0BlD,EAA4D,eACtFmD,EAA+BnD,EAAsE,qBACrGoD,EAA0BpD,EAA4D,eACtFqD,EAA0CrD,EAA4F,kCACtIsD,EAAiCtD,EAA0E,sBAC3GuD,EAAuCvD,EAAsF,8BAC7HwD,EAAiCxD,EAA0E,uBAC3GyD,EAAiCzD,EAA0E,uBAC3G0D,EAAiC1D,EAA0E,uBAC3G2D,EAA4B3D,EAAgE,iBAC5F4D,EAAsC5D,EAAoF,4BAC1H6D,EAAkC7D,EAA4E,wBAC9G8D,EAAgC9D,EAAwE,qBACxG+D,EAAiC/D,EAA0E,uBAC3GgE,EAA0BhE,EAA4D,eACtFiE,EAAgCjE,EAAwE,sBACxGkE,EAAiClE,EAA0E,uBAC3GmE,EAA0BnE,EAA4D,eACtFoE,EAAiCpE,EAA0E,uBAC3GqE,EAA8BrE,EAAoE,oBAClGsE,EAA6BtE,EAAkE,kBAC/FuE,EAA2BvE,EAA8D,gBACzFwE,EAAgCxE,EAAwE,sBACxGyE,EAA+BzE,EAAsE,oBACrG0E,EAAgC1E,EAAwE,sBACxG2E,EAA+B3E,EAAsE,qBACrG4E,EAA4B5E,EAAgE,iBAC5F6E,EAA4B7E,EAAgE,iBAC5F8E,EAA6B9E,EAAkE,kBAC/F+E,EAAyB/E,EAA0D,cACnFgF,EAA0BhF,EAA4D,eACtFiF,EAA+BjF,EAAsE,oBACrGkF,EAA2BlF,EAA8D,gBACzFmF,EAA4BnF,EAAgE,iBAC5FoF,GAA6BpF,EAAkE"}
|
|
@@ -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> | undefined, manipulatePropsFunction?: ((originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes) | undefined, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import("./utils").StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
|
|
10
|
-
export {};
|
|
@@ -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> | undefined;
|
|
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
|
-
}
|