@vonage/vivid 3.52.0 → 3.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/alert/index.cjs +3 -3
- package/alert/index.js +3 -3
- package/appearance-ui/index.cjs +1 -1
- package/appearance-ui/index.js +1 -1
- package/audio-player/index.cjs +3 -3
- package/audio-player/index.js +3 -3
- package/avatar/index.cjs +1 -1
- package/avatar/index.js +1 -1
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/banner/index.cjs +2 -2
- package/banner/index.js +2 -2
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/button/index.cjs +2 -2
- package/button/index.js +2 -2
- package/card/index.cjs +2 -2
- package/card/index.js +2 -2
- package/checkbox/index.cjs +3 -2
- package/checkbox/index.js +3 -2
- package/combobox/index.cjs +5 -5
- package/combobox/index.js +5 -5
- package/custom-elements.json +1162 -99
- package/data-grid/index.cjs +1 -1
- package/data-grid/index.js +1 -1
- package/date-picker/index.cjs +7 -6
- package/date-picker/index.js +7 -6
- package/date-range-picker/index.cjs +7 -6
- package/date-range-picker/index.js +7 -6
- package/dial-pad/index.cjs +33 -0
- package/dial-pad/index.js +31 -0
- package/dialog/index.cjs +4 -4
- package/dialog/index.js +4 -4
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.cjs +2 -2
- package/empty-state/index.js +2 -2
- package/fab/index.cjs +2 -2
- package/fab/index.js +2 -2
- package/file-picker/index.cjs +4 -3
- package/file-picker/index.js +4 -3
- package/header/index.cjs +2 -2
- package/header/index.js +2 -2
- package/icon/index.cjs +1 -1
- package/icon/index.js +1 -1
- package/index.cjs +132 -122
- package/index.js +46 -43
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/appearance-ui/appearance-ui.d.ts +1 -1
- package/lib/audio-player/audio-player.d.ts +4 -0
- package/lib/audio-player/locale.d.ts +2 -0
- package/lib/components.d.ts +2 -0
- package/lib/dial-pad/definition.d.ts +3 -0
- package/lib/dial-pad/dial-pad.d.ts +17 -0
- package/lib/dial-pad/dial-pad.template.d.ts +4 -0
- package/lib/dial-pad/locale.d.ts +18 -0
- package/lib/enums.d.ts +7 -0
- package/lib/menu/menu.d.ts +1 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +5 -0
- package/lib/text-anchor/definition.d.ts +1 -0
- package/lib/text-anchor/text-anchor.d.ts +5 -0
- package/lib/video-player/definition.d.ts +3 -0
- package/lib/video-player/locale.d.ts +1 -0
- package/lib/video-player/video-player.d.ts +17 -0
- package/lib/video-player/video-player.template.d.ts +4 -0
- package/lib/video-player/vivid-video-svg.d.ts +1 -0
- package/listbox/index.cjs +2 -2
- package/listbox/index.js +2 -2
- package/locales/en-GB.cjs +33 -1
- package/locales/en-GB.js +33 -1
- package/locales/en-US.cjs +201 -1
- package/locales/en-US.js +201 -1
- package/locales/ja-JP.cjs +200 -1
- package/locales/ja-JP.js +200 -1
- package/locales/zh-CN.cjs +202 -1
- package/locales/zh-CN.js +202 -1
- package/menu/index.cjs +6 -6
- package/menu/index.js +6 -6
- package/menu-item/index.cjs +2 -2
- package/menu-item/index.js +2 -2
- package/nav/index.cjs +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.cjs +2 -2
- package/nav-disclosure/index.js +2 -2
- package/nav-item/index.cjs +2 -2
- package/nav-item/index.js +2 -2
- package/note/index.cjs +2 -2
- package/note/index.js +2 -2
- package/number-field/index.cjs +5 -4
- package/number-field/index.js +5 -4
- package/option/index.cjs +2 -2
- package/option/index.js +2 -2
- package/package.json +1 -1
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +3 -3
- package/popup/index.cjs +4 -4
- package/popup/index.js +4 -4
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/index.cjs +2 -2
- package/range-slider/index.js +2 -2
- package/select/index.cjs +7 -6
- package/select/index.js +7 -6
- package/selectable-box/index.cjs +5 -4
- package/selectable-box/index.js +5 -4
- package/shared/applyMixinsWithObservables.cjs +15 -0
- package/shared/applyMixinsWithObservables.js +13 -0
- package/shared/definition.cjs +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.cjs +3 -3
- package/shared/definition11.js +3 -3
- package/shared/definition14.cjs +2 -2
- package/shared/definition14.js +2 -2
- package/shared/definition15.cjs +8 -9
- package/shared/definition15.js +8 -9
- package/shared/definition16.cjs +3 -3
- package/shared/definition16.js +3 -3
- package/shared/definition17.cjs +2 -2
- package/shared/definition17.js +3 -3
- package/shared/definition18.cjs +3 -3
- package/shared/definition18.js +3 -3
- package/shared/definition19.cjs +3 -3
- package/shared/definition19.js +3 -3
- package/shared/definition20.cjs +196 -224
- package/shared/definition20.js +191 -219
- package/shared/definition21.cjs +264 -67
- package/shared/definition21.js +263 -65
- package/shared/definition22.cjs +66 -57
- package/shared/definition22.js +64 -56
- package/shared/definition23.cjs +42 -76
- package/shared/definition23.js +41 -75
- package/shared/definition24.cjs +70 -2402
- package/shared/definition24.js +69 -2401
- package/shared/definition25.cjs +2402 -46
- package/shared/definition25.js +2401 -45
- package/shared/definition26.cjs +63 -30
- package/shared/definition26.js +62 -29
- package/shared/definition27.cjs +28 -56
- package/shared/definition27.js +27 -55
- package/shared/definition28.cjs +35 -881
- package/shared/definition28.js +34 -879
- package/shared/definition29.cjs +922 -60
- package/shared/definition29.js +922 -61
- package/shared/definition30.cjs +68 -86
- package/shared/definition30.js +67 -85
- package/shared/definition31.cjs +98 -21
- package/shared/definition31.js +98 -21
- package/shared/definition32.cjs +24 -12
- package/shared/definition32.js +23 -11
- package/shared/definition33.cjs +11 -50
- package/shared/definition33.js +10 -49
- package/shared/definition34.cjs +26 -515
- package/shared/definition34.js +26 -515
- package/shared/definition35.cjs +448 -194
- package/shared/definition35.js +448 -192
- package/shared/definition36.cjs +256 -202
- package/shared/definition36.js +253 -201
- package/shared/definition37.cjs +204 -65
- package/shared/definition37.js +203 -63
- package/shared/definition38.cjs +63 -57
- package/shared/definition38.js +60 -55
- package/shared/definition39.cjs +65 -432
- package/shared/definition39.js +64 -431
- package/shared/definition4.cjs +2 -2
- package/shared/definition4.js +2 -2
- package/shared/definition40.cjs +441 -34
- package/shared/definition40.js +438 -31
- package/shared/definition41.cjs +34 -576
- package/shared/definition41.js +33 -575
- package/shared/definition42.cjs +531 -654
- package/shared/definition42.js +531 -654
- package/shared/definition43.cjs +690 -114
- package/shared/definition43.js +689 -113
- package/shared/definition44.cjs +124 -79
- package/shared/definition44.js +122 -77
- package/shared/definition45.cjs +78 -520
- package/shared/definition45.js +77 -518
- package/shared/definition46.cjs +520 -119
- package/shared/definition46.js +518 -118
- package/shared/definition47.cjs +118 -135
- package/shared/definition47.js +117 -134
- package/shared/definition48.cjs +151 -19
- package/shared/definition48.js +150 -18
- package/shared/definition49.cjs +21 -84
- package/shared/definition49.js +20 -83
- package/shared/definition5.cjs +100 -19
- package/shared/definition5.js +100 -19
- package/shared/definition50.cjs +52 -505
- package/shared/definition50.js +51 -504
- package/shared/definition51.cjs +526 -28
- package/shared/definition51.js +525 -27
- package/shared/definition52.cjs +28 -123
- package/shared/definition52.js +26 -122
- package/shared/definition53.cjs +110 -309
- package/shared/definition53.js +110 -308
- package/shared/definition54.cjs +255 -271
- package/shared/definition54.js +255 -271
- package/shared/definition55.cjs +315 -776
- package/shared/definition55.js +314 -775
- package/shared/definition56.cjs +818 -107
- package/shared/definition56.js +817 -106
- package/shared/definition57.cjs +85 -55
- package/shared/definition57.js +84 -54
- package/shared/definition58.cjs +125 -72
- package/shared/definition58.js +124 -71
- package/shared/definition59.cjs +72 -285
- package/shared/definition59.js +73 -286
- package/shared/definition6.cjs +1 -1
- package/shared/definition6.js +1 -1
- package/shared/definition60.cjs +298 -39
- package/shared/definition60.js +297 -38
- package/shared/definition61.cjs +66044 -1687
- package/shared/definition61.js +66043 -1686
- package/shared/definition62.cjs +50 -0
- package/shared/definition62.js +46 -0
- package/shared/definition63.cjs +1828 -0
- package/shared/definition63.js +1824 -0
- package/shared/definition7.cjs +2 -2
- package/shared/definition7.js +2 -2
- package/shared/definition8.cjs +2 -2
- package/shared/definition8.js +2 -2
- package/shared/definition9.cjs +1 -1
- package/shared/definition9.js +1 -1
- package/shared/enums.cjs +9 -0
- package/shared/enums.js +9 -1
- package/shared/icon.cjs +20 -2
- package/shared/icon.js +21 -3
- package/shared/index2.cjs +73 -37
- package/shared/index2.js +73 -37
- package/shared/key-codes2.js +1 -1
- package/shared/listbox.cjs +1 -1
- package/shared/listbox.js +1 -1
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/patterns/form-elements/form-elements.d.ts +2 -3
- package/shared/presentationDate.cjs +16 -5
- package/shared/presentationDate.js +16 -5
- package/shared/text-anchor.cjs +6 -0
- package/shared/text-anchor.js +6 -0
- package/shared/text-anchor.template.cjs +6 -1
- package/shared/text-anchor.template.js +6 -1
- package/shared/text-field.cjs +1 -1
- package/shared/text-field.js +1 -1
- package/shared/utils/applyMixinsWithObservables.d.ts +1 -0
- package/shared/utils/numberConverter.d.ts +2 -0
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.cjs +1 -1
- package/slider/index.js +1 -1
- package/split-button/index.cjs +2 -2
- package/split-button/index.js +2 -2
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +2 -2
- package/tab/index.cjs +2 -2
- package/tab/index.js +2 -2
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +4 -4
- package/tabs/index.js +4 -4
- package/tag/index.cjs +2 -2
- package/tag/index.js +2 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-area/index.cjs +4 -3
- package/text-area/index.js +4 -3
- package/text-field/index.cjs +4 -3
- package/text-field/index.js +4 -3
- package/time-picker/index.cjs +8 -7
- package/time-picker/index.js +8 -7
- package/toggletip/index.cjs +5 -5
- package/toggletip/index.js +5 -5
- package/tooltip/index.cjs +5 -5
- package/tooltip/index.js +5 -5
- package/tree-item/index.cjs +2 -2
- package/tree-item/index.js +2 -2
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/video-player/index.cjs +17 -0
- package/video-player/index.js +15 -0
- package/vivid.api.json +332 -0
package/shared/definition45.cjs
CHANGED
|
@@ -1,486 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const formAssociated = require('./form-associated.cjs');
|
|
7
|
-
const aria = require('./aria.cjs');
|
|
8
|
-
const keyCodes = require('./key-codes.cjs');
|
|
9
|
-
const slider_template = require('./slider.template.cjs');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Converts a pixel coordinate on the track to a percent of the track's range
|
|
13
|
-
*/
|
|
14
|
-
function convertPixelToPercent(pixelPos, minPosition, maxPosition, direction$1) {
|
|
15
|
-
let pct = numbers.limit(0, 1, (pixelPos - minPosition) / (maxPosition - minPosition));
|
|
16
|
-
if (direction$1 === direction.Direction.rtl) {
|
|
17
|
-
pct = 1 - pct;
|
|
18
|
-
}
|
|
19
|
-
return pct;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
class _Slider extends index.FoundationElement {
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(Slider:class)} component.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
class FormAssociatedSlider extends formAssociated.FormAssociated(_Slider) {
|
|
30
|
-
constructor() {
|
|
31
|
-
super(...arguments);
|
|
32
|
-
this.proxy = document.createElement("input");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* The selection modes of a {@link @microsoft/fast-foundation#(Slider:class)}.
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
const SliderMode = {
|
|
41
|
-
singleValue: "single-value",
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* A Slider Custom HTML Element.
|
|
45
|
-
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#slider | ARIA slider }.
|
|
46
|
-
*
|
|
47
|
-
* @slot track - The track of the slider
|
|
48
|
-
* @slot track-start - The track-start visual indicator
|
|
49
|
-
* @slot thumb - The slider thumb
|
|
50
|
-
* @slot - The default slot for labels
|
|
51
|
-
* @csspart positioning-region - The region used to position the elements of the slider
|
|
52
|
-
* @csspart track-container - The region containing the track elements
|
|
53
|
-
* @csspart track-start - The element wrapping the track start slot
|
|
54
|
-
* @csspart thumb-container - The thumb container element which is programatically positioned
|
|
55
|
-
* @fires change - Fires a custom 'change' event when the slider value changes
|
|
56
|
-
*
|
|
57
|
-
* @public
|
|
58
|
-
*/
|
|
59
|
-
let Slider$1 = class Slider extends FormAssociatedSlider {
|
|
60
|
-
constructor() {
|
|
61
|
-
super(...arguments);
|
|
62
|
-
/**
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
this.direction = direction.Direction.ltr;
|
|
66
|
-
/**
|
|
67
|
-
* @internal
|
|
68
|
-
*/
|
|
69
|
-
this.isDragging = false;
|
|
70
|
-
/**
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
this.trackWidth = 0;
|
|
74
|
-
/**
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
this.trackMinWidth = 0;
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
this.trackHeight = 0;
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
this.trackLeft = 0;
|
|
86
|
-
/**
|
|
87
|
-
* @internal
|
|
88
|
-
*/
|
|
89
|
-
this.trackMinHeight = 0;
|
|
90
|
-
/**
|
|
91
|
-
* Custom function that generates a string for the component's "aria-valuetext" attribute based on the current value.
|
|
92
|
-
*
|
|
93
|
-
* @public
|
|
94
|
-
*/
|
|
95
|
-
this.valueTextFormatter = () => null;
|
|
96
|
-
/**
|
|
97
|
-
* The minimum allowed value.
|
|
98
|
-
*
|
|
99
|
-
* @defaultValue - 0
|
|
100
|
-
* @public
|
|
101
|
-
* @remarks
|
|
102
|
-
* HTML Attribute: min
|
|
103
|
-
*/
|
|
104
|
-
this.min = 0; // Map to proxy element.
|
|
105
|
-
/**
|
|
106
|
-
* The maximum allowed value.
|
|
107
|
-
*
|
|
108
|
-
* @defaultValue - 10
|
|
109
|
-
* @public
|
|
110
|
-
* @remarks
|
|
111
|
-
* HTML Attribute: max
|
|
112
|
-
*/
|
|
113
|
-
this.max = 10; // Map to proxy element.
|
|
114
|
-
/**
|
|
115
|
-
* Value to increment or decrement via arrow keys, mouse click or drag.
|
|
116
|
-
*
|
|
117
|
-
* @public
|
|
118
|
-
* @remarks
|
|
119
|
-
* HTML Attribute: step
|
|
120
|
-
*/
|
|
121
|
-
this.step = 1; // Map to proxy element.
|
|
122
|
-
/**
|
|
123
|
-
* The orientation of the slider.
|
|
124
|
-
*
|
|
125
|
-
* @public
|
|
126
|
-
* @remarks
|
|
127
|
-
* HTML Attribute: orientation
|
|
128
|
-
*/
|
|
129
|
-
this.orientation = aria.Orientation.horizontal;
|
|
130
|
-
/**
|
|
131
|
-
* The selection mode.
|
|
132
|
-
*
|
|
133
|
-
* @public
|
|
134
|
-
* @remarks
|
|
135
|
-
* HTML Attribute: mode
|
|
136
|
-
*/
|
|
137
|
-
this.mode = SliderMode.singleValue;
|
|
138
|
-
this.keypressHandler = (e) => {
|
|
139
|
-
if (this.readOnly) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
if (e.key === keyCodes.keyHome) {
|
|
143
|
-
e.preventDefault();
|
|
144
|
-
this.value = `${this.min}`;
|
|
145
|
-
}
|
|
146
|
-
else if (e.key === keyCodes.keyEnd) {
|
|
147
|
-
e.preventDefault();
|
|
148
|
-
this.value = `${this.max}`;
|
|
149
|
-
}
|
|
150
|
-
else if (!e.shiftKey) {
|
|
151
|
-
switch (e.key) {
|
|
152
|
-
case keyCodes.keyArrowRight:
|
|
153
|
-
case keyCodes.keyArrowUp:
|
|
154
|
-
e.preventDefault();
|
|
155
|
-
this.increment();
|
|
156
|
-
break;
|
|
157
|
-
case keyCodes.keyArrowLeft:
|
|
158
|
-
case keyCodes.keyArrowDown:
|
|
159
|
-
e.preventDefault();
|
|
160
|
-
this.decrement();
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
this.setupTrackConstraints = () => {
|
|
166
|
-
const clientRect = this.track.getBoundingClientRect();
|
|
167
|
-
this.trackWidth = this.track.clientWidth;
|
|
168
|
-
this.trackMinWidth = this.track.clientLeft;
|
|
169
|
-
this.trackHeight = clientRect.bottom;
|
|
170
|
-
this.trackMinHeight = clientRect.top;
|
|
171
|
-
this.trackLeft = this.getBoundingClientRect().left;
|
|
172
|
-
if (this.trackWidth === 0) {
|
|
173
|
-
this.trackWidth = 1;
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
this.setupListeners = (remove = false) => {
|
|
177
|
-
const eventAction = `${remove ? "remove" : "add"}EventListener`;
|
|
178
|
-
this[eventAction]("keydown", this.keypressHandler);
|
|
179
|
-
this[eventAction]("mousedown", this.handleMouseDown);
|
|
180
|
-
this.thumb[eventAction]("mousedown", this.handleThumbMouseDown, {
|
|
181
|
-
passive: true,
|
|
182
|
-
});
|
|
183
|
-
this.thumb[eventAction]("touchstart", this.handleThumbMouseDown, {
|
|
184
|
-
passive: true,
|
|
185
|
-
});
|
|
186
|
-
// removes handlers attached by mousedown handlers
|
|
187
|
-
if (remove) {
|
|
188
|
-
this.handleMouseDown(null);
|
|
189
|
-
this.handleThumbMouseDown(null);
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* @internal
|
|
194
|
-
*/
|
|
195
|
-
this.initialValue = "";
|
|
196
|
-
/**
|
|
197
|
-
* Handle mouse moves during a thumb drag operation
|
|
198
|
-
* If the event handler is null it removes the events
|
|
199
|
-
*/
|
|
200
|
-
this.handleThumbMouseDown = (event) => {
|
|
201
|
-
if (event) {
|
|
202
|
-
if (this.readOnly || this.disabled || event.defaultPrevented) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
event.target.focus();
|
|
206
|
-
}
|
|
207
|
-
const eventAction = `${event !== null ? "add" : "remove"}EventListener`;
|
|
208
|
-
window[eventAction]("mouseup", this.handleWindowMouseUp);
|
|
209
|
-
window[eventAction]("mousemove", this.handleMouseMove, { passive: true });
|
|
210
|
-
window[eventAction]("touchmove", this.handleMouseMove, { passive: true });
|
|
211
|
-
window[eventAction]("touchend", this.handleWindowMouseUp);
|
|
212
|
-
this.isDragging = event !== null;
|
|
213
|
-
};
|
|
214
|
-
/**
|
|
215
|
-
* Handle mouse moves during a thumb drag operation
|
|
216
|
-
*/
|
|
217
|
-
this.handleMouseMove = (e) => {
|
|
218
|
-
if (this.readOnly || this.disabled || e.defaultPrevented) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
// update the value based on current position
|
|
222
|
-
const sourceEvent = window.TouchEvent && e instanceof TouchEvent
|
|
223
|
-
? e.touches[0]
|
|
224
|
-
: e;
|
|
225
|
-
const eventValue = this.orientation === aria.Orientation.horizontal
|
|
226
|
-
? sourceEvent.pageX - document.documentElement.scrollLeft - this.trackLeft
|
|
227
|
-
: sourceEvent.pageY - document.documentElement.scrollTop;
|
|
228
|
-
this.value = `${this.calculateNewValue(eventValue)}`;
|
|
229
|
-
};
|
|
230
|
-
this.calculateNewValue = (rawValue) => {
|
|
231
|
-
// update the value based on current position
|
|
232
|
-
const newPosition = convertPixelToPercent(rawValue, this.orientation === aria.Orientation.horizontal
|
|
233
|
-
? this.trackMinWidth
|
|
234
|
-
: this.trackMinHeight, this.orientation === aria.Orientation.horizontal
|
|
235
|
-
? this.trackWidth
|
|
236
|
-
: this.trackHeight, this.direction);
|
|
237
|
-
const newValue = (this.max - this.min) * newPosition + this.min;
|
|
238
|
-
return this.convertToConstrainedValue(newValue);
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* Handle a window mouse up during a drag operation
|
|
242
|
-
*/
|
|
243
|
-
this.handleWindowMouseUp = (event) => {
|
|
244
|
-
this.stopDragging();
|
|
245
|
-
};
|
|
246
|
-
this.stopDragging = () => {
|
|
247
|
-
this.isDragging = false;
|
|
248
|
-
this.handleMouseDown(null);
|
|
249
|
-
this.handleThumbMouseDown(null);
|
|
250
|
-
};
|
|
251
|
-
/**
|
|
252
|
-
*
|
|
253
|
-
* @param e - MouseEvent or null. If there is no event handler it will remove the events
|
|
254
|
-
*/
|
|
255
|
-
this.handleMouseDown = (e) => {
|
|
256
|
-
const eventAction = `${e !== null ? "add" : "remove"}EventListener`;
|
|
257
|
-
if (e === null || (!this.disabled && !this.readOnly)) {
|
|
258
|
-
window[eventAction]("mouseup", this.handleWindowMouseUp);
|
|
259
|
-
window.document[eventAction]("mouseleave", this.handleWindowMouseUp);
|
|
260
|
-
window[eventAction]("mousemove", this.handleMouseMove);
|
|
261
|
-
if (e) {
|
|
262
|
-
e.preventDefault();
|
|
263
|
-
this.setupTrackConstraints();
|
|
264
|
-
e.target.focus();
|
|
265
|
-
const controlValue = this.orientation === aria.Orientation.horizontal
|
|
266
|
-
? e.pageX - document.documentElement.scrollLeft - this.trackLeft
|
|
267
|
-
: e.pageY - document.documentElement.scrollTop;
|
|
268
|
-
this.value = `${this.calculateNewValue(controlValue)}`;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
};
|
|
272
|
-
this.convertToConstrainedValue = (value) => {
|
|
273
|
-
if (isNaN(value)) {
|
|
274
|
-
value = this.min;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* The following logic intends to overcome the issue with math in JavaScript with regards to floating point numbers.
|
|
278
|
-
* This is needed as the `step` may be an integer but could also be a float. To accomplish this the step is assumed to be a float
|
|
279
|
-
* and is converted to an integer by determining the number of decimal places it represent, multiplying it until it is an
|
|
280
|
-
* integer and then dividing it to get back to the correct number.
|
|
281
|
-
*/
|
|
282
|
-
let constrainedValue = value - this.min;
|
|
283
|
-
const roundedConstrainedValue = Math.round(constrainedValue / this.step);
|
|
284
|
-
const remainderValue = constrainedValue -
|
|
285
|
-
(roundedConstrainedValue * (this.stepMultiplier * this.step)) /
|
|
286
|
-
this.stepMultiplier;
|
|
287
|
-
constrainedValue =
|
|
288
|
-
remainderValue >= Number(this.step) / 2
|
|
289
|
-
? constrainedValue - remainderValue + Number(this.step)
|
|
290
|
-
: constrainedValue - remainderValue;
|
|
291
|
-
return constrainedValue + this.min;
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
readOnlyChanged() {
|
|
295
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
296
|
-
this.proxy.readOnly = this.readOnly;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* The value property, typed as a number.
|
|
301
|
-
*
|
|
302
|
-
* @public
|
|
303
|
-
*/
|
|
304
|
-
get valueAsNumber() {
|
|
305
|
-
return parseFloat(super.value);
|
|
306
|
-
}
|
|
307
|
-
set valueAsNumber(next) {
|
|
308
|
-
this.value = next.toString();
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* @internal
|
|
312
|
-
*/
|
|
313
|
-
valueChanged(previous, next) {
|
|
314
|
-
super.valueChanged(previous, next);
|
|
315
|
-
if (this.$fastController.isConnected) {
|
|
316
|
-
this.setThumbPositionForOrientation(this.direction);
|
|
317
|
-
}
|
|
318
|
-
this.$emit("change");
|
|
319
|
-
}
|
|
320
|
-
minChanged() {
|
|
321
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
322
|
-
this.proxy.min = `${this.min}`;
|
|
323
|
-
}
|
|
324
|
-
this.validate();
|
|
325
|
-
}
|
|
326
|
-
maxChanged() {
|
|
327
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
328
|
-
this.proxy.max = `${this.max}`;
|
|
329
|
-
}
|
|
330
|
-
this.validate();
|
|
331
|
-
}
|
|
332
|
-
stepChanged() {
|
|
333
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
334
|
-
this.proxy.step = `${this.step}`;
|
|
335
|
-
}
|
|
336
|
-
this.updateStepMultiplier();
|
|
337
|
-
this.validate();
|
|
338
|
-
}
|
|
339
|
-
orientationChanged() {
|
|
340
|
-
if (this.$fastController.isConnected) {
|
|
341
|
-
this.setThumbPositionForOrientation(this.direction);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* @internal
|
|
346
|
-
*/
|
|
347
|
-
connectedCallback() {
|
|
348
|
-
super.connectedCallback();
|
|
349
|
-
this.proxy.setAttribute("type", "range");
|
|
350
|
-
this.direction = direction.getDirection(this);
|
|
351
|
-
this.updateStepMultiplier();
|
|
352
|
-
this.setupTrackConstraints();
|
|
353
|
-
this.setupListeners();
|
|
354
|
-
this.setupDefaultValue();
|
|
355
|
-
this.setThumbPositionForOrientation(this.direction);
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* @internal
|
|
359
|
-
*/
|
|
360
|
-
disconnectedCallback() {
|
|
361
|
-
this.setupListeners(true);
|
|
362
|
-
}
|
|
363
|
-
/**
|
|
364
|
-
* Increment the value by the step
|
|
365
|
-
*
|
|
366
|
-
* @public
|
|
367
|
-
*/
|
|
368
|
-
increment() {
|
|
369
|
-
const newVal = this.direction !== direction.Direction.rtl && this.orientation !== aria.Orientation.vertical
|
|
370
|
-
? Number(this.value) + Number(this.step)
|
|
371
|
-
: Number(this.value) - Number(this.step);
|
|
372
|
-
const incrementedVal = this.convertToConstrainedValue(newVal);
|
|
373
|
-
const incrementedValString = incrementedVal < Number(this.max) ? `${incrementedVal}` : `${this.max}`;
|
|
374
|
-
this.value = incrementedValString;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Decrement the value by the step
|
|
378
|
-
*
|
|
379
|
-
* @public
|
|
380
|
-
*/
|
|
381
|
-
decrement() {
|
|
382
|
-
const newVal = this.direction !== direction.Direction.rtl && this.orientation !== aria.Orientation.vertical
|
|
383
|
-
? Number(this.value) - Number(this.step)
|
|
384
|
-
: Number(this.value) + Number(this.step);
|
|
385
|
-
const decrementedVal = this.convertToConstrainedValue(newVal);
|
|
386
|
-
const decrementedValString = decrementedVal > Number(this.min) ? `${decrementedVal}` : `${this.min}`;
|
|
387
|
-
this.value = decrementedValString;
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Places the thumb based on the current value
|
|
391
|
-
*
|
|
392
|
-
* @public
|
|
393
|
-
* @param direction - writing mode
|
|
394
|
-
*/
|
|
395
|
-
setThumbPositionForOrientation(direction) {
|
|
396
|
-
const newPct = convertPixelToPercent(Number(this.value), Number(this.min), Number(this.max), direction);
|
|
397
|
-
const percentage = (1 - newPct) * 100;
|
|
398
|
-
if (this.orientation === aria.Orientation.horizontal) {
|
|
399
|
-
this.position = this.isDragging
|
|
400
|
-
? `right: ${percentage}%; transition: none;`
|
|
401
|
-
: `right: ${percentage}%; transition: all 0.2s ease;`;
|
|
402
|
-
}
|
|
403
|
-
else {
|
|
404
|
-
this.position = this.isDragging
|
|
405
|
-
? `bottom: ${percentage}%; transition: none;`
|
|
406
|
-
: `bottom: ${percentage}%; transition: all 0.2s ease;`;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Update the step multiplier used to ensure rounding errors from steps that
|
|
411
|
-
* are not whole numbers
|
|
412
|
-
*/
|
|
413
|
-
updateStepMultiplier() {
|
|
414
|
-
const stepString = this.step + "";
|
|
415
|
-
const decimalPlacesOfStep = !!(this.step % 1)
|
|
416
|
-
? stepString.length - stepString.indexOf(".") - 1
|
|
417
|
-
: 0;
|
|
418
|
-
this.stepMultiplier = Math.pow(10, decimalPlacesOfStep);
|
|
419
|
-
}
|
|
420
|
-
get midpoint() {
|
|
421
|
-
return `${this.convertToConstrainedValue((this.max + this.min) / 2)}`;
|
|
422
|
-
}
|
|
423
|
-
setupDefaultValue() {
|
|
424
|
-
if (typeof this.value === "string") {
|
|
425
|
-
if (this.value.length === 0) {
|
|
426
|
-
this.initialValue = this.midpoint;
|
|
427
|
-
}
|
|
428
|
-
else {
|
|
429
|
-
const value = parseFloat(this.value);
|
|
430
|
-
if (!Number.isNaN(value) && (value < this.min || value > this.max)) {
|
|
431
|
-
this.value = this.midpoint;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
};
|
|
437
|
-
index.__decorate([
|
|
438
|
-
index.attr({ attribute: "readonly", mode: "boolean" })
|
|
439
|
-
], Slider$1.prototype, "readOnly", void 0);
|
|
440
|
-
index.__decorate([
|
|
441
|
-
index.observable
|
|
442
|
-
], Slider$1.prototype, "direction", void 0);
|
|
443
|
-
index.__decorate([
|
|
444
|
-
index.observable
|
|
445
|
-
], Slider$1.prototype, "isDragging", void 0);
|
|
446
|
-
index.__decorate([
|
|
447
|
-
index.observable
|
|
448
|
-
], Slider$1.prototype, "position", void 0);
|
|
449
|
-
index.__decorate([
|
|
450
|
-
index.observable
|
|
451
|
-
], Slider$1.prototype, "trackWidth", void 0);
|
|
452
|
-
index.__decorate([
|
|
453
|
-
index.observable
|
|
454
|
-
], Slider$1.prototype, "trackMinWidth", void 0);
|
|
455
|
-
index.__decorate([
|
|
456
|
-
index.observable
|
|
457
|
-
], Slider$1.prototype, "trackHeight", void 0);
|
|
458
|
-
index.__decorate([
|
|
459
|
-
index.observable
|
|
460
|
-
], Slider$1.prototype, "trackLeft", void 0);
|
|
461
|
-
index.__decorate([
|
|
462
|
-
index.observable
|
|
463
|
-
], Slider$1.prototype, "trackMinHeight", void 0);
|
|
464
|
-
index.__decorate([
|
|
465
|
-
index.observable
|
|
466
|
-
], Slider$1.prototype, "valueTextFormatter", void 0);
|
|
467
|
-
index.__decorate([
|
|
468
|
-
index.attr({ converter: index.nullableNumberConverter })
|
|
469
|
-
], Slider$1.prototype, "min", void 0);
|
|
470
|
-
index.__decorate([
|
|
471
|
-
index.attr({ converter: index.nullableNumberConverter })
|
|
472
|
-
], Slider$1.prototype, "max", void 0);
|
|
473
|
-
index.__decorate([
|
|
474
|
-
index.attr({ converter: index.nullableNumberConverter })
|
|
475
|
-
], Slider$1.prototype, "step", void 0);
|
|
476
|
-
index.__decorate([
|
|
477
|
-
index.attr
|
|
478
|
-
], Slider$1.prototype, "orientation", void 0);
|
|
479
|
-
index.__decorate([
|
|
480
|
-
index.attr
|
|
481
|
-
], Slider$1.prototype, "mode", void 0);
|
|
482
|
-
|
|
483
|
-
const styles = ":host{display:inline-block}:host(:not([orientation=vertical])){inline-size:100%}:host([orientation=vertical]){block-size:100%;min-block-size:calc(var(--_thumb-interaction-indicator-size) * 5)}:host([disabled]){cursor:not-allowed}.control{--_thumb-size: 12px;--_thumb-interaction-indicator-size: 36px;--_track-start-inset-inline-start: 0;--_track-start-inset-block-start: 0;cursor:pointer;outline:none;user-select:none}.control.connotation-cta{--_connotation-color-primary: var(--vvd-slider-cta-primary, var(--vvd-color-cta-500))}.control:not(.connotation-cta){--_connotation-color-primary: var(--vvd-slider-accent-primary, var(--vvd-color-canvas-text))}.control{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.control .positioning-region{position:relative}.control .track{position:absolute;border-radius:4px;background:var(--_track-background-color)}.control .track-start{position:absolute;border-radius:inherit;background:var(--_track-start-background-color);block-size:100%;inset-inline-start:var(--_track-start-inset-inline-start)}.control.horizontal{block-size:var(--_thumb-interaction-indicator-size);inline-size:calc(100% - var(--_thumb-size));margin-inline-start:calc(var(--_thumb-size) / 2);min-inline-size:var(--_thumb-size)}.control.horizontal .track{top:calc((var(--_thumb-interaction-indicator-size) - 2px) / 2);right:0;left:0;block-size:2px}.control.horizontal .track .mark{block-size:4px;inline-size:100%}.control.vertical{margin-top:calc(var(--_thumb-interaction-indicator-size) / 2);block-size:calc(100% - var(--_thumb-interaction-indicator-size));inline-size:var(--_thumb-interaction-indicator-size);min-block-size:var(--_thumb-interaction-indicator-size)}.control.vertical .positioning-region{block-size:100%}.control.vertical .track{left:calc((var(--_thumb-interaction-indicator-size) - 2px) / 2);block-size:100%;inline-size:2px}.control.vertical .track .mark{block-size:100%;inline-size:4px}.control.vertical .track-start{block-size:auto;inline-size:100%;inset-block-start:var(--_track-start-inset-block-start)}.control.disabled{--_track-background-color: var(--vvd-color-neutral-100);--_track-start-background-color: var(--vvd-color-neutral-300);pointer-events:none}.control:not(.disabled){--_track-background-color: var(--vvd-color-neutral-300);--_track-start-background-color: var(--_appearance-color-fill)}.thumb-container{position:absolute;border-radius:50%;block-size:var(--_thumb-interaction-indicator-size);cursor:inherit;inline-size:var(--_thumb-interaction-indicator-size);outline-color:transparent;touch-action:none}:focus-visible .thumb-container,.thumb-container:focus-visible{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;--_thumb-interaction-indicator-alpha: .05;border-radius:50%}.control.horizontal .thumb-container{transform:translate(calc(var(--_thumb-interaction-indicator-size) / 2))}.control.vertical .thumb-container{transform:translateY(calc(var(--_thumb-interaction-indicator-size) / 2))}.control:not(.disabled) .thumb-container:hover{--_thumb-interaction-indicator-alpha: .12}.control:not(.disabled) .thumb-container:active{--_thumb-interaction-indicator-alpha: .25}.thumb-container:before{position:absolute;display:block;border-radius:inherit;background-color:var(--_track-start-background-color);block-size:var(--_thumb-interaction-indicator-size);content:\"\";inline-size:var(--_thumb-interaction-indicator-size);opacity:var(--_thumb-interaction-indicator-alpha, 0);transition:opacity .2s ease-out 0s}.thumb-container:after{position:absolute;display:block;border-radius:inherit;background-color:var(--_track-start-background-color);block-size:var(--_thumb-size);content:\"\";inline-size:var(--_thumb-size);inset:calc((var(--_thumb-interaction-indicator-size) - var(--_thumb-size)) / 2)}\n";
|
|
4
|
+
const when = require('./when.cjs');
|
|
5
|
+
const classNames = require('./class-names.cjs');
|
|
484
6
|
|
|
485
7
|
var __defProp = Object.defineProperty;
|
|
486
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -493,61 +15,97 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
493
15
|
__defProp(target, key, result);
|
|
494
16
|
return result;
|
|
495
17
|
};
|
|
496
|
-
class
|
|
18
|
+
class SideDrawer extends index.FoundationElement {
|
|
497
19
|
constructor() {
|
|
498
20
|
super(...arguments);
|
|
499
|
-
this.
|
|
500
|
-
this.
|
|
501
|
-
this.
|
|
21
|
+
this.alternate = false;
|
|
22
|
+
this.modal = false;
|
|
23
|
+
this.open = false;
|
|
24
|
+
this.trailing = false;
|
|
502
25
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
valueChanged(previous, next) {
|
|
509
|
-
if (this.$fastController.isConnected) {
|
|
510
|
-
const nextAsNumber = parseFloat(next);
|
|
511
|
-
const value = slider_template.limit(
|
|
512
|
-
this.min,
|
|
513
|
-
this.max,
|
|
514
|
-
this["convertToConstrainedValue"](nextAsNumber)
|
|
515
|
-
).toString();
|
|
516
|
-
if (value !== next) {
|
|
517
|
-
this.value = value;
|
|
518
|
-
return;
|
|
26
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
27
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
28
|
+
switch (name) {
|
|
29
|
+
case "open": {
|
|
30
|
+
this.open ? this.#open() : this.#close();
|
|
519
31
|
}
|
|
520
|
-
super.valueChanged(previous, value);
|
|
521
32
|
}
|
|
522
33
|
}
|
|
34
|
+
#close() {
|
|
35
|
+
this.$emit("close", void 0, { bubbles: false });
|
|
36
|
+
}
|
|
37
|
+
#open() {
|
|
38
|
+
this.$emit("open", void 0, { bubbles: false });
|
|
39
|
+
}
|
|
523
40
|
}
|
|
524
41
|
__decorateClass([
|
|
525
|
-
index.attr({
|
|
526
|
-
|
|
42
|
+
index.attr({
|
|
43
|
+
mode: "boolean"
|
|
44
|
+
})
|
|
45
|
+
], SideDrawer.prototype, "alternate", 2);
|
|
527
46
|
__decorateClass([
|
|
528
|
-
index.attr({
|
|
529
|
-
|
|
47
|
+
index.attr({
|
|
48
|
+
mode: "boolean"
|
|
49
|
+
})
|
|
50
|
+
], SideDrawer.prototype, "modal", 2);
|
|
530
51
|
__decorateClass([
|
|
531
52
|
index.attr({
|
|
532
53
|
mode: "boolean"
|
|
533
54
|
})
|
|
534
|
-
],
|
|
55
|
+
], SideDrawer.prototype, "open", 2);
|
|
535
56
|
__decorateClass([
|
|
536
|
-
index.attr
|
|
537
|
-
|
|
57
|
+
index.attr({
|
|
58
|
+
mode: "boolean"
|
|
59
|
+
})
|
|
60
|
+
], SideDrawer.prototype, "trailing", 2);
|
|
538
61
|
|
|
539
|
-
const
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
62
|
+
const styles = ":host{display:block}.side-drawer-app-content{block-size:100%}.control{position:fixed;z-index:1;background-color:var(--vvd-color-canvas);color:var(--vvd-color-canvas-text);inline-size:280px;inset-block:0;overflow-y:auto}.control[part~=vvd-theme-alternate]{background-color:var(--vvd-color-canvas);color:var(--vvd-color-canvas-text);color-scheme:var(--vvd-color-scheme)}.control.trailing{inset-inline-end:0}.control:not(.open).trailing{transform:translate(100%)}.control:not(.open):not(.trailing){transform:translate(-100%)}.control.open:not(.modal).trailing+.side-drawer-app-content{margin-inline-end:var(--side-drawer-app-content-offset, 280px)}.control.open:not(.modal):not(.trailing)+.side-drawer-app-content{margin-inline-start:var(--side-drawer-app-content-offset, 280px)}@media (prefers-reduced-motion: no-preference){.control{transition:transform .2s cubic-bezier(.4,0,.2,1)}}.scrim{background-color:var(--vvd-color-canvas-text, currentColor);opacity:.5;position:fixed;inset:0}.scrim:not(.open){display:none}\n";
|
|
63
|
+
|
|
64
|
+
const getClasses = ({ modal, open, trailing }) => classNames.classNames(
|
|
65
|
+
"control",
|
|
66
|
+
["modal", modal],
|
|
67
|
+
["open", open],
|
|
68
|
+
["trailing", trailing]
|
|
69
|
+
);
|
|
70
|
+
const getScrimClasses = ({ open }) => classNames.classNames("scrim", ["open", open]);
|
|
71
|
+
const sideDrawerTemplate = () => index.html`
|
|
72
|
+
<div
|
|
73
|
+
class="${getClasses}"
|
|
74
|
+
?inert="${(x) => !x.open}"
|
|
75
|
+
part="base ${(x) => x.alternate ? "vvd-theme-alternate" : ""}"
|
|
76
|
+
@keydown="${(x, c) => handleKeydown(x, c.event)}"
|
|
77
|
+
>
|
|
78
|
+
<slot></slot>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div class="side-drawer-app-content" ?inert="${(x) => x.open && x.modal}">
|
|
82
|
+
<slot name="app-content"></slot>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
${when.when(
|
|
86
|
+
(x) => x.modal,
|
|
87
|
+
index.html`<div
|
|
88
|
+
class="${getScrimClasses}"
|
|
89
|
+
@click="${(x) => x.open = false}"
|
|
90
|
+
></div>`
|
|
91
|
+
)}
|
|
92
|
+
`;
|
|
93
|
+
const handleKeydown = (x, { key }) => {
|
|
94
|
+
if (key === "Escape") {
|
|
95
|
+
x.open = false;
|
|
96
|
+
} else {
|
|
97
|
+
return true;
|
|
545
98
|
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const sideDrawerDefinition = SideDrawer.compose({
|
|
102
|
+
baseName: "side-drawer",
|
|
103
|
+
template: sideDrawerTemplate,
|
|
104
|
+
styles
|
|
546
105
|
});
|
|
547
|
-
const
|
|
548
|
-
const
|
|
106
|
+
const sideDrawerRegistries = [sideDrawerDefinition()];
|
|
107
|
+
const registerSideDrawer = index.registerFactory(sideDrawerRegistries);
|
|
549
108
|
|
|
550
|
-
exports.
|
|
551
|
-
exports.
|
|
552
|
-
exports.
|
|
553
|
-
exports.sliderRegistries = sliderRegistries;
|
|
109
|
+
exports.registerSideDrawer = registerSideDrawer;
|
|
110
|
+
exports.sideDrawerDefinition = sideDrawerDefinition;
|
|
111
|
+
exports.sideDrawerRegistries = sideDrawerRegistries;
|