@digital-realty/ix-wizard 1.2.9 → 1.3.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.
Files changed (2) hide show
  1. package/dist/ix-wizard.min.js +118 -1
  2. package/package.json +11 -20
@@ -1 +1,118 @@
1
- import{__decorate}from"tslib";import{css,LitElement,nothing,html}from"lit";import{property}from"lit/decorators.js";let IxWizardStyles=css`.wizard-wrapper{display:flex;flex-direction:column;gap:20px}.wizard-header{display:flex;justify-content:center;min-height:1.5rem}.wizard-hideclose-header{display:flex;justify-content:space-between;background:#fff;z-index:10;margin-left:var(--ix-wizard-hideclose-header-custom-margin-left,0)}.wizard-hideclose-header>div{flex:1}.wizard-hideclose-header .closeButton{justify-content:flex-end;align-items:center}.wizard-hideclose-header .hideButton{justify-content:flex-start;align-items:center;display:inline-flex}.wizard-title{width:140px;display:flex;justify-content:center;-webkit-box-align:center;place-items:center;top:var(--ix-wizard-top,0)}.wizard-header .wizard-title{position:relative}.wizard-hideclose-header .wizard-title{position:static}.wizard-title md-icon{color:#d3d3d3}.wizard-header .wizard-title md-icon.enable-click:hover,.wizard-hideclose-header .wizard-title md-icon.enable-click:hover{cursor:pointer}.wizard-header .wizard-title md-icon.enable-click,.wizard-hideclose-header .wizard-title md-icon.enable-click{color:var(--ix-sys-primary,#1456e0)}.wizard-header .wizard-title span,.wizard-hideclose-header .wizard-title span{font-weight:700;font-style:normal;font-size:14px;letter-spacing:1.25px;text-transform:uppercase;color:#092241;padding:0 1rem}`;class IxWizard extends LitElement{constructor(){super(...arguments),this.totalSteps=0,this.currentStep=0,this.hideStepCount=!1,this.hideNextStep=!1,this.hidePrevStep=!1,this.enableNextStepClick=!1,this.enableHideCloseButton=!1,this.enableHideButton=!1}static get styles(){return[IxWizardStyles]}firstUpdated(){var e;0===this.totalSteps&&(e=null==(e=null==(e=this.shadowRoot)?void 0:e.querySelector("slot"))?void 0:e.assignedElements(),this.totalSteps=(null==e?void 0:e.length)||0)}renderStepCount(){return 0===this.currentStep||this.hideStepCount?nothing:html`<div class="wizard-title">${this.hidePrevStep?html`<span></span>`:html`<md-icon class="prev-arrow enable-click" @click="${()=>this.onPrevStepClick()}">chevron_left</md-icon>`} <span class="button-label">${this.currentStep} of ${this.totalSteps} </span>${this.hideNextStep?nothing:html`<md-icon class="${"next-arrow "+(this.enableNextStepClick?"enable-click":"")}" @click="${()=>{this.enableNextStepClick&&this.onNextStepClick()}}">chevron_right</md-icon>`}</div>`}renderWithHideAndCloseButton(){return html`<div class="wizard-wrapper"><div class="wizard-hideclose-header"><div>${this.enableHideButton?html`<ix-button class="hideButton" data-testid="hideButton" appearance="text" has-icon @click="${()=>this.onMinimiseClick()}"><ix-icon slot="icon">fullscreen_exit</ix-icon>HIDE</ix-button>`:nothing}</div>${this.renderStepCount()}<div><ix-icon-button class="closeButton" @click="${()=>this.onCloseClick()}" icon="close"></ix-icon-button></div></div><div class="wizard-body"><slot></slot></div></div>`}renderDefault(){return html`<div class="wizard-wrapper"><div class="wizard-header">${this.renderStepCount()}</div><div class="wizard-body"><slot></slot></div></div>`}render(){return html`${this.enableHideCloseButton?this.renderWithHideAndCloseButton():this.renderDefault()}`}}__decorate([property({type:Number})],IxWizard.prototype,"totalSteps",void 0),__decorate([property({type:Number})],IxWizard.prototype,"currentStep",void 0),__decorate([property({type:Boolean})],IxWizard.prototype,"hideStepCount",void 0),__decorate([property({type:Function})],IxWizard.prototype,"onNextStepClick",void 0),__decorate([property({type:Function})],IxWizard.prototype,"onPrevStepClick",void 0),__decorate([property({type:Function})],IxWizard.prototype,"onCloseClick",void 0),__decorate([property({type:Function})],IxWizard.prototype,"onMinimiseClick",void 0),__decorate([property({type:Boolean})],IxWizard.prototype,"hideNextStep",void 0),__decorate([property({type:Boolean})],IxWizard.prototype,"hidePrevStep",void 0),__decorate([property({type:Boolean})],IxWizard.prototype,"enableNextStepClick",void 0),__decorate([property({type:Boolean})],IxWizard.prototype,"enableHideCloseButton",void 0),__decorate([property({type:Boolean})],IxWizard.prototype,"enableHideButton",void 0),window.customElements.define("ix-wizard",IxWizard);
1
+ import{__decorate as e}from"tslib";import{css as t,LitElement as i,nothing as o,html as r}from"lit";import{property as n}from"lit/decorators.js";const d=t`
2
+ .wizard-wrapper {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 20px;
6
+ }
7
+
8
+ .wizard-header {
9
+ display: flex;
10
+ justify-content: center;
11
+ min-height: 1.5rem;
12
+ }
13
+ .wizard-hideclose-header {
14
+ display: flex;
15
+ justify-content: space-between;
16
+ background: white;
17
+ z-index: 10;
18
+ margin-left: var(--ix-wizard-hideclose-header-custom-margin-left, 0);
19
+ }
20
+ .wizard-hideclose-header > div {
21
+ flex: 1;
22
+ }
23
+ .wizard-hideclose-header .closeButton {
24
+ justify-content: flex-end;
25
+ align-items: center;
26
+ }
27
+ .wizard-hideclose-header .hideButton {
28
+ justify-content: flex-start;
29
+ align-items: center;
30
+ display: inline-flex;
31
+ }
32
+ .wizard-title {
33
+ width: 140px;
34
+ display: flex;
35
+ justify-content: center;
36
+ -webkit-box-align: center;
37
+ place-items: center;
38
+ top: var(--ix-wizard-top, 0);
39
+ }
40
+ .wizard-header .wizard-title {
41
+ position: relative;
42
+ }
43
+ .wizard-hideclose-header .wizard-title {
44
+ position: static;
45
+ }
46
+ .wizard-title md-icon {
47
+ color: lightgrey;
48
+ }
49
+ .wizard-header .wizard-title md-icon.enable-click:hover,
50
+ .wizard-hideclose-header .wizard-title md-icon.enable-click:hover {
51
+ cursor: pointer;
52
+ }
53
+ .wizard-header .wizard-title md-icon.enable-click,
54
+ .wizard-hideclose-header .wizard-title md-icon.enable-click {
55
+ color: var(--ix-sys-primary, #1456e0);
56
+ }
57
+ .wizard-header .wizard-title span,
58
+ .wizard-hideclose-header .wizard-title span {
59
+ font-weight: 700;
60
+ font-style: normal;
61
+ font-size: 14px;
62
+ letter-spacing: 1.25px;
63
+ text-transform: uppercase;
64
+ color: #092241;
65
+ padding: 0 1rem;
66
+ }
67
+ `;class l extends i{constructor(){super(...arguments),this.totalSteps=0,this.currentStep=0,this.hideStepCount=!1,this.hideNextStep=!1,this.hidePrevStep=!1,this.enableNextStepClick=!1,this.enableHideCloseButton=!1,this.enableHideButton=!1}static get styles(){return[d]}firstUpdated(){var e;if(0===this.totalSteps){const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("slot"),i=null==t?void 0:t.assignedElements();this.totalSteps=(null==i?void 0:i.length)||0}}renderStepCount(){return 0===this.currentStep||this.hideStepCount?o:r`<div class="wizard-title">
68
+ ${this.hidePrevStep?r`<span></span>`:r`<md-icon
69
+ class="prev-arrow enable-click"
70
+ @click=${()=>this.onPrevStepClick()}
71
+ >
72
+ chevron_left
73
+ </md-icon>`}
74
+ <span class="button-label">
75
+ ${this.currentStep} of ${this.totalSteps}
76
+ </span>
77
+ ${this.hideNextStep?o:r`<md-icon
78
+ class=${"next-arrow "+(this.enableNextStepClick?"enable-click":"")}
79
+ @click=${()=>{this.enableNextStepClick&&this.onNextStepClick()}}
80
+ >
81
+ chevron_right
82
+ </md-icon>`}
83
+ </div>`}renderWithHideAndCloseButton(){return r`
84
+ <div class="wizard-wrapper">
85
+ <div class="wizard-hideclose-header">
86
+ <div>
87
+ ${this.enableHideButton?r`<ix-button
88
+ class="hideButton"
89
+ data-testid="hideButton"
90
+ appearance="text"
91
+ has-icon
92
+ @click=${()=>this.onMinimiseClick()}
93
+ >
94
+ <ix-icon slot="icon">fullscreen_exit</ix-icon>
95
+ HIDE
96
+ </ix-button>`:o}
97
+ </div>
98
+ ${this.renderStepCount()}
99
+ <div>
100
+ <ix-icon-button
101
+ class="closeButton"
102
+ @click=${()=>this.onCloseClick()}
103
+ icon="close"
104
+ ></ix-icon-button>
105
+ </div>
106
+ </div>
107
+ <div class="wizard-body">
108
+ <slot></slot>
109
+ </div>
110
+ </div>
111
+ `}renderDefault(){return r`
112
+ <div class="wizard-wrapper">
113
+ <div class="wizard-header">${this.renderStepCount()}</div>
114
+ <div class="wizard-body">
115
+ <slot></slot>
116
+ </div>
117
+ </div>
118
+ `}render(){return r` ${this.enableHideCloseButton?this.renderWithHideAndCloseButton():this.renderDefault()}`}}e([n({type:Number})],l.prototype,"totalSteps",void 0),e([n({type:Number})],l.prototype,"currentStep",void 0),e([n({type:Boolean})],l.prototype,"hideStepCount",void 0),e([n({type:Function})],l.prototype,"onNextStepClick",void 0),e([n({type:Function})],l.prototype,"onPrevStepClick",void 0),e([n({type:Function})],l.prototype,"onCloseClick",void 0),e([n({type:Function})],l.prototype,"onMinimiseClick",void 0),e([n({type:Boolean})],l.prototype,"hideNextStep",void 0),e([n({type:Boolean})],l.prototype,"hidePrevStep",void 0),e([n({type:Boolean})],l.prototype,"enableNextStepClick",void 0),e([n({type:Boolean})],l.prototype,"enableHideCloseButton",void 0),e([n({type:Boolean})],l.prototype,"enableHideButton",void 0),window.customElements.define("ix-wizard",l);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent ix-wizard following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "interxion",
6
- "version": "1.2.9",
6
+ "version": "1.3.1",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -23,15 +23,13 @@
23
23
  "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
