@progressive-development/pd-forms 0.0.13 → 0.0.15

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 (42) hide show
  1. package/package.json +2 -2
  2. package/pd-button-goup.js +3 -0
  3. package/pd-button.js +3 -0
  4. package/pd-checkbox.js +3 -0
  5. package/pd-form-container.js +3 -0
  6. package/pd-form-row.js +3 -0
  7. package/pd-input-area.js +3 -0
  8. package/pd-input.js +3 -0
  9. package/pd-label-value.js +3 -0
  10. package/pd-radio-group.js +3 -0
  11. package/pd-select.js +3 -0
  12. package/src/{squi-base-ui.js → PdBaseUi.js} +1 -1
  13. package/src/{squi-base-ui-input.js → PdBaseUiInput.js} +2 -2
  14. package/src/{squi-button.js → PdButton.js} +10 -10
  15. package/src/{squi-button-group.js → PdButtonGroup.js} +3 -3
  16. package/src/{squi-checkbox.js → PdCheckbox.js} +22 -22
  17. package/src/{squi-form-container.js → PdFormContainer.js} +1 -1
  18. package/src/{squi-form-row.js → PdFormRow.js} +1 -1
  19. package/src/{squi-input.js → PdInput.js} +15 -15
  20. package/src/{squi-input-area.js → PdInputArea.js} +13 -13
  21. package/src/PdLabelValue.js +75 -0
  22. package/src/{squi-radio-group.js → PdRadioGroup.js} +4 -4
  23. package/src/{squi-select.js → PdSelect.js} +9 -9
  24. package/src/shared-input-styles.js +11 -11
  25. package/stories/button.stories.js +15 -0
  26. package/stories/checkbox.stories.js +50 -0
  27. package/stories/form-container.stories.js +50 -0
  28. package/stories/index.stories.js +297 -29
  29. package/stories/input-area.stories.js +129 -0
  30. package/stories/input.stories.js +130 -0
  31. package/stories/label-value.stories.js +32 -0
  32. package/stories/radio-group.stories.js +45 -0
  33. package/stories/select.stories.js +104 -0
  34. package/PdButton.js +0 -3
  35. package/PdButtonGroup.js +0 -3
  36. package/PdCheckbox.js +0 -3
  37. package/PdFormContainer.js +0 -3
  38. package/PdFormRow.js +0 -3
  39. package/PdInput.js +0 -3
  40. package/PdInputArea.js +0 -3
  41. package/PdRadioGroup.js +0 -3
  42. package/PdSelect.js +0 -3
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent pd-forms following open-wc recommendations",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "author": "PD Progressive Development",
6
- "version": "0.0.13",
6
+ "version": "0.0.15",
7
7
  "main": "index.js",
8
8
  "module": "index.js",
9
9
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "storybook:build": "npm run analyze -- --exclude dist && build-storybook"
18
18
  },
19
19
  "dependencies": {
20
- "@progressive-development/pd-icon": "0.0.4",
20
+ "@progressive-development/pd-icon": "0.0.6",
21
21
  "lit": "^2.0.0-rc.4",
22
22
  "@lit-labs/motion": "^1.0.0-rc.2"
23
23
  },
