@nimbus-ds/radio 2.0.1 → 2.1.0
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 +6 -0
- package/README.md +46 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Use radios when a user needs to select one option from a list.
|
|
4
4
|
|
|
5
|
+
## 2023-02-23 `2.1.0`
|
|
6
|
+
|
|
7
|
+
### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Added server side-rendering support to component. ([#99](https://github.com/TiendaNube/nimbus-design-system/pull/99) by [@juniorconquista](https://github.com/juniorconquista))
|
|
10
|
+
|
|
5
11
|
## 2023-02-07 `2.0.1`
|
|
6
12
|
|
|
7
13
|
### 🐛 Bug fixes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@nimbus-ds/radio)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The Radio component allows us to choose a single option within a selection list.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -12,6 +12,51 @@ $ yarn add @nimbus-ds/radio
|
|
|
12
12
|
$ npm install @nimbus-ds/radio
|
|
13
13
|
```
|
|
14
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
|
+
|
|
15
58
|
## Usage
|
|
16
59
|
|
|
17
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/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/text","@nimbus-ds/styles","@nimbus-ds/skeleton"],t):"object"==typeof exports?exports["@nimbus-ds/radio"]=t(require("react"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/radio"]=t(e.react,e["@nimbus-ds/text"],e["@nimbus-ds/styles"],e["@nimbus-ds/skeleton"])}(self,((e,t,r,n)=>(()=>{"use strict";var o={207:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Radio=void 0;const n=r(15).__importStar(r(156)),o=r(102),a=r(990),i=r(612),c=({className:e,style:t,as:r="radio",label:i,id:c,name:l,disabled:u,...s})=>{const f=(0,n.useMemo)((()=>"radio"===r),[r]),d=(0,n.useMemo)((()=>u&&!f),[f,u]);return n.default.createElement("label",{htmlFor:c||l,className:[a.radio.classnames.container,a.radio.sprinkle({cursor:u?"auto":"pointer"})].join(" ")},n.default.createElement("input",{...s,id:c||l,name:l,type:"radio",className:a.radio.classnames.input,disabled:u}),f&&n.default.createElement("span",{"data-testid":"checkmark-element",className:a.radio.classnames.checkmark},n.default.createElement("div",{"data-testid":"checkicon-element",className:a.radio.classnames.checkicon})),i&&n.default.createElement("div",{"data-testid":"content-element",className:a.radio.classnames.content[d?"disabled":r]},n.default.createElement(o.Text,{"data-testid":"text",color:"currentColor",fontSize:f?"base":"caption",lineHeight:"base"},i)))};t.Radio=c,c.Skeleton=i.RadioSkeleton,c.displayName="Radio",c.Skeleton.displayName="Radio"},119:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RadioSkeleton=void 0;const n=r(15).__importStar(r(156)),o=r(678),a=r(990);t.RadioSkeleton=({width:e,as:t="radio","data-testid":r})=>{const i=(0,n.useMemo)((()=>"radio"===t),[t]);return n.default.createElement("div",{className:a.checkbox.classnames.container},i&&n.default.createElement(o.Skeleton,{"data-testid":"checkmark-element",width:"1rem",height:"1rem",borderRadius:"0.75rem"}),n.default.createElement(o.Skeleton,{width:e??i?"2rem":"3.5rem",height:i?"1rem":"1.8rem",borderRadius:"0.25rem","data-testid":r}))}},531:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RadioSkeleton=void 0;const n=r(119);var o=r(119);Object.defineProperty(t,"RadioSkeleton",{enumerable:!0,get:function(){return o.RadioSkeleton}}),t.default=n.RadioSkeleton},612:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(15).__exportStar(r(531),t)},15:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>O,__asyncGenerator:()=>w,__asyncValues:()=>j,__await:()=>_,__awaiter:()=>s,__classPrivateFieldGet:()=>k,__classPrivateFieldIn:()=>E,__classPrivateFieldSet:()=>R,__createBinding:()=>d,__decorate:()=>c,__exportStar:()=>p,__extends:()=>o,__generator:()=>f,__importDefault:()=>x,__importStar:()=>P,__makeTemplateObject:()=>g,__metadata:()=>u,__param:()=>l,__read:()=>m,__rest:()=>i,__spread:()=>b,__spreadArray:()=>v,__spreadArrays:()=>h,__values:()=>y});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 u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(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 f(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(a){return function(c){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,c])}}}var d=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 p(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||d(t,e,r)}function y(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 b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(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,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function v(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 _(e){return this instanceof _?(this.v=e,this):new _(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||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof _?Promise.resolve(r.value.v).then(l,u):s(a[0][2],r)}catch(e){s(a[0][3],e)}var r}function l(e){c("next",e)}function u(e){c("throw",e)}function s(e,t){e(t),a.shift(),a.length&&c(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:_(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=y(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)&&d(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 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 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=n},990:e=>{e.exports=r},102: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.Radio=void 0;const t=i(207);var r=i(207);Object.defineProperty(e,"Radio",{enumerable:!0,get:function(){return r.Radio}}),e.default=t.Radio})(),c})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/text","@nimbus-ds/styles","@nimbus-ds/skeleton"],t):"object"==typeof exports?exports["@nimbus-ds/radio"]=t(require("react"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/skeleton")):e["@nimbus-ds/radio"]=t(e.react,e["@nimbus-ds/text"],e["@nimbus-ds/styles"],e["@nimbus-ds/skeleton"])}(global,((e,t,r,n)=>(()=>{"use strict";var o={207:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Radio=void 0;const n=r(15).__importStar(r(156)),o=r(102),a=r(990),i=r(612),c=({className:e,style:t,as:r="radio",label:i,id:c,name:l,disabled:u,...s})=>{const f=(0,n.useMemo)((()=>"radio"===r),[r]),d=(0,n.useMemo)((()=>u&&!f),[f,u]);return n.default.createElement("label",{htmlFor:c||l,className:[a.radio.classnames.container,a.radio.sprinkle({cursor:u?"auto":"pointer"})].join(" ")},n.default.createElement("input",{...s,id:c||l,name:l,type:"radio",className:a.radio.classnames.input,disabled:u}),f&&n.default.createElement("span",{"data-testid":"checkmark-element",className:a.radio.classnames.checkmark},n.default.createElement("div",{"data-testid":"checkicon-element",className:a.radio.classnames.checkicon})),i&&n.default.createElement("div",{"data-testid":"content-element",className:a.radio.classnames.content[d?"disabled":r]},n.default.createElement(o.Text,{"data-testid":"text",color:"currentColor",fontSize:f?"base":"caption",lineHeight:"base"},i)))};t.Radio=c,c.Skeleton=i.RadioSkeleton,c.displayName="Radio",c.Skeleton.displayName="Radio"},119:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RadioSkeleton=void 0;const n=r(15).__importStar(r(156)),o=r(678),a=r(990);t.RadioSkeleton=({width:e,as:t="radio","data-testid":r})=>{const i=(0,n.useMemo)((()=>"radio"===t),[t]);return n.default.createElement("div",{className:a.checkbox.classnames.container},i&&n.default.createElement(o.Skeleton,{"data-testid":"checkmark-element",width:"1rem",height:"1rem",borderRadius:"0.75rem"}),n.default.createElement(o.Skeleton,{width:e??i?"2rem":"3.5rem",height:i?"1rem":"1.8rem",borderRadius:"0.25rem","data-testid":r}))}},531:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RadioSkeleton=void 0;const n=r(119);var o=r(119);Object.defineProperty(t,"RadioSkeleton",{enumerable:!0,get:function(){return o.RadioSkeleton}}),t.default=n.RadioSkeleton},612:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(15).__exportStar(r(531),t)},15:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>O,__asyncGenerator:()=>w,__asyncValues:()=>j,__await:()=>_,__awaiter:()=>s,__classPrivateFieldGet:()=>k,__classPrivateFieldIn:()=>E,__classPrivateFieldSet:()=>R,__createBinding:()=>d,__decorate:()=>c,__exportStar:()=>p,__extends:()=>o,__generator:()=>f,__importDefault:()=>x,__importStar:()=>P,__makeTemplateObject:()=>g,__metadata:()=>u,__param:()=>l,__read:()=>b,__rest:()=>i,__spread:()=>m,__spreadArray:()=>v,__spreadArrays:()=>h,__values:()=>y});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 u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function s(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 f(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(a){return function(c){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,c])}}}var d=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 p(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||d(t,e,r)}function y(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 m(){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,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function v(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 _(e){return this instanceof _?(this.v=e,this):new _(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||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof _?Promise.resolve(r.value.v).then(l,u):s(a[0][2],r)}catch(e){s(a[0][3],e)}var r}function l(e){c("next",e)}function u(e){c("throw",e)}function s(e,t){e(t),a.shift(),a.length&&c(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:_(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=y(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)&&d(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 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 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=n},990:e=>{e.exports=r},102: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.Radio=void 0;const t=i(207);var r=i(207);Object.defineProperty(e,"Radio",{enumerable:!0,get:function(){return r.Radio}}),e.default=t.Radio})(),c})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-ds/radio",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
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": "^2.
|
|
18
|
-
"@nimbus-ds/text": "^5.
|
|
17
|
+
"@nimbus-ds/skeleton": "^2.1.0",
|
|
18
|
+
"@nimbus-ds/text": "^5.1.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "^16.8 || ^17.0 || ^18.0",
|