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

@leafygreen-ui/lib

Package Overview
Dependencies
Maintainers
5
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 13.2.1 to 13.3.0

dist/types/index.d.ts

11

CHANGELOG.md
# @leafygreen-ui/lib
## 13.3.0
### Minor Changes
- 66df9ab8: Creates `Mutable` utility type
### Patch Changes
- 15185af0: Imports Storybook utilities from `@lg-tools/storybook-utils` (previously imported from `@leafygreen-ui/lib`)
- 356a53fd: Update TS builds to use `typescript@4.9.5`
## 13.2.1

@@ -4,0 +15,0 @@

2

dist/DarkModeProps/index.d.ts

@@ -18,3 +18,3 @@ /**

};
export declare type Theme = (typeof Theme)[keyof typeof Theme];
export type Theme = (typeof Theme)[keyof typeof Theme];
//# sourceMappingURL=index.d.ts.map

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

import e from"lodash/once";import t from"lodash/isNull";import r from"lodash/isUndefined";import n from"lodash/omit";import o from"lodash/pick";import i from"lodash/isObject";import a from"react";import l from"lodash/mergeWith";function c(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 u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}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 p(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;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:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){return function(e){if(Array.isArray(e))return d(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 d(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 d(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 d(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 m(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var b=Object.freeze({__proto__:null,array:function(e){return null!=e&&e instanceof Array},button:function(e){return m(e)&&"button"===e.tagName.toLowerCase()},element:m,input:function(e){return m(e)&&"input"===e.tagName.toLowerCase()}}),y=new Map,h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=function(e){var t,r,n=(null!==(t=null===(r=y.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)}(e);if(y.has(e)){var r=y.get(e);y.set(e,[t].concat(f(r)))}else y.set(e,[t]);return t};function g(e){return"string"==typeof(t=e)||"number"==typeof t?e.toString().trim():Array.isArray(e)?e.map(g).join(" ").trim():function(e){return e&&"object"===s(e)&&e.props}(e)?g(e.props.children):"";var t}var v={Light:"light",Dark:"dark"},w=function(e){return e?v.Dark:v.Light};function S(e){return 1==new Set(e).size}var O=function(e){if(e&&Array.isArray(e)){var t=f(e);return t.reverse(),t}},P={error:e(console.error),warn:e(console.warn),log:e(console.log)},j=function(e){return!r(e)&&!t(e)},C=function(e){return!j(e)||["","0","00",0].includes(e)},A=function(e){return!C(e)},D=function(e,t){return[o(e,t),n(e,t)]},k=function(e,t,r){var n=r-t;return e>r?t+(e-r-1)%n:e<t?r-(t-e-1)%n:e},E={length:30},T=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:E).length;return e.length<=t?e:e.substring(e.length-t)};function N(e,t){var r;return null!=e&&"object"===s(e)&&"type"in e&&(e.type.displayName===t||i(e.type)&&"render"in e.type&&(null===(r=e.type.render)||void 0===r?void 0:r.displayName)===t)}var L=function(e,t){var n,o=null===(n=a.Children.map(e,(function(e){if(t.some((function(t){return N(e,t)})))return e})))||void 0===n?void 0:n.filter((function(e){return!r(e)}));return r(e)||(null==o?void 0:o.length)===a.Children.count(e)||P.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),o},z=function(e,t){Object.defineProperty(e,"target",{writable:!1,value:t});var r=!1,n=!1;return u(u({nativeEvent:e},e),{},{currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,timeStamp:e.timeStamp,type:e.type,preventDefault:function(){r=!0,e.preventDefault()},isDefaultPrevented:function(){return r},stopPropagation:function(){n=!0,e.stopPropagation()},isPropagationStopped:function(){return n},persist:function(){}})},B=["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"],U={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:B,type:{name:"string"},control:{type:"select"},defaultValue:"button"}},I={"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"}},M=["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"],R=function(){return l(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{},(function(e,t){return Array.isArray(e)?e.concat(t):"string"==typeof e?e:void 0}))};function _(e){var t="data-leafygreen-ui";return{prop:p({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}}var x={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:" ",Tab:"Tab"},F={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function q(e){throw Error("Received unhandled value: ".concat(e))}export{F as AriaCurrentValue,B as IntrinsicElements,R as StoryMeta,v as Theme,S as allEqual,O as cloneReverse,P as consoleOnce,_ as createDataProp,z as createSyntheticEvent,h as createUniqueClassName,q as enforceExhaustive,g as getNodeTextContent,w as getTheme,N as isComponentType,j as isDefined,A as isNotZeroLike,C as isZeroLike,x as keyMap,D as pickAndOmit,k as rollover,U as storybookArgTypes,I as storybookExcludedArgTypes,M as storybookExcludedControlParams,T as truncateStart,b as typeIs,L as validateChildren};
import t from"lodash/once";import r from"lodash/isNull";import e from"lodash/isUndefined";import n from"lodash/omit";import o from"lodash/pick";import i from"lodash/isObject";import a from"react";function u(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function c(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?u(Object(e),!0).forEach((function(r){f(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(t,r,e){return r=function(t){var r=function(t,r){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof r?r:String(r)}(r),r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function p(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(!t)return;if("string"==typeof t)return s(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return s(t,r)}(t)||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 s(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function y(t){return null!=t&&t.nodeType===Node.ELEMENT_NODE}var m=Object.freeze({__proto__:null,array:function(t){return null!=t&&t instanceof Array},button:function(t){return y(t)&&"button"===t.tagName.toLowerCase()},element:y,input:function(t){return y(t)&&"input"===t.tagName.toLowerCase()}}),b=new Map,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=function(t){var r,e,n=(null!==(r=null===(e=b.get(t))||void 0===e?void 0:e.length)&&void 0!==r?r:0).toString().padStart(4,"0");return"lg-ui".concat(t?"-".concat(t):"","-").concat(n)}(t);if(b.has(t)){var e=b.get(t);b.set(t,[r].concat(p(e)))}else b.set(t,[r]);return r};function v(t){return"string"==typeof(r=t)||"number"==typeof r?t.toString().trim():Array.isArray(t)?t.map(v).join(" ").trim():function(t){return t&&"object"===l(t)&&t.props}(t)?v(t.props.children):"";var r}var g={Light:"light",Dark:"dark"},h=function(t){return t?g.Dark:g.Light};function w(t){return 1==new Set(t).size}var j=function(t){if(t&&Array.isArray(t)){var r=p(t);return r.reverse(),r}},O={error:t(console.error),warn:t(console.warn),log:t(console.log)},S=function(t){return!e(t)&&!r(t)},P=function(t){return!S(t)||["","0","00",0].includes(t)},A=function(t){return!P(t)},D=function(t,r){return[o(t,r),n(t,r)]},E=function(t,r,e){var n=e-r;return t>e?r+(t-e-1)%n:t<r?e-(r-t-1)%n:t},T={length:30},L=function(t){var r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:T).length;return t.length<=r?t:t.substring(t.length-r)};function N(t,r){var e;return null!=t&&"object"===l(t)&&"type"in t&&(t.type.displayName===r||i(t.type)&&"render"in t.type&&(null===(e=t.type.render)||void 0===e?void 0:e.displayName)===r)}var k=function(t,r){var n,o=null===(n=a.Children.map(t,(function(t){if(r.some((function(r){return N(t,r)})))return t})))||void 0===n?void 0:n.filter((function(t){return!e(t)}));return e(t)||(null==o?void 0:o.length)===a.Children.count(t)||O.error("Children must be one of: ".concat(r.join(", ")),"Received children: ",t),o},C=function(t,r){Object.defineProperty(t,"target",{writable:!1,value:r});var e=!1,n=!1;return c(c({nativeEvent:t},t),{},{currentTarget:t.currentTarget,target:t.target,bubbles:t.bubbles,cancelable:t.cancelable,defaultPrevented:t.defaultPrevented,eventPhase:t.eventPhase,isTrusted:t.isTrusted,timeStamp:t.timeStamp,type:t.type,preventDefault:function(){e=!0,t.preventDefault()},isDefaultPrevented:function(){return e},stopPropagation:function(){n=!0,t.stopPropagation()},isPropagationStopped:function(){return n},persist:function(){}})};function U(t){var r="data-leafygreen-ui";return{prop:f({},r,t),selector:"[".concat(r,'="').concat(t,'"]')}}var _={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:" ",Tab:"Tab"},R={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function B(t){throw Error("Received unhandled value: ".concat(t))}export{R as AriaCurrentValue,g as Theme,w as allEqual,j as cloneReverse,O as consoleOnce,U as createDataProp,C as createSyntheticEvent,d as createUniqueClassName,B as enforceExhaustive,v as getNodeTextContent,h as getTheme,N as isComponentType,S as isDefined,A as isNotZeroLike,P as isZeroLike,_ as keyMap,D as pickAndOmit,E as rollover,L as truncateStart,m as typeIs,k as validateChildren};
//# sourceMappingURL=index.js.map

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

export { createSyntheticEvent } from './createSyntheticEvent';
export { type ExtendedComponentProps, type GeneratedStoryConfig, type GeneratedStoryFn, type InstanceDecorator, type PlayFn, StoryMeta, type StoryMetaType, type StoryType, storybookArgTypes, storybookExcludedArgTypes, storybookExcludedControlParams, IntrinsicElements, } from './storybook';
export { type Mutable } from './types';
export { typeIs, createUniqueClassName, getNodeTextContent, getTheme, Theme };
export type { DarkModeProps };
/** Helper type to extract an HTML element's valid props */
export declare type HTMLElementProps<Element extends keyof JSX.IntrinsicElements, RefType extends HTMLElement = never> = React.PropsWithChildren<Omit<JSX.IntrinsicElements[Element], 'ref'>> & {
export type HTMLElementProps<Element extends keyof JSX.IntrinsicElements, RefType extends HTMLElement = never> = React.PropsWithChildren<Omit<JSX.IntrinsicElements[Element], 'ref'>> & {
ref?: [RefType] extends [never] ? never : React.Ref<RefType>;

@@ -51,3 +51,3 @@ key?: React.Key | null;

*/
export declare type Either<T, Keys extends keyof T = keyof T> = Omit<T, Keys> & {
export type Either<T, Keys extends keyof T = keyof T> = Omit<T, Keys> & {
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;

@@ -58,3 +58,3 @@ }[Keys];

*/
export declare type OneOf<T1, T2> = (T1 & Partial<Record<Exclude<keyof T2, keyof T1>, never>>) | (T2 & Partial<Record<Exclude<keyof T1, keyof T2>, never>>);
export type OneOf<T1, T2> = (T1 & Partial<Record<Exclude<keyof T2, keyof T1>, never>>) | (T2 & Partial<Record<Exclude<keyof T1, keyof T2>, never>>);
/**

@@ -111,7 +111,7 @@ * Utility for making it easier to couple a React Component to a css selector.

};
export declare type AriaCurrentValue = (typeof AriaCurrentValue)[keyof typeof AriaCurrentValue];
export type AriaCurrentValue = (typeof AriaCurrentValue)[keyof typeof AriaCurrentValue];
/**
* Accepts a type as an argument and makes all of the keys of the type optional
*/
export declare type RecursivePartial<T> = {
export type RecursivePartial<T> = {
[P in keyof T]?: T[P] extends Array<infer U> ? Array<RecursivePartial<U>> : T[P] extends object ? RecursivePartial<T[P]> : T[P] extends infer U | undefined ? RecursivePartial<U> | undefined : T[P] extends infer U | null ? RecursivePartial<U> | null : T[P];

@@ -118,0 +118,0 @@ };

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash/once"),require("lodash/isNull"),require("lodash/isUndefined"),require("lodash/omit"),require("lodash/pick"),require("lodash/isObject"),require("react"),require("lodash/mergeWith")):"function"==typeof define&&define.amd?define(["exports","lodash/once","lodash/isNull","lodash/isUndefined","lodash/omit","lodash/pick","lodash/isObject","react","lodash/mergeWith"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e["/once"],e["/isNull"],e["/isUndefined"],e["/omit"],e["/pick"],e["/isObject"],e.react,e["/mergeWith"])}(this,(function(e,t,n,r,o,i,a,l,c){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=u(t),d=u(n),f=u(r),p=u(o),b=u(i),y=u(a),m=u(l),h=u(c);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e){return w="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},w(e)}function C(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 S(e){return function(e){if(Array.isArray(e))return O(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 O(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 O(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 O(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 j(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var A=Object.freeze({__proto__:null,array:function(e){return null!=e&&e instanceof Array},button:function(e){return j(e)&&"button"===e.tagName.toLowerCase()},element:j,input:function(e){return j(e)&&"input"===e.tagName.toLowerCase()}}),P=new Map;var k={Light:"light",Dark:"dark"};var T={error:s.default(console.error),warn:s.default(console.warn),log:s.default(console.log)},E=function(e){return!f.default(e)&&!d.default(e)},D=function(e){return!E(e)||["","0","00",0].includes(e)},N={length:30};function L(e,t){var n;return null!=e&&"object"===w(e)&&"type"in e&&(e.type.displayName===t||y.default(e.type)&&"render"in e.type&&(null===(n=e.type.render)||void 0===n?void 0:n.displayName)===t)}var q=["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"],x={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:q,type:{name:"string"},control:{type:"select"},defaultValue:"button"}};e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.IntrinsicElements=q,e.StoryMeta=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h.default(e,{},(function(e,t){return Array.isArray(e)?e.concat(t):"string"==typeof e?e:void 0}))},e.Theme=k,e.allEqual=function(e){return 1==new Set(e).size},e.cloneReverse=function(e){if(e&&Array.isArray(e)){var t=S(e);return t.reverse(),t}},e.consoleOnce=T,e.createDataProp=function(e){var t="data-leafygreen-ui";return{prop:C({},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 v(v({nativeEvent:e},e),{},{currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,timeStamp:e.timeStamp,type:e.type,preventDefault:function(){n=!0,e.preventDefault()},isDefaultPrevented:function(){return n},stopPropagation:function(){r=!0,e.stopPropagation()},isPropagationStopped:function(){return r},persist:function(){}})},e.createUniqueClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=function(e){var t,n,r=(null!==(t=null===(n=P.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)}(e);if(P.has(e)){var n=P.get(e);P.set(e,[t].concat(S(n)))}else P.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"===w(e)&&e.props}(t)?e(t.props.children):"";var n},e.getTheme=function(e){return e?k.Dark:k.Light},e.isComponentType=L,e.isDefined=E,e.isNotZeroLike=function(e){return!D(e)},e.isZeroLike=D,e.keyMap={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:" ",Tab:"Tab"},e.pickAndOmit=function(e,t){return[b.default(e,t),p.default(e,t)]},e.rollover=function(e,t,n){var r=n-t;return e>n?t+(e-n-1)%r:e<t?n-(t-e-1)%r:e},e.storybookArgTypes=x,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.truncateStart=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:N).length;return e.length<=t?e:e.substring(e.length-t)},e.typeIs=A,e.validateChildren=function(e,t){var n,r=null===(n=m.default.Children.map(e,(function(e){if(t.some((function(t){return L(e,t)})))return e})))||void 0===n?void 0:n.filter((function(e){return!f.default(e)}));return f.default(e)||(null==r?void 0:r.length)===m.default.Children.count(e)||T.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),r}}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash/once"),require("lodash/isNull"),require("lodash/isUndefined"),require("lodash/omit"),require("lodash/pick"),require("lodash/isObject"),require("react")):"function"==typeof define&&define.amd?define(["exports","lodash/once","lodash/isNull","lodash/isUndefined","lodash/omit","lodash/pick","lodash/isObject","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e["/once"],e["/isNull"],e["/isUndefined"],e["/omit"],e["/pick"],e["/isObject"],e.react)}(this,(function(e,t,r,n,o,i,a,u){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(t),f=l(r),s=l(n),p=l(o),d=l(i),y=l(a),b=l(u);function v(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 g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e){return m="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},m(e)}function h(e,t,r){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;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:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e){return function(e){if(Array.isArray(e))return j(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 j(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 j(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 j(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 S=Object.freeze({__proto__:null,array:function(e){return null!=e&&e instanceof Array},button:function(e){return O(e)&&"button"===e.tagName.toLowerCase()},element:O,input:function(e){return O(e)&&"input"===e.tagName.toLowerCase()}}),A=new Map;var P={Light:"light",Dark:"dark"};var T={error:c.default(console.error),warn:c.default(console.warn),log:c.default(console.log)},D=function(e){return!s.default(e)&&!f.default(e)},E=function(e){return!D(e)||["","0","00",0].includes(e)},k={length:30};function N(e,t){var r;return null!=e&&"object"===m(e)&&"type"in e&&(e.type.displayName===t||y.default(e.type)&&"render"in e.type&&(null===(r=e.type.render)||void 0===r?void 0:r.displayName)===t)}e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.Theme=P,e.allEqual=function(e){return 1==new Set(e).size},e.cloneReverse=function(e){if(e&&Array.isArray(e)){var t=w(e);return t.reverse(),t}},e.consoleOnce=T,e.createDataProp=function(e){var t="data-leafygreen-ui";return{prop:h({},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 g(g({nativeEvent:e},e),{},{currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,timeStamp:e.timeStamp,type:e.type,preventDefault:function(){r=!0,e.preventDefault()},isDefaultPrevented:function(){return r},stopPropagation:function(){n=!0,e.stopPropagation()},isPropagationStopped:function(){return n},persist:function(){}})},e.createUniqueClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=function(e){var t,r,n=(null!==(t=null===(r=A.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)}(e);if(A.has(e)){var r=A.get(e);A.set(e,[t].concat(w(r)))}else A.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"===m(e)&&e.props}(t)?e(t.props.children):"";var r},e.getTheme=function(e){return e?P.Dark:P.Light},e.isComponentType=N,e.isDefined=D,e.isNotZeroLike=function(e){return!E(e)},e.isZeroLike=E,e.keyMap={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:" ",Tab:"Tab"},e.pickAndOmit=function(e,t){return[d.default(e,t),p.default(e,t)]},e.rollover=function(e,t,r){var n=r-t;return e>r?t+(e-r-1)%n:e<t?r-(t-e-1)%n:e},e.truncateStart=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:k).length;return e.length<=t?e:e.substring(e.length-t)},e.typeIs=S,e.validateChildren=function(e,t){var r,n=null===(r=b.default.Children.map(e,(function(e){if(t.some((function(t){return N(e,t)})))return e})))||void 0===r?void 0:r.filter((function(e){return!s.default(e)}));return s.default(e)||(null==n?void 0:n.length)===b.default.Children.count(e)||T.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),n}}));
//# sourceMappingURL=index.js.map
{
"name": "@leafygreen-ui/lib",
"version": "13.2.1",
"version": "13.3.0",
"description": "leafyGreen UI Kit Internal Library",

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

@@ -9,18 +9,4 @@ import * as typeIs from './typeIs';

export { createSyntheticEvent } from './createSyntheticEvent';
export { type Mutable } from './types';
export {
type ExtendedComponentProps,
type GeneratedStoryConfig,
type GeneratedStoryFn,
type InstanceDecorator,
type PlayFn,
StoryMeta,
type StoryMetaType,
type StoryType,
storybookArgTypes,
storybookExcludedArgTypes,
storybookExcludedControlParams,
IntrinsicElements,
} from './storybook';
export { typeIs, createUniqueClassName, getNodeTextContent, getTheme, Theme };

@@ -27,0 +13,0 @@ export type { DarkModeProps };

@@ -16,5 +16,5 @@ {

],
"exclude": ["**/*.spec.*", "**/*.story.*"],
"exclude": ["**/*.spec.*", "**/*.stories.*"],
"references": [
]
}

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