@shoper/phoenix_design_system 1.15.13 → 1.16.1
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/external → external}/classnames/index.js +1 -1
- package/build/cjs/external/lit-html/directive-helpers.js +19 -0
- package/build/cjs/external/{lit/external/lit-html → lit-html}/directives/repeat.js +1 -1
- package/build/cjs/external/{lit/external/lit-html → lit-html}/directives/template-content.js +1 -1
- package/build/cjs/external/lit-html/lit-html.js +15 -0
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/file_picker/file_picker.js.map +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.js.map +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.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +2 -2
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +2 -2
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +2 -2
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +2 -2
- package/build/cjs/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +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.js.map +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.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/icon/icon.js +1 -1
- package/build/cjs/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/sheet/sheet.js +261 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_body.js +20 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_body.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_close.js +38 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_close.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_constants.js +19 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_constants.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_footer.js +20 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_footer.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_header.js +20 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_header.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_opener.js +45 -0
- package/build/cjs/packages/phoenix/src/components/sheet/sheet_opener.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/toggle/toggle.js +1 -1
- package/build/cjs/packages/phoenix/src/components/toggle/toggle.js.map +1 -1
- package/build/cjs/packages/phoenix/src/directives/namespaced_attribute_directive.js +2 -2
- package/build/cjs/packages/phoenix/src/directives/namespaced_attribute_directive.js.map +1 -1
- package/build/cjs/packages/phoenix/src/directives/observable_directive.js +2 -2
- package/build/cjs/packages/phoenix/src/directives/observable_directive.js.map +1 -1
- package/build/cjs/packages/phoenix/src/index.js +44 -0
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/{packages/phoenix/external → external}/classnames/index.js +1 -1
- package/build/esm/external/lit-html/directive-helpers.js +10 -0
- package/build/esm/external/lit-html/directives/repeat.js +13 -0
- package/build/esm/external/{lit/external/lit-html → lit-html}/directives/template-content.js +2 -2
- package/build/esm/external/lit-html/lit-html.js +9 -0
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/color_swatches_control/color_swatches_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/file_picker/file_picker.js.map +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.js.map +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.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/search.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/buttons/search_clear.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js +2 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/history/search_history.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/message/search_message.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js +2 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_producer_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js +2 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_product_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_results.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js +2 -2
- package/build/esm/packages/phoenix/src/components/form/search/subcomponents/results/search_suggestion_content.js.map +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.js.map +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.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/icon/icon.js +1 -1
- package/build/esm/packages/phoenix/src/components/icon/icon.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/sheet/sheet.d.ts +37 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet.js +259 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_body.d.ts +4 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_body.js +18 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_body.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_close.d.ts +8 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_close.js +36 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_close.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_constants.d.ts +9 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_constants.js +12 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_constants.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_footer.d.ts +4 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_footer.js +18 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_footer.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_header.d.ts +4 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_header.js +18 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_header.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_opener.d.ts +9 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_opener.js +43 -0
- package/build/esm/packages/phoenix/src/components/sheet/sheet_opener.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/toggle/toggle.js +1 -1
- package/build/esm/packages/phoenix/src/components/toggle/toggle.js.map +1 -1
- package/build/esm/packages/phoenix/src/directives/namespaced_attribute_directive.d.ts +1 -1
- package/build/esm/packages/phoenix/src/directives/namespaced_attribute_directive.js +2 -2
- package/build/esm/packages/phoenix/src/directives/namespaced_attribute_directive.js.map +1 -1
- package/build/esm/packages/phoenix/src/directives/observable_directive.d.ts +1 -1
- package/build/esm/packages/phoenix/src/directives/observable_directive.js +2 -2
- package/build/esm/packages/phoenix/src/directives/observable_directive.js.map +1 -1
- package/build/esm/packages/phoenix/src/index.d.ts +7 -0
- package/build/esm/packages/phoenix/src/index.js +7 -0
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/package.json +1 -1
- package/build/cjs/external/lit/external/lit-html/directive-helpers.js +0 -19
- package/build/cjs/external/lit/external/lit-html/lit-html.js +0 -15
- package/build/esm/external/lit/external/lit-html/directive-helpers.js +0 -10
- package/build/esm/external/lit/external/lit-html/directives/repeat.js +0 -13
- package/build/esm/external/lit/external/lit-html/lit-html.js +0 -9
- /package/build/cjs/{packages/phoenix/external → external}/classnames/index.js.map +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/async-directive.js +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/async-directive.js.map +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/directive-helpers.js.map +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/directive.js +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/directive.js.map +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/directives/repeat.js.map +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/directives/template-content.js.map +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/directives/when.js +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/directives/when.js.map +0 -0
- /package/build/cjs/external/{lit/external/lit-html → lit-html}/lit-html.js.map +0 -0
- /package/build/esm/{packages/phoenix/external → external}/classnames/index.js.map +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/async-directive.js +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/async-directive.js.map +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/directive-helpers.js.map +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/directive.js +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/directive.js.map +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/directives/repeat.js.map +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/directives/template-content.js.map +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/directives/when.js +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/directives/when.js.map +0 -0
- /package/build/esm/external/{lit/external/lit-html → lit-html}/lit-html.js.map +0 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
3
|
+
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
|
+
import { property, state } from '@lit/reactive-element/decorators.js';
|
|
6
|
+
import '@lit/reactive-element';
|
|
7
|
+
import { html } from 'lit-html';
|
|
8
|
+
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
9
|
+
import { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP } from '../portal/portal_constants.js';
|
|
10
|
+
import { BACKDROP_EVENTS } from '../backdrop/backdrop_constants.js';
|
|
11
|
+
import { BackdropController } from '../backdrop/controller/backdrop_controller.js';
|
|
12
|
+
import { SHEET_OPENED_PROP, FOCUSABLE_ELEMENTS_WITHIN_SHEET, SHEETS_PORTAL_NAME, SHEET_EVENTS } from './sheet_constants.js';
|
|
13
|
+
import { HSheetClose } from './sheet_close.js';
|
|
14
|
+
|
|
15
|
+
var HSheet_1;
|
|
16
|
+
let HSheet = HSheet_1 = class HSheet extends PhoenixLightLitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.opened = false;
|
|
20
|
+
this.class = '';
|
|
21
|
+
this.transition = 'scale';
|
|
22
|
+
this.sheetLabel = '';
|
|
23
|
+
this._firstFocusableElement = undefined;
|
|
24
|
+
this._focusableElements = null;
|
|
25
|
+
this._lastFocusableElement = undefined;
|
|
26
|
+
this._focusedToggler = null;
|
|
27
|
+
this._contentRef = createRef();
|
|
28
|
+
this._focusSentinelStart = createRef();
|
|
29
|
+
this._focusSentinelEnd = createRef();
|
|
30
|
+
this._propsChangeStrategies = {
|
|
31
|
+
[SHEET_OPENED_PROP]: {
|
|
32
|
+
true: () => {
|
|
33
|
+
const scrollY = window.scrollY;
|
|
34
|
+
HSheet_1.openSheets = [...HSheet_1.openSheets, this];
|
|
35
|
+
document.addEventListener('keydown', this._bindCloseOnEsc);
|
|
36
|
+
document.addEventListener(BACKDROP_EVENTS.clicked, this.close);
|
|
37
|
+
this._dispatchSheetOpenedEvent();
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
var _a;
|
|
40
|
+
(_a = this._firstFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
41
|
+
window.scrollTo(0, scrollY);
|
|
42
|
+
}, 0);
|
|
43
|
+
},
|
|
44
|
+
false: () => {
|
|
45
|
+
HSheet_1.openSheets = HSheet_1.openSheets.filter((sheet) => sheet !== this);
|
|
46
|
+
document.removeEventListener('keydown', this._bindCloseOnEsc);
|
|
47
|
+
document.removeEventListener(BACKDROP_EVENTS.clicked, this.close);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
this._backdropController = new BackdropController();
|
|
52
|
+
this._keepFocusWithinSheet = (ev) => {
|
|
53
|
+
var _a;
|
|
54
|
+
const isTabPressed = ev.code === 'Tab';
|
|
55
|
+
if (isTabPressed && this._contentRef.value) {
|
|
56
|
+
if (ev.shiftKey) {
|
|
57
|
+
if (document.activeElement === this._firstFocusableElement) {
|
|
58
|
+
const focusableElements = UiDomUtils.getFocusableElements(this._contentRef.value);
|
|
59
|
+
(_a = focusableElements[focusableElements.length - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
60
|
+
ev.preventDefault();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else if (document.activeElement === this._lastFocusableElement) {
|
|
64
|
+
UiDomUtils.setFocusToFirstFocusableElementInContainer(this._contentRef.value);
|
|
65
|
+
ev.preventDefault();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
this._handleCloseFromCloseComponent = async (ev) => {
|
|
70
|
+
var _a;
|
|
71
|
+
ev.stopPropagation();
|
|
72
|
+
const isSheetCloseElement = ev.target instanceof HSheetClose;
|
|
73
|
+
const isContainedWithinSheet = (_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.contains(ev.target);
|
|
74
|
+
if (isSheetCloseElement && isContainedWithinSheet) {
|
|
75
|
+
await this.close();
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
this._bindCloseOnEsc = async (ev) => {
|
|
79
|
+
ev.stopImmediatePropagation();
|
|
80
|
+
const $target = ev.target;
|
|
81
|
+
const closeConditions = [
|
|
82
|
+
ev.key === 'Escape',
|
|
83
|
+
$target.tagName !== 'INPUT',
|
|
84
|
+
ev.ctrlKey === false,
|
|
85
|
+
ev.shiftKey === false,
|
|
86
|
+
ev.altKey === false
|
|
87
|
+
];
|
|
88
|
+
const shouldCloseSheet = closeConditions.every((condition) => condition);
|
|
89
|
+
if (shouldCloseSheet) {
|
|
90
|
+
const [sheetToClose] = HSheet_1.openSheets.slice(-1);
|
|
91
|
+
await (sheetToClose === null || sheetToClose === void 0 ? void 0 : sheetToClose.close());
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
this.close = async () => {
|
|
95
|
+
if (!this.opened)
|
|
96
|
+
return;
|
|
97
|
+
return new Promise((resolve) => {
|
|
98
|
+
const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
|
|
99
|
+
window.requestAnimationFrame(() => {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
(_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`sheet_hide-${this.transition}-start`);
|
|
102
|
+
(_b = this._contentRef.value) === null || _b === void 0 ? void 0 : _b.classList.add(`sheet_hide-${this.transition}-end`);
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
var _a;
|
|
105
|
+
(_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`sheet_hide-${this.transition}-start`, `sheet_hide-${this.transition}-end`);
|
|
106
|
+
this[SHEET_OPENED_PROP] = false;
|
|
107
|
+
this._dispatchHSheetClosedEvent();
|
|
108
|
+
resolve();
|
|
109
|
+
}, transitionDuration);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
this._addInertToBodyChildrenElements = () => {
|
|
114
|
+
[...document.body.children].forEach((child) => {
|
|
115
|
+
const isPortalTarget = child.tagName === PORTAL_TARGET_COMPONENT_NAME.toUpperCase();
|
|
116
|
+
const isAriaLiveContainer = child.hasAttribute('aria-live');
|
|
117
|
+
if (!isPortalTarget && !isAriaLiveContainer) {
|
|
118
|
+
child.setAttribute('inert', '');
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
this._removeInertFromBodyChildrenElements = () => {
|
|
123
|
+
[...document.body.children].forEach((child) => {
|
|
124
|
+
child.removeAttribute('inert');
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
this.hidden = true;
|
|
128
|
+
this._focusableElements = [...this.querySelectorAll(FOCUSABLE_ELEMENTS_WITHIN_SHEET)];
|
|
129
|
+
}
|
|
130
|
+
static _appendSheetPortal() {
|
|
131
|
+
const $modalsPortalTarget = document.querySelector(`h-portal-target[name="${SHEETS_PORTAL_NAME}"]`);
|
|
132
|
+
if (!$modalsPortalTarget) {
|
|
133
|
+
const $portalTarget = document.createElement('h-portal-target');
|
|
134
|
+
$portalTarget.setAttribute(PORTAL_TARGET_NAME_PROP, SHEETS_PORTAL_NAME);
|
|
135
|
+
document.body.appendChild($portalTarget);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
static isSomeSheetOpen() {
|
|
139
|
+
return HSheet_1.openSheets.some((sheet) => sheet.opened);
|
|
140
|
+
}
|
|
141
|
+
connectedCallback() {
|
|
142
|
+
super.connectedCallback();
|
|
143
|
+
HSheet_1._appendSheetPortal();
|
|
144
|
+
document.addEventListener('keyup', this._keepFocusWithinSheet);
|
|
145
|
+
document.addEventListener(SHEET_EVENTS.close, this._handleCloseFromCloseComponent);
|
|
146
|
+
}
|
|
147
|
+
disconnectedCallback() {
|
|
148
|
+
super.disconnectedCallback();
|
|
149
|
+
if (this[SHEET_OPENED_PROP])
|
|
150
|
+
this.close();
|
|
151
|
+
document.removeEventListener(SHEET_EVENTS.close, this._handleCloseFromCloseComponent);
|
|
152
|
+
document.removeEventListener('keydown', this._bindCloseOnEsc);
|
|
153
|
+
document.removeEventListener('keyup', this._keepFocusWithinSheet);
|
|
154
|
+
}
|
|
155
|
+
firstUpdated(props) {
|
|
156
|
+
super.firstUpdated(props);
|
|
157
|
+
this._firstFocusableElement = this._focusSentinelStart.value;
|
|
158
|
+
this._lastFocusableElement = this._focusSentinelEnd.value;
|
|
159
|
+
}
|
|
160
|
+
updated(changedProps) {
|
|
161
|
+
if (changedProps.has(SHEET_OPENED_PROP)) {
|
|
162
|
+
this._propsChangeStrategies[SHEET_OPENED_PROP][String(this[SHEET_OPENED_PROP])]();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
_setFocusToFirstFocusableElementInSheetOrCloseBtn() {
|
|
166
|
+
requestAnimationFrame(() => {
|
|
167
|
+
if (this._contentRef.value) {
|
|
168
|
+
const focusableElements = UiDomUtils.getFocusableElements(this._contentRef.value);
|
|
169
|
+
if (focusableElements.length > 0) {
|
|
170
|
+
focusableElements.length > 1 ? focusableElements[1].focus() : focusableElements[0].focus();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async open() {
|
|
176
|
+
this._focusedToggler = document.activeElement;
|
|
177
|
+
return new Promise((resolve) => {
|
|
178
|
+
var _a;
|
|
179
|
+
this[SHEET_OPENED_PROP] = true;
|
|
180
|
+
(_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`sheet_visible`, `sheet_show-${this.transition}-start`);
|
|
181
|
+
window.requestAnimationFrame(() => {
|
|
182
|
+
setTimeout(() => {
|
|
183
|
+
var _a;
|
|
184
|
+
(_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.add(`sheet_show-${this.transition}-end`);
|
|
185
|
+
}, 0);
|
|
186
|
+
const transitionDuration = parseFloat(getComputedStyle(this._contentRef.value || this).transitionDuration) * 1000;
|
|
187
|
+
setTimeout(() => {
|
|
188
|
+
var _a;
|
|
189
|
+
(_a = this._contentRef.value) === null || _a === void 0 ? void 0 : _a.classList.remove(`sheet_show-${this.transition}-start`, `sheet_show-${this.transition}-end`);
|
|
190
|
+
this._setFocusToFirstFocusableElementInSheetOrCloseBtn();
|
|
191
|
+
resolve();
|
|
192
|
+
}, transitionDuration);
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
_dispatchSheetOpenedEvent() {
|
|
197
|
+
this.emitCustomEvent(SHEET_EVENTS.opened);
|
|
198
|
+
this._backdropController.show();
|
|
199
|
+
this._addInertToBodyChildrenElements();
|
|
200
|
+
}
|
|
201
|
+
_dispatchHSheetClosedEvent() {
|
|
202
|
+
this.emitCustomEvent(SHEET_EVENTS.closed);
|
|
203
|
+
requestAnimationFrame(() => {
|
|
204
|
+
var _a;
|
|
205
|
+
(_a = this._focusedToggler) === null || _a === void 0 ? void 0 : _a.focus();
|
|
206
|
+
});
|
|
207
|
+
this._backdropController.hide();
|
|
208
|
+
this._removeInertFromBodyChildrenElements();
|
|
209
|
+
}
|
|
210
|
+
render() {
|
|
211
|
+
return html `
|
|
212
|
+
<h-portal ?disabled="${!this.opened}" to="${SHEETS_PORTAL_NAME}" hidden>
|
|
213
|
+
<div class="sheet-wrapper ${this.class}">
|
|
214
|
+
<div tabindex="0" ${ref(this._focusSentinelStart)}></div>
|
|
215
|
+
<div ${ref(this._contentRef)} class="sheet" role="dialog" aria-label="${this.sheetLabel}">
|
|
216
|
+
<div class="sheet__container">${this.getSlot('header')} ${this.getSlot('body')} ${this.getSlot('footer')}</div>
|
|
217
|
+
</div>
|
|
218
|
+
<div tabindex="0" ${ref(this._focusSentinelEnd)}></div>
|
|
219
|
+
</div>
|
|
220
|
+
</h-portal>
|
|
221
|
+
`;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
HSheet.openSheets = [];
|
|
225
|
+
__decorate([
|
|
226
|
+
property({ type: Boolean, reflect: true }),
|
|
227
|
+
__metadata("design:type", Object)
|
|
228
|
+
], HSheet.prototype, "opened", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: String }),
|
|
231
|
+
__metadata("design:type", Object)
|
|
232
|
+
], HSheet.prototype, "class", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
property({ type: String }),
|
|
235
|
+
__metadata("design:type", Object)
|
|
236
|
+
], HSheet.prototype, "transition", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
property({ type: String, attribute: 'sheet-label' }),
|
|
239
|
+
__metadata("design:type", Object)
|
|
240
|
+
], HSheet.prototype, "sheetLabel", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
state(),
|
|
243
|
+
__metadata("design:type", Object)
|
|
244
|
+
], HSheet.prototype, "_firstFocusableElement", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
state(),
|
|
247
|
+
__metadata("design:type", Object)
|
|
248
|
+
], HSheet.prototype, "_focusableElements", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
state(),
|
|
251
|
+
__metadata("design:type", Object)
|
|
252
|
+
], HSheet.prototype, "_lastFocusableElement", void 0);
|
|
253
|
+
HSheet = HSheet_1 = __decorate([
|
|
254
|
+
phoenixCustomElement('h-sheet'),
|
|
255
|
+
__metadata("design:paramtypes", [])
|
|
256
|
+
], HSheet);
|
|
257
|
+
|
|
258
|
+
export { HSheet };
|
|
259
|
+
//# sourceMappingURL=sheet.js.map
|
|
@@ -0,0 +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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,18 @@
|
|
|
1
|
+
import { __decorate, __metadata } 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
|
+
|
|
5
|
+
let HSheetBody = class HSheetBody extends PhoenixLightLitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.slot = this.hasAttribute('slot') ? this.slot : 'body';
|
|
9
|
+
this.className = `sheet__body ${this.className}`;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
HSheetBody = __decorate([
|
|
13
|
+
phoenixCustomElement('h-sheet-body'),
|
|
14
|
+
__metadata("design:paramtypes", [])
|
|
15
|
+
], HSheetBody);
|
|
16
|
+
|
|
17
|
+
export { HSheetBody };
|
|
18
|
+
//# sourceMappingURL=sheet_body.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HSheetClose extends PhoenixLightLitElement {
|
|
3
|
+
constructor();
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
disconnectedCallback(): void;
|
|
6
|
+
private _dispatchSheetCloseEvent;
|
|
7
|
+
private _dispatchSheetCloseOnEnterEvent;
|
|
8
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { __decorate, __metadata } 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 { SHEET_EVENTS } from './sheet_constants.js';
|
|
5
|
+
|
|
6
|
+
let HSheetClose = class HSheetClose extends PhoenixLightLitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.tabIndex = 0;
|
|
10
|
+
this.setAttribute('role', 'button');
|
|
11
|
+
}
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
super.connectedCallback();
|
|
14
|
+
this.addEventListener('click', this._dispatchSheetCloseEvent);
|
|
15
|
+
this.addEventListener('keydown', this._dispatchSheetCloseOnEnterEvent);
|
|
16
|
+
}
|
|
17
|
+
disconnectedCallback() {
|
|
18
|
+
this.removeEventListener('click', this._dispatchSheetCloseEvent);
|
|
19
|
+
this.removeEventListener('keydown', this._dispatchSheetCloseOnEnterEvent);
|
|
20
|
+
}
|
|
21
|
+
_dispatchSheetCloseEvent() {
|
|
22
|
+
this.emitCustomEvent(SHEET_EVENTS.close);
|
|
23
|
+
}
|
|
24
|
+
_dispatchSheetCloseOnEnterEvent(ev) {
|
|
25
|
+
if (ev.code === 'Enter' || ev.code === 'Space') {
|
|
26
|
+
this._dispatchSheetCloseEvent();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
HSheetClose = __decorate([
|
|
31
|
+
phoenixCustomElement('h-sheet-close'),
|
|
32
|
+
__metadata("design:paramtypes", [])
|
|
33
|
+
], HSheetClose);
|
|
34
|
+
|
|
35
|
+
export { HSheetClose };
|
|
36
|
+
//# sourceMappingURL=sheet_close.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const SHEETS_PORTAL_NAME = "modals";
|
|
2
|
+
export declare const SHEET_EVENTS: {
|
|
3
|
+
readonly open: "open";
|
|
4
|
+
readonly close: "close";
|
|
5
|
+
readonly opened: "opened";
|
|
6
|
+
readonly closed: "closed";
|
|
7
|
+
};
|
|
8
|
+
export declare const SHEET_OPENED_PROP = "opened";
|
|
9
|
+
export declare const FOCUSABLE_ELEMENTS_WITHIN_SHEET = "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const SHEETS_PORTAL_NAME = 'modals';
|
|
2
|
+
const SHEET_EVENTS = {
|
|
3
|
+
open: 'open',
|
|
4
|
+
close: 'close',
|
|
5
|
+
opened: 'opened',
|
|
6
|
+
closed: 'closed'
|
|
7
|
+
};
|
|
8
|
+
const SHEET_OPENED_PROP = 'opened';
|
|
9
|
+
const FOCUSABLE_ELEMENTS_WITHIN_SHEET = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
10
|
+
|
|
11
|
+
export { FOCUSABLE_ELEMENTS_WITHIN_SHEET, SHEETS_PORTAL_NAME, SHEET_EVENTS, SHEET_OPENED_PROP };
|
|
12
|
+
//# sourceMappingURL=sheet_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;AACA;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __decorate, __metadata } 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
|
+
|
|
5
|
+
let HSheetFooter = class HSheetFooter extends PhoenixLightLitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.slot = this.hasAttribute('slot') ? this.slot : 'footer';
|
|
9
|
+
this.className = `sheet__footer ${this.className}`;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
HSheetFooter = __decorate([
|
|
13
|
+
phoenixCustomElement('h-sheet-footer'),
|
|
14
|
+
__metadata("design:paramtypes", [])
|
|
15
|
+
], HSheetFooter);
|
|
16
|
+
|
|
17
|
+
export { HSheetFooter };
|
|
18
|
+
//# sourceMappingURL=sheet_footer.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __decorate, __metadata } 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
|
+
|
|
5
|
+
let HSheetHeader = class HSheetHeader extends PhoenixLightLitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.slot = this.hasAttribute('slot') ? this.slot : 'header';
|
|
9
|
+
this.className = `sheet__header ${this.className}`;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
HSheetHeader = __decorate([
|
|
13
|
+
phoenixCustomElement('h-sheet-header'),
|
|
14
|
+
__metadata("design:paramtypes", [])
|
|
15
|
+
], HSheetHeader);
|
|
16
|
+
|
|
17
|
+
export { HSheetHeader };
|
|
18
|
+
//# sourceMappingURL=sheet_header.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
+
export declare class HSheetOpener extends PhoenixLightLitElement {
|
|
3
|
+
name: string;
|
|
4
|
+
constructor();
|
|
5
|
+
connectedCallback(): void;
|
|
6
|
+
disconnectedCallback(): void;
|
|
7
|
+
private _openSheet;
|
|
8
|
+
private _openSheetOnKeydownEvent;
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { property } from 'lit/decorators';
|
|
3
|
+
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
|
+
|
|
6
|
+
let HSheetOpener = class HSheetOpener extends PhoenixLightLitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.name = '';
|
|
10
|
+
this.tabIndex = 0;
|
|
11
|
+
this.setAttribute('role', 'button');
|
|
12
|
+
this.setAttribute('aria-haspopup', 'dialog');
|
|
13
|
+
}
|
|
14
|
+
connectedCallback() {
|
|
15
|
+
super.connectedCallback();
|
|
16
|
+
this.addEventListener('click', this._openSheet);
|
|
17
|
+
this.addEventListener('keydown', this._openSheetOnKeydownEvent);
|
|
18
|
+
}
|
|
19
|
+
disconnectedCallback() {
|
|
20
|
+
this.removeEventListener('click', this._openSheet);
|
|
21
|
+
this.removeEventListener('keydown', this._openSheetOnKeydownEvent);
|
|
22
|
+
}
|
|
23
|
+
_openSheet() {
|
|
24
|
+
const sheet = document.querySelector(`h-sheet#${this.name}`);
|
|
25
|
+
sheet === null || sheet === void 0 ? void 0 : sheet.open();
|
|
26
|
+
}
|
|
27
|
+
_openSheetOnKeydownEvent(ev) {
|
|
28
|
+
if (ev.code === 'Enter' || ev.code === 'Space') {
|
|
29
|
+
this._openSheet();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__decorate([
|
|
34
|
+
property({ type: String }),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], HSheetOpener.prototype, "name", void 0);
|
|
37
|
+
HSheetOpener = __decorate([
|
|
38
|
+
phoenixCustomElement('h-sheet-opener'),
|
|
39
|
+
__metadata("design:paramtypes", [])
|
|
40
|
+
], HSheetOpener);
|
|
41
|
+
|
|
42
|
+
export { HSheetOpener };
|
|
43
|
+
//# sourceMappingURL=sheet_opener.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -5,7 +5,7 @@ import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/pho
|
|
|
5
5
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
6
|
import { BehaviorSubject } from '../../core/classes/behavior_subject/behavior_subject.js';
|
|
7
7
|
import { ContextProviderController } from '../../core/context/context_provider_controller.js';
|
|
8
|
-
import { templateContent as o } from '../../../../../external/lit
|
|
8
|
+
import { templateContent as o } from '../../../../../external/lit-html/directives/template-content.js';
|
|
9
9
|
import { TOGGLE_CONTEXT_NAME, TOGGLE_BUTTON_EVENTS } from './toggle_constants.js';
|
|
10
10
|
|
|
11
11
|
let HToggle = class HToggle extends PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,iEAAqE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,5 +4,5 @@ declare class NamespaceAttributeDirective extends Directive {
|
|
|
4
4
|
update(part: PartInfo, [namespace, value]: DirectiveParameters<this>): typeof noChange;
|
|
5
5
|
render(namespace: string, value: string): typeof noChange;
|
|
6
6
|
}
|
|
7
|
-
export declare const namespacedAttribute: (namespace: string, value: string) => import("lit/
|
|
7
|
+
export declare const namespacedAttribute: (namespace: string, value: string) => import("lit-html/directive").DirectiveResult<typeof NamespaceAttributeDirective>;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { noChange } from 'lit';
|
|
2
|
-
import '../../../../external/lit
|
|
3
|
-
import { directive as e, Directive as i } from '../../../../external/lit
|
|
2
|
+
import '../../../../external/lit-html/lit-html.js';
|
|
3
|
+
import { directive as e, Directive as i } from '../../../../external/lit-html/directive.js';
|
|
4
4
|
|
|
5
5
|
class NamespaceAttributeDirective extends i {
|
|
6
6
|
update(part, [namespace, value]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,OAAO,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,OAAO,2CAA+C;AACtD,+CAA+C,4CAAgD;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -10,5 +10,5 @@ declare class ObserveDirective<T = unknown> extends AsyncDirective {
|
|
|
10
10
|
disconnected(): void;
|
|
11
11
|
reconnected(): void;
|
|
12
12
|
}
|
|
13
|
-
export declare const observe: (observable: ISubject<unknown>, render?: Function | undefined) => import("lit/
|
|
13
|
+
export declare const observe: (observable: ISubject<unknown>, render?: Function | undefined) => import("lit-html/directive").DirectiveResult<typeof ObserveDirective>;
|
|
14
14
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { noChange } from 'lit';
|
|
2
|
-
import { directive as e } from '../../../../external/lit
|
|
3
|
-
import { AsyncDirective as c } from '../../../../external/lit
|
|
2
|
+
import { directive as e } from '../../../../external/lit-html/directive.js';
|
|
3
|
+
import { AsyncDirective as c } from '../../../../external/lit-html/async-directive.js';
|
|
4
4
|
import { Observer } from '../core/classes/observer/observer.js';
|
|
5
5
|
|
|
6
6
|
class ObserveDirective extends c {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,4CAAgD;AAC/E,oCAAoC,kDAAsD;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;"}
|
|
@@ -21,6 +21,13 @@ export { HModalFooter } from './components/modal/modal_footer';
|
|
|
21
21
|
export { HModalHeader } from './components/modal/modal_header';
|
|
22
22
|
export { HModalClose } from './components/modal/modal_close';
|
|
23
23
|
export { MODAL_EVENTS } from './components/modal/modal_constants';
|
|
24
|
+
export { HSheet } from './components/sheet/sheet';
|
|
25
|
+
export { HSheetOpener } from './components/sheet/sheet_opener';
|
|
26
|
+
export { HSheetBody } from './components/sheet/sheet_body';
|
|
27
|
+
export { HSheetFooter } from './components/sheet/sheet_footer';
|
|
28
|
+
export { HSheetHeader } from './components/sheet/sheet_header';
|
|
29
|
+
export { HSheetClose } from './components/sheet/sheet_close';
|
|
30
|
+
export { SHEET_EVENTS } from './components/sheet/sheet_constants';
|
|
24
31
|
export { HControl } from './components/form/control/control';
|
|
25
32
|
export { HControlErrors } from './components/form/control/control_errors';
|
|
26
33
|
export { HControlContent } from './components/form/control/control_content';
|
|
@@ -32,6 +32,13 @@ export { HModalOpener } from './components/modal/modal_opener.js';
|
|
|
32
32
|
export { HModalBody } from './components/modal/modal_body.js';
|
|
33
33
|
export { HModalFooter } from './components/modal/modal_footer.js';
|
|
34
34
|
export { HModalHeader } from './components/modal/modal_header.js';
|
|
35
|
+
export { SHEET_EVENTS } from './components/sheet/sheet_constants.js';
|
|
36
|
+
export { HSheetClose } from './components/sheet/sheet_close.js';
|
|
37
|
+
export { HSheet } from './components/sheet/sheet.js';
|
|
38
|
+
export { HSheetOpener } from './components/sheet/sheet_opener.js';
|
|
39
|
+
export { HSheetBody } from './components/sheet/sheet_body.js';
|
|
40
|
+
export { HSheetFooter } from './components/sheet/sheet_footer.js';
|
|
41
|
+
export { HSheetHeader } from './components/sheet/sheet_header.js';
|
|
35
42
|
export { ADDITIONAL_CONTENT_TYPE_TO_CSS_CLASSES_MAP, CONTROL_ADDITIONAL_CONTENT_TYPES, CONTROL_CONTENT_SIZES, FORM_CONTROLS_CSS_CLASSES } from './components/form/control/control_constatns.js';
|
|
36
43
|
export { HControl } from './components/form/control/control.js';
|
|
37
44
|
export { HControlErrors } from './components/form/control/control_errors.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var litHtml = require('./lit-html.js');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2020 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/const {I:l}=litHtml._$LH,e=o=>void 0===o.strings,c=()=>document.createComment(""),r=(o,t,i)=>{var n;const d=o._$AA.parentNode,v=void 0===t?o._$AB:t._$AA;if(void 0===i){const t=d.insertBefore(c(),v),n=d.insertBefore(c(),v);i=new l(t,n,o,o.options);}else {const l=i._$AB.nextSibling,t=i._$AM,e=t!==o;if(e){let l;null===(n=i._$AQ)||void 0===n||n.call(i,o),i._$AM=o,void 0!==i._$AP&&(l=o._$AU)!==t._$AU&&i._$AP(l);}if(l!==v||e){let o=i._$AA;for(;o!==l;){const l=o.nextSibling;d.insertBefore(o,v),o=l;}}}return i},u=(o,l,t=o)=>(o._$AI(l,t),o),f={},s=(o,l=f)=>o._$AH=l,m=o=>o._$AH,p=o=>{var l;null===(l=o._$AP)||void 0===l||l.call(o,!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o;}};
|
|
12
|
-
|
|
13
|
-
exports.getCommittedValue = m;
|
|
14
|
-
exports.insertPart = r;
|
|
15
|
-
exports.isSingleExpression = e;
|
|
16
|
-
exports.removePart = p;
|
|
17
|
-
exports.setChildPartValue = u;
|
|
18
|
-
exports.setCommittedValue = s;
|
|
19
|
-
//# sourceMappingURL=directive-helpers.js.map
|