@nimbus-ds/icon-button 4.1.1-rc.3 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,9 +2,15 @@
2
2
 
3
3
  Icons are used to visually communicate core parts of the product and available actions. They can act as wayfinding tools to help merchants more easily understand where they are in the product, and common interaction patterns that are available.
4
4
 
5
- ## 2023-10-04 `4.1.1`
5
+ ## 2025-03-18 `4.1.2`
6
6
 
7
- - Update component with new color tokens from `@nimbus-ds/tokens` package. ([#213](https://github.com/TiendaNube/nimbus-design-system/pull/213) by [@juanchigallego](https://github.com/juanchigallego))
7
+ ### 💡 Others
8
+
9
+ - Rebuild after build process changes to add support for modular imports and Server Components. ([#276](https://github.com/TiendaNube/nimbus-design-system/pull/276) by [@joacotornello](https://github.com/joacotornello))
10
+
11
+ ## 2023-12-22 `4.1.1`
12
+
13
+ - Update component with new color tokens from `@nimbus-ds/tokens` package. ([#215](https://github.com/TiendaNube/nimbus-design-system/pull/215) by [@juanchigallego](https://github.com/juanchigallego))
8
14
 
9
15
  ## 2023-04-13 `4.1.0`
10
16
 
@@ -0,0 +1,113 @@
1
+ # Changelog
2
+
3
+ Icons are used to visually communicate core parts of the product and available actions. They can act as wayfinding tools to help merchants more easily understand where they are in the product, and common interaction patterns that are available.
4
+
5
+ ## 2025-03-18 `4.1.2`
6
+
7
+ ### 💡 Others
8
+
9
+ - Rebuild after build process changes to add support for modular imports and Server Components. ([#276](https://github.com/TiendaNube/nimbus-design-system/pull/276) by [@joacotornello](https://github.com/joacotornello))
10
+
11
+ ## 2023-12-22 `4.1.1`
12
+
13
+ - Update component with new color tokens from `@nimbus-ds/tokens` package. ([#215](https://github.com/TiendaNube/nimbus-design-system/pull/215) by [@juanchigallego](https://github.com/juanchigallego))
14
+
15
+ ## 2023-04-13 `4.1.0`
16
+
17
+ #### 🎉 New features
18
+
19
+ - Added `width` and `height` properties to the `IconButton.Skeleton` subcomponent api. ([#149](https://github.com/TiendaNube/nimbus-design-system/pull/149) by [@juniorconquista](https://github.com/juniorconquista))
20
+
21
+ ## 2023-03-13 `4.0.0`
22
+
23
+ ### 🛠 Breaking changes
24
+
25
+ - Changed the `borderColor` properties to `neutral-surface`, `neutral-interactive` and `neutral-surfaceHighlight`. ([#110](https://github.com/TiendaNube/nimbus-design-system/pull/110) by [@juniorconquista](https://github.com/juniorconquista))
26
+ - Changed the `backgroundColor` properties to `neutral-surface`, `neutral-surfaceHighlight`, `neutral-interactive`, `neutral-interactiveHover`, `neutral-interactivePressed` and `primary-interactive`. ([#110](https://github.com/TiendaNube/nimbus-design-system/pull/110) by [@juniorconquista](https://github.com/juniorconquista))
27
+
28
+ ### 💡 Others
29
+
30
+ - Refactored style classes to have more semantic names. ([#110](https://github.com/TiendaNube/nimbus-design-system/pull/110) by [@juniorconquista](https://github.com/juniorconquista))
31
+
32
+ ## 2023-02-23 `3.2.0`
33
+
34
+ ### 🎉 New features
35
+
36
+ - Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
37
+
38
+ ## 2023-02-16 `3.1.0`
39
+
40
+ ### 🎉 New features
41
+
42
+ - Removed external dependency from `@tiendanube/icons` package to now use internal `@nimbus-ds/icons` package. ([#94](https://github.com/TiendaNube/nimbus-design-system/pull/#94) by [@juniorconquista](https://github.com/juniorconquista))
43
+
44
+ ### 📚 3rd party library updates
45
+
46
+ - Removed `@tiendanube/icons@0.3.1`. ([#94](https://github.com/TiendaNube/nimbus-design-system/pull/#94) by [@juniorconquista](https://github.com/juniorconquista))
47
+
48
+ ## 2022-12-22 `3.0.0`
49
+
50
+ ### 💡 Others
51
+
52
+ - Removed direct dependency on `nimbus-ds/styles` package from component build. ([#69](https://github.com/TiendaNube/nimbus-design-system/pull/69) by [@juniorconquista](https://github.com/juniorconquista))
53
+
54
+ ## 2022-12-16 `2.1.1`
55
+
56
+ ### 🎉 New features
57
+
58
+ - Update color rules. ([#67](https://github.com/TiendaNube/nimbus-design-system/pull/67) by [@juanchigallego](https://github.com/juanchigallego))
59
+
60
+ ## 2022-12-07 `2.1.0`
61
+
62
+ ### 🎉 New features
63
+
64
+ - Changed build build to consume inner package `@nimbus-ds/webpack`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
65
+
66
+ ### 📚 3rd party library updates
67
+
68
+ - Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
69
+ - Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
70
+ - Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
71
+ - Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
72
+ - Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
73
+
74
+ ## 2022-12-01 `2.0.0`
75
+
76
+ ### 🎉 New features
77
+
78
+ - Added `size`, `backgroundColor` and `borderColor` properties to the component. ([#61](https://github.com/TiendaNube/nimbus-design-system/pull/61) by [@juniorconquista](https://github.com/juniorconquista))
79
+
80
+ ### 💡 Others
81
+
82
+ - Changed component base typing to extends to native button types. ([#61](https://github.com/TiendaNube/nimbus-design-system/pull/61) by [@juniorconquista](https://github.com/juniorconquista))
83
+
84
+ ### 🎉 New features
85
+
86
+ ## 2022-11-18 `1.1.0`
87
+
88
+ ### 📚 3rd party library updates
89
+
90
+ - Updated `@tiendanube/icons@0.3.1`. ([#57](https://github.com/TiendaNube/nimbus-design-system/pull/#57) by [@juniorconquista](https://github.com/juniorconquista))
91
+
92
+ ## 2022-11-16 `1.0.1`
93
+
94
+ ### 🐛 Bug fixes
95
+
96
+ - Updating internal version of `@nimbus-ds/icon` package. ([#56](https://github.com/TiendaNube/nimbus-design-system/pull/56) by [@juniorconquista](https://github.com/juniorconquista))
97
+
98
+ ## 2022-09-27 `1.0.0`
99
+
100
+ ### 📚 3rd party library updates
101
+
102
+ - Added `terser-webpack-plugin@5.3.5`. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
103
+ - Added `ts-loader@9.3.1`. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
104
+ - Added `typescript@4.7.4`. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
105
+ - Added `webpack@5.74.0`. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
106
+ - Added `webpack-cli@4.10.0`. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
107
+
108
+ ### 🎉 New features
109
+
110
+ - Added `source` and `as` properties to the Component. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
111
+ - Added stories on Component. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
112
+ - Created new `IconButton.Skeleton` subcomponent. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
113
+ - Added stories on Component `IconButton.Skeleton`. ([#30](https://github.com/TiendaNube/nimbus-design-system/pull/30) by [@juniorconquista](https://github.com/juniorconquista))
package/dist/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # `@nimbus-ds/icon-button`
2
+
3
+ [![@nimbus-ds/icon-button](https://img.shields.io/npm/v/@nimbus-ds/icon-button?label=%40nimbus-ds%2Ficon-button)](https://www.npmjs.com/package/@nimbus-ds/icon-button)
4
+
5
+ Icons are used to visually communicate core parts of the product and available actions. They can act as wayfinding tools to help merchants more easily understand where they are in the product, and common interaction patterns that are available.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ $ yarn add @nimbus-ds/icon-button
11
+ # or
12
+ $ npm install @nimbus-ds/icon-button
13
+ ```
14
+
15
+ ### Component Anatomy
16
+
17
+ The component consists of a circular shape and an icon.
18
+
19
+ ## Guidelines
20
+
21
+ We use the Icon Button when we have a space limitation or an action can be perfectly represented by an icon, its use can be combined with the Tooltip, showing a brief description of the action to be performed.
22
+
23
+ ### Icon choice
24
+
25
+ The icon must make it clear what the Icon Button action is without the need for text, if it is not possible to summarize the action in an icon, we should consider using another component.
26
+
27
+ ### AriaLabel
28
+
29
+ This component does not have visible text, however it has a tag to facilitate its identification by people with some kind of visual or cognitive limitation. That's why we need to add a description that makes it clear what action is behind the chosen icon.
30
+
31
+ ### Related components
32
+
33
+ Button component - It is used for changes to state or page changes, in contexts where there is no space limitation or where only an icon is not able to communicate its action.
34
+
35
+ ## Usage
36
+
37
+ View docs [here](https://nimbus.nuvemshop.com.br/documentation/atomic-components/icon-button).
38
+
39
+ <img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/icon"),require("@nimbus-ds/skeleton")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/styles","@nimbus-ds/icon","@nimbus-ds/skeleton"],t):"object"==typeof exports?exports["@nimbus-ds/icon-button"]=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/icon"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/icon-button"]=t(e.react,e["@nimbus-ds/styles"],e["@nimbus-ds/icon"],e["@nimbus-ds/skeleton"])}(global,((e,t,r,n)=>(()=>{"use strict";var o={337:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconButton=void 0;const n=r(15).__importDefault(r(156)),o=r(990),a=r(633),i=r(612),c=({className:e,style:t,as:r="button",size:i="2.75rem",backgroundColor:c={xs:"neutral-surface",active:"neutral-interactive",hover:"neutral-surfaceHighlight"},borderColor:u={xs:"neutral-interactive",active:"neutral-interactivePressed",hover:"neutral-interactiveHover",focus:"primary-interactive"},source:l,...s})=>{const{className:f,style:p,otherProps:d}=o.iconButton.sprinkle({...s,size:i,borderColor:u,backgroundColor:c});return n.default.createElement(r,{className:[o.iconButton.classnames.base,f].join(" "),style:p,...d},n.default.createElement(a.Icon,{"data-testid":"icon-element",color:"neutral-textHigh",cursor:"pointer",source:l}))};t.IconButton=c,c.Skeleton=i.IconButtonSkeleton,c.displayName="IconButton",c.Skeleton.displayName="IconButton.Skeleton"},803:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconButtonSkeleton=void 0;const n=r(15).__importDefault(r(156)),o=r(678);t.IconButtonSkeleton=({width:e,height:t,"data-testid":r})=>n.default.createElement(o.Skeleton,{width:e??"2.75rem",height:t??"2.75rem",borderRadius:"100%","data-testid":r})},621:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconButtonSkeleton=void 0;const n=r(803);var o=r(803);Object.defineProperty(t,"IconButtonSkeleton",{enumerable:!0,get:function(){return o.IconButtonSkeleton}}),t.default=n.IconButtonSkeleton},612:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(15).__exportStar(r(621),t)},15:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>S,__asyncGenerator:()=>P,__asyncValues:()=>x,__await:()=>j,__awaiter:()=>y,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>D,__createBinding:()=>b,__decorate:()=>c,__esDecorate:()=>l,__exportStar:()=>v,__extends:()=>o,__generator:()=>_,__importDefault:()=>E,__importStar:()=>B,__makeTemplateObject:()=>I,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>m,__rest:()=>i,__runInitializers:()=>s,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>O,__spreadArrays:()=>g,__values:()=>h,default:()=>C});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function u(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",s=!t&&e?n.static?e:e.prototype:null,f=t||(s?Object.getOwnPropertyDescriptor(s,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[l],y);if("accessor"===u){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(c=i(b.get))&&(f.get=c),(c=i(b.set))&&(f.set=c),(c=i(b.init))&&o.unshift(c)}else(c=i(b))&&("field"===u?o.unshift(c):f[l]=c)}s&&Object.defineProperty(s,n.name,f),p=!0}function s(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{u(n.next(e))}catch(e){a(e)}}function c(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}u((n=n.apply(e,t||[])).next())}))}function _(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function j(e){return this instanceof j?(this.v=e,this):new j(e)}function P(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(u,l):s(a[0][2],r)}catch(e){s(a[0][3],e)}var r}function u(e){c("next",e)}function l(e){c("throw",e)}function s(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function B(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return k(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function D(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}const C={__extends:o,__assign:a,__rest:i,__decorate:c,__param:u,__metadata:d,__awaiter:y,__generator:_,__createBinding:b,__exportStar:v,__values:h,__read:m,__spread:w,__spreadArrays:g,__spreadArray:O,__await:j,__asyncGenerator:P,__asyncDelegator:S,__asyncValues:x,__makeTemplateObject:I,__importStar:B,__importDefault:E,__classPrivateFieldGet:T,__classPrivateFieldSet:D,__classPrivateFieldIn:M}},633:e=>{e.exports=r},678:e=>{e.exports=n},990:e=>{e.exports=t},156:t=>{t.exports=e}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.IconButton=void 0;const t=i(337);var r=i(337);Object.defineProperty(e,"IconButton",{enumerable:!0,get:function(){return r.IconButton}}),e.default=t.IconButton})(),c})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/icon"),require("@nimbus-ds/skeleton")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/styles","@nimbus-ds/icon","@nimbus-ds/skeleton"],t):"object"==typeof exports?exports["@nimbus-ds/icon-button"]=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/icon"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/icon-button"]=t(e.react,e["@nimbus-ds/styles"],e["@nimbus-ds/icon"],e["@nimbus-ds/skeleton"])}(global,((e,t,r,n)=>(()=>{"use strict";var o={69:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconButton=void 0;const n=r(769).__importDefault(r(155)),o=r(367),a=r(208),i=r(337),c=({className:e,style:t,as:r="button",size:i="2.75rem",backgroundColor:c={xs:"neutral-surface",active:"neutral-interactive",hover:"neutral-surfaceHighlight"},borderColor:s={xs:"neutral-interactive",active:"neutral-interactivePressed",hover:"neutral-interactiveHover",focus:"primary-interactive"},source:u,...l})=>{const{className:f,style:p,otherProps:d}=o.iconButton.sprinkle({...l,size:i,borderColor:s,backgroundColor:c});return n.default.createElement(r,{className:[o.iconButton.classnames.base,f].join(" "),style:p,...d},n.default.createElement(a.Icon,{"data-testid":"icon-element",color:"neutral-textHigh",cursor:"pointer",source:u}))};t.IconButton=c,c.Skeleton=i.IconButtonSkeleton,c.displayName="IconButton",c.Skeleton.displayName="IconButton.Skeleton"},636:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconButtonSkeleton=void 0;const n=r(769).__importDefault(r(155)),o=r(334);t.IconButtonSkeleton=({width:e,height:t,"data-testid":r})=>n.default.createElement(o.Skeleton,{width:e??"2.75rem",height:t??"2.75rem",borderRadius:"100%","data-testid":r})},996:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconButtonSkeleton=void 0;const n=r(636);var o=r(636);Object.defineProperty(t,"IconButtonSkeleton",{enumerable:!0,get:function(){return o.IconButtonSkeleton}}),t.default=n.IconButtonSkeleton},337:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(769).__exportStar(r(996),t)},208:e=>{e.exports=r},334:e=>{e.exports=n},367:e=>{e.exports=t},155:t=>{t.exports=e},769:(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>M,__assign:()=>a,__asyncDelegator:()=>P,__asyncGenerator:()=>S,__asyncValues:()=>x,__await:()=>j,__awaiter:()=>y,__classPrivateFieldGet:()=>B,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>D,__createBinding:()=>b,__decorate:()=>c,__disposeResources:()=>C,__esDecorate:()=>u,__exportStar:()=>v,__extends:()=>o,__generator:()=>_,__importDefault:()=>T,__importStar:()=>I,__makeTemplateObject:()=>k,__metadata:()=>d,__param:()=>s,__propKey:()=>f,__read:()=>m,__rest:()=>i,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>O,__spreadArrays:()=>g,__values:()=>h,default:()=>q});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function s(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var _ in n)y[_]="access"===_?{}:n[_];for(var _ in n.access)y.access[_]=n.access[_];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,r[d])("accessor"===s?{get:f.get,set:f.set}:f[u],y);if("accessor"===s){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(c=i(b.get))&&(f.get=c),(c=i(b.set))&&(f.set=c),(c=i(b.init))&&o.unshift(c)}else(c=i(b))&&("field"===s?o.unshift(c):f[u]=c)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function c(e){try{s(n.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((n=n.apply(e,t||[])).next())}))}function _(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function j(e){return this instanceof j?(this.v=e,this):new j(e)}function S(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(s,u):l(a[0][2],r)}catch(e){l(a[0][3],e)}var r}function s(e){c("next",e)}function u(e){c("throw",e)}function l(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return E(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function B(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function D(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function M(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var A="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function C(e){function t(t){e.error=e.hasError?new A(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const q={__extends:o,__assign:a,__rest:i,__decorate:c,__param:s,__metadata:d,__awaiter:y,__generator:_,__createBinding:b,__exportStar:v,__values:h,__read:m,__spread:w,__spreadArrays:g,__spreadArray:O,__await:j,__asyncGenerator:S,__asyncDelegator:P,__asyncValues:x,__makeTemplateObject:k,__importStar:I,__importDefault:T,__classPrivateFieldGet:B,__classPrivateFieldSet:D,__classPrivateFieldIn:R,__addDisposableResource:M,__disposeResources:C}}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.IconButton=void 0;const t=i(69);var r=i(69);Object.defineProperty(e,"IconButton",{enumerable:!0,get:function(){return r.IconButton}}),e.default=t.IconButton})(),c})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimbus-ds/icon-button",
3
- "version": "4.1.1-rc.3",
3
+ "version": "4.1.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -14,8 +14,8 @@
14
14
  "version": "yarn version"
15
15
  },
16
16
  "dependencies": {
17
- "@nimbus-ds/icon": "^3.0.0",
18
- "@nimbus-ds/skeleton": "^3.0.0"
17
+ "@nimbus-ds/icon": "^3.0.1",
18
+ "@nimbus-ds/skeleton": "^3.0.1"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": "^16.8 || ^17.0 || ^18.0",
@@ -30,8 +30,7 @@
30
30
  "url": "https://github.com/TiendaNube/nimbus-design-system/issues"
31
31
  },
32
32
  "devDependencies": {
33
- "@nimbus-ds/icons": "^1.5.0-rc.1",
34
- "@nimbus-ds/webpack": "^1.4.0"
35
- },
36
- "stableVersion": "4.1.0"
33
+ "@nimbus-ds/icons": "^1.6.1",
34
+ "@nimbus-ds/webpack": "^1.5.0"
35
+ }
37
36
  }