@aquera/nile-elements 0.1.28 → 0.1.29-beta-1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/index.html +0 -97
- package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
- package/dist/nile-accordion/nile-accordion.esm.js +2 -2
- package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js +1 -1
- package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js.map +1 -1
- package/dist/nile-circular-progressbar/nile-circular-progressbar.css.cjs.js +1 -1
- package/dist/nile-circular-progressbar/nile-circular-progressbar.css.cjs.js.map +1 -1
- package/dist/nile-circular-progressbar/nile-circular-progressbar.css.esm.js +47 -29
- package/dist/nile-circular-progressbar/nile-circular-progressbar.esm.js +16 -13
- package/dist/nile-progress-bar/nile-progress-bar.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.cjs.js.map +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js.map +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.esm.js +16 -3
- package/dist/nile-progress-bar/nile-progress-bar.esm.js +3 -3
- package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
- package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
- package/dist/nile-stepper/nile-stepper.css.cjs.js +1 -1
- package/dist/nile-stepper/nile-stepper.css.cjs.js.map +1 -1
- package/dist/nile-stepper/nile-stepper.css.esm.js +8 -2
- package/dist/nile-stepper/nile-stepper.esm.js +3 -3
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js.map +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.css.esm.js +37 -16
- package/dist/nile-stepper-item/nile-stepper-item.esm.js +20 -17
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.css.cjs.js +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.css.cjs.js.map +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.css.esm.js +28 -14
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +11 -13
- package/dist/src/nile-accordion/nile-accordion.d.ts +6 -5
- package/dist/src/nile-accordion/nile-accordion.js +19 -6
- package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.css.d.ts +5 -5
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.css.js +52 -34
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.css.js.map +1 -1
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.d.ts +6 -2
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.js +47 -32
- package/dist/src/nile-circular-progressbar/nile-circular-progressbar.js.map +1 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.css.js +14 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.css.js.map +1 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.d.ts +1 -0
- package/dist/src/nile-progress-bar/nile-progress-bar.js +6 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
- package/dist/src/nile-stepper/nile-stepper.css.js +6 -0
- package/dist/src/nile-stepper/nile-stepper.css.js.map +1 -1
- package/dist/src/nile-stepper/nile-stepper.d.ts +2 -2
- package/dist/src/nile-stepper/nile-stepper.js +8 -8
- package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.css.js +37 -16
- package/dist/src/nile-stepper-item/nile-stepper-item.css.js.map +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.d.ts +5 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.js +33 -14
- package/dist/src/nile-stepper-item/nile-stepper-item.js.map +1 -1
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.css.js +28 -14
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.css.js.map +1 -1
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.d.ts +1 -0
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js +10 -8
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-accordion/nile-accordion.ts +13 -2
- package/src/nile-circular-progressbar/nile-circular-progressbar.css.ts +48 -31
- package/src/nile-circular-progressbar/nile-circular-progressbar.ts +49 -26
- package/src/nile-progress-bar/nile-progress-bar.css.ts +15 -2
- package/src/nile-progress-bar/nile-progress-bar.ts +6 -1
- package/src/nile-stepper/nile-stepper.css.ts +6 -0
- package/src/nile-stepper/nile-stepper.ts +11 -11
- package/src/nile-stepper-item/nile-stepper-item.css.ts +37 -16
- package/src/nile-stepper-item/nile-stepper-item.ts +34 -17
- package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.css.ts +28 -14
- package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts +12 -8
- package/vscode-html-custom-data.json +30 -9
@@ -1,2 +1,2 @@
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-vertical-stepper-item.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,s,l,p,r,_,
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-vertical-stepper-item.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,s,l,p,r,_,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,d;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;i=_lit.nothing;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;l=_litDecoratorsJs.state;p=_litDecoratorsJs.customElement;},function(_nileVerticalStepperItemCssCjsJs){r=_nileVerticalStepperItemCssCjsJs.s;},function(_internalNileElementCjsJs){_=_internalNileElementCjsJs.N;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_ref){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.title="",_this.subtitle="",_this.contentBelow=!1,_this.size="md",_this.icon="tick",_this.isFirst=!1,_this.isLast=!1,_this.isComplete=!1,_this.isCurrent=!1,_this.haveFlex=!0;return _this;}_inherits(d,_ref);return _createClass(d,[{key:"render",value:function render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");var t=this.isCurrent,s=this.isComplete;var l=!1;(s&&!t||this.completedStepValue==this.value)&&(l=!0);var p=!1;return s&&(p=!0,this.calculatedCompletedStepValue==this.value&&(p=!1)),"sm"==this.size||this.size,e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<div class=\"","\">\n\t\t\t\t<div class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"stepper__item__line__container\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"stepper__item__content\">\n\t\t\t\t\t<div class=\"","\">","</div>\n\t\t\t\t\t<div class=\"","\">","</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t"])),o({stepper__item:!0,"stepper__item--selected":t,"stepper__item--default":!t,"stepper__item--sm":"sm"==this.size,"stepper__item--md":"md"==this.size,"stepper__item--lg":"lg"==this.size}),l?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div class=\"stepper__bulletin--icon\">","</div>"])),this.getSvg()):e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<div class=\"","\"></div>"])),o({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})),this.isLast?i:e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<div class=\"","\"></div>"])),o({stepper__item__line:!0,"stepper__item__line--active":p})),o({stepper__content__title:!0,"stepper__content__title--alone":!this.subtitle,"stepper__content__title--active":t}),this.title,o({stepper__content__subtitle:!0,"stepper__content__subtitle--active":t}),this.subtitle);}},{key:"getSvg",value:function getSvg(){var t="sm"==this.size?20:"md"==this.size?24:28;return e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n\t\t<svg width=\"","\" height=\"","\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t"])),t,t);}}],[{key:"styles",get:function get(){return[r];}}]);}(_));t([s()],d.prototype,"title",void 0),t([s()],d.prototype,"subtitle",void 0),t([l()],d.prototype,"contentBelow",void 0),t([l()],d.prototype,"size",void 0),t([l()],d.prototype,"icon",void 0),t([l()],d.prototype,"isFirst",void 0),t([l()],d.prototype,"isLast",void 0),t([l()],d.prototype,"isComplete",void 0),t([l()],d.prototype,"isCurrent",void 0),t([l()],d.prototype,"currentStepValue",void 0),t([l()],d.prototype,"completedStepValue",void 0),t([l()],d.prototype,"calculatedCompletedStepValue",void 0),t([l()],d.prototype,"value",void 0),t([l()],d.prototype,"haveFlex",void 0),_export("N",d=t([p("nile-vertical-stepper-item")],d));}};});
|
2
2
|
//# sourceMappingURL=nile-vertical-stepper-item.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-vertical-stepper-item.cjs.js","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.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 {LitElement, nothing, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport {styles} from './nile-vertical-stepper-item.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile vertical-stepper-item component.\n *\n * @tag nile-vertical-stepper-item\n *\n */\n@customElement('nile-vertical-stepper-item')\nexport class NileVerticalStepperItem extends NileElement {\n\t/* Properties passed directly */\n\t@property() title: string = '';\n\t@property() subtitle: string = '';\n\n\n\t/* Properties passed to parent component: NileStepper */\n\t@state() private contentBelow = false;\n\t@state() private size : 'sm' | 'md' | 'lg' = 'md';\n\t@state() private icon = 'tick';\n\n\n\t/* Properties Computed at parent level component NileStepper */\n\t@state() private isFirst = false;\n\t@state() private isLast = false;\n\n\t@state() private isComplete = false;\n\t@state() private isCurrent = false;\n\t@state() private currentStepValue :Number;\n\t@state() private completedStepValue :Number;\n\t@state() private calculatedCompletedStepValue :Number;\n\n\t@state() private value :Number;\n\t@state() private haveFlex :Boolean=true;\n\n\t/**\n\t * The styles for nile-vertical-stepper-item\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\tif (this.isLast) this.style.setProperty('--vertical-stepper-flex-val', `0`);\n\t\tconst isCurrent = this.isCurrent;\n\t\tconst isComplete = this.isComplete;\n\n\t\tlet showCompletedIcon=false;\n\t\tif(isComplete && !isCurrent || this.completedStepValue==this.value) showCompletedIcon=true;\n\n\t\tlet suffixStepperLineActive = false;\n\t\tif (isComplete) {\n\t\t\tsuffixStepperLineActive = true;\n\t\t\tif (this.calculatedCompletedStepValue == this.value) suffixStepperLineActive = false;\n\t\t}\n\n\t\tlet iconSize = this.size == 'sm'?14:this.size == 'md'?16:20;\n\t\treturn html`\n\t\t\t<div class=\"${classMap({\n\t\t\t\t'stepper__item':true,\n\t\t\t\t'stepper__item--selected':isCurrent,\n\t\t\t\t'stepper__item--default':!isCurrent,\n\t\t\t\t'stepper__item--sm':this.size=='sm',\n\t\t\t\t'stepper__item--md':this.size=='md',\n\t\t\t\t'stepper__item--lg':this.size=='lg',\n\t\t\t})}\">\n\t\t\t\t<div class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t${showCompletedIcon ? \n\t\t\t\t\t\t\thtml`<div class=\"stepper__bulletin--icon\"
|
1
|
+
{"version":3,"file":"nile-vertical-stepper-item.cjs.js","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.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 {LitElement, nothing, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport {styles} from './nile-vertical-stepper-item.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile vertical-stepper-item component.\n *\n * @tag nile-vertical-stepper-item\n *\n */\n@customElement('nile-vertical-stepper-item')\nexport class NileVerticalStepperItem extends NileElement {\n\t/* Properties passed directly */\n\t@property() title: string = '';\n\t@property() subtitle: string = '';\n\n\n\t/* Properties passed to parent component: NileStepper */\n\t@state() private contentBelow = false;\n\t@state() private size : 'sm' | 'md' | 'lg' = 'md';\n\t@state() private icon = 'tick';\n\n\n\t/* Properties Computed at parent level component NileStepper */\n\t@state() private isFirst = false;\n\t@state() private isLast = false;\n\n\t@state() private isComplete = false;\n\t@state() private isCurrent = false;\n\t@state() private currentStepValue :Number;\n\t@state() private completedStepValue :Number;\n\t@state() private calculatedCompletedStepValue :Number;\n\n\t@state() private value :Number;\n\t@state() private haveFlex :Boolean=true;\n\n\t/**\n\t * The styles for nile-vertical-stepper-item\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\tif (this.isLast) this.style.setProperty('--vertical-stepper-flex-val', `0`);\n\t\tconst isCurrent = this.isCurrent;\n\t\tconst isComplete = this.isComplete;\n\n\t\tlet showCompletedIcon=false;\n\t\tif(isComplete && !isCurrent || this.completedStepValue==this.value) showCompletedIcon=true;\n\n\t\tlet suffixStepperLineActive = false;\n\t\tif (isComplete) {\n\t\t\tsuffixStepperLineActive = true;\n\t\t\tif (this.calculatedCompletedStepValue == this.value) suffixStepperLineActive = false;\n\t\t}\n\n\t\tlet iconSize = this.size == 'sm'?14:this.size == 'md'?16:20;\n\t\treturn html`\n\t\t\t<div class=\"${classMap({\n\t\t\t\t'stepper__item':true,\n\t\t\t\t'stepper__item--selected':isCurrent,\n\t\t\t\t'stepper__item--default':!isCurrent,\n\t\t\t\t'stepper__item--sm':this.size=='sm',\n\t\t\t\t'stepper__item--md':this.size=='md',\n\t\t\t\t'stepper__item--lg':this.size=='lg',\n\t\t\t})}\">\n\t\t\t\t<div class=\"stepper-item__connector-content\">\n\t\t\t\t\t<div class=\"stepper__item__bulletin\">\n\t\t\t\t\t\t${showCompletedIcon ? \n\t\t\t\t\t\t\thtml`<div class=\"stepper__bulletin--icon\">${this.getSvg()}</div>`\n\t\t\t\t\t\t\t: html`<div class=\"${classMap({ 'stepper__bulletin--dot':true, 'stepper__bulletin__dot--active':isCurrent })}\"></div>`\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"stepper__item__line__container\">\n\t\t\t\t\t\t${this.isLast?nothing : html`<div class=\"${classMap({ 'stepper__item__line':true, 'stepper__item__line--active':suffixStepperLineActive })}\"></div>`}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"stepper__item__content\">\n\t\t\t\t\t<div class=\"${classMap({ 'stepper__content__title':true, \"stepper__content__title--alone\": !this.subtitle, 'stepper__content__title--active':isCurrent })}\">${this.title}</div>\n\t\t\t\t\t<div class=\"${classMap({ 'stepper__content__subtitle':true, 'stepper__content__subtitle--active':isCurrent })}\">${this.subtitle}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\tgetSvg():TemplateResult{\n\t\tlet iconSize = this.size == 'sm' ? 20 : this.size == 'md' ? 24 : 28;\n\t\treturn html`\n\t\t<svg width=\"${iconSize}\" height=\"${iconSize}\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z\" fill=\"white\"/>\n\t\t</svg>\n\t\t`\n\t}\n\n\n\t/* #endregion */\n}\n\nexport default NileVerticalStepperItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-vertical-stepper-item': NileVerticalStepperItem;\n }\n}"],"names":["NileVerticalStepperItem","d","this","title","subtitle","contentBelow","size","icon","isFirst","isLast","isComplete","isCurrent","haveFlex","_this","_inherits","_ref","_createClass","key","value","render","style","setProperty","showCompletedIcon","completedStepValue","suffixStepperLineActive","calculatedCompletedStepValue","html","_templateObject","_taggedTemplateLiteral","classMap","stepper__item","_templateObject2","getSvg","_templateObject3","nothing","_templateObject4","stepper__item__line","stepper__content__title","stepper__content__subtitle","iconSize","_templateObject5","__decorate","get","styles","NileElement","property","prototype","state","_export","customElement"],"mappings":"63GAqBaA,CAAAA,uBAAAA,IAAAA,EAAN,SAAAC,EAAA,qEAEMC,EAAAA,KAAAA,CAAKC,KAAW,CAAA,EAAA,CAChBD,KAAAA,CAAQE,QAAW,CAAA,EAAA,CAIdF,KAAAA,CAAYG,YAAG,CAAA,CAAA,CAAA,CACfH,KAAAA,CAAII,IAAwB,CAAA,IAAA,CAC5BJ,KAAAA,CAAIK,IAAAA,CAAG,MAIPL,CAAAA,KAAAA,CAAOM,SAAG,CACVN,CAAAA,KAAAA,CAAMO,MAAG,CAAA,CAAA,CAAA,CAET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AAAA,CAAA8C,UAAA,8BAAA,CAAA,IAAA,EAAA,CAAA,CAErCL,EAAA,CAAhBM,CAAAA,CAAAA,CAAAA,CAAAA,CAA8B/C,CAAA8C,CAAAA,SAAAA,CAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CACdL,EAAA,CAAhBM,CAAAA,CAAAA,CAAAA,CAAAA,CAAuC/C,CAAA8C,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAAAE,OAAA,KAvB5BhD,EAAuByC,CAAA,CAAA,CADnCQ,CAAc,CAAA,4BAAA,CAAA,CAAA,CACFjD"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,t;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",t=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t:host {\n\t\t--vertical-stepper-flex-val:1;\n\t\tflex-grow:var(--vertical-stepper-flex-val);\n\t\t--bulletin--dot--seperation:30%;\n\t\t--min-line-container-height:25px;\n\t}\n\n\t.stepper__item {\n\t\tdisplay:flex;\n\t\tcolumn-gap:var(--item-spacing);\n\t\theight:100%;\n\t}\n\n\t.stepper__item--sm {\n\t\t--item-spacing: var(--nile-spacing-spacing-
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,t;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",t=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t:host {\n\t\t--vertical-stepper-flex-val:1;\n\t\tflex-grow:var(--vertical-stepper-flex-val);\n\t\t--bulletin--dot--seperation:30%;\n\t\t--min-line-container-height:25px;\n\t}\n\n\t.stepper__item {\n\t\tdisplay:flex;\n\t\tcolumn-gap:var(--item-spacing);\n\t\theight:100%;\n\t}\n\n\t.stepper__item--sm {\n\t\t--item-spacing: var(--nile-spacing-spacing-md);\n\t\t--stepper-item-title-size:14px;\n\t\t--stepper-item-title-margin-top:15%;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:20px;\n\t\t--circle-height:16px;\n\t}\n\n\t.stepper__item--md {\n\t\t--item-spacing: var(--nile-spacing-spacing-md);\n\t\t--stepper-item-title-size:16px;\n\t\t--stepper-item-title-margin-top:15%;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:24px;\n\t\t--circle-height:20px;\n\t}\n\n\t.stepper__item--lg {\n\t\t--item-spacing: var(--nile-spacing-spacing-lg);\n\t\t--stepper-item-title-size:16px;\n\t\t--stepper-item-title-margin-top:25%;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:24px;\n\t\t--circle-height:28px;\n\t}\n\t\n\t.stepper-item__connector-content{\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t.stepper__item__bulletin {\n\t\tdisplay:grid;\n\t\tplace-content:center;\n\t}\n\n\t.stepper__item__bulletin {\n\t\tmargin-top:3px;\n\t\tmargin-bottom:3px;\n\t}\n\n\t.stepper__bulletin--dot {\n\t\twidth: var(--circle-height);\n\t\taspect-ratio: 1 / 1;\n\t\tborder-radius: 50%;\n\t\tbackground: radial-gradient(var(--nile-colors-neutral-500) var(--bulletin--dot--seperation), var(--nile-colors-dark-200) var(--bulletin--dot--seperation));\n\t\tborder: 2px solid var(--nile-colors-neutral-500);\n\t}\n\n\t.stepper__bulletin__dot--active{\n\t\tbackground: radial-gradient(var(--nile-colors-white-base) var(--bulletin--dot--seperation), var(--nile-colors-primary-600) var(--bulletin--dot--seperation));\n\t\tborder: 2px solid var(--nile-colors-primary-500);\n\t}\n\n\t.stepper__bulletin--icon {\n\t\tdisplay:grid;\n\t\tplace-content:center;\n\t\twidth: var(--circle-height);\n\t\tborder: 2px solid var(--nile-colors-primary-600);\n\t\taspect-ratio: 1 / 1;\n\t\tborder-radius: 50%;\n\t\tbackground-color:var(--nile-colors-primary-600);\n\t\toverflow:hidden;\n\t}\n\n\t.stepper__item__line__container{\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tpadding: 2px;\n\t\tmin-height: var(--min-line-container-height);\n\t}\n\n\t.stepper__item__line{\n\t\theight:100%;\n\t\tborder-left: 2px solid var(--nile-colors-neutral-500);\n\t}\n\t.stepper__item__line--active{\n\t\tborder-left: 2px solid var(--nile-colors-primary-600);\n\t}\n\n\t.stepper__item__content{\n\t\tdisplay:flex;\n\t\tflex-direction:column;\n\t\tjustify-content:start;\n\t}\n\t.stepper__content__title {\n\t\tcolor:var(--nile-colors-dark-900);\n\t\tfont-size: var(--stepper-item-title-size);\n\t\tline-height: var(--stepper-item-text-line-height);\n\t\tfont-family: var(--nile-font-family-medium);\n\t\tfont-weight: 400;\n\t}\n\n\t.stepper__content__title--alone{\n\t\tmargin-top: var(--stepper-item-title-margin-top);\n\t}\n\n\t.stepper__content__title--active{\n\t\tcolor:var(--nile-colors-primary-600);\n\t\tfont-weight: 600;\n\t}\n\n\t.stepper__content__subtitle {\n\t\tcolor:var(--nile-colors-dark-500);\n\t\tfont-size: var(--stepper-item-subtitle-size);\n\t\tline-height: var(--stepper-item-text-line-height);\n\t\tfont-family: var( --nile-font-family-sans-serif);\n\t\tfont-weight: 400;\n\t}\n\n\t.stepper__content__subtitle--active{\n\t\tcolor:var(--nile-colors-primary-600);\n\t}\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-vertical-stepper-item.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-vertical-stepper-item.css.cjs.js","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.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';\n\n/**\n * VerticalStepperItem CSS\n */\nexport const styles = css`\n\t:host {\n\t\t--vertical-stepper-flex-val:1;\n\t\tflex-grow:var(--vertical-stepper-flex-val);\n\t\t--bulletin--dot--seperation:30%;\n\t\t--min-line-container-height:25px;\n\t}\n\n\t.stepper__item {\n\t\tdisplay:flex;\n\t\tcolumn-gap:var(--item-spacing);\n\t\theight:100%;\n\t}\n\n\t.stepper__item--sm {\n\t\t--item-spacing: var(--nile-spacing-spacing-
|
1
|
+
{"version":3,"file":"nile-vertical-stepper-item.css.cjs.js","sources":["../../../src/nile-vertical-stepper-item/nile-vertical-stepper-item.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';\n\n/**\n * VerticalStepperItem CSS\n */\nexport const styles = css`\n\t:host {\n\t\t--vertical-stepper-flex-val:1;\n\t\tflex-grow:var(--vertical-stepper-flex-val);\n\t\t--bulletin--dot--seperation:30%;\n\t\t--min-line-container-height:25px;\n\t}\n\n\t.stepper__item {\n\t\tdisplay:flex;\n\t\tcolumn-gap:var(--item-spacing);\n\t\theight:100%;\n\t}\n\n\t.stepper__item--sm {\n\t\t--item-spacing: var(--nile-spacing-spacing-md);\n\t\t--stepper-item-title-size:14px;\n\t\t--stepper-item-title-margin-top:15%;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:20px;\n\t\t--circle-height:16px;\n\t}\n\n\t.stepper__item--md {\n\t\t--item-spacing: var(--nile-spacing-spacing-md);\n\t\t--stepper-item-title-size:16px;\n\t\t--stepper-item-title-margin-top:15%;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:24px;\n\t\t--circle-height:20px;\n\t}\n\n\t.stepper__item--lg {\n\t\t--item-spacing: var(--nile-spacing-spacing-lg);\n\t\t--stepper-item-title-size:16px;\n\t\t--stepper-item-title-margin-top:25%;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:24px;\n\t\t--circle-height:28px;\n\t}\n\t\n\t.stepper-item__connector-content{\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t.stepper__item__bulletin {\n\t\tdisplay:grid;\n\t\tplace-content:center;\n\t}\n\n\t.stepper__item__bulletin {\n\t\tmargin-top:3px;\n\t\tmargin-bottom:3px;\n\t}\n\n\t.stepper__bulletin--dot {\n\t\twidth: var(--circle-height);\n\t\taspect-ratio: 1 / 1;\n\t\tborder-radius: 50%;\n\t\tbackground: radial-gradient(var(--nile-colors-neutral-500) var(--bulletin--dot--seperation), var(--nile-colors-dark-200) var(--bulletin--dot--seperation));\n\t\tborder: 2px solid var(--nile-colors-neutral-500);\n\t}\n\n\t.stepper__bulletin__dot--active{\n\t\tbackground: radial-gradient(var(--nile-colors-white-base) var(--bulletin--dot--seperation), var(--nile-colors-primary-600) var(--bulletin--dot--seperation));\n\t\tborder: 2px solid var(--nile-colors-primary-500);\n\t}\n\n\t.stepper__bulletin--icon {\n\t\tdisplay:grid;\n\t\tplace-content:center;\n\t\twidth: var(--circle-height);\n\t\tborder: 2px solid var(--nile-colors-primary-600);\n\t\taspect-ratio: 1 / 1;\n\t\tborder-radius: 50%;\n\t\tbackground-color:var(--nile-colors-primary-600);\n\t\toverflow:hidden;\n\t}\n\n\t.stepper__item__line__container{\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tpadding: 2px;\n\t\tmin-height: var(--min-line-container-height);\n\t}\n\n\t.stepper__item__line{\n\t\theight:100%;\n\t\tborder-left: 2px solid var(--nile-colors-neutral-500);\n\t}\n\t.stepper__item__line--active{\n\t\tborder-left: 2px solid var(--nile-colors-primary-600);\n\t}\n\n\t.stepper__item__content{\n\t\tdisplay:flex;\n\t\tflex-direction:column;\n\t\tjustify-content:start;\n\t}\n\t.stepper__content__title {\n\t\tcolor:var(--nile-colors-dark-900);\n\t\tfont-size: var(--stepper-item-title-size);\n\t\tline-height: var(--stepper-item-text-line-height);\n\t\tfont-family: var(--nile-font-family-medium);\n\t\tfont-weight: 400;\n\t}\n\n\t.stepper__content__title--alone{\n\t\tmargin-top: var(--stepper-item-title-margin-top);\n\t}\n\n\t.stepper__content__title--active{\n\t\tcolor:var(--nile-colors-primary-600);\n\t\tfont-weight: 600;\n\t}\n\n\t.stepper__content__subtitle {\n\t\tcolor:var(--nile-colors-dark-500);\n\t\tfont-size: var(--stepper-item-subtitle-size);\n\t\tline-height: var(--stepper-item-text-line-height);\n\t\tfont-family: var( --nile-font-family-sans-serif);\n\t\tfont-weight: 400;\n\t}\n\n\t.stepper__content__subtitle--active{\n\t\tcolor:var(--nile-colors-primary-600);\n\t}\n`;\n\nexport default [styles];"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -13,25 +13,28 @@ import{css as e}from"lit";const t=e`
|
|
13
13
|
}
|
14
14
|
|
15
15
|
.stepper__item--sm {
|
16
|
-
--item-spacing: var(--nile-spacing-spacing-
|
16
|
+
--item-spacing: var(--nile-spacing-spacing-md);
|
17
17
|
--stepper-item-title-size:14px;
|
18
|
+
--stepper-item-title-margin-top:15%;
|
18
19
|
--stepper-item-subtitle-size:14px;
|
19
20
|
--stepper-item-text-line-height:20px;
|
20
21
|
--circle-height:16px;
|
21
22
|
}
|
22
23
|
|
23
24
|
.stepper__item--md {
|
24
|
-
--item-spacing: var(--nile-spacing-spacing-
|
25
|
+
--item-spacing: var(--nile-spacing-spacing-md);
|
25
26
|
--stepper-item-title-size:16px;
|
26
|
-
--stepper-item-
|
27
|
-
--stepper-item-
|
27
|
+
--stepper-item-title-margin-top:15%;
|
28
|
+
--stepper-item-subtitle-size:14px;
|
29
|
+
--stepper-item-text-line-height:24px;
|
28
30
|
--circle-height:20px;
|
29
31
|
}
|
30
32
|
|
31
33
|
.stepper__item--lg {
|
32
|
-
--item-spacing: var(--nile-spacing-spacing-
|
34
|
+
--item-spacing: var(--nile-spacing-spacing-lg);
|
33
35
|
--stepper-item-title-size:16px;
|
34
|
-
--stepper-item-
|
36
|
+
--stepper-item-title-margin-top:25%;
|
37
|
+
--stepper-item-subtitle-size:14px;
|
35
38
|
--stepper-item-text-line-height:24px;
|
36
39
|
--circle-height:28px;
|
37
40
|
}
|
@@ -40,22 +43,28 @@ import{css as e}from"lit";const t=e`
|
|
40
43
|
display: flex;
|
41
44
|
flex-direction: column;
|
42
45
|
}
|
46
|
+
|
43
47
|
.stepper__item__bulletin {
|
44
48
|
display:grid;
|
45
49
|
place-content:center;
|
46
50
|
}
|
47
51
|
|
52
|
+
.stepper__item__bulletin {
|
53
|
+
margin-top:3px;
|
54
|
+
margin-bottom:3px;
|
55
|
+
}
|
56
|
+
|
48
57
|
.stepper__bulletin--dot {
|
49
58
|
width: var(--circle-height);
|
50
59
|
aspect-ratio: 1 / 1;
|
51
60
|
border-radius: 50%;
|
52
|
-
background: radial-gradient(var(--nile-colors-
|
53
|
-
border: 2px solid var(--nile-colors-
|
61
|
+
background: radial-gradient(var(--nile-colors-neutral-500) var(--bulletin--dot--seperation), var(--nile-colors-dark-200) var(--bulletin--dot--seperation));
|
62
|
+
border: 2px solid var(--nile-colors-neutral-500);
|
54
63
|
}
|
55
64
|
|
56
65
|
.stepper__bulletin__dot--active{
|
57
66
|
background: radial-gradient(var(--nile-colors-white-base) var(--bulletin--dot--seperation), var(--nile-colors-primary-600) var(--bulletin--dot--seperation));
|
58
|
-
border: 2px solid var(--nile-colors-primary-
|
67
|
+
border: 2px solid var(--nile-colors-primary-500);
|
59
68
|
}
|
60
69
|
|
61
70
|
.stepper__bulletin--icon {
|
@@ -79,7 +88,7 @@ import{css as e}from"lit";const t=e`
|
|
79
88
|
|
80
89
|
.stepper__item__line{
|
81
90
|
height:100%;
|
82
|
-
border-left: 2px solid var(--nile-colors-
|
91
|
+
border-left: 2px solid var(--nile-colors-neutral-500);
|
83
92
|
}
|
84
93
|
.stepper__item__line--active{
|
85
94
|
border-left: 2px solid var(--nile-colors-primary-600);
|
@@ -91,19 +100,24 @@ import{css as e}from"lit";const t=e`
|
|
91
100
|
justify-content:start;
|
92
101
|
}
|
93
102
|
.stepper__content__title {
|
94
|
-
color:var(--nile-colors-
|
103
|
+
color:var(--nile-colors-dark-900);
|
95
104
|
font-size: var(--stepper-item-title-size);
|
96
105
|
line-height: var(--stepper-item-text-line-height);
|
97
106
|
font-family: var(--nile-font-family-medium);
|
98
|
-
font-weight:
|
107
|
+
font-weight: 400;
|
108
|
+
}
|
109
|
+
|
110
|
+
.stepper__content__title--alone{
|
111
|
+
margin-top: var(--stepper-item-title-margin-top);
|
99
112
|
}
|
100
113
|
|
101
114
|
.stepper__content__title--active{
|
102
|
-
color:var(--nile-colors-primary-
|
115
|
+
color:var(--nile-colors-primary-600);
|
116
|
+
font-weight: 600;
|
103
117
|
}
|
104
118
|
|
105
119
|
.stepper__content__subtitle {
|
106
|
-
color:var(--nile-colors-
|
120
|
+
color:var(--nile-colors-dark-500);
|
107
121
|
font-size: var(--stepper-item-subtitle-size);
|
108
122
|
line-height: var(--stepper-item-text-line-height);
|
109
123
|
font-family: var( --nile-font-family-sans-serif);
|
@@ -1,22 +1,20 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as e,nothing as i}from"lit";import{property as s,state as l,customElement as p}from"lit/decorators.js";import{s as r}from"./nile-vertical-stepper-item.css.esm.js";import{N as _}from"../internal/nile-element.esm.js";import{classMap as
|
2
|
-
<div class="${
|
1
|
+
import{__decorate as t}from"tslib";import{html as e,nothing as i}from"lit";import{property as s,state as l,customElement as p}from"lit/decorators.js";import{s as r}from"./nile-vertical-stepper-item.css.esm.js";import{N as _}from"../internal/nile-element.esm.js";import{classMap as o}from"lit/directives/class-map.js";let d=class extends _{constructor(){super(...arguments),this.title="",this.subtitle="",this.contentBelow=!1,this.size="md",this.icon="tick",this.isFirst=!1,this.isLast=!1,this.isComplete=!1,this.isCurrent=!1,this.haveFlex=!0}static get styles(){return[r]}render(){this.isLast&&this.style.setProperty("--vertical-stepper-flex-val","0");const t=this.isCurrent,s=this.isComplete;let l=!1;(s&&!t||this.completedStepValue==this.value)&&(l=!0);let p=!1;return s&&(p=!0,this.calculatedCompletedStepValue==this.value&&(p=!1)),"sm"==this.size||this.size,e`
|
2
|
+
<div class="${o({stepper__item:!0,"stepper__item--selected":t,"stepper__item--default":!t,"stepper__item--sm":"sm"==this.size,"stepper__item--md":"md"==this.size,"stepper__item--lg":"lg"==this.size})}">
|
3
3
|
<div class="stepper-item__connector-content">
|
4
4
|
<div class="stepper__item__bulletin">
|
5
|
-
${l?e`<div class="stepper__bulletin--icon"
|
6
|
-
<svg width="${r}" height="${r}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
7
|
-
<g clip-path="url(#clip0_10902_1507)">
|
8
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z" fill="white"/>
|
9
|
-
</g>
|
10
|
-
</svg>
|
11
|
-
</div>`:e`<div class="${d({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})}"></div>`}
|
5
|
+
${l?e`<div class="stepper__bulletin--icon">${this.getSvg()}</div>`:e`<div class="${o({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})}"></div>`}
|
12
6
|
</div>
|
13
7
|
<div class="stepper__item__line__container">
|
14
|
-
${this.isLast?i:e`<div class="${
|
8
|
+
${this.isLast?i:e`<div class="${o({stepper__item__line:!0,"stepper__item__line--active":p})}"></div>`}
|
15
9
|
</div>
|
16
10
|
</div>
|
17
11
|
<div class="stepper__item__content">
|
18
|
-
<div class="${
|
19
|
-
<div class="${
|
12
|
+
<div class="${o({stepper__content__title:!0,"stepper__content__title--alone":!this.subtitle,"stepper__content__title--active":t})}">${this.title}</div>
|
13
|
+
<div class="${o({stepper__content__subtitle:!0,"stepper__content__subtitle--active":t})}">${this.subtitle}</div>
|
20
14
|
</div>
|
21
15
|
</div>
|
22
|
-
`}
|
16
|
+
`}getSvg(){let t="sm"==this.size?20:"md"==this.size?24:28;return e`
|
17
|
+
<svg width="${t}" height="${t}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
18
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z" fill="white"/>
|
19
|
+
</svg>
|
20
|
+
`}};t([s()],d.prototype,"title",void 0),t([s()],d.prototype,"subtitle",void 0),t([l()],d.prototype,"contentBelow",void 0),t([l()],d.prototype,"size",void 0),t([l()],d.prototype,"icon",void 0),t([l()],d.prototype,"isFirst",void 0),t([l()],d.prototype,"isLast",void 0),t([l()],d.prototype,"isComplete",void 0),t([l()],d.prototype,"isCurrent",void 0),t([l()],d.prototype,"currentStepValue",void 0),t([l()],d.prototype,"completedStepValue",void 0),t([l()],d.prototype,"calculatedCompletedStepValue",void 0),t([l()],d.prototype,"value",void 0),t([l()],d.prototype,"haveFlex",void 0),d=t([p("nile-vertical-stepper-item")],d);export{d as N};
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
7
|
import { TemplateResult } from 'lit';
|
8
8
|
import NileElement from '../internal/nile-element';
|
9
9
|
import type { CSSResultGroup } from 'lit';
|
@@ -43,6 +43,7 @@ export declare class NileAccordion extends NileElement {
|
|
43
43
|
header: HTMLElement;
|
44
44
|
body: HTMLElement;
|
45
45
|
expandIconSlot: HTMLSlotElement;
|
46
|
+
summarySlot: HTMLSlotElement;
|
46
47
|
/**
|
47
48
|
* Indicates whether or not the accordian is open. You can toggle this attribute to show and hide the accordian, or you
|
48
49
|
* can use the `show()` and `hide()` methods and this attribute will reflect the accordian' open state.
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
7
|
import { __decorate } from "tslib";
|
8
8
|
import { html } from 'lit';
|
9
9
|
import { styles } from './nile-accordion.css';
|
@@ -74,7 +74,17 @@ let NileAccordion = class NileAccordion extends NileElement {
|
|
74
74
|
this.body.hidden = !this.open;
|
75
75
|
this.body.style.height = this.open ? 'auto' : '0';
|
76
76
|
}
|
77
|
-
handleSummaryClick() {
|
77
|
+
handleSummaryClick(event) {
|
78
|
+
const path = event.composedPath();
|
79
|
+
const slotIndex = path.indexOf(this.summarySlot);
|
80
|
+
if (slotIndex !== -1) {
|
81
|
+
for (let i = 0; i < slotIndex; i++) {
|
82
|
+
const el = path[i];
|
83
|
+
if (el instanceof Element && el.matches('input, button, select, textarea, a, label')) {
|
84
|
+
return;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
78
88
|
if (!this.disabled) {
|
79
89
|
if (this.open) {
|
80
90
|
this.hide();
|
@@ -216,6 +226,9 @@ __decorate([
|
|
216
226
|
__decorate([
|
217
227
|
query('.accordian__expand-icon-slot')
|
218
228
|
], NileAccordion.prototype, "expandIconSlot", void 0);
|
229
|
+
__decorate([
|
230
|
+
query('slot[name="summary"]')
|
231
|
+
], NileAccordion.prototype, "summarySlot", void 0);
|
219
232
|
__decorate([
|
220
233
|
property({ type: Boolean, reflect: true })
|
221
234
|
], NileAccordion.prototype, "open", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-accordion.js","sourceRoot":"","sources":["../../../src/nile-accordion/nile-accordion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C;;;;;GAKG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,WAAW;IAAvC;QAEP;;;;;;;;;;;;;;;;;;;;;;;WAuBG;;QAUH;;;WAGG;QACyC,SAAI,GAAG,KAAK,CAAC;QAEzD;;;WAGG;QAC0B,YAAO,GAAqB,OAAO,CAAC;QAEjE;;;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C;AAGjD;IAAX,QAAQ,EAAE;8CAAiB;AAGgB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAkB;AA0CvD;IADL,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAmC7C;AA3IY,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAsNzB;;AAED,mBAAmB,CAAC,gBAAgB,EAAE;IACtC,SAAS,EAAE;QACT,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;QAC7B,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;KACjC;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,mBAAmB,CAAC,gBAAgB,EAAE;IACtC,SAAS,EAAE;QACT,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;QAChC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;KAC9B;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC","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 {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport {styles} from './nile-accordion.css';\nimport NileElement from '../internal/nile-element';\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile detail component.\n *\n * @tag nile-accordion\n *\n */\n@customElement('nile-accordion')\nexport class NileAccordion extends NileElement {\n\n/**\n * @summary Accordian show a brief summary and expand to show additional content.\n *\n * @dependency nile-icon\n *\n * @slot - The accordian' main content.\n * @slot summary - The accordian' summary. Alternatively, you can use the `summary` attribute.\n * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.\n * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.\n *\n * @event nile-show - Emitted when the accordian opens.\n * @event nile-after-show - Emitted after the accordian opens and all animations are complete.\n * @event nile-hide - Emitted when the accordian closes.\n * @event nile-after-hide - Emitted after the accordian closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart header - The header that wraps both the summary and the expand/collapse icon.\n * @csspart summary - The container that wraps the summary.\n * @csspart summary-icon - The container that wraps the expand/collapse icons.\n * @csspart content - The accordian content.\n *\n * @animation accordian.show - The animation to use when showing accordian. You can use `height: auto` with this animation.\n * @animation accordian.hide - The animation to use when hiding accordian. You can use `height: auto` with this animation.\n */\n\nstatic styles: CSSResultGroup = styles;\n\n\n@query('.accordian') accordian: HTMLElement;\n@query('.accordian__header') header: HTMLElement;\n@query('.accordian__body') body: HTMLElement;\n@query('.accordian__expand-icon-slot') expandIconSlot: HTMLSlotElement;\n\n/**\n * Indicates whether or not the accordian is open. You can toggle this attribute to show and hide the accordian, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the accordian' open state.\n */\n@property({ type: Boolean, reflect: true }) open = false;\n\n/**\n * Indicates the visual style of the accordian component. Accepted values are `'dark'` or `'light'`.\n * Defaults to `'light'`.\n */\n@property({ reflect: true }) variant: 'dark' | 'light' = 'light';\n\n/**\n * Specifies the direction of the arrow indicator. Accepted values are `'left'` or `'right'`.\n * Defaults to `'right'`.\n */\n@property({ reflect: true }) expandIconPlacement: 'left' | 'right' = 'right';\n\n/**\n * Specifies the size of the accordian component. Accepted values are `'sm'`, `'md'`, or `'lg'`.\n * Defaults to `'md'`.\n */\n@property({ reflect: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */\n@property() summary: string;\n\n/** Disables the accordian so it can't be toggled. */\n@property({ type: Boolean, reflect: true }) disabled = false;\n\nfirstUpdated() {\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n}\n\nprivate handleSummaryClick() {\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n}\n\nprivate handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n}\n\n@watch('open', { waitUntilFirstUpdate: true })\nasync handleOpenChange() {\n if (this.open) {\n // Show\n const nileShow = this.emit('nile-show', { cancelable: true });\n if (nileShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.hidden = false;\n\n const { keyframes, options } = getAnimation(this, 'accordian.show', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = 'auto';\n\n this.emit('nile-after-show');\n } else {\n // Hide\n const nileHide = this.emit('nile-hide', { cancelable: true });\n if (nileHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, 'accordian.hide', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.hidden = true;\n this.body.style.height = 'auto';\n\n this.emit('nile-after-hide');\n }\n}\n\n/** Shows the accordian. */\nasync show() {\n if (this.open || this.disabled) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n}\n\n/** Hides the accordian */\nasync hide() {\n if (!this.open || this.disabled) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n}\n\nrender() {\n const isRtl = true;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n accordian: true,\n 'accordian--open': this.open,\n 'accordian--disabled': this.disabled,\n 'accordian--sm':this.size=='sm',\n 'accordian--md':this.size=='md',\n 'accordian--lg':this.size=='lg',\n })}\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"${classMap({\n 'accordian__header':true,\n 'accordian__header--dark':this.variant=='dark',\n 'accordian__header--arrow-left':'left'==this.expandIconPlacement\n })}\"\n role=\"button\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"accordian__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"accordian__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"accordian__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" \n class=\"${classMap({\n 'accordian__content':true,\n 'accordian__content--arrow-left':this.expandIconPlacement=='left'\n })}\"></slot>\n </div>\n </div>\n `;\n}\n}\n\nsetDefaultAnimation('accordian.show', {\nkeyframes: [\n { height: '0', opacity: '0' },\n { height: 'auto', opacity: '1' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nsetDefaultAnimation('accordian.hide', {\nkeyframes: [\n { height: 'auto', opacity: '1' },\n { height: '0', opacity: '0' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nexport default NileAccordion;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-accordion': NileAccordion;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"nile-accordion.js","sourceRoot":"","sources":["../../../src/nile-accordion/nile-accordion.ts"],"names":[],"mappings":"AAAC;;;;;EAKE;;AAEH,OAAO,EAAa,IAAI,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C;;;;;GAKG;AAEI,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,WAAW;IAAvC;QAEP;;;;;;;;;;;;;;;;;;;;;;;WAuBG;;QAWH;;;WAGG;QACyC,SAAI,GAAG,KAAK,CAAC;QAEzD;;;WAGG;QAC0B,YAAO,GAAqB,OAAO,CAAC;QAEjE;;;WAGG;QAC0B,wBAAmB,GAAqB,OAAO,CAAC;QAE7E;;;WAGG;QAC0B,SAAI,GAAuB,IAAI,CAAC;QAK7D,qDAAqD;QACT,aAAQ,GAAG,KAAK,CAAC;IAiK7D,CAAC;IA/JD,YAAY;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAA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;AAM5B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAqC;AAMpC;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0DAAiD;AAMhD;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAiC;AAGjD;IAAX,QAAQ,EAAE;8CAAiB;AAGgB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAAkB;AAoDvD;IADL,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAmC7C;AAtJY,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAiOzB;;AAED,mBAAmB,CAAC,gBAAgB,EAAE;IACtC,SAAS,EAAE;QACT,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;QAC7B,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;KACjC;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,mBAAmB,CAAC,gBAAgB,EAAE;IACtC,SAAS,EAAE;QACT,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE;QAChC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;KAC9B;IACD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC","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 {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport {styles} from './nile-accordion.css';\nimport NileElement from '../internal/nile-element';\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile detail component.\n *\n * @tag nile-accordion\n *\n */\n@customElement('nile-accordion')\nexport class NileAccordion extends NileElement {\n\n/**\n * @summary Accordian show a brief summary and expand to show additional content.\n *\n * @dependency nile-icon\n *\n * @slot - The accordian' main content.\n * @slot summary - The accordian' summary. Alternatively, you can use the `summary` attribute.\n * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.\n * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.\n *\n * @event nile-show - Emitted when the accordian opens.\n * @event nile-after-show - Emitted after the accordian opens and all animations are complete.\n * @event nile-hide - Emitted when the accordian closes.\n * @event nile-after-hide - Emitted after the accordian closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart header - The header that wraps both the summary and the expand/collapse icon.\n * @csspart summary - The container that wraps the summary.\n * @csspart summary-icon - The container that wraps the expand/collapse icons.\n * @csspart content - The accordian content.\n *\n * @animation accordian.show - The animation to use when showing accordian. You can use `height: auto` with this animation.\n * @animation accordian.hide - The animation to use when hiding accordian. You can use `height: auto` with this animation.\n */\n\nstatic styles: CSSResultGroup = styles;\n\n\n@query('.accordian') accordian: HTMLElement;\n@query('.accordian__header') header: HTMLElement;\n@query('.accordian__body') body: HTMLElement;\n@query('.accordian__expand-icon-slot') expandIconSlot: HTMLSlotElement;\n@query('slot[name=\"summary\"]') summarySlot: HTMLSlotElement; \n\n/**\n * Indicates whether or not the accordian is open. You can toggle this attribute to show and hide the accordian, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the accordian' open state.\n */\n@property({ type: Boolean, reflect: true }) open = false;\n\n/**\n * Indicates the visual style of the accordian component. Accepted values are `'dark'` or `'light'`.\n * Defaults to `'light'`.\n */\n@property({ reflect: true }) variant: 'dark' | 'light' = 'light';\n\n/**\n * Specifies the direction of the arrow indicator. Accepted values are `'left'` or `'right'`.\n * Defaults to `'right'`.\n */\n@property({ reflect: true }) expandIconPlacement: 'left' | 'right' = 'right';\n\n/**\n * Specifies the size of the accordian component. Accepted values are `'sm'`, `'md'`, or `'lg'`.\n * Defaults to `'md'`.\n */\n@property({ reflect: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */\n@property() summary: string;\n\n/** Disables the accordian so it can't be toggled. */\n@property({ type: Boolean, reflect: true }) disabled = false;\n\nfirstUpdated() {\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n}\n\n private handleSummaryClick(event: MouseEvent) {\n const path = event.composedPath();\n const slotIndex = path.indexOf(this.summarySlot);\n if (slotIndex !== -1) {\n for (let i = 0; i < slotIndex; i++) {\n const el = path[i];\n if (el instanceof Element && el.matches('input, button, select, textarea, a, label')) {\n return; \n }\n }\n }\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n}\n\nprivate handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n}\n\n@watch('open', { waitUntilFirstUpdate: true })\nasync handleOpenChange() {\n if (this.open) {\n // Show\n const nileShow = this.emit('nile-show', { cancelable: true });\n if (nileShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.hidden = false;\n\n const { keyframes, options } = getAnimation(this, 'accordian.show', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = 'auto';\n\n this.emit('nile-after-show');\n } else {\n // Hide\n const nileHide = this.emit('nile-hide', { cancelable: true });\n if (nileHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, 'accordian.hide', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.hidden = true;\n this.body.style.height = 'auto';\n\n this.emit('nile-after-hide');\n }\n}\n\n/** Shows the accordian. */\nasync show() {\n if (this.open || this.disabled) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n}\n\n/** Hides the accordian */\nasync hide() {\n if (!this.open || this.disabled) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n}\n\nrender() {\n const isRtl = true;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n accordian: true,\n 'accordian--open': this.open,\n 'accordian--disabled': this.disabled,\n 'accordian--sm':this.size=='sm',\n 'accordian--md':this.size=='md',\n 'accordian--lg':this.size=='lg',\n })}\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"${classMap({\n 'accordian__header':true,\n 'accordian__header--dark':this.variant=='dark',\n 'accordian__header--arrow-left':'left'==this.expandIconPlacement\n })}\"\n role=\"button\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"accordian__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"accordian__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"accordian__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" \n class=\"${classMap({\n 'accordian__content':true,\n 'accordian__content--arrow-left':this.expandIconPlacement=='left'\n })}\"></slot>\n </div>\n </div>\n `;\n}\n}\n\nsetDefaultAnimation('accordian.show', {\nkeyframes: [\n { height: '0', opacity: '0' },\n { height: 'auto', opacity: '1' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nsetDefaultAnimation('accordian.hide', {\nkeyframes: [\n { height: 'auto', opacity: '1' },\n { height: '0', opacity: '0' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nexport default NileAccordion;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-accordion': NileAccordion;\n }\n}\n"]}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
7
|
/**
|
8
8
|
* Progressbar CSS
|
9
9
|
*/
|
@@ -1,43 +1,61 @@
|
|
1
1
|
/**
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
7
|
import { css } from 'lit';
|
8
8
|
/**
|
9
9
|
* Progressbar CSS
|
10
10
|
*/
|
11
11
|
export const styles = css `
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
12
|
+
|
13
|
+
:host {
|
14
|
+
display: inline-block;
|
15
|
+
}
|
16
|
+
|
17
|
+
.track {
|
18
|
+
stroke-width: 4px;
|
19
|
+
stroke: var(--nile-colors-neutral-400);
|
20
|
+
opacity: 0.5;
|
21
|
+
fill: none;
|
22
|
+
}
|
23
|
+
|
24
|
+
.progress {
|
25
|
+
stroke-width: 4px;
|
26
|
+
stroke: var(--nile-colors-primary-600);
|
27
|
+
stroke-linecap: round;
|
28
|
+
fill: none;
|
29
|
+
transform: rotate(270deg);
|
30
|
+
transform-origin: center;
|
31
|
+
transition: stroke-dashoffset 0.8s ease-in-out;
|
32
|
+
}
|
33
|
+
|
34
|
+
.circle__text {
|
35
|
+
fill: var(--nile-colors-dark-900);
|
36
|
+
text-align: center;
|
37
|
+
font-size: var(--nile-type-scale-1);
|
38
|
+
font-style: normal;
|
39
|
+
font-weight: var(--nile-font-weight-regular);
|
40
|
+
line-height: var(--nile-type-scale-1);
|
41
|
+
letter-spacing: 0.2px;
|
42
|
+
}
|
43
|
+
|
44
|
+
.nile-progress-bar__status {
|
45
|
+
display: flex;
|
46
|
+
justify-content: space-between;
|
47
|
+
align-items: center;
|
48
|
+
margin-bottom: 4px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.nile-progress-bar__message {
|
52
|
+
flex-grow: 1;
|
53
|
+
}
|
54
|
+
|
55
|
+
.nile-progress-bar__percentage {
|
56
|
+
white-space: nowrap;
|
57
|
+
}
|
58
|
+
|
41
59
|
`;
|
42
60
|
export default [styles];
|
43
61
|
//# sourceMappingURL=nile-circular-progressbar.css.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-circular-progressbar.css.js","sourceRoot":"","sources":["../../../src/nile-circular-progressbar/nile-circular-progressbar.css.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"nile-circular-progressbar.css.js","sourceRoot":"","sources":["../../../src/nile-circular-progressbar/nile-circular-progressbar.css.ts"],"names":[],"mappings":"AAAC;;;;;EAKE;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDxB,CAAA;AACD,eAAe,CAAC,MAAM,CAAC,CAAC","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';\n\n/**\n * Progressbar CSS\n */\nexport const styles = css`\n\n :host {\n display: inline-block;\n}\n\n.track {\n stroke-width: 4px;\n stroke: var(--nile-colors-neutral-400);\n opacity: 0.5;\n fill: none;\n}\n\n.progress {\n stroke-width: 4px;\n stroke: var(--nile-colors-primary-600);\n stroke-linecap: round;\n fill: none;\n transform: rotate(270deg);\n transform-origin: center;\n transition: stroke-dashoffset 0.8s ease-in-out; \n}\n\n.circle__text {\n fill: var(--nile-colors-dark-900);\n text-align: center;\n font-size: var(--nile-type-scale-1);\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-type-scale-1);\n letter-spacing: 0.2px;\n}\n\n.nile-progress-bar__status {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 4px;\n}\n\n.nile-progress-bar__message {\n flex-grow: 1;\n}\n\n.nile-progress-bar__percentage {\n white-space: nowrap;\n}\n\n`\nexport default [styles];\n"]}
|
@@ -18,14 +18,18 @@ export declare class NileCircularProgressbar extends NileElement {
|
|
18
18
|
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
19
19
|
*/
|
20
20
|
static get styles(): CSSResultArray;
|
21
|
-
progressCircle:
|
22
|
-
|
21
|
+
progressCircle: SVGCircleElement;
|
22
|
+
value: number;
|
23
23
|
/**
|
24
24
|
* Render method
|
25
25
|
* @slot This is a slot test
|
26
26
|
*/
|
27
|
+
content?: string;
|
28
|
+
size: number;
|
29
|
+
private get circleSize();
|
27
30
|
connectedCallback(): void;
|
28
31
|
private setProgress;
|
32
|
+
updated(changedProperties: Map<string, any>): void;
|
29
33
|
render(): TemplateResult;
|
30
34
|
}
|
31
35
|
export default NileCircularProgressbar;
|