@@ -0,0 +1,3 @@
1
+ import { PdButtonGroup } from './src/PdButtonGroup.js';
2
+
3
+ customElements.define('pd-button-group', PdButtonGroup);
package/pd-button.js ADDED
@@ -0,0 +1,3 @@
1
+ import { PdButton } from './src/PdButton.js';
2
+
3
+ window.customElements.define('pd-button', PdButton);
package/pd-checkbox.js ADDED
@@ -0,0 +1,3 @@
1
+ import { PdCheckbox } from './src/PdCheckbox.js';
2
+
3
+ window.customElements.define('pd-checkbox', PdCheckbox);
@@ -0,0 +1,3 @@
1
+ import { PdFormContainer } from './src/PdFormContainer.js';
2
+
3
+ window.customElements.define('pd-form-container', PdFormContainer);
package/pd-form-row.js ADDED
@@ -0,0 +1,3 @@
1
+ import { PdFormRow } from './src/PdFormRow.js';
2
+
3
+ window.customElements.define('pd-form-row', PdFormRow);
@@ -0,0 +1,3 @@
1
+ import { PdInputArea } from './src/PdInputArea.js';
2
+
3
+ window.customElements.define('pd-input-area', PdInputArea);
package/pd-input.js ADDED
@@ -0,0 +1,3 @@
1
+ import { PdInput } from './src/PdInput.js';
2
+
3
+ window.customElements.define('pd-input', PdInput);
@@ -0,0 +1,3 @@
1
+ import { PdLabelValue } from './src/PdLabelValue.js';
2
+
3
+ window.customElements.define('pd-label-value', PdLabelValue);
@@ -0,0 +1,3 @@
1
+ import { PdRadioGroup } from './src/PdRadioGroup.js';
2
+
3
+ window.customElements.define('pd-radio-group', PdRadioGroup);
package/pd-select.js ADDED
@@ -0,0 +1,3 @@
1
+ import { PdSelect } from './src/PdSelect.js';
2
+
3
+ window.customElements.define('pd-select', PdSelect);
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { LitElement } from 'lit';
7
7
 
8
- export class SquiBaseUI extends LitElement {
8
+ export class PdBaseUI extends LitElement {
9
9
 
10
10
  static get properties() {
11
11
  return {
@@ -3,7 +3,7 @@
3
3
  * Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
4
4
  */
5
5
 
6
- import { SquiBaseUI } from './squi-base-ui.js';
6
+ import { PdBaseUI } from './PdBaseUi.js';
7
7
 
8
8
  export const INPUT_TYPE_TEXT = 1;
9
9
  export const INPUT_TYPE_SELECT = 2;
@@ -11,7 +11,7 @@ export const INPUT_TYPE_CHECK = 3;
11
11
  export const INPUT_TYPE_RANGE = 4;
12
12
  export const INPUT_TYPE_AREA = 5;
13
13
 
14
- export class SquiBaseUIInput extends SquiBaseUI {
14
+ export class PdBaseUIInput extends PdBaseUI {
15
15
 
16
16
  static get properties() {
17
17
  return {
@@ -7,7 +7,7 @@ import { html, css , LitElement } from 'lit';
7
7
 
8
8
  import { SharedInputStyles } from './shared-input-styles.js';
9
9
 
10
- export class SquiButton extends LitElement {
10
+ export class PdButton extends LitElement {
11
11
 
12
12
  static get styles() {
13
13
  return [
@@ -117,23 +117,23 @@ export class SquiButton extends LitElement {
117
117
  align-items: center;
118
118
  justify-content: center;
119
119
  white-space: nowrap;
120
- --squi-icon-fill: var(--icon-fill-light);
121
- --squi-icon-fill-hover: var(--icon-fill-light);
120
+ --pd-icon-fill: var(--icon-fill-light);
121
+ --pd-icon-fill-hover: var(--icon-fill-light);
122
122
  }
123
123
 
124
124
  .button-icon:not([disabled]) {
125
- --squi-icon-fill: var(--app-primary-color);
126
- --squi-icon-fill-hover: var(--app-primary-color-dark);
125
+ --pd-icon-fill: var(--app-primary-color);
126
+ --pd-icon-fill-hover: var(--app-primary-color-dark);
127
127
  }
128
128
 
129
- .button-icon squi-icon {
129
+ .button-icon pd-icon {
130
130
  max-width: 1.25rem;
131
131
  height: 1.25rem;
132
132
  width: 1.25rem;
133
133
  margin: 0 .15rem;
134
134
  }
135
135
 
136
- .button-icon.small squi-icon {
136
+ .button-icon.small pd-icon {
137
137
  max-width: 1.25rem;
138
138
  height: 1.25rem;
139
139
  width: 1.25rem;
@@ -148,16 +148,16 @@ export class SquiButton extends LitElement {
148
148
  fill: var(--app-primary-color);
149
149
  }
150
150
 
151
- .button-icon:hover squi-icon,
151
+ .button-icon:hover pd-icon,
152
152
  .button-icon:hover svg {
153
153
  fill: var(--app-primary-color);
154
154
  }
155
155
 
156
156
  @media (min-width: 580px) {
157
- .button-icon squi-icon {
157
+ .button-icon pd-icon {
158
158
  margin: 0 .5rem;
159
159
  }
160
- .button-icon.small squi-icon {
160
+ .button-icon.small pd-icon {
161
161
  padding-right: .5rem;
162
162
  }
163
163
  }
@@ -6,10 +6,10 @@
6
6
  import { html, css , LitElement } from 'lit';
7
7
 
8
8
  import { SharedInputStyles } from './shared-input-styles.js';
9
- import './squi-button.js';
9
+ import '../pd-button.js';
10
10
 
11
11
 
12
- export class SquiButtonGroup extends LitElement {
12
+ export class PdButtonGroup extends LitElement {
13
13
 
14
14
  static get styles() {
15
15
  return [
@@ -46,7 +46,7 @@ export class SquiButtonGroup extends LitElement {
46
46
  return html`
47
47
  <div class="button-group">
48
48
  ${this.buttons.map(entry => html`
49
- <squi-button text="${entry.text}" style="visibility: ${entry.visibility};"></squi-button>
49
+ <pd-button text="${entry.text}" style="visibility: ${entry.visibility};"></pd-button>
50
50
  `)}
51
51
  </div>
52
52
  `;
@@ -9,12 +9,12 @@ import { classMap } from 'lit/directives/class-map.js';
9
9
  // import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
10
10
 
11
11
  import '@progressive-development/pd-icon';
12
- import { SquiBaseUIInput, INPUT_TYPE_CHECK } from "./squi-base-ui-input.js";
12
+ import { PdBaseUIInput, INPUT_TYPE_CHECK } from "./PdBaseUiInput.js";
13
13
 
14
14
 
15
15
  // import { installMediaQueryWatcher } from 'pwa-helpers/media-query.js';
16
16
 
17
- export class SquiCheckbox extends SquiBaseUIInput {
17
+ export class PdCheckbox extends PdBaseUIInput {
18
18
  static get properties() {
19
19
  return {
20
20
  hasInner: { type: Boolean },
@@ -54,7 +54,7 @@ export class SquiCheckbox extends SquiBaseUIInput {
54
54
 
55
55
 
56
56
 
57
- /* TODO vars used in squi-icon */
57
+ /* TODO vars used in pd-icon */
58
58
  --squi-checkbox-checked-color: var(--my-primary);
59
59
  --squi-checkbox-unchecked-color: var(--my-ligth);
60
60
  --squi-checkbox-bg: var(--my-dark);
@@ -63,21 +63,21 @@ export class SquiCheckbox extends SquiBaseUIInput {
63
63
 
64
64
  --squi-checkbox-label-disabled-color: var(--app-copy-color, #303030);
65
65
 
66
- /* Checkbox squi-icon */
67
- --squi-icon-fill: var(--my-icon-bg-color);
68
- --squi-icon-bg: var(--my-icon-fill);
69
- --squi-icon-fill-active: var(--my-icon-bg-active-color);
70
- --squi-icon-bg-active: var(--my-icon-active-fill);
66
+ /* Checkbox pd-icon */
67
+ --pd-icon-fill: var(--my-icon-bg-color);
68
+ --pd-icon-bg: var(--my-icon-fill);
69
+ --pd-icon-fill-active: var(--my-icon-bg-active-color);
70
+ --pd-icon-bg-active: var(--my-icon-active-fill);
71
71
 
72
72
  display: inline-block;
73
73
  font-size: .8rem;
74
74
  }
75
- /* Switch squi-icon */
75
+ /* Switch pd-icon */
76
76
  :host([isSwitch]) {
77
- --squi-icon-fill: var(--my-icon-fill);
78
- --squi-icon-bg: var(--my-icon-bg-color);
79
- --squi-icon-fill-active: var(--my-icon-active-fill);
80
- --squi-icon-bg-active: var(--my-icon-bg-active-color);
77
+ --pd-icon-fill: var(--my-icon-fill);
78
+ --pd-icon-bg: var(--my-icon-bg-color);
79
+ --pd-icon-fill-active: var(--my-icon-active-fill);
80
+ --pd-icon-bg-active: var(--my-icon-bg-active-color);
81
81
  }
82
82
  div {
83
83
  display: flex;
@@ -98,7 +98,7 @@ export class SquiCheckbox extends SquiBaseUIInput {
98
98
  align-items: center;
99
99
  justify-content: center;
100
100
  }
101
- .checkbox squi-icon {
101
+ .checkbox pd-icon {
102
102
  margin: .25rem;
103
103
  }
104
104
  .label {
@@ -145,16 +145,16 @@ export class SquiCheckbox extends SquiBaseUIInput {
145
145
  min-width: 2rem;
146
146
  background: none;
147
147
 
148
- --squi-icon-bg: transparent;
149
- --squi-icon-fill: var(--card-dark-red);
150
- --squi-icon-fill-hover: var(--squi-icon-fill);
151
- --squi-icon-fill-active: var(--card-medium-green);
148
+ --pd-icon-bg: transparent;
149
+ --pd-icon-fill: var(--card-dark-red);
150
+ --pd-icon-fill-hover: var(--pd-icon-fill);
151
+ --pd-icon-fill-active: var(--card-medium-green);
152
152
  }
153
- .readonly .isChecked.switch-paddle squi-icon {
153
+ .readonly .isChecked.switch-paddle pd-icon {
154
154
  transform: translate3d(0, 0, 0);
155
155
  left: 0.25rem;
156
156
  }
157
- .switch-paddle squi-icon {
157
+ .switch-paddle pd-icon {
158
158
  position: absolute;
159
159
  top: 0.25rem;
160
160
  left: 0.25rem;
@@ -168,7 +168,7 @@ export class SquiCheckbox extends SquiBaseUIInput {
168
168
  transition: all 0.25s ease-out;
169
169
  content: '';
170
170
  }
171
- .isChecked.switch-paddle squi-icon {
171
+ .isChecked.switch-paddle pd-icon {
172
172
  left: 2.25rem;
173
173
  }
174
174
 
@@ -211,7 +211,7 @@ export class SquiCheckbox extends SquiBaseUIInput {
211
211
  return html`<div @click="${this.onClick}" class="${classMap({'disabled': this.disabled, 'switch': this.isSwitch, 'readonly': this.readonly})}">
212
212
  <a href="#" @click="${this.linkClick}" @keypress="${this.onKeyPress}"
213
213
  class="${classMap({'switch-paddle': this.isSwitch, 'checkbox': !this.isSwitch, 'isChecked': checked, 'isUnchecked': !checked})}">
214
- <squi-icon icon="checkBox" class="${classMap({'switch': this.isSwitch, 'checkBox': !this.isSwitch})}" ?activeIcon="${checked}"></squi-icon>
214
+ <pd-icon icon="checkBox" class="${classMap({'switch': this.isSwitch, 'checkBox': !this.isSwitch})}" ?activeIcon="${checked}"></pd-icon>
215
215
  </a>
216
216
  ${this.hasInner
217
217
  ? html`<span class="label">
@@ -11,7 +11,7 @@ import {LitElement, html, css} from 'lit';
11
11
  * @slot - This element has a slot
12
12
  * @csspart button - The button
13
13
  */
14
- export class SquiFormContainer extends LitElement {
14
+ export class PdFormContainer extends LitElement {
15
15
 
16
16
  static get styles() {
17
17
  return css`
@@ -11,7 +11,7 @@ import {LitElement, html, css} from 'lit';
11
11
  * @slot - This element has a slot
12
12
  * @csspart button - The button
13
13
  */
14
- export class SquiFormRow extends LitElement {
14
+ export class PdFormRow extends LitElement {
15
15
 
16
16
  static get styles() {
17
17
  return css`
@@ -7,7 +7,7 @@ import { html, css } from 'lit';
7
7
  import { classMap } from 'lit/directives/class-map.js';
8
8
  import { SharedInputStyles } from './shared-input-styles.js';
9
9
 
10
- import { SquiBaseUIInput, INPUT_TYPE_TEXT } from './squi-base-ui-input.js';
10
+ import { PdBaseUIInput, INPUT_TYPE_TEXT } from './PdBaseUiInput.js';
11
11
 
12
12
  import '@progressive-development/pd-icon/pd-icon.js';
13
13
 
@@ -39,34 +39,34 @@ import '@progressive-development/pd-icon/pd-icon.js';
39
39
  *
40
40
  * The icon inside `squi-input` is hidden by default. To show it, set the attribute `icon-right` or `icon-left`.
41
41
  *
42
- * <squi-input icon-left></squi-input>
43
- * <squi-input icon-right></squi-input>
42
+ * <pd-input icon-left></pd-input>
43
+ * <pd-input icon-right></pd-input>
44
44
  *
45
- * <squi-input icon-left .icon="${'hardware:headset'}"></squi-input>
45
+ * <pd-input icon-left .icon="${'hardware:headset'}"></pd-input>
46
46
  *
47
47
  * Text can be left or right aligned. Default is left alignment.
48
48
  *
49
- * <squi-input text-right></squi-input>
50
- * <squi-input text-left></squi-input>
49
+ * <pd-input text-right></pd-input>
50
+ * <pd-input text-left></pd-input>
51
51
  */
52
- export class SquiInput extends SquiBaseUIInput {
52
+ export class PdInput extends PdBaseUIInput {
53
53
  /**
54
- * Fired when `squi-input` has focus and the user press `Enter` key.
54
+ * Fired when `pd-input` has focus and the user press `Enter` key.
55
55
  * @event enter-pressed
56
56
  */
57
57
 
58
58
  /**
59
- * Fired when `squi-input` has focus and the user press any key except `Enter`.
59
+ * Fired when `pd-input` has focus and the user press any key except `Enter`.
60
60
  * @event key-pressed
61
61
  */
62
62
 
63
63
  /**
64
- * Fire when the `squi-input` loses focus.
64
+ * Fire when the `pd-input` loses focus.
65
65
  * @event focus-lost
66
66
  */
67
67
 
68
68
  /**
69
- * Fire when the icon inside `squi-input` is clicked.
69
+ * Fire when the icon inside `pd-input` is clicked.
70
70
  * @event icon-clicked
71
71
  */
72
72
 
@@ -85,10 +85,10 @@ export class SquiInput extends SquiBaseUIInput {
85
85
  return {
86
86
  key: { type: String }, // Test, wird für das setzten der Error Msg benötigt
87
87
 
88
- /** Placeholder for `squi-input` initial text. */
88
+ /** Placeholder for `pd-input` initial text. */
89
89
  placeHolder: { type: String },
90
90
  /**
91
- * Icon to be shown inside `squi-input`.
91
+ * Icon to be shown inside `pd-input`.
92
92
  */
93
93
  icon: { type: String },
94
94
  secret: { type: Boolean }, // True for type password
@@ -110,10 +110,10 @@ export class SquiInput extends SquiBaseUIInput {
110
110
  return html`
111
111
  <label for="${this.id}Input">${this.label}</label>
112
112
  <div class="input ${classMap({ error: this.errorMsg.length > 0 })}">
113
- <squi-icon
113
+ <pd-icon
114
114
  icon="toggleCollapse"
115
115
  @click="${this._onIconClick}"
116
- ></squi-icon>
116
+ ></pd-icon>
117
117
  <input
118
118
  id="${this.id}Input"
119
119
  class="input-style ${this.gradient ? 'gradient' : ''}"
@@ -7,7 +7,7 @@ import { html, css } from 'lit';
7
7
  import { classMap } from 'lit/directives/class-map.js';
8
8
  import { SharedInputStyles } from './shared-input-styles.js';
9
9
 
10
- import { SquiBaseUIInput, INPUT_TYPE_AREA } from './squi-base-ui-input.js';
10
+ import { PdBaseUIInput, INPUT_TYPE_AREA } from './PdBaseUiInput.js';
11
11
 
12
12
 
13
13
  import '@progressive-development/pd-icon/pd-icon.js';
@@ -40,35 +40,35 @@ import '@progressive-development/pd-icon/pd-icon.js';
40
40
  *
41
41
  * The icon inside `squi-input` is hidden by default. To show it, set the attribute `icon-right` or `icon-left`.
42
42
  *
43
- * <squi-input icon-left></squi-input>
44
- * <squi-input icon-right></squi-input>
43
+ * <pd-input icon-left></pd-input>
44
+ * <pd-input icon-right></pd-input>
45
45
  *
46
- * <squi-input icon-left .icon="${'hardware:headset'}"></squi-input>
46
+ * <pd-input icon-left .icon="${'hardware:headset'}"></pd-input>
47
47
  *
48
48
  * Text can be left or right aligned. Default is left alignment.
49
49
  *
50
- * <squi-input text-right></squi-input>
51
- * <squi-input text-left></squi-input>
50
+ * <pd-input text-right></pd-input>
51
+ * <pd-input text-left></pd-input>
52
52
  */
53
- export class SquiInputArea extends SquiBaseUIInput {
53
+ export class PdInputArea extends PdBaseUIInput {
54
54
 
55
55
  /**
56
- * Fired when `squi-input-area` has focus and the user press `Enter` key.
56
+ * Fired when `pd-input-area` has focus and the user press `Enter` key.
57
57
  * @event enter-pressed
58
58
  */
59
59
 
60
60
  /**
61
- * Fired when `squi-input-area` has focus and the user press any key except `Enter`.
61
+ * Fired when `pd-input-area` has focus and the user press any key except `Enter`.
62
62
  * @event key-pressed
63
63
  */
64
64
 
65
65
  /**
66
- * Fire when the `squi-input-area` loses focus.
66
+ * Fire when the `pd-input-area` loses focus.
67
67
  * @event focus-lost
68
68
  */
69
69
 
70
70
  /**
71
- * Fire when the icon inside `squi-input-area` is clicked.
71
+ * Fire when the icon inside `pd-input-area` is clicked.
72
72
  * @event icon-clicked
73
73
  */
74
74
 
@@ -116,8 +116,8 @@ export class SquiInputArea extends SquiBaseUIInput {
116
116
  return html`
117
117
  <label for="${this.id}InputArea">${this.label}</label>
118
118
  <div class="input ${classMap({'error': this.errorMsg.length > 0})}">
119
- <squi-icon icon="toggleCollapse"
120
- @click="${this._onIconClick}"></squi-icon>
119
+ <pd-icon icon="toggleCollapse"
120
+ @click="${this._onIconClick}"></pd-icon>
121
121
  <textarea
122
122
  id="${this.id}InputArea"
123
123
  class="input-style ${this.gradient ? 'gradient' : ''}"
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
4
+ * This code may only be used under the BSD style license found at
5
+ * http://polymer.github.io/LICENSE.txt
6
+ * The complete set of authors may be found at
7
+ * http://polymer.github.io/AUTHORS.txt
8
+ * The complete set of contributors may be found at
9
+ * http://polymer.github.io/CONTRIBUTORS.txt
10
+ * Code distributed by Google as part of the polymer project is also
11
+ * subject to an additional IP rights grant found at
12
+ * http://polymer.github.io/PATENTS.txt
13
+ */
14
+
15
+ import {LitElement, html, css} from 'lit';
16
+
17
+ /**
18
+ * An example element.
19
+ *
20
+ * @slot - This element has a slot
21
+ * @csspart button - The button
22
+ */
23
+ export class PdLabelValue extends LitElement {
24
+
25
+ static get styles() {
26
+ return css`
27
+ :host {
28
+
29
+ --my-label-color: var(--squi-background-color, #24a3b9);
30
+ --my-label-font: var(--squi-background-color, #24a3b9);
31
+
32
+ --my-value-color: var(--squi-background-hover-color, #23636e);
33
+ --my-value-font: var(--squi-background-hover-color, #23636e);
34
+
35
+ display: block;
36
+ }
37
+
38
+ .container {
39
+
40
+ }
41
+
42
+ .label {
43
+
44
+ }
45
+
46
+ .value {
47
+
48
+ }
49
+
50
+ `;
51
+ }
52
+
53
+ static get properties() {
54
+ return {
55
+ label: {type: String},
56
+ value: {type: String}
57
+ };
58
+ }
59
+
60
+ constructor() {
61
+ super();
62
+ this.label = '';
63
+ this.value = '';
64
+ }
65
+
66
+ render() {
67
+ return html`
68
+ <div class="container">
69
+ <span class="label">${this.label}</span>
70
+ <span class="value">${this.value}</span>
71
+ </div>
72
+ `;
73
+ }
74
+
75
+ }
@@ -13,7 +13,7 @@ import { SharedInputStyles } from './shared-input-styles.js';
13
13
  * @slot - This element has a slot
14
14
  * @csspart button - The button
15
15
  */
16
- export class SquiRadioGroup extends LitElement {
16
+ export class PdRadioGroup extends LitElement {
17
17
 
18
18
  static get styles() {
19
19
  return [
@@ -52,7 +52,7 @@ export class SquiRadioGroup extends LitElement {
52
52
  }
53
53
 
54
54
  get value() {
55
- const elColl = this.getElementsByTagName('squi-checkbox');
55
+ const elColl = this.getElementsByTagName('pd-checkbox');
56
56
  let returnVal;
57
57
  Object.keys(elColl).forEach(keyValue => {
58
58
  if (elColl[keyValue].value === 'true') {
@@ -66,7 +66,7 @@ export class SquiRadioGroup extends LitElement {
66
66
 
67
67
  // add event listener
68
68
  this.addEventListener('checkbox-changed', (e) => {
69
- const elCollection = this.getElementsByTagName('squi-checkbox');
69
+ const elCollection = this.getElementsByTagName('pd-checkbox');
70
70
  Object.keys(elCollection).forEach(keyValue => {
71
71
  if (elCollection[keyValue] !== e.target) {
72
72
  elCollection[keyValue].value = false;
@@ -78,7 +78,7 @@ export class SquiRadioGroup extends LitElement {
78
78
  });
79
79
 
80
80
  // set default
81
- const elColl = this.getElementsByTagName('squi-checkbox');
81
+ const elColl = this.getElementsByTagName('pd-checkbox');
82
82
  Object.keys(elColl).forEach(keyValue => {
83
83
  elColl[keyValue].readonly = elColl[keyValue].value === 'true';
84
84
  });
@@ -7,7 +7,7 @@ import { html, css } from 'lit';
7
7
  import { classMap } from 'lit/directives/class-map.js';
8
8
  import { SharedInputStyles } from './shared-input-styles.js';
9
9
 
10
- import { SquiBaseUIInput, INPUT_TYPE_SELECT } from './squi-base-ui-input.js';
10
+ import { PdBaseUIInput, INPUT_TYPE_SELECT } from './PdBaseUiInput.js';
11
11
 
12
12
  import '@progressive-development/pd-icon/pd-icon.js';
13
13
 
@@ -39,17 +39,17 @@ import '@progressive-development/pd-icon/pd-icon.js';
39
39
  *
40
40
  * The icon inside `squi-input` is hidden by default. To show it, set the attribute `icon-right` or `icon-left`.
41
41
  *
42
- * <squi-input icon-left></squi-input>
43
- * <squi-input icon-right></squi-input>
42
+ * <pd-input icon-left></pd-input>
43
+ * <pd-input icon-right></pd-input>
44
44
  *
45
- * <squi-input icon-left .icon="${'hardware:headset'}"></squi-input>
45
+ * <pd-input icon-left .icon="${'hardware:headset'}"></pd-input>
46
46
  *
47
47
  * Text can be left or right aligned. Default is left alignment.
48
48
  *
49
- * <squi-input text-right></squi-input>
50
- * <squi-input text-left></squi-input>
49
+ * <pd-input text-right></pd-input>
50
+ * <pd-input text-left></pd-input>
51
51
  */
52
- export class SquiSelect extends SquiBaseUIInput {
52
+ export class PdSelect extends PdBaseUIInput {
53
53
  /**
54
54
  * Fired when `squi-input` has focus and the user press `Enter` key.
55
55
  * @event enter-pressed
@@ -202,10 +202,10 @@ export class SquiSelect extends SquiBaseUIInput {
202
202
  return html`
203
203
  <label for="${this.id}Select">${this.label}</label>
204
204
  <div class="input ${classMap({ error: this.errorMsg.length > 0 })}">
205
- <squi-icon
205
+ <pd-icon
206
206
  icon="toggleCollapse"
207
207
  @click="${this._onIconClick}"
208
- ></squi-icon>
208
+ ></pd-icon>
209
209
  <select
210
210
  id="${this.id}Input"
211
211
  class="select-css input-style ${this.gradient ? 'gradient' : ''}"
@@ -45,8 +45,8 @@ export const SharedInputStyles = css`
45
45
  .input {
46
46
  display: inline-block;
47
47
  /*position: relative; Prüfen: Wennd as an ist, felder über scroll-menu?*/
48
- /* squi-icon smaller than input */
49
- --squi-icon-computed-size: calc(var(--my-input-height) * 0.75); /* calc */
48
+ /* pd-icon smaller than input */
49
+ --pd-icon-computed-size: calc(var(--my-input-height) * 0.75); /* calc */
50
50
 
51
51
  /* Hack um eine Form Row (input mit Button => Booking) zu bekommen*/
52
52
  padding-top: var(--squi-input-padding, 0.5rem);
@@ -55,28 +55,28 @@ export const SharedInputStyles = css`
55
55
  color: var(--my-error-color);
56
56
  }
57
57
  /* squi icon depends on input styles to fit inside */
58
- squi-icon {
58
+ pd-icon {
59
59
  display: none;
60
60
  position: absolute;
61
- --squi-icon-height: var(--squi-icon-computed-size, 2rem);
62
- --squi-icon-width: var(--squi-icon-computed-size, 2rem);
63
- --squi-icon-fill-color: var(--squi-input-icon-fill-color, currentcolor);
64
- --squi-icon-stroke-color: var(--squi-input-icon-stroke-color, none);
61
+ --pd-icon-height: var(--pd-icon-computed-size, 2rem);
62
+ --pd-icon-width: var(--pd-icon-computed-size, 2rem);
63
+ --pd-icon-fill-color: var(--squi-input-icon-fill-color, currentcolor);
64
+ --pd-icon-stroke-color: var(--squi-input-icon-stroke-color, none);
65
65
  }
66
- squi-icon:hover {
66
+ pd-icon:hover {
67
67
  cursor: pointer;
68
68
  }
69
69
  /* Display icon if it's positioned */
70
- :host([icon-right]) .input squi-icon {
70
+ :host([icon-right]) .input pd-icon {
71
71
  display: inline-block;
72
72
  right: 0;
73
73
  }
74
- :host([icon-left]) .input squi-icon {
74
+ :host([icon-left]) .input pd-icon {
75
75
  display: inline-block;
76
76
  left: 0;
77
77
  }
78
78
 
79
- /* Padding space for squi-icon => Noch input spezifisch? */
79
+ /* Padding space for pd-icon => Noch input spezifisch? */
80
80
  :host([icon-right]) > input {
81
81
  padding-right: var(--my-input-height);
82
82
  }