@shoper/phoenix_design_system 1.6.8 → 1.6.9
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/checkbox/checkbox.js +13 -0
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_content.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input.js +11 -2
- package/build/cjs/packages/phoenix/src/components/form/input/input.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +13 -0
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +5 -5
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.d.ts +2 -0
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js +13 -0
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_content.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input.d.ts +2 -0
- package/build/esm/packages/phoenix/src/components/form/input/input.js +11 -2
- package/build/esm/packages/phoenix/src/components/form/input/input.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio.d.ts +2 -0
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js +13 -0
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/search/search.d.ts +15 -0
- package/build/esm/packages/phoenix/src/components/search/search.js +94 -0
- package/build/esm/packages/phoenix/src/components/search/search.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/search/search_history.d.ts +5 -0
- package/build/esm/packages/phoenix/src/components/search/search_history.js +23 -0
- package/build/esm/packages/phoenix/src/components/search/search_history.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/search/search_input.d.ts +7 -0
- package/build/esm/packages/phoenix/src/components/search/search_input.js +39 -0
- package/build/esm/packages/phoenix/src/components/search/search_input.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/search/search_results.d.ts +5 -0
- package/build/esm/packages/phoenix/src/components/search/search_results.js +24 -0
- package/build/esm/packages/phoenix/src/components/search/search_results.js.map +1 -0
- package/build/esm/packages/phoenix/src/index.js +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,19 @@ exports.HCheckbox = class HCheckbox extends phoenix_light_lit_element.PhoenixLig
|
|
|
22
22
|
connectedCallback() {
|
|
23
23
|
super.connectedCallback();
|
|
24
24
|
this.classList.add(checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES.checkbox);
|
|
25
|
+
this._updateCssClassesBasedOnProps();
|
|
26
|
+
}
|
|
27
|
+
updated(changedProperties) {
|
|
28
|
+
super.updated(changedProperties);
|
|
29
|
+
this._updateCssClassesBasedOnProps();
|
|
30
|
+
}
|
|
31
|
+
_updateCssClassesBasedOnProps() {
|
|
32
|
+
const classes = [
|
|
33
|
+
checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES.checkboxDisabled,
|
|
34
|
+
checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES.checkboxError,
|
|
35
|
+
checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES.checkboxReadonly
|
|
36
|
+
];
|
|
37
|
+
this.classList.remove(...classes);
|
|
25
38
|
const cssClasses = index['default']({
|
|
26
39
|
[checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES.checkboxDisabled]: this.disabled,
|
|
27
40
|
[checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES.checkboxError]: this.error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -8,8 +8,8 @@ var decorators = require('lit/decorators');
|
|
|
8
8
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
9
9
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
10
10
|
var ifDefined_js = require('lit-html/directives/if-defined.js');
|
|
11
|
-
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
12
11
|
var checkbox_constants = require('./checkbox_constants.js');
|
|
12
|
+
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
13
13
|
var label_constants = require('../label/label_constants.js');
|
|
14
14
|
|
|
15
15
|
exports.HCheckboxContent = class HCheckboxContent extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -10,8 +10,8 @@ var index = require('../../../../external/classnames/index.js');
|
|
|
10
10
|
var litHtml = require('lit-html');
|
|
11
11
|
var ref_js = require('lit-html/directives/ref.js');
|
|
12
12
|
var ifDefined_js = require('lit-html/directives/if-defined.js');
|
|
13
|
-
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
14
13
|
var checkbox_constants = require('./checkbox_constants.js');
|
|
14
|
+
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
15
15
|
|
|
16
16
|
exports.HCheckboxControl = class HCheckboxControl extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
17
17
|
constructor() {
|
|
@@ -21,17 +21,26 @@ exports.HInput = class HInput extends phoenix_light_lit_element.PhoenixLightLitE
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
connectedCallback() {
|
|
24
|
-
var _a;
|
|
25
24
|
super.connectedCallback();
|
|
26
25
|
if (this.type !== input_constants.INPUT_CONTROL_TYPES.hidden) {
|
|
27
26
|
this.classList.add(input_constants.INPUT_CONTROL_CSS_CLASSES.input);
|
|
28
27
|
}
|
|
28
|
+
this._updateCssClassesBasedOnProps();
|
|
29
|
+
}
|
|
30
|
+
updated(changedProperties) {
|
|
31
|
+
super.updated(changedProperties);
|
|
32
|
+
this._updateCssClassesBasedOnProps();
|
|
33
|
+
}
|
|
34
|
+
_updateCssClassesBasedOnProps() {
|
|
35
|
+
var _a;
|
|
36
|
+
const classes = [input_constants.INPUT_CONTROL_CSS_CLASSES.inputDisabled, input_constants.INPUT_CONTROL_CSS_CLASSES.inputError];
|
|
37
|
+
this.classList.remove(...classes);
|
|
29
38
|
const cssClasses = index['default']({
|
|
30
39
|
[input_constants.INPUT_CONTROL_CSS_CLASSES.inputDisabled]: this.disabled,
|
|
31
40
|
[input_constants.INPUT_CONTROL_CSS_CLASSES.inputError]: this.error
|
|
32
41
|
}, input_constants.INPUT_CONTROL_CSS_CLASSES[(_a = this.size) !== null && _a !== void 0 ? _a : '']);
|
|
33
42
|
if (cssClasses)
|
|
34
|
-
this.classList.add(
|
|
43
|
+
this.classList.add(cssClasses);
|
|
35
44
|
}
|
|
36
45
|
};
|
|
37
46
|
tslib_es6.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -23,6 +23,19 @@ exports.HRadio = class HRadio extends phoenix_light_lit_element.PhoenixLightLitE
|
|
|
23
23
|
connectedCallback() {
|
|
24
24
|
super.connectedCallback();
|
|
25
25
|
this.classList.add(radio_constants.RADIO_CONTROL_CSS_CLASSES.radio);
|
|
26
|
+
this._updateCssClassesBasedOnProps();
|
|
27
|
+
}
|
|
28
|
+
updated(changedProperties) {
|
|
29
|
+
super.updated(changedProperties);
|
|
30
|
+
this._updateCssClassesBasedOnProps();
|
|
31
|
+
}
|
|
32
|
+
_updateCssClassesBasedOnProps() {
|
|
33
|
+
const classes = [
|
|
34
|
+
radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled,
|
|
35
|
+
radio_constants.RADIO_CONTROL_CSS_CLASSES.radioReadonly,
|
|
36
|
+
radio_constants.RADIO_CONTROL_CSS_CLASSES.radioError
|
|
37
|
+
];
|
|
38
|
+
this.classList.remove(...classes);
|
|
26
39
|
const cssClasses = index['default']({
|
|
27
40
|
[radio_constants.RADIO_CONTROL_CSS_CLASSES.radioDisabled]: this.disabled,
|
|
28
41
|
[radio_constants.RADIO_CONTROL_CSS_CLASSES.radioReadonly]: this.readonly,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,0CAA8C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -41,12 +41,12 @@ var control_content = require('./components/form/control/control_content.js');
|
|
|
41
41
|
var control_element = require('./components/form/control/control_element.js');
|
|
42
42
|
var control_label = require('./components/form/control/control_label.js');
|
|
43
43
|
var control_additional_content = require('./components/form/control/control_additional_content.js');
|
|
44
|
+
var checkbox_constants = require('./components/form/checkbox/checkbox_constants.js');
|
|
44
45
|
var input = require('./components/form/input/input.js');
|
|
45
46
|
var input_mask_controller = require('./controllers/input_mask_controller/input_mask_controller.js');
|
|
46
47
|
var input_control = require('./components/form/input/input_control.js');
|
|
47
48
|
var input_icon = require('./components/form/input/input_icon.js');
|
|
48
49
|
var input_unit = require('./components/form/input/input_unit.js');
|
|
49
|
-
var checkbox_constants = require('./components/form/checkbox/checkbox_constants.js');
|
|
50
50
|
var checkbox = require('./components/form/checkbox/checkbox.js');
|
|
51
51
|
var label_constants = require('./components/form/label/label_constants.js');
|
|
52
52
|
var checkbox_content = require('./components/form/checkbox/checkbox_content.js');
|
|
@@ -290,6 +290,10 @@ Object.defineProperty(exports, 'HControlAdditionalContent', {
|
|
|
290
290
|
return control_additional_content.HControlAdditionalContent;
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
|
+
exports.CHECKBOX_CONTROL_CSS_CLASSES = checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES;
|
|
294
|
+
exports.CHECKBOX_CONTROL_EVENTS = checkbox_constants.CHECKBOX_CONTROL_EVENTS;
|
|
295
|
+
exports.CHECKBOX_PROPS_TO_SYNC = checkbox_constants.CHECKBOX_PROPS_TO_SYNC;
|
|
296
|
+
exports.CHECKBOX_SLOTS = checkbox_constants.CHECKBOX_SLOTS;
|
|
293
297
|
Object.defineProperty(exports, 'HInput', {
|
|
294
298
|
enumerable: true,
|
|
295
299
|
get: function () {
|
|
@@ -315,10 +319,6 @@ Object.defineProperty(exports, 'HInputUnit', {
|
|
|
315
319
|
return input_unit.HInputUnit;
|
|
316
320
|
}
|
|
317
321
|
});
|
|
318
|
-
exports.CHECKBOX_CONTROL_CSS_CLASSES = checkbox_constants.CHECKBOX_CONTROL_CSS_CLASSES;
|
|
319
|
-
exports.CHECKBOX_CONTROL_EVENTS = checkbox_constants.CHECKBOX_CONTROL_EVENTS;
|
|
320
|
-
exports.CHECKBOX_PROPS_TO_SYNC = checkbox_constants.CHECKBOX_PROPS_TO_SYNC;
|
|
321
|
-
exports.CHECKBOX_SLOTS = checkbox_constants.CHECKBOX_SLOTS;
|
|
322
322
|
Object.defineProperty(exports, 'HCheckbox', {
|
|
323
323
|
enumerable: true,
|
|
324
324
|
get: function () {
|
|
@@ -18,6 +18,19 @@ let HCheckbox = class HCheckbox extends PhoenixLightLitElement {
|
|
|
18
18
|
connectedCallback() {
|
|
19
19
|
super.connectedCallback();
|
|
20
20
|
this.classList.add(CHECKBOX_CONTROL_CSS_CLASSES.checkbox);
|
|
21
|
+
this._updateCssClassesBasedOnProps();
|
|
22
|
+
}
|
|
23
|
+
updated(changedProperties) {
|
|
24
|
+
super.updated(changedProperties);
|
|
25
|
+
this._updateCssClassesBasedOnProps();
|
|
26
|
+
}
|
|
27
|
+
_updateCssClassesBasedOnProps() {
|
|
28
|
+
const classes = [
|
|
29
|
+
CHECKBOX_CONTROL_CSS_CLASSES.checkboxDisabled,
|
|
30
|
+
CHECKBOX_CONTROL_CSS_CLASSES.checkboxError,
|
|
31
|
+
CHECKBOX_CONTROL_CSS_CLASSES.checkboxReadonly
|
|
32
|
+
];
|
|
33
|
+
this.classList.remove(...classes);
|
|
21
34
|
const cssClasses = classnames({
|
|
22
35
|
[CHECKBOX_CONTROL_CSS_CLASSES.checkboxDisabled]: this.disabled,
|
|
23
36
|
[CHECKBOX_CONTROL_CSS_CLASSES.checkboxError]: this.error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,8 +4,8 @@ import { property } from 'lit/decorators';
|
|
|
4
4
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
5
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
6
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
7
|
-
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
8
7
|
import { CHECKBOX_CONTROL_CSS_CLASSES, CHECKBOX_SLOTS } from './checkbox_constants.js';
|
|
8
|
+
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
9
9
|
import { LABEL_CSS_CLASSES } from '../label/label_constants.js';
|
|
10
10
|
|
|
11
11
|
let HCheckboxContent = class HCheckboxContent extends PhoenixLightLitElement {
|
|
@@ -6,8 +6,8 @@ import classnames from '../../../../external/classnames/index.js';
|
|
|
6
6
|
import { html } from 'lit-html';
|
|
7
7
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
8
8
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
9
|
-
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
10
9
|
import { CHECKBOX_CONTROL_EVENTS, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
|
|
10
|
+
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
11
11
|
|
|
12
12
|
let HCheckboxControl = class HCheckboxControl extends PhoenixLightLitElement {
|
|
13
13
|
constructor() {
|
|
@@ -17,17 +17,26 @@ let HInput = class HInput extends PhoenixLightLitElement {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
connectedCallback() {
|
|
20
|
-
var _a;
|
|
21
20
|
super.connectedCallback();
|
|
22
21
|
if (this.type !== INPUT_CONTROL_TYPES.hidden) {
|
|
23
22
|
this.classList.add(INPUT_CONTROL_CSS_CLASSES.input);
|
|
24
23
|
}
|
|
24
|
+
this._updateCssClassesBasedOnProps();
|
|
25
|
+
}
|
|
26
|
+
updated(changedProperties) {
|
|
27
|
+
super.updated(changedProperties);
|
|
28
|
+
this._updateCssClassesBasedOnProps();
|
|
29
|
+
}
|
|
30
|
+
_updateCssClassesBasedOnProps() {
|
|
31
|
+
var _a;
|
|
32
|
+
const classes = [INPUT_CONTROL_CSS_CLASSES.inputDisabled, INPUT_CONTROL_CSS_CLASSES.inputError];
|
|
33
|
+
this.classList.remove(...classes);
|
|
25
34
|
const cssClasses = classnames({
|
|
26
35
|
[INPUT_CONTROL_CSS_CLASSES.inputDisabled]: this.disabled,
|
|
27
36
|
[INPUT_CONTROL_CSS_CLASSES.inputError]: this.error
|
|
28
37
|
}, INPUT_CONTROL_CSS_CLASSES[(_a = this.size) !== null && _a !== void 0 ? _a : '']);
|
|
29
38
|
if (cssClasses)
|
|
30
|
-
this.classList.add(
|
|
39
|
+
this.classList.add(cssClasses);
|
|
31
40
|
}
|
|
32
41
|
};
|
|
33
42
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -19,6 +19,19 @@ let HRadio = class HRadio extends PhoenixLightLitElement {
|
|
|
19
19
|
connectedCallback() {
|
|
20
20
|
super.connectedCallback();
|
|
21
21
|
this.classList.add(RADIO_CONTROL_CSS_CLASSES.radio);
|
|
22
|
+
this._updateCssClassesBasedOnProps();
|
|
23
|
+
}
|
|
24
|
+
updated(changedProperties) {
|
|
25
|
+
super.updated(changedProperties);
|
|
26
|
+
this._updateCssClassesBasedOnProps();
|
|
27
|
+
}
|
|
28
|
+
_updateCssClassesBasedOnProps() {
|
|
29
|
+
const classes = [
|
|
30
|
+
RADIO_CONTROL_CSS_CLASSES.radioDisabled,
|
|
31
|
+
RADIO_CONTROL_CSS_CLASSES.radioReadonly,
|
|
32
|
+
RADIO_CONTROL_CSS_CLASSES.radioError
|
|
33
|
+
];
|
|
34
|
+
this.classList.remove(...classes);
|
|
22
35
|
const cssClasses = classnames({
|
|
23
36
|
[RADIO_CONTROL_CSS_CLASSES.radioDisabled]: this.disabled,
|
|
24
37
|
[RADIO_CONTROL_CSS_CLASSES.radioReadonly]: this.readonly,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,15 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HSearch extends PhoenixLightLitElement {
|
|
3
|
+
private _searchContextConsumer;
|
|
4
|
+
private _searchContext$;
|
|
5
|
+
private _searchContextObserver;
|
|
6
|
+
private _shouldShowHistory;
|
|
7
|
+
private _searchResults;
|
|
8
|
+
private _searchHistory;
|
|
9
|
+
connectedCallback(): Promise<void>;
|
|
10
|
+
private _setupListeners;
|
|
11
|
+
private _displaySuggester;
|
|
12
|
+
private _displayHistorySuggestions;
|
|
13
|
+
private _displayResults;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { PhoenixLightLitElement } from '@phoenixRoot/core/phoenix_light_lit_element/phoenix_light_lit_element';
|
|
3
|
+
import { phoenixCustomElement } from '@phoenixRoot/core/decorators/phoenix_custom_element';
|
|
4
|
+
import { ContextConsumerController } from '@phoenixRoot/core/context/context_consumer_controller';
|
|
5
|
+
import '@phoenixRoot/core/classes/behavior_subject/behavior_subject';
|
|
6
|
+
import { Observer } from '@phoenixRoot/core/classes/observer/observer';
|
|
7
|
+
import { state } from 'lit/decorators';
|
|
8
|
+
import { html } from 'lit/development';
|
|
9
|
+
import './search_history';
|
|
10
|
+
import './search_results';
|
|
11
|
+
import { when } from 'lit/directives/when.js';
|
|
12
|
+
let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this._shouldShowHistory = false;
|
|
16
|
+
// przykladowe dane - to powinno przyjsc z contextu
|
|
17
|
+
this._searchResults = {
|
|
18
|
+
test: 'test'
|
|
19
|
+
};
|
|
20
|
+
// przykladowe dane to powinno przyjsc z contextu
|
|
21
|
+
this._searchHistory = ['test, dupa, dwa'];
|
|
22
|
+
}
|
|
23
|
+
async connectedCallback() {
|
|
24
|
+
super.connectedCallback();
|
|
25
|
+
try {
|
|
26
|
+
this._searchContextConsumer = new ContextConsumerController(this);
|
|
27
|
+
this._searchContext$ = await this._searchContextConsumer.consumeAsync('searchContext');
|
|
28
|
+
this._searchContextObserver = new Observer((searchData) => {
|
|
29
|
+
this._searchResults = searchData.results;
|
|
30
|
+
this._searchHistory = searchData.history;
|
|
31
|
+
});
|
|
32
|
+
this._searchContext$.subscribe(this._searchContextObserver);
|
|
33
|
+
}
|
|
34
|
+
catch (_a) {
|
|
35
|
+
console.error('Search context is not provided');
|
|
36
|
+
}
|
|
37
|
+
this._setupListeners();
|
|
38
|
+
}
|
|
39
|
+
_setupListeners() {
|
|
40
|
+
this.addEventListener('focusin', (ev) => {
|
|
41
|
+
const isSearchInput = ev.target instanceof HTMLInputElement && ev.target.type === 'search';
|
|
42
|
+
if (isSearchInput) {
|
|
43
|
+
const $searchInput = ev.target;
|
|
44
|
+
this._displaySuggester($searchInput.value);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
this.addEventListener('keyup', (ev) => {
|
|
48
|
+
const isSearchInput = ev.target instanceof HTMLInputElement && ev.target.type === 'search';
|
|
49
|
+
if (isSearchInput) {
|
|
50
|
+
const $searchInput = ev.target;
|
|
51
|
+
this._displaySuggester($searchInput.value);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
_displaySuggester(searchPhrase) {
|
|
56
|
+
if (searchPhrase === '') {
|
|
57
|
+
this._displayHistorySuggestions();
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this._displayResults();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
_displayHistorySuggestions() {
|
|
64
|
+
// oczywiscie ta logika moze powinna byc bardziej skomplikowana ;)
|
|
65
|
+
this._shouldShowHistory = true;
|
|
66
|
+
}
|
|
67
|
+
_displayResults() {
|
|
68
|
+
// oczywiscie ta logika moze powinna byc bardziej skomplikowana ;)
|
|
69
|
+
this._shouldShowHistory = false;
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
// tutaj tez oczywiscie ta logika jets bledna i bardzo uproszczona - chodzi o sam zamysl i poukladanie teog.
|
|
73
|
+
return html `
|
|
74
|
+
${when(this._shouldShowHistory, () => html `<h-search-history .history="${this._searchHistory}"></h-search-history>`, () => html `<h-search-results .results="${this._searchResults}"></h-search-results>`)}
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
__decorate([
|
|
79
|
+
state(),
|
|
80
|
+
__metadata("design:type", Boolean)
|
|
81
|
+
], HSearch.prototype, "_shouldShowHistory", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
state(),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], HSearch.prototype, "_searchResults", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
state(),
|
|
88
|
+
__metadata("design:type", Array)
|
|
89
|
+
], HSearch.prototype, "_searchHistory", void 0);
|
|
90
|
+
HSearch = __decorate([
|
|
91
|
+
phoenixCustomElement('h-search')
|
|
92
|
+
], HSearch);
|
|
93
|
+
export { HSearch };
|
|
94
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../../../../../src/components/search/search.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { phoenixCustomElement } from '@phoenixRoot/core/decorators/phoenix_custom_element';
|
|
3
|
+
import { PhoenixLightLitElement } from '@phoenixRoot/core/phoenix_light_lit_element/phoenix_light_lit_element';
|
|
4
|
+
import { property } from 'lit/decorators';
|
|
5
|
+
import { html } from 'lit/development';
|
|
6
|
+
let HSearchHistory = class HSearchHistory extends PhoenixLightLitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.history = [];
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return html ` ${this.history} `;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
__decorate([
|
|
16
|
+
property({ type: Array, attribute: 'result-data' }),
|
|
17
|
+
__metadata("design:type", Array)
|
|
18
|
+
], HSearchHistory.prototype, "history", void 0);
|
|
19
|
+
HSearchHistory = __decorate([
|
|
20
|
+
phoenixCustomElement('h-search-history')
|
|
21
|
+
], HSearchHistory);
|
|
22
|
+
export { HSearchHistory };
|
|
23
|
+
//# sourceMappingURL=search_history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search_history.js","sourceRoot":"","sources":["../../../../../../../src/components/search/search_history.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,uEAAuE,CAAC;AAC/G,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,sBAAsB;IAA1D;;QAEI,YAAO,GAAa,EAAE,CAAC;IAK3B,CAAC;IAHU,MAAM;QACT,OAAO,IAAI,CAAA,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC;IACnC,CAAC;CACJ,CAAA;AALG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;;+CAC7B;AAFd,cAAc;IAD1B,oBAAoB,CAAC,kBAAkB,CAAC;GAC5B,cAAc,CAO1B;SAPY,cAAc"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HSearch extends PhoenixLightLitElement {
|
|
3
|
+
private _searchContextConsumer;
|
|
4
|
+
private _searchContext$;
|
|
5
|
+
private _searchContextObserver;
|
|
6
|
+
connectedCallback(): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { PhoenixLightLitElement } from '@phoenixRoot/core/phoenix_light_lit_element/phoenix_light_lit_element';
|
|
3
|
+
import { phoenixCustomElement } from '@phoenixRoot/core/decorators/phoenix_custom_element';
|
|
4
|
+
import { ContextConsumerController } from '@phoenixRoot/core/context/context_consumer_controller';
|
|
5
|
+
import '@phoenixRoot/core/classes/behavior_subject/behavior_subject';
|
|
6
|
+
import { Observer } from '@phoenixRoot/core/classes/observer/observer';
|
|
7
|
+
import { state } from 'lit/decorators';
|
|
8
|
+
let HSearch = class HSearch extends PhoenixLightLitElement {
|
|
9
|
+
async connectedCallback() {
|
|
10
|
+
super.connectedCallback();
|
|
11
|
+
try {
|
|
12
|
+
this._searchContextConsumer = new ContextConsumerController(this);
|
|
13
|
+
this._searchContext$ = await this._searchContextConsumer.consumeAsync('searchContext');
|
|
14
|
+
this._searchContextObserver = new Observer((searchData) => {
|
|
15
|
+
if (searchData.searchPhrase === '') {
|
|
16
|
+
const $input = this.querySelector('input[type="search"]');
|
|
17
|
+
if ($input) {
|
|
18
|
+
$input.value = '';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
this._searchContext$.subscribe(this._searchContextObserver);
|
|
23
|
+
}
|
|
24
|
+
catch (_a) {
|
|
25
|
+
console.error('Search context is not provided');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
__decorate([
|
|
30
|
+
state(),
|
|
31
|
+
__metadata("design:type", Function),
|
|
32
|
+
__metadata("design:paramtypes", []),
|
|
33
|
+
__metadata("design:returntype", Promise)
|
|
34
|
+
], HSearch.prototype, "connectedCallback", null);
|
|
35
|
+
HSearch = __decorate([
|
|
36
|
+
phoenixCustomElement('h-search-input')
|
|
37
|
+
], HSearch);
|
|
38
|
+
export { HSearch };
|
|
39
|
+
//# sourceMappingURL=search_input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search_input.js","sourceRoot":"","sources":["../../../../../../../src/components/search/search_input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uEAAuE,CAAC;AAC/G,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAgC,6DAA6D,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AASvC,IAAa,OAAO,GAApB,MAAa,OAAQ,SAAQ,sBAAsB;IAMxC,KAAK,CAAC,iBAAiB;QAC1B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI;YACA,IAAI,CAAC,sBAAsB,GAAG,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI,CAAC,eAAe,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;YAEvF,IAAI,CAAC,sBAAsB,GAAG,IAAI,QAAQ,CAAC,CAAC,UAAuB,EAAE,EAAE;gBACnE,IAAI,UAAU,CAAC,YAAY,KAAK,EAAE,EAAE;oBAChC,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAmB,sBAAsB,CAAC,CAAC;oBAC5E,IAAI,MAAM,EAAE;wBACR,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;qBACrB;iBACJ;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;SAC/D;QAAC,WAAM;YACJ,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACnD;IACL,CAAC;CACJ,CAAA;AArBG;IADC,KAAK,EAAE;;;;gDAqBP;AA1BQ,OAAO;IADnB,oBAAoB,CAAC,gBAAgB,CAAC;GAC1B,OAAO,CA2BnB;SA3BY,OAAO"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { phoenixCustomElement } from '@phoenixRoot/core/decorators/phoenix_custom_element';
|
|
3
|
+
import { PhoenixLightLitElement } from '@phoenixRoot/core/phoenix_light_lit_element/phoenix_light_lit_element';
|
|
4
|
+
import { property } from 'lit/decorators';
|
|
5
|
+
import { html } from 'lit/development';
|
|
6
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
7
|
+
let HSearchResults = class HSearchResults extends PhoenixLightLitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.results = {};
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return html ` ${repeat(Object.keys(this.results), (key) => key, (key) => html ` ${this.results[key]} `)}`;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
__decorate([
|
|
17
|
+
property({ type: Object, attribute: 'result-data' }),
|
|
18
|
+
__metadata("design:type", Object)
|
|
19
|
+
], HSearchResults.prototype, "results", void 0);
|
|
20
|
+
HSearchResults = __decorate([
|
|
21
|
+
phoenixCustomElement('h-search-results')
|
|
22
|
+
], HSearchResults);
|
|
23
|
+
export { HSearchResults };
|
|
24
|
+
//# sourceMappingURL=search_results.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search_results.js","sourceRoot":"","sources":["../../../../../../../src/components/search/search_results.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,uEAAuE,CAAC;AAC/G,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,IAAa,cAAc,GAA3B,MAAa,cAAe,SAAQ,sBAAsB;IAA1D;;QAEI,YAAO,GAAqB,EAAE,CAAC;IASnC,CAAC;IAPU,MAAM;QACT,OAAO,IAAI,CAAA,IAAI,MAAM,CACjB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EACzB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,EACZ,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAA,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CACxC,EAAE,CAAC;IACR,CAAC;CACJ,CAAA;AATG;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;;+CACtB;AAFtB,cAAc;IAD1B,oBAAoB,CAAC,kBAAkB,CAAC;GAC5B,cAAc,CAW1B;SAXY,cAAc"}
|
|
@@ -37,12 +37,12 @@ export { HControlContent } from './components/form/control/control_content.js';
|
|
|
37
37
|
export { HControlElement } from './components/form/control/control_element.js';
|
|
38
38
|
export { HControlLabel } from './components/form/control/control_label.js';
|
|
39
39
|
export { HControlAdditionalContent } from './components/form/control/control_additional_content.js';
|
|
40
|
+
export { CHECKBOX_CONTROL_CSS_CLASSES, CHECKBOX_CONTROL_EVENTS, CHECKBOX_PROPS_TO_SYNC, CHECKBOX_SLOTS } from './components/form/checkbox/checkbox_constants.js';
|
|
40
41
|
export { HInput } from './components/form/input/input.js';
|
|
41
42
|
export { InputMaskController } from './controllers/input_mask_controller/input_mask_controller.js';
|
|
42
43
|
export { HInputControl } from './components/form/input/input_control.js';
|
|
43
44
|
export { HInputIcon } from './components/form/input/input_icon.js';
|
|
44
45
|
export { HInputUnit } from './components/form/input/input_unit.js';
|
|
45
|
-
export { CHECKBOX_CONTROL_CSS_CLASSES, CHECKBOX_CONTROL_EVENTS, CHECKBOX_PROPS_TO_SYNC, CHECKBOX_SLOTS } from './components/form/checkbox/checkbox_constants.js';
|
|
46
46
|
export { HCheckbox } from './components/form/checkbox/checkbox.js';
|
|
47
47
|
export { LABEL_CSS_CLASSES } from './components/form/label/label_constants.js';
|
|
48
48
|
export { HCheckboxContent } from './components/form/checkbox/checkbox_content.js';
|