24
24
  "build": "tsc && npm run analyze -- --exclude dist && rollup -c",
25
25
  "prepublish": "tsc && npm run analyze -- --exclude dist",
26
- "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
27
- "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
26
+ "lint": "eslint --ext .ts,.html . && prettier \"**/*.ts\" --check --ignore-path .gitignore",
27
+ "format": "eslint --ext .ts,.html . --fix && prettier \"**/*.ts\" --write --ignore-path .gitignore",
28
28
  "test": "tsc && wtr --coverage",
29
- "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
30
- "storybook": "tsc && npm run analyze -- --exclude dist && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds -c .storybook/server.mjs\"",
31
- "storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
29
+ "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
32
30
  },
33
31
  "dependencies": {
34
- "@digital-realty/ix-button": "^3.4.8",
32
+ "@digital-realty/ix-button": "^3.5.1",
35
33
  "@lit/react": "^1.0.2",
36
34
  "@material/web": "2.4.0",
37
35
  "lit": "^3.2.1",
@@ -39,33 +37,26 @@
39
37
  },
40
38
  "devDependencies": {
41
39
  "@custom-elements-manifest/analyzer": "^0.4.17",
42
- "@open-wc/eslint-config": "^9.2.1",
43
40
  "@open-wc/testing": "^3.1.6",
44
- "@typescript-eslint/eslint-plugin": "^5.48.0",
45
- "@typescript-eslint/parser": "^5.48.0",
41
+ "@rollup/plugin-terser": "^1.0.0",
42
+ "@typescript-eslint/eslint-plugin": "^8.58.2",
43
+ "@typescript-eslint/parser": "^8.58.2",
46
44
  "@web/dev-server": "^0.4.6",
47
- "@web/dev-server-storybook": "^2.0.3",
48
45
  "@web/test-runner": "^0.20.2",
49
- "concurrently": "^9.1.0",
50
- "eslint": "^8.31.0",
46
+ "concurrently": "^9.2.1",
47
+ "eslint": "^9.39.4",
51
48
  "eslint-config-prettier": "^8.3.0",
52
49
  "husky": "^4.3.8",
53
50
  "lint-staged": "^10.5.4",
54
51
  "prettier": "^2.4.1",
55
52
  "rollup": "^4.29.1",
56
- "rollup-plugin-minify-html-literals": "^1.2.6",
57
53
  "rollup-plugin-summary": "^2.0.0",
58
- "rollup-plugin-uglify": "^6.0.4",
59
54
  "tslib": "^2.3.1",
60
55
  "typescript": "^4.5.2"
61
56
  },
62
57
  "customElements": "custom-elements.json",
63
58
  "eslintConfig": {
64
59
  "parser": "@typescript-eslint/parser",
65
- "extends": [
66
- "@open-wc",
67
- "prettier"
68
- ],
69
60
  "plugins": [
70
61
  "@typescript-eslint"
71
62
  ],
@@ -109,5 +100,5 @@
109
100
  "README.md",
110
101
  "LICENSE"
111
102
  ],
112
- "gitHead": "5c1dfe00bd35091792fcfdcea4bdddec87bd2d8b"
103
+ "gitHead": "da06737d6707fd3d4ef898ba0fa632e7b3ed8019"
113
104
  }