@shoper/phoenix_design_system 1.2.7 → 1.2.8
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/build/cjs/packages/phoenix/src/components/form/file_picker/file/file.js +0 -1
- package/build/cjs/packages/phoenix/src/components/form/file_picker/file/file.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_input.js +60 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/display_input.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js +96 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +24 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js +39 -0
- package/build/cjs/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js.map +1 -0
- package/build/cjs/packages/phoenix/src/index.js +21 -0
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file/file.js +0 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file/file.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_input.d.ts +10 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_input.js +58 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/display_input.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.d.ts +19 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js +94 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.d.ts +14 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js +17 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_types.d.ts +6 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_types.js +3 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_types.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/stepper_action_button.d.ts +8 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js +37 -0
- package/build/esm/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js.map +1 -0
- package/build/esm/packages/phoenix/src/index.d.ts +3 -0
- package/build/esm/packages/phoenix/src/index.js +3 -0
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,6 @@ exports.HFile = class HFile extends phoenix_light_lit_element.PhoenixLightLitEle
|
|
|
35
35
|
class="${file_picker_constants.FILE_ITEM_CSS_CLASSES.fileRemoveButton}"
|
|
36
36
|
@click="${this._handleClick}"
|
|
37
37
|
aria-label="${this.removeButtonText} ${this.name}"
|
|
38
|
-
type="button"
|
|
39
38
|
>
|
|
40
39
|
${this.removeButtonIconName
|
|
41
40
|
? lit.html `<h-icon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,kDAAsD;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var lit = require('lit');
|
|
7
|
+
var decorators = require('lit/decorators');
|
|
8
|
+
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
|
+
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
10
|
+
var ref_js = require('lit-html/directives/ref.js');
|
|
11
|
+
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
12
|
+
|
|
13
|
+
exports.HDisplayInput = class HDisplayInput extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.controlId = '';
|
|
17
|
+
this.inputRef = ref_js.createRef();
|
|
18
|
+
this._testDispatchValueChanged = () => {
|
|
19
|
+
var _a;
|
|
20
|
+
const valueChangeEvent = new CustomEvent(input_stepper_constants.DISPLAY_INPUT_EVENT_NAMES.change, {
|
|
21
|
+
bubbles: true,
|
|
22
|
+
detail: {
|
|
23
|
+
value: (_a = this.inputRef.value) === null || _a === void 0 ? void 0 : _a.value
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
this.dispatchEvent(valueChangeEvent);
|
|
27
|
+
if (this.inputRef.value) {
|
|
28
|
+
this.inputRef.value.value = this.value;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
_setInputBehavior(event) {
|
|
33
|
+
const input = event.target;
|
|
34
|
+
input.focus();
|
|
35
|
+
input.select();
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return lit.html `<input
|
|
39
|
+
id="${this.controlId}"
|
|
40
|
+
class="${input_stepper_constants.INPUT_STEPPER_CLASS_NAMES.displayInput}"
|
|
41
|
+
type="number"
|
|
42
|
+
${ref_js.ref(this.inputRef)}
|
|
43
|
+
.value="${this.value}"
|
|
44
|
+
@input=${this._testDispatchValueChanged}
|
|
45
|
+
@click=${this._setInputBehavior}
|
|
46
|
+
/>`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
tslib_es6.__decorate([
|
|
50
|
+
decorators.property({ type: String, attribute: 'value', reflect: true }),
|
|
51
|
+
tslib_es6.__metadata("design:type", String)
|
|
52
|
+
], exports.HDisplayInput.prototype, "value", void 0);
|
|
53
|
+
tslib_es6.__decorate([
|
|
54
|
+
decorators.property({ type: Number, attribute: 'control-id', reflect: true }),
|
|
55
|
+
tslib_es6.__metadata("design:type", String)
|
|
56
|
+
], exports.HDisplayInput.prototype, "controlId", void 0);
|
|
57
|
+
exports.HDisplayInput = tslib_es6.__decorate([
|
|
58
|
+
phoenix_custom_element.phoenixCustomElement('h-display-input')
|
|
59
|
+
], exports.HDisplayInput);
|
|
60
|
+
//# sourceMappingURL=display_input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
require('lit');
|
|
7
|
+
var decorators = require('lit/decorators');
|
|
8
|
+
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
|
+
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
10
|
+
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
11
|
+
|
|
12
|
+
exports.HInputStepper = class HInputStepper extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.step = 1;
|
|
16
|
+
this.min = -Infinity;
|
|
17
|
+
this.max = Infinity;
|
|
18
|
+
this._handleInputChange = (event) => {
|
|
19
|
+
var _a;
|
|
20
|
+
((_a = event.target) === null || _a === void 0 ? void 0 : _a.action) === input_stepper_constants.INPUT_STEPPER_ACTION_TYPES.increment ? this._increment() : this._decrement();
|
|
21
|
+
};
|
|
22
|
+
this._handleDisplayChange = (event) => {
|
|
23
|
+
if (event.detail.value > this.max)
|
|
24
|
+
return;
|
|
25
|
+
this._value = Number(event.detail.value);
|
|
26
|
+
};
|
|
27
|
+
this._handleUpdateValue = () => {
|
|
28
|
+
this._value = Number(this._$inputElement.value) || 0;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
connectedCallback() {
|
|
32
|
+
super.connectedCallback();
|
|
33
|
+
const $element = this.querySelector('h-display-input');
|
|
34
|
+
if (!$element) {
|
|
35
|
+
throw new Error();
|
|
36
|
+
}
|
|
37
|
+
this._$inputElement = $element;
|
|
38
|
+
this._value = Number($element.value) || 0;
|
|
39
|
+
this._setupEvents();
|
|
40
|
+
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
super.disconnectedCallback();
|
|
43
|
+
this._$inputElement.removeEventListener('input', this._handleUpdateValue);
|
|
44
|
+
}
|
|
45
|
+
updated(changedProperties) {
|
|
46
|
+
super.updated(changedProperties);
|
|
47
|
+
if (changedProperties.has('_value')) {
|
|
48
|
+
this._dispatchValueChanged();
|
|
49
|
+
this._$inputElement.value = String(this._value);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
_setupEvents() {
|
|
53
|
+
this.addEventListener(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.change, this._handleInputChange);
|
|
54
|
+
this.addEventListener(input_stepper_constants.DISPLAY_INPUT_EVENT_NAMES.change, this._handleDisplayChange);
|
|
55
|
+
this._$inputElement.addEventListener('input', this._handleUpdateValue);
|
|
56
|
+
}
|
|
57
|
+
_increment() {
|
|
58
|
+
if (this._value >= this.max)
|
|
59
|
+
return;
|
|
60
|
+
this._value += this.step;
|
|
61
|
+
}
|
|
62
|
+
_decrement() {
|
|
63
|
+
if (this._value <= this.min)
|
|
64
|
+
return;
|
|
65
|
+
this._value -= this.step;
|
|
66
|
+
}
|
|
67
|
+
_dispatchValueChanged() {
|
|
68
|
+
const valueChangeEvent = new CustomEvent(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.valueChanged, {
|
|
69
|
+
bubbles: true,
|
|
70
|
+
detail: {
|
|
71
|
+
value: this._value
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
this.dispatchEvent(valueChangeEvent);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
tslib_es6.__decorate([
|
|
78
|
+
decorators.property({ type: Number, attribute: 'step', reflect: true }),
|
|
79
|
+
tslib_es6.__metadata("design:type", Number)
|
|
80
|
+
], exports.HInputStepper.prototype, "step", void 0);
|
|
81
|
+
tslib_es6.__decorate([
|
|
82
|
+
decorators.property({ type: Number, attribute: 'min', reflect: true }),
|
|
83
|
+
tslib_es6.__metadata("design:type", Number)
|
|
84
|
+
], exports.HInputStepper.prototype, "min", void 0);
|
|
85
|
+
tslib_es6.__decorate([
|
|
86
|
+
decorators.property({ type: Number, attribute: 'max', reflect: true }),
|
|
87
|
+
tslib_es6.__metadata("design:type", Number)
|
|
88
|
+
], exports.HInputStepper.prototype, "max", void 0);
|
|
89
|
+
tslib_es6.__decorate([
|
|
90
|
+
decorators.state(),
|
|
91
|
+
tslib_es6.__metadata("design:type", Number)
|
|
92
|
+
], exports.HInputStepper.prototype, "_value", void 0);
|
|
93
|
+
exports.HInputStepper = tslib_es6.__decorate([
|
|
94
|
+
phoenix_custom_element.phoenixCustomElement('h-input-stepper')
|
|
95
|
+
], exports.HInputStepper);
|
|
96
|
+
//# sourceMappingURL=input_stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const INPUT_STEPPER_EVENT_NAMES = {
|
|
6
|
+
change: 'inputStepper.change',
|
|
7
|
+
valueChanged: 'inputStepper.valueChanged'
|
|
8
|
+
};
|
|
9
|
+
const DISPLAY_INPUT_EVENT_NAMES = {
|
|
10
|
+
change: 'displayInput.change'
|
|
11
|
+
};
|
|
12
|
+
const INPUT_STEPPER_ACTION_TYPES = {
|
|
13
|
+
increment: 'increment',
|
|
14
|
+
decrement: 'decrement'
|
|
15
|
+
};
|
|
16
|
+
const INPUT_STEPPER_CLASS_NAMES = {
|
|
17
|
+
displayInput: 'input-stepper__value_input'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.DISPLAY_INPUT_EVENT_NAMES = DISPLAY_INPUT_EVENT_NAMES;
|
|
21
|
+
exports.INPUT_STEPPER_ACTION_TYPES = INPUT_STEPPER_ACTION_TYPES;
|
|
22
|
+
exports.INPUT_STEPPER_CLASS_NAMES = INPUT_STEPPER_CLASS_NAMES;
|
|
23
|
+
exports.INPUT_STEPPER_EVENT_NAMES = INPUT_STEPPER_EVENT_NAMES;
|
|
24
|
+
//# sourceMappingURL=input_stepper_constants.js.map
|
package/build/cjs/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
|
+
var decorators = require('lit/decorators');
|
|
7
|
+
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
|
+
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
|
+
var btn_controller = require('../../../controllers/btn_controller/btn_controller.js');
|
|
10
|
+
var input_stepper_constants = require('./input_stepper_constants.js');
|
|
11
|
+
|
|
12
|
+
exports.HStepperActionButton = class HStepperActionButton extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this._dispatchChangeEvent = () => {
|
|
16
|
+
const unitaryValueChangeEvent = new CustomEvent(input_stepper_constants.INPUT_STEPPER_EVENT_NAMES.change, {
|
|
17
|
+
bubbles: true,
|
|
18
|
+
detail: {
|
|
19
|
+
action: this.action
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
this.dispatchEvent(unitaryValueChangeEvent);
|
|
23
|
+
};
|
|
24
|
+
new btn_controller.BtnController(this, this._dispatchChangeEvent);
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
super.connectedCallback();
|
|
28
|
+
this.addEventListener('click', this._dispatchChangeEvent);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
tslib_es6.__decorate([
|
|
32
|
+
decorators.property({ type: String, attribute: 'action', reflect: true }),
|
|
33
|
+
tslib_es6.__metadata("design:type", String)
|
|
34
|
+
], exports.HStepperActionButton.prototype, "action", void 0);
|
|
35
|
+
exports.HStepperActionButton = tslib_es6.__decorate([
|
|
36
|
+
phoenix_custom_element.phoenixCustomElement('h-stepper-action-button'),
|
|
37
|
+
tslib_es6.__metadata("design:paramtypes", [])
|
|
38
|
+
], exports.HStepperActionButton);
|
|
39
|
+
//# sourceMappingURL=stepper_action_button.js.map
|
package/build/cjs/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -86,6 +86,9 @@ var tooltip = require('./components/messages/tooltips/tooltip.js');
|
|
|
86
86
|
var tooltip_content = require('./components/messages/tooltips/tooltip_content.js');
|
|
87
87
|
var tag = require('./components/tag/tag.js');
|
|
88
88
|
var tag_remove_button = require('./components/tag/tag_remove_button.js');
|
|
89
|
+
var stepper_action_button = require('./components/form/input_stepper/stepper_action_button.js');
|
|
90
|
+
var input_stepper = require('./components/form/input_stepper/input_stepper.js');
|
|
91
|
+
var display_input = require('./components/form/input_stepper/display_input.js');
|
|
89
92
|
var toggle_constants = require('./components/toggle/toggle_constants.js');
|
|
90
93
|
var toggle = require('./components/toggle/toggle.js');
|
|
91
94
|
var toggle_button$1 = require('./components/toggle/toggle_button.js');
|
|
@@ -510,6 +513,24 @@ Object.defineProperty(exports, 'HTagRemoveButton', {
|
|
|
510
513
|
return tag_remove_button.HTagRemoveButton;
|
|
511
514
|
}
|
|
512
515
|
});
|
|
516
|
+
Object.defineProperty(exports, 'HStepperActionButton', {
|
|
517
|
+
enumerable: true,
|
|
518
|
+
get: function () {
|
|
519
|
+
return stepper_action_button.HStepperActionButton;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
Object.defineProperty(exports, 'HInputStepper', {
|
|
523
|
+
enumerable: true,
|
|
524
|
+
get: function () {
|
|
525
|
+
return input_stepper.HInputStepper;
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
Object.defineProperty(exports, 'HDisplayInput', {
|
|
529
|
+
enumerable: true,
|
|
530
|
+
get: function () {
|
|
531
|
+
return display_input.HDisplayInput;
|
|
532
|
+
}
|
|
533
|
+
});
|
|
513
534
|
exports.TOGGLE_ACTIONS = toggle_constants.TOGGLE_ACTIONS;
|
|
514
535
|
exports.TOGGLE_CONTEXT_NAME = toggle_constants.TOGGLE_CONTEXT_NAME;
|
|
515
536
|
exports.TOGGLE_EVENT_NAME = toggle_constants.TOGGLE_EVENT_NAME;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -31,7 +31,6 @@ let HFile = class HFile extends PhoenixLightLitElement {
|
|
|
31
31
|
class="${FILE_ITEM_CSS_CLASSES.fileRemoveButton}"
|
|
32
32
|
@click="${this._handleClick}"
|
|
33
33
|
aria-label="${this.removeButtonText} ${this.name}"
|
|
34
|
-
type="button"
|
|
35
34
|
>
|
|
36
35
|
${this.removeButtonIconName
|
|
37
36
|
? html `<h-icon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,kDAAsD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,kDAAsD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
import { Ref } from 'lit/directives/ref.js';
|
|
3
|
+
export declare class HDisplayInput extends PhoenixLightLitElement {
|
|
4
|
+
value: string;
|
|
5
|
+
controlId: string;
|
|
6
|
+
inputRef: Ref<HTMLInputElement>;
|
|
7
|
+
private _setInputBehavior;
|
|
8
|
+
private _testDispatchValueChanged;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators';
|
|
4
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
|
+
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
7
|
+
import { DISPLAY_INPUT_EVENT_NAMES, INPUT_STEPPER_CLASS_NAMES } from './input_stepper_constants.js';
|
|
8
|
+
|
|
9
|
+
let HDisplayInput = class HDisplayInput extends PhoenixLightLitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.controlId = '';
|
|
13
|
+
this.inputRef = createRef();
|
|
14
|
+
this._testDispatchValueChanged = () => {
|
|
15
|
+
var _a;
|
|
16
|
+
const valueChangeEvent = new CustomEvent(DISPLAY_INPUT_EVENT_NAMES.change, {
|
|
17
|
+
bubbles: true,
|
|
18
|
+
detail: {
|
|
19
|
+
value: (_a = this.inputRef.value) === null || _a === void 0 ? void 0 : _a.value
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
this.dispatchEvent(valueChangeEvent);
|
|
23
|
+
if (this.inputRef.value) {
|
|
24
|
+
this.inputRef.value.value = this.value;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
_setInputBehavior(event) {
|
|
29
|
+
const input = event.target;
|
|
30
|
+
input.focus();
|
|
31
|
+
input.select();
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return html `<input
|
|
35
|
+
id="${this.controlId}"
|
|
36
|
+
class="${INPUT_STEPPER_CLASS_NAMES.displayInput}"
|
|
37
|
+
type="number"
|
|
38
|
+
${ref(this.inputRef)}
|
|
39
|
+
.value="${this.value}"
|
|
40
|
+
@input=${this._testDispatchValueChanged}
|
|
41
|
+
@click=${this._setInputBehavior}
|
|
42
|
+
/>`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
__decorate([
|
|
46
|
+
property({ type: String, attribute: 'value', reflect: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], HDisplayInput.prototype, "value", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
property({ type: Number, attribute: 'control-id', reflect: true }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], HDisplayInput.prototype, "controlId", void 0);
|
|
53
|
+
HDisplayInput = __decorate([
|
|
54
|
+
phoenixCustomElement('h-display-input')
|
|
55
|
+
], HDisplayInput);
|
|
56
|
+
|
|
57
|
+
export { HDisplayInput };
|
|
58
|
+
//# sourceMappingURL=display_input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
import { PropertyValues } from 'lit';
|
|
3
|
+
export declare class HInputStepper extends PhoenixLightLitElement {
|
|
4
|
+
step: number;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
private _value;
|
|
8
|
+
private _$inputElement;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
disconnectedCallback(): void;
|
|
11
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
12
|
+
private _setupEvents;
|
|
13
|
+
private _handleInputChange;
|
|
14
|
+
private _handleDisplayChange;
|
|
15
|
+
private _handleUpdateValue;
|
|
16
|
+
private _increment;
|
|
17
|
+
private _decrement;
|
|
18
|
+
private _dispatchValueChanged;
|
|
19
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import 'lit';
|
|
3
|
+
import { property, state } from 'lit/decorators';
|
|
4
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
|
+
import { INPUT_STEPPER_ACTION_TYPES, INPUT_STEPPER_EVENT_NAMES, DISPLAY_INPUT_EVENT_NAMES } from './input_stepper_constants.js';
|
|
7
|
+
|
|
8
|
+
let HInputStepper = class HInputStepper extends PhoenixLightLitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.step = 1;
|
|
12
|
+
this.min = -Infinity;
|
|
13
|
+
this.max = Infinity;
|
|
14
|
+
this._handleInputChange = (event) => {
|
|
15
|
+
var _a;
|
|
16
|
+
((_a = event.target) === null || _a === void 0 ? void 0 : _a.action) === INPUT_STEPPER_ACTION_TYPES.increment ? this._increment() : this._decrement();
|
|
17
|
+
};
|
|
18
|
+
this._handleDisplayChange = (event) => {
|
|
19
|
+
if (event.detail.value > this.max)
|
|
20
|
+
return;
|
|
21
|
+
this._value = Number(event.detail.value);
|
|
22
|
+
};
|
|
23
|
+
this._handleUpdateValue = () => {
|
|
24
|
+
this._value = Number(this._$inputElement.value) || 0;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
super.connectedCallback();
|
|
29
|
+
const $element = this.querySelector('h-display-input');
|
|
30
|
+
if (!$element) {
|
|
31
|
+
throw new Error();
|
|
32
|
+
}
|
|
33
|
+
this._$inputElement = $element;
|
|
34
|
+
this._value = Number($element.value) || 0;
|
|
35
|
+
this._setupEvents();
|
|
36
|
+
}
|
|
37
|
+
disconnectedCallback() {
|
|
38
|
+
super.disconnectedCallback();
|
|
39
|
+
this._$inputElement.removeEventListener('input', this._handleUpdateValue);
|
|
40
|
+
}
|
|
41
|
+
updated(changedProperties) {
|
|
42
|
+
super.updated(changedProperties);
|
|
43
|
+
if (changedProperties.has('_value')) {
|
|
44
|
+
this._dispatchValueChanged();
|
|
45
|
+
this._$inputElement.value = String(this._value);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
_setupEvents() {
|
|
49
|
+
this.addEventListener(INPUT_STEPPER_EVENT_NAMES.change, this._handleInputChange);
|
|
50
|
+
this.addEventListener(DISPLAY_INPUT_EVENT_NAMES.change, this._handleDisplayChange);
|
|
51
|
+
this._$inputElement.addEventListener('input', this._handleUpdateValue);
|
|
52
|
+
}
|
|
53
|
+
_increment() {
|
|
54
|
+
if (this._value >= this.max)
|
|
55
|
+
return;
|
|
56
|
+
this._value += this.step;
|
|
57
|
+
}
|
|
58
|
+
_decrement() {
|
|
59
|
+
if (this._value <= this.min)
|
|
60
|
+
return;
|
|
61
|
+
this._value -= this.step;
|
|
62
|
+
}
|
|
63
|
+
_dispatchValueChanged() {
|
|
64
|
+
const valueChangeEvent = new CustomEvent(INPUT_STEPPER_EVENT_NAMES.valueChanged, {
|
|
65
|
+
bubbles: true,
|
|
66
|
+
detail: {
|
|
67
|
+
value: this._value
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
this.dispatchEvent(valueChangeEvent);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
__decorate([
|
|
74
|
+
property({ type: Number, attribute: 'step', reflect: true }),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], HInputStepper.prototype, "step", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
property({ type: Number, attribute: 'min', reflect: true }),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], HInputStepper.prototype, "min", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
property({ type: Number, attribute: 'max', reflect: true }),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], HInputStepper.prototype, "max", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
state(),
|
|
87
|
+
__metadata("design:type", Number)
|
|
88
|
+
], HInputStepper.prototype, "_value", void 0);
|
|
89
|
+
HInputStepper = __decorate([
|
|
90
|
+
phoenixCustomElement('h-input-stepper')
|
|
91
|
+
], HInputStepper);
|
|
92
|
+
|
|
93
|
+
export { HInputStepper };
|
|
94
|
+
//# sourceMappingURL=input_stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const INPUT_STEPPER_EVENT_NAMES: {
|
|
2
|
+
readonly change: "inputStepper.change";
|
|
3
|
+
readonly valueChanged: "inputStepper.valueChanged";
|
|
4
|
+
};
|
|
5
|
+
export declare const DISPLAY_INPUT_EVENT_NAMES: {
|
|
6
|
+
readonly change: "displayInput.change";
|
|
7
|
+
};
|
|
8
|
+
export declare const INPUT_STEPPER_ACTION_TYPES: {
|
|
9
|
+
readonly increment: "increment";
|
|
10
|
+
readonly decrement: "decrement";
|
|
11
|
+
};
|
|
12
|
+
export declare const INPUT_STEPPER_CLASS_NAMES: {
|
|
13
|
+
readonly displayInput: "input-stepper__value_input";
|
|
14
|
+
};
|
package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const INPUT_STEPPER_EVENT_NAMES = {
|
|
2
|
+
change: 'inputStepper.change',
|
|
3
|
+
valueChanged: 'inputStepper.valueChanged'
|
|
4
|
+
};
|
|
5
|
+
const DISPLAY_INPUT_EVENT_NAMES = {
|
|
6
|
+
change: 'displayInput.change'
|
|
7
|
+
};
|
|
8
|
+
const INPUT_STEPPER_ACTION_TYPES = {
|
|
9
|
+
increment: 'increment',
|
|
10
|
+
decrement: 'decrement'
|
|
11
|
+
};
|
|
12
|
+
const INPUT_STEPPER_CLASS_NAMES = {
|
|
13
|
+
displayInput: 'input-stepper__value_input'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { DISPLAY_INPUT_EVENT_NAMES, INPUT_STEPPER_ACTION_TYPES, INPUT_STEPPER_CLASS_NAMES, INPUT_STEPPER_EVENT_NAMES };
|
|
17
|
+
//# sourceMappingURL=input_stepper_constants.js.map
|
package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_constants.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/phoenix/src/components/form/input_stepper/input_stepper_types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input_stepper_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/input_stepper/input_stepper_types.ts"],"names":[],"mappings":"AAAA,OAAoB,aAAa,CAAC;AAClC,OAA2C,2BAA2B,CAAC"}
|
package/build/esm/packages/phoenix/src/components/form/input_stepper/stepper_action_button.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
import type { TInputStepperAction } from './input_stepper_types';
|
|
3
|
+
export declare class HStepperActionButton extends PhoenixLightLitElement {
|
|
4
|
+
action: TInputStepperAction;
|
|
5
|
+
constructor();
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
private _dispatchChangeEvent;
|
|
8
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { property } from 'lit/decorators';
|
|
3
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
|
+
import { BtnController } from '../../../controllers/btn_controller/btn_controller.js';
|
|
6
|
+
import { INPUT_STEPPER_EVENT_NAMES } from './input_stepper_constants.js';
|
|
7
|
+
|
|
8
|
+
let HStepperActionButton = class HStepperActionButton extends PhoenixLightLitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this._dispatchChangeEvent = () => {
|
|
12
|
+
const unitaryValueChangeEvent = new CustomEvent(INPUT_STEPPER_EVENT_NAMES.change, {
|
|
13
|
+
bubbles: true,
|
|
14
|
+
detail: {
|
|
15
|
+
action: this.action
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
this.dispatchEvent(unitaryValueChangeEvent);
|
|
19
|
+
};
|
|
20
|
+
new BtnController(this, this._dispatchChangeEvent);
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
this.addEventListener('click', this._dispatchChangeEvent);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
__decorate([
|
|
28
|
+
property({ type: String, attribute: 'action', reflect: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], HStepperActionButton.prototype, "action", void 0);
|
|
31
|
+
HStepperActionButton = __decorate([
|
|
32
|
+
phoenixCustomElement('h-stepper-action-button'),
|
|
33
|
+
__metadata("design:paramtypes", [])
|
|
34
|
+
], HStepperActionButton);
|
|
35
|
+
|
|
36
|
+
export { HStepperActionButton };
|
|
37
|
+
//# sourceMappingURL=stepper_action_button.js.map
|
package/build/esm/packages/phoenix/src/components/form/input_stepper/stepper_action_button.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -94,6 +94,9 @@ export { HTooltipContent } from "./components/messages/tooltips/tooltip_content"
|
|
|
94
94
|
export { HIcon } from "./components/icon/icon";
|
|
95
95
|
export { HTag } from "./components/tag/tag";
|
|
96
96
|
export { HTagRemoveButton } from "./components/tag/tag_remove_button";
|
|
97
|
+
export { HInputStepper } from './components/form/input_stepper/input_stepper';
|
|
98
|
+
export { HDisplayInput } from './components/form/input_stepper/display_input';
|
|
99
|
+
export { HStepperActionButton } from './components/form/input_stepper/stepper_action_button';
|
|
97
100
|
export { HToggle } from './components/toggle/toggle';
|
|
98
101
|
export { HToggleBtn } from './components/toggle/toggle_button';
|
|
99
102
|
export * from './components/toggle/toggle_types';
|
|
@@ -82,6 +82,9 @@ export { HTooltip } from './components/messages/tooltips/tooltip.js';
|
|
|
82
82
|
export { HTooltipContent } from './components/messages/tooltips/tooltip_content.js';
|
|
83
83
|
export { HTag } from './components/tag/tag.js';
|
|
84
84
|
export { HTagRemoveButton } from './components/tag/tag_remove_button.js';
|
|
85
|
+
export { HStepperActionButton } from './components/form/input_stepper/stepper_action_button.js';
|
|
86
|
+
export { HInputStepper } from './components/form/input_stepper/input_stepper.js';
|
|
87
|
+
export { HDisplayInput } from './components/form/input_stepper/display_input.js';
|
|
85
88
|
export { TOGGLE_ACTIONS, TOGGLE_CONTEXT_NAME, TOGGLE_EVENT_NAME } from './components/toggle/toggle_constants.js';
|
|
86
89
|
export { HToggle } from './components/toggle/toggle.js';
|
|
87
90
|
export { HToggleBtn } from './components/toggle/toggle_button.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|