@nimbus-ds/radio 2.3.0-rc.4 → 2.3.0-rc.5
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/dist/CHANGELOG.md +75 -0
- package/dist/README.md +62 -0
- package/package.json +4 -4
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Use radios when a user needs to select one option from a list.
|
|
4
|
+
|
|
5
|
+
## 2023-12-22 `2.2.1`
|
|
6
|
+
|
|
7
|
+
- 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
|
+
|
|
9
|
+
## 2023-03-13 `2.2.0`
|
|
10
|
+
|
|
11
|
+
### 💡 Others
|
|
12
|
+
|
|
13
|
+
- Refactored style classes to have more semantic names. ([#110](https://github.com/TiendaNube/nimbus-design-system/pull/110) by [@juniorconquista](https://github.com/juniorconquista))
|
|
14
|
+
|
|
15
|
+
## 2023-02-23 `2.1.0`
|
|
16
|
+
|
|
17
|
+
### 🎉 New features
|
|
18
|
+
|
|
19
|
+
- Added server side-rendering support to component. ([#105](https://github.com/TiendaNube/nimbus-design-system/pull/105) by [@juniorconquista](https://github.com/juniorconquista))
|
|
20
|
+
|
|
21
|
+
## 2023-02-07 `2.0.1`
|
|
22
|
+
|
|
23
|
+
### 🐛 Bug fixes
|
|
24
|
+
|
|
25
|
+
- Fixed component rendering when there is no label to display. ([#80](https://github.com/TiendaNube/nimbus-design-system/pull/80) by [@juniorconquista](https://github.com/juniorconquista))
|
|
26
|
+
|
|
27
|
+
## 2022-12-22 `2.0.0`
|
|
28
|
+
|
|
29
|
+
### 💡 Others
|
|
30
|
+
|
|
31
|
+
- 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))
|
|
32
|
+
|
|
33
|
+
## 2022-12-16 `1.1.1`
|
|
34
|
+
|
|
35
|
+
### 🎉 New features
|
|
36
|
+
|
|
37
|
+
- Update label font size on `as: button` variant. ([#67](https://github.com/TiendaNube/nimbus-design-system/pull/67) by [@juanchigallego](https://github.com/juanchigallego))
|
|
38
|
+
|
|
39
|
+
## 2022-12-07 `1.1.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-02 `1.0.1`
|
|
54
|
+
|
|
55
|
+
### 🐛 Bug fixes
|
|
56
|
+
|
|
57
|
+
- Fixed minimum size of radio and lineHeight of label. ([#62](https://github.com/TiendaNube/nimbus-design-system/pull/62) by [@juniorconquista](https://github.com/juniorconquista))
|
|
58
|
+
|
|
59
|
+
## 2022-10-05 `1.0.0`
|
|
60
|
+
|
|
61
|
+
### 📚 3rd party library updates
|
|
62
|
+
|
|
63
|
+
- Added `terser-webpack-plugin@5.3.5`. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
64
|
+
- Added `ts-loader@9.3.1`. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
65
|
+
- Added `typescript@4.7.4`. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
66
|
+
- Added `webpack@5.74.0`. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
67
|
+
- Added `webpack-cli@4.10.0`. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
68
|
+
|
|
69
|
+
### 🎉 New features
|
|
70
|
+
|
|
71
|
+
- Added `name`, `as`, `checked`, `disabled` and `label` properties to the Component. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
72
|
+
- Added stories on Component. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
73
|
+
- Created new `Radio.Skeleton` subcomponent. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
74
|
+
- Added `width`, `as` and `data-testid` properties to the Component `Radio.Skeleton`. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
|
75
|
+
- Added stories on Component `Radio.Skeleton`. ([#36](https://github.com/TiendaNube/nimbus-design-system/pull/36) by [@juniorconquista](https://github.com/juniorconquista))
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# `@nimbus-ds/radio`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nimbus-ds/radio)
|
|
4
|
+
|
|
5
|
+
The Radio component allows us to choose a single option within a selection list.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
$ yarn add @nimbus-ds/radio
|
|
11
|
+
# or
|
|
12
|
+
$ npm install @nimbus-ds/radio
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Component Anatomy
|
|
16
|
+
|
|
17
|
+
The component is composed of a bullet or selection button with their respective states, in addition to a label that displays the content referring to the option.
|
|
18
|
+
|
|
19
|
+
## Guidelines
|
|
20
|
+
|
|
21
|
+
We use this component when we need the user to enter information in a form, checking a single option within a list of up to 7 items.
|
|
22
|
+
|
|
23
|
+
### Radio default
|
|
24
|
+
|
|
25
|
+
This variant has less visual prominence, so it can be used in vertical selection lists, such as in settings or registration forms.
|
|
26
|
+
|
|
27
|
+
### Radio button
|
|
28
|
+
|
|
29
|
+
This variant has more visual prominence, so it can be used in horizontal lists as criteria within a data filter.
|
|
30
|
+
|
|
31
|
+
### Possible states
|
|
32
|
+
|
|
33
|
+
The component has 3 states, which can be used according to the context and need of the application.
|
|
34
|
+
|
|
35
|
+
- Rest - is used to represent an unselected option
|
|
36
|
+
- Checked - is used to represent a selected option
|
|
37
|
+
- Disabled - is used to represent that an option is disabled, this state can be combined with the previous 2
|
|
38
|
+
|
|
39
|
+
### Labels
|
|
40
|
+
|
|
41
|
+
The component must always be accompanied by a label that clearly describes the option represented, always starting with the first capital letter, and sentences must never end in a semicolon. The options must be sorted using a specific logical criteria (alphabetic, numerical, temporal, etc.).
|
|
42
|
+
|
|
43
|
+
### Aria Label
|
|
44
|
+
|
|
45
|
+
To facilitate navigation for people with some kind of visual or cognitive limitation, this component has a tag (Aria Label) to inform the current status of the Radio.
|
|
46
|
+
|
|
47
|
+
### Recommendation for use
|
|
48
|
+
|
|
49
|
+
- Selection of items in lists where the choice is mandatory
|
|
50
|
+
- Select a single setting from a list of options
|
|
51
|
+
|
|
52
|
+
### Related components
|
|
53
|
+
|
|
54
|
+
- Select - Can be used to select a single option from a list of more than 7 items
|
|
55
|
+
- Toggle - Can be used to toggle binary options on and off
|
|
56
|
+
- Checkbox - Can be used to select multiple options from a list
|
|
57
|
+
|
|
58
|
+
## Usage
|
|
59
|
+
|
|
60
|
+
View docs [here](https://nimbus.nuvemshop.com.br/documentation/atomic-components/radio).
|
|
61
|
+
|
|
62
|
+
<img alt="Nimbus" style="margin-bottom: 30px;" src="https://tiendanube.github.io/design-system-nimbus/static/media/nimbus-logo.ab60bd79.png" height="30" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-ds/radio",
|
|
3
|
-
"version": "2.3.0-rc.
|
|
3
|
+
"version": "2.3.0-rc.5",
|
|
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/skeleton": "^3.1.0-rc.
|
|
18
|
-
"@nimbus-ds/text": "^6.4.0-rc.
|
|
17
|
+
"@nimbus-ds/skeleton": "^3.1.0-rc.5",
|
|
18
|
+
"@nimbus-ds/text": "^6.4.0-rc.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "^16.8 || ^17.0 || ^18.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"url": "https://github.com/TiendaNube/nimbus-design-system/issues"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@nimbus-ds/webpack": "^1.
|
|
33
|
+
"@nimbus-ds/webpack": "^1.5.0-rc.1"
|
|
34
34
|
},
|
|
35
35
|
"stableVersion": "2.2.1"
|
|
36
36
|
}
|