@shoper/phoenix_design_system 1.18.10-7 → 1.18.10-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/packages/phoenix/src/components/accordion/accordion.js +5 -14
- package/build/cjs/packages/phoenix/src/components/accordion/accordion.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_constants.js +2 -10
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_constants.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js +17 -43
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js +28 -194
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_toggler.js +7 -23
- package/build/cjs/packages/phoenix/src/components/accordion/accordion_toggler.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/details/details.js +41 -0
- package/build/cjs/packages/phoenix/src/components/details/details.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/details/details_constants.js +23 -0
- package/build/{esm/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js.map → cjs/packages/phoenix/src/components/details/details_constants.js.map} +1 -1
- package/build/cjs/packages/phoenix/src/components/details/details_content.js +38 -0
- package/build/cjs/packages/phoenix/src/components/details/details_content.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/details/details_group.js +177 -0
- package/build/cjs/packages/phoenix/src/components/details/details_group.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/details/details_toggler.js +27 -0
- package/build/cjs/packages/phoenix/src/components/details/details_toggler.js.map +1 -0
- package/build/cjs/packages/phoenix/src/components/messages/base_message.js +1 -1
- package/build/cjs/packages/phoenix/src/index.js +33 -2
- package/build/cjs/packages/phoenix/src/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion.js +6 -15
- package/build/esm/packages/phoenix/src/components/accordion/accordion.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_constants.d.ts +2 -8
- package/build/esm/packages/phoenix/src/components/accordion/accordion_constants.js +3 -9
- package/build/esm/packages/phoenix/src/components/accordion/accordion_constants.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js +18 -44
- package/build/esm/packages/phoenix/src/components/accordion/accordion_content.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.d.ts +0 -16
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js +29 -195
- package/build/esm/packages/phoenix/src/components/accordion/accordion_group.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.d.ts +0 -1
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.js +7 -23
- package/build/esm/packages/phoenix/src/components/accordion/accordion_toggler.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/details/details.d.ts +10 -0
- package/build/esm/packages/phoenix/src/components/details/details.js +39 -0
- package/build/esm/packages/phoenix/src/components/details/details.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/details/details_constants.d.ts +13 -0
- package/build/esm/packages/phoenix/src/components/details/details_constants.js +16 -0
- package/build/esm/packages/{utilities/build/esm/packages/utilities/src/json_utils.js.map → phoenix/src/components/details/details_constants.js.map} +1 -1
- package/build/esm/packages/phoenix/src/components/details/details_content.d.ts +6 -0
- package/build/esm/packages/phoenix/src/components/details/details_content.js +36 -0
- package/build/esm/packages/phoenix/src/components/details/details_content.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/details/details_group.d.ts +30 -0
- package/build/esm/packages/phoenix/src/components/details/details_group.js +175 -0
- package/build/esm/packages/phoenix/src/components/details/details_group.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/details/details_toggler.d.ts +4 -0
- package/build/esm/packages/phoenix/src/components/details/details_toggler.js +25 -0
- package/build/{cjs/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js.map → esm/packages/phoenix/src/components/details/details_toggler.js.map} +1 -1
- package/build/esm/packages/phoenix/src/components/details/details_types.d.ts +35 -0
- package/build/esm/packages/phoenix/src/components/details/details_types.js +7 -0
- package/build/esm/packages/phoenix/src/components/details/details_types.js.map +1 -0
- package/build/esm/packages/phoenix/src/components/messages/base_message.js +1 -1
- package/build/esm/packages/phoenix/src/index.d.ts +6 -0
- package/build/esm/packages/phoenix/src/index.js +6 -1
- package/build/esm/packages/phoenix/src/index.js.map +1 -1
- package/package.json +2 -2
- package/build/cjs/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js +0 -26
- package/build/cjs/packages/utilities/build/esm/packages/utilities/src/json_utils.js +0 -25
- package/build/cjs/packages/utilities/build/esm/packages/utilities/src/json_utils.js.map +0 -1
- package/build/esm/packages/utilities/build/esm/packages/utilities/src/feature_flag_utils.js +0 -22
- package/build/esm/packages/utilities/build/esm/packages/utilities/src/json_utils.js +0 -21
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { property, state } from 'lit/decorators';
|
|
4
|
+
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
5
|
+
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
6
|
+
import v4 from '../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
7
|
+
import { createRef, ref } from 'lit/directives/ref';
|
|
8
|
+
import { DETAILS_MODE, DETAILS_EVENTS, DETAILS_CSS_CLASSES, DETAILS_ANIMATION_DURATION } from './details_constants.js';
|
|
9
|
+
|
|
10
|
+
let HDetailsGroup = class HDetailsGroup extends PhoenixLightLitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.opened = false;
|
|
14
|
+
this._isDisabled = false;
|
|
15
|
+
this._mode = DETAILS_MODE.multi;
|
|
16
|
+
this._$parentDetails = null;
|
|
17
|
+
this._detailsRef = createRef();
|
|
18
|
+
this._togglerId = v4();
|
|
19
|
+
this._animationFrameId = null;
|
|
20
|
+
this._closeTimeoutId = null;
|
|
21
|
+
this._syncWithParentDetails = () => {
|
|
22
|
+
if (!this._$parentDetails)
|
|
23
|
+
return;
|
|
24
|
+
this._mode = this._$parentDetails.mode;
|
|
25
|
+
const shouldBeDisabled = this._$parentDetails.disabled;
|
|
26
|
+
const hasDisabledStateChanged = shouldBeDisabled !== this._isDisabled;
|
|
27
|
+
if (hasDisabledStateChanged) {
|
|
28
|
+
shouldBeDisabled ? this.disable() : this.enable();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
this._hideOtherDetailsGroups = () => {
|
|
32
|
+
var _a;
|
|
33
|
+
if (this._isDisabled)
|
|
34
|
+
return;
|
|
35
|
+
(_a = this._$parentDetails) === null || _a === void 0 ? void 0 : _a.querySelectorAll('h-details-group').forEach(($detailsGroup) => {
|
|
36
|
+
if ($detailsGroup === this)
|
|
37
|
+
return;
|
|
38
|
+
$detailsGroup.hide();
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
this._summaryClickHandler = (ev) => {
|
|
42
|
+
ev.preventDefault();
|
|
43
|
+
if (!this._isDisabled)
|
|
44
|
+
this.toggle();
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
connectedCallback() {
|
|
48
|
+
var _a;
|
|
49
|
+
super.connectedCallback();
|
|
50
|
+
this._addAttributesToSlottedContentElements();
|
|
51
|
+
this._$parentDetails = this.closest('h-details');
|
|
52
|
+
(_a = this._$parentDetails) === null || _a === void 0 ? void 0 : _a.addEventListener(DETAILS_EVENTS.update, this._syncWithParentDetails);
|
|
53
|
+
this._syncWithParentDetails();
|
|
54
|
+
}
|
|
55
|
+
_addAttributesToSlottedContentElements() {
|
|
56
|
+
const slottedContentElements = Array.from(this.querySelectorAll('[slot="content"]'));
|
|
57
|
+
slottedContentElements.forEach(($element) => {
|
|
58
|
+
$element.classList.add(DETAILS_CSS_CLASSES.content);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
firstUpdated(props) {
|
|
62
|
+
super.firstUpdated(props);
|
|
63
|
+
if (this.opened)
|
|
64
|
+
this.show();
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
var _a;
|
|
68
|
+
super.disconnectedCallback();
|
|
69
|
+
(_a = this._$parentDetails) === null || _a === void 0 ? void 0 : _a.removeEventListener(DETAILS_EVENTS.update, this._syncWithParentDetails);
|
|
70
|
+
}
|
|
71
|
+
show() {
|
|
72
|
+
this._handleSingleModeConstraint();
|
|
73
|
+
const $details = this._detailsRef.value;
|
|
74
|
+
if (!$details)
|
|
75
|
+
return;
|
|
76
|
+
this._clearPendingAnimations();
|
|
77
|
+
$details.setAttribute('open', '');
|
|
78
|
+
this._animationFrameId = requestAnimationFrame(() => {
|
|
79
|
+
$details.classList.add(DETAILS_CSS_CLASSES.open);
|
|
80
|
+
this._animationFrameId = null;
|
|
81
|
+
});
|
|
82
|
+
this._dispatchToggleEvent($details, true);
|
|
83
|
+
}
|
|
84
|
+
hide() {
|
|
85
|
+
const $details = this._detailsRef.value;
|
|
86
|
+
if (!$details)
|
|
87
|
+
return;
|
|
88
|
+
this._clearPendingAnimations();
|
|
89
|
+
$details.classList.remove(DETAILS_CSS_CLASSES.open);
|
|
90
|
+
this._closeTimeoutId = setTimeout(() => {
|
|
91
|
+
$details.removeAttribute('open');
|
|
92
|
+
this._closeTimeoutId = null;
|
|
93
|
+
}, DETAILS_ANIMATION_DURATION);
|
|
94
|
+
this._dispatchToggleEvent($details, false);
|
|
95
|
+
}
|
|
96
|
+
_clearPendingAnimations() {
|
|
97
|
+
if (this._animationFrameId !== null) {
|
|
98
|
+
cancelAnimationFrame(this._animationFrameId);
|
|
99
|
+
this._animationFrameId = null;
|
|
100
|
+
}
|
|
101
|
+
if (this._closeTimeoutId !== null) {
|
|
102
|
+
clearTimeout(this._closeTimeoutId);
|
|
103
|
+
this._closeTimeoutId = null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
_dispatchToggleEvent($details, open) {
|
|
107
|
+
this.emitCustomEvent(DETAILS_EVENTS.toggle, {
|
|
108
|
+
detail: { open, target: $details }
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
toggle() {
|
|
112
|
+
this._handleSingleModeConstraint();
|
|
113
|
+
const $details = this._detailsRef.value;
|
|
114
|
+
if (!$details)
|
|
115
|
+
return;
|
|
116
|
+
const isOpen = $details.hasAttribute('open');
|
|
117
|
+
isOpen ? this.hide() : this.show();
|
|
118
|
+
}
|
|
119
|
+
_handleSingleModeConstraint() {
|
|
120
|
+
if (this._mode === DETAILS_MODE.single) {
|
|
121
|
+
this._hideOtherDetailsGroups();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
enable() {
|
|
125
|
+
if (!this._isDisabled)
|
|
126
|
+
return;
|
|
127
|
+
this._isDisabled = false;
|
|
128
|
+
this.hide();
|
|
129
|
+
}
|
|
130
|
+
disable() {
|
|
131
|
+
if (this._isDisabled)
|
|
132
|
+
return;
|
|
133
|
+
this._isDisabled = true;
|
|
134
|
+
this.show();
|
|
135
|
+
}
|
|
136
|
+
notify() { }
|
|
137
|
+
render() {
|
|
138
|
+
return html `
|
|
139
|
+
<details
|
|
140
|
+
${ref(this._detailsRef)}
|
|
141
|
+
class="details__details ${this._isDisabled ? 'details__details_disabled' : ''}"
|
|
142
|
+
aria-disabled="${this._isDisabled ? 'true' : 'false'}"
|
|
143
|
+
aria-labelledby="${this._togglerId}"
|
|
144
|
+
>
|
|
145
|
+
<summary
|
|
146
|
+
class="details__summary"
|
|
147
|
+
id="${this._togglerId}"
|
|
148
|
+
@click=${this._summaryClickHandler}
|
|
149
|
+
>
|
|
150
|
+
${this.getSlot('toggler')}
|
|
151
|
+
</summary>
|
|
152
|
+
|
|
153
|
+
${this.getSlot('content')}
|
|
154
|
+
</details>
|
|
155
|
+
`;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ type: Boolean, reflect: true }),
|
|
160
|
+
__metadata("design:type", Object)
|
|
161
|
+
], HDetailsGroup.prototype, "opened", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
state(),
|
|
164
|
+
__metadata("design:type", Object)
|
|
165
|
+
], HDetailsGroup.prototype, "_isDisabled", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
state(),
|
|
168
|
+
__metadata("design:type", String)
|
|
169
|
+
], HDetailsGroup.prototype, "_mode", void 0);
|
|
170
|
+
HDetailsGroup = __decorate([
|
|
171
|
+
phoenixCustomElement('h-details-group')
|
|
172
|
+
], HDetailsGroup);
|
|
173
|
+
|
|
174
|
+
export { HDetailsGroup };
|
|
175
|
+
//# sourceMappingURL=details_group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA,eAAe,qDAAyD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,25 @@
|
|
|
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 { HDetailsGroup } from './details_group.js';
|
|
6
|
+
|
|
7
|
+
let HDetailsToggler = class HDetailsToggler extends PhoenixLightLitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
if (this.parentElement instanceof HDetailsGroup) {
|
|
11
|
+
this.slot = this.hasAttribute('slot') ? this.slot : 'toggler';
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const contentToSlot = UiDomUtils.findParentByCondition(this, ($el) => $el.parentElement instanceof HDetailsGroup);
|
|
15
|
+
contentToSlot === null || contentToSlot === void 0 ? void 0 : contentToSlot.setAttribute('slot', 'toggler');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
HDetailsToggler = __decorate([
|
|
20
|
+
phoenixCustomElement('h-details-toggler'),
|
|
21
|
+
__metadata("design:paramtypes", [])
|
|
22
|
+
], HDetailsToggler);
|
|
23
|
+
|
|
24
|
+
export { HDetailsToggler };
|
|
25
|
+
//# sourceMappingURL=details_toggler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;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,35 @@
|
|
|
1
|
+
import { DETAILS_MODE } from './details_constants';
|
|
2
|
+
import { Any } from 'ts-toolbelt';
|
|
3
|
+
import { HDetails } from './details';
|
|
4
|
+
import { HDetailsContent } from "./details_content";
|
|
5
|
+
import { HDetailsGroup } from "./details_group";
|
|
6
|
+
import { HDetailsToggler } from "./details_toggler";
|
|
7
|
+
export interface IDetails {
|
|
8
|
+
enable(): void;
|
|
9
|
+
disable(): void;
|
|
10
|
+
notify(): void;
|
|
11
|
+
}
|
|
12
|
+
export interface IDetailsGroup {
|
|
13
|
+
show(): void;
|
|
14
|
+
hide(): void;
|
|
15
|
+
toggle(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare type TDetailsMode = Any.Keys<typeof DETAILS_MODE>;
|
|
18
|
+
export declare type TDetailsProps = {
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
mode: TDetailsMode;
|
|
21
|
+
};
|
|
22
|
+
export declare type TDetailsGroupProps = {
|
|
23
|
+
opened: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
regionId: string;
|
|
26
|
+
controlsId: string;
|
|
27
|
+
};
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'h-details': HDetails;
|
|
31
|
+
'h-details-group': HDetailsGroup;
|
|
32
|
+
'h-details-toggler': HDetailsToggler;
|
|
33
|
+
'h-details-content': HDetailsContent;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import './details_constants';
|
|
2
|
+
import 'ts-toolbelt';
|
|
3
|
+
import './details';
|
|
4
|
+
import '@phoenixRoot/components/details/details_content';
|
|
5
|
+
import '@phoenixRoot/components/details/details_group';
|
|
6
|
+
import '@phoenixRoot/components/details/details_toggler';
|
|
7
|
+
//# sourceMappingURL=details_types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details_types.js","sourceRoot":"","sources":["../../../../../../../src/components/details/details_types.ts"],"names":[],"mappings":"AAAA,OAA6B,qBAAqB,CAAC;AACnD,OAAoB,aAAa,CAAC;AAClC,OAAyB,WAAW,CAAC;AACrC,OAAgC,iDAAiD,CAAC;AAClF,OAA8B,+CAA+C,CAAC;AAC9E,OAAgC,iDAAiD,CAAC"}
|
|
@@ -7,8 +7,8 @@ import v4 from '../../../../../external/uuid/dist/esm-browser/v4.js';
|
|
|
7
7
|
import { PORTAL_TARGET_COMPONENT_NAME, PORTAL_TARGET_NAME_PROP, PORTAL_TARGET_ATTRIBUTE_NAME } from '../portal/portal_constants.js';
|
|
8
8
|
import { ClickOutsideController } from '../../controllers/click_outside_controller/click_outside_controller.js';
|
|
9
9
|
import { RelativePositionController } from '../../controllers/relative_position_controller/relative_position_controller.js';
|
|
10
|
-
import { createRef, ref } from 'lit/directives/ref';
|
|
11
10
|
import { DEFAULT_MESSAGE_PORTAL_NAME, DEFAULT_MESSAGE_OFFSET, LIST_OF_MESSAGE_CHILDREN, MESSAGE_SHOW_DELAY_IN_MS, MESSAGE_TIME_TO_DELAY_CLOSING_IN_MS, MESSAGE_REMOVED_CLASS_NAME, MESSAGE_CLOSE_DELAY_IN_MS, MESSAGE_CONTENT_ELEMENTS, SCREEN_READER_ONLY_CLASS_NAME, MESSAGE_CONTENT_SLOT_NAME } from './base_message_constants.js';
|
|
11
|
+
import { createRef, ref } from 'lit/directives/ref';
|
|
12
12
|
|
|
13
13
|
class BaseMessage extends PhoenixLightLitElement {
|
|
14
14
|
constructor() {
|
|
@@ -147,5 +147,11 @@ export { NavigatorShare } from './components/navigator/navigator_share/navigator
|
|
|
147
147
|
export { NavigatorController } from './components/navigator/navigator_controller/navigator_controller';
|
|
148
148
|
export { HShowMore } from './components/show-more/show_more';
|
|
149
149
|
export { HShowMoreButton } from './components/show-more/show_more_button';
|
|
150
|
+
export { HDetails } from './components/details/details';
|
|
151
|
+
export { HDetailsGroup } from './components/details/details_group';
|
|
152
|
+
export { HDetailsToggler } from './components/details/details_toggler';
|
|
153
|
+
export { HDetailsContent } from './components/details/details_content';
|
|
154
|
+
export * from './components/details/details_constants';
|
|
155
|
+
export * from './components/details/details_types';
|
|
150
156
|
export { BehaviorSubject } from './core/classes/behavior_subject/behavior_subject';
|
|
151
157
|
export { phoenixCustomElement } from './core/decorators/phoenix_custom_element';
|
|
@@ -71,7 +71,7 @@ export { HRadioControl } from './components/form/radio/radio_control.js';
|
|
|
71
71
|
export { TEXTAREA_CONTROL_CSS_CLASSES, TEXTAREA_CONTROL_EVENTS, TEXTAREA_PROPS_TO_SYNC, TEXTAREA_SLOTS } from './components/form/textarea/textarea_constants.js';
|
|
72
72
|
export { HTextarea } from './components/form/textarea/textarea.js';
|
|
73
73
|
export { HTextareaControl } from './components/form/textarea/textarea_control.js';
|
|
74
|
-
export {
|
|
74
|
+
export { ACCORDION_CONTEXTS, ACCORDION_EVENTS, ACCORDION_MODE } from './components/accordion/accordion_constants.js';
|
|
75
75
|
export { HAccordion } from './components/accordion/accordion.js';
|
|
76
76
|
export { HAccordionGroup } from './components/accordion/accordion_group.js';
|
|
77
77
|
export { HAccordionContent } from './components/accordion/accordion_content.js';
|
|
@@ -129,4 +129,9 @@ export { HToggleBtn } from './components/toggle/toggle_button.js';
|
|
|
129
129
|
export { NavigatorShare } from './components/navigator/navigator_share/navigator_share.js';
|
|
130
130
|
export { NavigatorController } from './components/navigator/navigator_controller/navigator_controller.js';
|
|
131
131
|
export { HShowMore } from './components/show-more/show_more.js';
|
|
132
|
+
export { DETAILS_ANIMATION_DURATION, DETAILS_CSS_CLASSES, DETAILS_EVENTS, DETAILS_MODE } from './components/details/details_constants.js';
|
|
133
|
+
export { HDetails } from './components/details/details.js';
|
|
134
|
+
export { HDetailsGroup } from './components/details/details_group.js';
|
|
135
|
+
export { HDetailsToggler } from './components/details/details_toggler.js';
|
|
136
|
+
export { HDetailsContent } from './components/details/details_content.js';
|
|
132
137
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@shoper/phoenix_design_system",
|
|
3
3
|
"packageManager": "yarn@3.2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "1.18.10-
|
|
5
|
+
"version": "1.18.10-9",
|
|
6
6
|
"description": "phoenix design system",
|
|
7
7
|
"author": "zefirek",
|
|
8
8
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@splidejs/splide-extension-auto-scroll": "0.5.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@dreamcommerce/utilities": "^1.23.2-
|
|
34
|
+
"@dreamcommerce/utilities": "^1.23.2-3",
|
|
35
35
|
"@shoper/jest_config": "^0.0.0",
|
|
36
36
|
"@shoper/tsconfig": "^0.0.0",
|
|
37
37
|
"@splidejs/splide": "4.0.7",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var json_utils = require('./json_utils.js');
|
|
6
|
-
|
|
7
|
-
class FeatureFlagUtils {
|
|
8
|
-
static _initialize() {
|
|
9
|
-
if (this._flags !== null)
|
|
10
|
-
return;
|
|
11
|
-
const $script = document.getElementById('featureFlags');
|
|
12
|
-
this._flags = $script ? this._toObjectFromJsonScriptTag($script) : null;
|
|
13
|
-
}
|
|
14
|
-
static _toObjectFromJsonScriptTag(scriptTag) {
|
|
15
|
-
const scriptContent = scriptTag.textContent;
|
|
16
|
-
return json_utils.JsonUtils.fromJson(scriptContent) || {};
|
|
17
|
-
}
|
|
18
|
-
static isEnabled(flagName) {
|
|
19
|
-
this._initialize();
|
|
20
|
-
return this._flags ? !!this._flags[flagName] : false;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
FeatureFlagUtils._flags = null;
|
|
24
|
-
|
|
25
|
-
exports.FeatureFlagUtils = FeatureFlagUtils;
|
|
26
|
-
//# sourceMappingURL=feature_flag_utils.js.map
|
|
@@ -1,25 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { JsonUtils } from './json_utils.js';
|
|
2
|
-
|
|
3
|
-
class FeatureFlagUtils {
|
|
4
|
-
static _initialize() {
|
|
5
|
-
if (this._flags !== null)
|
|
6
|
-
return;
|
|
7
|
-
const $script = document.getElementById('featureFlags');
|
|
8
|
-
this._flags = $script ? this._toObjectFromJsonScriptTag($script) : null;
|
|
9
|
-
}
|
|
10
|
-
static _toObjectFromJsonScriptTag(scriptTag) {
|
|
11
|
-
const scriptContent = scriptTag.textContent;
|
|
12
|
-
return JsonUtils.fromJson(scriptContent) || {};
|
|
13
|
-
}
|
|
14
|
-
static isEnabled(flagName) {
|
|
15
|
-
this._initialize();
|
|
16
|
-
return this._flags ? !!this._flags[flagName] : false;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
FeatureFlagUtils._flags = null;
|
|
20
|
-
|
|
21
|
-
export { FeatureFlagUtils };
|
|
22
|
-
//# sourceMappingURL=feature_flag_utils.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
class JsonUtils {
|
|
2
|
-
static toJson(value) {
|
|
3
|
-
try {
|
|
4
|
-
return JSON.stringify(value);
|
|
5
|
-
}
|
|
6
|
-
catch (error) {
|
|
7
|
-
console.error(error);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
static fromJson(value) {
|
|
11
|
-
try {
|
|
12
|
-
return JSON.parse(value);
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
console.error(error);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { JsonUtils };
|
|
21
|
-
//# sourceMappingURL=json_utils.js.map
|