@shoper/phoenix_design_system 0.18.2 → 0.19.0
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.js +1 -1
- 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/backdrop.js +1 -1
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js +1 -1
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js +1 -1
- package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js +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/control/control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/control/control_additional_content.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/control/control_content.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/control/control_element.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/control/control_errors.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/control/control_label.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input_icon.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input_unit.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_content.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch_content.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/groups/toggle_button_group/toggle_button.js +55 -0
- package/build/cjs/packages/phoenix/src/{core/phoenix_light_lit_element.js.map → components/groups/toggle_button_group/toggle_button.js.map} +1 -1
- package/build/cjs/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group.js +67 -0
- package/build/cjs/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_constants.js +17 -0
- package/build/cjs/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_constants.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/modal/modal.js +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_body.js +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_close.js +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_footer.js +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_header.js +1 -1
- package/build/cjs/packages/phoenix/src/components/modal/modal_opener.js +1 -1
- package/build/cjs/packages/phoenix/src/components/portal/portal.js +1 -1
- package/build/cjs/packages/phoenix/src/components/portal/portal_target.js +1 -1
- package/build/cjs/packages/phoenix/src/components/slider/slider.js +2 -2
- package/build/cjs/packages/phoenix/src/components/slider/slider.js.map +1 -1
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js +86 -0
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js.map +1 -0
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js +17 -0
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js.map +1 -0
- package/build/cjs/packages/phoenix/src/core/{phoenix_light_lit_elements_constants.js → phoenix_light_lit_element/phoenix_light_lit_elements_constants.js} +5 -1
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js.map +1 -0
- package/build/cjs/packages/phoenix/src/index.js +16 -2
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/cjs/{external/@dreamcommerce → packages}/utilities/build/esm/json_utils.js +0 -0
- package/build/cjs/{external/@dreamcommerce → packages}/utilities/build/esm/json_utils.js.map +0 -0
- package/build/cjs/packages/utilities/build/esm/web_components_utils.js +18 -0
- package/build/cjs/packages/utilities/build/esm/web_components_utils.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/accordion/accordion.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion.js +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.d.ts +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.d.ts +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.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.js +1 -1
- package/build/esm/packages/phoenix/src/components/backdrop/backdrop.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/backdrop/backdrop.js +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_content.d.ts +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.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_additional_content.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_additional_content.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_content.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_content.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_element.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_element.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_errors.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_errors.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_label.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/control/control_label.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_control.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_icon.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_icon.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_unit.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input_unit.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_content.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_content.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_control.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch_content.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch_content.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch_control.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea_control.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button.d.ts +10 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button.js +53 -0
- package/build/esm/packages/phoenix/src/{core/phoenix_light_lit_element.js.map → components/groups/toggle_button_group/toggle_button.js.map} +1 -1
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group.d.ts +12 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group.js +65 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_constants.d.ts +8 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_constants.js +11 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_constants.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_types.d.ts +6 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_types.js +2 -0
- package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group_types.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/modal/modal.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal.js +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_body.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_body.js +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_close.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_close.js +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_footer.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_footer.js +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_header.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_header.js +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_opener.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/modal/modal_opener.js +1 -1
- package/build/esm/packages/phoenix/src/components/portal/portal.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/portal/portal.js +1 -1
- package/build/esm/packages/phoenix/src/components/portal/portal_target.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/portal/portal_target.js +1 -1
- package/build/esm/packages/phoenix/src/components/slider/slider.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/slider/slider.js +2 -2
- package/build/esm/packages/phoenix/src/components/slider/slider.js.map +1 -1
- package/build/esm/packages/phoenix/src/core/{phoenix_light_lit_element.d.ts → phoenix_light_lit_element/phoenix_light_lit_element.d.ts} +7 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js +82 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js.map +1 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.d.ts +4 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js +13 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js.map +1 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.d.ts +4 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js +7 -0
- package/build/esm/packages/phoenix/src/core/{phoenix_light_lit_elements_constants.js.map → phoenix_light_lit_element/phoenix_light_lit_elements_constants.js.map} +1 -1
- package/build/esm/packages/phoenix/src/index.d.ts +5 -2
- package/build/esm/packages/phoenix/src/index.js +4 -2
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/{external/@dreamcommerce → packages}/utilities/build/esm/json_utils.js +0 -0
- package/build/esm/{external/@dreamcommerce → packages}/utilities/build/esm/json_utils.js.map +0 -0
- package/build/esm/packages/utilities/build/esm/web_components_utils.js +14 -0
- package/build/esm/packages/utilities/build/esm/web_components_utils.js.map +1 -0
- package/package.json +3 -1
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element.js +0 -51
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_elements_constants.js.map +0 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element.js +0 -47
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_elements_constants.d.ts +0 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_elements_constants.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html, nothing } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators';
|
|
4
|
-
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
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 { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
7
7
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
3
|
export declare class HRadioControl extends PhoenixLightLitElement {
|
|
4
4
|
controlId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators';
|
|
4
|
-
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
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 { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
7
7
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HSwitch extends PhoenixLightLitElement {
|
|
3
3
|
controlId: string;
|
|
4
4
|
controlName: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
|
-
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
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 classnames from '../../../../external/classnames/index.js';
|
|
6
6
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
3
|
export declare class HSwitchContent extends PhoenixLightLitElement {
|
|
4
4
|
controlId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html, nothing } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators';
|
|
4
|
-
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
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 { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
7
7
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
3
|
export declare class HSwitchControl extends PhoenixLightLitElement {
|
|
4
4
|
controlId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators';
|
|
4
|
-
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
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 { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
7
7
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HTextarea extends PhoenixLightLitElement {
|
|
3
3
|
controlId: string;
|
|
4
4
|
controlName: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
|
-
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
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 classnames from '../../../../external/classnames/index.js';
|
|
6
6
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
3
|
export declare class HTextareaControl extends PhoenixLightLitElement {
|
|
4
4
|
controlId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { html, nothing } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators';
|
|
4
|
-
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element.js';
|
|
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 { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
7
7
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
3
|
+
export declare class HToggleButton extends PhoenixLightLitElement {
|
|
4
|
+
toggledOn: boolean;
|
|
5
|
+
willUpdate(propertyValues: PropertyValues): void;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
private _emmitComponentConnected;
|
|
8
|
+
private _componentClickHandler;
|
|
9
|
+
private _emitComponentClickedCustomEvent;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import 'lit';
|
|
3
|
+
import { property } from 'lit/decorators';
|
|
4
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
6
|
+
import { TOGGLE_BUTTON_EVENT_NAMES, TOGGLED_ON_ATTRIBUTE_NAME } from './toggle_button_group_constants.js';
|
|
7
|
+
|
|
8
|
+
let HToggleButton = class HToggleButton extends PhoenixLightLitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.toggledOn = false;
|
|
12
|
+
}
|
|
13
|
+
willUpdate(propertyValues) {
|
|
14
|
+
var _a;
|
|
15
|
+
if (propertyValues.has('toggledOn')) {
|
|
16
|
+
(_a = this.firstElementChild) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-pressed', this.toggledOn.toString());
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
super.connectedCallback();
|
|
21
|
+
if (!this.hasAttribute('role')) {
|
|
22
|
+
this.setAttribute('role', 'presentation');
|
|
23
|
+
}
|
|
24
|
+
this.addEventListener('click', this._componentClickHandler);
|
|
25
|
+
this._emmitComponentConnected();
|
|
26
|
+
}
|
|
27
|
+
_emmitComponentConnected() {
|
|
28
|
+
const detail = {
|
|
29
|
+
target: this
|
|
30
|
+
};
|
|
31
|
+
this.dispatchEvent(new CustomEvent(TOGGLE_BUTTON_EVENT_NAMES.connected, { bubbles: true, detail }));
|
|
32
|
+
}
|
|
33
|
+
_componentClickHandler(event) {
|
|
34
|
+
event.stopPropagation();
|
|
35
|
+
this._emitComponentClickedCustomEvent();
|
|
36
|
+
}
|
|
37
|
+
_emitComponentClickedCustomEvent() {
|
|
38
|
+
const detail = {
|
|
39
|
+
target: this
|
|
40
|
+
};
|
|
41
|
+
this.dispatchEvent(new CustomEvent(TOGGLE_BUTTON_EVENT_NAMES.clicked, { bubbles: true, detail }));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
__decorate([
|
|
45
|
+
property({ type: Boolean, attribute: TOGGLED_ON_ATTRIBUTE_NAME }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], HToggleButton.prototype, "toggledOn", void 0);
|
|
48
|
+
HToggleButton = __decorate([
|
|
49
|
+
phoenixCustomElement('h-toggle-button')
|
|
50
|
+
], HToggleButton);
|
|
51
|
+
|
|
52
|
+
export { HToggleButton };
|
|
53
|
+
//# sourceMappingURL=toggle_button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HToggleButtonGroup extends PhoenixLightLitElement {
|
|
3
|
+
private static readonly DATA_TOGGLE_ID_ATTRIBUTE_NAME;
|
|
4
|
+
private toggleButtonsRegistry;
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
disconnectedCallback(): void;
|
|
7
|
+
private _toggleButtonConnectedHandler;
|
|
8
|
+
private _registerToggleButton;
|
|
9
|
+
private _toggleButtonClickHandler;
|
|
10
|
+
private _performSingleToggleOnActionOnToggleButtons;
|
|
11
|
+
private _emitSingleToggleOnModeToggleChange;
|
|
12
|
+
}
|
package/build/esm/packages/phoenix/src/components/groups/toggle_button_group/toggle_button_group.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { __decorate } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
3
|
+
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
4
|
+
import v4 from '../../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
5
|
+
import { TOGGLE_BUTTON_EVENT_NAMES, TOGGLED_ON_ATTRIBUTE_NAME, TOGGLE_BUTTON_GROUP_EVENT_NAMES } from './toggle_button_group_constants.js';
|
|
6
|
+
|
|
7
|
+
var HToggleButtonGroup_1;
|
|
8
|
+
let HToggleButtonGroup = HToggleButtonGroup_1 = class HToggleButtonGroup extends PhoenixLightLitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.toggleButtonsRegistry = [];
|
|
12
|
+
}
|
|
13
|
+
connectedCallback() {
|
|
14
|
+
super.connectedCallback();
|
|
15
|
+
if (!this.hasAttribute('role')) {
|
|
16
|
+
this.setAttribute('role', 'group');
|
|
17
|
+
}
|
|
18
|
+
this.addEventListener(TOGGLE_BUTTON_EVENT_NAMES.connected, this._toggleButtonConnectedHandler);
|
|
19
|
+
this.addEventListener(TOGGLE_BUTTON_EVENT_NAMES.clicked, this._toggleButtonClickHandler);
|
|
20
|
+
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
super.disconnectedCallback();
|
|
23
|
+
this.toggleButtonsRegistry = [];
|
|
24
|
+
}
|
|
25
|
+
_toggleButtonConnectedHandler(event) {
|
|
26
|
+
event.stopPropagation();
|
|
27
|
+
const toggleButton = event.detail.target;
|
|
28
|
+
this._registerToggleButton(toggleButton);
|
|
29
|
+
if (toggleButton.getAttribute(TOGGLED_ON_ATTRIBUTE_NAME) === '') {
|
|
30
|
+
this._emitSingleToggleOnModeToggleChange(toggleButton.getAttribute('value'));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
_registerToggleButton(toggleButton) {
|
|
34
|
+
toggleButton.setAttribute(HToggleButtonGroup_1.DATA_TOGGLE_ID_ATTRIBUTE_NAME, v4());
|
|
35
|
+
this.toggleButtonsRegistry = [...this.toggleButtonsRegistry, toggleButton];
|
|
36
|
+
}
|
|
37
|
+
_toggleButtonClickHandler(event) {
|
|
38
|
+
event.stopPropagation();
|
|
39
|
+
const target = event.detail.target;
|
|
40
|
+
this._performSingleToggleOnActionOnToggleButtons(target);
|
|
41
|
+
this._emitSingleToggleOnModeToggleChange(target.getAttribute('value'));
|
|
42
|
+
}
|
|
43
|
+
_performSingleToggleOnActionOnToggleButtons(toggleButton) {
|
|
44
|
+
this.toggleButtonsRegistry.forEach((element) => {
|
|
45
|
+
const canToggleOnButton = element.getAttribute(HToggleButtonGroup_1.DATA_TOGGLE_ID_ATTRIBUTE_NAME) ===
|
|
46
|
+
toggleButton.getAttribute(HToggleButtonGroup_1.DATA_TOGGLE_ID_ATTRIBUTE_NAME);
|
|
47
|
+
if (canToggleOnButton) {
|
|
48
|
+
element.setAttribute(TOGGLED_ON_ATTRIBUTE_NAME, '');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
element.removeAttribute(TOGGLED_ON_ATTRIBUTE_NAME);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
_emitSingleToggleOnModeToggleChange(value) {
|
|
55
|
+
const detail = { value };
|
|
56
|
+
this.dispatchEvent(new CustomEvent(TOGGLE_BUTTON_GROUP_EVENT_NAMES.toggleChange, { bubbles: true, detail }));
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
HToggleButtonGroup.DATA_TOGGLE_ID_ATTRIBUTE_NAME = 'data-toggle-button-id';
|
|
60
|
+
HToggleButtonGroup = HToggleButtonGroup_1 = __decorate([
|
|
61
|
+
phoenixCustomElement('h-toggle-button-group')
|
|
62
|
+
], HToggleButtonGroup);
|
|
63
|
+
|
|
64
|
+
export { HToggleButtonGroup };
|
|
65
|
+
//# sourceMappingURL=toggle_button_group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,2BAA2B,+CAAmD;AAC9E;AACA;AACA,eAAe,wDAA4D;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const TOGGLED_ON_ATTRIBUTE_NAME = "toggled-on";
|
|
2
|
+
export declare const TOGGLE_BUTTON_GROUP_EVENT_NAMES: {
|
|
3
|
+
readonly toggleChange: "toggleChange";
|
|
4
|
+
};
|
|
5
|
+
export declare const TOGGLE_BUTTON_EVENT_NAMES: {
|
|
6
|
+
readonly connected: "toggleButtonConnected";
|
|
7
|
+
readonly clicked: "toggleButtonClicked";
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const TOGGLED_ON_ATTRIBUTE_NAME = 'toggled-on';
|
|
2
|
+
const TOGGLE_BUTTON_GROUP_EVENT_NAMES = {
|
|
3
|
+
toggleChange: 'toggleChange'
|
|
4
|
+
};
|
|
5
|
+
const TOGGLE_BUTTON_EVENT_NAMES = {
|
|
6
|
+
connected: 'toggleButtonConnected',
|
|
7
|
+
clicked: 'toggleButtonClicked'
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { TOGGLED_ON_ATTRIBUTE_NAME, TOGGLE_BUTTON_EVENT_NAMES, TOGGLE_BUTTON_GROUP_EVENT_NAMES };
|
|
11
|
+
//# sourceMappingURL=toggle_button_group_constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle_button_group_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/groups/toggle_button_group/toggle_button_group_types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit-html';
|
|
2
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
2
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
3
3
|
import { PropertyValues } from '@lit/reactive-element';
|
|
4
4
|
export declare class HModal extends PhoenixLightLitElement {
|
|
5
5
|
opened: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
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 { PORTAL_TARGET_NAME_PROP } from '../portal/portal_constants.js';
|
|
5
5
|
import { MODAL_OPENED_PROP, FOCUSABLE_ELEMENTS_WITHIN_MODAL, MODALS_PORTAL_NAME, MODAL_EVENTS } from './modal_constants.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HModalBody extends PhoenixLightLitElement {
|
|
3
3
|
constructor();
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
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
|
|
|
5
5
|
let HModalBody = class HModalBody extends PhoenixLightLitElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HModalClose extends PhoenixLightLitElement {
|
|
3
3
|
constructor();
|
|
4
4
|
connectedCallback(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
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 { MODAL_EVENTS } from './modal_constants.js';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HModalFooter extends PhoenixLightLitElement {
|
|
3
3
|
constructor();
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
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
|
|
|
5
5
|
let HModalFooter = class HModalFooter extends PhoenixLightLitElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HModalHeader extends PhoenixLightLitElement {
|
|
3
3
|
constructor();
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
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
|
|
|
5
5
|
let HModalHeader = class HModalHeader extends PhoenixLightLitElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
export declare class HModalOpener extends PhoenixLightLitElement {
|
|
3
3
|
name: string;
|
|
4
4
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
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
|
|
|
6
6
|
let HModalOpener = class HModalOpener extends PhoenixLightLitElement {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
import { PropertyValues } from 'lit';
|
|
3
3
|
export declare class HPortal extends PhoenixLightLitElement {
|
|
4
4
|
_id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import 'lit';
|
|
3
3
|
import { state, property } from 'lit/decorators';
|
|
4
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
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 { PORTAL_EVENTS } from './portal_constants.js';
|
|
7
7
|
import v4 from '../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
2
|
import { TPortalEventData } from './portal_types';
|
|
3
3
|
export declare class HPortalTarget extends PhoenixLightLitElement {
|
|
4
4
|
static portalTargetsNames: Set<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { property, state } from 'lit/decorators';
|
|
3
|
-
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element.js';
|
|
3
|
+
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { PortalTargetError } from './portal_target_error.js';
|
|
5
5
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
6
|
import { PORTAL_EVENTS, PORTAL_TARGET_NAME_PROP } from './portal_constants.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ISlider } from './slider_types';
|
|
2
|
-
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
|
|
2
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
3
3
|
export declare class HSlider extends PhoenixLightLitElement {
|
|
4
4
|
settings: string;
|
|
5
5
|
id: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
|
-
import {
|
|
3
|
+
import { JsonUtils } from '../../../../utilities/build/esm/json_utils.js';
|
|
4
|
+
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
5
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
6
|
import { Splide } from '../../../../../external/@splidejs/splide/dist/js/splide.esm.js';
|
|
6
|
-
import { JsonUtils } from '../../../../../external/@dreamcommerce/utilities/build/esm/json_utils.js';
|
|
7
7
|
|
|
8
8
|
let HSlider = class HSlider extends PhoenixLightLitElement {
|
|
9
9
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA,uBAAuB,gEAAoE;AAC3F
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,uBAAuB,gEAAoE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,14 @@
|
|
|
1
1
|
import { LitElement, TemplateResult, nothing, PropertyValues } from 'lit';
|
|
2
2
|
export declare class PhoenixLightLitElement extends LitElement {
|
|
3
3
|
_slots: Record<string, TemplateResult[]>;
|
|
4
|
+
protected childrenToWatch: string[];
|
|
5
|
+
isWebComponentConnected: boolean;
|
|
4
6
|
firstUpdated(props: PropertyValues): void;
|
|
7
|
+
private _setupChildrenWatch;
|
|
8
|
+
private _getComponentsNamesToWatch;
|
|
9
|
+
private _handleComponentConnected;
|
|
10
|
+
connectedCallback(): void;
|
|
11
|
+
allChildrenConnected(): void;
|
|
5
12
|
private _assignSlots;
|
|
6
13
|
getSlot(name: string): TemplateResult[] | typeof nothing;
|
|
7
14
|
hasSlot(name: string): boolean;
|
package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES, DEFAULT_SLOT_NAME } from './phoenix_light_lit_elements_constants.js';
|
|
2
|
+
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { LitElement, html, nothing } from 'lit';
|
|
4
|
+
import { state, property } from 'lit/decorators';
|
|
5
|
+
import { PhoenixLightLitElementUtils } from './phoenix_light_lit_element_utils.js';
|
|
6
|
+
|
|
7
|
+
class PhoenixLightLitElement extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this._slots = {};
|
|
11
|
+
this.isWebComponentConnected = false;
|
|
12
|
+
this._handleComponentConnected = ({ detail }) => {
|
|
13
|
+
const connectedElement = detail.$el.tagName.toLowerCase();
|
|
14
|
+
if (this.childrenToWatch.includes(connectedElement)) {
|
|
15
|
+
const elToRemoveIndex = this.childrenToWatch.findIndex((tagName) => tagName === connectedElement);
|
|
16
|
+
this.childrenToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
|
|
17
|
+
}
|
|
18
|
+
if (!this.childrenToWatch.length) {
|
|
19
|
+
this.allChildrenConnected();
|
|
20
|
+
this.removeEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
firstUpdated(props) {
|
|
25
|
+
super.firstUpdated(props);
|
|
26
|
+
this._slots = this._assignSlots();
|
|
27
|
+
this.requestUpdate();
|
|
28
|
+
}
|
|
29
|
+
_setupChildrenWatch() {
|
|
30
|
+
this.childrenToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesToWatch();
|
|
31
|
+
this.addEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
|
|
32
|
+
}
|
|
33
|
+
_getComponentsNamesToWatch() {
|
|
34
|
+
return PhoenixLightLitElementUtils.getComponentsForWhichToWaitForConnection([...this.querySelectorAll('*')]).map(($element) => $element.tagName.toLowerCase());
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
this.dispatchEvent(new CustomEvent(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, {
|
|
39
|
+
detail: {
|
|
40
|
+
$el: this
|
|
41
|
+
},
|
|
42
|
+
bubbles: true
|
|
43
|
+
}));
|
|
44
|
+
this._setupChildrenWatch();
|
|
45
|
+
}
|
|
46
|
+
allChildrenConnected() { }
|
|
47
|
+
_assignSlots() {
|
|
48
|
+
return [...this.querySelectorAll(':scope > [slot]')].reduce((acc, $el) => {
|
|
49
|
+
var _a;
|
|
50
|
+
const slotName = $el.slot || DEFAULT_SLOT_NAME;
|
|
51
|
+
acc[slotName] = acc[slotName] || [];
|
|
52
|
+
acc[slotName].push(html `${$el}`);
|
|
53
|
+
(_a = $el.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild($el);
|
|
54
|
+
$el.removeAttribute('slot');
|
|
55
|
+
return acc;
|
|
56
|
+
}, this._slots);
|
|
57
|
+
}
|
|
58
|
+
getSlot(name) {
|
|
59
|
+
try {
|
|
60
|
+
return this._slots[name];
|
|
61
|
+
}
|
|
62
|
+
catch (_a) { }
|
|
63
|
+
return nothing;
|
|
64
|
+
}
|
|
65
|
+
hasSlot(name) {
|
|
66
|
+
return !!this._slots[name];
|
|
67
|
+
}
|
|
68
|
+
createRenderRoot() {
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
__decorate([
|
|
73
|
+
state(),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], PhoenixLightLitElement.prototype, "_slots", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: Boolean }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], PhoenixLightLitElement.prototype, "isWebComponentConnected", void 0);
|
|
80
|
+
|
|
81
|
+
export { PhoenixLightLitElement };
|
|
82
|
+
//# sourceMappingURL=phoenix_light_lit_element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,13 @@
|
|
|
1
|
+
import { WebComponentsUtils } from '../../../../utilities/build/esm/web_components_utils.js';
|
|
2
|
+
|
|
3
|
+
class PhoenixLightLitElementUtils {
|
|
4
|
+
static getComponentsForWhichToWaitForConnection(components) {
|
|
5
|
+
return components.filter(($element) => (WebComponentsUtils.isWebComponent($element) && !WebComponentsUtils.isWebComponentDefined($element)) ||
|
|
6
|
+
(WebComponentsUtils.isWebComponent($element) &&
|
|
7
|
+
WebComponentsUtils.isWebComponentDefined($element) &&
|
|
8
|
+
!$element.isWebComponentConnected));
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { PhoenixLightLitElementUtils };
|
|
13
|
+
//# sourceMappingURL=phoenix_light_lit_element_utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|