@aquera/nile-elements 0.0.4-7 → 0.0.4-9

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.
Files changed (81) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +2 -0
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +2 -0
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js +4 -0
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-link/nile-link.css.js.map +1 -1
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.d.ts +1 -0
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.js +2 -0
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.js.map +1 -0
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.css.d.ts +12 -0
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.css.js +173 -0
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.css.js.map +1 -0
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.d.ts +57 -0
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.js +145 -0
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.js.map +1 -0
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.d.ts +1 -0
  16. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.js +2 -0
  17. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.js.map +1 -0
  18. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.d.ts +12 -0
  19. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.js +70 -0
  20. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.js.map +1 -0
  21. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.d.ts +66 -0
  22. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.js +308 -0
  23. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.js.map +1 -0
  24. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.esm.js +1 -1
  27. package/dist/index.iife.js +372 -76
  28. package/dist/nile-link/nile-link.css.cjs.js +1 -1
  29. package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
  30. package/dist/nile-link/nile-link.css.esm.js +6 -2
  31. package/dist/nile-radio-button/index.cjs.js +2 -0
  32. package/dist/nile-radio-button/index.cjs.js.map +1 -0
  33. package/dist/nile-radio-button/index.esm.js +1 -0
  34. package/dist/nile-radio-button/nile-radio-button.cjs.js +2 -0
  35. package/dist/nile-radio-button/nile-radio-button.cjs.js.map +1 -0
  36. package/dist/nile-radio-button/nile-radio-button.css.cjs.js +2 -0
  37. package/dist/nile-radio-button/nile-radio-button.css.cjs.js.map +1 -0
  38. package/dist/nile-radio-button/nile-radio-button.css.esm.js +161 -0
  39. package/dist/nile-radio-button/nile-radio-button.esm.js +21 -0
  40. package/dist/nile-radio-button-group/index.cjs.js +2 -0
  41. package/dist/nile-radio-button-group/index.cjs.js.map +1 -0
  42. package/dist/nile-radio-button-group/index.esm.js +1 -0
  43. package/dist/nile-radio-button-group/nile-radio-button-group.cjs.js +2 -0
  44. package/dist/nile-radio-button-group/nile-radio-button-group.cjs.js.map +1 -0
  45. package/dist/nile-radio-button-group/nile-radio-button-group.css.cjs.js +2 -0
  46. package/dist/nile-radio-button-group/nile-radio-button-group.css.cjs.js.map +1 -0
  47. package/dist/nile-radio-button-group/nile-radio-button-group.css.esm.js +58 -0
  48. package/dist/nile-radio-button-group/nile-radio-button-group.esm.js +56 -0
  49. package/dist/src/index.d.ts +2 -0
  50. package/dist/src/index.js +2 -0
  51. package/dist/src/index.js.map +1 -1
  52. package/dist/src/nile-link/nile-link.css.js +4 -0
  53. package/dist/src/nile-link/nile-link.css.js.map +1 -1
  54. package/dist/src/nile-radio-button/index.d.ts +1 -0
  55. package/dist/src/nile-radio-button/index.js +2 -0
  56. package/dist/src/nile-radio-button/index.js.map +1 -0
  57. package/dist/src/nile-radio-button/nile-radio-button.css.d.ts +12 -0
  58. package/dist/src/nile-radio-button/nile-radio-button.css.js +173 -0
  59. package/dist/src/nile-radio-button/nile-radio-button.css.js.map +1 -0
  60. package/dist/src/nile-radio-button/nile-radio-button.d.ts +57 -0
  61. package/dist/src/nile-radio-button/nile-radio-button.js +145 -0
  62. package/dist/src/nile-radio-button/nile-radio-button.js.map +1 -0
  63. package/dist/src/nile-radio-button-group/index.d.ts +1 -0
  64. package/dist/src/nile-radio-button-group/index.js +2 -0
  65. package/dist/src/nile-radio-button-group/index.js.map +1 -0
  66. package/dist/src/nile-radio-button-group/nile-radio-button-group.css.d.ts +12 -0
  67. package/dist/src/nile-radio-button-group/nile-radio-button-group.css.js +70 -0
  68. package/dist/src/nile-radio-button-group/nile-radio-button-group.css.js.map +1 -0
  69. package/dist/src/nile-radio-button-group/nile-radio-button-group.d.ts +66 -0
  70. package/dist/src/nile-radio-button-group/nile-radio-button-group.js +308 -0
  71. package/dist/src/nile-radio-button-group/nile-radio-button-group.js.map +1 -0
  72. package/dist/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +1 -1
  74. package/src/index.ts +2 -0
  75. package/src/nile-link/nile-link.css.ts +4 -0
  76. package/src/nile-radio-button/index.ts +1 -0
  77. package/src/nile-radio-button/nile-radio-button.css.ts +175 -0
  78. package/src/nile-radio-button/nile-radio-button.ts +151 -0
  79. package/src/nile-radio-button-group/index.ts +1 -0
  80. package/src/nile-radio-button-group/nile-radio-button-group.css.ts +72 -0
  81. package/src/nile-radio-button-group/nile-radio-button-group.ts +337 -0
