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.1.0 to 10.2.0

dist/createSyntheticEvent/createSyntheticEvent.d.ts

7

CHANGELOG.md
# @leafygreen-ui/lib
## 10.2.0
### Minor Changes
- 0541bd776: Exports `StoryMeta` interface and factory function for generating Storybook default exports that are compatible with the new mongodb.design architecture
- ec2a3d66d: Adds `createSyntheticEvent` to create a React SyntheticEvent
## 10.1.0

@@ -4,0 +11,0 @@

2

dist/esm/index.js

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

import e from"lodash/once";function t(e){return t="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},t(e)}function r(e){return function(e){if(Array.isArray(e))return n(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 n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(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 n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var a=Object.freeze({__proto__:null,element:o,button:function(e){return o(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return o(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}}),i=function(e){var t,r,n=(null!==(t=null===(r=l.get(e))||void 0===r?void 0:r.length)&&void 0!==t?t:0).toString().padStart(4,"0");return"lg-ui".concat(e?"-".concat(e):"","-").concat(n)},l=new Map,c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=i(e);if(l.has(e)){var n=l.get(e);l.set(e,[t].concat(r(n)))}else l.set(e,[t]);return t};function u(e){return"string"==typeof(r=e)||"number"==typeof r?e.toString().trim():Array.isArray(e)?e.map(u).join(" ").trim():function(e){return e&&"object"===t(e)&&e.props}(e)?u(e.props.children):"";var r}var p={Light:"light",Dark:"dark"},s=function(e){return e?p.Dark:p.Light},d=["symbol","small","button","a","abbr","address","article","aside","audio","b","bdi","bdo","big","blockquote","body","canvas","caption","cite","code","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","html","i","iframe","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noindex","noscript","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","table","template","tbody","td","textarea","tfoot","th","thead","time","title","tr","u","ul","var","video","webview","svg"],f={darkMode:{description:"Render the component in dark mode.",control:"boolean"},ref:{description:"`ref` passed to the component",control:"none"},onClick:{description:"Function to handle a click event.",control:"none"},children:{description:"Element rendered inside the component",control:"text"},as:{description:"The component will be rendered in HTML as the element selected here",options:d,type:{name:"string"},control:{type:"select"}}},m=["children","aria-label","onFilter","onClear","onChange","onClick","ref","className","usePortal","portalClassName","portalContainer","scrollContainer","popoverZIndex"];function y(e,r){return null!=e&&"object"===t(e)&&"type"in e&&e.type.displayName===r}function b(e){var t,r,n,o="data-leafygreen-ui";return{prop:(t={},r=o,n=e,r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t),selector:"[".concat(o,'="').concat(e,'"]')}}var g={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},h={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function v(e){throw Error("Received unhandled value: ".concat(e))}var w={error:e(console.error),warn:e(console.warn),log:e(console.log)};export{h as AriaCurrentValue,d as IntrinsicElements,p as Theme,w as consoleOnce,b as createDataProp,c as createUniqueClassName,v as enforceExhaustive,u as getNodeTextContent,s as getTheme,y as isComponentType,g as keyMap,f as storybookArgTypes,m as storybookExcludedControlParams,a as typeIs};
import e from"lodash/once";import t from"lodash/isUndefined";import r from"react";import{defaultsDeep as n}from"lodash";function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){return a="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},a(e)}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(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,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var p=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}}),s=function(e){var t,r,n=(null!==(t=null===(r=f.get(e))||void 0===r?void 0:r.length)&&void 0!==t?t:0).toString().padStart(4,"0");return"lg-ui".concat(e?"-".concat(e):"","-").concat(n)},f=new Map,d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=s(e);if(f.has(e)){var r=f.get(e);f.set(e,[t].concat(c(r)))}else f.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"===a(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},g=function(e,n){var o,a=null===(o=r.Children.map(e,(function(e){if(n.some((function(t){return S(e,t)})))return e})))||void 0===o?void 0:o.filter((function(e){return!t(e)}));return t(e)||(null==a?void 0:a.length)===r.Children.count(e)||T.error("Children must be one of: ".concat(n.join(", ")),"Received children: ",e),a},h=function(e,t){Object.defineProperty(e,"target",{writable:!1,value:t});var r=!1,n=!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(){r=!0,e.preventDefault()},isDefaultPrevented:function(){return r},stopPropagation:function(){n=!0,e.stopPropagation()},isPropagationStopped:function(){return n},persist:function(){},timeStamp:e.timeStamp,type:e.type}},v=["symbol","small","button","a","abbr","address","article","aside","audio","b","bdi","bdo","big","blockquote","body","canvas","caption","cite","code","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","html","i","iframe","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noindex","noscript","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","table","template","tbody","td","textarea","tfoot","th","thead","time","title","tr","u","ul","var","video","webview","svg"],w={darkMode:{description:"Render the component in dark mode.",control:"boolean"},ref:{description:"`ref` passed to the component",control:"none"},onClick:{description:"Function to handle a click event.",control:"none"},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"}}},O=["children","aria-label","onFilter","onClear","onChange","onClick","ref","className","usePortal","portalClassName","portalContainer","scrollContainer","popoverZIndex"],j={argTypes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},w),parameters:{controls:{exclude:c(O)}}},P=function(e){return n(e,j)};function S(e,t){return null!=e&&"object"===a(e)&&"type"in e&&e.type.displayName===t}function k(e){var t="data-leafygreen-ui";return{prop:i({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}}var A={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},C={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function D(e){throw Error("Received unhandled value: ".concat(e))}var T={error:e(console.error),warn:e(console.warn),log:e(console.log)};export{C as AriaCurrentValue,v as IntrinsicElements,P as StoryMeta,b as Theme,T as consoleOnce,k as createDataProp,h as createSyntheticEvent,d as createUniqueClassName,D as enforceExhaustive,m as getNodeTextContent,y as getTheme,S as isComponentType,A as keyMap,w as storybookArgTypes,O as storybookExcludedControlParams,p as typeIs,g as validateChildren};
//# sourceMappingURL=index.js.map

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

import { Theme } from '.';
/**

@@ -8,4 +9,4 @@ *

*/
declare const getTheme: (darkMode: boolean) => "light" | "dark";
declare const getTheme: (darkMode: boolean) => Theme;
export default getTheme;
//# sourceMappingURL=getTheme.d.ts.map

@@ -7,3 +7,5 @@ /// <reference types="react" />

import getTheme from './getTheme';
export { storybookArgTypes, storybookExcludedControlParams, IntrinsicElements, } from './storybook';
export { validateChildren } from './validateChildren';
export { createSyntheticEvent } from './createSyntheticEvent';
export { StoryMeta, storybookArgTypes, storybookExcludedControlParams, IntrinsicElements, } from './storybook';
export { typeIs, createUniqueClassName, getNodeTextContent, getTheme, Theme };

@@ -10,0 +12,0 @@ export type { DarkModeProps };

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash/once")):"function"==typeof define&&define.amd?define(["exports","lodash/once"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e.once)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t);function r(e){return r="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},r(e)}function a(e){return function(e){if(Array.isArray(e))return i(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 i(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 i(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 i(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 l(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var c=Object.freeze({__proto__:null,element:l,button:function(e){return l(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return l(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}}),u=function(e){var t,n,o=(null!==(t=null===(n=s.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)},s=new Map;var p={Light:"light",Dark:"dark"},d=["symbol","small","button","a","abbr","address","article","aside","audio","b","bdi","bdo","big","blockquote","body","canvas","caption","cite","code","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","html","i","iframe","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noindex","noscript","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","table","template","tbody","td","textarea","tfoot","th","thead","time","title","tr","u","ul","var","video","webview","svg"],f={darkMode:{description:"Render the component in dark mode.",control:"boolean"},ref:{description:"`ref` passed to the component",control:"none"},onClick:{description:"Function to handle a click event.",control:"none"},children:{description:"Element rendered inside the component",control:"text"},as:{description:"The component will be rendered in HTML as the element selected here",options:d,type:{name:"string"},control:{type:"select"}}};var m={error:o.default(console.error),warn:o.default(console.warn),log:o.default(console.log)};e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.IntrinsicElements=d,e.Theme=p,e.consoleOnce=m,e.createDataProp=function(e){var t,n,o,r="data-leafygreen-ui";return{prop:(t={},n=r,o=e,n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t),selector:"[".concat(r,'="').concat(e,'"]')}},e.createUniqueClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=u(e);if(s.has(e)){var n=s.get(e);s.set(e,[t].concat(a(n)))}else s.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"===r(e)&&e.props}(t)?e(t.props.children):"";var n},e.getTheme=function(e){return e?p.Dark:p.Light},e.isComponentType=function(e,t){return null!=e&&"object"===r(e)&&"type"in e&&e.type.displayName===t},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=f,e.storybookExcludedControlParams=["children","aria-label","onFilter","onClear","onChange","onClick","ref","className","usePortal","portalClassName","portalContainer","scrollContainer","popoverZIndex"],e.typeIs=c,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash/once"),require("lodash/isUndefined"),require("react"),require("lodash")):"function"==typeof define&&define.amd?define(["exports","lodash/once","lodash/isUndefined","react","lodash"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e.once,e.isUndefined,e.React,e._)}(this,(function(e,t,r,n,o){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(t),l=a(r),c=a(n);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return 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,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return function(e){if(Array.isArray(e))return f(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 f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(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 f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var y=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}}),m=function(e){var t,r,n=(null!==(t=null===(r=g.get(e))||void 0===r?void 0:r.length)&&void 0!==t?t:0).toString().padStart(4,"0");return"lg-ui".concat(e?"-".concat(e):"","-").concat(n)},g=new Map;var h={Light:"light",Dark:"dark"},v=["symbol","small","button","a","abbr","address","article","aside","audio","b","bdi","bdo","big","blockquote","body","canvas","caption","cite","code","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","html","i","iframe","ins","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","noindex","noscript","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","slot","script","section","select","span","strong","style","sub","summary","sup","table","template","tbody","td","textarea","tfoot","th","thead","time","title","tr","u","ul","var","video","webview","svg"],w={darkMode:{description:"Render the component in dark mode.",control:"boolean"},ref:{description:"`ref` passed to the component",control:"none"},onClick:{description:"Function to handle a click event.",control:"none"},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"}}},O=["children","aria-label","onFilter","onClear","onChange","onClick","ref","className","usePortal","portalClassName","portalContainer","scrollContainer","popoverZIndex"],j={argTypes:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},w),parameters:{controls:{exclude:p(O)}}};function P(e,t){return null!=e&&"object"===s(e)&&"type"in e&&e.type.displayName===t}var S={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(e){return o.defaultsDeep(e,j)},e.Theme=h,e.consoleOnce=S,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 r=!1,n=!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(){r=!0,e.preventDefault()},isDefaultPrevented:function(){return r},stopPropagation:function(){n=!0,e.stopPropagation()},isPropagationStopped:function(){return n},persist:function(){},timeStamp:e.timeStamp,type:e.type}},e.createUniqueClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=m(e);if(g.has(e)){var r=g.get(e);g.set(e,[t].concat(p(r)))}else g.set(e,[t]);return t},e.enforceExhaustive=function(e){throw Error("Received unhandled value: ".concat(e))},e.getNodeTextContent=function e(t){return"string"==typeof(r=t)||"number"==typeof r?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 r},e.getTheme=function(e){return e?h.Dark:h.Light},e.isComponentType=P,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=w,e.storybookExcludedControlParams=O,e.typeIs=y,e.validateChildren=function(e,t){var r,n=null===(r=c.default.Children.map(e,(function(e){if(t.some((function(t){return P(e,t)})))return e})))||void 0===r?void 0:r.filter((function(e){return!l.default(e)}));return l.default(e)||(null==n?void 0:n.length)===c.default.Children.count(e)||S.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),n},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map
export { storybookArgTypes } from './storybookArgTypes';
export { storybookExcludedControlParams } from './storybookExcludedControlParams';
export { default as IntrinsicElements } from './IntrinsicElements';
export { StoryMeta } from './StoryMeta';
//# sourceMappingURL=index.d.ts.map
{
"name": "@leafygreen-ui/lib",
"version": "10.1.0",
"version": "10.2.0",
"description": "leafyGreen UI Kit Internal Library",

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

@@ -10,4 +10,5 @@ import { Theme } from '.';

*/
const getTheme = (darkMode: boolean) => (darkMode ? Theme.Dark : Theme.Light);
const getTheme = (darkMode: boolean): Theme =>
darkMode ? Theme.Dark : Theme.Light;
export default getTheme;

@@ -7,4 +7,7 @@ import once from 'lodash/once';

import getTheme from './getTheme';
export { validateChildren } from './validateChildren';
export { createSyntheticEvent } from './createSyntheticEvent';
export {
StoryMeta,
storybookArgTypes,

@@ -11,0 +14,0 @@ storybookExcludedControlParams,

export { storybookArgTypes } from './storybookArgTypes';
export { storybookExcludedControlParams } from './storybookExcludedControlParams';
export { default as IntrinsicElements } from './IntrinsicElements';
export { StoryMeta } from './StoryMeta';

@@ -450,4 +450,4 @@ [

},
"__@unscopables@116044": {
"name": "__@unscopables@116044",
"__@unscopables@145871": {
"name": "__@unscopables@145871",
"defaultValue": null,

@@ -541,2 +541,179 @@ "description": "Returns an object whose properties have the value 'true'\nwhen they will be absent when used in a 'with' statement.",

"tags": {},
"description": "",
"methods": [],
"displayName": "StoryMeta",
"props": {
"StoryMeta": {
"parameters": {
"name": "parameters",
"defaultValue": null,
"description": "",
"required": true,
"type": {
"name": "Parameters & { default: string; }"
},
"tags": {}
},
"argTypes": {
"name": "argTypes",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "Partial<{ [name in keyof ComponentProps<T>]: InputType & { storybookOnly?: boolean; }; }>"
},
"tags": {}
}
},
"StoryMetaProps": {
"decorators": {
"name": "decorators",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "DecoratorFunction<ReactFramework, Args>[]"
},
"tags": {}
},
"args": {
"name": "args",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "Partial<ComponentProps<T>>"
},
"tags": {}
},
"loaders": {
"name": "loaders",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "LoaderFunction<ReactFramework, Args>[]"
},
"tags": {}
},
"render": {
"name": "render",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "ArgsStoryFn<ReactFramework, ComponentProps<T>>"
},
"tags": {}
},
"title": {
"name": "title",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "string"
},
"tags": {}
},
"id": {
"name": "id",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "string"
},
"tags": {}
},
"includeStories": {
"name": "includeStories",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "enum",
"raw": "StoryDescriptor",
"value": [
{
"value": "RegExp",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "string[]",
"description": "",
"fullComment": "",
"tags": {}
}
]
},
"tags": {}
},
"excludeStories": {
"name": "excludeStories",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "enum",
"raw": "StoryDescriptor",
"value": [
{
"value": "RegExp",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "string[]",
"description": "",
"fullComment": "",
"tags": {}
}
]
},
"tags": {}
},
"component": {
"name": "component",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "enum",
"raw": "ComponentType<any>",
"value": [
{
"value": "ComponentClass<any, any>",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "FunctionComponent<any>",
"description": "",
"fullComment": "",
"tags": {}
}
]
},
"tags": {}
},
"subcomponents": {
"name": "subcomponents",
"defaultValue": null,
"description": "",
"required": false,
"type": {
"name": "Record<string, ComponentType<any>>"
},
"tags": {}
}
}
}
},
{
"tags": {},
"description": "Returns the text string of a React node",

@@ -967,4 +1144,4 @@ "methods": [],

},
"__@unscopables@116044": {
"name": "__@unscopables@116044",
"__@unscopables@145871": {
"name": "__@unscopables@145871",
"defaultValue": null,

@@ -971,0 +1148,0 @@ "description": "Returns an object whose properties have the value 'true'\nwhen they will be absent when used in a 'with' statement.",

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 not supported yet

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