@nimbus-ds/label 2.2.0 → 2.2.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 +14 -1
- package/dist/CHANGELOG.md +88 -0
- package/dist/README.md +34 -0
- package/dist/index.d.ts +34 -10
- package/dist/index.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Labels are mainly used to accompany form controls such as inputs, checkboxes, selects, etc. and describe the information that is required inside of each control. They can be visually hidden for UI requirements but can still be read by assistive technologies. They can also include icons or other components to support the relaying of content.
|
|
4
4
|
|
|
5
|
+
## 2026-01-13 `2.2.2`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Adds support for React 19. ([#404](https://github.com/TiendaNube/nimbus-design-system/pull/404) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
11
|
+
## 2025-03-18 `2.2.1`
|
|
12
|
+
|
|
13
|
+
### 💡 Others
|
|
14
|
+
|
|
15
|
+
- 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))
|
|
16
|
+
|
|
5
17
|
## 2023-02-23 `2.2.0`
|
|
6
18
|
|
|
7
19
|
### 🎉 New features
|
|
8
20
|
|
|
9
|
-
- Added server side-rendering support to component. ([#
|
|
21
|
+
- Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
|
|
10
22
|
|
|
11
23
|
## 2023-02-16 `2.1.0`
|
|
12
24
|
|
|
@@ -35,6 +47,7 @@ Labels are mainly used to accompany form controls such as inputs, checkboxes, se
|
|
|
35
47
|
- Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
36
48
|
- Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
37
49
|
- Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
50
|
+
- Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
38
51
|
- Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
39
52
|
|
|
40
53
|
## 2022-12-01 `1.4.0`
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Labels are mainly used to accompany form controls such as inputs, checkboxes, selects, etc. and describe the information that is required inside of each control. They can be visually hidden for UI requirements but can still be read by assistive technologies. They can also include icons or other components to support the relaying of content.
|
|
4
|
+
|
|
5
|
+
## 2026-01-13 `2.2.2`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Adds support for React 19. ([#404](https://github.com/TiendaNube/nimbus-design-system/pull/404) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
11
|
+
## 2025-03-18 `2.2.1`
|
|
12
|
+
|
|
13
|
+
### 💡 Others
|
|
14
|
+
|
|
15
|
+
- 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))
|
|
16
|
+
|
|
17
|
+
## 2023-02-23 `2.2.0`
|
|
18
|
+
|
|
19
|
+
### 🎉 New features
|
|
20
|
+
|
|
21
|
+
- Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
|
|
22
|
+
|
|
23
|
+
## 2023-02-16 `2.1.0`
|
|
24
|
+
|
|
25
|
+
### 🎉 New features
|
|
26
|
+
|
|
27
|
+
- 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))
|
|
28
|
+
|
|
29
|
+
### 📚 3rd party library updates
|
|
30
|
+
|
|
31
|
+
- Removed `@tiendanube/icons@0.3.1`. ([#94](https://github.com/TiendaNube/nimbus-design-system/pull/#94) by [@juniorconquista](https://github.com/juniorconquista))
|
|
32
|
+
|
|
33
|
+
## 2022-12-22 `2.0.0`
|
|
34
|
+
|
|
35
|
+
### 💡 Others
|
|
36
|
+
|
|
37
|
+
- 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))
|
|
38
|
+
|
|
39
|
+
## 2022-12-07 `1.5.0`
|
|
40
|
+
|
|
41
|
+
### 🎉 New features
|
|
42
|
+
|
|
43
|
+
- 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))
|
|
44
|
+
|
|
45
|
+
### 📚 3rd party library updates
|
|
46
|
+
|
|
47
|
+
- Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
48
|
+
- Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
49
|
+
- Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
50
|
+
- Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
51
|
+
- Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
|
|
52
|
+
|
|
53
|
+
## 2022-12-01 `1.4.0`
|
|
54
|
+
|
|
55
|
+
### 💡 Others
|
|
56
|
+
|
|
57
|
+
- Adjusted component dependencies and build construction. ([#61](https://github.com/TiendaNube/nimbus-design-system/pull/61) by [@juniorconquista](https://github.com/juniorconquista))
|
|
58
|
+
|
|
59
|
+
## 2022-11-18 `1.3.0`
|
|
60
|
+
|
|
61
|
+
### 📚 3rd party library updates
|
|
62
|
+
|
|
63
|
+
- Updated `@tiendanube/icons@0.3.1`. ([#57](https://github.com/TiendaNube/nimbus-design-system/pull/#57) by [@juniorconquista](https://github.com/juniorconquista))
|
|
64
|
+
|
|
65
|
+
## 2022-10-01 `1.2.0`
|
|
66
|
+
|
|
67
|
+
### 🎉 New features
|
|
68
|
+
|
|
69
|
+
- Added displayName to component `Label`. ([#34](https://github.com/TiendaNube/nimbus-design-system/pull/34) by [@juniorconquista](https://github.com/juniorconquista))
|
|
70
|
+
- Added displayName to component `Label.Skeleton`. ([#34](https://github.com/TiendaNube/nimbus-design-system/pull/34) by [@juniorconquista](https://github.com/juniorconquista))
|
|
71
|
+
|
|
72
|
+
## 2022-09-16 `1.0.0`
|
|
73
|
+
|
|
74
|
+
### 📚 3rd party library updates
|
|
75
|
+
|
|
76
|
+
- Added `terser-webpack-plugin@5.3.5`. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
77
|
+
- Added `ts-loader@9.3.1`. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
78
|
+
- Added `typescript@4.7.4`. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
79
|
+
- Added `webpack@5.74.0`. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
80
|
+
- Added `webpack-cli@4.10.0`. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
81
|
+
|
|
82
|
+
### 🎉 New features
|
|
83
|
+
|
|
84
|
+
- Added `children`, `htmlFor` and `hidden` properties to the Component. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
85
|
+
- Added stories on Component. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
86
|
+
- Created new `Label.Skeleton` subcomponent. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
87
|
+
- Added `width`, `height` and `data-testid` properties to the Component `Label.Skeleton`. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
88
|
+
- Added stories on Component `Label.Skeleton`. ([#26](https://github.com/TiendaNube/nimbus-design-system/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# `@nimbus-ds/label`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nimbus-ds/label)
|
|
4
|
+
|
|
5
|
+
The label component allows us to name elements within a form.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
$ yarn add @nimbus-ds/label
|
|
11
|
+
# or
|
|
12
|
+
$ npm install @nimbus-ds/label
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Component Anatomy
|
|
16
|
+
|
|
17
|
+
The component consists of styled base text, which consumes our typography and color tokens.
|
|
18
|
+
|
|
19
|
+
## Guidelines
|
|
20
|
+
|
|
21
|
+
We use this component as a slot that can receive text and icons with tooltips, which help the user to understand what information is required when filling out forms.
|
|
22
|
+
|
|
23
|
+
### Label is recommended for:
|
|
24
|
+
|
|
25
|
+
- Naming fields of Input text
|
|
26
|
+
- Naming options in a Select
|
|
27
|
+
- Naming options in a Radio Button list
|
|
28
|
+
- Name options in a list of Checkboxes
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
View docs [here](https://nimbus.nuvemshop.com.br/documentation/atomic-components/label).
|
|
33
|
+
|
|
34
|
+
<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,55 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v7.
|
|
1
|
+
// Generated by dts-bundle-generator v7.2.0
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
5
5
|
|
|
6
|
-
export interface
|
|
7
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The border radius of the skeleton.
|
|
17
|
+
*/
|
|
12
18
|
borderRadius?: string;
|
|
19
|
+
/**
|
|
20
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
21
|
+
*/
|
|
22
|
+
"data-testid"?: string;
|
|
13
23
|
}
|
|
14
|
-
export type
|
|
24
|
+
export type SkeletonProps = SkeletonProperties & HTMLAttributes<HTMLDivElement>;
|
|
25
|
+
export type LabelSkeletonProperties = Partial<Pick<SkeletonProps, "width">> & Partial<Pick<SkeletonProps, "height">> & {
|
|
26
|
+
/**
|
|
27
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
28
|
+
*/
|
|
15
29
|
"data-testid"?: string;
|
|
16
30
|
};
|
|
31
|
+
export type LabelSkeletonProps = LabelSkeletonProperties;
|
|
17
32
|
declare const LabelSkeleton: React.FC<LabelSkeletonProps>;
|
|
18
33
|
export interface LabelComponents {
|
|
19
34
|
Skeleton: typeof LabelSkeleton;
|
|
20
35
|
}
|
|
21
|
-
export interface
|
|
22
|
-
/**
|
|
36
|
+
export interface LabelProperties {
|
|
37
|
+
/**
|
|
38
|
+
* The content of the label.
|
|
39
|
+
* @TJS-type React.ReactNode
|
|
40
|
+
*/
|
|
23
41
|
children: ReactNode;
|
|
24
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The for attribute specifies which form element a label is bound to.
|
|
44
|
+
*/
|
|
25
45
|
htmlFor?: string;
|
|
26
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* If true the label will be visually hidden but maintain accessibility purpose
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
27
50
|
hidden?: boolean;
|
|
28
51
|
}
|
|
52
|
+
export type LabelProps = LabelProperties & HTMLAttributes<HTMLElement>;
|
|
29
53
|
export declare const Label: React.FC<LabelProps> & LabelComponents;
|
|
30
54
|
|
|
31
55
|
export {
|
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/label"]=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/label"]=t(e.react,e["@nimbus-ds/styles"],e["@nimbus-ds/skeleton"])}(global,((e,t,r)=>(()=>{"use strict";var n={200:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Label=void 0;const n=r(15).__importDefault(r(156)),o=r(990),a=r(612),i=({className:e,style:t,children:r,htmlFor:a,hidden:i=!1,...l})=>n.default.createElement("label",{...l,className:[o.label.classnames.base,i?o.label.classnames.hidden:""].join(" "),htmlFor:a},r);t.Label=i,i.Skeleton=a.LabelSkeleton,i.displayName="Label",i.Skeleton.displayName="Label.Skeleton"},212:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LabelSkeleton=void 0;const n=r(15).__importDefault(r(156)),o=r(678);t.LabelSkeleton=({width:e,height:t,"data-testid":r})=>n.default.createElement(o.Skeleton,{width:e??"4.375rem",height:t??"1rem",borderRadius:"0","data-testid":r})},870:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LabelSkeleton=void 0;const n=r(212);var o=r(212);Object.defineProperty(t,"LabelSkeleton",{enumerable:!0,get:function(){return o.LabelSkeleton}}),t.default=n.LabelSkeleton},612:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(15).__exportStar(r(870),t)},15:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>O,__asyncGenerator:()=>w,__asyncValues:()=>j,__await:()=>m,__awaiter:()=>f,__classPrivateFieldGet:()=>k,__classPrivateFieldIn:()=>E,__classPrivateFieldSet:()=>L,__createBinding:()=>p,__decorate:()=>l,__exportStar:()=>y,__extends:()=>o,__generator:()=>s,__importDefault:()=>x,__importStar:()=>P,__makeTemplateObject:()=>g,__metadata:()=>c,__param:()=>u,__read:()=>b,__rest:()=>i,__spread:()=>v,__spreadArray:()=>_,__spreadArrays:()=>h,__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 l(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 l=e.length-1;l>=0;l--)(o=e[l])&&(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 c(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{u(n.next(e))}catch(e){a(e)}}function l(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,l)}u((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:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){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,l])}}}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 h(){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,l=a.length;i<l;i++,o++)n[o]=a[i];return n}function _(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||l(e,t)}))})}function l(e,t){try{(r=o[e](t)).value instanceof m?Promise.resolve(r.value.v).then(u,c):f(a[0][2],r)}catch(e){f(a[0][3],e)}var r}function u(e){l("next",e)}function c(e){l("throw",e)}function f(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}function O(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 j(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 g(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=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 S(t,e),t}function x(e){return e&&e.__esModule?e:{default:e}}function k(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 L(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.Label=void 0;const t=a(200);var r=a(200);Object.defineProperty(e,"Label",{enumerable:!0,get:function(){return r.Label}}),e.default=t.Label})(),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/label"]=t(require("react"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/label"]=t(e.react,e["@nimbus-ds/styles"],e["@nimbus-ds/skeleton"])}(global,((e,t,r)=>(()=>{"use strict";var n={890:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Label=void 0;const n=r(769).__importDefault(r(155)),o=r(367),a=r(337),i=({className:e,style:t,children:r,htmlFor:a,hidden:i=!1,...c})=>n.default.createElement("label",{...c,className:[o.label.classnames.base,i?o.label.classnames.hidden:""].join(" "),htmlFor:a},r);t.Label=i,i.Skeleton=a.LabelSkeleton,i.displayName="Label",i.Skeleton.displayName="Label.Skeleton"},970:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LabelSkeleton=void 0;const n=r(769).__importDefault(r(155)),o=r(334);t.LabelSkeleton=({width:e,height:t,"data-testid":r})=>n.default.createElement(o.Skeleton,{width:e??"4.375rem",height:t??"1rem",borderRadius:"0","data-testid":r})},615:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LabelSkeleton=void 0;const n=r(970);var o=r(970);Object.defineProperty(t,"LabelSkeleton",{enumerable:!0,get:function(){return o.LabelSkeleton}}),t.default=n.LabelSkeleton},337:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(769).__exportStar(r(615),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:()=>F,__assign:()=>a,__asyncDelegator:()=>P,__asyncGenerator:()=>S,__asyncValues:()=>x,__await:()=>j,__awaiter:()=>y,__classPrivateFieldGet:()=>L,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>I,__createBinding:()=>b,__decorate:()=>c,__disposeResources:()=>A,__esDecorate:()=>s,__exportStar:()=>v,__extends:()=>o,__generator:()=>_,__importDefault:()=>D,__importStar:()=>T,__makeTemplateObject:()=>E,__metadata:()=>d,__param:()=>l,__propKey:()=>f,__read:()=>m,__rest:()=>i,__runInitializers:()=>u,__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 l(e,t){return function(r,n){t(r,n,e)}}function s(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,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,f=t||(u?Object.getOwnPropertyDescriptor(u,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"===l?{get:f.get,set:f.set}:f[s],y);if("accessor"===l){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"===l?o.unshift(c):f[s]=c)}u&&Object.defineProperty(u,n.name,f),p=!0}function u(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{l(n.next(e))}catch(e){a(e)}}function c(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}l((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(l){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,l])}}}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(l,s):u(a[0][2],r)}catch(e){u(a[0][3],e)}var r}function l(e){c("next",e)}function s(e){c("throw",e)}function u(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 E(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 T(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 D(e){return e&&e.__esModule?e:{default:e}}function L(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 I(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 F(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 M="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 A(e){function t(t){e.error=e.hasError?new M(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:l,__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:E,__importStar:T,__importDefault:D,__classPrivateFieldGet:L,__classPrivateFieldSet:I,__classPrivateFieldIn:R,__addDisposableResource:F,__disposeResources:A}}},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.Label=void 0;const t=a(890);var r=a(890);Object.defineProperty(e,"Label",{enumerable:!0,get:function(){return r.Label}}),e.default=t.Label})(),i})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-ds/label",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,16 +9,16 @@
|
|
|
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": "^
|
|
17
|
+
"@nimbus-ds/skeleton": "^3.0.2"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"react": "^16.8 || ^17.0 || ^18.0",
|
|
21
|
-
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
|
20
|
+
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0",
|
|
21
|
+
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0"
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://nimbus.nuvemshop.com.br/documentation",
|
|
24
24
|
"repository": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"url": "https://github.com/TiendaNube/nimbus-design-system/issues"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@nimbus-ds/icon": "^
|
|
33
|
-
"@nimbus-ds/icons": "^1.1
|
|
34
|
-
"webpack": "^
|
|
32
|
+
"@nimbus-ds/icon": "^3.3.1",
|
|
33
|
+
"@nimbus-ds/icons": "^1.15.1",
|
|
34
|
+
"@nimbus-ds/webpack": "^1.7.1"
|
|
35
35
|
}
|
|
36
36
|
}
|