@leafygreen-ui/lib
Advanced tools
Comparing version 6.2.0 to 6.3.0
# @leafygreen-ui/lib | ||
## 6.3.0 | ||
### Minor Changes | ||
- 2f0775ec: Adds value for the left bracket key to enable easier handling of keyboard events for that key. | ||
## 6.2.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
function e(t){return(e="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)}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure 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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r(this,"value",0),r(this,"prefix",void 0),this.prefix=t}var o,a,i;return o=e,i=[{key:"create",value:function(t){var r,n=null!==(r=this.registry.get(t))&&void 0!==r?r:new e(t);return e.registry.set(t,n),n}},{key:"snapshot",value:function(){var e={};return this.registry.forEach((function(t){e[t.prefix]=t.value})),e}},{key:"restore",value:function(e){var t=this;this.registry.forEach((function(t){e&&t.prefix in e||(t.value=0)})),e&&Object.entries(e).forEach((function(e){var r,o=n(e,2),a=o[0],i=o[1];(null!==(r=t.registry.get(a))&&void 0!==r?r:t.create(a)).value=i}))}}],(a=[{key:"generate",value:function(){return"".concat(this.prefix,"-").concat(this.value++)}}])&&t(o.prototype,a),i&&t(o,i),e}();function i(e,t){e["aria-label"]||e["aria-labelledby"]||console.error("For screen-reader accessibility, aria-label or aria-labelledby must be provided".concat(t?" to ".concat(t):"","."))}function u(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}r(a,"registry",new Map);var c=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}});function l(t,r){return null!=t&&"object"===e(t)&&"type"in t&&t.type.displayName===r}function f(e){var t="data-leafygreen-ui";return{prop:r({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}}var y={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Enter:13,Escape:27,Space:32,Tab:9},s={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function p(e){throw Error("Received unhandled value: ".concat(e))}export{s as AriaCurrentValue,a as IdAllocator,f as createDataProp,p as enforceExhaustive,l as isComponentType,y as keyMap,c as typeIs,i as validateAriaLabelProps}; | ||
function e(t){return(e="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)}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure 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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r(this,"value",0),r(this,"prefix",void 0),this.prefix=t}var o,a,i;return o=e,i=[{key:"create",value:function(t){var r,n=null!==(r=this.registry.get(t))&&void 0!==r?r:new e(t);return e.registry.set(t,n),n}},{key:"snapshot",value:function(){var e={};return this.registry.forEach((function(t){e[t.prefix]=t.value})),e}},{key:"restore",value:function(e){var t=this;this.registry.forEach((function(t){e&&t.prefix in e||(t.value=0)})),e&&Object.entries(e).forEach((function(e){var r,o=n(e,2),a=o[0],i=o[1];(null!==(r=t.registry.get(a))&&void 0!==r?r:t.create(a)).value=i}))}}],(a=[{key:"generate",value:function(){return"".concat(this.prefix,"-").concat(this.value++)}}])&&t(o.prototype,a),i&&t(o,i),e}();function i(e,t){e["aria-label"]||e["aria-labelledby"]||console.error("For screen-reader accessibility, aria-label or aria-labelledby must be provided".concat(t?" to ".concat(t):"","."))}function u(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}r(a,"registry",new Map);var c=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}});function l(t,r){return null!=t&&"object"===e(t)&&"type"in t&&t.type.displayName===r}function f(e){var t="data-leafygreen-ui";return{prop:r({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}}var y={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,BracketLeft:91,Enter:13,Escape:27,Space:32,Tab:9},s={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"};function p(e){throw Error("Received unhandled value: ".concat(e))}export{s as AriaCurrentValue,a as IdAllocator,f as createDataProp,p as enforceExhaustive,l as isComponentType,y as keyMap,c as typeIs,i as validateAriaLabelProps}; | ||
//# sourceMappingURL=index.js.map |
@@ -71,10 +71,11 @@ /// <reference types="react" /> | ||
export declare const keyMap: { | ||
ArrowUp: number; | ||
ArrowDown: number; | ||
ArrowLeft: number; | ||
ArrowRight: number; | ||
Enter: number; | ||
Escape: number; | ||
Space: number; | ||
Tab: number; | ||
readonly ArrowUp: 38; | ||
readonly ArrowDown: 40; | ||
readonly ArrowLeft: 37; | ||
readonly ArrowRight: 39; | ||
readonly BracketLeft: 91; | ||
readonly Enter: 13; | ||
readonly Escape: 27; | ||
readonly Space: 32; | ||
readonly Tab: 9; | ||
}; | ||
@@ -81,0 +82,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={})}(this,(function(e){"use strict";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})(e)}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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}var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n(this,"value",0),n(this,"prefix",void 0),this.prefix=t}var t,a,i;return t=e,i=[{key:"create",value:function(t){var r,n=null!==(r=this.registry.get(t))&&void 0!==r?r:new e(t);return e.registry.set(t,n),n}},{key:"snapshot",value:function(){var e={};return this.registry.forEach((function(t){e[t.prefix]=t.value})),e}},{key:"restore",value:function(e){var t=this;this.registry.forEach((function(t){e&&t.prefix in e||(t.value=0)})),e&&Object.entries(e).forEach((function(e){var r,n=o(e,2),a=n[0],i=n[1];(null!==(r=t.registry.get(a))&&void 0!==r?r:t.create(a)).value=i}))}}],(a=[{key:"generate",value:function(){return"".concat(this.prefix,"-").concat(this.value++)}}])&&r(t.prototype,a),i&&r(t,i),e}();function u(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}n(i,"registry",new Map);var l=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}});e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.IdAllocator=i,e.createDataProp=function(e){var t="data-leafygreen-ui";return{prop:n({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}},e.enforceExhaustive=function(e){throw Error("Received unhandled value: ".concat(e))},e.isComponentType=function(e,r){return null!=e&&"object"===t(e)&&"type"in e&&e.type.displayName===r},e.keyMap={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Enter:13,Escape:27,Space:32,Tab:9},e.typeIs=l,e.validateAriaLabelProps=function(e,t){e["aria-label"]||e["aria-labelledby"]||console.error("For screen-reader accessibility, aria-label or aria-labelledby must be provided".concat(t?" to ".concat(t):"","."))},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/lib"]={})}(this,(function(e){"use strict";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})(e)}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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}var i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n(this,"value",0),n(this,"prefix",void 0),this.prefix=t}var t,a,i;return t=e,i=[{key:"create",value:function(t){var r,n=null!==(r=this.registry.get(t))&&void 0!==r?r:new e(t);return e.registry.set(t,n),n}},{key:"snapshot",value:function(){var e={};return this.registry.forEach((function(t){e[t.prefix]=t.value})),e}},{key:"restore",value:function(e){var t=this;this.registry.forEach((function(t){e&&t.prefix in e||(t.value=0)})),e&&Object.entries(e).forEach((function(e){var r,n=o(e,2),a=n[0],i=n[1];(null!==(r=t.registry.get(a))&&void 0!==r?r:t.create(a)).value=i}))}}],(a=[{key:"generate",value:function(){return"".concat(this.prefix,"-").concat(this.value++)}}])&&r(t.prototype,a),i&&r(t,i),e}();function u(e){return null!=e&&e.nodeType===Node.ELEMENT_NODE}n(i,"registry",new Map);var l=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}});e.AriaCurrentValue={Page:"page",Step:"step",Location:"location",Date:"date",Time:"time",True:"true",Unset:"false"},e.IdAllocator=i,e.createDataProp=function(e){var t="data-leafygreen-ui";return{prop:n({},t,e),selector:"[".concat(t,'="').concat(e,'"]')}},e.enforceExhaustive=function(e){throw Error("Received unhandled value: ".concat(e))},e.isComponentType=function(e,r){return null!=e&&"object"===t(e)&&"type"in e&&e.type.displayName===r},e.keyMap={ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,BracketLeft:91,Enter:13,Escape:27,Space:32,Tab:9},e.typeIs=l,e.validateAriaLabelProps=function(e,t){e["aria-label"]||e["aria-labelledby"]||console.error("For screen-reader accessibility, aria-label or aria-labelledby must be provided".concat(t?" to ".concat(t):"","."))},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@leafygreen-ui/lib", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "leafyGreen UI Kit Internal Library", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -102,2 +102,3 @@ import IdAllocator from './IdAllocator'; | ||
ArrowRight: 39, | ||
BracketLeft: 91, | ||
Enter: 13, | ||
@@ -107,3 +108,3 @@ Escape: 27, | ||
Tab: 9, | ||
}; | ||
} as const; | ||
@@ -110,0 +111,0 @@ /** |
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
206246
612