@nimbus-ds/textarea 2.1.0 → 2.3.0-rc.1

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,11 +2,17 @@
2
2
 
3
3
  The Textarea component allows the user to enter or edit information in long text format.
4
4
 
5
+ ## 2023-07-18 `2.2.0`
6
+
7
+ #### 🎉 New features
8
+
9
+ - Added `ref` property to `Textarea` component API. ([#180](https://github.com/TiendaNube/nimbus-design-system/pull/180) by [@juniorconquista](https://github.com/juniorconquista)).
10
+
5
11
  ## 2023-02-23 `2.1.0`
6
12
 
7
13
  ### 🎉 New features
8
14
 
9
- - Added server side-rendering support to component. ([#99](https://github.com/TiendaNube/nimbus-design-system/pull/99) by [@juniorconquista](https://github.com/juniorconquista))
15
+ - Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
10
16
 
11
17
  ## 2022-12-22 `2.0.0`
12
18
 
@@ -25,6 +31,7 @@ The Textarea component allows the user to enter or edit information in long text
25
31
  - Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
26
32
  - Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
27
33
  - Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
34
+ - Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
28
35
  - Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
29
36
 
30
37
  ## 2022-10-17 `1.0.0`
@@ -0,0 +1,53 @@
1
+ # Changelog
2
+
3
+ The Textarea component allows the user to enter or edit information in long text format.
4
+
5
+ ## 2023-07-18 `2.2.0`
6
+
7
+ #### 🎉 New features
8
+
9
+ - Added `ref` property to `Textarea` component API. ([#180](https://github.com/TiendaNube/nimbus-design-system/pull/180) by [@juniorconquista](https://github.com/juniorconquista)).
10
+
11
+ ## 2023-02-23 `2.1.0`
12
+
13
+ ### 🎉 New features
14
+
15
+ - Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
16
+
17
+ ## 2022-12-22 `2.0.0`
18
+
19
+ ### 💡 Others
20
+
21
+ - 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))
22
+
23
+ ## 2022-12-07 `1.1.0`
24
+
25
+ ### 🎉 New features
26
+
27
+ - 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))
28
+
29
+ ### 📚 3rd party library updates
30
+
31
+ - Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
32
+ - Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
33
+ - Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
34
+ - Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
35
+ - Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
36
+
37
+ ## 2022-10-17 `1.0.0`
38
+
39
+ ### 📚 3rd party library updates
40
+
41
+ - Added `terser-webpack-plugin@5.3.5`. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
42
+ - Added `ts-loader@9.3.1`. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
43
+ - Added `typescript@4.7.4`. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
44
+ - Added `webpack@5.74.0`. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
45
+ - Added `webpack-cli@4.10.0`. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
46
+
47
+ ### 🎉 New features
48
+
49
+ - Added `appearance`, `lines` and `id` properties to the component Textarea. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
50
+ - Added stories on component. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
51
+ - Created new `Textarea.Skeleton` subcomponent. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
52
+ - Added `width` property to the subcomponent `Textarea.Skeleton`. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
53
+ - Added stories on subcomponent `Textarea.Skeleton`. ([#41](https://github.com/TiendaNube/nimbus-design-system/pull/41) by [@juanchigallego](https://github.com/juanchigallego))
package/dist/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # `@nimbus-ds/textarea`
2
+
3
+ [![@nimbus-ds/textarea](https://img.shields.io/npm/v/@nimbus-ds/textarea?label=%40nimbus-ds%2Ftextarea)](https://www.npmjs.com/package/@nimbus-ds/textarea)
4
+
5
+ The Textarea component allows the user to enter or edit information in long text format.
6
+
7
+ ## Implementation
8
+
9
+ **Install** the component via terminal.
10
+
11
+ ```bash
12
+ $ yarn add @nimbus-ds/textarea
13
+ # or
14
+ $ npm install @nimbus-ds/textarea
15
+ ```
16
+
17
+ ### Component Anatomy
18
+
19
+ The component consists of a text field of two or more lines with a border.
20
+
21
+ ## Guidelines
22
+
23
+ We use the Textarea component when we need the user to enter information in text or numeric format that occupies more than one line.
24
+
25
+ ### Validation
26
+
27
+ Textareas have the possibility of visually validating the information entered, whether they are correct or not.
28
+
29
+ For this, the component's border changes color as information is entered, and comes with an icon and help text that can reinforce the message.
30
+
31
+ Keep in mind that it's important not to rely solely on color to convey a state, as some users may have difficulty seeing colors correctly.
32
+
33
+ ### Content
34
+
35
+ Textareas have the possibility to visually validate the information entered, whether they are correct or not.
36
+
37
+ Firstly, we must always accompany the Textarea with a label, which properly informs the data that must be inserted. The label must be visible at all times, as it helps the user to always understand the information being requested.
38
+
39
+ Additionally, we may use the placeholder to provide more context or an example to help the user better understand what information is being requested. This placeholder must not be conditioned to the type of information that must be inserted, since it disappears after typing.
40
+
41
+ When validating the information, we have the possibility of showing an error message to indicate to the user that the entered data is incorrect. In addition to the message, we also have an icon that appears automatically to give a visual clue of what is happening.
42
+
43
+ ### Recommendation for use
44
+
45
+ - Insert long texts into a form
46
+ - Insert texts with more than one line in forms
47
+ - Insert product descriptions
48
+
49
+ ## Related Components
50
+
51
+ - Input - Can be used when the information to be inserted fits in a single line.
52
+
53
+ ## Usage
54
+
55
+ View docs [here](https://nimbus.nuvemshop.com.br/documentation/atomic-components/textarea).
56
+
57
+ <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.d.ts CHANGED
@@ -1,31 +1,51 @@
1
- // Generated by dts-bundle-generator v7.1.0
1
+ // Generated by dts-bundle-generator v7.2.0
2
2
 
3
3
  import React from 'react';
4
- import { HTMLAttributes, TextareaHTMLAttributes } from 'react';
4
+ import { ComponentPropsWithRef, HTMLAttributes } from 'react';
5
5
 
6
- export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
7
- /** width alignment in content */
6
+ export interface SkeletonProperties {
7
+ /**
8
+ * Width of the skeleton. Useful when the skeleton is inside an inline element with no width of its own.
9
+ */
8
10
  width: string;
9
- /** height alignment in content */
11
+ /**
12
+ * Height of the skeleton. Useful when you don't want to adapt the skeleton to a text element but for instance a card.
13
+ */
10
14
  height: string;
11
- /** borderRadius alignment in content */
15
+ /**
16
+ * The border radius of the skeleton.
17
+ */
12
18
  borderRadius?: string;
13
- }
14
- export type TextareaSkeletonProps = Partial<Pick<SkeletonProps, "width">> & {
19
+ /**
20
+ * This is an attribute used to identify a DOM node for testing purposes.
21
+ */
15
22
  "data-testid"?: string;
16
- };
23
+ }
24
+ export type SkeletonProps = SkeletonProperties & HTMLAttributes<HTMLDivElement>;
25
+ export type TextareaSkeletonProperties = Partial<Pick<SkeletonProps, "width" | "data-testid">>;
26
+ export type TextareaSkeletonProps = TextareaSkeletonProperties;
17
27
  declare const TextareaSkeleton: React.FC<TextareaSkeletonProps>;
18
28
  export interface TextareaComponents {
19
29
  Skeleton: typeof TextareaSkeleton;
20
30
  }
21
- export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
31
+ export interface TextareaProperties {
32
+ /**
33
+ * Change the visual style of the textarea.
34
+ * @default neutral
35
+ */
22
36
  appearance?: "neutral" | "success" | "warning" | "danger";
23
- /** Number of lines to be rendered for the user to input text */
37
+ /**
38
+ * Number of lines to be rendered for the user to input text
39
+ * @default 2
40
+ */
24
41
  lines?: number;
25
- /** ID of the textarea element */
42
+ /**
43
+ * ID of the textarea
44
+ * */
26
45
  id: string;
27
46
  }
28
- export declare const Textarea: React.FC<TextareaProps> & TextareaComponents;
47
+ export declare const Textarea: React.ForwardRefExoticComponent<TextareaProperties & React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.InputHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>> & TextareaComponents;
48
+ export type TextareaProps = ComponentPropsWithRef<typeof Textarea>;
29
49
 
30
50
  export {
31
51
  Textarea as default,
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/skeleton")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/styles","@nimbus-ds/skeleton"],t):"object"==typeof exports?exports["@nimbus-ds/textarea"]=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/textarea"]=t(e.react,e["@nimbus-ds/styles"],e["@nimbus-ds/skeleton"])}(global,((e,t,r)=>(()=>{"use strict";var n={104:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Textarea=void 0;const n=r(15).__importDefault(r(156)),o=r(990),a=r(612),i=({className:e,style:t,appearance:r="neutral",lines:a=2,id:i,...u})=>n.default.createElement("textarea",{...u,className:o.textarea.classnames.appearance[r],rows:a,id:i});t.Textarea=i,i.displayName="Textarea",(i.Skeleton=a.TextareaSkeleton).displayName="Textarea.Skeleton"},967:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextareaSkeleton=void 0;const n=r(15).__importDefault(r(156)),o=r(678);t.TextareaSkeleton=({width:e,"data-testid":t})=>n.default.createElement(o.Skeleton,{width:e??"15rem",height:"3.375rem",borderRadius:"0.5rem","data-testid":t})},701:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextareaSkeleton=void 0;const n=r(967);var o=r(967);Object.defineProperty(t,"TextareaSkeleton",{enumerable:!0,get:function(){return o.TextareaSkeleton}}),t.default=n.TextareaSkeleton},612:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(15).__exportStar(r(701),t)},15:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>x,__asyncGenerator:()=>w,__asyncValues:()=>O,__await:()=>m,__awaiter:()=>f,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>E,__classPrivateFieldSet:()=>k,__createBinding:()=>p,__decorate:()=>u,__exportStar:()=>y,__extends:()=>o,__generator:()=>s,__importDefault:()=>S,__importStar:()=>P,__makeTemplateObject:()=>j,__metadata:()=>l,__param:()=>c,__read:()=>b,__rest:()=>i,__spread:()=>v,__spreadArray:()=>h,__spreadArrays:()=>_,__values:()=>d});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 u(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 u=e.length-1;u>=0;u--)(o=e[u])&&(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 c(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function f(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(e){a(e)}}function u(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))}function s(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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var p=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 y(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||p(t,e,r)}function d(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 b(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 v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function _(){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,u=a.length;i<u;i++,o++)n[o]=a[i];return n}function h(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 m(e){return this instanceof m?(this.v=e,this):new m(e)}function w(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||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof m?Promise.resolve(r.value.v).then(c,l):f(a[0][2],r)}catch(e){f(a[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}}function x(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:m(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=d(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 j(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var g=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function P(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)&&p(t,e,r);return g(t,e),t}function S(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 k(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 E(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)}},678:e=>{e.exports=r},990:e=>{e.exports=t},156:t=>{t.exports=e}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.Textarea=void 0;const t=a(104);var r=a(104);Object.defineProperty(e,"Textarea",{enumerable:!0,get:function(){return r.Textarea}}),e.default=t.Textarea})(),i})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/styles","@nimbus-ds/skeleton"],t):"object"==typeof exports?exports["@nimbus-ds/textarea"]=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/textarea"]=t(e.react,e["@nimbus-ds/styles"],e["@nimbus-ds/skeleton"])}(global,((e,t,r)=>(()=>{"use strict";var n={192:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Textarea=void 0;const n=r(769).__importStar(r(155)),o=r(367),a=r(337),i=(0,n.forwardRef)((({className:e,style:t,appearance:r="neutral",lines:a=2,id:i,...c},s)=>n.default.createElement("textarea",{...c,ref:s,className:o.textarea.classnames.appearance[r],rows:a,id:i})));t.Textarea=i,i.displayName="Textarea",i.Skeleton=a.TextareaSkeleton,i.Skeleton.displayName="Textarea.Skeleton"},758:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextareaSkeleton=void 0;const n=r(769).__importDefault(r(155)),o=r(334);t.TextareaSkeleton=({width:e,"data-testid":t})=>n.default.createElement(o.Skeleton,{width:e??"15rem",height:"3.375rem",borderRadius:"0.5rem","data-testid":t})},427:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextareaSkeleton=void 0;const n=r(758);var o=r(758);Object.defineProperty(t,"TextareaSkeleton",{enumerable:!0,get:function(){return o.TextareaSkeleton}}),t.default=n.TextareaSkeleton},337:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(769).__exportStar(r(427),t)},334:e=>{e.exports=r},367:e=>{e.exports=t},155:t=>{t.exports=e},769:(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>A,__assign:()=>a,__asyncDelegator:()=>S,__asyncGenerator:()=>j,__asyncValues:()=>P,__await:()=>x,__awaiter:()=>y,__classPrivateFieldGet:()=>I,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>R,__createBinding:()=>b,__decorate:()=>c,__disposeResources:()=>q,__esDecorate:()=>u,__exportStar:()=>v,__extends:()=>o,__generator:()=>_,__importDefault:()=>D,__importStar:()=>k,__makeTemplateObject:()=>T,__metadata:()=>d,__param:()=>s,__propKey:()=>f,__read:()=>m,__rest:()=>i,__runInitializers:()=>l,__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 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 x(e){return this instanceof x?(this.v=e,this):new x(e)}function j(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 x?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 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:x(e[n](t)),done:!1}:o?o(t):t}:o}}function P(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 T(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 k(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 D(e){return e&&e.__esModule?e:{default:e}}function I(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 R(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)}function A(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 F="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 q(e){function t(t){e.error=e.hasError?new F(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 C={__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:x,__asyncGenerator:j,__asyncDelegator:S,__asyncValues:P,__makeTemplateObject:T,__importStar:k,__importDefault:D,__classPrivateFieldGet:I,__classPrivateFieldSet:R,__classPrivateFieldIn:M,__addDisposableResource:A,__disposeResources:q}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.Textarea=void 0;const t=a(192);var r=a(192);Object.defineProperty(e,"Textarea",{enumerable:!0,get:function(){return r.Textarea}}),e.default=t.Textarea})(),i})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimbus-ds/textarea",
3
- "version": "2.1.0",
3
+ "version": "2.3.0-rc.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -9,12 +9,12 @@
9
9
  ],
10
10
  "sideEffects": false,
11
11
  "scripts": {
12
- "build": "webpack",
12
+ "build": "yarn g:webpack",
13
13
  "clean": "rm -rf dist",
14
14
  "version": "yarn version"
15
15
  },
16
16
  "dependencies": {
17
- "@nimbus-ds/skeleton": "^2.1.0"
17
+ "@nimbus-ds/skeleton": "^3.1.0-rc.5"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "react": "^16.8 || ^17.0 || ^18.0",
@@ -29,6 +29,7 @@
29
29
  "url": "https://github.com/TiendaNube/nimbus-design-system/issues"
30
30
  },
31
31
  "devDependencies": {
32
- "webpack": "^5.74.0"
33
- }
32
+ "@nimbus-ds/webpack": "^1.5.0-rc.1"
33
+ },
34
+ "stableVersion": "2.2.0"
34
35
  }