@leafygreen-ui/lib
Advanced tools
Comparing version 12.0.0 to 13.0.0
# @leafygreen-ui/lib | ||
## 13.0.0 | ||
### Major Changes | ||
- dd4f3da8: Update mapped value of `Space` in `keyMap` object from `space` to `' '`. | ||
## 12.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import e from"lodash/isObject";import t from"lodash/isUndefined";import n from"react";import r from"lodash/once";import{mergeWith as o}from"lodash";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,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,array:function(e){return null!=e&&e instanceof Array},button:function(e){return u(e)&&"button"===e.tagName.toLowerCase()},element:u,input:function(e){return u(e)&&"input"===e.tagName.toLowerCase()}}),p=new Map,d=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(l(n)))}else p.set(e,[t]);return t};function f(e){return"string"==typeof(t=e)||"number"==typeof t?e.toString().trim():Array.isArray(e)?e.map(f).join(" ").trim():function(e){return e&&"object"===a(e)&&e.props}(e)?f(e.props.children):"";var t}var m={Light:"light",Dark:"dark"},b=function(e){return e?m.Dark:m.Light};function y(e){return 1==new Set(e).size}function h(t,n){var r;return null!=t&&"object"===a(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)}var v=function(e,r){var o,a=null===(o=n.Children.map(e,(function(e){if(r.some((function(t){return h(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)===n.Children.count(e)||w.error("Children must be one of: ".concat(r.join(", ")),"Received children: ",e),a},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}},w={error:r(console.error),warn:r(console.warn),log:r(console.log)},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"}},A={"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"}},P=["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"],T=function(){return o(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 k(e){var t="data-leafygreen-ui";return{prop:i({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}}var E={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:"Space",Tab:"Tab"},j={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function D(e){throw Error("Received unhandled value: ".concat(e))}export{j as AriaCurrentValue,S as IntrinsicElements,T as StoryMeta,m as Theme,y as allEqual,w as consoleOnce,k as createDataProp,g as createSyntheticEvent,d as createUniqueClassName,D as enforceExhaustive,f as getNodeTextContent,b as getTheme,h as isComponentType,E as keyMap,C as storybookArgTypes,A as storybookExcludedArgTypes,P as storybookExcludedControlParams,s as typeIs,v as validateChildren}; | ||
import e from"lodash/isObject";import t from"lodash/isUndefined";import n from"react";import r from"lodash/once";import{mergeWith as o}from"lodash";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,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,array:function(e){return null!=e&&e instanceof Array},button:function(e){return u(e)&&"button"===e.tagName.toLowerCase()},element:u,input:function(e){return u(e)&&"input"===e.tagName.toLowerCase()}}),p=new Map,d=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(l(n)))}else p.set(e,[t]);return t};function f(e){return"string"==typeof(t=e)||"number"==typeof t?e.toString().trim():Array.isArray(e)?e.map(f).join(" ").trim():function(e){return e&&"object"===a(e)&&e.props}(e)?f(e.props.children):"";var t}var m={Light:"light",Dark:"dark"},b=function(e){return e?m.Dark:m.Light};function y(e){return 1==new Set(e).size}function h(t,n){var r;return null!=t&&"object"===a(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)}var v=function(e,r){var o,a=null===(o=n.Children.map(e,(function(e){if(r.some((function(t){return h(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)===n.Children.count(e)||w.error("Children must be one of: ".concat(r.join(", ")),"Received children: ",e),a},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}},w={error:r(console.error),warn:r(console.warn),log:r(console.log)},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"}},A={"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"}},P=["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"],T=function(){return o(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 k(e){var t="data-leafygreen-ui";return{prop:i({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}}var E={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:" ",Tab:"Tab"},j={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function D(e){throw Error("Received unhandled value: ".concat(e))}export{j as AriaCurrentValue,S as IntrinsicElements,T as StoryMeta,m as Theme,y as allEqual,w as consoleOnce,k as createDataProp,g as createSyntheticEvent,d as createUniqueClassName,D as enforceExhaustive,f as getNodeTextContent,b as getTheme,h as isComponentType,E as keyMap,C as storybookArgTypes,A as storybookExcludedArgTypes,P as storybookExcludedControlParams,s as typeIs,v as validateChildren}; | ||
//# sourceMappingURL=index.js.map |
@@ -88,3 +88,3 @@ /// <reference types="react" /> | ||
readonly Escape: "Escape"; | ||
readonly Space: "Space"; | ||
readonly Space: " "; | ||
readonly Tab: "Tab"; | ||
@@ -91,0 +91,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash/isObject"),require("lodash/isUndefined"),require("react"),require("lodash/once"),require("lodash")):"function"==typeof define&&define.amd?define(["exports","lodash/isObject","lodash/isUndefined","react","lodash/once","lodash"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e["/isObject"],e["/isUndefined"],e.react,e["/once"],e.lodash)}(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);function d(e){return d="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},d(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 f(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 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()}}),h=new Map;var g={Light:"light",Dark:"dark"};function v(e,t){var n;return null!=e&&"object"===d(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 C={error:s.default(console.error),warn:s.default(console.warn),log:s.default(console.log)},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"],w={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"}};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 a.mergeWith(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=C,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=function(e){var t,n,r=(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(r)}(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"===d(e)&&e.props}(t)?e(t.props.children):"";var n},e.getTheme=function(e){return e?g.Dark:g.Light},e.isComponentType=v,e.keyMap={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:"Space",Tab:"Tab"},e.storybookArgTypes=w,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=b,e.validateChildren=function(e,t){var n,r=null===(n=u.default.Children.map(e,(function(e){if(t.some((function(t){return v(e,t)})))return e})))||void 0===n?void 0:n.filter((function(e){return!c.default(e)}));return c.default(e)||(null==r?void 0:r.length)===u.default.Children.count(e)||C.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/isObject"),require("lodash/isUndefined"),require("react"),require("lodash/once"),require("lodash")):"function"==typeof define&&define.amd?define(["exports","lodash/isObject","lodash/isUndefined","react","lodash/once","lodash"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={},e["/isObject"],e["/isUndefined"],e.react,e["/once"],e.lodash)}(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);function d(e){return d="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},d(e)}function f(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 p(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 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()}}),h=new Map;var g={Light:"light",Dark:"dark"};function v(e,t){var n;return null!=e&&"object"===d(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 C={error:s.default(console.error),warn:s.default(console.warn),log:s.default(console.log)},w=["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:w,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=w,e.StoryMeta=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a.mergeWith(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=C,e.createDataProp=function(e){var t="data-leafygreen-ui";return{prop:f({},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=function(e){var t,n,r=(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(r)}(e);if(h.has(e)){var n=h.get(e);h.set(e,[t].concat(p(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"===d(e)&&e.props}(t)?e(t.props.children):"";var n},e.getTheme=function(e){return e?g.Dark:g.Light},e.isComponentType=v,e.keyMap={ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",Backspace:"Backspace",BracketLeft:"[",Delete:"Delete",Enter:"Enter",Escape:"Escape",Space:" ",Tab:"Tab"},e.storybookArgTypes=S,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=b,e.validateChildren=function(e,t){var n,r=null===(n=u.default.Children.map(e,(function(e){if(t.some((function(t){return v(e,t)})))return e})))||void 0===n?void 0:n.filter((function(e){return!c.default(e)}));return c.default(e)||(null==r?void 0:r.length)===u.default.Children.count(e)||C.error("Children must be one of: ".concat(t.join(", ")),"Received children: ",e),r}})); | ||
//# sourceMappingURL=index.js.map |
@@ -0,3 +1,4 @@ | ||
/// <reference types="react" /> | ||
declare const IntrinsicElements: Array<keyof JSX.IntrinsicElements>; | ||
export default IntrinsicElements; | ||
//# sourceMappingURL=IntrinsicElements.d.ts.map |
{ | ||
"name": "@leafygreen-ui/lib", | ||
"version": "12.0.0", | ||
"version": "13.0.0", | ||
"description": "leafyGreen UI Kit Internal Library", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -125,3 +125,3 @@ import * as typeIs from './typeIs'; | ||
Escape: 'Escape', | ||
Space: 'Space', | ||
Space: ' ', | ||
Tab: 'Tab', | ||
@@ -128,0 +128,0 @@ } 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 too big to display
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
353331
7653