@@ -1,2 +1,2 @@
1
- System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var n,_templateObject,e;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){n=_index001CjsJs.i;}],execute:function(){_export("s",e=n(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n"]))));}};});
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var n,_templateObject,e;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){n=_index001CjsJs.i;}],execute:function(){_export("s",e=n(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n height: 38px;\n box-sizing: border-box;\n cursor: pointer\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n pointer-events:none;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-link.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-link.css.cjs.js","sources":["../../../src/nile-link/nile-link.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Link CSS\n */\nexport const styles = css`\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-link.css.cjs.js","sources":["../../../src/nile-link/nile-link.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Link CSS\n */\nexport const styles = css`\n :host {\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: 12px;\n gap: 8px;\n height: 38px;\n box-sizing: border-box;\n cursor: pointer\n }\n\n .link__label {\n color: #005ea6;\n text-align: center;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: rgba(0, 94, 166, 0.5);\n cursor: not-allowed;\n opacity: 0.6;\n pointer-events:none;\n }\n\n .link:not(.link--disabled):not(.link__button):hover {\n color: #005291;\n text-decoration-line: underline;\n }\n\n .link:not(.link--disabled):not(.link__button):active {\n color: #002f53;\n text-decoration-line: underline;\n }\n\n .link__button:hover {\n color: #005291;\n border-radius: 4px;\n background: #f5f7f7;\n }\n\n .link__button:active {\n color: #002f53;\n border-radius: 4px;\n background: rgba(0, 94, 166, 0.1);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{i as n}from"../index-cd2f9c12.esm.js";const e=n`
1
+ import{i as e}from"../index-cd2f9c12.esm.js";const n=e`
2
2
  :host {
3
3
  }
4
4
 
@@ -11,6 +11,9 @@ import{i as n}from"../index-cd2f9c12.esm.js";const e=n`
11
11
  white-space: nowrap;
12
12
  padding: 12px;
13
13
  gap: 8px;
14
+ height: 38px;
15
+ box-sizing: border-box;
16
+ cursor: pointer
14
17
  }
15
18
 
16
19
  .link__label {
@@ -28,6 +31,7 @@ import{i as n}from"../index-cd2f9c12.esm.js";const e=n`
28
31
  color: rgba(0, 94, 166, 0.5);
29
32
  cursor: not-allowed;
30
33
  opacity: 0.6;
34
+ pointer-events:none;
31
35
  }
32
36
 
33
37
  .link:not(.link--disabled):not(.link__button):hover {
@@ -51,4 +55,4 @@ import{i as n}from"../index-cd2f9c12.esm.js";const e=n`
51
55
  border-radius: 4px;
52
56
  background: rgba(0, 94, 166, 0.1);
53
57
  }
54
- `;export{e as s};
58
+ `;export{n as s};
@@ -0,0 +1,2 @@
1
+ System.register(["./nile-radio-button.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-radio-button.css.cjs.js","../internal/nile-element.cjs.js","lit","../slot.cjs.js","lit/directives/class-map.js","lit/directives/if-defined.js","../internal/watch.cjs.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileRadioButtonCjsJs){_export("NileRadioButton",_nileRadioButtonCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileRadioButtonCssCjsJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_slotCjsJs){},function(_litDirectivesClassMapJs){},function(_litDirectivesIfDefinedJs){},function(_internalWatchCjsJs){},function(_property002CjsJs){}],execute:function(){}};});
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export{N as NileRadioButton}from"./nile-radio-button.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-radio-button.css.esm.js";import"../internal/nile-element.esm.js";import"lit";import"../slot.esm.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";import"../internal/watch.esm.js";import"../property-09139d3c.esm.js";
@@ -0,0 +1,2 @@
1
+ System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-radio-button.css.cjs.js","../internal/nile-element.cjs.js","../slot.cjs.js","lit/directives/class-map.js","lit/directives/if-defined.js","../internal/watch.cjs.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var t,i,s,e,o,l,r,a,n,d,u,h,_templateObject,c;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileRadioButtonCssCjsJs){l=_nileRadioButtonCssCjsJs.s;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;},function(_slotCjsJs){a=_slotCjsJs.H;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_litDirectivesIfDefinedJs){d=_litDirectivesIfDefinedJs.ifDefined;},function(_internalWatchCjsJs){u=_internalWatchCjsJs.w;},function(_property002CjsJs){h=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",c=/*#__PURE__*/function(_r){_inherits(c,_r);var _super=_createSuper(c);function c(){var _this;_classCallCheck(this,c);_this=_super.apply(this,arguments),_this.hasSlotController=new a(_assertThisInitialized(_this),"[default]","prefix","suffix"),_this.hasFocus=!1,_this.checked=!1,_this.disabled=!1,_this.size="medium",_this.pill=!1;return _this;}_createClass(c,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.setAttribute("role","presentation");}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("nile-blur");}},{key:"handleClick",value:function handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.checked=!0;}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("nile-focus");}},{key:"handleDisabledChange",value:function handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false");}},{key:"focus",value:function focus(t){this.input.focus(t);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"base\" role=\"presentation\">\n <button\n part=\"","\"\n role=\"radio\"\n aria-checked=\"","\"\n class=","\n aria-disabled=","\n type=\"button\"\n value=","\n tabindex=\"","\"\n @blur=","\n @focus=","\n @click=","\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"button__prefix\"></slot>\n <slot part=\"label\" class=\"button__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"button__suffix\"></slot>\n </button>\n </div>\n "])),"button"+(this.checked?" button--checked":""),this.checked,n({button:!0,"button--default":!0,"button--checked":this.checked,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")}),this.disabled,d(this.value),this.checked?"0":"-1",this.handleBlur,this.handleFocus,this.handleClick);}}],[{key:"styles",get:function get(){return[l];}}]);return c;}(r));t([s(".button")],c.prototype,"input",void 0),t([s(".hidden-input")],c.prototype,"hiddenInput",void 0),t([e()],c.prototype,"hasFocus",void 0),t([h({type:Boolean,reflect:!0})],c.prototype,"checked",void 0),t([h()],c.prototype,"value",void 0),t([h({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),t([h({reflect:!0})],c.prototype,"size",void 0),t([h({type:Boolean,reflect:!0})],c.prototype,"pill",void 0),t([u("disabled",{waitUntilFirstUpdate:!0})],c.prototype,"handleDisabledChange",null),_export("N",c=t([o("nile-radio-button")],c));}};});
2
+ //# sourceMappingURL=nile-radio-button.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-radio-button.cjs.js","sources":["../../../src/nile-radio-button/nile-radio-button.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-radio-button.css';\nimport NileElement from '../internal/nile-element';\nimport { HasSlotController } from '../slot';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { watch } from '../internal/watch';\n\n/**\n * Nile icon component.\n *\n * @tag nile-radio-button\n *\n */\n@customElement('nile-radio-button')\nexport class NileRadioButton extends NileElement {\n /**\n * The styles for RadioButton\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n private readonly hasSlotController = new HasSlotController(\n this,\n '[default]',\n 'prefix',\n 'suffix'\n );\n\n @query('.button') input: HTMLInputElement;\n @query('.hidden-input') hiddenInput: HTMLInputElement;\n\n @state() protected hasFocus = false;\n\n /**\n * @internal The radio button's checked state. This is exposed as an \"internal\" attribute so we can reflect it, making\n * it easier to style in button groups.\n */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** The radio's value. When selected, the radio group will receive this value. */\n @property() value: string;\n\n /** Disables the radio button. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so\n * this attribute can typically be omitted.\n */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a pill-style radio button with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'presentation');\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur');\n }\n\n private handleClick(e: MouseEvent) {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n this.checked = true;\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus');\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n /** Sets focus on the radio button. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the radio button. */\n blur() {\n this.input.blur();\n }\n\n render() {\n return html`\n <div part=\"base\" role=\"presentation\">\n <button\n part=\"${`button${this.checked ? ' button--checked' : ''}`}\"\n role=\"radio\"\n aria-checked=\"${this.checked}\"\n class=${classMap({\n button: true,\n 'button--default': true,\n 'button--checked': this.checked,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--has-label': this.hasSlotController.test('[default]'),\n 'button--has-prefix': this.hasSlotController.test('prefix'),\n 'button--has-suffix': this.hasSlotController.test('suffix'),\n })}\n aria-disabled=${this.disabled}\n type=\"button\"\n value=${ifDefined(this.value)}\n tabindex=\"${this.checked ? '0' : '-1'}\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"button__prefix\"></slot>\n <slot part=\"label\" class=\"button__label\"></slot>\n <slot name=\"suffix\" part=\"suffix\" class=\"button__suffix\"></slot>\n </button>\n </div>\n `;\n }\n}\n\nexport default NileRadioButton;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-radio-button': NileRadioButton;\n }\n}\n"],"names":["NileRadioButton","c","constructor","this","hasSlotController","HasSlotController","hasFocus","checked","disabled","size","pill","_this","_createClass","key","value","connectedCallback","super","setAttribute","handleBlur","emit","handleClick","e","preventDefault","stopPropagation","handleFocus","handleDisabledChange","focus","options","input","blur","render","html","_templateObject","_taggedTemplateLiteral","classMap","button","test","ifDefined","__decorate","get","styles","NileElement","query","prototype","state","property","type","Boolean","reflect","watch","waitUntilFirstUpdate","customElement"],"mappings":"4tJA6BaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAA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CADCW,CAAAA,CAAM,WAAY,CAAEC,oBAAAA,CAAAA,CAAsB,KAG1ClD,CAAA2C,CAAAA,SAAAA,CAAA,uBAAA,IArEU3C,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAesC,EAAA,CAD3Ba,CAAAA,CAAc,sBACFnD"}
@@ -0,0 +1,2 @@
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var t,_templateObject,e;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){t=_index001CjsJs.i;}],execute:function(){_export("s",e=t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n color: var(--color-text-default, #000);\n text-align: center;\n border-radius: 4px;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px; /* 100% */\n letter-spacing: 0.2px;\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 12px;\n cursor: pointer;\n gap: 10px;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: var(--nile-focus-ring);\n outline-offset: var(--nile-focus-ring-offset);\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* When disabled, prevent mouse events from bubbling up from children */\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__prefix,\n .button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n pointer-events: none;\n }\n\n .button__label {\n display: inline-block;\n }\n\n .button__label::slotted(nile-icon) {\n vertical-align: -2px;\n }\n\n /* Default */\n .button--default {\n border: 1px solid #c7ced4;\n background: #fff;\n color: black;\n }\n\n .button--default:hover:not(.button--disabled) {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--default:active:not(.button--disabled) {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--checked {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--has-label.button--medium .button__label {\n padding: 0 var(--nile-spacing-medium);\n }\n\n .button--has-prefix.button--medium {\n padding-inline-start: var(--nile-spacing-small);\n }\n\n .button--has-prefix.button--medium .button__label {\n padding-inline-start: var(--nile-spacing-small);\n }\n\n .button--has-suffix.button--medium,\n .button--caret.button--medium {\n padding-inline-end: var(--nile-spacing-small);\n }\n\n .button--has-suffix.button--medium .button__label,\n .button--caret.button--medium .button__label {\n padding-inline-end: var(--nile-spacing-small);\n }\n\n .nile-radio-button--first {\n background-color: red;\n }\n\n :host(.nile-radio-button--first:not(.nile-radio-button--last)) .button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n :host(.nile-group-button--inner) .button {\n border-radius: 0;\n }\n\n :host(.nile-radio-button--last:not(.nile-radio-button--first)) .button {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n /* All except the first */\n :host(.nile-radio-button__button:not(.nile-radio-button__button--first)) {\n margin-inline-start: calc(-1 * var(--nile-input-border-width));\n }\n\n :host(.nile-radio-button--inner) .button {\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n }\n\n .button__prefix,\n .button__suffix,\n .button__label {\n display: inline-flex;\n position: relative;\n align-items: center;\n }\n\n /* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons.\n We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */\n .hidden-input {\n all: unset;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n outline: dotted 1px red;\n opacity: 0;\n z-index: -1;\n }\n"]))));}};});
2
+ //# sourceMappingURL=nile-radio-button.css.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-radio-button.css.cjs.js","sources":["../../../src/nile-radio-button/nile-radio-button.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * RadioButton CSS\n */\nexport const styles = css`\n :host {\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n color: var(--color-text-default, #000);\n text-align: center;\n border-radius: 4px;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px; /* 100% */\n letter-spacing: 0.2px;\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 12px;\n cursor: pointer;\n gap: 10px;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: var(--nile-focus-ring);\n outline-offset: var(--nile-focus-ring-offset);\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* When disabled, prevent mouse events from bubbling up from children */\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__prefix,\n .button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n pointer-events: none;\n }\n\n .button__label {\n display: inline-block;\n }\n\n .button__label::slotted(nile-icon) {\n vertical-align: -2px;\n }\n\n /* Default */\n .button--default {\n border: 1px solid #c7ced4;\n background: #fff;\n color: black;\n }\n\n .button--default:hover:not(.button--disabled) {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--default:active:not(.button--disabled) {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--checked {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--has-label.button--medium .button__label {\n padding: 0 var(--nile-spacing-medium);\n }\n\n .button--has-prefix.button--medium {\n padding-inline-start: var(--nile-spacing-small);\n }\n\n .button--has-prefix.button--medium .button__label {\n padding-inline-start: var(--nile-spacing-small);\n }\n\n .button--has-suffix.button--medium,\n .button--caret.button--medium {\n padding-inline-end: var(--nile-spacing-small);\n }\n\n .button--has-suffix.button--medium .button__label,\n .button--caret.button--medium .button__label {\n padding-inline-end: var(--nile-spacing-small);\n }\n\n .nile-radio-button--first {\n background-color: red;\n }\n\n :host(.nile-radio-button--first:not(.nile-radio-button--last)) .button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n :host(.nile-group-button--inner) .button {\n border-radius: 0;\n }\n\n :host(.nile-radio-button--last:not(.nile-radio-button--first)) .button {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n /* All except the first */\n :host(.nile-radio-button__button:not(.nile-radio-button__button--first)) {\n margin-inline-start: calc(-1 * var(--nile-input-border-width));\n }\n\n :host(.nile-radio-button--inner) .button {\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n }\n\n .button__prefix,\n .button__suffix,\n .button__label {\n display: inline-flex;\n position: relative;\n align-items: center;\n }\n\n /* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons.\n We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */\n .hidden-input {\n all: unset;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n outline: dotted 1px red;\n opacity: 0;\n z-index: -1;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -0,0 +1,161 @@
1
+ import{i as t}from"../index-cd2f9c12.esm.js";const e=t`
2
+ :host {
3
+ }
4
+
5
+ .button {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ width: 100%;
10
+ color: var(--color-text-default, #000);
11
+ text-align: center;
12
+ border-radius: 4px;
13
+ font-family: Colfax-regular;
14
+ font-size: 14px;
15
+ font-style: normal;
16
+ font-weight: 400;
17
+ line-height: 14px; /* 100% */
18
+ letter-spacing: 0.2px;
19
+ text-decoration: none;
20
+ user-select: none;
21
+ white-space: nowrap;
22
+ vertical-align: middle;
23
+ padding: 12px;
24
+ cursor: pointer;
25
+ gap: 10px;
26
+ }
27
+
28
+ .button::-moz-focus-inner {
29
+ border: 0;
30
+ }
31
+
32
+ .button:focus {
33
+ outline: none;
34
+ }
35
+
36
+ .button:focus-visible {
37
+ outline: var(--nile-focus-ring);
38
+ outline-offset: var(--nile-focus-ring-offset);
39
+ }
40
+
41
+ .button--disabled {
42
+ opacity: 0.5;
43
+ cursor: not-allowed;
44
+ }
45
+
46
+ /* When disabled, prevent mouse events from bubbling up from children */
47
+ .button--disabled * {
48
+ pointer-events: none;
49
+ }
50
+
51
+ .button__prefix,
52
+ .button__suffix {
53
+ flex: 0 0 auto;
54
+ display: flex;
55
+ align-items: center;
56
+ pointer-events: none;
57
+ }
58
+
59
+ .button__label {
60
+ display: inline-block;
61
+ }
62
+
63
+ .button__label::slotted(nile-icon) {
64
+ vertical-align: -2px;
65
+ }
66
+
67
+ /* Default */
68
+ .button--default {
69
+ border: 1px solid #c7ced4;
70
+ background: #fff;
71
+ color: black;
72
+ }
73
+
74
+ .button--default:hover:not(.button--disabled) {
75
+ border: 1px solid #c7ced4;
76
+ background: #e5e9eb;
77
+ }
78
+
79
+ .button--default:active:not(.button--disabled) {
80
+ border: 1px solid #c7ced4;
81
+ background: #e5e9eb;
82
+ }
83
+
84
+ .button--checked {
85
+ border: 1px solid #c7ced4;
86
+ background: #e5e9eb;
87
+ }
88
+
89
+ .button--has-label.button--medium .button__label {
90
+ padding: 0 var(--nile-spacing-medium);
91
+ }
92
+
93
+ .button--has-prefix.button--medium {
94
+ padding-inline-start: var(--nile-spacing-small);
95
+ }
96
+
97
+ .button--has-prefix.button--medium .button__label {
98
+ padding-inline-start: var(--nile-spacing-small);
99
+ }
100
+
101
+ .button--has-suffix.button--medium,
102
+ .button--caret.button--medium {
103
+ padding-inline-end: var(--nile-spacing-small);
104
+ }
105
+
106
+ .button--has-suffix.button--medium .button__label,
107
+ .button--caret.button--medium .button__label {
108
+ padding-inline-end: var(--nile-spacing-small);
109
+ }
110
+
111
+ .nile-radio-button--first {
112
+ background-color: red;
113
+ }
114
+
115
+ :host(.nile-radio-button--first:not(.nile-radio-button--last)) .button {
116
+ border-start-end-radius: 0;
117
+ border-end-end-radius: 0;
118
+ }
119
+
120
+ :host(.nile-group-button--inner) .button {
121
+ border-radius: 0;
122
+ }
123
+
124
+ :host(.nile-radio-button--last:not(.nile-radio-button--first)) .button {
125
+ border-start-start-radius: 0;
126
+ border-end-start-radius: 0;
127
+ }
128
+
129
+ /* All except the first */
130
+ :host(.nile-radio-button__button:not(.nile-radio-button__button--first)) {
131
+ margin-inline-start: calc(-1 * var(--nile-input-border-width));
132
+ }
133
+
134
+ :host(.nile-radio-button--inner) .button {
135
+ border-radius: 0;
136
+ border-left: 0;
137
+ border-right: 0;
138
+ }
139
+
140
+ .button__prefix,
141
+ .button__suffix,
142
+ .button__label {
143
+ display: inline-flex;
144
+ position: relative;
145
+ align-items: center;
146
+ }
147
+
148
+ /* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons.
149
+ We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */
150
+ .hidden-input {
151
+ all: unset;
152
+ position: absolute;
153
+ top: 0;
154
+ left: 0;
155
+ bottom: 0;
156
+ right: 0;
157
+ outline: dotted 1px red;
158
+ opacity: 0;
159
+ z-index: -1;
160
+ }
161
+ `;export{e as s};
@@ -0,0 +1,21 @@
1
+ import{__decorate as t}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";import{query as s,state as e,customElement as o}from"lit/decorators.js";import{s as l}from"./nile-radio-button.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";import{H as a}from"../slot.esm.js";import{classMap as n}from"lit/directives/class-map.js";import{ifDefined as d}from"lit/directives/if-defined.js";import{w as u}from"../internal/watch.esm.js";import{n as h}from"../property-09139d3c.esm.js";import"lit";let f=class extends r{constructor(){super(...arguments),this.hasSlotController=new a(this,"[default]","prefix","suffix"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="medium",this.pill=!1}static get styles(){return[l]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){return i`
2
+ <div part="base" role="presentation">
3
+ <button
4
+ part="${"button"+(this.checked?" button--checked":"")}"
5
+ role="radio"
6
+ aria-checked="${this.checked}"
7
+ class=${n({button:!0,"button--default":!0,"button--checked":this.checked,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
8
+ aria-disabled=${this.disabled}
9
+ type="button"
10
+ value=${d(this.value)}
11
+ tabindex="${this.checked?"0":"-1"}"
12
+ @blur=${this.handleBlur}
13
+ @focus=${this.handleFocus}
14
+ @click=${this.handleClick}
15
+ >
16
+ <slot name="prefix" part="prefix" class="button__prefix"></slot>
17
+ <slot part="label" class="button__label"></slot>
18
+ <slot name="suffix" part="suffix" class="button__suffix"></slot>
19
+ </button>
20
+ </div>
21
+ `}};t([s(".button")],f.prototype,"input",void 0),t([s(".hidden-input")],f.prototype,"hiddenInput",void 0),t([e()],f.prototype,"hasFocus",void 0),t([h({type:Boolean,reflect:!0})],f.prototype,"checked",void 0),t([h()],f.prototype,"value",void 0),t([h({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),t([h({reflect:!0})],f.prototype,"size",void 0),t([h({type:Boolean,reflect:!0})],f.prototype,"pill",void 0),t([u("disabled",{waitUntilFirstUpdate:!0})],f.prototype,"handleDisabledChange",null),f=t([o("nile-radio-button")],f);export{f as N};
@@ -0,0 +1,2 @@
1
+ System.register(["./nile-radio-button-group.cjs.js","tslib","lit/directives/class-map.js","lit/decorators.js","../internal/slot.cjs.js","lit","../internal/watch.cjs.js","../internal/nile-element.cjs.js","./nile-radio-button-group.css.cjs.js","../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileRadioButtonGroupCjsJs){_export("NileRadioButtonGroup",_nileRadioButtonGroupCjsJs.N);},function(_tslib){},function(_litDirectivesClassMapJs){},function(_litDecoratorsJs){},function(_internalSlotCjsJs){},function(_lit){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_nileRadioButtonGroupCssCjsJs){},function(_index001CjsJs){}],execute:function(){}};});
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export{N as NileRadioButtonGroup}from"./nile-radio-button-group.esm.js";import"tslib";import"lit/directives/class-map.js";import"lit/decorators.js";import"../internal/slot.esm.js";import"lit";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"./nile-radio-button-group.css.esm.js";import"../index-cd2f9c12.esm.js";
@@ -0,0 +1,2 @@
1
+ System.register(["tslib","lit/directives/class-map.js","lit/decorators.js","../internal/slot.cjs.js","lit","../internal/watch.cjs.js","../internal/nile-element.cjs.js","./nile-radio-button-group.css.cjs.js","../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var t,i,e,o,s,l,r,a,n,h,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,c;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_litDirectivesClassMapJs){i=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){e=_litDecoratorsJs.query;o=_litDecoratorsJs.state;s=_litDecoratorsJs.property;l=_litDecoratorsJs.customElement;},function(_internalSlotCjsJs){r=_internalSlotCjsJs.H;},function(_lit){a=_lit.html;},function(_internalWatchCjsJs){n=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_nileRadioButtonGroupCssCjsJs){d=_nileRadioButtonGroupCssCjsJs.s;},function(_index001CjsJs){}],execute:function(){_export("N",c=/*#__PURE__*/function(_h){_inherits(c,_h);var _super=_createSuper(c);function c(){var _this;_classCallCheck(this,c);_this=_super.apply(this,arguments),_this.hasSlotController=new r(_assertThisInitialized(_this),"help-text","label"),_this.customValidityMessage="",_this.hasButtonGroup=!1,_this.defaultValue="",_this.label="",_this.name="option",_this.value="",_this.form="",_this.required=!1,_this.labelInline=!1,_this.disabled=!1,_this.helpText="",_this.errorMessage="";return _this;}_createClass(c,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.defaultValue=this.value,this.handleInitialDisabledState();}},{key:"getAllRadios",value:function getAllRadios(){return _toConsumableArray(this.querySelectorAll("nile-radio-button"));}},{key:"handleRadioClick",value:function handleRadioClick(t){var i=t.target.closest("nile-radio-button"),e=this.getAllRadios(),o=this.value;i.disabled||(this.value=i.value,e.forEach(function(t){return t.checked=t===i;}),this.value!==o&&(this.emit("nile-change",{value:this.value}),this.emit("input")));}},{key:"handleDisabledChange",value:function handleDisabledChange(){var _this2=this;this.getAllRadios().forEach(function(t){t.disabled=_this2.disabled;});}},{key:"handleInitialDisabledState",value:function handleInitialDisabledState(){var _this3=this;this.getAllRadios().forEach(function(t){t.disabled=t.hasAttribute("disabled")?t.disabled:_this3.disabled;});}},{key:"handleKeyDown",value:function handleKeyDown(t){var _i$find,_this4=this;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;var i=this.getAllRadios().filter(function(t){return!t.disabled;}),e=(_i$find=i.find(function(t){return t.checked;}))!==null&&_i$find!==void 0?_i$find:i[0],o=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,s=this.value;var l=i.indexOf(e)+o;l<0&&(l=i.length-1),l>i.length-1&&(l=0),this.getAllRadios().forEach(function(t){t.checked=!1,_this4.hasButtonGroup||(t.tabIndex=-1);}),this.value=i[l].value,i[l].checked=!0,this.hasButtonGroup?i[l].shadowRoot.querySelector("button").focus():(i[l].tabIndex=0,i[l].focus()),this.value!==s&&(this.emit("change"),this.emit("input")),t.preventDefault();}},{key:"handleLabelClick",value:function handleLabelClick(){var t=this.getAllRadios(),i=t.find(function(t){return t.checked;})||t[0];i&&i.focus();}},{key:"handleSlotChange",value:function handleSlotChange(){var _this5=this,_this$shadowRoot;var t=this.getAllRadios();if(t.forEach(function(t){return t.checked=t.value===_this5.value;}),this.hasButtonGroup=t.some(function(t){return"nile-radio-button"===t.tagName.toLowerCase();}),!t.some(function(t){return t.checked;}))if(this.hasButtonGroup){t[0].shadowRoot.querySelector("button").tabIndex=0;}else t[0].tabIndex=0;this.hasButtonGroup&&((_this$shadowRoot=this.shadowRoot)===null||_this$shadowRoot===void 0?void 0:_this$shadowRoot.querySelector("nile-button-group"));var i=_toConsumableArray(this.defaultSlot.assignedElements({flatten:!0}));i.forEach(function(t){var e=i.indexOf(t),o=_this5.findButton(t);null!==o&&(o.classList.toggle("nile-radio-button--first",0===e),o.classList.toggle("nile-radio-button--inner",e>0&&e<i.length-1),o.classList.toggle("nile-radio-button--last",e===i.length-1));});}},{key:"findButton",value:function findButton(t){var _t$closest;var i="nile-radio-button";return(_t$closest=t.closest(i))!==null&&_t$closest!==void 0?_t$closest:t.querySelector(i);}},{key:"updateCheckedRadio",value:function updateCheckedRadio(){var _this6=this;this.getAllRadios().forEach(function(t){return t.checked=t.value===_this6.value;});}},{key:"handleValueChange",value:function handleValueChange(){this.hasUpdated&&this.updateCheckedRadio();}},{key:"render",value:function render(){var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var e=!!this.label||!!t,o=!!this.helpText,s=!!this.errorMessage,l=a(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot\n @click=","\n @keydown=","\n @slotchange=","\n role=\"presentation\"\n ></slot>\n "])),this.handleRadioClick,this.handleKeyDown,this.handleSlotChange);return a(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <fieldset\n part=\"form-control\"\n class=","\n role=\"radiogroup\"\n aria-labelledby=\"label\"\n aria-describedby=\"help-text\"\n aria-errormessage=\"error-message\"\n >\n <label\n part=\"form-control-label\"\n id=\"label\"\n class=\"form-control__label\"\n aria-hidden=","\n @click=","\n >\n <slot name=\"label\">","</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div class=\"visually-hidden\">\n <label class=\"radio-group__validation\">\n <input\n type=\"text\"\n class=\"radio-group__validation-input\"\n ?required=","\n tabindex=\"-1\"\n hidden\n />\n </label>\n </div>\n\n ","\n </div>\n\n ","\n ","\n </fieldset>\n "])),i({"form-control":!0,"form-control--medium":!0,"form-control--radio-group":!0,"form-control--has-label":e,"form-control--has-help-text":o}),e?"false":"true",this.handleLabelClick,this.label,this.required,this.hasButtonGroup?a(_templateObject3||(_templateObject3=_taggedTemplateLiteral([" "," "])),l):a(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div\n class=\"","\"\n >\n ","\n </div>\n "])),this.labelInline?"form-control--inline-radio":"",l),o?a(_templateObject5||(_templateObject5=_taggedTemplateLiteral([" <nile-form-help-text>","</nile-form-help-text> "])),this.helpText):"",s?a(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}]);return c;}(h));c.styles=d,t([e("slot:not([name])")],c.prototype,"defaultSlot",void 0),t([o()],c.prototype,"hasButtonGroup",void 0),t([o()],c.prototype,"defaultValue",void 0),t([s()],c.prototype,"label",void 0),t([s()],c.prototype,"name",void 0),t([s({reflect:!0})],c.prototype,"value",void 0),t([s({reflect:!0})],c.prototype,"form",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"required",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"labelInline",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),t([s({attribute:"help-text"})],c.prototype,"helpText",void 0),t([s({attribute:"error-message"})],c.prototype,"errorMessage",void 0),t([n("disabled",{waitUntilFirstUpdate:!0})],c.prototype,"handleDisabledChange",null),t([n("value")],c.prototype,"handleValueChange",null),_export("N",c=t([l("nile-radio-button-group")],c));}};});
2
+ //# sourceMappingURL=nile-radio-button-group.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-radio-button-group.cjs.js","sources":["../../../src/nile-radio-button-group/nile-radio-button-group.ts"],"sourcesContent":["import { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-radio-button-group.css';\nimport type { CSSResultGroup } from 'lit';\nimport type NileRadioButton from '../nile-radio-button/nile-radio-button';\n\n/**\n * @summary Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.\n *\n * @dependency nile-button-group\n *\n * @slot - The default slot where `<nile-radio>` or `<nile-radio-button>` elements are placed.\n * @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`\n * attribute.\n *\n * @event change - Emitted when the radio group's selected value changes.\n * @event input - Emitted when the radio group receives user input.\n * @event invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n * @csspart button-group - The button group that wraps radio buttons.\n * @csspart button-group__base - The button group's `base` part.\n */\n@customElement('nile-radio-button-group')\nexport class NileRadioButtonGroup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n private customValidityMessage = '';\n\n @query('slot:not([name])') defaultSlot: HTMLSlotElement;\n\n @state() private hasButtonGroup = false;\n\n @state() defaultValue = '';\n\n /**\n * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\n * instead.\n */\n @property() label = '';\n\n /** The name of the radio group, submitted as a name/value pair with form data. */\n @property() name = 'option';\n\n /** The current value of the radio group, submitted as a name/value pair with form data. */\n @property({ reflect: true }) value = '';\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Ensures a child radio is checked before allowing the containing form to submit. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Used to show radio in inline or not */\n @property({ type: Boolean, reflect: true }) labelInline = false;\n\n /** Used to disabled or not */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n connectedCallback() {\n super.connectedCallback();\n this.defaultValue = this.value;\n this.handleInitialDisabledState();\n }\n\n private getAllRadios() {\n return [...this.querySelectorAll<NileRadioButton>('nile-radio-button')];\n }\n\n private handleRadioClick(event: MouseEvent) {\n const target = (event.target as HTMLElement).closest<NileRadioButton>(\n 'nile-radio-button'\n )!;\n const radios = this.getAllRadios();\n const oldValue = this.value;\n\n if (target.disabled) {\n return;\n }\n\n this.value = target.value;\n radios.forEach(radio => (radio.checked = radio === target));\n\n if (this.value !== oldValue) {\n this.emit('nile-change', { value: this.value });\n this.emit('input');\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n this.getAllRadios().forEach(radio => {\n radio.disabled = this.disabled;\n });\n }\n\n private handleInitialDisabledState() {\n this.getAllRadios().forEach(radio => {\n radio.disabled = radio.hasAttribute('disabled')\n ? radio.disabled\n : this.disabled;\n });\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (\n !['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].includes(\n event.key\n )\n ) {\n return;\n }\n\n const radios = this.getAllRadios().filter(radio => !radio.disabled);\n const checkedRadio = radios.find(radio => radio.checked) ?? radios[0];\n const incr =\n event.key === ' '\n ? 0\n : ['ArrowUp', 'ArrowLeft'].includes(event.key)\n ? -1\n : 1;\n const oldValue = this.value;\n let index = radios.indexOf(checkedRadio) + incr;\n\n if (index < 0) {\n index = radios.length - 1;\n }\n\n if (index > radios.length - 1) {\n index = 0;\n }\n\n this.getAllRadios().forEach(radio => {\n radio.checked = false;\n\n if (!this.hasButtonGroup) {\n radio.tabIndex = -1;\n }\n });\n\n this.value = radios[index].value;\n radios[index].checked = true;\n\n if (!this.hasButtonGroup) {\n radios[index].tabIndex = 0;\n radios[index].focus();\n } else {\n radios[index].shadowRoot!.querySelector('button')!.focus();\n }\n\n if (this.value !== oldValue) {\n this.emit('change');\n this.emit('input');\n }\n\n event.preventDefault();\n }\n\n private handleLabelClick() {\n const radios = this.getAllRadios();\n const checked = radios.find(radio => radio.checked);\n const radioToFocus = checked || radios[0];\n\n // Move focus to the checked radio (or the first one if none are checked) when clicking the label\n if (radioToFocus) {\n radioToFocus.focus();\n }\n }\n\n private handleSlotChange() {\n const radios = this.getAllRadios();\n\n radios.forEach(radio => (radio.checked = radio.value === this.value));\n\n this.hasButtonGroup = radios.some(\n radio => radio.tagName.toLowerCase() === 'nile-radio-button'\n );\n\n if (!radios.some(radio => radio.checked)) {\n if (this.hasButtonGroup) {\n const buttonRadio = radios[0].shadowRoot!.querySelector('button')!;\n buttonRadio.tabIndex = 0;\n } else {\n radios[0].tabIndex = 0;\n }\n }\n\n if (this.hasButtonGroup) {\n const buttonGroup = this.shadowRoot?.querySelector('nile-button-group');\n }\n\n const slottedElements = [\n ...this.defaultSlot.assignedElements({ flatten: true }),\n ] as HTMLElement[];\n\n // console.log(slottedElements);\n\n slottedElements.forEach(el => {\n const index = slottedElements.indexOf(el);\n const button = this.findButton(el);\n\n if (button !== null) {\n button.classList.toggle('nile-radio-button--first', index === 0);\n button.classList.toggle(\n 'nile-radio-button--inner',\n index > 0 && index < slottedElements.length - 1\n );\n button.classList.toggle(\n 'nile-radio-button--last',\n index === slottedElements.length - 1\n );\n }\n });\n }\n\n private findButton(el: HTMLElement) {\n const selector = 'nile-radio-button';\n\n return el.closest(selector) ?? el.querySelector(selector);\n }\n\n private updateCheckedRadio() {\n const radios = this.getAllRadios();\n radios.forEach(radio => (radio.checked = radio.value === this.value));\n }\n\n @watch('value')\n handleValueChange() {\n if (this.hasUpdated) {\n this.updateCheckedRadio();\n }\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n const defaultSlot = html`\n <slot\n @click=${this.handleRadioClick}\n @keydown=${this.handleKeyDown}\n @slotchange=${this.handleSlotChange}\n role=\"presentation\"\n ></slot>\n `;\n\n return html`\n <fieldset\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--radio-group': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n role=\"radiogroup\"\n aria-labelledby=\"label\"\n aria-describedby=\"help-text\"\n aria-errormessage=\"error-message\"\n >\n <label\n part=\"form-control-label\"\n id=\"label\"\n class=\"form-control__label\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n @click=${this.handleLabelClick}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div class=\"visually-hidden\">\n <label class=\"radio-group__validation\">\n <input\n type=\"text\"\n class=\"radio-group__validation-input\"\n ?required=${this.required}\n tabindex=\"-1\"\n hidden\n />\n </label>\n </div>\n\n ${this.hasButtonGroup\n ? html` ${defaultSlot} `\n : html`\n <div\n class=\"${this.labelInline\n ? `form-control--inline-radio`\n : ``}\"\n >\n ${defaultSlot}\n </div>\n `}\n </div>\n\n ${hasHelpText\n ? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </fieldset>\n `;\n }\n}\n\nexport default NileRadioButtonGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-radio-button-group': NileRadioButtonGroup;\n }\n}\n"],"names":["NileRadioButtonGroup","_h","_inherits","c","_super","_createSuper","this","hasSlotController","HasSlotController","customValidityMessage","hasButtonGroup","defaultValue","label","name","value","form","required","labelInline","disabled","helpText","errorMessage","_this","_createClass","key","connectedCallback","super","handleInitialDisabledState","getAllRadios","_toConsumableArray","querySelectorAll","handleRadioClick","event","target","closest","radios","oldValue","forEach","radio","checked","emit","handleDisabledChange","hasAttribute","handleKeyDown","includes","filter","checkedRadio","find","incr","index","indexOf","length","tabIndex","shadowRoot","querySelector","focus","preventDefault","handleLabelClick","radioToFocus","handleSlotChange","some","tagName","toLowerCase","slottedElements","defaultSlot","assignedElements","flatten","el","button","findButton","classList","toggle","selector","_t$closest","updateCheckedRadio","handleValueChange","hasUpdated","render","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","_templateObject2","classMap","_templateObject3","_templateObject4","_templateObject5","_templateObject6","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","attribute","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"4uLA0BaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,uEAGYG,KAAAA,CAAiBC,iBAAAA,CAAG,GAAIC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA,KAAAA,EAEvC,WAAA,CACA,SAEMF,KAAAA,CAAqBG,qBAAAA,CAAG,EAIfH,CAAAA,KAAAA,CAAcI,cAAG,CAAA,CAAA,CAAA,CAEzBJ,KAAAA,CAAYK,YAAG,CAAA,EAAA,CAMZL,KAAAA,CAAKM,KAAAA,CAAG,EAGRN,CAAAA,KAAAA,CAAIO,K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S,OAAA,KA5NUxG,CAAoB6F,CAAAA,CAAAA,CAAA,CADhCY,CAAAA,CAAc,4BACFzG"}
@@ -0,0 +1,2 @@
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,r;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",r=[o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: block;\n }\n\n .form-control {\n border: none;\n padding: 0;\n margin: 0;\n }\n\n .form-control__label {\n padding: 0;\n font-size: 14px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .radio-group--required .radio-group__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n .form-control-input {\n display: flex;\n flex-wrap: nowrap;\n }\n\n .form-control--has-label .form-control__label {\n display: inline-block;\n color: inherit;\n margin-bottom: 12px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n"])))]);}};});
2
+ //# sourceMappingURL=nile-radio-button-group.css.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-radio-button-group.css.cjs.js","sources":["../../../src/nile-radio-button-group/nile-radio-button-group.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * RadioButtonGroup CSS\n */\nexport const styles = css`\n :host {\n display: block;\n }\n\n .form-control {\n border: none;\n padding: 0;\n margin: 0;\n }\n\n .form-control__label {\n padding: 0;\n font-size: 14px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .radio-group--required .radio-group__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n .form-control-input {\n display: flex;\n flex-wrap: nowrap;\n }\n\n .form-control--has-label .form-control__label {\n display: inline-block;\n color: inherit;\n margin-bottom: 12px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles$1","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAuEeA,CAAA,CAAA,CA3DOC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -0,0 +1,58 @@
1
+ import{i as o}from"../index-cd2f9c12.esm.js";var r=[o`
2
+ :host {
3
+ display: block;
4
+ }
5
+
6
+ .form-control {
7
+ border: none;
8
+ padding: 0;
9
+ margin: 0;
10
+ }
11
+
12
+ .form-control__label {
13
+ padding: 0;
14
+ font-size: 14px;
15
+ color: var(--nile-colors-dark-900);
16
+ font-family: Colfax-regular;
17
+ font-size: 14px;
18
+ font-style: normal;
19
+ font-weight: 400;
20
+ line-height: 14px;
21
+ letter-spacing: 0.2px;
22
+ }
23
+
24
+ .radio-group--required .radio-group__label::after {
25
+ content: '*';
26
+ margin-inline-start: -2px;
27
+ }
28
+
29
+ .visually-hidden {
30
+ position: absolute;
31
+ width: 1px;
32
+ height: 1px;
33
+ padding: 0;
34
+ margin: -1px;
35
+ overflow: hidden;
36
+ clip: rect(0, 0, 0, 0);
37
+ white-space: nowrap;
38
+ border: 0;
39
+ }
40
+
41
+ .form-control-input {
42
+ display: flex;
43
+ flex-wrap: nowrap;
44
+ }
45
+
46
+ .form-control--has-label .form-control__label {
47
+ display: inline-block;
48
+ color: inherit;
49
+ margin-bottom: 12px;
50
+ color: var(--nile-colors-dark-900);
51
+ font-family: Colfax-regular;
52
+ font-size: 14px;
53
+ font-style: normal;
54
+ font-weight: 400;
55
+ line-height: 14px;
56
+ letter-spacing: 0.2px;
57
+ }
58
+ `];export{r as s};
@@ -0,0 +1,56 @@
1
+ import{__decorate as t}from"tslib";import{classMap as i}from"lit/directives/class-map.js";import{query as e,state as o,property as s,customElement as l}from"lit/decorators.js";import{H as r}from"../internal/slot.esm.js";import{html as a}from"lit";import{w as n}from"../internal/watch.esm.js";import{N as h}from"../internal/nile-element.esm.js";import{s as d}from"./nile-radio-button-group.css.esm.js";import"../index-cd2f9c12.esm.js";let c=class extends h{constructor(){super(...arguments),this.hasSlotController=new r(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.label="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1,this.helpText="",this.errorMessage=""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState()}getAllRadios(){return[...this.querySelectorAll("nile-radio-button")]}handleRadioClick(t){const i=t.target.closest("nile-radio-button"),e=this.getAllRadios(),o=this.value;i.disabled||(this.value=i.value,e.forEach((t=>t.checked=t===i)),this.value!==o&&(this.emit("nile-change",{value:this.value}),this.emit("input")))}handleDisabledChange(){this.getAllRadios().forEach((t=>{t.disabled=this.disabled}))}handleInitialDisabledState(){this.getAllRadios().forEach((t=>{t.disabled=t.hasAttribute("disabled")?t.disabled:this.disabled}))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;const i=this.getAllRadios().filter((t=>!t.disabled)),e=i.find((t=>t.checked))??i[0],o=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,s=this.value;let l=i.indexOf(e)+o;l<0&&(l=i.length-1),l>i.length-1&&(l=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=i[l].value,i[l].checked=!0,this.hasButtonGroup?i[l].shadowRoot.querySelector("button").focus():(i[l].tabIndex=0,i[l].focus()),this.value!==s&&(this.emit("change"),this.emit("input")),t.preventDefault()}handleLabelClick(){const t=this.getAllRadios(),i=t.find((t=>t.checked))||t[0];i&&i.focus()}handleSlotChange(){const t=this.getAllRadios();if(t.forEach((t=>t.checked=t.value===this.value)),this.hasButtonGroup=t.some((t=>"nile-radio-button"===t.tagName.toLowerCase())),!t.some((t=>t.checked)))if(this.hasButtonGroup){t[0].shadowRoot.querySelector("button").tabIndex=0}else t[0].tabIndex=0;this.hasButtonGroup&&this.shadowRoot?.querySelector("nile-button-group");const i=[...this.defaultSlot.assignedElements({flatten:!0})];i.forEach((t=>{const e=i.indexOf(t),o=this.findButton(t);null!==o&&(o.classList.toggle("nile-radio-button--first",0===e),o.classList.toggle("nile-radio-button--inner",e>0&&e<i.length-1),o.classList.toggle("nile-radio-button--last",e===i.length-1))}))}findButton(t){const i="nile-radio-button";return t.closest(i)??t.querySelector(i)}updateCheckedRadio(){this.getAllRadios().forEach((t=>t.checked=t.value===this.value))}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}render(){const t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const e=!!this.label||!!t,o=!!this.helpText,s=!!this.errorMessage,l=a`
2
+ <slot
3
+ @click=${this.handleRadioClick}
4
+ @keydown=${this.handleKeyDown}
5
+ @slotchange=${this.handleSlotChange}
6
+ role="presentation"
7
+ ></slot>
8
+ `;return a`
9
+ <fieldset
10
+ part="form-control"
11
+ class=${i({"form-control":!0,"form-control--medium":!0,"form-control--radio-group":!0,"form-control--has-label":e,"form-control--has-help-text":o})}
12
+ role="radiogroup"
13
+ aria-labelledby="label"
14
+ aria-describedby="help-text"
15
+ aria-errormessage="error-message"
16
+ >
17
+ <label
18
+ part="form-control-label"
19
+ id="label"
20
+ class="form-control__label"
21
+ aria-hidden=${e?"false":"true"}
22
+ @click=${this.handleLabelClick}
23
+ >
24
+ <slot name="label">${this.label}</slot>
25
+ </label>
26
+
27
+ <div part="form-control-input" class="form-control-input">
28
+ <div class="visually-hidden">
29
+ <label class="radio-group__validation">
30
+ <input
31
+ type="text"
32
+ class="radio-group__validation-input"
33
+ ?required=${this.required}
34
+ tabindex="-1"
35
+ hidden
36
+ />
37
+ </label>
38
+ </div>
39
+
40
+ ${this.hasButtonGroup?a` ${l} `:a`
41
+ <div
42
+ class="${this.labelInline?"form-control--inline-radio":""}"
43
+ >
44
+ ${l}
45
+ </div>
46
+ `}
47
+ </div>
48
+
49
+ ${o?a` <nile-form-help-text>${this.helpText}</nile-form-help-text> `:""}
50
+ ${s?a`
51
+ <nile-form-error-message
52
+ >${this.errorMessage}</nile-form-error-message
53
+ >
54
+ `:""}
55
+ </fieldset>
56
+ `}};c.styles=d,t([e("slot:not([name])")],c.prototype,"defaultSlot",void 0),t([o()],c.prototype,"hasButtonGroup",void 0),t([o()],c.prototype,"defaultValue",void 0),t([s()],c.prototype,"label",void 0),t([s()],c.prototype,"name",void 0),t([s({reflect:!0})],c.prototype,"value",void 0),t([s({reflect:!0})],c.prototype,"form",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"required",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"labelInline",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),t([s({attribute:"help-text"})],c.prototype,"helpText",void 0),t([s({attribute:"error-message"})],c.prototype,"errorMessage",void 0),t([n("disabled",{waitUntilFirstUpdate:!0})],c.prototype,"handleDisabledChange",null),t([n("value")],c.prototype,"handleValueChange",null),c=t([l("nile-radio-button-group")],c);export{c as N};
@@ -30,3 +30,5 @@ export { NileFormErrorMessage } from './nile-form-error-message';
30
30
  export { NileFormHelpText } from './nile-form-help-text';
31
31
  export { NileCalendar } from './nile-calendar';
32
32
  export { NileLink } from './nile-link';
33
+ export { NileRadioButton } from './nile-radio-button';
34
+ export { NileRadioButtonGroup } from './nile-radio-button-group';
package/dist/src/index.js CHANGED
@@ -30,4 +30,6 @@ export { NileFormErrorMessage } from './nile-form-error-message';
30
30
  export { NileFormHelpText } from './nile-form-help-text';
31
31
  export { NileCalendar } from './nile-calendar';
32
32
  export { NileLink } from './nile-link';
33
+ export { NileRadioButton } from './nile-radio-button';
34
+ export { NileRadioButtonGroup } from './nile-radio-button-group';
33
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink} from './nile-link';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink} from './nile-link';\nexport { NileRadioButton } from './nile-radio-button';\nexport { NileRadioButtonGroup } from './nile-radio-button-group';\n"]}
@@ -21,6 +21,9 @@ export const styles = css `
21
21
  white-space: nowrap;
22
22
  padding: 12px;
23
23
  gap: 8px;
24
+ height: 38px;
25
+ box-sizing: border-box;
26
+ cursor: pointer
24
27
  }
25
28
 
26
29
  .link__label {
@@ -38,6 +41,7 @@ export const styles = css `
38
41
  color: rgba(0, 94, 166, 0.5);
39
42
  cursor: not-allowed;
40
43
  opacity: 0.6;
44
+ pointer-events:none;
41
45
  }
42
46
 
43
47
  .link:not(.link--disabled):not(.link__button):hover {