Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/lib

Package Overview
Dependencies
Maintainers
6
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/lib - npm Package Compare versions

Comparing version 10.3.4-next.7 to 10.3.4

28

CHANGELOG.md
# @leafygreen-ui/lib
## 10.3.4-next.7
## 10.3.4
### Patch Changes
- b060d06ce: Updates story files for Storybook 7.x
- b060d06ce: Exports primary component props
- d2ce54e2f: Updates story files for Storybook 7.x
- d2ce54e2f: Exports primary component props
- 0cd471676: Updates `isComponentType` to also check for a displayName inside render
## 10.3.4-next.6
### Patch Changes
- b060d06ce: Updates story files for Storybook 7.x
- b060d06ce: Exports primary component props
## 10.3.4-next.5
### Patch Changes
- b060d06ce: Updates story files for Storybook 7.x
- b060d06ce: Exports primary component props
## 10.3.4-next.0
### Patch Changes
- b060d06ce: Updates story files for Storybook 7.x
- b060d06ce: Exports primary component props
## 10.3.3

@@ -32,0 +12,0 @@

2

dist/esm/index.js

@@ -1,2 +0,2 @@

import e from"lodash/once";import n from"lodash/isUndefined";import t from"react";import r from"lodash/mergeWith";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,n,t){return n=function(e){var n=function(e,n){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return l(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function c(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var u=Object.freeze({__proto__:null,element:c,button:function(e){return c(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return c(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}}),s=function(e){var n,t,r=(null!==(n=null===(t=p.get(e))||void 0===t?void 0:t.length)&&void 0!==n?n:0).toString().padStart(4,"0");return"lg-ui".concat(e?"-".concat(e):"","-").concat(r)},p=new Map,d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=s(e);if(p.has(e)){var t=p.get(e);p.set(e,[n].concat(i(t)))}else p.set(e,[n]);return n};function f(e){return"string"==typeof(n=e)||"number"==typeof n?e.toString().trim():Array.isArray(e)?e.map(f).join(" ").trim():function(e){return e&&"object"===o(e)&&e.props}(e)?f(e.props.children):"";var n}var m={Light:"light",Dark:"dark"},b=function(e){return e?m.Dark:m.Light};function y(e){return 1==new Set(e).size}var h=function(e,r){var o,a=null===(o=t.Children.map(e,(function(e){if(r.some((function(n){return P(e,n)})))return e})))||void 0===o?void 0:o.filter((function(e){return!n(e)}));return n(e)||(null==a?void 0:a.length)===t.Children.count(e)||D.error("Children must be one of: ".concat(r.join(", ")),"Received children: ",e),a},v=function(e,n){Object.defineProperty(e,"target",{writable:!1,value:n});var t=!1,r=!1;return{nativeEvent:e,currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,preventDefault:function(){t=!0,e.preventDefault()},isDefaultPrevented:function(){return t},stopPropagation:function(){r=!0,e.stopPropagation()},isPropagationStopped:function(){return r},persist:function(){},timeStamp:e.timeStamp,type:e.type}},g=["small","button","a","abbr","address","article","aside","b","big","blockquote","caption","cite","code","dd","del","details","dfn","dialog","div","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","i","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noscript","ol","p","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","template","tbody","td","tfoot","th","thead","time","title","tr","u","ul"],S={baseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component",control:{type:"radio"},options:[14,16]},updatedBaseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component. Uses the updated font size values for Euclid Circular A.",control:{type:"radio"},options:[13,16]},darkMode:{description:"Render the component in dark mode.",control:"boolean"},children:{description:"Element rendered inside the component",control:"text"},as:{description:"The component will be rendered in HTML as the element selected here",options:g,type:{name:"string"},control:{type:"select"},defaultValue:"button"}},C={"aria-controls":{control:"none"},"aria-describedby":{control:"none"},"aria-label":{control:"none"},"aria-labelledby":{control:"none"},className:{control:"none"},id:{control:"none"},onBlur:{control:"none"},onCancel:{control:"none"},onChange:{control:"none"},onClear:{control:"none"},onClick:{control:"none"},onClose:{control:"none"},onConfirm:{control:"none"},onDismiss:{control:"none"},onFilter:{control:"none"},onSubmit:{control:"none"},portalClassName:{control:"none"},portalContainer:{control:"none"},popoverZIndex:{control:"none"},ref:{control:"none"},scrollContainer:{control:"none"},usePortal:{control:"none"}},w=["aria-controls","aria-describedby","aria-label","aria-labelledby","onBlur","onCancel","onChange","onClear","onClick","onConfirm","onDismiss","onFilter","ref","className","usePortal","portalClassName","portalContainer","scrollContainer","popoverZIndex","id"],A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(e,{},(function(e,n){return Array.isArray(e)?e.concat(n):"string"==typeof e?e:void 0}))};function P(e,n){return null!=e&&"object"===o(e)&&"type"in e&&e.type.displayName===n}function T(e){var n="data-leafygreen-ui";return{prop:a({},n,e),selector:"[".concat(n,'="').concat(e,'"]')}}var k={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},j={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function E(e){throw Error("Received unhandled value: ".concat(e))}var D={error:e(console.error),warn:e(console.warn),log:e(console.log)};export{j as AriaCurrentValue,g as IntrinsicElements,A as StoryMeta,m as Theme,y as allEqual,D as consoleOnce,T as createDataProp,v as createSyntheticEvent,d as createUniqueClassName,E as enforceExhaustive,f as getNodeTextContent,b as getTheme,P as isComponentType,k as keyMap,S as storybookArgTypes,C as storybookExcludedArgTypes,w as storybookExcludedControlParams,u as typeIs,h as validateChildren};
import e from"lodash/isObject";import t from"lodash/once";import n from"lodash/isUndefined";import r from"react";import o from"lodash/mergeWith";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var s=Object.freeze({__proto__:null,element:u,button:function(e){return u(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return u(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}}),p=function(e){var t,n,r=(null!==(t=null===(n=d.get(e))||void 0===n?void 0:n.length)&&void 0!==t?t:0).toString().padStart(4,"0");return"lg-ui".concat(e?"-".concat(e):"","-").concat(r)},d=new Map,f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=p(e);if(d.has(e)){var n=d.get(e);d.set(e,[t].concat(l(n)))}else d.set(e,[t]);return t};function m(e){return"string"==typeof(t=e)||"number"==typeof t?e.toString().trim():Array.isArray(e)?e.map(m).join(" ").trim():function(e){return e&&"object"===i(e)&&e.props}(e)?m(e.props.children):"";var t}var b={Light:"light",Dark:"dark"},y=function(e){return e?b.Dark:b.Light};function v(e){return 1==new Set(e).size}var h=function(e,t){var o,i=null===(o=r.Children.map(e,(function(e){if(t.some((function(t){return T(e,t)})))return e})))||void 0===o?void 0:o.filter((function(e){return!n(e)}));return n(e)||(null==i?void 0:i.length)===r.Children.count(e)||D.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),i},g=function(e,t){Object.defineProperty(e,"target",{writable:!1,value:t});var n=!1,r=!1;return{nativeEvent:e,currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,preventDefault:function(){n=!0,e.preventDefault()},isDefaultPrevented:function(){return n},stopPropagation:function(){r=!0,e.stopPropagation()},isPropagationStopped:function(){return r},persist:function(){},timeStamp:e.timeStamp,type:e.type}},S=["small","button","a","abbr","address","article","aside","b","big","blockquote","caption","cite","code","dd","del","details","dfn","dialog","div","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","i","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noscript","ol","p","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","template","tbody","td","tfoot","th","thead","time","title","tr","u","ul"],C={baseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component",control:{type:"radio"},options:[14,16]},updatedBaseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component. Uses the updated font size values for Euclid Circular A.",control:{type:"radio"},options:[13,16]},darkMode:{description:"Render the component in dark mode.",control:"boolean"},children:{description:"Element rendered inside the component",control:"text"},as:{description:"The component will be rendered in HTML as the element selected here",options:S,type:{name:"string"},control:{type:"select"},defaultValue:"button"}},w={"aria-controls":{control:"none"},"aria-describedby":{control:"none"},"aria-label":{control:"none"},"aria-labelledby":{control:"none"},className:{control:"none"},id:{control:"none"},onBlur:{control:"none"},onCancel:{control:"none"},onChange:{control:"none"},onClear:{control:"none"},onClick:{control:"none"},onClose:{control:"none"},onConfirm:{control:"none"},onDismiss:{control:"none"},onFilter:{control:"none"},onSubmit:{control:"none"},portalClassName:{control:"none"},portalContainer:{control:"none"},popoverZIndex:{control:"none"},ref:{control:"none"},scrollContainer:{control:"none"},usePortal:{control:"none"}},A=["aria-controls","aria-describedby","aria-label","aria-labelledby","aria-describedby","className","id","onBlur","onCancel","onChange","onClear","onClick","onConfirm","onDismiss","onFilter","popoverZIndex","portalClassName","portalContainer","ref","setOpen","scrollContainer","usePortal"],P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e,{},(function(e,t){return Array.isArray(e)?e.concat(t):"string"==typeof e?e:void 0}))};function T(t,n){var r;return null!=t&&"object"===i(t)&&"type"in t&&(t.type.displayName===n||e(t.type)&&"render"in t.type&&(null===(r=t.type.render)||void 0===r?void 0:r.displayName)===n)}function j(e){var t="data-leafygreen-ui";return{prop:a({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}}var k={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},E={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function N(e){throw Error("Received unhandled value: ".concat(e))}var D={error:t(console.error),warn:t(console.warn),log:t(console.log)};export{E as AriaCurrentValue,S as IntrinsicElements,P as StoryMeta,b as Theme,v as allEqual,D as consoleOnce,j as createDataProp,g as createSyntheticEvent,f as createUniqueClassName,N as enforceExhaustive,m as getNodeTextContent,y as getTheme,T as isComponentType,k as keyMap,C as storybookArgTypes,w as storybookExcludedArgTypes,A as storybookExcludedControlParams,s as typeIs,h as validateChildren};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash/once"),require("lodash/isUndefined"),require("react"),require("lodash/mergeWith")):"function"==typeof define&&define.amd?define(["exports","lodash/once","lodash/isUndefined","react","lodash/mergeWith"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e.once,e.isUndefined,e.React,e.mergeWith)}(this,(function(e,t,n,o,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),l=a(n),c=a(o),u=a(r);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function d(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function m(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var y=Object.freeze({__proto__:null,element:m,button:function(e){return m(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return m(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}}),b=function(e){var t,n,o=(null!==(t=null===(n=h.get(e))||void 0===n?void 0:n.length)&&void 0!==t?t:0).toString().padStart(4,"0");return"lg-ui".concat(e?"-".concat(e):"","-").concat(o)},h=new Map;var g={Light:"light",Dark:"dark"};var v=["small","button","a","abbr","address","article","aside","b","big","blockquote","caption","cite","code","dd","del","details","dfn","dialog","div","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","i","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noscript","ol","p","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","template","tbody","td","tfoot","th","thead","time","title","tr","u","ul"],C={baseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component",control:{type:"radio"},options:[14,16]},updatedBaseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component. Uses the updated font size values for Euclid Circular A.",control:{type:"radio"},options:[13,16]},darkMode:{description:"Render the component in dark mode.",control:"boolean"},children:{description:"Element rendered inside the component",control:"text"},as:{description:"The component will be rendered in HTML as the element selected here",options:v,type:{name:"string"},control:{type:"select"},defaultValue:"button"}};function S(e,t){return null!=e&&"object"===s(e)&&"type"in e&&e.type.displayName===t}var T={error:i.default(console.error),warn:i.default(console.warn),log:i.default(console.log)};e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.IntrinsicElements=v,e.StoryMeta=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u.default(e,{},(function(e,t){return Array.isArray(e)?e.concat(t):"string"==typeof e?e:void 0}))},e.Theme=g,e.allEqual=function(e){return 1==new Set(e).size},e.consoleOnce=T,e.createDataProp=function(e){var t="data-leafygreen-ui";return{prop:d({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}},e.createSyntheticEvent=function(e,t){Object.defineProperty(e,"target",{writable:!1,value:t});var n=!1,o=!1;return{nativeEvent:e,currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,preventDefault:function(){n=!0,e.preventDefault()},isDefaultPrevented:function(){return n},stopPropagation:function(){o=!0,e.stopPropagation()},isPropagationStopped:function(){return o},persist:function(){},timeStamp:e.timeStamp,type:e.type}},e.createUniqueClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=b(e);if(h.has(e)){var n=h.get(e);h.set(e,[t].concat(f(n)))}else h.set(e,[t]);return t},e.enforceExhaustive=function(e){throw Error("Received unhandled value: ".concat(e))},e.getNodeTextContent=function e(t){return"string"==typeof(n=t)||"number"==typeof n?t.toString().trim():Array.isArray(t)?t.map(e).join(" ").trim():function(e){return e&&"object"===s(e)&&e.props}(t)?e(t.props.children):"";var n},e.getTheme=function(e){return e?g.Dark:g.Light},e.isComponentType=S,e.keyMap={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},e.storybookArgTypes=C,e.storybookExcludedArgTypes={"aria-controls":{control:"none"},"aria-describedby":{control:"none"},"aria-label":{control:"none"},"aria-labelledby":{control:"none"},className:{control:"none"},id:{control:"none"},onBlur:{control:"none"},onCancel:{control:"none"},onChange:{control:"none"},onClear:{control:"none"},onClick:{control:"none"},onClose:{control:"none"},onConfirm:{control:"none"},onDismiss:{control:"none"},onFilter:{control:"none"},onSubmit:{control:"none"},portalClassName:{control:"none"},portalContainer:{control:"none"},popoverZIndex:{control:"none"},ref:{control:"none"},scrollContainer:{control:"none"},usePortal:{control:"none"}},e.storybookExcludedControlParams=["aria-controls","aria-describedby","aria-label","aria-labelledby","onBlur","onCancel","onChange","onClear","onClick","onConfirm","onDismiss","onFilter","ref","className","usePortal","portalClassName","portalContainer","scrollContainer","popoverZIndex","id"],e.typeIs=y,e.validateChildren=function(e,t){var n,o=null===(n=c.default.Children.map(e,(function(e){if(t.some((function(t){return S(e,t)})))return e})))||void 0===n?void 0:n.filter((function(e){return!l.default(e)}));return l.default(e)||(null==o?void 0:o.length)===c.default.Children.count(e)||T.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),o},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash/isObject"),require("lodash/once"),require("lodash/isUndefined"),require("react"),require("lodash/mergeWith")):"function"==typeof define&&define.amd?define(["exports","lodash/isObject","lodash/once","lodash/isUndefined","react","lodash/mergeWith"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e.isObject,e.once,e.isUndefined,e.React,e.mergeWith)}(this,(function(e,t,n,r,o,a){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(t),c=i(n),u=i(r),s=i(o),d=i(a);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var h=Object.freeze({__proto__:null,element:b,button:function(e){return b(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return b(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}}),g=function(e){var t,n,r=(null!==(t=null===(n=v.get(e))||void 0===n?void 0:n.length)&&void 0!==t?t:0).toString().padStart(4,"0");return"lg-ui".concat(e?"-".concat(e):"","-").concat(r)},v=new Map;var C={Light:"light",Dark:"dark"};var S=["small","button","a","abbr","address","article","aside","b","big","blockquote","caption","cite","code","dd","del","details","dfn","dialog","div","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","i","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noscript","ol","p","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","template","tbody","td","tfoot","th","thead","time","title","tr","u","ul"],T={baseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component",control:{type:"radio"},options:[14,16]},updatedBaseFontSize:{description:"The base font size passed to the LeafyGreenProvider that wraps the component. Uses the updated font size values for Euclid Circular A.",control:{type:"radio"},options:[13,16]},darkMode:{description:"Render the component in dark mode.",control:"boolean"},children:{description:"Element rendered inside the component",control:"text"},as:{description:"The component will be rendered in HTML as the element selected here",options:S,type:{name:"string"},control:{type:"select"},defaultValue:"button"}};function w(e,t){var n;return null!=e&&"object"===f(e)&&"type"in e&&(e.type.displayName===t||l.default(e.type)&&"render"in e.type&&(null===(n=e.type.render)||void 0===n?void 0:n.displayName)===t)}var A={error:c.default(console.error),warn:c.default(console.warn),log:c.default(console.log)};e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.IntrinsicElements=S,e.StoryMeta=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default(e,{},(function(e,t){return Array.isArray(e)?e.concat(t):"string"==typeof e?e:void 0}))},e.Theme=C,e.allEqual=function(e){return 1==new Set(e).size},e.consoleOnce=A,e.createDataProp=function(e){var t="data-leafygreen-ui";return{prop:p({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}},e.createSyntheticEvent=function(e,t){Object.defineProperty(e,"target",{writable:!1,value:t});var n=!1,r=!1;return{nativeEvent:e,currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,preventDefault:function(){n=!0,e.preventDefault()},isDefaultPrevented:function(){return n},stopPropagation:function(){r=!0,e.stopPropagation()},isPropagationStopped:function(){return r},persist:function(){},timeStamp:e.timeStamp,type:e.type}},e.createUniqueClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=g(e);if(v.has(e)){var n=v.get(e);v.set(e,[t].concat(m(n)))}else v.set(e,[t]);return t},e.enforceExhaustive=function(e){throw Error("Received unhandled value: ".concat(e))},e.getNodeTextContent=function e(t){return"string"==typeof(n=t)||"number"==typeof n?t.toString().trim():Array.isArray(t)?t.map(e).join(" ").trim():function(e){return e&&"object"===f(e)&&e.props}(t)?e(t.props.children):"";var n},e.getTheme=function(e){return e?C.Dark:C.Light},e.isComponentType=w,e.keyMap={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},e.storybookArgTypes=T,e.storybookExcludedArgTypes={"aria-controls":{control:"none"},"aria-describedby":{control:"none"},"aria-label":{control:"none"},"aria-labelledby":{control:"none"},className:{control:"none"},id:{control:"none"},onBlur:{control:"none"},onCancel:{control:"none"},onChange:{control:"none"},onClear:{control:"none"},onClick:{control:"none"},onClose:{control:"none"},onConfirm:{control:"none"},onDismiss:{control:"none"},onFilter:{control:"none"},onSubmit:{control:"none"},portalClassName:{control:"none"},portalContainer:{control:"none"},popoverZIndex:{control:"none"},ref:{control:"none"},scrollContainer:{control:"none"},usePortal:{control:"none"}},e.storybookExcludedControlParams=["aria-controls","aria-describedby","aria-label","aria-labelledby","aria-describedby","className","id","onBlur","onCancel","onChange","onClear","onClick","onConfirm","onDismiss","onFilter","popoverZIndex","portalClassName","portalContainer","ref","setOpen","scrollContainer","usePortal"],e.typeIs=h,e.validateChildren=function(e,t){var n,r=null===(n=s.default.Children.map(e,(function(e){if(t.some((function(t){return w(e,t)})))return e})))||void 0===n?void 0:n.filter((function(e){return!u.default(e)}));return u.default(e)||(null==r?void 0:r.length)===s.default.Children.count(e)||A.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),r},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

export declare const storybookExcludedControlParams: readonly ["aria-controls", "aria-describedby", "aria-label", "aria-labelledby", "onBlur", "onCancel", "onChange", "onClear", "onClick", "onConfirm", "onDismiss", "onFilter", "ref", "className", "usePortal", "portalClassName", "portalContainer", "scrollContainer", "popoverZIndex", "id"];
export declare const storybookExcludedControlParams: readonly ["aria-controls", "aria-describedby", "aria-label", "aria-labelledby", "aria-describedby", "className", "id", "onBlur", "onCancel", "onChange", "onClear", "onClick", "onConfirm", "onDismiss", "onFilter", "popoverZIndex", "portalClassName", "portalContainer", "ref", "setOpen", "scrollContainer", "usePortal"];
//# sourceMappingURL=storybookExcludedControlParams.d.ts.map
{
"name": "@leafygreen-ui/lib",
"version": "10.3.4-next.7",
"version": "10.3.4",
"description": "leafyGreen UI Kit Internal Library",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -0,1 +1,2 @@

import isObject from 'lodash/isObject';
import once from 'lodash/once';

@@ -92,3 +93,8 @@ import * as typeIs from './typeIs';

'type' in element &&
(element.type as any).displayName === displayName
((element.type as any).displayName === displayName ||
// TODO: temp solution; Components using InferredPolymorphic have a displayName inside render.
// https://jira.mongodb.org/browse/LG-3232
(isObject(element.type as any) &&
'render' in (element.type as any) &&
(element.type as any).render?.displayName === displayName))
);

@@ -95,0 +101,0 @@ }

@@ -6,2 +6,5 @@ export const storybookExcludedControlParams = [

'aria-labelledby',
'aria-describedby',
'className',
'id',
'onBlur',

@@ -15,10 +18,9 @@ 'onCancel',

'onFilter',
'ref',
'className',
'usePortal',
'popoverZIndex',
'portalClassName',
'portalContainer',
'ref',
'setOpen',
'scrollContainer',
'popoverZIndex',
'id',
'usePortal',
] as const;

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc