@progressive-development/pd-forms 0.0.60 → 0.0.61

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/src/PdCheckbox.js CHANGED
@@ -1,291 +1,253 @@
1
+ /* eslint-disable lit-a11y/click-events-have-key-events */
1
2
  /**
2
3
  * @license
3
4
  * Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
4
5
  */
5
-
6
-
7
- // Änderungen an den Klassen aus node_modules übernommen, nicht deployed und verwendet => offen
8
-
9
6
  import { html, css } from "lit";
10
7
  import { classMap } from 'lit/directives/class-map.js';
11
8
 
12
- // import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
13
-
14
9
  import '@progressive-development/pd-icon';
15
- import { PdBaseUIInput, INPUT_TYPE_CHECK } from "./PdBaseUiInput.js";
16
10
 
11
+ import { PdBaseUIInput, INPUT_TYPE_CHECK } from "./PdBaseUiInput.js";
17
12
 
18
- // import { installMediaQueryWatcher } from 'pwa-helpers/media-query.js';
19
13
 
14
+ /**
15
+ * Lit Checkbox Element.
16
+ * Could displayed as switch (set isSwitch to true) or checkbox implementation.
17
+ *
18
+ * Styling is wrapped inside the checkbox element, which uses the styling properties from
19
+ * pd-icon (detailed).
20
+ *
21
+ ### Custom Properties: #######################################
22
+ # Style for checked checkbox: Default values #
23
+ ##############################################################
24
+ * --pd-cb-col unset, pd-icon default
25
+ * --pd-cb-col-hover unset, pd-icon default
26
+ * --pd-cb-bg-col unset, pd-icon default
27
+ * --pd-cb-stroke-col unset, pd-icon default
28
+ * --pd-cb-stroke-col-hover unset, pd-icon default
29
+ *
30
+ * Style for unchecked checkbox:
31
+ * --pd-cb-unset-col unset, pd-icon default
32
+ * --pd-cb-unset-col-hover unset, pd-icon default
33
+ * --pd-cb-unset-bg-col unset, pd-icon default
34
+ * --pd-cb-unset-stroke-col unset, pd-icon default
35
+ * --pd-cb-unset-stroke-col-hover unset, pd-icon default
36
+ *
37
+ * --pd-cb-border-col --pd-default-color
38
+ * --pd-cb-border-radius 4px (not border for rounded elements, cb specific)
39
+ * --pd-cb-font-col --pd-default-font-input-col
40
+ * --pd-default-font-input-family
41
+ * --pd-default-font-input-size
42
+ * --pd-cb-txt-col-readonly #4d4d4d
43
+ * --pd-cb-switch-height not set
44
+ * --pd-cb-switch-paddle-col --pd-default-color
45
+ *
46
+ */
20
47
  export class PdCheckbox extends PdBaseUIInput {
48
+
21
49
  static get properties() {
22
- return {
23
- hasInner: { type: Boolean },
24
- // _panX: {type: Number},
25
- // _panEnd: {type: Boolean},
26
- isSwitch: { type: Boolean }
50
+ return {
51
+ isSwitch: { type: Boolean },
52
+ _hasInner: { type: Boolean, state: true },
27
53
  };
28
54
  }
29
55
 
30
56
  constructor() {
31
57
  super();
32
58
  this._inputType = INPUT_TYPE_CHECK;
33
- // this._panEnd = false;
34
- // this._panX = 0;
35
59
  }
36
60
 
37
61
  static get styles() {
38
62
  return [
39
- // SharedInputStyles,
63
+ PdBaseUIInput.styles,
40
64
  css`
41
- :host {
42
-
43
- /*
44
- --my-icon-fill: var(--pd-app-light-background, #fefefe);
45
- --my-icon-active-fill: var(--pd-app-primary-color, #067394);
46
- --my-icon-inactive-fill: var(--pd-app-primary-color, darkgrey);
47
-
48
- --my-icon-bg-active-color: var(--app-primary-color, #fefefe);
49
-
50
- --my-bg-color: var(--squi-bg-color, #177E89);
51
- --my-txt-color: var(--squi-bg-color, black);
52
-
53
- --my-font: var(--squi-font-2, Montserrat);
54
-
55
- ref copy from shared styles...*
56
- --my-error-color: var(--squi-error-color, #d6242d);
57
- --my-error-background-color: var(--squi-error-background-color, #f6d4d4a1);
58
- --my-border-radius: var(--squi-border-radius, 0rem);
59
-
60
-
61
-
62
- * TODO vars used in pd-icon *
63
- --squi-checkbox-checked-color: var(--my-primary);
64
- --squi-checkbox-unchecked-color: var(--my-ligth);
65
- --squi-checkbox-bg: var(--my-dark);
66
- --squi-checkbox-unchecked-bg: var(--my-dark);
67
- --squi-checkbox-label-color: var(--my-primary);
68
-
69
- --squi-checkbox-label-disabled-color: var(--app-copy-color, #303030);
70
-
71
- * Checkbox pd-icon
72
- --pd-icon-fill: red;
73
- --pd-icon-bg: red;
74
- --pd-icon-fill-active: var(--my-icon-bg-active-color);
75
- --pd-icon-bg-active: var(--my-icon-active-fill);
76
- */
65
+ :host {
66
+ display: inline-block;
77
67
 
78
- --pd-icon-fill-active: var(--pd-app-primary-col, #067394);
79
- --pd-icon-fill: var(--pd-checkbox-inactive-col, darkgrey);
80
- --pd-icon-bg: var(--pd-checkbox-bg-col, #fefefe);
68
+ /* Style for active checkbox => use defaults from pd-icon if no custom properties set */
69
+ --pd-icon-col-active: var(--pd-cb-col);
70
+ --pd-icon-col-active-hover: var(--pd-cb-col-hover);
71
+ --pd-icon-bg-col-active: var(--pd-cb-bg-col);
72
+ --pd-icon-stroke-col-active: var(--pd-cb-stroke-col);
73
+ --pd-icon-stroke-col-active-hover: var(--pd-cb-stroke-col-hover);
81
74
 
82
- display: inline-block;
83
- font-size: .8rem;
75
+ /* Style for inactive checkbox */
76
+ --pd-icon-col: var(--pd-cb-unset-col);
77
+ --pd-icon-col-hover: var(--pd-cb-unset-col-hover);
78
+ --pd-icon-bg-col: var(--pd-cb-unset-bg-col);
79
+ --pd-icon-stroke-col: var(--pd-cb-unset-stroke-col);
80
+ --pd-icon-stroke-col-hover: var(--pd-cb-unset-stroke-col-hover);
84
81
  }
85
- /* Switch pd-icon */
86
- :host([isSwitch]) {
87
- --pd-icon-fill-active: var(--my-icon-active-fill);
88
- --pd-icon-fill: var(--my-icon-fill);
89
- --pd-icon-bg: var(--my-icon-bg-color);
90
- --pd-icon-bg-active: var(--my-icon-bg-active-color);
82
+
83
+ /* Switch pd-icon => Prüfen, bei mir musste ich reflect setzten, wird das verwendet? */
84
+ :host([isSwitch]) {
85
+ /* derzeit keine Angaben */
91
86
  }
92
- div {
87
+
88
+ .div-container {
93
89
  display: flex;
94
90
  align-items: center;
95
91
  cursor: pointer;
96
92
  }
97
- div.disabled {
93
+
94
+ .div-container.disabled {
98
95
  opacity: 0.5;
99
96
  cursor: auto;
100
97
  }
101
- div.readonly {
98
+
99
+ .div-container.readonly {
102
100
  cursor: auto;
103
101
  }
102
+
103
+ /*
104
+ * Class checkbox for icon and a element (checkbox case)
105
+ */
104
106
  .checkbox {
105
107
  display: flex;
106
108
  border-radius: 4px;
107
109
  line-height: 0;
108
110
  align-items: center;
109
111
  justify-content: center;
110
- }
112
+ /*
113
+ Wurde das hier für Border verwendet? Aktuell border in folgendem Element gesetzt
114
+ background-color: var(--pd-cb-border-col, var(--pd-primary-col, #067394));
115
+ */
116
+
117
+ }
118
+
111
119
  .checkbox pd-icon {
112
- margin: .25rem;
120
+ margin-right: .2rem;
121
+ margin-bottom: .2rem;
122
+ border: 2px solid var(--pd-cb-border-col, var(--pd-default-color));;
123
+ border-radius: var(--pd-cb-border-radius, 4px);
113
124
  }
125
+
114
126
  .label {
115
- margin-left: .5rem;
116
- color: var(--squi-text-lable-color);
117
- font-family: var(--pd-input-lable-font);
127
+ margin-left: .5rem;
128
+ color: var(--pd-cb-font-col, var(--pd-default-font-input-col));
129
+ font-family: var(--pd-default-font-input-family);
118
130
  text-align: left;
119
- font-size: 0.9rem;
120
- }
121
- .disabled .label {
122
- color: var(--squi-checkbox-label-disabled-color, #6e6c6c);
131
+ font-size: var(--pd-default-font-input-size);
123
132
  }
133
+
124
134
  .readonly .label {
125
- color: var(--app-copy-color, var(--squi-checkbox-label-color, #303030));
135
+ color: var(--pd-cb-txt-col-readonly, #4d4d4d);
126
136
  }
137
+
127
138
  /* Switch styles */
128
139
  .switch {
129
- height: var(--my-input-height); /* noch ohne effekt?*/
140
+ height: var(--pd-cb-switch-height);
130
141
  position: relative;
131
142
  outline: 0;
132
143
  -webkit-user-select: none;
133
144
  -moz-user-select: none;
134
145
  -ms-user-select: none;
135
146
  user-select: none;
136
- }
137
- .switch-paddle {
138
- display: inline-block;
139
- vertical-align: baseline;
140
- margin: 0;
141
- position: relative;
142
- min-width: 4rem;
143
- max-width: 4rem;
144
- height: 2rem;
145
- border-radius: 0;
146
- background: var(--my-bg-color);
147
- font-weight: inherit;
148
- color: inherit;
149
- cursor: pointer;
150
- }
151
- .disabled .switch-paddle {
152
- cursor: auto;
153
- }
154
- .readonly .switch-paddle {
155
- cursor: auto;
156
- max-width: 2rem;
157
- min-width: 2rem;
158
- background: none;
147
+ }
159
148
 
160
- /* Prüfen TODO
161
- --pd-icon-bg: transparent;
162
- --pd-icon-fill: var(--card-dark-red);
163
- --pd-icon-fill-hover: var(--pd-icon-fill);
164
- --pd-icon-fill-active: var(--card-medium-green);
165
- */
166
- }
167
- .readonly .isChecked.switch-paddle pd-icon {
168
- transform: translate3d(0, 0, 0);
169
- left: 0.25rem;
170
- }
171
- .switch-paddle pd-icon {
172
- position: absolute;
173
- top: 0.25rem;
174
- left: 0.25rem;
175
- display: block;
176
- width: 1.5rem;
177
- height: 1.5rem;
178
- -webkit-transform: translate3d(0, 0, 0);
179
- transform: translate3d(0, 0, 0);
180
- border-radius: 3px;
181
- -webkit-transition: all 0.25s ease-out;
182
- transition: all 0.25s ease-out;
183
- content: '';
184
- }
185
- .isChecked.switch-paddle pd-icon {
186
- left: 2.25rem;
187
- }
149
+ .switch-paddle {
150
+ display: inline-block;
151
+ vertical-align: baseline;
152
+ margin: 0;
153
+ position: relative;
154
+ min-width: 4rem;
155
+ max-width: 4rem;
156
+ height: 2rem;
157
+ border-radius: 0;
158
+ background: var(--pd-cb-switch-paddle-col, var(--pd-default-color));
159
+ font-weight: inherit;
160
+ color: inherit;
161
+ cursor: pointer;
162
+ }
188
163
 
189
- /* Copy from SharedINputStyles, not used for select => ref, or exclude error styles and reuse oder something... */
190
- .error-box {
191
- display: block;
192
- color: var(--my-error-color);
193
- background: var(--my-error-background-color);
194
- border: 1px solid var(--my-error-color);
195
- border-radius: var(--my-border-radius);
196
- }
164
+ .switch-paddle pd-icon {
165
+ position: absolute;
166
+ top: 0;
167
+ left: 0;
168
+ display: block;
169
+ width: 1.5rem;
170
+ height: 1.5rem;
171
+ -webkit-transform: translate3d(0, 0, 0);
172
+ transform: translate3d(0, 0, 0);
173
+ border: 2px solid var(--pd-cb-border-col, var(--pd-default-color));
174
+ box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
175
+ border-radius: var(--pd-cb-border-radius, 4px);
176
+ -webkit-transition: all 0.25s ease-out;
177
+ transition: all 0.25s ease-out;
178
+ content: '';
179
+ }
197
180
 
198
- /* Error Msg Div for input, select, area */
199
- .error-msg {
200
- padding:0.25rem;
201
- white-space: nowrap;
202
- font-size: .8rem;
203
- max-width: var(--squi-input-width, 250px);
204
- }
181
+ .disabled .switch-paddle {
182
+ cursor: auto;
183
+ }
184
+
185
+ .readonly .switch-paddle {
186
+ cursor: auto;
187
+ max-width: 2rem;
188
+ min-width: 2rem;
189
+ background: none;
190
+
191
+ /* Prüfen TODO
192
+ --pd-icon-bg: transparent;
193
+ --pd-icon-fill: var(--card-dark-red);
194
+ --pd-icon-fill-hover: var(--pd-icon-fill);
195
+ --pd-icon-fill-active: var(--card-medium-green);
196
+ */
197
+ }
198
+
199
+ .readonly .isChecked.switch-paddle pd-icon {
200
+ transform: translate3d(0, 0, 0);
201
+ left: 0.25rem;
202
+ }
203
+
204
+ .isChecked.switch-paddle pd-icon {
205
+ left: 2.25rem;
206
+ }
205
207
 
206
- @media (min-width: 580px) {
207
- :host {
208
- font-size: 1rem;
209
- }
210
- }
208
+ @media (min-width: 580px) {
209
+ :host {
210
+ font-size: 1rem;
211
+ }
212
+ }
211
213
  `];
212
214
  }
213
215
 
214
216
  firstUpdated() {
215
- this.hasInner = !!this.innerHTML.trim().length;
216
- // installMediaQueryWatcher(`(min-width: 780px)`, (matches) => matches ? this : this._updateScale(1.5));
217
- // const paddle = el.shadowRoot.querySelectorAll('.switch-paddle');
218
- // this.isSwitch ? Gestures.addListener(this, 'track', this.handleTrack.bind(this)) : '';
217
+ this._hasInner = !!this.innerHTML.trim().length;
219
218
  }
220
219
 
221
220
  render() {
222
221
  const checked = (this.value === 'true');
223
-
224
- // eslint-disable-next-line lit-a11y/click-events-have-key-events
225
- return html`<div @click="${this.onClick}" class="${classMap({'disabled': this.disabled, 'switch': this.isSwitch, 'readonly': this.readonly})}">
226
- <a href="#" @click="${this.linkClick}" @keypress="${this.onKeyPress}"
227
- class="${classMap({'switch-paddle': this.isSwitch, 'checkbox': !this.isSwitch, 'isChecked': checked, 'isUnchecked': !checked})}">
228
- <pd-icon icon="checkBox" class="${classMap({'switch': this.isSwitch, 'checkBox': !this.isSwitch})}" ?activeIcon="${checked}"></pd-icon>
222
+ const classMapVal = {'disabled': this.disabled, 'switch': this.isSwitch, 'readonly': this.readonly, 'div-container': true};
223
+ const aClassMap = {'switch-paddle': this.isSwitch, 'checkbox': !this.isSwitch, 'isChecked': checked, 'isUnchecked': !checked};
224
+
225
+ return html`
226
+ <div @click="${this.onClick}" class="${classMap(classMapVal)}">
227
+ <a href="#" @click="${this.linkClick}" @keypress="${this.onKeyPress}" class="${classMap(aClassMap)}">
228
+ <pd-icon icon="checkBox" class="small" ?activeIcon="${checked}"></pd-icon>
229
229
  </a>
230
- ${this.hasInner
231
- ? html`<span class="label">
232
- <slot></slot>
233
- </span>`
234
- : ""}
230
+ ${this._hasInner ? html`
231
+ <span class="label">
232
+ <slot></slot>
233
+ </span>` : ""}
235
234
  </div>
236
- ${this.errorMsg.length > 0 ? html`
237
- <div class="error-box error">
238
- <span class="error-msg">${this.errorMsg}</span>
239
- </div>
240
- ` : ''}
235
+ ${this._renderErrorMsg()}
241
236
  `;
242
237
  }
243
238
 
244
- /*
245
- update(changedProperties) {
246
- //let { deltaX = 0, isFinal = false } = this._panX;
247
- let isFinal = this._panEnd;
248
- let deltaX = this._panX || 0;
249
- //console.log(this._panData);
250
-
251
- // Guard against an infinite loop by looking for index.
252
- if (isFinal) {
253
- console.log('deltaX', deltaX);
254
- // TODO 250 half screen size?
255
- if ( deltaX > 100) {
256
- this.onClick(true);
257
- } else if(deltaX < -100){
258
- this.onClick(false);
259
- }
260
- this._panEnd = false;
261
- }
262
- // We don't want the latent deltaX when releasing a pan.
263
- deltaX = (isFinal ? 0 : deltaX);
264
-
265
- super.update(changedProperties);
266
- }
267
-
268
- handleTrack(e) {
269
- switch(e.detail.state) {
270
- case 'start':
271
- //this.message = 'Tracking started!';
272
- break;
273
- case 'track':
274
- //this.message = 'Tracking in progress... ' + e.detail.x + ', ' + e.detail.y;
275
- break;
276
- case 'end':
277
- this._panX = e.detail.dx;
278
- this._panEnd = true;
279
- break;
280
- }
281
- }
282
- */
283
- onClick() {
239
+ onClick(e) {
284
240
  if (this.disabled || this.readonly) {
285
241
  return;
286
242
  }
287
- const checked = (this.value === 'true');
288
- this.value = checked ? 'false' : 'true';
243
+ const checked = (this.value === 'true');
244
+
245
+ // set changed value and generate events (key-pressed, enter-pressed, validateForm)
246
+ // if neccessary
247
+ this._handleChangedValue(checked ? 'false' : 'true', e);
248
+
249
+ // TODO: Idee, alle input elemente haben gleichen event!
250
+ /*
289
251
  this.dispatchEvent(
290
252
  new CustomEvent("checkbox-changed", {
291
253
  bubbles: true,
@@ -293,12 +255,13 @@ export class PdCheckbox extends PdBaseUIInput {
293
255
  detail: {check: !checked, name: this.valueName},
294
256
  })
295
257
  );
258
+ */
296
259
  }
297
260
 
298
- onKeyPress(e) {
261
+ onKeyPress(e) {
299
262
  e.preventDefault();
300
263
  if (e.keyCode === 32 || e.code === "Space") {
301
- this.onClick();
264
+ this.onClick(e);
302
265
  }
303
266
  }
304
267
 
@@ -1,6 +1,12 @@
1
1
  /**
2
2
  * @license
3
3
  * Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
4
+ *
5
+ * Lit element container for pd input elements.
6
+ *
7
+ * Used to:
8
+ * - Automatically validation of form content
9
+ * - Success/NotReady information for form-container
4
10
  */
5
11
 
6
12
  import { html, css } from 'lit';
@@ -17,42 +23,44 @@ import { PdBaseUI } from './PdBaseUi.js';
17
23
  export class PdFormContainer extends PdBaseUI {
18
24
 
19
25
  static get styles() {
20
- return css`
21
- :host {
22
- display: flex;
23
- flex-direction: column;
24
- align-items: left;
26
+ return [
27
+ PdBaseUI.styles,
28
+ css`
29
+ :host {
30
+ display: flex;
31
+ flex-direction: column;
32
+ align-items: left;
25
33
  gap: 20px;
26
34
  }
27
- .hinweis {
28
- font-family: var(--pd-font-content);
29
- font-size:0.95rem;
30
-
31
- padding:10px;
35
+
36
+ .validation-info {
37
+ font-family: var(--pd-default-font-content-family);
38
+ font-size: var(--pd-form-info-font-size, 0.8rem);
39
+ padding: 10px;
32
40
  color:#58585a;
33
- border-radius: var(--squi-border-radius, 0);
34
- -moz-border-radius: var(--squi-border-radius, 0);
35
- width:50%;
41
+ border-radius: var(--pd-border-radius, 0);
42
+ -moz-border-radius: var(--pd-border-radius, 0);
43
+ width:40%;
36
44
  min-width:300px;
37
45
  }
38
46
 
39
- .filled {
40
- border-left:4px solid #42a01c;
41
- border-right:4px solid #42a01c;
42
- border-top:1px solid #42a01c;
43
- border-bottom:1px solid #42a01c;
44
- background-color:#f5ffe8;
47
+ .filled {
48
+ border-left: 4px solid var(--pd-form-filled-col, var(--pd-default-success-color));
49
+ border-right: 4px solid var(--pd-form-filled-col, var(--pd-default-success-color));
50
+ border-top: 1px solid var(--pd-form-filled-col, var(--pd-default-success-color));
51
+ border-bottom: 1px solid var(--pd-form-filled-col, var(--pd-default-success-color));
52
+ background-color: var(--pd-form-suc-bg-col, #f5ffe8);
45
53
  }
46
54
 
47
- .unfilled {
48
- border-left:4px solid #cc2029;
49
- border-right:4px solid #cc2029;
50
- border-top:1px solid #cc2029;
51
- border-bottom:1px solid #cc2029;
52
- background-color:#ffe8e8;
55
+ .unfilled {
56
+ border-left: 4px solid var(--pd-form-err-col, var(--pd-default-error-color));
57
+ border-right: 4px solid var(--pd-form-err-col, var(--pd-default-error-color));
58
+ border-top: 1px solid var(--pd-form-err-col, var(--pd-default-error-color));
59
+ border-bottom: 1px solid var(--pd-form-err-col, var(--pd-default-error-color));
60
+ background-color: var(--pd-form-er-bg-col, #ffe8e8);
53
61
  }
54
62
 
55
- `;
63
+ `];
56
64
  }
57
65
 
58
66
  static get properties() {
@@ -72,33 +80,32 @@ export class PdFormContainer extends PdBaseUI {
72
80
  <form>
73
81
  <slot></slot>
74
82
  ${this.requiredFieldInfo ? html`
75
- <p class="hinweis ${this._requiredFieldsValid ? 'filled' : 'unfilled'}">
83
+ <p class="validation-info ${this._requiredFieldsValid ? 'filled' : 'unfilled'}">
76
84
  ${msg('* Pflichtfeld',{desc: '#pd.form.required.info#'})}
77
85
  </p>` : ''}
78
86
  <br />
79
- </form>
87
+ </form>
80
88
  `;
81
89
  }
82
90
 
83
- _validateForm(e) {
91
+ _validateForm(e) {
84
92
 
85
93
  const reqEl = this.querySelectorAll("[required]");
86
94
 
87
95
  // validate required fields TODO: Auf PdInputxxx beschränken
88
96
  reqEl.forEach(el => {
89
97
  const tmpEl = el;
90
- if (!el.value || el.value === "") {
98
+
99
+ if (!el.value || el.value === "" || el.value === "false") {
91
100
  const erMsg = el.requiredMsg || msg('Eingabe erforderlich',{desc: '#pd.form.field.required#'});
92
101
  if (!e.detail.singleElement || e.detail.singleElement === el) {
93
102
  tmpEl.errorMsg = erMsg;
94
103
  }
95
104
  e.detail.errorMap.set(el.id, erMsg);
96
- } else {
97
- if (!e.detail.singleElement || e.detail.singleElement === el) {
105
+ } else if (!e.detail.singleElement || e.detail.singleElement === el) {
98
106
  tmpEl.errorMsg = "";
99
- }
100
107
  }
101
- })
108
+ });
102
109
 
103
110
  this._requiredFieldsValid = e.detail.errorMap.size === 0;
104
111
 
package/src/PdFormRow.js CHANGED
@@ -30,37 +30,46 @@ export class PdFormRow extends PdBaseUI {
30
30
  max-width: 100%;
31
31
  gap: var(--my-gap);
32
32
  align-items: flex-start;
33
- padding-top: var(--row-padding-top, 0px);
33
+ padding-top: var(--pd-form-row-padding-top, 10px);
34
34
  }
35
35
 
36
36
  ::slotted(.full-size) {
37
- --squi-input-width: 100%;
37
+ --pd-input-field-width: 100%;
38
38
  }
39
39
 
40
40
  ::slotted(.quarter1) {
41
- --squi-input-width: calc(var(--my-row-width) * 0.25 - (var(--my-gap) * 0.75));
41
+ --pd-input-field-width: calc(var(--my-row-width) * 0.25 - (var(--my-gap) * 0.75));
42
42
 
43
- }
43
+ }
44
+
45
+ ::slotted(.quarter1-area) {
46
+ --pd-input-field-width: calc((var(--my-row-width) - 5px) * 0.25 - (var(--my-gap) * 0.75));
47
+
48
+ }
44
49
 
45
50
  ::slotted(.quarter2) {
46
- --squi-input-width: calc((var(--my-row-width) * 0.5) - (var(--my-gap) / 2));
51
+ --pd-input-field-width: calc((var(--my-row-width) * 0.5) - (var(--my-gap) / 2));
47
52
 
48
- }
53
+ }
54
+
55
+ ::slotted(.quarter2-area) {
56
+ --pd-input-field-width: calc(((var(--my-row-width) - 8px) * 0.5) - (var(--my-gap) / 2));
57
+ }
49
58
 
50
59
  ::slotted(.quarter3) {
51
- --squi-input-width: calc(var(--my-row-width) * 0.75 - (var(--my-gap) * 0.25));
60
+ --pd-input-field-width: calc(var(--my-row-width) * 0.75 - (var(--my-gap) * 0.25));
52
61
  }
53
62
  /* Area is longer? Scrollbar? */
54
63
  ::slotted(.quarter3-area) {
55
- --squi-input-width-area: calc((var(--my-row-width) - 22px) * 0.75 - (var(--my-gap) * 0.25));
64
+ --pd-input-field-width: calc((var(--my-row-width) - 10px) * 0.75 - (var(--my-gap) * 0.25));
56
65
  }
57
66
 
58
67
  ::slotted(.quarter4) {
59
- --squi-input-width: var(--my-row-width);
68
+ --pd-input-field-width: var(--my-row-width);
60
69
  }
61
70
  /* Area is longer? Scrollbar? */
62
71
  ::slotted(.quarter4-area) {
63
- --squi-input-width-area: calc(var(--my-row-width) - 22px);
72
+ --pd-input-field-width: calc(var(--my-row-width) - 5px);
64
73
  }
65
74
 
66
75
  @media (max-width: 930px) {
@@ -84,12 +93,6 @@ export class PdFormRow extends PdBaseUI {
84
93
  `;
85
94
  }
86
95
 
87
- static get properties() {
88
- return {
89
- // not needed at the moment
90
- };
91
- }
92
-
93
96
  render() {
94
97
  return html`
95
98
  <slot></slot>