@shoper/phoenix_design_system 0.22.2 → 0.22.3

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.
Files changed (101) hide show
  1. package/build/cjs/{external → packages/phoenix/external}/classnames/index.js +16 -10
  2. package/build/cjs/{external → packages/phoenix/external}/classnames/index.js.map +1 -1
  3. package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js +9 -6
  4. package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
  5. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js +32 -23
  6. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
  7. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js +1 -4
  8. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
  9. package/build/cjs/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
  10. package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
  11. package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
  12. package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
  13. package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
  14. package/build/cjs/packages/phoenix/src/components/form/input/input.js +1 -1
  15. package/build/cjs/packages/phoenix/src/components/form/input/input.js.map +1 -1
  16. package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +1 -1
  17. package/build/cjs/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
  18. package/build/cjs/packages/phoenix/src/components/form/switch/switch.js +1 -1
  19. package/build/cjs/packages/phoenix/src/components/form/switch/switch.js.map +1 -1
  20. package/build/cjs/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
  21. package/build/cjs/packages/phoenix/src/components/form/textarea/textarea.js.map +1 -1
  22. package/build/cjs/packages/phoenix/src/components/slider/slider.js +2 -2
  23. package/build/cjs/packages/phoenix/src/controllers/visibility_controller/visibility_controller.js +1 -1
  24. package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js +13 -47
  25. package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js.map +1 -1
  26. package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js +4 -10
  27. package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js.map +1 -1
  28. package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js +1 -3
  29. package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js.map +1 -1
  30. package/build/cjs/packages/phoenix/src/index.js +0 -23
  31. package/build/cjs/packages/phoenix/src/index.js.map +1 -1
  32. package/build/cjs/packages/utilities/build/esm/json_utils.js +25 -0
  33. package/build/{esm/packages/phoenix/src/components/tabs/tab_panel.js.map → cjs/packages/utilities/build/esm/json_utils.js.map} +1 -1
  34. package/build/cjs/packages/utilities/build/esm/web_components_utils.js +18 -0
  35. package/build/cjs/packages/{phoenix/src/components/tabs/tabs_constants.js.map → utilities/build/esm/web_components_utils.js.map} +1 -1
  36. package/build/esm/{external → packages/phoenix/external}/classnames/index.js +16 -10
  37. package/build/esm/{external → packages/phoenix/external}/classnames/index.js.map +1 -1
  38. package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js +9 -6
  39. package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
  40. package/build/esm/packages/phoenix/src/components/dropdown/dropdown.d.ts +5 -0
  41. package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js +32 -23
  42. package/build/esm/packages/phoenix/src/components/dropdown/dropdown.js.map +1 -1
  43. package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js +1 -4
  44. package/build/esm/packages/phoenix/src/components/dropdown/dropdown_content.js.map +1 -1
  45. package/build/esm/packages/phoenix/src/components/dropdown/dropdown_toggler.js +1 -1
  46. package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
  47. package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
  48. package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
  49. package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
  50. package/build/esm/packages/phoenix/src/components/form/input/input.js +1 -1
  51. package/build/esm/packages/phoenix/src/components/form/input/input.js.map +1 -1
  52. package/build/esm/packages/phoenix/src/components/form/radio/radio.js +1 -1
  53. package/build/esm/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
  54. package/build/esm/packages/phoenix/src/components/form/switch/switch.js +1 -1
  55. package/build/esm/packages/phoenix/src/components/form/switch/switch.js.map +1 -1
  56. package/build/esm/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
  57. package/build/esm/packages/phoenix/src/components/form/textarea/textarea.js.map +1 -1
  58. package/build/esm/packages/phoenix/src/components/slider/slider.js +1 -1
  59. package/build/esm/packages/phoenix/src/controllers/visibility_controller/visibility_controller.js +1 -1
  60. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.d.ts +1 -8
  61. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js +13 -47
  62. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js.map +1 -1
  63. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.d.ts +0 -1
  64. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js +1 -7
  65. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js.map +1 -1
  66. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.d.ts +1 -2
  67. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js +1 -3
  68. package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js.map +1 -1
  69. package/build/esm/packages/phoenix/src/index.d.ts +0 -4
  70. package/build/esm/packages/phoenix/src/index.js +0 -4
  71. package/build/esm/packages/phoenix/src/index.js.map +1 -1
  72. package/build/esm/packages/utilities/build/esm/json_utils.js +21 -0
  73. package/build/esm/packages/utilities/build/esm/json_utils.js.map +1 -0
  74. package/build/esm/packages/utilities/build/esm/web_components_utils.js +14 -0
  75. package/build/{cjs/packages/phoenix/src/components/tabs/tab/tab_constants.js.map → esm/packages/utilities/build/esm/web_components_utils.js.map} +1 -1
  76. package/package.json +1 -1
  77. package/build/cjs/packages/phoenix/src/components/tabs/tab/tab.js +0 -74
  78. package/build/cjs/packages/phoenix/src/components/tabs/tab/tab.js.map +0 -1
  79. package/build/cjs/packages/phoenix/src/components/tabs/tab/tab_constants.js +0 -12
  80. package/build/cjs/packages/phoenix/src/components/tabs/tab_panel.js +0 -31
  81. package/build/cjs/packages/phoenix/src/components/tabs/tab_panel.js.map +0 -1
  82. package/build/cjs/packages/phoenix/src/components/tabs/tabs.js +0 -108
  83. package/build/cjs/packages/phoenix/src/components/tabs/tabs.js.map +0 -1
  84. package/build/cjs/packages/phoenix/src/components/tabs/tabs_constants.js +0 -10
  85. package/build/esm/packages/phoenix/src/components/tabs/tab/tab.d.ts +0 -14
  86. package/build/esm/packages/phoenix/src/components/tabs/tab/tab.js +0 -72
  87. package/build/esm/packages/phoenix/src/components/tabs/tab/tab.js.map +0 -1
  88. package/build/esm/packages/phoenix/src/components/tabs/tab/tab_constants.d.ts +0 -4
  89. package/build/esm/packages/phoenix/src/components/tabs/tab/tab_constants.js +0 -7
  90. package/build/esm/packages/phoenix/src/components/tabs/tab/tab_constants.js.map +0 -1
  91. package/build/esm/packages/phoenix/src/components/tabs/tab_panel.d.ts +0 -8
  92. package/build/esm/packages/phoenix/src/components/tabs/tab_panel.js +0 -29
  93. package/build/esm/packages/phoenix/src/components/tabs/tabs.d.ts +0 -16
  94. package/build/esm/packages/phoenix/src/components/tabs/tabs.js +0 -106
  95. package/build/esm/packages/phoenix/src/components/tabs/tabs.js.map +0 -1
  96. package/build/esm/packages/phoenix/src/components/tabs/tabs_constants.d.ts +0 -3
  97. package/build/esm/packages/phoenix/src/components/tabs/tabs_constants.js +0 -6
  98. package/build/esm/packages/phoenix/src/components/tabs/tabs_constants.js.map +0 -1
  99. package/build/esm/packages/phoenix/src/components/tabs/tabs_types.d.ts +0 -4
  100. package/build/esm/packages/phoenix/src/components/tabs/tabs_types.js +0 -2
  101. package/build/esm/packages/phoenix/src/components/tabs/tabs_types.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ class JsonUtils {
6
+ static toJson(value) {
7
+ try {
8
+ return JSON.stringify(value);
9
+ }
10
+ catch (error) {
11
+ console.error(error);
12
+ }
13
+ }
14
+ static fromJson(value) {
15
+ try {
16
+ return JSON.parse(value);
17
+ }
18
+ catch (error) {
19
+ console.error(error);
20
+ }
21
+ }
22
+ }
23
+
24
+ exports.JsonUtils = JsonUtils;
25
+ //# sourceMappingURL=json_utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,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;"}
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;"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ class WebComponentsUtils {
6
+ static isWebComponentDefined($element) {
7
+ if (!this.isWebComponent($element))
8
+ return false;
9
+ const customElementClass = window.customElements.get($element.tagName.toLowerCase());
10
+ return !!customElementClass && $element instanceof customElementClass;
11
+ }
12
+ static isWebComponent($element) {
13
+ return $element.tagName.includes('-');
14
+ }
15
+ }
16
+
17
+ exports.WebComponentsUtils = WebComponentsUtils;
18
+ //# sourceMappingURL=web_components_utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;"}
@@ -1,7 +1,7 @@
1
- import { createCommonjsModule } from '../../_virtual/_commonjsHelpers.js';
1
+ import { createCommonjsModule } from '../../../../_virtual/_commonjsHelpers.js';
2
2
 
