@leafygreen-ui/lib
Advanced tools
Comparing version 9.3.0 to 9.4.0
# @leafygreen-ui/lib | ||
## 9.4.0 | ||
### Minor Changes | ||
- 99e20bb9: Reusable DarkModeProps and darkMode prop for LeafygreenProvider | ||
### Patch Changes | ||
- 85d46871: Adds `lodash` as an explicit dependency of `lib`. Imports `lodash` utility in a tree-shakable way | ||
## 9.3.0 | ||
@@ -4,0 +14,0 @@ |
@@ -1,2 +0,2 @@ | ||
import{once as e}from"lodash";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 null!=e&&e.nodeType===Node.ELEMENT_NODE}var o=Object.freeze({__proto__:null,element:r,button:function(e){return r(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return r(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}}),n=function(e){return"lg-ui".concat(e?"-".concat(e):"","-").concat((t=(new Date).getTime(),"xxxxxxxx".replace(/[x]/g,(function(e){var r=16*Math.random();return r=(t+r)%16|0,t=Math.floor(t/16),("x"==e?r:7&r|8).toString(16)}))));var t};function a(e){return"string"==typeof(r=e)||"number"==typeof r?e.toString().trim():Array.isArray(e)?e.map(a).join(" ").trim():function(e){return e&&"object"===t(e)&&e.props}(e)?a(e.props.children):"";var r}function c(e,r){return null!=e&&"object"===t(e)&&"type"in e&&e.type.displayName===r}function u(e){var t,r,o,n="data-leafygreen-ui";return{prop:(t={},r=n,o=e,r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t),selector:"[".concat(n,'="').concat(e,'"]')}}var i={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},l={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function p(e){throw Error("Received unhandled value: ".concat(e))}var f={error:e(console.error),warn:e(console.warn),log:e(console.log)};export{l as AriaCurrentValue,f as consoleOnce,u as createDataProp,n as createUniqueClassName,p as enforceExhaustive,a as getNodeTextContent,c as isComponentType,i as keyMap,o as typeIs}; | ||
import t from"lodash/once";function e(t){return e="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},e(t)}function r(t){return null!=t&&t.nodeType===Node.ELEMENT_NODE}var o=Object.freeze({__proto__:null,element:r,button:function(t){return r(t)&&"button"===t.tagName.toLowerCase()},input:function(t){return r(t)&&"input"===t.tagName.toLowerCase()},array:function(t){return null!=t&&t instanceof Array}}),n=function(t){return"lg-ui".concat(t?"-".concat(t):"","-").concat((e=(new Date).getTime(),"xxxxxxxx".replace(/[x]/g,(function(t){var r=16*Math.random();return r=(e+r)%16|0,e=Math.floor(e/16),("x"==t?r:7&r|8).toString(16)}))));var e};function a(t){return"string"==typeof(r=t)||"number"==typeof r?t.toString().trim():Array.isArray(t)?t.map(a).join(" ").trim():function(t){return t&&"object"===e(t)&&t.props}(t)?a(t.props.children):"";var r}var c={Light:"light",Dark:"dark"};function u(t,r){return null!=t&&"object"===e(t)&&"type"in t&&t.type.displayName===r}function i(t){var e,r,o,n="data-leafygreen-ui";return{prop:(e={},r=n,o=t,r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e),selector:"[".concat(n,'="').concat(t,'"]')}}var l={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Backspace:8,BracketLeft:91,Delete:46,Enter:13,Escape:27,Space:32,Tab:9},p={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function f(t){throw Error("Received unhandled value: ".concat(t))}var y={error:t(console.error),warn:t(console.warn),log:t(console.log)};export{p as AriaCurrentValue,c as Theme,y as consoleOnce,i as createDataProp,n as createUniqueClassName,f as enforceExhaustive,a as getNodeTextContent,u as isComponentType,l as keyMap,o as typeIs}; | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,5 @@ /// <reference types="react" /> | ||
import getNodeTextContent from './getNodeTextContent'; | ||
export { typeIs, createUniqueClassName, getNodeTextContent }; | ||
import DarkModeProps, { Theme, ThemeType } from './DarkModeProps'; | ||
export { typeIs, createUniqueClassName, getNodeTextContent, Theme }; | ||
export type { DarkModeProps, ThemeType }; | ||
/** Helper type to extract an HTML element's valid props */ | ||
@@ -8,0 +10,0 @@ export declare type HTMLElementProps<Element extends keyof JSX.IntrinsicElements, RefType extends HTMLElement = never> = Omit<JSX.IntrinsicElements[Element], 'ref'> & { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash")):"function"==typeof define&&define.amd?define(["exports","lodash"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e._)}(this,(function(e,t){"use strict";function n(e){return n="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},n(e)}function o(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}var r=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}});var a={error:t.once(console.error),warn:t.once(console.warn),log:t.once(console.log)};e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.consoleOnce=a,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(e){return"lg-ui".concat(e?"-".concat(e):"","-").concat((t=(new Date).getTime(),"xxxxxxxx".replace(/[x]/g,(function(e){var n=16*Math.random();return n=(t+n)%16|0,t=Math.floor(t/16),("x"==e?n:7&n|8).toString(16)}))));var t},e.enforceExhaustive=function(e){throw Error("Received unhandled value: ".concat(e))},e.getNodeTextContent=function e(t){return"string"==typeof(o=t)||"number"==typeof o?t.toString().trim():Array.isArray(t)?t.map(e).join(" ").trim():function(e){return e&&"object"===n(e)&&e.props}(t)?e(t.props.children):"";var o},e.isComponentType=function(e,t){return null!=e&&"object"===n(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.typeIs=r,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!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 null!=e&&e.nodeType===Node.ELEMENT_NODE}var u=Object.freeze({__proto__:null,element:a,button:function(e){return a(e)&&"button"===e.tagName.toLowerCase()},input:function(e){return a(e)&&"input"===e.tagName.toLowerCase()},array:function(e){return null!=e&&e instanceof Array}});var i={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.Theme={Light:"light",Dark:"dark"},e.consoleOnce=i,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(e){return"lg-ui".concat(e?"-".concat(e):"","-").concat((t=(new Date).getTime(),"xxxxxxxx".replace(/[x]/g,(function(e){var n=16*Math.random();return n=(t+n)%16|0,t=Math.floor(t/16),("x"==e?n:7&n|8).toString(16)}))));var 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.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.typeIs=u,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@leafygreen-ui/lib", | ||
"version": "9.3.0", | ||
"version": "9.4.0", | ||
"description": "leafyGreen UI Kit Internal Library", | ||
@@ -30,3 +30,4 @@ "main": "./dist/index.js", | ||
"polished": "^4.1.3", | ||
"prop-types": "^15.0.0" | ||
"prop-types": "^15.0.0", | ||
"lodash": "^4.17.21" | ||
}, | ||
@@ -33,0 +34,0 @@ "gitHead": "dd71a2d404218ccec2e657df9c0263dc1c15b9e0", |
@@ -1,7 +0,10 @@ | ||
import { once } from 'lodash'; | ||
import once from 'lodash/once'; | ||
import * as typeIs from './typeIs'; | ||
import createUniqueClassName from './createUniqueClassName'; | ||
import getNodeTextContent from './getNodeTextContent'; | ||
import DarkModeProps, { Theme, ThemeType } from './DarkModeProps'; | ||
export { typeIs, createUniqueClassName, getNodeTextContent }; | ||
export { typeIs, createUniqueClassName, getNodeTextContent, Theme }; | ||
export type { DarkModeProps, ThemeType }; | ||
/** Helper type to extract an HTML element's valid props */ | ||
@@ -8,0 +11,0 @@ export type HTMLElementProps< |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89886
25
604
6
+ Addedlodash@^4.17.21
+ Addedlodash@4.17.21(transitive)