@leafygreen-ui/polymorphic
Advanced tools
Comparing version 1.3.1 to 1.3.2-next.0
# @leafygreen-ui/polymorphic | ||
## 1.3.2-next.0 | ||
### Patch Changes | ||
- b060d06ce: Updates story files for Storybook 7.x | ||
## 1.3.1 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import r,{forwardRef as n}from"react";var e=function(n,e){var t,o;return(o=1===n.length?n:r.forwardRef(n)).displayName=null!==(t=null!=e?e:n.displayName)&&void 0!==t?t:"PolymorphicComponent",o},t=function(n){return r.useRef(null)};function o(r){return r||"div"}function l(r){return{Component:o(r),ref:t()}}function i(r,n,e){var t;return e=null!==(t=e)&&void 0!==t?t:"div",r||("string"==typeof(null==n?void 0:n.href)?"a":e)}function u(r,n,e){return l(r=i(r,n,e))}function a(){return a=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},a.apply(this,arguments)}function f(r,n){if(null==r)return{};var e,t,o=function(r,n){if(null==r)return{};var e,t,o={},l=Object.keys(r);for(t=0;t<l.length;t++)e=l[t],n.indexOf(e)>=0||(o[e]=r[e]);return o}(r,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(t=0;t<l.length;t++)e=l[t],n.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(o[e]=r[e])}return o}var c=["as","children"],p=function(n,e){var t=n.as,o=n.children,i=f(n,c),u=l(t).Component;return r.createElement(u,a({},i,{ref:e}),o)},v=r.forwardRef(p);v.displayName="Polymorph";var y=function(r,e){var t,o=1===r.length?r:n(r);return o.displayName=null!==(t=null!=e?e:r.displayName)&&void 0!==t?t:"PolymorphicComponent",o};export{e as InferredPolymorphic,v as Polymorph,y as Polymorphic,u as useInferredPolymorphic,i as useInferredPolymorphicComponent,l as usePolymorphic,o as usePolymorphicComponent,t as usePolymorphicRef}; | ||
import n,{forwardRef as r}from"react";var e=function(r,e){var t,o;return(o=1===r.length?r:n.forwardRef(r)).displayName=null!==(t=null!=e?e:r.displayName)&&void 0!==t?t:"PolymorphicComponent",o},t=function(r){return n.useRef(null)};function o(n){return n||"div"}function l(n){return{Component:o(n),ref:t()}}function i(n,r,e){var t;return e=null!==(t=e)&&void 0!==t?t:"div",n||("string"==typeof(null==r?void 0:r.href)?"a":e)}function a(n,r,e){return l(n=i(n,r,e))}function u(){return u=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}return n},u.apply(this,arguments)}function f(n,r){if(null==n)return{};var e,t,o=function(n,r){if(null==n)return{};var e,t,o={},l=Object.keys(n);for(t=0;t<l.length;t++)e=l[t],r.indexOf(e)>=0||(o[e]=n[e]);return o}(n,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(t=0;t<l.length;t++)e=l[t],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}var c=["as","children"],p=function(r,e){var t=r.as,o=r.children,i=f(r,c),a=l(t).Component;return n.createElement(a,u({},i,{ref:e}),o)},s=n.forwardRef(p);s.displayName="Polymorph";var v=function(n,e){var t,o=1===n.length?n:r(n);return o.displayName=null!==(t=null!=e?e:n.displayName)&&void 0!==t?t:"PolymorphicComponent",o};export{e as InferredPolymorphic,s as Polymorph,v as Polymorphic,a as useInferredPolymorphic,i as useInferredPolymorphicComponent,l as usePolymorphic,o as usePolymorphicComponent,t as usePolymorphicRef}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/polymorphic"]={},e.React)}(this,(function(e,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(r),t=function(e){return o.default.useRef(null)};function l(e){return e||"div"}function i(e){return{Component:l(e),ref:t()}}function u(e,r,n){var o;return n=null!==(o=n)&&void 0!==o?o:"div",e||("string"==typeof(null==r?void 0:r.href)?"a":n)}function f(){return f=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},f.apply(this,arguments)}function a(e,r){if(null==e)return{};var n,o,t=function(e,r){if(null==e)return{};var n,o,t={},l=Object.keys(e);for(o=0;o<l.length;o++)n=l[o],r.indexOf(n)>=0||(t[n]=e[n]);return t}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)n=l[o],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var p=["as","children"],c=function(e,r){var n=e.as,t=e.children,l=a(e,p),u=i(n).Component;return o.default.createElement(u,f({},l,{ref:r}),t)},d=o.default.forwardRef(c);d.displayName="Polymorph";e.InferredPolymorphic=function(e,r){var n,t;return(t=1===e.length?e:o.default.forwardRef(e)).displayName=null!==(n=null!=r?r:e.displayName)&&void 0!==n?n:"PolymorphicComponent",t},e.Polymorph=d,e.Polymorphic=function(e,n){var o,t=1===e.length?e:r.forwardRef(e);return t.displayName=null!==(o=null!=n?n:e.displayName)&&void 0!==o?o:"PolymorphicComponent",t},e.useInferredPolymorphic=function(e,r,n){return i(e=u(e,r,n))},e.useInferredPolymorphicComponent=u,e.usePolymorphic=i,e.usePolymorphicComponent=l,e.usePolymorphicRef=t,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/polymorphic"]={},e.React)}(this,(function(e,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(n),t=function(e){return o.default.useRef(null)};function l(e){return e||"div"}function i(e){return{Component:l(e),ref:t()}}function u(e,n,r){var o;return r=null!==(o=r)&&void 0!==o?o:"div",e||("string"==typeof(null==n?void 0:n.href)?"a":r)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},f.apply(this,arguments)}function a(e,n){if(null==e)return{};var r,o,t=function(e,n){if(null==e)return{};var r,o,t={},l=Object.keys(e);for(o=0;o<l.length;o++)r=l[o],n.indexOf(r)>=0||(t[r]=e[r]);return t}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)r=l[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}var c=["as","children"],p=function(e,n){var r=e.as,t=e.children,l=a(e,c),u=i(r).Component;return o.default.createElement(u,f({},l,{ref:n}),t)},d=o.default.forwardRef(p);d.displayName="Polymorph";e.InferredPolymorphic=function(e,n){var r,t;return(t=1===e.length?e:o.default.forwardRef(e)).displayName=null!==(r=null!=n?n:e.displayName)&&void 0!==r?r:"PolymorphicComponent",t},e.Polymorph=d,e.Polymorphic=function(e,r){var o,t=1===e.length?e:n.forwardRef(e);return t.displayName=null!==(o=null!=r?r:e.displayName)&&void 0!==o?o:"PolymorphicComponent",t},e.useInferredPolymorphic=function(e,n,r){return i(e=u(e,n,r))},e.useInferredPolymorphicComponent=u,e.usePolymorphic=i,e.usePolymorphicComponent=l,e.usePolymorphicRef=t,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@leafygreen-ui/polymorphic", | ||
"version": "1.3.1", | ||
"version": "1.3.2-next.0", | ||
"description": "LeafyGreen UI Kit Polymorphic", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
202806
3408
2