@department-of-veterans-affairs/component-library 54.4.1 → 54.4.2
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/Modal.js +1 -1
- package/Modal.unit.spec.js +1 -1
- package/contacts.js +1 -1
- package/dist/1339.app.bundle.js +1 -1
- package/dist/1351.app.bundle.js +1 -1
- package/dist/2387.app.bundle.js +1 -1
- package/dist/2654.app.bundle.js +1 -1
- package/dist/2664.app.bundle.js +1 -1
- package/dist/2801.app.bundle.js +1 -1
- package/dist/3126.app.bundle.js +1 -1
- package/dist/4064.app.bundle.js +1 -1
- package/dist/4117.app.bundle.js +1 -1
- package/dist/4140.app.bundle.js +1 -1
- package/dist/4708.app.bundle.js +1 -1
- package/dist/4715.app.bundle.js +1 -1
- package/dist/5019.app.bundle.js +1 -1
- package/dist/5155.app.bundle.js +1 -1
- package/dist/5189.app.bundle.js +1 -1
- package/dist/5306.app.bundle.js +1 -1
- package/dist/5699.app.bundle.js +1 -1
- package/dist/6034.app.bundle.js +1 -1
- package/dist/6246.app.bundle.js +1 -1
- package/dist/6349.app.bundle.js +1 -1
- package/dist/641.app.bundle.js +1 -1
- package/dist/6527.app.bundle.js +1 -1
- package/dist/6633.app.bundle.js +1 -1
- package/dist/6683.app.bundle.js +1 -1
- package/dist/6771.app.bundle.js +1 -1
- package/dist/712.app.bundle.js +1 -1
- package/dist/7367.app.bundle.js +1 -1
- package/dist/7531.app.bundle.js +1 -1
- package/dist/7663.app.bundle.js +1 -1
- package/dist/7814.app.bundle.js +1 -1
- package/dist/7821.app.bundle.js +1 -1
- package/dist/8175.app.bundle.js +1 -1
- package/dist/82.app.bundle.js +1 -1
- package/dist/8206.app.bundle.js +1 -1
- package/dist/8495.app.bundle.js +1 -1
- package/dist/8762.app.bundle.js +1 -1
- package/dist/8859.app.bundle.js +1 -1
- package/dist/890.app.bundle.js +1 -1
- package/dist/9288.app.bundle.js +1 -1
- package/dist/9755.app.bundle.js +1 -1
- package/dist/9794.app.bundle.js +1 -1
- package/dist/9800.app.bundle.js +1 -1
- package/dist/9915.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-0311e4e3.js +1 -0
- package/dist/components/p-067d7618.js +1 -0
- package/dist/components/p-3962731f.js +1 -0
- package/dist/components/p-40738d84.js +1 -0
- package/dist/components/p-494b538e.js +1 -0
- package/dist/components/p-6a3cf3d7.js +1 -0
- package/dist/components/p-6b349d85.js +1 -0
- package/dist/components/p-6e4b9401.js +1 -0
- package/dist/components/p-70a619e9.js +1 -0
- package/dist/components/p-7129443f.js +1 -0
- package/dist/components/p-784bed9b.js +1 -0
- package/dist/components/p-a12014b1.js +1 -0
- package/dist/components/{index2.js → p-a5dce9e6.js} +1 -1
- package/dist/components/p-a836c3e1.js +1 -0
- package/dist/components/{parsePhoneNumber_.js → p-b276cef8.js} +1 -1
- package/dist/components/p-b92d2c38.js +1 -0
- package/dist/components/p-bac94659.js +1 -0
- package/dist/components/p-bea05aab.js +1 -0
- package/dist/components/p-c3fdb782.js +1 -0
- package/dist/components/p-ce1b8abc.js +1 -0
- package/dist/components/p-cf580be9.js +1 -0
- package/dist/components/p-d20739b4.js +20 -0
- package/dist/components/p-d4b7abf9.js +1 -0
- package/dist/components/p-d9f21f0d.js +1 -0
- package/dist/components/p-dffbc03b.js +1 -0
- package/dist/components/p-e1092a04.js +1 -0
- package/dist/components/p-ef5c0d66.js +1 -0
- package/dist/components/p-f3a1dcd5.js +1 -0
- package/dist/components/p-fda59844.js +1 -0
- package/dist/components/types/index.d.ts +2 -0
- package/dist/components/va-accordion-item.js +1 -1
- package/dist/components/va-accordion.js +1 -1
- package/dist/components/va-additional-info.js +1 -1
- package/dist/components/va-alert-expandable.js +1 -1
- package/dist/components/va-alert-sign-in.js +1 -1
- package/dist/components/va-alert.js +1 -1
- package/dist/components/va-back-to-top.js +1 -1
- package/dist/components/va-banner.js +1 -1
- package/dist/components/va-breadcrumbs.js +1 -1
- package/dist/components/va-button-icon.js +1 -1
- package/dist/components/va-button-pair.js +1 -1
- package/dist/components/va-button-segmented.js +1 -1
- package/dist/components/va-button.js +1 -1
- package/dist/components/va-card.js +1 -1
- package/dist/components/va-checkbox-group.js +1 -1
- package/dist/components/va-checkbox.js +1 -1
- package/dist/components/va-combo-box.js +1 -1
- package/dist/components/va-crisis-line-modal.js +1 -1
- package/dist/components/va-critical-action.js +1 -1
- package/dist/components/va-date.js +1 -1
- package/dist/components/va-file-input-multiple.js +1 -1
- package/dist/components/va-file-input.js +1 -1
- package/dist/components/va-header-minimal.js +1 -1
- package/dist/components/va-icon.js +1 -1
- package/dist/components/va-language-toggle.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-link.js +1 -1
- package/dist/components/va-loading-indicator.js +1 -1
- package/dist/components/va-maintenance-banner.js +1 -1
- package/dist/components/va-memorable-date.js +1 -1
- package/dist/components/va-minimal-footer.js +1 -1
- package/dist/components/va-modal.js +1 -1
- package/dist/components/va-need-help.js +1 -1
- package/dist/components/va-notification.js +1 -1
- package/dist/components/va-official-gov-banner.js +1 -1
- package/dist/components/va-omb-info.js +1 -1
- package/dist/components/va-on-this-page.js +1 -1
- package/dist/components/va-pagination.js +1 -1
- package/dist/components/va-privacy-agreement.js +1 -1
- package/dist/components/va-process-list-item.js +1 -1
- package/dist/components/va-process-list.js +1 -1
- package/dist/components/va-progress-bar.js +1 -1
- package/dist/components/va-promo-banner.js +1 -1
- package/dist/components/va-radio-option.js +1 -1
- package/dist/components/va-radio.js +1 -1
- package/dist/components/va-search-filter.js +1 -1
- package/dist/components/va-search-input.js +1 -1
- package/dist/components/va-segmented-progress-bar.js +1 -1
- package/dist/components/va-select.js +1 -1
- package/dist/components/va-service-list-item.js +1 -1
- package/dist/components/va-sidenav-item.js +1 -1
- package/dist/components/va-sidenav-submenu.js +1 -1
- package/dist/components/va-sidenav.js +1 -1
- package/dist/components/va-statement-of-truth.js +1 -1
- package/dist/components/va-summary-box.js +1 -1
- package/dist/components/va-tab-item.js +1 -1
- package/dist/components/va-tab-panel.js +1 -1
- package/dist/components/va-table-inner.js +1 -1
- package/dist/components/va-table-row.js +1 -1
- package/dist/components/va-table.js +1 -1
- package/dist/components/va-tabs.js +1 -1
- package/dist/components/va-tag-status.js +1 -1
- package/dist/components/va-telephone-input.js +1 -1
- package/dist/components/va-telephone.js +1 -1
- package/dist/components/va-text-input.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/dist/react-bindings/components.d.ts +336 -0
- package/dist/react-bindings/components.js +1 -0
- package/dist/react-bindings/components.js.map +1 -0
- package/dist/react-bindings/components.ts +961 -0
- package/dist/react-bindings/index.d.ts +6 -67
- package/dist/react-bindings/index.js +1 -1
- package/dist/react-bindings/index.js.map +1 -1
- package/dist/react-bindings/index.ts +6 -75
- package/format-date.js +1 -1
- package/format-date.unit.spec.js +1 -1
- package/package.json +3 -2
- package/test-helpers.js +1 -1
- package/utilities.unit.spec.js +1 -1
- package/validations.js +1 -1
- package/dist/components/contacts.js +0 -1
- package/dist/components/date-utils.js +0 -1
- package/dist/components/i18next.js +0 -1
- package/dist/components/utils.js +0 -1
- package/dist/components/va-accordion-item2.js +0 -1
- package/dist/components/va-accordion2.js +0 -1
- package/dist/components/va-alert2.js +0 -1
- package/dist/components/va-button-icon2.js +0 -1
- package/dist/components/va-button2.js +0 -1
- package/dist/components/va-card2.js +0 -1
- package/dist/components/va-checkbox-group2.js +0 -1
- package/dist/components/va-checkbox2.js +0 -1
- package/dist/components/va-combo-box2.js +0 -20
- package/dist/components/va-crisis-line-modal2.js +0 -1
- package/dist/components/va-critical-action2.js +0 -1
- package/dist/components/va-file-input2.js +0 -1
- package/dist/components/va-icon2.js +0 -1
- package/dist/components/va-link2.js +0 -1
- package/dist/components/va-modal2.js +0 -1
- package/dist/components/va-official-gov-banner2.js +0 -1
- package/dist/components/va-progress-bar2.js +0 -1
- package/dist/components/va-select2.js +0 -1
- package/dist/components/va-table-inner2.js +0 -1
- package/dist/components/va-telephone2.js +0 -1
- package/dist/components/va-text-input2.js +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.d.ts +0 -10
- package/dist/react-bindings/react-component-lib/createComponent.js +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.js.map +0 -1
- package/dist/react-bindings/react-component-lib/createComponent.tsx +0 -106
- package/dist/react-bindings/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/dist/react-bindings/react-component-lib/createOverlayComponent.js +0 -1
- package/dist/react-bindings/react-component-lib/createOverlayComponent.js.map +0 -1
- package/dist/react-bindings/react-component-lib/createOverlayComponent.tsx +0 -142
- package/dist/react-bindings/react-component-lib/index.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/index.js +0 -1
- package/dist/react-bindings/react-component-lib/index.js.map +0 -1
- package/dist/react-bindings/react-component-lib/index.ts +0 -2
- package/dist/react-bindings/react-component-lib/interfaces.d.ts +0 -29
- package/dist/react-bindings/react-component-lib/interfaces.js +0 -1
- package/dist/react-bindings/react-component-lib/interfaces.js.map +0 -1
- package/dist/react-bindings/react-component-lib/interfaces.ts +0 -34
- package/dist/react-bindings/react-component-lib/utils/attachProps.d.ts +0 -16
- package/dist/react-bindings/react-component-lib/utils/attachProps.js +0 -2
- package/dist/react-bindings/react-component-lib/utils/attachProps.js.LICENSE.txt +0 -4
- package/dist/react-bindings/react-component-lib/utils/attachProps.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/attachProps.ts +0 -125
- package/dist/react-bindings/react-component-lib/utils/case.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/utils/case.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/case.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/case.ts +0 -7
- package/dist/react-bindings/react-component-lib/utils/dev.d.ts +0 -2
- package/dist/react-bindings/react-component-lib/utils/dev.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/dev.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/dev.ts +0 -14
- package/dist/react-bindings/react-component-lib/utils/index.d.ts +0 -10
- package/dist/react-bindings/react-component-lib/utils/index.js +0 -1
- package/dist/react-bindings/react-component-lib/utils/index.js.map +0 -1
- package/dist/react-bindings/react-component-lib/utils/index.tsx +0 -50
- /package/dist/components/{index2.js.LICENSE.txt → p-a5dce9e6.js.LICENSE.txt} +0 -0
- /package/dist/components/{va-combo-box2.js.LICENSE.txt → p-d20739b4.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.camelToDashCase=exports.dashToPascalCase=void 0;var dashToPascalCase=function(a){return a.toLowerCase().split("-").map((function(a){return a.charAt(0).toUpperCase()+a.slice(1)})).join("")};exports.dashToPascalCase=dashToPascalCase;var camelToDashCase=function(a){return a.replace(/([A-Z])/g,(function(a){return"-".concat(a[0].toLowerCase())}))};exports.camelToDashCase=camelToDashCase;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"case.js","sourceRoot":"","sources":["case.ts"],"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,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAlD,CAAkD,CAAC;SACpE,IAAI,CAAC,EAAE,CAAC;AAJX,CAIW,CAAC;AALD,QAAA,gBAAgB,oBAKf;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,EAAxB,CAAwB,CAAC,EAAhE,CAAgE,CAAC;AAApG,QAAA,eAAe,mBAAqF"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const dashToPascalCase = (str: string) =>
|
|
2
|
-
str
|
|
3
|
-
.toLowerCase()
|
|
4
|
-
.split('-')
|
|
5
|
-
.map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
|
|
6
|
-
.join('');
|
|
7
|
-
export const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.deprecationWarning=exports.isDevMode=void 0;var isDevMode=function(){return process&&process.env&&"development"===process.env.NODE_ENV};exports.isDevMode=isDevMode;var warnings={},deprecationWarning=function(e,n){(0,exports.isDevMode)()&&(warnings[e]||(console.warn(n),warnings[e]=!0))};exports.deprecationWarning=deprecationWarning;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev.js","sourceRoot":"","sources":["dev.ts"],"names":[],"mappings":";;;AAAO,IAAM,SAAS,GAAG;IACvB,OAAO,OAAO,IAAI,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAC1E,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEF,IAAM,QAAQ,GAA+B,EAAE,CAAC;AAEzC,IAAM,kBAAkB,GAAG,UAAC,GAAW,EAAE,OAAe;IAC7D,IAAI,IAAA,iBAAS,GAAE,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACtB,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACvB,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const isDevMode = () => {
|
|
2
|
-
return process && process.env && process.env.NODE_ENV === 'development';
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
const warnings: { [key: string]: boolean } = {};
|
|
6
|
-
|
|
7
|
-
export const deprecationWarning = (key: string, message: string) => {
|
|
8
|
-
if (isDevMode()) {
|
|
9
|
-
if (!warnings[key]) {
|
|
10
|
-
console.warn(message);
|
|
11
|
-
warnings[key] = true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleReactProps } from '../interfaces';
|
|
3
|
-
export type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
|
|
4
|
-
export type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
|
|
5
|
-
export declare const setRef: (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => void;
|
|
6
|
-
export declare const mergeRefs: (...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]) => React.RefCallback<any>;
|
|
7
|
-
export declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<PropType & Omit<React.HTMLAttributes<ElementType>, "style"> & StyleReactProps> & React.RefAttributes<ElementType>>;
|
|
8
|
-
export declare const defineCustomElement: (tagName: string, customElement: any) => void;
|
|
9
|
-
export * from './attachProps';
|
|
10
|
-
export * from './case';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)},__createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||__createBinding(t,e,r)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.defineCustomElement=exports.createForwardRef=exports.mergeRefs=exports.setRef=void 0;var react_1=__importDefault(require("react")),setRef=function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)};exports.setRef=setRef;var mergeRefs=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){e.forEach((function(e){(0,exports.setRef)(e,t)}))}};exports.mergeRefs=mergeRefs;var createForwardRef=function(e,t){var r=function(t,r){return react_1.default.createElement(e,__assign({},t,{forwardedRef:r}))};return r.displayName=t,react_1.default.forwardRef(r)};exports.createForwardRef=createForwardRef;var defineCustomElement=function(e,t){void 0===t||"undefined"==typeof customElements||customElements.get(e)||customElements.define(e,t)};exports.defineCustomElement=defineCustomElement,__exportStar(require("./attachProps"),exports),__exportStar(require("./case"),exports);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAWnB,IAAM,MAAM,GAAG,UAAC,GAA+D,EAAE,KAAU;IAChG,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;QAC9B,GAAG,CAAC,KAAK,CAAC,CAAC;IACb,CAAC;SAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,gDAAgD;QAC/C,GAAmC,CAAC,OAAO,GAAG,KAAK,CAAC;IACvD,CAAC;AACH,CAAC,CAAC;AAPW,QAAA,MAAM,UAOjB;AAEK,IAAM,SAAS,GAAG;IACvB,cAAuE;SAAvE,UAAuE,EAAvE,qBAAuE,EAAvE,IAAuE;QAAvE,yBAAuE;;IAEvE,OAAO,UAAC,KAAU;QAChB,IAAI,CAAC,OAAO,CAAC,UAAC,GAAG;YACf,IAAA,cAAM,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,SAAS,aAQpB;AAEK,IAAM,gBAAgB,GAAG,UAAwB,cAAmB,EAAE,WAAmB;IAC9F,IAAM,UAAU,GAAG,UACjB,KAAuD,EACvD,GAA0C;QAE1C,OAAO,8BAAC,cAAc,eAAK,KAAK,IAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAC1D,CAAC,CAAC;IACF,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;IAErC,OAAO,eAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,IAAM,mBAAmB,GAAG,UAAC,OAAe,EAAE,aAAkB;IACrE,IAAI,aAAa,KAAK,SAAS,IAAI,OAAO,cAAc,KAAK,WAAW,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QACzG,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAChD,CAAC;AACH,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B;AAEF,gDAA8B;AAC9B,yCAAuB"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import type { StyleReactProps } from '../interfaces';
|
|
4
|
-
|
|
5
|
-
export type StencilReactExternalProps<PropType, ElementType> = PropType &
|
|
6
|
-
Omit<React.HTMLAttributes<ElementType>, 'style'> &
|
|
7
|
-
StyleReactProps;
|
|
8
|
-
|
|
9
|
-
// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17
|
|
10
|
-
export type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
|
|
11
|
-
|
|
12
|
-
export const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {
|
|
13
|
-
if (typeof ref === 'function') {
|
|
14
|
-
ref(value);
|
|
15
|
-
} else if (ref != null) {
|
|
16
|
-
// Cast as a MutableRef so we can assign current
|
|
17
|
-
(ref as React.MutableRefObject<any>).current = value;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const mergeRefs = (
|
|
22
|
-
...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]
|
|
23
|
-
): React.RefCallback<any> => {
|
|
24
|
-
return (value: any) => {
|
|
25
|
-
refs.forEach((ref) => {
|
|
26
|
-
setRef(ref, value);
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {
|
|
32
|
-
const forwardRef = (
|
|
33
|
-
props: StencilReactExternalProps<PropType, ElementType>,
|
|
34
|
-
ref: StencilReactForwardedRef<ElementType>
|
|
35
|
-
) => {
|
|
36
|
-
return <ReactComponent {...props} forwardedRef={ref} />;
|
|
37
|
-
};
|
|
38
|
-
forwardRef.displayName = displayName;
|
|
39
|
-
|
|
40
|
-
return React.forwardRef(forwardRef);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const defineCustomElement = (tagName: string, customElement: any) => {
|
|
44
|
-
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
45
|
-
customElements.define(tagName, customElement);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export * from './attachProps';
|
|
50
|
-
export * from './case';
|
|
File without changes
|
|
File without changes
|