@aquera/nile-elements 0.1.31-beta-1.0 → 0.1.31-beta-1.1
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/README.md +6 -13
- 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.esm.js +1 -1
- 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 +21 -18
- package/dist/nile-stepper-item/nile-stepper-item.esm.js +13 -13
- 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 +23 -15
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +7 -7
- package/dist/src/nile-stepper/nile-stepper.d.ts +1 -1
- package/dist/src/nile-stepper/nile-stepper.js +1 -1
- package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.css.js +19 -16
- package/dist/src/nile-stepper-item/nile-stepper-item.css.js.map +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.js +4 -5
- 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 +23 -15
- 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.js +5 -6
- 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-stepper/nile-stepper.ts +1 -1
- package/src/nile-stepper-item/nile-stepper-item.css.ts +19 -16
- package/src/nile-stepper-item/nile-stepper-item.ts +4 -5
- package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.css.ts +23 -15
- package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts +5 -6
- package/vscode-html-custom-data.json +4 -7
package/README.md
CHANGED
@@ -79,23 +79,16 @@ To run a local development server that serves the basic demo located in `demo/in
|
|
79
79
|
|
80
80
|
In this section, you can find the updates for each release of `nile-elements`. It's a good practice to maintain detailed release notes to help users and developers understand what changes have been made from one version to another and how these changes might affect their projects.
|
81
81
|
|
82
|
-
|
83
|
-
- Nile
|
84
|
-
resource_analysis
|
85
|
-
|
86
|
-
resource_graph
|
87
|
-
|
88
|
-
transaction_monitor
|
89
|
-
|
90
|
-
sort_ascending
|
91
|
-
|
92
|
-
sort_descending
|
93
|
-
|
94
|
-
- Dependency nile 0.3.59
|
82
|
+
### Version 0.1.31-beta-1.1
|
83
|
+
- Nile Stepper: Stylings updates and State change bugfixes
|
95
84
|
|
96
85
|
### Version 0.1.31-beta-1.0
|
97
86
|
- Nile Table: New wrapper component for Nile table body
|
98
87
|
|
88
|
+
#### Version 0.1.29
|
89
|
+
- Nile Icon: resource_analysis,resource_graph,transaction_monitor, sort_ascending, sort_descending
|
90
|
+
- Dependency nile 0.3.59
|
91
|
+
|
99
92
|
### Version 0.1.29-beta-1.3
|
100
93
|
- Nile Highlighter Removed
|
101
94
|
- Nile Stepper: Design Updated & Bug Fixes
|
@@ -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-stepper.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,s,r,l,n,p,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_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(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}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 _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););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;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.customElement;},function(_nileStepperCssCjsJs){r=_nileStepperCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){n=_internalWatchCjsJs.w;},function(_litDirectivesClassMapJs){p=_litDirectivesClassMapJs.classMap;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.isVertical=!1,_this.contentBelow=!1,_this.currentStep=0,_this.completedStep=0,_this.size="
|
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-stepper.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","lit/directives/class-map.js"],function(_export,_context){"use strict";var t,e,i,s,r,l,n,p,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_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(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}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 _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););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;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.customElement;},function(_nileStepperCssCjsJs){r=_nileStepperCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){n=_internalWatchCjsJs.w;},function(_litDirectivesClassMapJs){p=_litDirectivesClassMapJs.classMap;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.isVertical=!1,_this.contentBelow=!1,_this.currentStep=0,_this.completedStep=0,_this.size="lg",_this.icon="tick";return _this;}_inherits(o,_l);return _createClass(o,[{key:"update",value:function update(t){_superPropGet(o,"update",this,3)([t]),(t.has("currentStep")||t.has("completedStep"))&&this.updateItems();}},{key:"handleCurrentStepChanges",value:function handleCurrentStepChanges(){this.updateItems(),this.emit("nile-current-change",{value:this.currentStep});}},{key:"handleCompletedStepChanges",value:function handleCompletedStepChanges(){this.updateItems(),this.emit("nile-completed-change",{value:this.completedStep});}},{key:"updateItems",value:function updateItems(){var _this2=this;var t=_toConsumableArray(this.querySelectorAll(this.isVertical?"nile-vertical-stepper-item":"nile-stepper-item"));if(!t.length)return;var e=t.length<3,i=0==this.currentStep||this.currentStep>t.length?1:this.currentStep,s=this.completedStep>t.length||this.completedStep<i?i:this.completedStep,r=this.completedStep>t.length?0:this.completedStep;t.forEach(function(l,n){n+1<i?(l.isComplete=!0,l.isCurrent=!1):n+1==i?(l.isComplete=n+1<=s,l.isCurrent=!0):(l.isComplete=n+1<=s,l.isCurrent=!1),0==n&&(l.isFirst=!0),n==t.length-1&&(l.isLast=!0),l.currentStepValue=i,l.calculatedCompletedStepValue=s,l.completedStepValue=r,l.icon=_this2.icon,l.size=_this2.size,l.value=n+1,l.contentBelow=_this2.contentBelow,0!=n&&n!=t.length-1||(l.haveFlex=e);});}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<div class=",">\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=","\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t\t"])),p({"nile-stepper":!0,"nile-stepper--horizontal":!this.isVertical,"nile-stepper--vertical":this.isVertical}),this.updateItems);}}],[{key:"styles",get:function get(){return[r];}}]);}(l));t([i({type:Boolean,attribute:"vertical"})],o.prototype,"isVertical",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],o.prototype,"contentBelow",void 0),t([i({type:Number,attribute:!0,reflect:!0})],o.prototype,"currentStep",void 0),t([i({type:Number,attribute:!0,reflect:!0})],o.prototype,"completedStep",void 0),t([i({type:String,attribute:!0,reflect:!0})],o.prototype,"size",void 0),t([i()],o.prototype,"icon",void 0),t([n("currentStep")],o.prototype,"handleCurrentStepChanges",null),t([n("completedStep")],o.prototype,"handleCompletedStepChanges",null),_export("N",o=t([s("nile-stepper")],o));}};});
|
2
2
|
//# sourceMappingURL=nile-stepper.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-stepper.cjs.js","sources":["../../../src/nile-stepper/nile-stepper.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, html, CSSResultArray, TemplateResult, PropertyValueMap } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-stepper.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile stepper component.\n *\n * @tag nile-stepper\n *\n */\n@customElement('nile-stepper')\nexport class NileStepper extends NileElement {\n\n\t@property({ type: Boolean, attribute: 'vertical' }) isVertical: boolean = false;\n\t@property({ type: Boolean, attribute: true, reflect:true }) contentBelow: boolean = false;\n\t@property({ type: Number, attribute: true, reflect:true }) currentStep: number = 0;\n\t@property({ type: Number, attribute: true, reflect:true }) completedStep: number = 0;\n\t@property({ type: String, attribute: true, reflect:true }) size: 'sm' | '
|
1
|
+
{"version":3,"file":"nile-stepper.cjs.js","sources":["../../../src/nile-stepper/nile-stepper.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, html, CSSResultArray, TemplateResult, PropertyValueMap } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-stepper.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile stepper component.\n *\n * @tag nile-stepper\n *\n */\n@customElement('nile-stepper')\nexport class NileStepper extends NileElement {\n\n\t@property({ type: Boolean, attribute: 'vertical' }) isVertical: boolean = false;\n\t@property({ type: Boolean, attribute: true, reflect:true }) contentBelow: boolean = false;\n\t@property({ type: Number, attribute: true, reflect:true }) currentStep: number = 0;\n\t@property({ type: Number, attribute: true, reflect:true }) completedStep: number = 0;\n\t@property({ type: String, attribute: true, reflect:true }) size: 'sm' | 'lg' = 'lg';\n\t@property() icon: string = 'tick';\n\n\tprotected update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void{\n super.update(changedProperties);\n\t\tif(changedProperties.has('currentStep') || changedProperties.has('completedStep')){\n\t\t\tthis.updateItems();\n\t\t}\n\t}\n\n\t@watch('currentStep')\n\thandleCurrentStepChanges() {\n\t\tthis.updateItems();\n\t\tthis.emit('nile-current-change', { value: this.currentStep });\n\t}\n\n\t@watch('completedStep')\n\thandleCompletedStepChanges() {\n\t\tthis.updateItems()\n\t\tthis.emit('nile-completed-change', { value: this.completedStep });\n\t}\n\t\n\tprivate updateItems() {\n\t\tconst items: any = [...this.querySelectorAll(this.isVertical ? 'nile-vertical-stepper-item' : 'nile-stepper-item')];\n\t\tif (!items.length) return;\n\t\tconst haveFlex = items.length < 3;\n\n\t\tconst current = (this.currentStep == 0 || this.currentStep > items.length) ? 1 : this.currentStep;\n\t\tconst calculatedCompleted = this.completedStep > items.length ? current : this.completedStep < current ? current : this.completedStep;\n\t\tconst completed = this.completedStep > items.length ? 0 : this.completedStep;\n\n\t\titems.forEach((el: any, index: number) => {\n\t\t\t// set item is complete and is current values\n\t\t\tif (index + 1 < current) {\n\t\t\t\tel.isComplete = true;\n\t\t\t\tel.isCurrent = false;\n\t\t\t}\n\t\t\telse if (index + 1 == current) {\n\t\t\t\tif (index + 1 <= calculatedCompleted) el.isComplete = true;\n\t\t\t\telse el.isComplete = false;\n\t\t\t\tel.isCurrent = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (index + 1 <= calculatedCompleted) el.isComplete = true;\n\t\t\t\telse el.isComplete = false;\n\t\t\t\tel.isCurrent = false;\n\t\t\t}\n\n\t\t\t// Set isLast and isFirst\n\t\t\tif (index == 0) el.isFirst = true;\n\t\t\tif (index == items.length - 1) el.isLast = true;\n\n\t\t\t// setting default values\n\t\t\tel.currentStepValue = current;\n\t\t\tel.calculatedCompletedStepValue = calculatedCompleted;\n\t\t\tel.completedStepValue = completed;\n\n\t\t\tel.icon = this.icon;\n\t\t\tel.size = this.size;\n\t\t\tel.value = index + 1;\n\t\t\tel.contentBelow = this.contentBelow\n\t\t\tif (index == 0 || index == items.length - 1) {\n\t\t\t\tel.haveFlex = haveFlex;\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * The styles for nile-stepper\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\treturn html`\n\t\t\t<div class=${classMap({\n\t\t\t\t'nile-stepper':true,\n\t\t\t\t'nile-stepper--horizontal':!this.isVertical,\n\t\t\t\t'nile-stepper--vertical':this.isVertical\n\t\t\t})}>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${this.updateItems}\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileStepper;\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'nile-stepper': NileStepper;\n\t}\n}\n"],"names":["NileStepper","_l","o","this","isVertical","contentBelow","currentStep","completedStep","size","icon","_this","_inherits","_createClass","key","value","update","changedProperties","super","has","updateItems","handleCurrentStepChanges","emit","handleCompletedStepChanges","items","_toConsumableArray","querySelectorAll","length","haveFlex","current","calculatedCompleted","completed","forEach","el","index","isComplete","isCurrent","isFirst","isLast","currentStepValue","calculatedCompletedStepValue","completedStepValue","render","html","_templateObject","_taggedTemplateLiteral","classMap","__decorate","get","styles","NileElement","property","type","Boolean","attribute","prototype","reflect","Number","String","watch","_export","customElement"],"mappings":"gyJAsBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAE8CC,KAAAA,CAAUC,UAAAA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AA,CAAQ,KAAgCvD,CAAAsD,CAAAA,SAAAA,CAAA,kBAAA,EACvBR,CAAAA,CAAAA,CAAAA,CAAA,CAA3DI,CAAS,CAAA,CAAEC,IAAMK,CAAAA,MAAAA,CAAQH,SAAW,CAAA,CAAA,CAAA,CAAME,SAAQ,CAAmCvD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsD,UAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAC1BR,EAAA,CAA3DI,CAAAA,CAAS,CAAEC,IAAMM,CAAAA,MAAAA,CAAQJ,WAAW,CAAME,CAAAA,OAAAA,CAAAA,CAAQ,KAAkCvD,CAAAsD,CAAAA,SAAAA,CAAA,WAAA,EACzER,CAAAA,CAAAA,CAAAA,CAAA,CAAXI,CAAAA,CAAAA,CAAAA,CAAAA,CAAiClD,CAAAsD,CAAAA,SAAAA,CAAA,WAAA,EAUlCR,CAAAA,CAAAA,CAAAA,CAAA,CADCY,CAAM,CAAA,aAAA,CAAA,CAAA,CAIN1D,EAAAsD,SAAA,CAAA,0BAAA,CAAA,MAGDR,CAAA,CAAA,CADCY,EAAM,eAIN1D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsD,UAAA,4BAAA,CAAA,IAAA,CAAA,CAAAK,OAAA,KA1BW3D,EAAW8C,CAAA,CAAA,CADvBc,CAAc,CAAA,cAAA,CAAA,CAAA,CACF5D"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as r}from"./nile-stepper.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import{w as n}from"../internal/watch.esm.js";import{classMap as p}from"lit/directives/class-map.js";let o=class extends l{constructor(){super(...arguments),this.isVertical=!1,this.contentBelow=!1,this.currentStep=0,this.completedStep=0,this.size="
|
1
|
+
import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as r}from"./nile-stepper.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import{w as n}from"../internal/watch.esm.js";import{classMap as p}from"lit/directives/class-map.js";let o=class extends l{constructor(){super(...arguments),this.isVertical=!1,this.contentBelow=!1,this.currentStep=0,this.completedStep=0,this.size="lg",this.icon="tick"}update(t){super.update(t),(t.has("currentStep")||t.has("completedStep"))&&this.updateItems()}handleCurrentStepChanges(){this.updateItems(),this.emit("nile-current-change",{value:this.currentStep})}handleCompletedStepChanges(){this.updateItems(),this.emit("nile-completed-change",{value:this.completedStep})}updateItems(){const t=[...this.querySelectorAll(this.isVertical?"nile-vertical-stepper-item":"nile-stepper-item")];if(!t.length)return;const e=t.length<3,i=0==this.currentStep||this.currentStep>t.length?1:this.currentStep,s=this.completedStep>t.length||this.completedStep<i?i:this.completedStep,r=this.completedStep>t.length?0:this.completedStep;t.forEach(((l,n)=>{n+1<i?(l.isComplete=!0,l.isCurrent=!1):n+1==i?(l.isComplete=n+1<=s,l.isCurrent=!0):(l.isComplete=n+1<=s,l.isCurrent=!1),0==n&&(l.isFirst=!0),n==t.length-1&&(l.isLast=!0),l.currentStepValue=i,l.calculatedCompletedStepValue=s,l.completedStepValue=r,l.icon=this.icon,l.size=this.size,l.value=n+1,l.contentBelow=this.contentBelow,0!=n&&n!=t.length-1||(l.haveFlex=e)}))}static get styles(){return[r]}render(){return e`
|
2
2
|
<div class=${p({"nile-stepper":!0,"nile-stepper--horizontal":!this.isVertical,"nile-stepper--vertical":this.isVertical})}>
|
3
3
|
<slot
|
4
4
|
@slotchange=${this.updateItems}
|
@@ -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","lit/directives/class-map.js","./nile-stepper-item.css.cjs.js","../internal/nile-element.cjs.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","lit/directives/class-map.js","./nile-stepper-item.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,_,l,p,n,r,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,v;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.query;_=_litDecoratorsJs.property;l=_litDecoratorsJs.state;p=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_nileStepperItemCssCjsJs){r=_nileStepperItemCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",v=/*#__PURE__*/function(_o){function v(){var _this;_classCallCheck(this,v);_this=_callSuper(this,v,arguments),_this.title="",_this.subtitle="",_this.contentBelow=!1,_this.size="lg",_this.icon="tick",_this.isFirst=!1,_this.isLast=!1,_this.isComplete=!1,_this.isCurrent=!1,_this.haveFlex=!0;return _this;}_inherits(v,_o);return _createClass(v,[{key:"updated",value:function updated(t){if(t.has("subtitle")&&this.isLast&&!this.contentBelow&&this.subtitle){var _this$absoluteSubtitl,_this$absoluteSubtitl2;var _t=(_this$absoluteSubtitl=(_this$absoluteSubtitl2=this.absoluteSubtitle)===null||_this$absoluteSubtitl2===void 0?void 0:_this$absoluteSubtitl2.scrollWidth)!==null&&_this$absoluteSubtitl!==void 0?_this$absoluteSubtitl:"0";this.absoluteTitle.style.minWidth=_t+"px";}}},{key:"render",value:function render(){this.haveFlex||this.style.setProperty("--stepper-flex-val","0");var t=this.isCurrent,s=this.isComplete;var _=!1;(s&&!t||this.completedStepValue==this.value)&&(_=!0);var l=!1;return s&&(l=!0,this.calculatedCompletedStepValue==this.value&&(l=!1)),e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<div class=\"","\">\n\t\t\t\t<div class=\"stepper__line__content\">\n\t\t\t\t\t<div class=\"stepper__line__container\">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=",">\n\t\t\t\t\t\t","\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"","\">\n\t\t\t\t\t\t","\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","\n\t\t\t</div>\n\t\t"])),n({stepper__item:!0,"stepper__item--selected":t,"stepper__item--sm":"sm"==this.size,"stepper__item--lg":"lg"==this.size}),this.isFirst?i:e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n\t\t\t\t\t\t\t<hr class=\"","\"/>\n\t\t\t\t\t\t"])),n({stepper__line:!0,"stepper__line--active":s||t})),n({stepper__item__bulletin:!0,"stepper__item__bulletin--inline":!this.contentBelow}),_?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<div class=\"","\">","</div>"])),n({"stepper__bulletin--icon":!0,"stepper__bulletin__icon--active":t}),this.getSvg()):e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<div class=\"","\"></div>"])),n({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})),n({stepper__line__container:!0,"stepper__line--hastitle":!this.contentBelow}),this.contentBelow||!this.title?i:e(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n\n\t\t\t\t\t\t\t<div class=\"stepper__item__content--above\">\n\t\t\t\t\t\t\t\t<div class=\"","\">\n\t\t\t\t\t\t\t\t\t","\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"","\">","</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t"])),n({stepper__content__title:!0,"stepper__content__title--active":t}),this.title,n({stepper__content__subtitle:!0,"stepper__content__subtitle--active":t}),this.subtitle),this.isLast?i:e(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n\t\t\t\t\t\t\t<hr class=\"","\" style=\"flex-grow:1;\"/>\n\t\t\t\t\t\t"])),n({stepper__line:!0,"stepper__line--active":l})),this.contentBelow?e(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n\t\t\t\t\t<div class=\"stepper__item__content--below\">\n\t\t\t\t\t\t<div class=\"","\">\n\t\t\t\t\t\t\t","\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"","\">","</div>\n\t\t\t\t\t</div>\n\t\t\t\t"])),n({stepper__content__title:!0,"stepper__content__title--active":t}),this.title,n({stepper__content__subtitle:!0,"stepper__content__subtitle--active":t}),this.subtitle):i);}},{key:"getSvg",value:function getSvg(){var t="sm"==this.size?20:"lg"==this.size?24:28;return e(_templateObject8||(_templateObject8=_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];}}]);}(o));t([s(".stepper__item__content--above .stepper__content__title")],v.prototype,"absoluteTitle",void 0),t([s(".stepper__item__content--above .stepper__content__subtitle")],v.prototype,"absoluteSubtitle",void 0),t([_()],v.prototype,"title",void 0),t([_()],v.prototype,"subtitle",void 0),t([l()],v.prototype,"contentBelow",void 0),t([l()],v.prototype,"size",void 0),t([l()],v.prototype,"icon",void 0),t([l()],v.prototype,"isFirst",void 0),t([l()],v.prototype,"isLast",void 0),t([l()],v.prototype,"isComplete",void 0),t([l()],v.prototype,"isCurrent",void 0),t([l()],v.prototype,"currentStepValue",void 0),t([l()],v.prototype,"completedStepValue",void 0),t([l()],v.prototype,"calculatedCompletedStepValue",void 0),t([l()],v.prototype,"value",void 0),t([l()],v.prototype,"haveFlex",void 0),_export("N",v=t([p("nile-stepper-item")],v));}};});
|
2
2
|
//# sourceMappingURL=nile-stepper-item.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-stepper-item.cjs.js","sources":["../../../src/nile-stepper-item/nile-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, PropertyValues } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-stepper-item.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile stepper-item component.\n *\n * @tag nile-stepper-item\n *\n */\n@customElement('nile-stepper-item')\nexport class NileStepperItem extends NileElement {\n\n\t@query('.stepper__item__content--above .stepper__content__title') absoluteTitle:HTMLDivElement;\n\t@query('.stepper__item__content--above .stepper__content__subtitle') absoluteSubtitle:HTMLDivElement;\n\n\t/* Properties passed directly */\n\t@property() title: string = '';\n\t@property() subtitle: string = '';\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-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\tprotected updated(_changedProperties: PropertyValues): void {\n\t\tif(_changedProperties.has('subtitle') && this.isLast && !this.contentBelow && this.subtitle){\n\t\t\tconst subtitleWidth=this.absoluteSubtitle?.scrollWidth as number ?? '0';\n\t\t\tthis.absoluteTitle.style.minWidth=subtitleWidth+\"px\"\n\t\t}\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\n\t\tif (!this.haveFlex) this.style.setProperty('--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\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--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__line__content\">\n\t\t\t\t\t<div class=\"stepper__line__container\">\n\t\t\t\t\t\t${this.isFirst ? nothing : html`\n\t\t\t\t\t\t\t<hr class=\"${classMap({\n\t\t\t\t\t\t\t\t'stepper__line':true,\n\t\t\t\t\t\t\t\t'stepper__line--active':isComplete || isCurrent\n\t\t\t\t\t\t\t})}\"/>\n\t\t\t\t\t\t`}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=${classMap({ 'stepper__item__bulletin':true, 'stepper__item__bulletin--inline': !this.contentBelow })}>\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\n\t\t\t\t\t<div class=\"${classMap({\n\t\t\t\t\t\t'stepper__line__container':true,\n\t\t\t\t\t\t'stepper__line--hastitle':!this.contentBelow\n\t\t\t\t\t})}\">\n\t\t\t\t\t\t${this.contentBelow || !this.title ? nothing:html`\n\n\t\t\t\t\t\t\t<div class=\"stepper__item__content--above\">\n\t\t\t\t\t\t\t\t<div class=\"${classMap({ 'stepper__content__title':true, 'stepper__content__title--active':isCurrent })}\">\n\t\t\t\t\t\t\t\t\t${this.title}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\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\t\t\t</div>\n\t\t\t\t\t\t`}\n\t\t\t\t\t\t${this.isLast ? nothing : html`\n\t\t\t\t\t\t\t<hr class=\"${classMap({\n\t\t\t\t\t\t\t\t'stepper__line':true,\n\t\t\t\t\t\t\t\t'stepper__line--active':suffixStepperLineActive\n\t\t\t\t\t\t\t})}\" style=\"flex-grow:1;\"/>\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${this.contentBelow?\n\t\t\t\t\thtml`\n\t\t\t\t\t<div class=\"stepper__item__content--below\">\n\t\t\t\t\t\t<div class=\"${classMap({ 'stepper__content__title':true, 'stepper__content__title--active':isCurrent })}\">\n\t\t\t\t\t\t\t${this.title}\n\t\t\t\t\t\t</div>\n\t\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\t</div>\n\t\t\t\t`:nothing}\n\t\t\t</div>\n\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\t/* #endregion */\n}\n\nexport default NileStepperItem;\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'nile-stepper-item': NileStepperItem;\n\t}\n}"],"names":["NileStepperItem","_o","d","this","title","subtitle","contentBelow","size","icon","isFirst","isLast","isComplete","isCurrent","haveFlex","_this","_inherits","_createClass","key","value","updated","_changedProperties","has","_this$absoluteSubtitl","_this$absoluteSubtitl2","subtitleWidth","absoluteSubtitle","scrollWidth","absoluteTitle","style","minWidth","render","setProperty","showCompletedIcon","completedStepValue","suffixStepperLineActive","calculatedCompletedStepValue","html","_templateObject","_taggedTemplateLiteral","classMap","stepper__item","nothing","_templateObject2","stepper__line","stepper__item__bulletin","_templateObject3","getSvg","_templateObject4","stepper__line__container","_templateObject5","stepper__content__title","stepper__content__subtitle","_templateObject6","_templateObject7","iconSize","_templateObject8","__decorate","get","styles","NileElement","query","prototype","property","state","customElement"],"mappings":"k7GAqBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEAMMC,EAAAA,KAAAA,CAAKC,KAAW,CAAA,EAAA,CAChBD,KAAAA,CAAQE,QAAAA,CAAW,GAGdF,KAAAA,CAAYG,YAAAA,CAAAA,CAAG,CACfH,CAAAA,KAAAA,CAAII,IAAwB,CAAA,IAAA,CAC5BJ,KAAAA,CAAIK,IAAAA,CAAG,MAIPL,CAAAA,KAAAA,CAAOM,OAAG,CAAA,CAAA,CAAA,CACVN,KAAAA,CAAMO,MAAAA,CAAAA,CAAG,CAETP,CAAAA,KAAAA,CAAUQ,UAAG,CAAA,CAAA,CAAA,CACbR,KAAAA,CAASS,SAAAA,CAAAA,CAAG,CAMZT,CAAAA,KAAAA,CAAQU,QAAU,CAAA,CAAA,CA4GnC,QAAAC,KAAA,EAtGOC,SAAA,CAAAb,CAAA,CAAAD,EAAA,SAAAe,YAAA,CAAAd,CAAA,GAAAe,GAAA,WAAAC,KAAA,CAIG,SAAAC,OAAAA,CAAQC,CACjB,CAAA,CAAA,GAAGA,CAAmBC,CAAAA,GAAAA,CAAI,UAAelB,CAAAA,EAAAA,IAAAA,CAAKO,MAAWP,EAAAA,CAAAA,IAAAA,CAAKG,YAAgBH,EAAAA,IAAAA,CAAKE,QAAS,CAAA,KAAAiB,qBAAA,CAAAC,sBAAA,CAC3F,GAAMC,CAAAA,EAAAA,EAAAA,qBAAAA,EAAAA,sBAAAA,CAAcrB,IAAKsB,CAAAA,gBAAAA,UAAAA,sBAAAA,iBAAL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AA,CAAAA,CAAA6D,SAAA,CAAA,8BAAA,CAAA,IAAA,EAErCL,CAAAA,CAAAA,CAAAA,CAAA,CAAhBO,CAAAA,CAAAA,CAAAA,CAAAA,CAA8B/D,CAAA6D,CAAAA,SAAAA,CAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CACdL,CAAA,CAAA,CAAhBO,CAAuC/D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6D,SAAA,CAAA,UAAA,CAAA,IAAA,EA1B5B7D,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAewD,CAAA,CAAA,CAD3BQ,CAAc,CAAA,mBAAA,CAAA,CAAA,CACFhE"}
|
1
|
+
{"version":3,"file":"nile-stepper-item.cjs.js","sources":["../../../src/nile-stepper-item/nile-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, PropertyValues } from 'lit';\nimport { customElement, property, state, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-stepper-item.css';\nimport NileElement from '../internal/nile-element';\n\n\n/**\n * Nile stepper-item component.\n *\n * @tag nile-stepper-item\n *\n */\n@customElement('nile-stepper-item')\nexport class NileStepperItem extends NileElement {\n\n\t@query('.stepper__item__content--above .stepper__content__title') absoluteTitle:HTMLDivElement;\n\t@query('.stepper__item__content--above .stepper__content__subtitle') absoluteSubtitle:HTMLDivElement;\n\n\t/* Properties passed directly */\n\t@property() title: string = '';\n\t@property() subtitle: string = '';\n\n\t/* Properties passed to parent component: NileStepper */\n\t@state() private contentBelow = false;\n\t@state() private size : 'sm' | 'lg' = 'lg';\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-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\tprotected updated(_changedProperties: PropertyValues): void {\n\t\tif(_changedProperties.has('subtitle') && this.isLast && !this.contentBelow && this.subtitle){\n\t\t\tconst subtitleWidth=this.absoluteSubtitle?.scrollWidth as number ?? '0';\n\t\t\tthis.absoluteTitle.style.minWidth=subtitleWidth+\"px\"\n\t\t}\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\n\t\tif (!this.haveFlex) this.style.setProperty('--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\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--sm':this.size=='sm',\n\t\t\t\t'stepper__item--lg':this.size=='lg',\n\t\t\t})}\">\n\t\t\t\t<div class=\"stepper__line__content\">\n\t\t\t\t\t<div class=\"stepper__line__container\">\n\t\t\t\t\t\t${this.isFirst ? nothing : html`\n\t\t\t\t\t\t\t<hr class=\"${classMap({\n\t\t\t\t\t\t\t\t'stepper__line':true,\n\t\t\t\t\t\t\t\t'stepper__line--active':isComplete || isCurrent\n\t\t\t\t\t\t\t})}\"/>\n\t\t\t\t\t\t`}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=${classMap({ 'stepper__item__bulletin':true, 'stepper__item__bulletin--inline': !this.contentBelow })}>\n\t\t\t\t\t\t${showCompletedIcon ? \n\t\t\t\t\t\t\thtml`<div class=\"${classMap({ 'stepper__bulletin--icon':true, 'stepper__bulletin__icon--active':isCurrent })}\">${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\n\t\t\t\t\t<div class=\"${classMap({\n\t\t\t\t\t\t'stepper__line__container':true,\n\t\t\t\t\t\t'stepper__line--hastitle':!this.contentBelow\n\t\t\t\t\t})}\">\n\t\t\t\t\t\t${this.contentBelow || !this.title ? nothing:html`\n\n\t\t\t\t\t\t\t<div class=\"stepper__item__content--above\">\n\t\t\t\t\t\t\t\t<div class=\"${classMap({ 'stepper__content__title':true, 'stepper__content__title--active':isCurrent })}\">\n\t\t\t\t\t\t\t\t\t${this.title}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\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\t\t\t</div>\n\t\t\t\t\t\t`}\n\t\t\t\t\t\t${this.isLast ? nothing : html`\n\t\t\t\t\t\t\t<hr class=\"${classMap({\n\t\t\t\t\t\t\t\t'stepper__line':true,\n\t\t\t\t\t\t\t\t'stepper__line--active':suffixStepperLineActive\n\t\t\t\t\t\t\t})}\" style=\"flex-grow:1;\"/>\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${this.contentBelow?\n\t\t\t\t\thtml`\n\t\t\t\t\t<div class=\"stepper__item__content--below\">\n\t\t\t\t\t\t<div class=\"${classMap({ 'stepper__content__title':true, 'stepper__content__title--active':isCurrent })}\">\n\t\t\t\t\t\t\t${this.title}\n\t\t\t\t\t\t</div>\n\t\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\t</div>\n\t\t\t\t`:nothing}\n\t\t\t</div>\n\t\t`;\n\t}\n\n\tgetSvg():TemplateResult{\n\t\tlet iconSize = this.size == 'sm' ? 20 : this.size == 'lg' ? 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\t/* #endregion */\n}\n\nexport default NileStepperItem;\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'nile-stepper-item': NileStepperItem;\n\t}\n}"],"names":["NileStepperItem","_o","v","this","title","subtitle","contentBelow","size","icon","isFirst","isLast","isComplete","isCurrent","haveFlex","_this","_inherits","_createClass","key","value","updated","_changedProperties","has","_this$absoluteSubtitl","_this$absoluteSubtitl2","subtitleWidth","absoluteSubtitle","scrollWidth","absoluteTitle","style","minWidth","render","setProperty","showCompletedIcon","completedStepValue","suffixStepperLineActive","calculatedCompletedStepValue","html","_templateObject","_taggedTemplateLiteral","classMap","stepper__item","nothing","_templateObject2","stepper__line","stepper__item__bulletin","_templateObject3","getSvg","_templateObject4","stepper__line__container","_templateObject5","stepper__content__title","stepper__content__subtitle","_templateObject6","_templateObject7","iconSize","_templateObject8","__decorate","get","styles","NileElement","query","prototype","property","state","customElement"],"mappings":"k7GAqBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEAMMC,EAAAA,KAAAA,CAAKC,KAAW,CAAA,EAAA,CAChBD,KAAAA,CAAQE,QAAAA,CAAW,GAGdF,KAAAA,CAAYG,YAAAA,CAAAA,CAAG,CACfH,CAAAA,KAAAA,CAAII,IAAiB,CAAA,IAAA,CACrBJ,KAAAA,CAAIK,IAAAA,CAAG,MAIPL,CAAAA,KAAAA,CAAOM,OAAG,CAAA,CAAA,CAAA,CACVN,KAAAA,CAAMO,MAAAA,CAAAA,CAAG,CAETP,CAAAA,KAAAA,CAAUQ,UAAG,CAAA,CAAA,CAAA,CACbR,KAAAA,CAASS,SAAAA,CAAAA,CAAG,CAMZT,CAAAA,KAAAA,CAAQU,QAAU,CAAA,CAAA,CA2GnC,QAAAC,KAAA,EArGOC,SAAA,CAAAb,CAAA,CAAAD,EAAA,SAAAe,YAAA,CAAAd,CAAA,GAAAe,GAAA,WAAAC,KAAA,CAIG,SAAAC,OAAAA,CAAQC,CACjB,CAAA,CAAA,GAAGA,CAAmBC,CAAAA,GAAAA,CAAI,UAAelB,CAAAA,EAAAA,IAAAA,CAAKO,MAAWP,EAAAA,CAAAA,IAAAA,CAAKG,YAAgBH,EAAAA,IAAAA,CAAKE,QAAS,CAAA,KAAAiB,qBAAA,CAAAC,sBAAA,CAC3F,GAAMC,CAAAA,EAAAA,EAAAA,qBAAAA,EAAAA,sBAAAA,CAAcrB,IAAKsB,CAAAA,gBAAAA,UAAAA,sBAAAA,iBAALtB,sBAAAA,CAAuBuB,WAAyB,UAAAJ,qBAAA,UAAAA,qBAAA,CAAA,GAAA,CACpEnB,IAAKwB,CAAAA,aAAAA,CAAcC,KAAMC,CAAAA,QAAAA,CAASL,EAAc,CAAA,IAChD,EACD,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A,CAAAA,CAA8B/D,CAAA6D,CAAAA,SAAAA,CAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CACdL,CAAA,CAAA,CAAhBO,CAAuC/D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6D,SAAA,CAAA,UAAA,CAAA,IAAA,EA1B5B7D,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAewD,CAAA,CAAA,CAD3BQ,CAAc,CAAA,mBAAA,CAAA,CAAA,CACFhE"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;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",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t:host {\n\t\t--stepper-flex-val:1;\n\t\t--bulletin--dot--seperation:30%;\n\t\t--lines-thickness: 1px;\n\t\t\n\t\tdisplay: inline-block;\n\t\tflex-grow:var(--stepper-flex-val);\n\t\tmin-width:var(--nile-stepper-min-width);\n\t}\n\t\n\t.stepper__item {\n\t\tmargin: 0 -1px;\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:12px;\n\t\t--stepper-item-subtitle-size:10.24px;\n\t\t--stepper-item-text-line-height:16px;\n\t\t--circle-height:18px;\n\t}\n\n\t.stepper__item--lg {\n\t\t--item-spacing: var(--nile-spacing-spacing-md);\n\t\t--stepper-item-title-size:14px;\n\t\t--stepper-item-subtitle-size:12px;\n\t\t--stepper-item-text-line-height:18px;\n\t\t--circle-height:22px;\n\t}\n\n\t.stepper__item--xl {\n\t\t--item-spacing: var(--nile-spacing-spacing-lg);\n\t\t--stepper-item-title-size:16px;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:22px;\n\t\t--circle-height:26px;\n\t}\n\n\t.stepper__line__content {\n\t\tdisplay:flex;\n\t\twidth:100%;\n\t\talign-items:center;\n\t}\n\n\t.stepper__line__container {\n\t\tflex-grow:1;\n\t\tpadding:0 1px;\n\t}\n\n\t.stepper__line--hastitle {\n\t\tdisplay:flex;\n\t\talign-items:center;\n\t}\n\n\t.stepper__line {\n\t\tdisplay: block;\n\t\tborder: 0;\n\t\tborder-top: var(--lines-thickness) solid var(--nile-colors-neutral-500);\n\t}\n\n\t.stepper__line--active {\n\t\tborder-top: var(--lines-thickness) solid var(--nile-colors-primary-600);\n\t}\n\n\t.stepper__item__content--above{\n\t\tposition: relative;\n\t\tmargin-right: var(--nile-spacing-spacing-md);\n\t}\n\n\t.stepper__item__content--above .stepper__content__subtitle{\n\t\tposition: absolute;\n top: 100%;\n white-space: nowrap;\n\t}\n\n\t.stepper__item__content--below {\n\t\tmargin-top: var(--item-spacing);\n\t\tdisplay:flex;\n\t\tflex-direction:column;\n\t\talign-items:center;\n\t}\n\t\n\t.stepper__item__bulletin {\n\t\tdisplay:grid;\n\t\tplace-content:center;\n\t\tmargin:0 -1px;\n\t}\n\n\t.stepper__item__bulletin{\n\t\tmargin-left: 6px;\n\t\tmargin-right: 6px;\n\t}\n\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--inline{\n\t\tpadding: 0 8px;\n\t\tcolor:var(--nile-colors-dark-900);\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\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: var(--lines-thickness) 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: var(--lines-thickness) solid var(--nile-colors-primary-500);\n\t\twidth: calc( var(--circle-height) + calc( var(--lines-thickness) * 2 ) );\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: var(--lines-thickness) 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\t\n\t.stepper__bulletin__icon--active {\n\t\tborder: 1px solid var(--nile-colors-primary-500);\n\t\twidth: calc(var(--circle-height) + calc( var(--lines-thickness) * 2));\n\t}\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-stepper-item.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-stepper-item.css.cjs.js","sources":["../../../src/nile-stepper-item/nile-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 * StepperItem CSS\n */\nexport const styles = css`\n\t:host {\n\t\t--stepper-flex-val:1;\n\t\t--bulletin--dot--seperation:30%;\n\t\t\n\t\tdisplay: inline-block;\n\t\tflex-grow:var(--stepper-flex-val);\n\t\tmin-width:var(--nile-stepper-min-width);\n\t}\n\t\n\t.stepper__item {\n\t\tmargin: 0 -1px;\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:12px;\n\t\t--stepper-item-subtitle-size:10.24px;\n\t\t--stepper-item-text-line-height:16px;\n\t\t--circle-height:
|
1
|
+
{"version":3,"file":"nile-stepper-item.css.cjs.js","sources":["../../../src/nile-stepper-item/nile-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 * StepperItem CSS\n */\nexport const styles = css`\n\t:host {\n\t\t--stepper-flex-val:1;\n\t\t--bulletin--dot--seperation:30%;\n\t\t--lines-thickness: 1px;\n\t\t\n\t\tdisplay: inline-block;\n\t\tflex-grow:var(--stepper-flex-val);\n\t\tmin-width:var(--nile-stepper-min-width);\n\t}\n\t\n\t.stepper__item {\n\t\tmargin: 0 -1px;\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:12px;\n\t\t--stepper-item-subtitle-size:10.24px;\n\t\t--stepper-item-text-line-height:16px;\n\t\t--circle-height:18px;\n\t}\n\n\t.stepper__item--lg {\n\t\t--item-spacing: var(--nile-spacing-spacing-md);\n\t\t--stepper-item-title-size:14px;\n\t\t--stepper-item-subtitle-size:12px;\n\t\t--stepper-item-text-line-height:18px;\n\t\t--circle-height:22px;\n\t}\n\n\t.stepper__item--xl {\n\t\t--item-spacing: var(--nile-spacing-spacing-lg);\n\t\t--stepper-item-title-size:16px;\n\t\t--stepper-item-subtitle-size:14px;\n\t\t--stepper-item-text-line-height:22px;\n\t\t--circle-height:26px;\n\t}\n\n\t.stepper__line__content {\n\t\tdisplay:flex;\n\t\twidth:100%;\n\t\talign-items:center;\n\t}\n\n\t.stepper__line__container {\n\t\tflex-grow:1;\n\t\tpadding:0 1px;\n\t}\n\n\t.stepper__line--hastitle {\n\t\tdisplay:flex;\n\t\talign-items:center;\n\t}\n\n\t.stepper__line {\n\t\tdisplay: block;\n\t\tborder: 0;\n\t\tborder-top: var(--lines-thickness) solid var(--nile-colors-neutral-500);\n\t}\n\n\t.stepper__line--active {\n\t\tborder-top: var(--lines-thickness) solid var(--nile-colors-primary-600);\n\t}\n\n\t.stepper__item__content--above{\n\t\tposition: relative;\n\t\tmargin-right: var(--nile-spacing-spacing-md);\n\t}\n\n\t.stepper__item__content--above .stepper__content__subtitle{\n\t\tposition: absolute;\n top: 100%;\n white-space: nowrap;\n\t}\n\n\t.stepper__item__content--below {\n\t\tmargin-top: var(--item-spacing);\n\t\tdisplay:flex;\n\t\tflex-direction:column;\n\t\talign-items:center;\n\t}\n\t\n\t.stepper__item__bulletin {\n\t\tdisplay:grid;\n\t\tplace-content:center;\n\t\tmargin:0 -1px;\n\t}\n\n\t.stepper__item__bulletin{\n\t\tmargin-left: 6px;\n\t\tmargin-right: 6px;\n\t}\n\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--inline{\n\t\tpadding: 0 8px;\n\t\tcolor:var(--nile-colors-dark-900);\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\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: var(--lines-thickness) 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: var(--lines-thickness) solid var(--nile-colors-primary-500);\n\t\twidth: calc( var(--circle-height) + calc( var(--lines-thickness) * 2 ) );\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: var(--lines-thickness) 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\t\n\t.stepper__bulletin__icon--active {\n\t\tborder: 1px solid var(--nile-colors-primary-500);\n\t\twidth: calc(var(--circle-height) + calc( var(--lines-thickness) * 2));\n\t}\n`;\nexport default [styles];"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import{css as e}from"lit";const
|
1
|
+
import{css as e}from"lit";const i=e`
|
2
2
|
:host {
|
3
3
|
--stepper-flex-val:1;
|
4
4
|
--bulletin--dot--seperation:30%;
|
5
|
+
--lines-thickness: 1px;
|
5
6
|
|
6
7
|
display: inline-block;
|
7
8
|
flex-grow:var(--stepper-flex-val);
|
@@ -17,23 +18,23 @@ import{css as e}from"lit";const t=e`
|
|
17
18
|
--stepper-item-title-size:12px;
|
18
19
|
--stepper-item-subtitle-size:10.24px;
|
19
20
|
--stepper-item-text-line-height:16px;
|
20
|
-
--circle-height:
|
21
|
+
--circle-height:18px;
|
21
22
|
}
|
22
23
|
|
23
|
-
.stepper__item--
|
24
|
+
.stepper__item--lg {
|
24
25
|
--item-spacing: var(--nile-spacing-spacing-md);
|
25
26
|
--stepper-item-title-size:14px;
|
26
27
|
--stepper-item-subtitle-size:12px;
|
27
28
|
--stepper-item-text-line-height:18px;
|
28
|
-
--circle-height:
|
29
|
+
--circle-height:22px;
|
29
30
|
}
|
30
31
|
|
31
|
-
.stepper__item--
|
32
|
+
.stepper__item--xl {
|
32
33
|
--item-spacing: var(--nile-spacing-spacing-lg);
|
33
34
|
--stepper-item-title-size:16px;
|
34
35
|
--stepper-item-subtitle-size:14px;
|
35
36
|
--stepper-item-text-line-height:22px;
|
36
|
-
--circle-height:
|
37
|
+
--circle-height:26px;
|
37
38
|
}
|
38
39
|
|
39
40
|
.stepper__line__content {
|
@@ -55,16 +56,16 @@ import{css as e}from"lit";const t=e`
|
|
55
56
|
.stepper__line {
|
56
57
|
display: block;
|
57
58
|
border: 0;
|
58
|
-
border-top:
|
59
|
+
border-top: var(--lines-thickness) solid var(--nile-colors-neutral-500);
|
59
60
|
}
|
60
61
|
|
61
62
|
.stepper__line--active {
|
62
|
-
border-top:
|
63
|
+
border-top: var(--lines-thickness) solid var(--nile-colors-primary-600);
|
63
64
|
}
|
64
65
|
|
65
66
|
.stepper__item__content--above{
|
66
|
-
position:relative;
|
67
|
-
|
67
|
+
position: relative;
|
68
|
+
margin-right: var(--nile-spacing-spacing-md);
|
68
69
|
}
|
69
70
|
|
70
71
|
.stepper__item__content--above .stepper__content__subtitle{
|
@@ -91,10 +92,6 @@ import{css as e}from"lit";const t=e`
|
|
91
92
|
margin-right: 6px;
|
92
93
|
}
|
93
94
|
|
94
|
-
.stepper__item__bulletin--inline{
|
95
|
-
margin-right: 0px;
|
96
|
-
}
|
97
|
-
|
98
95
|
.stepper__content__title {
|
99
96
|
color:var(--nile-colors-dark-900);
|
100
97
|
font-size: var(--stepper-item-title-size);
|
@@ -130,22 +127,28 @@ import{css as e}from"lit";const t=e`
|
|
130
127
|
aspect-ratio: 1 / 1;
|
131
128
|
border-radius: 50%;
|
132
129
|
background: radial-gradient(var(--nile-colors-neutral-500) var(--bulletin--dot--seperation), var(--nile-colors-dark-200) var(--bulletin--dot--seperation));
|
133
|
-
border:
|
130
|
+
border: var(--lines-thickness) solid var(--nile-colors-neutral-500);
|
134
131
|
}
|
135
132
|
|
136
133
|
.stepper__bulletin__dot--active{
|
137
134
|
background: radial-gradient(var(--nile-colors-white-base) var(--bulletin--dot--seperation), var(--nile-colors-primary-600) var(--bulletin--dot--seperation));
|
138
|
-
border:
|
135
|
+
border: var(--lines-thickness) solid var(--nile-colors-primary-500);
|
136
|
+
width: calc( var(--circle-height) + calc( var(--lines-thickness) * 2 ) );
|
139
137
|
}
|
140
138
|
|
141
139
|
.stepper__bulletin--icon {
|
142
140
|
display:grid;
|
143
141
|
place-content:center;
|
144
142
|
width: var(--circle-height);
|
145
|
-
border:
|
143
|
+
border: var(--lines-thickness) solid var(--nile-colors-primary-600);
|
146
144
|
aspect-ratio: 1 / 1;
|
147
145
|
border-radius: 50%;
|
148
146
|
background-color:var(--nile-colors-primary-600);
|
149
147
|
overflow:hidden;
|
150
148
|
}
|
151
|
-
|
149
|
+
|
150
|
+
.stepper__bulletin__icon--active {
|
151
|
+
border: 1px solid var(--nile-colors-primary-500);
|
152
|
+
width: calc(var(--circle-height) + calc( var(--lines-thickness) * 2));
|
153
|
+
}
|
154
|
+
`;export{i as s};
|
@@ -1,42 +1,42 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as e,nothing as i}from"lit";import{query as s,property as _,state as l,customElement as p}from"lit/decorators.js";import{classMap as
|
2
|
-
<div class="${
|
1
|
+
import{__decorate as t}from"tslib";import{html as e,nothing as i}from"lit";import{query as s,property as _,state as l,customElement as p}from"lit/decorators.js";import{classMap as n}from"lit/directives/class-map.js";import{s as r}from"./nile-stepper-item.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";let v=class extends o{constructor(){super(...arguments),this.title="",this.subtitle="",this.contentBelow=!1,this.size="lg",this.icon="tick",this.isFirst=!1,this.isLast=!1,this.isComplete=!1,this.isCurrent=!1,this.haveFlex=!0}static get styles(){return[r]}updated(t){if(t.has("subtitle")&&this.isLast&&!this.contentBelow&&this.subtitle){const t=this.absoluteSubtitle?.scrollWidth??"0";this.absoluteTitle.style.minWidth=t+"px"}}render(){this.haveFlex||this.style.setProperty("--stepper-flex-val","0");const t=this.isCurrent,s=this.isComplete;let _=!1;(s&&!t||this.completedStepValue==this.value)&&(_=!0);let l=!1;return s&&(l=!0,this.calculatedCompletedStepValue==this.value&&(l=!1)),e`
|
2
|
+
<div class="${n({stepper__item:!0,"stepper__item--selected":t,"stepper__item--sm":"sm"==this.size,"stepper__item--lg":"lg"==this.size})}">
|
3
3
|
<div class="stepper__line__content">
|
4
4
|
<div class="stepper__line__container">
|
5
5
|
${this.isFirst?i:e`
|
6
|
-
<hr class="${
|
6
|
+
<hr class="${n({stepper__line:!0,"stepper__line--active":s||t})}"/>
|
7
7
|
`}
|
8
8
|
</div>
|
9
9
|
|
10
|
-
<div class=${
|
11
|
-
${_?e`<div class="stepper__bulletin--icon">${this.getSvg()}</div>`:e`<div class="${
|
10
|
+
<div class=${n({stepper__item__bulletin:!0,"stepper__item__bulletin--inline":!this.contentBelow})}>
|
11
|
+
${_?e`<div class="${n({"stepper__bulletin--icon":!0,"stepper__bulletin__icon--active":t})}">${this.getSvg()}</div>`:e`<div class="${n({"stepper__bulletin--dot":!0,"stepper__bulletin__dot--active":t})}"></div>`}
|
12
12
|
</div>
|
13
13
|
|
14
|
-
<div class="${
|
14
|
+
<div class="${n({stepper__line__container:!0,"stepper__line--hastitle":!this.contentBelow})}">
|
15
15
|
${this.contentBelow||!this.title?i:e`
|
16
16
|
|
17
17
|
<div class="stepper__item__content--above">
|
18
|
-
<div class="${
|
18
|
+
<div class="${n({stepper__content__title:!0,"stepper__content__title--active":t})}">
|
19
19
|
${this.title}
|
20
20
|
</div>
|
21
|
-
<div class="${
|
21
|
+
<div class="${n({stepper__content__subtitle:!0,"stepper__content__subtitle--active":t})}">${this.subtitle}</div>
|
22
22
|
</div>
|
23
23
|
`}
|
24
24
|
${this.isLast?i:e`
|
25
|
-
<hr class="${
|
25
|
+
<hr class="${n({stepper__line:!0,"stepper__line--active":l})}" style="flex-grow:1;"/>
|
26
26
|
`}
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
${this.contentBelow?e`
|
30
30
|
<div class="stepper__item__content--below">
|
31
|
-
<div class="${
|
31
|
+
<div class="${n({stepper__content__title:!0,"stepper__content__title--active":t})}">
|
32
32
|
${this.title}
|
33
33
|
</div>
|
34
|
-
<div class="${
|
34
|
+
<div class="${n({stepper__content__subtitle:!0,"stepper__content__subtitle--active":t})}">${this.subtitle}</div>
|
35
35
|
</div>
|
36
36
|
`:i}
|
37
37
|
</div>
|
38
|
-
`}getSvg(){let t="sm"==this.size?20:"
|
38
|
+
`}getSvg(){let t="sm"==this.size?20:"lg"==this.size?24:28;return e`
|
39
39
|
<svg width="${t}" height="${t}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
40
40
|
<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"/>
|
41
41
|
</svg>
|
42
|
-
`}};t([s(".stepper__item__content--above .stepper__content__title")],
|
42
|
+
`}};t([s(".stepper__item__content--above .stepper__content__title")],v.prototype,"absoluteTitle",void 0),t([s(".stepper__item__content--above .stepper__content__subtitle")],v.prototype,"absoluteSubtitle",void 0),t([_()],v.prototype,"title",void 0),t([_()],v.prototype,"subtitle",void 0),t([l()],v.prototype,"contentBelow",void 0),t([l()],v.prototype,"size",void 0),t([l()],v.prototype,"icon",void 0),t([l()],v.prototype,"isFirst",void 0),t([l()],v.prototype,"isLast",void 0),t([l()],v.prototype,"isComplete",void 0),t([l()],v.prototype,"isCurrent",void 0),t([l()],v.prototype,"currentStepValue",void 0),t([l()],v.prototype,"completedStepValue",void 0),t([l()],v.prototype,"calculatedCompletedStepValue",void 0),t([l()],v.prototype,"value",void 0),t([l()],v.prototype,"haveFlex",void 0),v=t([p("nile-stepper-item")],v);export{v as N};
|
@@ -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,n;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;_=_litDecoratorsJs.customElement;},function(_nileVerticalStepperItemCssCjsJs){p=_nileVerticalStepperItemCssCjsJs.s;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;}],execute:function execute(){_export("N",n=/*#__PURE__*/function(_r){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.title="",_this.subtitle="",_this.contentBelow=!1,_this.size="lg",_this.icon="tick",_this.isFirst=!1,_this.isLast=!1,_this.isComplete=!1,_this.isCurrent=!1,_this.haveFlex=!0;return _this;}_inherits(n,_r);return _createClass(n,[{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 _=!1;return s&&(_=!0,this.calculatedCompletedStepValue==this.value&&(_=!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--lg":"lg"==this.size}),l?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div class=\"","\">","</div>"])),o({"stepper__bulletin--icon":!0,"stepper__bulletin__icon--active":t}),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":_})),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--alone":!this.title,"stepper__content__subtitle--active":t}),this.subtitle);}},{key:"getSvg",value:function getSvg(){var t="sm"==this.size?20:"lg"==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[p];}}]);}(r));t([s()],n.prototype,"title",void 0),t([s()],n.prototype,"subtitle",void 0),t([l()],n.prototype,"contentBelow",void 0),t([l()],n.prototype,"size",void 0),t([l()],n.prototype,"icon",void 0),t([l()],n.prototype,"isFirst",void 0),t([l()],n.prototype,"isLast",void 0),t([l()],n.prototype,"isComplete",void 0),t([l()],n.prototype,"isCurrent",void 0),t([l()],n.prototype,"currentStepValue",void 0),t([l()],n.prototype,"completedStepValue",void 0),t([l()],n.prototype,"calculatedCompletedStepValue",void 0),t([l()],n.prototype,"value",void 0),t([l()],n.prototype,"haveFlex",void 0),_export("N",n=t([_("nile-vertical-stepper-item")],n));}};});
|
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' | '
|
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' | 'lg' = 'lg';\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 == 'lg'?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--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=\"${classMap({ 'stepper__bulletin--icon':true, 'stepper__bulletin__icon--active':isCurrent })}\">${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--alone\": !this.title, '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 == 'lg' ? 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","n","this","title","subtitle","contentBelow","size","icon","isFirst","isLast","isComplete","isCurrent","haveFlex","_this","_inherits","_r","_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,EAAAA,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,IAAiB,CAAA,IAAA,CACrBJ,KAAAA,CAAIK,IAAAA,CAAG,MAIPL,CAAAA,KAAAA,CAAOM,SAAG,CACVN,CAAAA,KAAAA,CAAMO,MAAG,CAAA,CAAA,CAAA,CAETP,KAAAA,CAAUQ,UAAAA,CAAAA,CAAG,EACbR,KAAAA,CAASS,SAAAA,CAAAA,CAAG,CAMZT,CAAAA,KAAAA,CAAQU,QAAU,CAAA,CAAA,CAuEnC,QAAAC,KAAA,EAjEOC,SAAA,CAAAb,CAAA,CAAAc,EAAA,SAAAC,YAAA,CAAAf,CAAA,GAAAgB,GAAA,UAAAC,KAAA,CAYA,SAAAC,MAAAA,CAAAA,CAAAA,CACFjB,IAAKO,CAAAA,MAAAA,EAAQP,IAAKkB,CAAAA,KAAAA,CAAMC,YAAY,6BAA+B,CAAA,GAAA,CAAA,CACvE,GAAM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