3
3
  /*!
4
- Copyright (c) 2017 Jed Watson.
4
+ Copyright (c) 2018 Jed Watson.
5
5
  Licensed under the MIT License (MIT), see
6
6
  http://jedwatson.github.io/classnames
7
7
  */
@@ -13,7 +13,7 @@ var classnames = createCommonjsModule(function (module) {
13
13
 
14
14
  var hasOwn = {}.hasOwnProperty;
15
15
 
16
- function classNames () {
16
+ function classNames() {
17
17
  var classes = [];
18
18
 
19
19
  for (var i = 0; i < arguments.length; i++) {
@@ -24,16 +24,22 @@ var classnames = createCommonjsModule(function (module) {
24
24
 
25
25
  if (argType === 'string' || argType === 'number') {
26
26
  classes.push(arg);
27
- } else if (Array.isArray(arg) && arg.length) {
28
- var inner = classNames.apply(null, arg);
29
- if (inner) {
30
- classes.push(inner);
27
+ } else if (Array.isArray(arg)) {
28
+ if (arg.length) {
29
+ var inner = classNames.apply(null, arg);
30
+ if (inner) {
31
+ classes.push(inner);
32
+ }
31
33
  }
32
34
  } else if (argType === 'object') {
33
- for (var key in arg) {
34
- if (hasOwn.call(arg, key) && arg[key]) {
35
- classes.push(key);
35
+ if (arg.toString === Object.prototype.toString) {
36
+ for (var key in arg) {
37
+ if (hasOwn.call(arg, key) && arg[key]) {
38
+ classes.push(key);
39
+ }
36
40
  }
41
+ } else {
42
+ classes.push(arg.toString());
37
43
  }
38
44
  }
39
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -11,6 +11,13 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
11
11
  constructor() {
12
12
  super();
13
13
  this.transitionName = 'accordion-toggle';
14
+ this._setStylingOptions = () => {
15
+ this.style.setProperty('display', 'block', 'important');
16
+ this.style.height = 'auto';
17
+ this._originalHeight = `${this.getBoundingClientRect().height}px`;
18
+ this.style.display = '';
19
+ this.style.height = this._originalHeight;
20
+ };
14
21
  this._expand = () => {
15
22
  this._setHeight(this._originalHeight);
16
23
  };
@@ -25,12 +32,7 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
25
32
  this._transitionController = new TransitionController(this, this.transitionName);
26
33
  this._setStylingOptions();
27
34
  this._subscribeObserver();
28
- }
29
- _setStylingOptions() {
30
- this.style.setProperty('display', 'block', 'important');
31
- this._originalHeight = `${this.getBoundingClientRect().height}px`;
32
- this.style.display = '';
33
- this.style.height = this._originalHeight;
35
+ window.addEventListener('resize', this._setStylingOptions);
34
36
  }
35
37
  async _subscribeObserver() {
36
38
  this._accordionGroupProps = await this._contextConsumer.consumeAsync(ACCORDION_CONTEXTS.accordionGroupProps);
@@ -50,6 +52,7 @@ let HAccordionContent = class HAccordionContent extends PhoenixLightLitElement {
50
52
  disconnectedCallback() {
51
53
  super.disconnectedCallback();
52
54
  this._accordionGroupProps.unsubscribe(this._accordionGroupPropsObserver);
55
+ window.removeEventListener('resize', this._setStylingOptions);
53
56
  }
54
57
  };
55
58
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,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;"}
@@ -3,6 +3,7 @@ import { TemplateResult } from 'lit-html';
3
3
  import { HDropdownContent } from './dropdown_content';
4
4
  import { HDropdownToggler } from './dropdown_toggler';
5
5
  import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
6
+ import { PropertyValues } from 'lit';
6
7
  export declare class HDropdown extends PhoenixLightLitElement implements IDropdown {
7
8
  opened: boolean;
8
9
  direction: "bottom-center";
@@ -18,9 +19,13 @@ export declare class HDropdown extends PhoenixLightLitElement implements IDropdo
18
19
  private _dropdownContentChildrenHeight;
19
20
  private _hasScrollableClassInitially;
20
21
  private _backdropController;
22
+ _firstFocusableElement: HTMLElement | undefined;
21
23
  _lastFocusableElement: HTMLElement | undefined;
24
+ private _focusSentinelStart;
25
+ private _focusSentinelEnd;
22
26
  private _rootDropdown?;
23
27
  connectedCallback(): void;
28
+ firstUpdated(props: PropertyValues): void;
24
29
  private static _appendDropdownPortal;
25
30
  private _findRootDropdown;
26
31
  private _setupListeners;
@@ -1,12 +1,13 @@
1
1
  import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
+ import 'lit';
2
3
  import { state } from 'lit/decorators';
3
- import { UiDomUtils } from '@dreamcommerce/utilities';
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 { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP } from '../portal/portal_constants.js';
7
7
  import { html } from 'lit-html';
8
8
  import { BackdropController } from '../backdrop/controller/backdrop_controller.js';
9
9
  import { property } from '@lit/reactive-element/decorators.js';
10
+ import { createRef, ref } from 'lit-html/directives/ref.js';
10
11
  import { BREAKPOINTS, SCROLLABLE_CLASS_NAME } from '../../global_constants.js';
11
12
  import { DEFAULT_DROPDOWN_PORTAL_NAME, DROPDOWN_CONTENT_VISIBLE_CLASS, DROPDOWN_CONTENT_SHOW, DROPDOWN_EVENTS, DROPDOWN_CONTAINER_NAME, DROPDOWN_CONTENT_HIDE, DROPDOWN_CONTENT_NAME, DROPDOWN_TOGGLER_NAME } from './dropdown_constants.js';
12
13
  import { DIRECTIONS, RELATIVE_POSITION_CONTROLLER_EVENTS, DEFAULT_THROTTLE_WAIT_TIME } from '../../controllers/relative_position_controller/relative_position_controller_constants.js';
@@ -25,7 +26,10 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
25
26
  this.transition = 'direction';
26
27
  this.portalTarget = DEFAULT_DROPDOWN_PORTAL_NAME;
27
28
  this._backdropController = new BackdropController();
29
+ this._firstFocusableElement = undefined;
28
30
  this._lastFocusableElement = undefined;
31
+ this._focusSentinelStart = createRef();
32
+ this._focusSentinelEnd = createRef();
29
33
  this._handleClickOutside = async (target) => {
30
34
  var _a, _b;
31
35
  if (!this.opened)
@@ -51,13 +55,11 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
51
55
  }, 0);
52
56
  const transitionDuration = parseFloat(getComputedStyle(this.$dropdownContent || this).transitionDuration) * 1000;
53
57
  setTimeout(() => {
54
- var _a, _b, _c;
58
+ var _a, _b;
55
59
  this._dispatchShowDropdownEvent();
56
60
  (_a = this.$dropdownContent) === null || _a === void 0 ? void 0 : _a.classList.remove(`${DROPDOWN_CONTENT_SHOW}-${this.transition}-start`, `${DROPDOWN_CONTENT_SHOW}-${this.transition}-end`);
57
61
  this._toggleScroll();
58
- if (!this._lastFocusableElement)
59
- this._lastFocusableElement = (_b = this.$dropdownContent) === null || _b === void 0 ? void 0 : _b.lastElementChild;
60
- this._focusOnNextSibling((_c = this.$dropdownContent) === null || _c === void 0 ? void 0 : _c.firstElementChild);
62
+ (_b = this._firstFocusableElement) === null || _b === void 0 ? void 0 : _b.focus();
61
63
  resolve();
62
64
  }, transitionDuration);
63
65
  });
@@ -131,16 +133,18 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
131
133
  this._handleFocusWithinDropdown = async (ev) => {
132
134
  var _a;
133
135
  const hasTabBeenPressed = ev.key.toLowerCase() === 'tab';
134
- if (hasTabBeenPressed && document.activeElement === this._lastFocusableElement) {
135
- ev.preventDefault();
136
- this._focusOnNextSibling(this.nextElementSibling || this);
137
- await this._hideDropdownsSequentially();
138
- }
139
- const $firstFocusableElement = this.$dropdownContent && UiDomUtils.getFocusableElement(this.$dropdownContent);
140
- if (hasTabBeenPressed && ev.shiftKey && document.activeElement === $firstFocusableElement) {
141
- ev.preventDefault();
142
- (_a = this.$dropdownToggler) === null || _a === void 0 ? void 0 : _a.focus();
143
- await this._hideDropdownsSequentially();
136
+ if (hasTabBeenPressed) {
137
+ if (ev.shiftKey) {
138
+ if (document.activeElement === this._firstFocusableElement) {
139
+ (_a = this._lastFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();
140
+ ev.preventDefault();
141
+ }
142
+ }
143
+ else if (document.activeElement === this._lastFocusableElement) {
144
+ ev.preventDefault();
145
+ this._focusOnNextSibling(this);
146
+ await this._hideDropdownsSequentially();
147
+ }
144
148
  }
145
149
  };
146
150
  this._hoverToggle = async (ev) => {
@@ -199,6 +203,11 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
199
203
  this._setupListeners();
200
204
  this._setupInitialDropdownProperties();
201
205
  }
206
+ firstUpdated(props) {
207
+ super.firstUpdated(props);
208
+ this._firstFocusableElement = this._focusSentinelStart.value;
209
+ this._lastFocusableElement = this._focusSentinelEnd.value;
210
+ }
202
211
  static _appendDropdownPortal() {
203
212
  const $dropdownPortalTarget = document.querySelector(`[name="${DEFAULT_DROPDOWN_PORTAL_NAME}"]`);
204
213
  if (!$dropdownPortalTarget) {
@@ -245,12 +254,7 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
245
254
  el.focus();
246
255
  if (el === document.activeElement)
247
256
  return;
248
- if (el.firstElementChild) {
249
- this._focusOnNextSibling(el.firstElementChild);
250
- return;
251
- }
252
- if (el.nextElementSibling)
253
- this._focusOnNextSibling(el.nextElementSibling);
257
+ this._focusOnNextSibling(el.nextElementSibling);
254
258
  }
255
259
  _isHoveredWithinDropdown(element) {
256
260
  var _a;
@@ -258,8 +262,7 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
258
262
  return true;
259
263
  if (element === this.$dropdownContent)
260
264
  return true;
261
- const isDescendantOfDropdown = element.closest(`${DROPDOWN_CONTAINER_NAME}[name="${this.name}"]`) !== null ||
262
- element.closest(`${DROPDOWN_CONTENT_NAME}[name="${this.name}"]`) !== null;
265
+ const isDescendantOfDropdown = element.closest(`${DROPDOWN_CONTAINER_NAME}[name="${this.name}"]`) !== null;
263
266
  if (isDescendantOfDropdown)
264
267
  return true;
265
268
  const $closestDropdownContent = element.closest(DROPDOWN_CONTENT_NAME);
@@ -296,7 +299,9 @@ let HDropdown = HDropdown_1 = class HDropdown extends PhoenixLightLitElement {
296
299
  return html `
297
300
  ${this.getSlot('toggler')}
298
301
  <h-portal ?disabled="${!this.opened}" @portal.open="${this._positionDropdownContent}" to="${this.portalTarget}" hidden>
302
+ <div tabindex="0" ${ref(this._focusSentinelStart)}></div>
299
303
  ${this.getSlot('content')}
304
+ <div tabindex="0" ${ref(this._focusSentinelEnd)}></div>
300
305
  </h-portal>
301
306
  `;
302
307
  }
@@ -325,6 +330,10 @@ __decorate([
325
330
  property({ type: String }),
326
331
  __metadata("design:type", Object)
327
332
  ], HDropdown.prototype, "portalTarget", void 0);
333
+ __decorate([
334
+ state(),
335
+ __metadata("design:type", Object)
336
+ ], HDropdown.prototype, "_firstFocusableElement", void 0);
328
337
  __decorate([
329
338
  state(),
330
339
  __metadata("design:type", Object)
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4CAAgD;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4CAAgD;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -18,10 +18,7 @@ let HDropdownContent = class HDropdownContent extends PhoenixLightLitElement {
18
18
  }
19
19
  render() {
20
20
  super.render();
21
- return html `
22
- <div role="dialog">${this.getSlot('content')}</div>
23
- <div tabindex="0" aria-hidden="true"></div>
24
- `;
21
+ return html ` <div role="dialog">${this.getSlot('content')}</div> `;
25
22
  }
26
23
  };
27
24
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,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;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,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;"}
@@ -14,7 +14,7 @@ let HDropdownToggler = class HDropdownToggler extends PhoenixLightLitElement {
14
14
  this._dispatchToggleDropdownEvent = (ev) => {
15
15
  ev.preventDefault();
16
16
  ev.stopImmediatePropagation();
17
- const toggleDropdownEvent = new CustomEvent(DROPDOWN_EVENTS.toggle, {
17
+ const toggleDropdownEvent = new Event(DROPDOWN_EVENTS.toggle, {
18
18
  bubbles: true
19
19
  });
20
20
  this.dispatchEvent(toggleDropdownEvent);
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
4
4
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
5
5
  import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
6
6
  import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
7
- import classnames from '../../../../../../external/classnames/index.js';
7
+ import classnames from '../../../../external/classnames/index.js';
8
8
  import { CHECKBOX_PROPS_TO_SYNC, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
9
9
 
10
10
  let HCheckbox = class HCheckbox extends PhoenixLightLitElement {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -4,7 +4,7 @@ import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_el
4
4
  import { html } from 'lit-html';
5
5
  import { property } from '@lit/reactive-element/decorators.js';
6
6
  import { createRef, ref } from 'lit-html/directives/ref.js';
7
- import classnames from '../../../../../../external/classnames/index.js';
7
+ import classnames from '../../../../external/classnames/index.js';
8
8
  import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
9
9
  import { ifDefined } from 'lit-html/directives/if-defined.js';
10
10
  import { CHECKBOX_CONTROL_EVENTS, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -5,7 +5,7 @@ import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_el
5
5
  import { INPUT_CONTROL_TYPES, INPUT_PROPS_TO_SYNC, INPUT_CONTROL_CSS_CLASSES } from './input_constants.js';
6
6
  import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
7
7
  import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
8
- import classnames from '../../../../../../external/classnames/index.js';
8
+ import classnames from '../../../../external/classnames/index.js';
9
9
 
10
10
  let HInput = class HInput extends PhoenixLightLitElement {
11
11
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
4
4
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
5
5
  import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
6
6
  import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
7
- import classnames from '../../../../../../external/classnames/index.js';
7
+ import classnames from '../../../../external/classnames/index.js';
8
8
  import { CHECKBOX_PROPS_TO_SYNC } from '../checkbox/checkbox_constants.js';
9
9
  import { RADIO_CONTROL_CSS_CLASSES } from './radio_constants.js';
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
4
4
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
5
5
  import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
6
6
  import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
7
- import classnames from '../../../../../../external/classnames/index.js';
7
+ import classnames from '../../../../external/classnames/index.js';
8
8
  import { CHECKBOX_PROPS_TO_SYNC } from '../checkbox/checkbox_constants.js';
9
9
  import { SWITCH_CONTROL_CSS_CLASSES } from './switch_constants.js';
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
4
4
  import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
5
5
  import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
6
6
  import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
7
- import classnames from '../../../../../../external/classnames/index.js';
7
+ import classnames from '../../../../external/classnames/index.js';
8
8
  import { TEXTAREA_PROPS_TO_SYNC, TEXTAREA_CONTROL_CSS_CLASSES } from './textarea_constants.js';
9
9
 
10
10
  let HTextarea = class HTextarea extends PhoenixLightLitElement {
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,0CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
2
2
  import { property } from 'lit/decorators';
3
- import { JsonUtils } from '@dreamcommerce/utilities';
3
+ import { JsonUtils } from '../../../../utilities/build/esm/json_utils.js';
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 { Splide } from '../../../../../external/@splidejs/splide/dist/js/splide.esm.js';
@@ -16,7 +16,7 @@ class VisibilityController {
16
16
  __classPrivateFieldGet(this, _VisibilityController_host, "f").addEventListener('resize', this._handleResize);
17
17
  }
18
18
  _setVisibilityValue() {
19
- const isVisible = this._isVisibleBasedOnCssStyle() && !__classPrivateFieldGet(this, _VisibilityController_host, "f").getAttribute('hidden');
19
+ const isVisible = this._isVisibleBasedOnCssStyle();
20
20
  isVisible ? this.show() : this.hide();
21
21
  }
22
22
  _isVisibleBasedOnCssStyle() {
@@ -3,21 +3,14 @@ export declare class PhoenixLightLitElement extends LitElement {
3
3
  _slots: Record<string, TemplateResult[]>;
4
4
  protected childrenToWatch: string[];
5
5
  isWebComponentConnected: boolean;
6
- isWebComponentRendered: boolean;
7
- private _childrenForConnectionToWatch;
8
- private _childrenForRenderToWatch;
9
6
  firstUpdated(props: PropertyValues): void;
10
7
  private _setupChildrenWatch;
11
- private _getComponentsNamesForConnectionToWatch;
12
- private _getComponentsNamesForRenderedToWatch;
8
+ private _getComponentsNamesToWatch;
13
9
  private _handleComponentConnected;
14
- private _handleComponentRendered;
15
10
  connectedCallback(): void;
16
11
  allChildrenConnected(): void;
17
- allChildrenRendered(): void;
18
12
  private _assignSlots;
19
13
  getSlot(name: string): TemplateResult[] | typeof nothing;
20
14
  hasSlot(name: string): boolean;
21
15
  createRenderRoot(): PhoenixLightLitElement;
22
- private _dispatchLifecycleEvent;
23
16
  }
@@ -9,71 +9,41 @@ class PhoenixLightLitElement extends LitElement {
9
9
  super(...arguments);
10
10
  this._slots = {};
11
11
  this.isWebComponentConnected = false;
12
- this.isWebComponentRendered = false;
13
- this._childrenForConnectionToWatch = [];
14
- this._childrenForRenderToWatch = [];
15
12
  this._handleComponentConnected = ({ detail }) => {
16
13
  const connectedElement = detail.$el.tagName.toLowerCase();
17
- if (this._childrenForConnectionToWatch.includes(connectedElement)) {
18
- const elToRemoveIndex = this._childrenForConnectionToWatch.findIndex((tagName) => tagName === connectedElement);
19
- this._childrenForConnectionToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
14
+ if (this.childrenToWatch.includes(connectedElement)) {
15
+ const elToRemoveIndex = this.childrenToWatch.findIndex((tagName) => tagName === connectedElement);
16
+ this.childrenToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
20
17
  }
21
- if (!this._childrenForConnectionToWatch.length) {
18
+ if (!this.childrenToWatch.length) {
22
19
  this.allChildrenConnected();
23
20
  this.removeEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
24
21
  }
25
22
  };
26
- this._handleComponentRendered = ({ detail }) => {
27
- const renderedElement = detail.$el.tagName.toLowerCase();
28
- if (this._childrenForRenderToWatch.includes(renderedElement)) {
29
- const elToRemoveIndex = this._childrenForRenderToWatch.findIndex((tagName) => tagName === renderedElement);
30
- this._childrenForRenderToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
31
- }
32
- if (!this._childrenForRenderToWatch.length) {
33
- this.allChildrenRendered();
34
- this.removeEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered, this._handleComponentConnected);
35
- }
36
- };
37
- this._dispatchLifecycleEvent = (eventName) => {
38
- this.dispatchEvent(new CustomEvent(eventName, {
39
- detail: {
40
- $el: this
41
- },
42
- bubbles: true
43
- }));
44
- };
45
23
  }
46
24
  firstUpdated(props) {
47
25
  super.firstUpdated(props);
48
26
  this._slots = this._assignSlots();
49
27
  this.requestUpdate();
50
- this._dispatchLifecycleEvent(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered);
51
- this.isWebComponentRendered = true;
52
28
  }
53
29
  _setupChildrenWatch() {
54
- this._childrenForConnectionToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesForConnectionToWatch();
55
- this._childrenForRenderToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesForRenderedToWatch();
56
- if (!this._childrenForConnectionToWatch.length)
57
- this.allChildrenConnected();
58
- if (!this._childrenForRenderToWatch.length)
59
- this.allChildrenRendered();
30
+ this.childrenToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesToWatch();
60
31
  this.addEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
61
- this.addEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered, this._handleComponentRendered);
62
32
  }
63
- _getComponentsNamesForConnectionToWatch() {
33
+ _getComponentsNamesToWatch() {
64
34
  return PhoenixLightLitElementUtils.getComponentsForWhichToWaitForConnection([...this.querySelectorAll('*')]).map(($element) => $element.tagName.toLowerCase());
65
35
  }
66
- _getComponentsNamesForRenderedToWatch() {
67
- return PhoenixLightLitElementUtils.getComponentsForWhichToWaitForRender([...this.querySelectorAll('*')]).map(($element) => $element.tagName.toLowerCase());
68
- }
69
36
  connectedCallback() {
70
37
  super.connectedCallback();
71
- this._dispatchLifecycleEvent(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected);
72
- this.isWebComponentConnected = true;
38
+ this.dispatchEvent(new CustomEvent(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, {
39
+ detail: {
40
+ $el: this
41
+ },
42
+ bubbles: true
43
+ }));
73
44
  this._setupChildrenWatch();
74
45
  }
75
46
  allChildrenConnected() { }
76
- allChildrenRendered() { }
77
47
  _assignSlots() {
78
48
  return [...this.querySelectorAll(':scope > [slot]')].reduce((acc, $el) => {
79
49
  var _a;
@@ -106,11 +76,7 @@ __decorate([
106
76
  __decorate([
107
77
  property({ type: Boolean }),
108
78
  __metadata("design:type", Object)
109
- ], PhoenixLightLitElement.prototype, "isWebComponentConnected", void 0);
110
- __decorate([
111
- property({ type: Boolean }),
112
- __metadata("design:type", Object)
113
- ], PhoenixLightLitElement.prototype, "isWebComponentRendered", void 0);
79
+ ], PhoenixLightLitElement.prototype, "isWebComponentConnected", void 0);
114
80
 
115
81
  export { PhoenixLightLitElement };
116
82
  //# sourceMappingURL=phoenix_light_lit_element.js.map
@@ -1 +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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,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;"}
@@ -1,5 +1,4 @@
1
1
  import { PhoenixLightLitElement } from "./phoenix_light_lit_element";
2
2
  export declare class PhoenixLightLitElementUtils {
3
3
  static getComponentsForWhichToWaitForConnection(components: PhoenixLightLitElement[]): PhoenixLightLitElement[];
4
- static getComponentsForWhichToWaitForRender(components: PhoenixLightLitElement[]): PhoenixLightLitElement[];
5
4
  }
@@ -1,4 +1,4 @@
1
- import { WebComponentsUtils } from '@dreamcommerce/utilities';
1
+ import { WebComponentsUtils } from '../../../../utilities/build/esm/web_components_utils.js';
2
2
 
3
3
  class PhoenixLightLitElementUtils {
4
4
  static getComponentsForWhichToWaitForConnection(components) {
@@ -7,12 +7,6 @@ class PhoenixLightLitElementUtils {
7
7
  WebComponentsUtils.isWebComponentDefined($element) &&
8
8
  !$element.isWebComponentConnected));
9
9
  }
10
- static getComponentsForWhichToWaitForRender(components) {
11
- return components.filter(($element) => (WebComponentsUtils.isWebComponent($element) && !WebComponentsUtils.isWebComponentDefined($element)) ||
12
- (WebComponentsUtils.isWebComponent($element) &&
13
- WebComponentsUtils.isWebComponentDefined($element) &&
14
- !$element.isWebComponentRendered));
15
- }
16
10
  }
17
11
 
18
12
  export { PhoenixLightLitElementUtils };
@@ -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;"}