@shoper/phoenix_design_system 1.1.4 → 1.1.5
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/accordion/accordion_content.js +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_toggler.js +1 -1
- package/build/cjs/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js +7 -0
- package/build/cjs/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/controllers/props_synchronizing/control_props_sync_consumer_controller.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/components/select_close_btn.js +2 -1
- package/build/cjs/packages/phoenix/src/components/form/select/components/select_close_btn.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/components/select_components_constatns.js +2 -1
- package/build/cjs/packages/phoenix/src/components/form/select/components/select_components_constatns.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/components/toggler/select_toggler.js +6 -8
- package/build/cjs/packages/phoenix/src/components/form/select/components/toggler/select_toggler.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/select.js +47 -20
- package/build/cjs/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/select/select_constants.js +8 -2
- package/build/cjs/packages/phoenix/src/components/form/select/select_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/icon/icon.js +19 -5
- package/build/cjs/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/icon/icon_constants.js +6 -0
- package/build/cjs/packages/phoenix/src/components/icon/icon_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.js +1 -1
- package/build/esm/packages/phoenix/src/components/backdrop/controller/backdrop_controller.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js +7 -0
- package/build/esm/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/controllers/props_synchronizing/control_props_sync_consumer_controller.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/components/select_close_btn.js +2 -1
- package/build/esm/packages/phoenix/src/components/form/select/components/select_close_btn.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/components/select_components_constatns.d.ts +1 -0
- package/build/esm/packages/phoenix/src/components/form/select/components/select_components_constatns.js +2 -1
- package/build/esm/packages/phoenix/src/components/form/select/components/select_components_constatns.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/components/toggler/select_toggler.js +6 -8
- package/build/esm/packages/phoenix/src/components/form/select/components/toggler/select_toggler.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/select.d.ts +5 -0
- package/build/esm/packages/phoenix/src/components/form/select/select.js +48 -21
- package/build/esm/packages/phoenix/src/components/form/select/select.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/select/select_constants.d.ts +7 -1
- package/build/esm/packages/phoenix/src/components/form/select/select_constants.js +8 -2
- package/build/esm/packages/phoenix/src/components/form/select/select_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/icon/icon.d.ts +7 -2
- package/build/esm/packages/phoenix/src/components/icon/icon.js +19 -5
- package/build/esm/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/icon/icon_constants.d.ts +5 -0
- package/build/esm/packages/phoenix/src/components/icon/icon_constants.js +6 -1
- package/build/esm/packages/phoenix/src/components/icon/icon_constants.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,8 +6,8 @@ var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
9
|
-
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
10
9
|
var observer = require('../../core/classes/observer/observer.js');
|
|
10
|
+
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
11
11
|
var accordion_constants = require('./accordion_constants.js');
|
|
12
12
|
var transition_controller = require('../../controllers/transition_controller/transition_controller.js');
|
|
13
13
|
|
|
@@ -6,8 +6,8 @@ var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
9
|
-
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
10
9
|
var observer = require('../../core/classes/observer/observer.js');
|
|
10
|
+
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
11
11
|
var behavior_subject = require('../../core/classes/behavior_subject/behavior_subject.js');
|
|
12
12
|
var context_provider_controller = require('../../core/context/context_provider_controller.js');
|
|
13
13
|
var accordion_constants = require('./accordion_constants.js');
|
|
@@ -6,8 +6,8 @@ var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
7
7
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
8
8
|
var btn_controller = require('../../controllers/btn_controller/btn_controller.js');
|
|
9
|
-
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
10
9
|
var observer = require('../../core/classes/observer/observer.js');
|
|
10
|
+
var context_consumer_controller = require('../../core/context/context_consumer_controller.js');
|
|
11
11
|
var accordion_constants = require('./accordion_constants.js');
|
|
12
12
|
|
|
13
13
|
exports.HAccordionToggler = class HAccordionToggler extends phoenix_light_lit_element.PhoenixLightLitElement {
|
package/build/cjs/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js
CHANGED
|
@@ -5,11 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var backdrop_constants = require('../backdrop_constants.js');
|
|
6
6
|
|
|
7
7
|
class BackdropController {
|
|
8
|
+
constructor() {
|
|
9
|
+
this._isVisible = false;
|
|
10
|
+
}
|
|
8
11
|
hide() {
|
|
9
12
|
this._dispatchEvent(backdrop_constants.BACKDROP_EVENTS.hide);
|
|
13
|
+
this._isVisible = false;
|
|
10
14
|
}
|
|
11
15
|
show() {
|
|
16
|
+
if (this._isVisible)
|
|
17
|
+
return;
|
|
12
18
|
this._dispatchEvent(backdrop_constants.BACKDROP_EVENTS.show);
|
|
19
|
+
this._isVisible = true;
|
|
13
20
|
}
|
|
14
21
|
_dispatchEvent(eventName) {
|
|
15
22
|
const hideBackdropEvent = new CustomEvent(eventName, {
|
package/build/cjs/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js.map
CHANGED
|
@@ -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;"}
|
|
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;"}
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
require('lit');
|
|
7
|
-
var context_consumer_controller = require('../../../../core/context/context_consumer_controller.js');
|
|
8
7
|
var observer = require('../../../../core/classes/observer/observer.js');
|
|
8
|
+
var context_consumer_controller = require('../../../../core/context/context_consumer_controller.js');
|
|
9
9
|
var control_props_sync_controller_constants = require('./control_props_sync_controller_constants.js');
|
|
10
10
|
|
|
11
11
|
var _ControlPropsSyncConsumerController_host, _ControlPropsSyncConsumerController_contextConsumer, _ControlPropsSyncConsumerController_basePropsObservable, _ControlPropsSyncConsumerController_propsObserver, _ControlPropsSyncConsumerController_onPropsUpdated;
|
package/build/cjs/packages/phoenix/src/components/form/select/components/select_close_btn.js
CHANGED
|
@@ -7,6 +7,7 @@ var phoenix_light_lit_element = require('../../../../core/phoenix_light_lit_elem
|
|
|
7
7
|
var phoenix_custom_element = require('../../../../core/decorators/phoenix_custom_element.js');
|
|
8
8
|
var select_components_constatns = require('./select_components_constatns.js');
|
|
9
9
|
var btn_controller = require('../../../../controllers/btn_controller/btn_controller.js');
|
|
10
|
+
var icon_constants = require('../../../icon/icon_constants.js');
|
|
10
11
|
var litHtml = require('lit-html');
|
|
11
12
|
|
|
12
13
|
exports.HSelectCloseBtn = class HSelectCloseBtn extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -28,7 +29,7 @@ exports.HSelectCloseBtn = class HSelectCloseBtn extends phoenix_light_lit_elemen
|
|
|
28
29
|
render() {
|
|
29
30
|
return litHtml.html `${this.hasSlot(select_components_constatns.SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME)
|
|
30
31
|
? this.getSlot(select_components_constatns.SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME)
|
|
31
|
-
: litHtml.html
|
|
32
|
+
: litHtml.html ` <h-icon size=${icon_constants.ICONS_SIZES.l} icon-name="icon-x"></h-icon>`} `;
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
exports.HSelectCloseBtn = tslib_es6.__decorate([
|
package/build/cjs/packages/phoenix/src/components/form/select/components/select_close_btn.js.map
CHANGED
|
@@ -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;"}
|
|
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;"}
|
|
@@ -20,7 +20,8 @@ const SELECT_RELATED_COMPONENTS_NAMES = {
|
|
|
20
20
|
optionContent: 'h-option-content',
|
|
21
21
|
toggler: 'h-select-toggler',
|
|
22
22
|
closeBtn: 'h-select-close-btn',
|
|
23
|
-
search: 'h-select-search'
|
|
23
|
+
search: 'h-select-search',
|
|
24
|
+
placeholder: 'h-placeholder'
|
|
24
25
|
};
|
|
25
26
|
const SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME = 'content';
|
|
26
27
|
const SELECT_INPUT_PLACEHOLDER_SLOT_NAME = 'placeholder';
|
|
@@ -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;"}
|
|
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;"}
|
package/build/cjs/packages/phoenix/src/components/form/select/components/toggler/select_toggler.js
CHANGED
|
@@ -7,10 +7,10 @@ var decorators = require('lit/decorators');
|
|
|
7
7
|
var phoenix_light_lit_element = require('../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../../../../core/decorators/phoenix_custom_element.js');
|
|
9
9
|
var select_components_constatns = require('../select_components_constatns.js');
|
|
10
|
+
var observer = require('../../../../../core/classes/observer/observer.js');
|
|
10
11
|
var litHtml = require('lit-html');
|
|
11
12
|
var context_consumer_controller = require('../../../../../core/context/context_consumer_controller.js');
|
|
12
13
|
var select_constants = require('../../select_constants.js');
|
|
13
|
-
var observer = require('../../../../../core/classes/observer/observer.js');
|
|
14
14
|
var observable_directive = require('../../../../../directives/observable_directive.js');
|
|
15
15
|
var select_toggler_constants = require('./select_toggler_constants.js');
|
|
16
16
|
|
|
@@ -32,7 +32,7 @@ exports.HSelectToggler = class HSelectToggler extends phoenix_light_lit_element.
|
|
|
32
32
|
}
|
|
33
33
|
connectedCallback() {
|
|
34
34
|
super.connectedCallback();
|
|
35
|
-
this.setAttribute('slot', select_constants.SELECT_SLOT_NAMES.
|
|
35
|
+
this.setAttribute('slot', select_constants.SELECT_SLOT_NAMES.toggler);
|
|
36
36
|
this.setAttribute('role', 'textbox');
|
|
37
37
|
this.classList.add(select_toggler_constants.SELECT_TOGGLER_CSS_CLASSES.selectToggler);
|
|
38
38
|
this._subscribeObserver();
|
|
@@ -55,19 +55,17 @@ exports.HSelectToggler = class HSelectToggler extends phoenix_light_lit_element.
|
|
|
55
55
|
${observable_directive.observe(this.selectedOptions$, (selectOptions) => {
|
|
56
56
|
var _a;
|
|
57
57
|
if (!selectOptions.length)
|
|
58
|
-
return litHtml.html
|
|
59
|
-
|
|
60
|
-
>`;
|
|
61
|
-
return litHtml.html `<ul class=${select_toggler_constants.SELECT_TOGGLER_CSS_CLASSES.selectTogglerValues}>
|
|
58
|
+
return litHtml.html `${(_a = this.getSlot(select_components_constatns.SELECT_INPUT_PLACEHOLDER_SLOT_NAME)) !== null && _a !== void 0 ? _a : 'Select'}`;
|
|
59
|
+
return litHtml.html ` <ul class=${select_toggler_constants.SELECT_TOGGLER_CSS_CLASSES.selectTogglerValues}>
|
|
62
60
|
${this.isMultiselect
|
|
63
|
-
? selectOptions.map((option) => litHtml.html
|
|
61
|
+
? selectOptions.map((option) => litHtml.html ` <li>
|
|
64
62
|
<h-tag @tag.remove=${() => this._dispatchOptionDeselect(option)}>
|
|
65
63
|
${option.content}
|
|
66
64
|
|
|
67
65
|
<h-tag-remove-button></h-tag-remove-button>
|
|
68
66
|
</h-tag>
|
|
69
67
|
</li>`)
|
|
70
|
-
: litHtml.html
|
|
68
|
+
: litHtml.html ` <li>${selectOptions[0].content}</li>`}
|
|
71
69
|
</ul>`;
|
|
72
70
|
})}
|
|
73
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,qDAAyD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qDAAyD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -9,12 +9,14 @@ var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element
|
|
|
9
9
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
10
10
|
var decorators_js = require('@lit/reactive-element/decorators.js');
|
|
11
11
|
var select_components_constatns = require('./components/select_components_constatns.js');
|
|
12
|
+
var observer = require('../../../core/classes/observer/observer.js');
|
|
12
13
|
var icon = require('../../icon/icon.js');
|
|
13
14
|
var select_constants = require('./select_constants.js');
|
|
14
|
-
var observer = require('../../../core/classes/observer/observer.js');
|
|
15
15
|
var observable_directive = require('../../../directives/observable_directive.js');
|
|
16
|
+
var select_toggler = require('./components/toggler/select_toggler.js');
|
|
16
17
|
var context_provider_controller = require('../../../core/context/context_provider_controller.js');
|
|
17
18
|
var ref_js = require('lit-html/directives/ref.js');
|
|
19
|
+
var global_constants = require('../../../global_constants.js');
|
|
18
20
|
var debounce = require('../../../../../../external/lodash/debounce.js');
|
|
19
21
|
var multi_select_controller = require('./controllers/multi_select_controller.js');
|
|
20
22
|
var select_controller = require('./controllers/select_controller.js');
|
|
@@ -26,6 +28,7 @@ var select_close_btn = require('./components/select_close_btn.js');
|
|
|
26
28
|
|
|
27
29
|
exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
28
30
|
constructor() {
|
|
31
|
+
var _a;
|
|
29
32
|
super();
|
|
30
33
|
this.multiselect = false;
|
|
31
34
|
this.opened = false;
|
|
@@ -37,9 +40,9 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
37
40
|
this._$optionsList = ref_js.createRef();
|
|
38
41
|
this._$dropdownContent = ref_js.createRef();
|
|
39
42
|
this._selectContext = new context_provider_controller.ContextProviderController(this);
|
|
40
|
-
this._setDropdownContentWidth = () => {
|
|
43
|
+
this._setDropdownContentWidth = (width) => {
|
|
41
44
|
if (this._$dropdownContent.value)
|
|
42
|
-
this._$dropdownContent.value.style.width = `${
|
|
45
|
+
this._$dropdownContent.value.style.width = `${width !== null && width !== void 0 ? width : ''}px`;
|
|
43
46
|
};
|
|
44
47
|
this._handleOptionDeselect = (event) => {
|
|
45
48
|
const selectedOption = this._selectController.getSelectOption(event.detail);
|
|
@@ -71,23 +74,26 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
71
74
|
if (!this.multiselect)
|
|
72
75
|
this._closeSelect();
|
|
73
76
|
};
|
|
77
|
+
this._handleDropdownHidden = () => {
|
|
78
|
+
this._searchValue = '';
|
|
79
|
+
this.opened = false;
|
|
80
|
+
};
|
|
74
81
|
this._closeSelect = () => {
|
|
75
82
|
var _a;
|
|
76
83
|
if (!this.opened)
|
|
77
84
|
return;
|
|
78
85
|
(_a = this._$dropdown.value) === null || _a === void 0 ? void 0 : _a.hide();
|
|
79
|
-
this._searchValue = '';
|
|
80
|
-
this.opened = false;
|
|
81
86
|
};
|
|
82
87
|
this._clearOptions = () => {
|
|
83
88
|
this._selectController.deselectOptions();
|
|
84
89
|
};
|
|
85
90
|
this._handleResize = debounce['default'](() => {
|
|
86
91
|
this._closeSelect();
|
|
87
|
-
this._setDropdownContentWidth();
|
|
92
|
+
this._setDropdownContentWidth(this._getDropdownContentWidth());
|
|
88
93
|
}, select_constants.SELECT_RESIZE_DEBOUNCE_TIME);
|
|
89
94
|
const $options = Array.from(this.querySelectorAll(select_components_constatns.SELECT_RELATED_COMPONENTS_NAMES.option));
|
|
90
95
|
$options.forEach(($option) => $option.setAttribute('slot', select_constants.SELECT_SLOT_NAMES.content));
|
|
96
|
+
this.$placeholder = (_a = this.querySelector(`[slot="${select_components_constatns.SELECT_INPUT_PLACEHOLDER_SLOT_NAME}"]`)) !== null && _a !== void 0 ? _a : 'Select';
|
|
91
97
|
}
|
|
92
98
|
updated(changedProperties) {
|
|
93
99
|
super.updated(changedProperties);
|
|
@@ -146,7 +152,7 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
146
152
|
}
|
|
147
153
|
firstUpdated(props) {
|
|
148
154
|
super.firstUpdated(props);
|
|
149
|
-
this._setDropdownContentWidth();
|
|
155
|
+
this._setDropdownContentWidth(this._getDropdownContentWidth());
|
|
150
156
|
}
|
|
151
157
|
_setupEvents() {
|
|
152
158
|
this.addEventListener(select_constants.SELECT_EVENT_NAMES.deselectOption, this._handleOptionDeselect);
|
|
@@ -189,6 +195,15 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
189
195
|
this._selectController.options$.unsubscribe(this._optionsObserver);
|
|
190
196
|
window.removeEventListener('resize', this._handleResize);
|
|
191
197
|
}
|
|
198
|
+
_getDropdownContentWidth() {
|
|
199
|
+
return document.documentElement.clientWidth < global_constants.BREAKPOINTS.xs ? undefined : this.getBoundingClientRect().width;
|
|
200
|
+
}
|
|
201
|
+
_getClonedPlaceholderElement() {
|
|
202
|
+
return this.$placeholder instanceof HTMLElement ? this.$placeholder.cloneNode(true) : this.$placeholder;
|
|
203
|
+
}
|
|
204
|
+
_searchNoResult() {
|
|
205
|
+
return Boolean(!this._selectController.visibleOptionsCount && Object.keys(this._$options).length);
|
|
206
|
+
}
|
|
192
207
|
render() {
|
|
193
208
|
var _a;
|
|
194
209
|
const options = (_a = this._selectController.options$.getValue()) !== null && _a !== void 0 ? _a : [];
|
|
@@ -196,17 +211,26 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
196
211
|
<h-dropdown
|
|
197
212
|
${ref_js.ref(this._$dropdown)}
|
|
198
213
|
@dropdown.showed=${() => (this.opened = true)}
|
|
199
|
-
@dropdown.hidden=${this.
|
|
214
|
+
@dropdown.hidden=${this._handleDropdownHidden}
|
|
200
215
|
name=${this.controlName}
|
|
201
216
|
offset=${this.offset}
|
|
202
217
|
>
|
|
203
|
-
<h-dropdown-toggler name=${this.controlName}> ${this.getSlot(select_constants.SELECT_SLOT_NAMES.
|
|
218
|
+
<h-dropdown-toggler name=${this.controlName}> ${this.getSlot(select_constants.SELECT_SLOT_NAMES.toggler)} </h-dropdown-toggler>
|
|
219
|
+
|
|
220
|
+
<h-dropdown-content
|
|
221
|
+
class="${select_constants.SELECT_CSS_CLASSES.selectContent} ${this.error ? select_constants.SELECT_CSS_CLASSES.selectContentError : ''}"
|
|
222
|
+
${ref_js.ref(this._$dropdownContent)}
|
|
223
|
+
name=${this.controlName}
|
|
224
|
+
>
|
|
225
|
+
<h-select-close-btn
|
|
226
|
+
class="${select_constants.SELECT_CSS_CLASSES.selectCloseMobileButton}"
|
|
227
|
+
@selectCloseBtn.close=${this._closeSelect}
|
|
228
|
+
></h-select-close-btn>
|
|
204
229
|
|
|
205
|
-
|
|
206
|
-
<h-select-close-btn @selectCloseBtn.close=${this._closeSelect}></h-select-close-btn>
|
|
230
|
+
<div class=${select_constants.SELECT_CSS_CLASSES.selectLabel}>${lit.html `${this._getClonedPlaceholderElement()}`}</div>
|
|
207
231
|
|
|
208
232
|
${options.length > select_constants.MIN_NUMBER_OF_OPTIONS_TO_SHOW_SEARCH
|
|
209
|
-
? lit.html
|
|
233
|
+
? lit.html ` <h-select-search
|
|
210
234
|
class=${select_constants.SELECT_CSS_CLASSES.selectSearch}
|
|
211
235
|
${ref_js.ref(this._$search)}
|
|
212
236
|
.value=${this._searchValue}
|
|
@@ -216,7 +240,9 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
216
240
|
${this.hasSlot(select_constants.SELECT_SLOT_NAMES.content)
|
|
217
241
|
? lit.html `
|
|
218
242
|
<h-options
|
|
219
|
-
class
|
|
243
|
+
class="${select_constants.SELECT_CSS_CLASSES.selectOptions} ${this._searchNoResult()
|
|
244
|
+
? select_constants.SELECT_CSS_CLASSES.selectOptionsEmpty
|
|
245
|
+
: ''}"
|
|
220
246
|
${ref_js.ref(this._$optionsList)}
|
|
221
247
|
@selectOptions.clicked=${this._handleOptionClicked}
|
|
222
248
|
>
|
|
@@ -224,8 +250,8 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
224
250
|
</h-options>
|
|
225
251
|
`
|
|
226
252
|
: lit.nothing}
|
|
227
|
-
${
|
|
228
|
-
? lit.html
|
|
253
|
+
${this._searchNoResult()
|
|
254
|
+
? lit.html ` <div>
|
|
229
255
|
<p class=${select_constants.SELECT_CSS_CLASSES.selectNoResult}>
|
|
230
256
|
Brak wyników dla: <em class=${select_constants.SELECT_CSS_CLASSES.selectSearchedPhrase}>"${this._searchValue}"</em>
|
|
231
257
|
</p>
|
|
@@ -234,10 +260,10 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
234
260
|
${this.multiselect && this._selectController.selectedOptionsCount >= 1
|
|
235
261
|
? lit.html `
|
|
236
262
|
<section class=${select_constants.SELECT_CSS_CLASSES.selectFooter}>
|
|
237
|
-
<button class="
|
|
238
|
-
<h-select-close-btn class="
|
|
239
|
-
>ok</
|
|
240
|
-
>
|
|
263
|
+
<button class="${select_constants.SELECT_CSS_CLASSES.selectClearButton}" @click=${this._clearOptions}>clear</button>
|
|
264
|
+
<h-select-close-btn class="${select_constants.SELECT_CSS_CLASSES.selectCloseButton}" @selectCloseBtn.close=${this._closeSelect}
|
|
265
|
+
><span slot=${select_components_constatns.SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME}>ok</span>
|
|
266
|
+
</h-select-close-btn>
|
|
241
267
|
</section>
|
|
242
268
|
`
|
|
243
269
|
: lit.nothing}
|
|
@@ -251,7 +277,8 @@ exports.HSelect = class HSelect extends phoenix_light_lit_element.PhoenixLightLi
|
|
|
251
277
|
exports.HSelect._components = {
|
|
252
278
|
search: select_search.HSelectSearch,
|
|
253
279
|
icon: icon.HIcon,
|
|
254
|
-
closeBtn: select_close_btn.HSelectCloseBtn
|
|
280
|
+
closeBtn: select_close_btn.HSelectCloseBtn,
|
|
281
|
+
toggler: select_toggler.HSelectToggler
|
|
255
282
|
};
|
|
256
283
|
tslib_es6.__decorate([
|
|
257
284
|
decorators_js.property({ type: String }),
|
|
@@ -1 +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,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,7 +8,7 @@ const SELECT_CONTEXTS = {
|
|
|
8
8
|
};
|
|
9
9
|
const SELECT_SLOT_NAMES = {
|
|
10
10
|
content: 'content',
|
|
11
|
-
|
|
11
|
+
toggler: 'toggler'
|
|
12
12
|
};
|
|
13
13
|
const SELECT_EVENT_NAMES = {
|
|
14
14
|
selectOption: 'selectOption.select',
|
|
@@ -24,10 +24,16 @@ const SELECT_CSS_CLASSES = {
|
|
|
24
24
|
selectDisabled: `${baseSelectClass}_disabled`,
|
|
25
25
|
selectSearch: `${baseSelectClass}__search`,
|
|
26
26
|
selectOptions: `${baseSelectClass}__options`,
|
|
27
|
+
selectOptionsEmpty: `${baseSelectClass}__options_empty`,
|
|
27
28
|
selectContent: `${baseSelectClass}__content`,
|
|
29
|
+
selectContentError: `${baseSelectClass}__content_error`,
|
|
28
30
|
selectFooter: `${baseSelectClass}__footer`,
|
|
29
31
|
selectNoResult: `${baseSelectClass}__no-result`,
|
|
30
|
-
selectSearchedPhrase: `${baseSelectClass}__searched-phrase
|
|
32
|
+
selectSearchedPhrase: `${baseSelectClass}__searched-phrase`,
|
|
33
|
+
selectCloseMobileButton: `${baseSelectClass}__close-mobile-btn`,
|
|
34
|
+
selectClearButton: `${baseSelectClass}__clear-btn`,
|
|
35
|
+
selectCloseButton: `${baseSelectClass}__close-btn`,
|
|
36
|
+
selectLabel: `${baseSelectClass}__label`
|
|
31
37
|
};
|
|
32
38
|
|
|
33
39
|
exports.MIN_NUMBER_OF_OPTIONS_TO_SHOW_SEARCH = MIN_NUMBER_OF_OPTIONS_TO_SHOW_SEARCH;
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -10,19 +10,27 @@ var phoenix_custom_element = require('../../core/decorators/phoenix_custom_eleme
|
|
|
10
10
|
var icon_constants = require('./icon_constants.js');
|
|
11
11
|
var index = require('../../../external/classnames/index.js');
|
|
12
12
|
var namespaced_attribure_directive = require('../../directives/namespaced_attribure_directive.js');
|
|
13
|
+
var observer = require('../../core/classes/observer/observer.js');
|
|
14
|
+
var subject = require('../../core/classes/subject/subject.js');
|
|
13
15
|
|
|
14
16
|
var HIcon_1;
|
|
15
17
|
exports.HIcon = HIcon_1 = class HIcon extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
16
18
|
constructor() {
|
|
17
|
-
super(
|
|
19
|
+
super();
|
|
18
20
|
this.filled = false;
|
|
19
21
|
this.clickable = false;
|
|
20
22
|
this.noStroke = false;
|
|
23
|
+
this._srcObserverCallback = (src) => {
|
|
24
|
+
if (src)
|
|
25
|
+
this.requestUpdate();
|
|
26
|
+
};
|
|
27
|
+
this._srcObserver = new observer.Observer(this._srcObserverCallback);
|
|
28
|
+
HIcon_1.src.subscribe(this._srcObserver);
|
|
21
29
|
}
|
|
22
30
|
connectedCallback() {
|
|
23
31
|
var _a;
|
|
24
32
|
super.connectedCallback();
|
|
25
|
-
|
|
33
|
+
HIcon_1.src.subscribe(this._srcObserver);
|
|
26
34
|
this._cssClasses = index['default'](icon_constants.ICON_CSS_CLASSES.icon, {
|
|
27
35
|
[icon_constants.ICON_SIZES_CSS_CLASS_MAP[(_a = this.size) !== null && _a !== void 0 ? _a : '']]: Boolean(this.size),
|
|
28
36
|
[icon_constants.ICON_CSS_CLASSES.iconFilled]: this.filled,
|
|
@@ -30,15 +38,20 @@ exports.HIcon = HIcon_1 = class HIcon extends phoenix_light_lit_element.PhoenixL
|
|
|
30
38
|
[icon_constants.ICON_CSS_CLASSES.iconClickable]: this.clickable
|
|
31
39
|
});
|
|
32
40
|
}
|
|
41
|
+
disconnectedCallback() {
|
|
42
|
+
HIcon_1.src.unsubscribe(this._srcObserver);
|
|
43
|
+
}
|
|
33
44
|
render() {
|
|
34
|
-
|
|
45
|
+
if (!HIcon_1.src.getValue())
|
|
46
|
+
return null;
|
|
35
47
|
return lit.html `
|
|
36
48
|
<svg class="${this._cssClasses}">
|
|
37
|
-
<use xlink:href="${namespaced_attribure_directive.namespacedAttribute('http://www.w3.org/1999/xlink', `${HIcon_1.src}#${this.iconName}`)}"></use>
|
|
49
|
+
<use xlink:href="${namespaced_attribure_directive.namespacedAttribute('http://www.w3.org/1999/xlink', `${HIcon_1.src.getValue()}#${this.iconName}`)}"></use>
|
|
38
50
|
</svg>
|
|
39
51
|
`;
|
|
40
52
|
}
|
|
41
53
|
};
|
|
54
|
+
exports.HIcon.src = new subject.Subject();
|
|
42
55
|
tslib_es6.__decorate([
|
|
43
56
|
decorators.property({ type: String, attribute: 'icon-name' }),
|
|
44
57
|
tslib_es6.__metadata("design:type", String)
|
|
@@ -60,6 +73,7 @@ tslib_es6.__decorate([
|
|
|
60
73
|
tslib_es6.__metadata("design:type", Boolean)
|
|
61
74
|
], exports.HIcon.prototype, "noStroke", void 0);
|
|
62
75
|
exports.HIcon = HIcon_1 = tslib_es6.__decorate([
|
|
63
|
-
phoenix_custom_element.phoenixCustomElement('h-icon')
|
|
76
|
+
phoenix_custom_element.phoenixCustomElement('h-icon'),
|
|
77
|
+
tslib_es6.__metadata("design:paramtypes", [])
|
|
64
78
|
], exports.HIcon);
|
|
65
79
|
//# sourceMappingURL=icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAA2C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAA2C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -16,8 +16,14 @@ const ICON_SIZES_CSS_CLASS_MAP = {
|
|
|
16
16
|
l: ICON_CSS_CLASSES.iconSizeL,
|
|
17
17
|
xl: ICON_CSS_CLASSES.iconSizeXl,
|
|
18
18
|
xxl: ICON_CSS_CLASSES.iconSizeXxl
|
|
19
|
+
};
|
|
20
|
+
const ICONS_SIZES = {
|
|
21
|
+
l: 'l',
|
|
22
|
+
xl: 'xl',
|
|
23
|
+
xxl: 'xxl'
|
|
19
24
|
};
|
|
20
25
|
|
|
26
|
+
exports.ICONS_SIZES = ICONS_SIZES;
|
|
21
27
|
exports.ICON_CSS_CLASSES = ICON_CSS_CLASSES;
|
|
22
28
|
exports.ICON_SIZES_CSS_CLASS_MAP = ICON_SIZES_CSS_CLASS_MAP;
|
|
23
29
|
//# sourceMappingURL=icon_constants.js.map
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -2,8 +2,8 @@ import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.
|
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
|
-
import { ContextConsumerController } from '../../core/context/context_consumer_controller.js';
|
|
6
5
|
import { Observer } from '../../core/classes/observer/observer.js';
|
|
6
|
+
import { ContextConsumerController } from '../../core/context/context_consumer_controller.js';
|
|
7
7
|
import { ACCORDION_CONTEXTS } from './accordion_constants.js';
|
|
8
8
|
import { TransitionController } from '../../controllers/transition_controller/transition_controller.js';
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@ import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.
|
|
|
2
2
|
import { property, state } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
|
-
import { ContextConsumerController } from '../../core/context/context_consumer_controller.js';
|
|
6
5
|
import { Observer } from '../../core/classes/observer/observer.js';
|
|
6
|
+
import { ContextConsumerController } from '../../core/context/context_consumer_controller.js';
|
|
7
7
|
import { BehaviorSubject } from '../../core/classes/behavior_subject/behavior_subject.js';
|
|
8
8
|
import { ContextProviderController } from '../../core/context/context_provider_controller.js';
|
|
9
9
|
import { ACCORDION_MODE, ACCORDION_CONTEXTS, ACCORDION_EVENTS } from './accordion_constants.js';
|
|
@@ -2,8 +2,8 @@ import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.
|
|
|
2
2
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
3
3
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
4
4
|
import { BtnController } from '../../controllers/btn_controller/btn_controller.js';
|
|
5
|
-
import { ContextConsumerController } from '../../core/context/context_consumer_controller.js';
|
|
6
5
|
import { Observer } from '../../core/classes/observer/observer.js';
|
|
6
|
+
import { ContextConsumerController } from '../../core/context/context_consumer_controller.js';
|
|
7
7
|
import { ACCORDION_EVENTS, ACCORDION_CONTEXTS } from './accordion_constants.js';
|
|
8
8
|
|
|
9
9
|
let HAccordionToggler = class HAccordionToggler extends PhoenixLightLitElement {
|
package/build/esm/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { BACKDROP_EVENTS } from '../backdrop_constants.js';
|
|
2
2
|
|
|
3
3
|
class BackdropController {
|
|
4
|
+
constructor() {
|
|
5
|
+
this._isVisible = false;
|
|
6
|
+
}
|
|
4
7
|
hide() {
|
|
5
8
|
this._dispatchEvent(BACKDROP_EVENTS.hide);
|
|
9
|
+
this._isVisible = false;
|
|
6
10
|
}
|
|
7
11
|
show() {
|
|
12
|
+
if (this._isVisible)
|
|
13
|
+
return;
|
|
8
14
|
this._dispatchEvent(BACKDROP_EVENTS.show);
|
|
15
|
+
this._isVisible = true;
|
|
9
16
|
}
|
|
10
17
|
_dispatchEvent(eventName) {
|
|
11
18
|
const hideBackdropEvent = new CustomEvent(eventName, {
|
package/build/esm/packages/phoenix/src/components/backdrop/controller/backdrop_controller.js.map
CHANGED
|
@@ -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;"}
|
|
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;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __classPrivateFieldGet, __classPrivateFieldSet } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import 'lit';
|
|
3
|
-
import { ContextConsumerController } from '../../../../core/context/context_consumer_controller.js';
|
|
4
3
|
import { Observer } from '../../../../core/classes/observer/observer.js';
|
|
4
|
+
import { ContextConsumerController } from '../../../../core/context/context_consumer_controller.js';
|
|
5
5
|
import { FORM_CONTROL_CONTEXTS } from './control_props_sync_controller_constants.js';
|
|
6
6
|
|
|
7
7
|
var _ControlPropsSyncConsumerController_host, _ControlPropsSyncConsumerController_contextConsumer, _ControlPropsSyncConsumerController_basePropsObservable, _ControlPropsSyncConsumerController_propsObserver, _ControlPropsSyncConsumerController_onPropsUpdated;
|
package/build/esm/packages/phoenix/src/components/form/select/components/select_close_btn.js
CHANGED
|
@@ -3,6 +3,7 @@ import { PhoenixLightLitElement } from '../../../../core/phoenix_light_lit_eleme
|
|
|
3
3
|
import { phoenixCustomElement } from '../../../../core/decorators/phoenix_custom_element.js';
|
|
4
4
|
import { SELECT_CLOSE_BTN_EVENT_NAMES, SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME, SELECT_RELATED_COMPONENTS_NAMES } from './select_components_constatns.js';
|
|
5
5
|
import { BtnController } from '../../../../controllers/btn_controller/btn_controller.js';
|
|
6
|
+
import { ICONS_SIZES } from '../../../icon/icon_constants.js';
|
|
6
7
|
import { html } from 'lit-html';
|
|
7
8
|
|
|
8
9
|
let HSelectCloseBtn = class HSelectCloseBtn extends PhoenixLightLitElement {
|
|
@@ -24,7 +25,7 @@ let HSelectCloseBtn = class HSelectCloseBtn extends PhoenixLightLitElement {
|
|
|
24
25
|
render() {
|
|
25
26
|
return html `${this.hasSlot(SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME)
|
|
26
27
|
? this.getSlot(SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME)
|
|
27
|
-
: html
|
|
28
|
+
: html ` <h-icon size=${ICONS_SIZES.l} icon-name="icon-x"></h-icon>`} `;
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
HSelectCloseBtn = __decorate([
|
package/build/esm/packages/phoenix/src/components/form/select/components/select_close_btn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,2BAA2B,kDAAsD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,2BAA2B,kDAAsD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -17,6 +17,7 @@ export declare const SELECT_RELATED_COMPONENTS_NAMES: {
|
|
|
17
17
|
readonly toggler: "h-select-toggler";
|
|
18
18
|
readonly closeBtn: "h-select-close-btn";
|
|
19
19
|
readonly search: "h-select-search";
|
|
20
|
+
readonly placeholder: "h-placeholder";
|
|
20
21
|
};
|
|
21
22
|
export declare const SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME = "content";
|
|
22
23
|
export declare const SELECT_INPUT_PLACEHOLDER_SLOT_NAME = "placeholder";
|
|
@@ -16,7 +16,8 @@ const SELECT_RELATED_COMPONENTS_NAMES = {
|
|
|
16
16
|
optionContent: 'h-option-content',
|
|
17
17
|
toggler: 'h-select-toggler',
|
|
18
18
|
closeBtn: 'h-select-close-btn',
|
|
19
|
-
search: 'h-select-search'
|
|
19
|
+
search: 'h-select-search',
|
|
20
|
+
placeholder: 'h-placeholder'
|
|
20
21
|
};
|
|
21
22
|
const SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME = 'content';
|
|
22
23
|
const SELECT_INPUT_PLACEHOLDER_SLOT_NAME = 'placeholder';
|
|
@@ -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;"}
|
|
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;"}
|
package/build/esm/packages/phoenix/src/components/form/select/components/toggler/select_toggler.js
CHANGED
|
@@ -3,10 +3,10 @@ import { state } from 'lit/decorators';
|
|
|
3
3
|
import { PhoenixLightLitElement } from '../../../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../../../../core/decorators/phoenix_custom_element.js';
|
|
5
5
|
import { SELECT_INPUT_PLACEHOLDER_SLOT_NAME, SELECT_RELATED_COMPONENTS_NAMES } from '../select_components_constatns.js';
|
|
6
|
+
import { Observer } from '../../../../../core/classes/observer/observer.js';
|
|
6
7
|
import { html } from 'lit-html';
|
|
7
8
|
import { ContextConsumerController } from '../../../../../core/context/context_consumer_controller.js';
|
|
8
9
|
import { SELECT_EVENT_NAMES, SELECT_SLOT_NAMES, SELECT_CONTEXTS } from '../../select_constants.js';
|
|
9
|
-
import { Observer } from '../../../../../core/classes/observer/observer.js';
|
|
10
10
|
import { observe } from '../../../../../directives/observable_directive.js';
|
|
11
11
|
import { SELECT_TOGGLER_CSS_CLASSES } from './select_toggler_constants.js';
|
|
12
12
|
|
|
@@ -28,7 +28,7 @@ let HSelectToggler = class HSelectToggler extends PhoenixLightLitElement {
|
|
|
28
28
|
}
|
|
29
29
|
connectedCallback() {
|
|
30
30
|
super.connectedCallback();
|
|
31
|
-
this.setAttribute('slot', SELECT_SLOT_NAMES.
|
|
31
|
+
this.setAttribute('slot', SELECT_SLOT_NAMES.toggler);
|
|
32
32
|
this.setAttribute('role', 'textbox');
|
|
33
33
|
this.classList.add(SELECT_TOGGLER_CSS_CLASSES.selectToggler);
|
|
34
34
|
this._subscribeObserver();
|
|
@@ -51,19 +51,17 @@ let HSelectToggler = class HSelectToggler extends PhoenixLightLitElement {
|
|
|
51
51
|
${observe(this.selectedOptions$, (selectOptions) => {
|
|
52
52
|
var _a;
|
|
53
53
|
if (!selectOptions.length)
|
|
54
|
-
return html
|
|
55
|
-
|
|
56
|
-
>`;
|
|
57
|
-
return html `<ul class=${SELECT_TOGGLER_CSS_CLASSES.selectTogglerValues}>
|
|
54
|
+
return html `${(_a = this.getSlot(SELECT_INPUT_PLACEHOLDER_SLOT_NAME)) !== null && _a !== void 0 ? _a : 'Select'}`;
|
|
55
|
+
return html ` <ul class=${SELECT_TOGGLER_CSS_CLASSES.selectTogglerValues}>
|
|
58
56
|
${this.isMultiselect
|
|
59
|
-
? selectOptions.map((option) => html
|
|
57
|
+
? selectOptions.map((option) => html ` <li>
|
|
60
58
|
<h-tag @tag.remove=${() => this._dispatchOptionDeselect(option)}>
|
|
61
59
|
${option.content}
|
|
62
60
|
|
|
63
61
|
<h-tag-remove-button></h-tag-remove-button>
|
|
64
62
|
</h-tag>
|
|
65
63
|
</li>`)
|
|
66
|
-
: html
|
|
64
|
+
: html ` <li>${selectOptions[0].content}</li>`}
|
|
67
65
|
</ul>`;
|
|
68
66
|
})}
|
|
69
67
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,qDAAyD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,7 @@ export declare class HSelect extends PhoenixLightLitElement {
|
|
|
19
19
|
private _selectContext;
|
|
20
20
|
private _listBoxController;
|
|
21
21
|
private _optionsObserver;
|
|
22
|
+
private $placeholder;
|
|
22
23
|
constructor();
|
|
23
24
|
updated(changedProperties: PropertyValues): void;
|
|
24
25
|
private _focusElementAfterSelectOpened;
|
|
@@ -33,6 +34,7 @@ export declare class HSelect extends PhoenixLightLitElement {
|
|
|
33
34
|
private _removeHTMLOptions;
|
|
34
35
|
private _handleOptionClicked;
|
|
35
36
|
private _handleSearch;
|
|
37
|
+
private _handleDropdownHidden;
|
|
36
38
|
private _closeSelect;
|
|
37
39
|
private _clearOptions;
|
|
38
40
|
protected update(changedProperties: PropertyValues): void;
|
|
@@ -41,5 +43,8 @@ export declare class HSelect extends PhoenixLightLitElement {
|
|
|
41
43
|
replaceOptions(options: SelectOption[]): void;
|
|
42
44
|
disconnectedCallback(): void;
|
|
43
45
|
private _handleResize;
|
|
46
|
+
private _getDropdownContentWidth;
|
|
47
|
+
private _getClonedPlaceholderElement;
|
|
48
|
+
private _searchNoResult;
|
|
44
49
|
protected render(): TemplateResult;
|
|
45
50
|
}
|
|
@@ -4,13 +4,15 @@ import { state } 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 { property } from '@lit/reactive-element/decorators.js';
|
|
7
|
-
import { SELECT_RELATED_COMPONENTS_NAMES, SELECT_CLOSE_BTN_EVENT_NAMES } from './components/select_components_constatns.js';
|
|
7
|
+
import { SELECT_RELATED_COMPONENTS_NAMES, SELECT_INPUT_PLACEHOLDER_SLOT_NAME, SELECT_CLOSE_BTN_EVENT_NAMES, SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME } from './components/select_components_constatns.js';
|
|
8
|
+
import { Observer } from '../../../core/classes/observer/observer.js';
|
|
8
9
|
import { HIcon } from '../../icon/icon.js';
|
|
9
10
|
import { SELECT_SLOT_NAMES, SELECT_CSS_CLASSES, SELECT_CONTEXTS, SELECT_EVENT_NAMES, MIN_NUMBER_OF_OPTIONS_TO_SHOW_SEARCH, SELECT_RESIZE_DEBOUNCE_TIME } from './select_constants.js';
|
|
10
|
-
import { Observer } from '../../../core/classes/observer/observer.js';
|
|
11
11
|
import { observe } from '../../../directives/observable_directive.js';
|
|
12
|
+
import { HSelectToggler } from './components/toggler/select_toggler.js';
|
|
12
13
|
import { ContextProviderController } from '../../../core/context/context_provider_controller.js';
|
|
13
14
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
15
|
+
import { BREAKPOINTS } from '../../../global_constants.js';
|
|
14
16
|
import debounce_1 from '../../../../../../external/lodash/debounce.js';
|
|
15
17
|
import { MultiSelectController } from './controllers/multi_select_controller.js';
|
|
16
18
|
import { SelectController } from './controllers/select_controller.js';
|
|
@@ -22,6 +24,7 @@ import { HSelectCloseBtn } from './components/select_close_btn.js';
|
|
|
22
24
|
|
|
23
25
|
let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
24
26
|
constructor() {
|
|
27
|
+
var _a;
|
|
25
28
|
super();
|
|
26
29
|
this.multiselect = false;
|
|
27
30
|
this.opened = false;
|
|
@@ -33,9 +36,9 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
33
36
|
this._$optionsList = createRef();
|
|
34
37
|
this._$dropdownContent = createRef();
|
|
35
38
|
this._selectContext = new ContextProviderController(this);
|
|
36
|
-
this._setDropdownContentWidth = () => {
|
|
39
|
+
this._setDropdownContentWidth = (width) => {
|
|
37
40
|
if (this._$dropdownContent.value)
|
|
38
|
-
this._$dropdownContent.value.style.width = `${
|
|
41
|
+
this._$dropdownContent.value.style.width = `${width !== null && width !== void 0 ? width : ''}px`;
|
|
39
42
|
};
|
|
40
43
|
this._handleOptionDeselect = (event) => {
|
|
41
44
|
const selectedOption = this._selectController.getSelectOption(event.detail);
|
|
@@ -67,23 +70,26 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
67
70
|
if (!this.multiselect)
|
|
68
71
|
this._closeSelect();
|
|
69
72
|
};
|
|
73
|
+
this._handleDropdownHidden = () => {
|
|
74
|
+
this._searchValue = '';
|
|
75
|
+
this.opened = false;
|
|
76
|
+
};
|
|
70
77
|
this._closeSelect = () => {
|
|
71
78
|
var _a;
|
|
72
79
|
if (!this.opened)
|
|
73
80
|
return;
|
|
74
81
|
(_a = this._$dropdown.value) === null || _a === void 0 ? void 0 : _a.hide();
|
|
75
|
-
this._searchValue = '';
|
|
76
|
-
this.opened = false;
|
|
77
82
|
};
|
|
78
83
|
this._clearOptions = () => {
|
|
79
84
|
this._selectController.deselectOptions();
|
|
80
85
|
};
|
|
81
86
|
this._handleResize = debounce_1(() => {
|
|
82
87
|
this._closeSelect();
|
|
83
|
-
this._setDropdownContentWidth();
|
|
88
|
+
this._setDropdownContentWidth(this._getDropdownContentWidth());
|
|
84
89
|
}, SELECT_RESIZE_DEBOUNCE_TIME);
|
|
85
90
|
const $options = Array.from(this.querySelectorAll(SELECT_RELATED_COMPONENTS_NAMES.option));
|
|
86
91
|
$options.forEach(($option) => $option.setAttribute('slot', SELECT_SLOT_NAMES.content));
|
|
92
|
+
this.$placeholder = (_a = this.querySelector(`[slot="${SELECT_INPUT_PLACEHOLDER_SLOT_NAME}"]`)) !== null && _a !== void 0 ? _a : 'Select';
|
|
87
93
|
}
|
|
88
94
|
updated(changedProperties) {
|
|
89
95
|
super.updated(changedProperties);
|
|
@@ -142,7 +148,7 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
142
148
|
}
|
|
143
149
|
firstUpdated(props) {
|
|
144
150
|
super.firstUpdated(props);
|
|
145
|
-
this._setDropdownContentWidth();
|
|
151
|
+
this._setDropdownContentWidth(this._getDropdownContentWidth());
|
|
146
152
|
}
|
|
147
153
|
_setupEvents() {
|
|
148
154
|
this.addEventListener(SELECT_EVENT_NAMES.deselectOption, this._handleOptionDeselect);
|
|
@@ -185,6 +191,15 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
185
191
|
this._selectController.options$.unsubscribe(this._optionsObserver);
|
|
186
192
|
window.removeEventListener('resize', this._handleResize);
|
|
187
193
|
}
|
|
194
|
+
_getDropdownContentWidth() {
|
|
195
|
+
return document.documentElement.clientWidth < BREAKPOINTS.xs ? undefined : this.getBoundingClientRect().width;
|
|
196
|
+
}
|
|
197
|
+
_getClonedPlaceholderElement() {
|
|
198
|
+
return this.$placeholder instanceof HTMLElement ? this.$placeholder.cloneNode(true) : this.$placeholder;
|
|
199
|
+
}
|
|
200
|
+
_searchNoResult() {
|
|
201
|
+
return Boolean(!this._selectController.visibleOptionsCount && Object.keys(this._$options).length);
|
|
202
|
+
}
|
|
188
203
|
render() {
|
|
189
204
|
var _a;
|
|
190
205
|
const options = (_a = this._selectController.options$.getValue()) !== null && _a !== void 0 ? _a : [];
|
|
@@ -192,17 +207,26 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
192
207
|
<h-dropdown
|
|
193
208
|
${ref(this._$dropdown)}
|
|
194
209
|
@dropdown.showed=${() => (this.opened = true)}
|
|
195
|
-
@dropdown.hidden=${this.
|
|
210
|
+
@dropdown.hidden=${this._handleDropdownHidden}
|
|
196
211
|
name=${this.controlName}
|
|
197
212
|
offset=${this.offset}
|
|
198
213
|
>
|
|
199
|
-
<h-dropdown-toggler name=${this.controlName}> ${this.getSlot(SELECT_SLOT_NAMES.
|
|
214
|
+
<h-dropdown-toggler name=${this.controlName}> ${this.getSlot(SELECT_SLOT_NAMES.toggler)} </h-dropdown-toggler>
|
|
215
|
+
|
|
216
|
+
<h-dropdown-content
|
|
217
|
+
class="${SELECT_CSS_CLASSES.selectContent} ${this.error ? SELECT_CSS_CLASSES.selectContentError : ''}"
|
|
218
|
+
${ref(this._$dropdownContent)}
|
|
219
|
+
name=${this.controlName}
|
|
220
|
+
>
|
|
221
|
+
<h-select-close-btn
|
|
222
|
+
class="${SELECT_CSS_CLASSES.selectCloseMobileButton}"
|
|
223
|
+
@selectCloseBtn.close=${this._closeSelect}
|
|
224
|
+
></h-select-close-btn>
|
|
200
225
|
|
|
201
|
-
|
|
202
|
-
<h-select-close-btn @selectCloseBtn.close=${this._closeSelect}></h-select-close-btn>
|
|
226
|
+
<div class=${SELECT_CSS_CLASSES.selectLabel}>${html `${this._getClonedPlaceholderElement()}`}</div>
|
|
203
227
|
|
|
204
228
|
${options.length > MIN_NUMBER_OF_OPTIONS_TO_SHOW_SEARCH
|
|
205
|
-
? html
|
|
229
|
+
? html ` <h-select-search
|
|
206
230
|
class=${SELECT_CSS_CLASSES.selectSearch}
|
|
207
231
|
${ref(this._$search)}
|
|
208
232
|
.value=${this._searchValue}
|
|
@@ -212,7 +236,9 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
212
236
|
${this.hasSlot(SELECT_SLOT_NAMES.content)
|
|
213
237
|
? html `
|
|
214
238
|
<h-options
|
|
215
|
-
class
|
|
239
|
+
class="${SELECT_CSS_CLASSES.selectOptions} ${this._searchNoResult()
|
|
240
|
+
? SELECT_CSS_CLASSES.selectOptionsEmpty
|
|
241
|
+
: ''}"
|
|
216
242
|
${ref(this._$optionsList)}
|
|
217
243
|
@selectOptions.clicked=${this._handleOptionClicked}
|
|
218
244
|
>
|
|
@@ -220,8 +246,8 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
220
246
|
</h-options>
|
|
221
247
|
`
|
|
222
248
|
: nothing}
|
|
223
|
-
${
|
|
224
|
-
? html
|
|
249
|
+
${this._searchNoResult()
|
|
250
|
+
? html ` <div>
|
|
225
251
|
<p class=${SELECT_CSS_CLASSES.selectNoResult}>
|
|
226
252
|
Brak wyników dla: <em class=${SELECT_CSS_CLASSES.selectSearchedPhrase}>"${this._searchValue}"</em>
|
|
227
253
|
</p>
|
|
@@ -230,10 +256,10 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
230
256
|
${this.multiselect && this._selectController.selectedOptionsCount >= 1
|
|
231
257
|
? html `
|
|
232
258
|
<section class=${SELECT_CSS_CLASSES.selectFooter}>
|
|
233
|
-
<button class="
|
|
234
|
-
<h-select-close-btn class="
|
|
235
|
-
>ok</
|
|
236
|
-
>
|
|
259
|
+
<button class="${SELECT_CSS_CLASSES.selectClearButton}" @click=${this._clearOptions}>clear</button>
|
|
260
|
+
<h-select-close-btn class="${SELECT_CSS_CLASSES.selectCloseButton}" @selectCloseBtn.close=${this._closeSelect}
|
|
261
|
+
><span slot=${SELECT_CLOSE_BUTTON_CONTENT_SLOT_NAME}>ok</span>
|
|
262
|
+
</h-select-close-btn>
|
|
237
263
|
</section>
|
|
238
264
|
`
|
|
239
265
|
: nothing}
|
|
@@ -247,7 +273,8 @@ let HSelect = class HSelect extends PhoenixLightLitElement {
|
|
|
247
273
|
HSelect._components = {
|
|
248
274
|
search: HSelectSearch,
|
|
249
275
|
icon: HIcon,
|
|
250
|
-
closeBtn: HSelectCloseBtn
|
|
276
|
+
closeBtn: HSelectCloseBtn,
|
|
277
|
+
toggler: HSelectToggler
|
|
251
278
|
};
|
|
252
279
|
__decorate([
|
|
253
280
|
property({ type: String }),
|
|
@@ -1 +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,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+CAAmD;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,7 +4,7 @@ export declare const SELECT_CONTEXTS: {
|
|
|
4
4
|
};
|
|
5
5
|
export declare const SELECT_SLOT_NAMES: {
|
|
6
6
|
readonly content: "content";
|
|
7
|
-
readonly
|
|
7
|
+
readonly toggler: "toggler";
|
|
8
8
|
};
|
|
9
9
|
export declare const SELECT_EVENT_NAMES: {
|
|
10
10
|
readonly selectOption: "selectOption.select";
|
|
@@ -19,8 +19,14 @@ export declare const SELECT_CSS_CLASSES: {
|
|
|
19
19
|
readonly selectDisabled: "select_disabled";
|
|
20
20
|
readonly selectSearch: "select__search";
|
|
21
21
|
readonly selectOptions: "select__options";
|
|
22
|
+
readonly selectOptionsEmpty: "select__options_empty";
|
|
22
23
|
readonly selectContent: "select__content";
|
|
24
|
+
readonly selectContentError: "select__content_error";
|
|
23
25
|
readonly selectFooter: "select__footer";
|
|
24
26
|
readonly selectNoResult: "select__no-result";
|
|
25
27
|
readonly selectSearchedPhrase: "select__searched-phrase";
|
|
28
|
+
readonly selectCloseMobileButton: "select__close-mobile-btn";
|
|
29
|
+
readonly selectClearButton: "select__clear-btn";
|
|
30
|
+
readonly selectCloseButton: "select__close-btn";
|
|
31
|
+
readonly selectLabel: "select__label";
|
|
26
32
|
};
|
|
@@ -4,7 +4,7 @@ const SELECT_CONTEXTS = {
|
|
|
4
4
|
};
|
|
5
5
|
const SELECT_SLOT_NAMES = {
|
|
6
6
|
content: 'content',
|
|
7
|
-
|
|
7
|
+
toggler: 'toggler'
|
|
8
8
|
};
|
|
9
9
|
const SELECT_EVENT_NAMES = {
|
|
10
10
|
selectOption: 'selectOption.select',
|
|
@@ -20,10 +20,16 @@ const SELECT_CSS_CLASSES = {
|
|
|
20
20
|
selectDisabled: `${baseSelectClass}_disabled`,
|
|
21
21
|
selectSearch: `${baseSelectClass}__search`,
|
|
22
22
|
selectOptions: `${baseSelectClass}__options`,
|
|
23
|
+
selectOptionsEmpty: `${baseSelectClass}__options_empty`,
|
|
23
24
|
selectContent: `${baseSelectClass}__content`,
|
|
25
|
+
selectContentError: `${baseSelectClass}__content_error`,
|
|
24
26
|
selectFooter: `${baseSelectClass}__footer`,
|
|
25
27
|
selectNoResult: `${baseSelectClass}__no-result`,
|
|
26
|
-
selectSearchedPhrase: `${baseSelectClass}__searched-phrase
|
|
28
|
+
selectSearchedPhrase: `${baseSelectClass}__searched-phrase`,
|
|
29
|
+
selectCloseMobileButton: `${baseSelectClass}__close-mobile-btn`,
|
|
30
|
+
selectClearButton: `${baseSelectClass}__clear-btn`,
|
|
31
|
+
selectCloseButton: `${baseSelectClass}__close-btn`,
|
|
32
|
+
selectLabel: `${baseSelectClass}__label`
|
|
27
33
|
};
|
|
28
34
|
|
|
29
35
|
export { MIN_NUMBER_OF_OPTIONS_TO_SHOW_SEARCH, SELECT_CONTEXTS, SELECT_CSS_CLASSES, SELECT_EVENT_NAMES, SELECT_RESIZE_DEBOUNCE_TIME, SELECT_SLOT_NAMES };
|
|
@@ -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;"}
|
|
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;"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
2
|
import { TIconSize } from "./icon_constants";
|
|
3
3
|
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
4
|
+
import { Subject } from "../../core/classes/subject/subject";
|
|
4
5
|
export declare class HIcon extends PhoenixLightLitElement {
|
|
5
|
-
static src: string
|
|
6
|
+
static src: Subject<string>;
|
|
6
7
|
iconName: string;
|
|
7
8
|
size?: TIconSize | undefined;
|
|
8
9
|
filled: boolean;
|
|
9
10
|
clickable: boolean;
|
|
10
11
|
noStroke: boolean;
|
|
11
12
|
private _cssClasses;
|
|
13
|
+
private _srcObserver;
|
|
14
|
+
constructor();
|
|
15
|
+
private _srcObserverCallback;
|
|
12
16
|
connectedCallback(): void;
|
|
13
|
-
|
|
17
|
+
disconnectedCallback(): void;
|
|
18
|
+
protected render(): TemplateResult | null;
|
|
14
19
|
}
|
|
@@ -6,19 +6,27 @@ import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_eleme
|
|
|
6
6
|
import { ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP } from './icon_constants.js';
|
|
7
7
|
import classnames from '../../../external/classnames/index.js';
|
|
8
8
|
import { namespacedAttribute } from '../../directives/namespaced_attribure_directive.js';
|
|
9
|
+
import { Observer } from '../../core/classes/observer/observer.js';
|
|
10
|
+
import { Subject } from '../../core/classes/subject/subject.js';
|
|
9
11
|
|
|
10
12
|
var HIcon_1;
|
|
11
13
|
let HIcon = HIcon_1 = class HIcon extends PhoenixLightLitElement {
|
|
12
14
|
constructor() {
|
|
13
|
-
super(
|
|
15
|
+
super();
|
|
14
16
|
this.filled = false;
|
|
15
17
|
this.clickable = false;
|
|
16
18
|
this.noStroke = false;
|
|
19
|
+
this._srcObserverCallback = (src) => {
|
|
20
|
+
if (src)
|
|
21
|
+
this.requestUpdate();
|
|
22
|
+
};
|
|
23
|
+
this._srcObserver = new Observer(this._srcObserverCallback);
|
|
24
|
+
HIcon_1.src.subscribe(this._srcObserver);
|
|
17
25
|
}
|
|
18
26
|
connectedCallback() {
|
|
19
27
|
var _a;
|
|
20
28
|
super.connectedCallback();
|
|
21
|
-
|
|
29
|
+
HIcon_1.src.subscribe(this._srcObserver);
|
|
22
30
|
this._cssClasses = classnames(ICON_CSS_CLASSES.icon, {
|
|
23
31
|
[ICON_SIZES_CSS_CLASS_MAP[(_a = this.size) !== null && _a !== void 0 ? _a : '']]: Boolean(this.size),
|
|
24
32
|
[ICON_CSS_CLASSES.iconFilled]: this.filled,
|
|
@@ -26,15 +34,20 @@ let HIcon = HIcon_1 = class HIcon extends PhoenixLightLitElement {
|
|
|
26
34
|
[ICON_CSS_CLASSES.iconClickable]: this.clickable
|
|
27
35
|
});
|
|
28
36
|
}
|
|
37
|
+
disconnectedCallback() {
|
|
38
|
+
HIcon_1.src.unsubscribe(this._srcObserver);
|
|
39
|
+
}
|
|
29
40
|
render() {
|
|
30
|
-
|
|
41
|
+
if (!HIcon_1.src.getValue())
|
|
42
|
+
return null;
|
|
31
43
|
return html `
|
|
32
44
|
<svg class="${this._cssClasses}">
|
|
33
|
-
<use xlink:href="${namespacedAttribute('http://www.w3.org/1999/xlink', `${HIcon_1.src}#${this.iconName}`)}"></use>
|
|
45
|
+
<use xlink:href="${namespacedAttribute('http://www.w3.org/1999/xlink', `${HIcon_1.src.getValue()}#${this.iconName}`)}"></use>
|
|
34
46
|
</svg>
|
|
35
47
|
`;
|
|
36
48
|
}
|
|
37
49
|
};
|
|
50
|
+
HIcon.src = new Subject();
|
|
38
51
|
__decorate([
|
|
39
52
|
property({ type: String, attribute: 'icon-name' }),
|
|
40
53
|
__metadata("design:type", String)
|
|
@@ -56,7 +69,8 @@ __decorate([
|
|
|
56
69
|
__metadata("design:type", Boolean)
|
|
57
70
|
], HIcon.prototype, "noStroke", void 0);
|
|
58
71
|
HIcon = HIcon_1 = __decorate([
|
|
59
|
-
phoenixCustomElement('h-icon')
|
|
72
|
+
phoenixCustomElement('h-icon'),
|
|
73
|
+
__metadata("design:paramtypes", [])
|
|
60
74
|
], HIcon);
|
|
61
75
|
|
|
62
76
|
export { HIcon };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA,uBAAuB,uCAA2C;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;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA,uBAAuB,uCAA2C;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;"}
|
|
@@ -13,4 +13,9 @@ export declare const ICON_SIZES_CSS_CLASS_MAP: {
|
|
|
13
13
|
readonly xl: "icon_xl";
|
|
14
14
|
readonly xxl: "icon_xxl";
|
|
15
15
|
};
|
|
16
|
+
export declare const ICONS_SIZES: {
|
|
17
|
+
readonly l: "l";
|
|
18
|
+
readonly xl: "xl";
|
|
19
|
+
readonly xxl: "xxl";
|
|
20
|
+
};
|
|
16
21
|
export declare type TIconSize = Any.Keys<typeof ICON_SIZES_CSS_CLASS_MAP>;
|
|
@@ -12,7 +12,12 @@ const ICON_SIZES_CSS_CLASS_MAP = {
|
|
|
12
12
|
l: ICON_CSS_CLASSES.iconSizeL,
|
|
13
13
|
xl: ICON_CSS_CLASSES.iconSizeXl,
|
|
14
14
|
xxl: ICON_CSS_CLASSES.iconSizeXxl
|
|
15
|
+
};
|
|
16
|
+
const ICONS_SIZES = {
|
|
17
|
+
l: 'l',
|
|
18
|
+
xl: 'xl',
|
|
19
|
+
xxl: 'xxl'
|
|
15
20
|
};
|
|
16
21
|
|
|
17
|
-
export { ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP };
|
|
22
|
+
export { ICONS_SIZES, ICON_CSS_CLASSES, ICON_SIZES_CSS_CLASS_MAP };
|
|
18
23
|
//# sourceMappingURL=icon_constants.js.map
|
|
@@ -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;"}
|
|
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;"}
|