@aurelia-ui-toolkits/headless 1.0.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/dist/alert/ui-alert.html +19 -0
- package/dist/alert/ui-alert.js +67 -0
- package/dist/alert/ui-alert.js.map +1 -0
- package/dist/alert-service/alert-configuration.js +11 -0
- package/dist/alert-service/alert-configuration.js.map +1 -0
- package/dist/alert-service/alert-modal/alert-modal.html +12 -0
- package/dist/alert-service/alert-modal/alert-modal.js +31 -0
- package/dist/alert-service/alert-modal/alert-modal.js.map +1 -0
- package/dist/alert-service/alert-modal/i-alert-modal-payload.js +2 -0
- package/dist/alert-service/alert-modal/i-alert-modal-payload.js.map +1 -0
- package/dist/alert-service/alert-service.js +108 -0
- package/dist/alert-service/alert-service.js.map +1 -0
- package/dist/alert-service/decorators/confirm-action.js +14 -0
- package/dist/alert-service/decorators/confirm-action.js.map +1 -0
- package/dist/alert-service/decorators/using-progress.js +23 -0
- package/dist/alert-service/decorators/using-progress.js.map +1 -0
- package/dist/alert-service/exceptions-tracker.js +4 -0
- package/dist/alert-service/exceptions-tracker.js.map +1 -0
- package/dist/alert-service/prompt-dialog/prompt-dialog.html +13 -0
- package/dist/alert-service/prompt-dialog/prompt-dialog.js +39 -0
- package/dist/alert-service/prompt-dialog/prompt-dialog.js.map +1 -0
- package/dist/badge/ui-badge.html +6 -0
- package/dist/badge/ui-badge.js +44 -0
- package/dist/badge/ui-badge.js.map +1 -0
- package/dist/base/boolean-attr.js +4 -0
- package/dist/base/boolean-attr.js.map +1 -0
- package/dist/base/i-validated-element.js +2 -0
- package/dist/base/i-validated-element.js.map +1 -0
- package/dist/base/keys.js +14 -0
- package/dist/base/keys.js.map +1 -0
- package/dist/breadcrumbs/ui-breadcrumbs.html +10 -0
- package/dist/breadcrumbs/ui-breadcrumbs.js +31 -0
- package/dist/breadcrumbs/ui-breadcrumbs.js.map +1 -0
- package/dist/button/enhance-ui-button.js +25 -0
- package/dist/button/enhance-ui-button.js.map +1 -0
- package/dist/button/ui-button.html +20 -0
- package/dist/button/ui-button.js +77 -0
- package/dist/button/ui-button.js.map +1 -0
- package/dist/button/ui-icon-button.html +20 -0
- package/dist/button/ui-icon-button.js +77 -0
- package/dist/button/ui-icon-button.js.map +1 -0
- package/dist/checkbox/ui-checkbox.html +32 -0
- package/dist/checkbox/ui-checkbox.js +186 -0
- package/dist/checkbox/ui-checkbox.js.map +1 -0
- package/dist/chip/ui-chip.html +32 -0
- package/dist/chip/ui-chip.js +129 -0
- package/dist/chip/ui-chip.js.map +1 -0
- package/dist/combobox/enhance-ui-combobox.js +26 -0
- package/dist/combobox/enhance-ui-combobox.js.map +1 -0
- package/dist/combobox/ui-combobox.html +76 -0
- package/dist/combobox/ui-combobox.js +478 -0
- package/dist/combobox/ui-combobox.js.map +1 -0
- package/dist/disclosure/ui-disclosure.html +28 -0
- package/dist/disclosure/ui-disclosure.js +75 -0
- package/dist/disclosure/ui-disclosure.js.map +1 -0
- package/dist/drawer/ui-drawer.html +35 -0
- package/dist/drawer/ui-drawer.js +246 -0
- package/dist/drawer/ui-drawer.js.map +1 -0
- package/dist/index.js +135 -0
- package/dist/index.js.map +1 -0
- package/dist/input/enhance-ui-input.js +26 -0
- package/dist/input/enhance-ui-input.js.map +1 -0
- package/dist/input/ui-input.html +56 -0
- package/dist/input/ui-input.js +259 -0
- package/dist/input/ui-input.js.map +1 -0
- package/dist/list/ui-list-item.html +22 -0
- package/dist/list/ui-list-item.js +59 -0
- package/dist/list/ui-list-item.js.map +1 -0
- package/dist/list/ui-list.html +10 -0
- package/dist/list/ui-list.js +316 -0
- package/dist/list/ui-list.js.map +1 -0
- package/dist/menu/ui-menu.html +20 -0
- package/dist/menu/ui-menu.js +154 -0
- package/dist/menu/ui-menu.js.map +1 -0
- package/dist/popup/ui-popup.html +16 -0
- package/dist/popup/ui-popup.js +397 -0
- package/dist/popup/ui-popup.js.map +1 -0
- package/dist/progress/ui-progress.html +17 -0
- package/dist/progress/ui-progress.js +76 -0
- package/dist/progress/ui-progress.js.map +1 -0
- package/dist/radio/ui-radio-group.html +27 -0
- package/dist/radio/ui-radio-group.js +259 -0
- package/dist/radio/ui-radio-group.js.map +1 -0
- package/dist/radio/ui-radio.html +11 -0
- package/dist/radio/ui-radio.js +55 -0
- package/dist/radio/ui-radio.js.map +1 -0
- package/dist/segmented-control/ui-segment.html +10 -0
- package/dist/segmented-control/ui-segment.js +44 -0
- package/dist/segmented-control/ui-segment.js.map +1 -0
- package/dist/segmented-control/ui-segmented-control.html +9 -0
- package/dist/segmented-control/ui-segmented-control.js +134 -0
- package/dist/segmented-control/ui-segmented-control.js.map +1 -0
- package/dist/select/enhance-ui-select.js +26 -0
- package/dist/select/enhance-ui-select.js.map +1 -0
- package/dist/select/ui-select.html +70 -0
- package/dist/select/ui-select.js +323 -0
- package/dist/select/ui-select.js.map +1 -0
- package/dist/slider/ui-slider.html +69 -0
- package/dist/slider/ui-slider.js +362 -0
- package/dist/slider/ui-slider.js.map +1 -0
- package/dist/splitter/ui-splitter.html +14 -0
- package/dist/splitter/ui-splitter.js +257 -0
- package/dist/splitter/ui-splitter.js.map +1 -0
- package/dist/switch/ui-switch.html +23 -0
- package/dist/switch/ui-switch.js +121 -0
- package/dist/switch/ui-switch.js.map +1 -0
- package/dist/table/enhance-ui-table.js +25 -0
- package/dist/table/enhance-ui-table.js.map +1 -0
- package/dist/table/ui-table-column.html +17 -0
- package/dist/table/ui-table-column.js +127 -0
- package/dist/table/ui-table-column.js.map +1 -0
- package/dist/table/ui-table.html +56 -0
- package/dist/table/ui-table.js +225 -0
- package/dist/table/ui-table.js.map +1 -0
- package/dist/tabs/ui-tab.html +10 -0
- package/dist/tabs/ui-tab.js +52 -0
- package/dist/tabs/ui-tab.js.map +1 -0
- package/dist/tabs/ui-tabs.html +3 -0
- package/dist/tabs/ui-tabs.js +112 -0
- package/dist/tabs/ui-tabs.js.map +1 -0
- package/dist/toast/ui-toast-region.html +11 -0
- package/dist/toast/ui-toast-region.js +38 -0
- package/dist/toast/ui-toast-region.js.map +1 -0
- package/dist/toast/ui-toast-service.js +70 -0
- package/dist/toast/ui-toast-service.js.map +1 -0
- package/dist/tooltip/ui-tooltip-service.js +63 -0
- package/dist/tooltip/ui-tooltip-service.js.map +1 -0
- package/dist/tooltip/ui-tooltip.js +221 -0
- package/dist/tooltip/ui-tooltip.js.map +1 -0
- package/dist/top-app-bar/ui-top-app-bar.html +24 -0
- package/dist/top-app-bar/ui-top-app-bar.js +68 -0
- package/dist/top-app-bar/ui-top-app-bar.js.map +1 -0
- package/dist/tree/ui-tree.html +38 -0
- package/dist/tree/ui-tree.js +340 -0
- package/dist/tree/ui-tree.js.map +1 -0
- package/dist/types/alert/ui-alert.d.ts +11 -0
- package/dist/types/alert-service/alert-configuration.d.ts +8 -0
- package/dist/types/alert-service/alert-modal/alert-modal.d.ts +7 -0
- package/dist/types/alert-service/alert-modal/i-alert-modal-payload.d.ts +14 -0
- package/dist/types/alert-service/alert-service.d.ts +17 -0
- package/dist/types/alert-service/decorators/confirm-action.d.ts +3 -0
- package/dist/types/alert-service/decorators/using-progress.d.ts +6 -0
- package/dist/types/alert-service/exceptions-tracker.d.ts +3 -0
- package/dist/types/alert-service/prompt-dialog/prompt-dialog.d.ts +17 -0
- package/dist/types/badge/ui-badge.d.ts +7 -0
- package/dist/types/base/boolean-attr.d.ts +1 -0
- package/dist/types/base/i-validated-element.d.ts +10 -0
- package/dist/types/base/keys.d.ts +12 -0
- package/dist/types/breadcrumbs/ui-breadcrumbs.d.ts +8 -0
- package/dist/types/button/enhance-ui-button.d.ts +3 -0
- package/dist/types/button/ui-button.d.ts +16 -0
- package/dist/types/button/ui-icon-button.d.ts +18 -0
- package/dist/types/checkbox/ui-checkbox.d.ts +32 -0
- package/dist/types/chip/ui-chip.d.ts +26 -0
- package/dist/types/combobox/enhance-ui-combobox.d.ts +3 -0
- package/dist/types/combobox/ui-combobox.d.ts +79 -0
- package/dist/types/disclosure/ui-disclosure.d.ts +18 -0
- package/dist/types/drawer/ui-drawer.d.ts +38 -0
- package/dist/types/index.d.ts +91 -0
- package/dist/types/input/enhance-ui-input.d.ts +3 -0
- package/dist/types/input/ui-input.d.ts +44 -0
- package/dist/types/list/ui-list-item.d.ts +10 -0
- package/dist/types/list/ui-list.d.ts +45 -0
- package/dist/types/menu/ui-menu.d.ts +29 -0
- package/dist/types/popup/ui-popup.d.ts +61 -0
- package/dist/types/progress/ui-progress.d.ts +15 -0
- package/dist/types/radio/ui-radio-group.d.ts +37 -0
- package/dist/types/radio/ui-radio.d.ts +11 -0
- package/dist/types/segmented-control/ui-segment.d.ts +8 -0
- package/dist/types/segmented-control/ui-segmented-control.d.ts +17 -0
- package/dist/types/select/enhance-ui-select.d.ts +3 -0
- package/dist/types/select/ui-select.d.ts +50 -0
- package/dist/types/slider/ui-slider.d.ts +58 -0
- package/dist/types/splitter/ui-splitter.d.ts +39 -0
- package/dist/types/switch/ui-switch.d.ts +23 -0
- package/dist/types/table/enhance-ui-table.d.ts +3 -0
- package/dist/types/table/ui-table-column.d.ts +22 -0
- package/dist/types/table/ui-table.d.ts +51 -0
- package/dist/types/tabs/ui-tab.d.ts +10 -0
- package/dist/types/tabs/ui-tabs.d.ts +16 -0
- package/dist/types/toast/ui-toast-region.d.ts +6 -0
- package/dist/types/toast/ui-toast-service.d.ts +28 -0
- package/dist/types/tooltip/ui-tooltip-service.d.ts +23 -0
- package/dist/types/tooltip/ui-tooltip.d.ts +35 -0
- package/dist/types/top-app-bar/ui-top-app-bar.d.ts +9 -0
- package/dist/types/tree/ui-tree.d.ts +70 -0
- package/dist/types/validation/ui-validation-controller-factory.d.ts +7 -0
- package/dist/types/validation/ui-validation-result-presenter.d.ts +4 -0
- package/dist/types/validation/validate.d.ts +13 -0
- package/dist/validation/ui-validation-controller-factory.js +17 -0
- package/dist/validation/ui-validation-controller-factory.js.map +1 -0
- package/dist/validation/ui-validation-result-presenter.js +23 -0
- package/dist/validation/ui-validation-result-presenter.js.map +1 -0
- package/dist/validation/validate.js +24 -0
- package/dist/validation/validate.js.map +1 -0
- package/package.json +50 -0
- package/src/alert/ui-alert.html +19 -0
- package/src/alert/ui-alert.ts +33 -0
- package/src/alert-service/alert-configuration.ts +11 -0
- package/src/alert-service/alert-modal/alert-modal.html +12 -0
- package/src/alert-service/alert-modal/alert-modal.ts +19 -0
- package/src/alert-service/alert-modal/i-alert-modal-payload.ts +14 -0
- package/src/alert-service/alert-service.ts +116 -0
- package/src/alert-service/decorators/confirm-action.ts +18 -0
- package/src/alert-service/decorators/using-progress.ts +32 -0
- package/src/alert-service/exceptions-tracker.ts +3 -0
- package/src/alert-service/prompt-dialog/prompt-dialog.html +13 -0
- package/src/alert-service/prompt-dialog/prompt-dialog.ts +37 -0
- package/src/badge/ui-badge.html +6 -0
- package/src/badge/ui-badge.ts +17 -0
- package/src/base/boolean-attr.ts +3 -0
- package/src/base/i-validated-element.ts +11 -0
- package/src/base/keys.ts +12 -0
- package/src/breadcrumbs/ui-breadcrumbs.html +10 -0
- package/src/breadcrumbs/ui-breadcrumbs.ts +14 -0
- package/src/button/enhance-ui-button.ts +9 -0
- package/src/button/ui-button.html +20 -0
- package/src/button/ui-button.ts +60 -0
- package/src/button/ui-icon-button.html +20 -0
- package/src/button/ui-icon-button.ts +62 -0
- package/src/checkbox/ui-checkbox.html +32 -0
- package/src/checkbox/ui-checkbox.ts +188 -0
- package/src/chip/ui-chip.html +32 -0
- package/src/chip/ui-chip.ts +118 -0
- package/src/combobox/enhance-ui-combobox.ts +10 -0
- package/src/combobox/ui-combobox.html +76 -0
- package/src/combobox/ui-combobox.ts +450 -0
- package/src/disclosure/ui-disclosure.html +28 -0
- package/src/disclosure/ui-disclosure.ts +68 -0
- package/src/drawer/ui-drawer.html +35 -0
- package/src/drawer/ui-drawer.ts +219 -0
- package/src/index.ts +152 -0
- package/src/input/enhance-ui-input.ts +10 -0
- package/src/input/ui-input.html +56 -0
- package/src/input/ui-input.ts +225 -0
- package/src/list/ui-list-item.html +22 -0
- package/src/list/ui-list-item.ts +25 -0
- package/src/list/ui-list.html +10 -0
- package/src/list/ui-list.ts +330 -0
- package/src/menu/ui-menu.html +20 -0
- package/src/menu/ui-menu.ts +103 -0
- package/src/popup/ui-popup.html +16 -0
- package/src/popup/ui-popup.ts +391 -0
- package/src/progress/ui-progress.html +17 -0
- package/src/progress/ui-progress.ts +51 -0
- package/src/radio/ui-radio-group.html +27 -0
- package/src/radio/ui-radio-group.ts +250 -0
- package/src/radio/ui-radio.html +11 -0
- package/src/radio/ui-radio.ts +35 -0
- package/src/resource.d.ts +4 -0
- package/src/segmented-control/ui-segment.html +10 -0
- package/src/segmented-control/ui-segment.ts +20 -0
- package/src/segmented-control/ui-segmented-control.html +9 -0
- package/src/segmented-control/ui-segmented-control.ts +119 -0
- package/src/select/enhance-ui-select.ts +10 -0
- package/src/select/ui-select.html +70 -0
- package/src/select/ui-select.ts +294 -0
- package/src/slider/ui-slider.html +69 -0
- package/src/slider/ui-slider.ts +329 -0
- package/src/splitter/ui-splitter.html +14 -0
- package/src/splitter/ui-splitter.ts +249 -0
- package/src/switch/ui-switch.html +23 -0
- package/src/switch/ui-switch.ts +121 -0
- package/src/table/enhance-ui-table.ts +9 -0
- package/src/table/ui-table-column.html +17 -0
- package/src/table/ui-table-column.ts +108 -0
- package/src/table/ui-table.html +56 -0
- package/src/table/ui-table.ts +209 -0
- package/src/tabs/ui-tab.html +10 -0
- package/src/tabs/ui-tab.ts +30 -0
- package/src/tabs/ui-tabs.html +3 -0
- package/src/tabs/ui-tabs.ts +105 -0
- package/src/toast/ui-toast-region.html +11 -0
- package/src/toast/ui-toast-region.ts +18 -0
- package/src/toast/ui-toast-service.ts +100 -0
- package/src/tooltip/ui-tooltip-service.ts +84 -0
- package/src/tooltip/ui-tooltip.ts +200 -0
- package/src/top-app-bar/ui-top-app-bar.html +24 -0
- package/src/top-app-bar/ui-top-app-bar.ts +27 -0
- package/src/tree/ui-tree.html +38 -0
- package/src/tree/ui-tree.ts +363 -0
- package/src/validation/ui-validation-controller-factory.ts +20 -0
- package/src/validation/ui-validation-result-presenter.ts +26 -0
- package/src/validation/validate.ts +35 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
+
import { bindable, BindingMode, customElement, INode, resolve } from 'aurelia';
|
|
3
|
+
import { booleanAttr } from '../base/boolean-attr';
|
|
4
|
+
import { Keys } from '../base/keys';
|
|
5
|
+
import template from './ui-popup.html?raw';
|
|
6
|
+
let UiPopup = (() => {
|
|
7
|
+
let _classDecorators = [customElement({ name: 'ui-popup', template })];
|
|
8
|
+
let _classDescriptor;
|
|
9
|
+
let _classExtraInitializers = [];
|
|
10
|
+
let _classThis;
|
|
11
|
+
let _open_decorators;
|
|
12
|
+
let _open_initializers = [];
|
|
13
|
+
let _open_extraInitializers = [];
|
|
14
|
+
let _closeOnOutside_decorators;
|
|
15
|
+
let _closeOnOutside_initializers = [];
|
|
16
|
+
let _closeOnOutside_extraInitializers = [];
|
|
17
|
+
let _closeOnEscape_decorators;
|
|
18
|
+
let _closeOnEscape_initializers = [];
|
|
19
|
+
let _closeOnEscape_extraInitializers = [];
|
|
20
|
+
let _matchAnchorWidth_decorators;
|
|
21
|
+
let _matchAnchorWidth_initializers = [];
|
|
22
|
+
let _matchAnchorWidth_extraInitializers = [];
|
|
23
|
+
let _focusOnOpen_decorators;
|
|
24
|
+
let _focusOnOpen_initializers = [];
|
|
25
|
+
let _focusOnOpen_extraInitializers = [];
|
|
26
|
+
let _restoreFocus_decorators;
|
|
27
|
+
let _restoreFocus_initializers = [];
|
|
28
|
+
let _restoreFocus_extraInitializers = [];
|
|
29
|
+
let _anchor_decorators;
|
|
30
|
+
let _anchor_initializers = [];
|
|
31
|
+
let _anchor_extraInitializers = [];
|
|
32
|
+
let _tabReference_decorators;
|
|
33
|
+
let _tabReference_initializers = [];
|
|
34
|
+
let _tabReference_extraInitializers = [];
|
|
35
|
+
let _placement_decorators;
|
|
36
|
+
let _placement_initializers = [];
|
|
37
|
+
let _placement_extraInitializers = [];
|
|
38
|
+
let _offset_decorators;
|
|
39
|
+
let _offset_initializers = [];
|
|
40
|
+
let _offset_extraInitializers = [];
|
|
41
|
+
let _portalTarget_decorators;
|
|
42
|
+
let _portalTarget_initializers = [];
|
|
43
|
+
let _portalTarget_extraInitializers = [];
|
|
44
|
+
let _portalPosition_decorators;
|
|
45
|
+
let _portalPosition_initializers = [];
|
|
46
|
+
let _portalPosition_extraInitializers = [];
|
|
47
|
+
let _exposedHost_decorators;
|
|
48
|
+
let _exposedHost_initializers = [];
|
|
49
|
+
let _exposedHost_extraInitializers = [];
|
|
50
|
+
let _panelRole_decorators;
|
|
51
|
+
let _panelRole_initializers = [];
|
|
52
|
+
let _panelRole_extraInitializers = [];
|
|
53
|
+
let _panelId_decorators;
|
|
54
|
+
let _panelId_initializers = [];
|
|
55
|
+
let _panelId_extraInitializers = [];
|
|
56
|
+
var UiPopup = class {
|
|
57
|
+
static { _classThis = this; }
|
|
58
|
+
static {
|
|
59
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
60
|
+
_open_decorators = [bindable({ mode: BindingMode.twoWay, set: booleanAttr })];
|
|
61
|
+
_closeOnOutside_decorators = [bindable({ set: booleanAttr })];
|
|
62
|
+
_closeOnEscape_decorators = [bindable({ set: booleanAttr })];
|
|
63
|
+
_matchAnchorWidth_decorators = [bindable({ set: booleanAttr })];
|
|
64
|
+
_focusOnOpen_decorators = [bindable({ set: booleanAttr })];
|
|
65
|
+
_restoreFocus_decorators = [bindable({ set: booleanAttr })];
|
|
66
|
+
_anchor_decorators = [bindable];
|
|
67
|
+
_tabReference_decorators = [bindable];
|
|
68
|
+
_placement_decorators = [bindable];
|
|
69
|
+
_offset_decorators = [bindable];
|
|
70
|
+
_portalTarget_decorators = [bindable];
|
|
71
|
+
_portalPosition_decorators = [bindable];
|
|
72
|
+
_exposedHost_decorators = [bindable];
|
|
73
|
+
_panelRole_decorators = [bindable];
|
|
74
|
+
_panelId_decorators = [bindable];
|
|
75
|
+
__esDecorate(null, null, _open_decorators, { kind: "field", name: "open", static: false, private: false, access: { has: obj => "open" in obj, get: obj => obj.open, set: (obj, value) => { obj.open = value; } }, metadata: _metadata }, _open_initializers, _open_extraInitializers);
|
|
76
|
+
__esDecorate(null, null, _closeOnOutside_decorators, { kind: "field", name: "closeOnOutside", static: false, private: false, access: { has: obj => "closeOnOutside" in obj, get: obj => obj.closeOnOutside, set: (obj, value) => { obj.closeOnOutside = value; } }, metadata: _metadata }, _closeOnOutside_initializers, _closeOnOutside_extraInitializers);
|
|
77
|
+
__esDecorate(null, null, _closeOnEscape_decorators, { kind: "field", name: "closeOnEscape", static: false, private: false, access: { has: obj => "closeOnEscape" in obj, get: obj => obj.closeOnEscape, set: (obj, value) => { obj.closeOnEscape = value; } }, metadata: _metadata }, _closeOnEscape_initializers, _closeOnEscape_extraInitializers);
|
|
78
|
+
__esDecorate(null, null, _matchAnchorWidth_decorators, { kind: "field", name: "matchAnchorWidth", static: false, private: false, access: { has: obj => "matchAnchorWidth" in obj, get: obj => obj.matchAnchorWidth, set: (obj, value) => { obj.matchAnchorWidth = value; } }, metadata: _metadata }, _matchAnchorWidth_initializers, _matchAnchorWidth_extraInitializers);
|
|
79
|
+
__esDecorate(null, null, _focusOnOpen_decorators, { kind: "field", name: "focusOnOpen", static: false, private: false, access: { has: obj => "focusOnOpen" in obj, get: obj => obj.focusOnOpen, set: (obj, value) => { obj.focusOnOpen = value; } }, metadata: _metadata }, _focusOnOpen_initializers, _focusOnOpen_extraInitializers);
|
|
80
|
+
__esDecorate(null, null, _restoreFocus_decorators, { kind: "field", name: "restoreFocus", static: false, private: false, access: { has: obj => "restoreFocus" in obj, get: obj => obj.restoreFocus, set: (obj, value) => { obj.restoreFocus = value; } }, metadata: _metadata }, _restoreFocus_initializers, _restoreFocus_extraInitializers);
|
|
81
|
+
__esDecorate(null, null, _anchor_decorators, { kind: "field", name: "anchor", static: false, private: false, access: { has: obj => "anchor" in obj, get: obj => obj.anchor, set: (obj, value) => { obj.anchor = value; } }, metadata: _metadata }, _anchor_initializers, _anchor_extraInitializers);
|
|
82
|
+
__esDecorate(null, null, _tabReference_decorators, { kind: "field", name: "tabReference", static: false, private: false, access: { has: obj => "tabReference" in obj, get: obj => obj.tabReference, set: (obj, value) => { obj.tabReference = value; } }, metadata: _metadata }, _tabReference_initializers, _tabReference_extraInitializers);
|
|
83
|
+
__esDecorate(null, null, _placement_decorators, { kind: "field", name: "placement", static: false, private: false, access: { has: obj => "placement" in obj, get: obj => obj.placement, set: (obj, value) => { obj.placement = value; } }, metadata: _metadata }, _placement_initializers, _placement_extraInitializers);
|
|
84
|
+
__esDecorate(null, null, _offset_decorators, { kind: "field", name: "offset", static: false, private: false, access: { has: obj => "offset" in obj, get: obj => obj.offset, set: (obj, value) => { obj.offset = value; } }, metadata: _metadata }, _offset_initializers, _offset_extraInitializers);
|
|
85
|
+
__esDecorate(null, null, _portalTarget_decorators, { kind: "field", name: "portalTarget", static: false, private: false, access: { has: obj => "portalTarget" in obj, get: obj => obj.portalTarget, set: (obj, value) => { obj.portalTarget = value; } }, metadata: _metadata }, _portalTarget_initializers, _portalTarget_extraInitializers);
|
|
86
|
+
__esDecorate(null, null, _portalPosition_decorators, { kind: "field", name: "portalPosition", static: false, private: false, access: { has: obj => "portalPosition" in obj, get: obj => obj.portalPosition, set: (obj, value) => { obj.portalPosition = value; } }, metadata: _metadata }, _portalPosition_initializers, _portalPosition_extraInitializers);
|
|
87
|
+
__esDecorate(null, null, _exposedHost_decorators, { kind: "field", name: "exposedHost", static: false, private: false, access: { has: obj => "exposedHost" in obj, get: obj => obj.exposedHost, set: (obj, value) => { obj.exposedHost = value; } }, metadata: _metadata }, _exposedHost_initializers, _exposedHost_extraInitializers);
|
|
88
|
+
__esDecorate(null, null, _panelRole_decorators, { kind: "field", name: "panelRole", static: false, private: false, access: { has: obj => "panelRole" in obj, get: obj => obj.panelRole, set: (obj, value) => { obj.panelRole = value; } }, metadata: _metadata }, _panelRole_initializers, _panelRole_extraInitializers);
|
|
89
|
+
__esDecorate(null, null, _panelId_decorators, { kind: "field", name: "panelId", static: false, private: false, access: { has: obj => "panelId" in obj, get: obj => obj.panelId, set: (obj, value) => { obj.panelId = value; } }, metadata: _metadata }, _panelId_initializers, _panelId_extraInitializers);
|
|
90
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
91
|
+
UiPopup = _classThis = _classDescriptor.value;
|
|
92
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
93
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
94
|
+
}
|
|
95
|
+
element = resolve(INode);
|
|
96
|
+
slotHost = this;
|
|
97
|
+
hiddenPanelStyle = 'position: fixed; top: -10000px; left: -10000px; visibility: hidden;';
|
|
98
|
+
open = __runInitializers(this, _open_initializers, false);
|
|
99
|
+
openChanged(newValue) {
|
|
100
|
+
if (newValue) {
|
|
101
|
+
this.panelStyle = this.hiddenPanelStyle;
|
|
102
|
+
this.startOpenState();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.stopOpenState();
|
|
106
|
+
}
|
|
107
|
+
closeOnOutside = (__runInitializers(this, _open_extraInitializers), __runInitializers(this, _closeOnOutside_initializers, true));
|
|
108
|
+
closeOnEscape = (__runInitializers(this, _closeOnOutside_extraInitializers), __runInitializers(this, _closeOnEscape_initializers, true));
|
|
109
|
+
matchAnchorWidth = (__runInitializers(this, _closeOnEscape_extraInitializers), __runInitializers(this, _matchAnchorWidth_initializers, false));
|
|
110
|
+
matchAnchorWidthChanged() {
|
|
111
|
+
this.queuePositionUpdate();
|
|
112
|
+
}
|
|
113
|
+
focusOnOpen = (__runInitializers(this, _matchAnchorWidth_extraInitializers), __runInitializers(this, _focusOnOpen_initializers, true));
|
|
114
|
+
restoreFocus = (__runInitializers(this, _focusOnOpen_extraInitializers), __runInitializers(this, _restoreFocus_initializers, true));
|
|
115
|
+
anchor = (__runInitializers(this, _restoreFocus_extraInitializers), __runInitializers(this, _anchor_initializers, void 0));
|
|
116
|
+
anchorChanged(newValue, oldValue) {
|
|
117
|
+
oldValue?.removeEventListener('pointerdown', this.onAnchorPointerDownCapture, true);
|
|
118
|
+
newValue?.addEventListener('pointerdown', this.onAnchorPointerDownCapture, true);
|
|
119
|
+
this.queuePositionUpdate();
|
|
120
|
+
}
|
|
121
|
+
tabReference = (__runInitializers(this, _anchor_extraInitializers), __runInitializers(this, _tabReference_initializers, void 0));
|
|
122
|
+
placement = (__runInitializers(this, _tabReference_extraInitializers), __runInitializers(this, _placement_initializers, 'bottom-start'));
|
|
123
|
+
placementChanged() {
|
|
124
|
+
this.queuePositionUpdate();
|
|
125
|
+
}
|
|
126
|
+
offset = (__runInitializers(this, _placement_extraInitializers), __runInitializers(this, _offset_initializers, 8));
|
|
127
|
+
offsetChanged() {
|
|
128
|
+
this.queuePositionUpdate();
|
|
129
|
+
}
|
|
130
|
+
portalTarget = (__runInitializers(this, _offset_extraInitializers), __runInitializers(this, _portalTarget_initializers, void 0));
|
|
131
|
+
portalPosition = (__runInitializers(this, _portalTarget_extraInitializers), __runInitializers(this, _portalPosition_initializers, 'beforeend'));
|
|
132
|
+
exposedHost = (__runInitializers(this, _portalPosition_extraInitializers), __runInitializers(this, _exposedHost_initializers, void 0));
|
|
133
|
+
panelRole = (__runInitializers(this, _exposedHost_extraInitializers), __runInitializers(this, _panelRole_initializers, 'dialog'));
|
|
134
|
+
panelId = (__runInitializers(this, _panelRole_extraInitializers), __runInitializers(this, _panelId_initializers, void 0));
|
|
135
|
+
panelStyle = (__runInitializers(this, _panelId_extraInitializers), this.hiddenPanelStyle);
|
|
136
|
+
panelElement;
|
|
137
|
+
get effectiveSlotHost() {
|
|
138
|
+
return this.exposedHost ?? this.slotHost;
|
|
139
|
+
}
|
|
140
|
+
attaching() {
|
|
141
|
+
this.anchor?.addEventListener('pointerdown', this.onAnchorPointerDownCapture, true);
|
|
142
|
+
if (this.open) {
|
|
143
|
+
this.startOpenState();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
detaching() {
|
|
147
|
+
this.anchor?.removeEventListener('pointerdown', this.onAnchorPointerDownCapture, true);
|
|
148
|
+
this.stopOpenState();
|
|
149
|
+
}
|
|
150
|
+
listening = false;
|
|
151
|
+
anchorRectSnapshot;
|
|
152
|
+
previousFocus;
|
|
153
|
+
resizeObserver;
|
|
154
|
+
observedPanelHeight;
|
|
155
|
+
observedPanelScrollHeight;
|
|
156
|
+
mutationObserver;
|
|
157
|
+
currentPlaceTop;
|
|
158
|
+
preservePlacementUpdate = false;
|
|
159
|
+
onAnchorPointerDownCapture = () => {
|
|
160
|
+
if (!this.anchor) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
this.anchorRectSnapshot = this.anchor.getBoundingClientRect();
|
|
164
|
+
};
|
|
165
|
+
onWindowPointerDown = (event) => {
|
|
166
|
+
if (!this.open || !this.closeOnOutside) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const target = event.target;
|
|
170
|
+
if (!target) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (this.panelElement?.contains(target) || this.anchor?.contains(target)) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
this.requestClose();
|
|
177
|
+
};
|
|
178
|
+
onWindowKeyDown = (event) => {
|
|
179
|
+
if (!this.open) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
if (event.key === Keys.Tab && this.panelElement?.contains(event.target)) {
|
|
183
|
+
this.focusNextFromTabReference(event.shiftKey);
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (!this.closeOnEscape || event.key !== Keys.Escape) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
event.preventDefault();
|
|
191
|
+
this.requestClose();
|
|
192
|
+
};
|
|
193
|
+
onWindowLayoutChange = () => {
|
|
194
|
+
this.queuePositionUpdate();
|
|
195
|
+
};
|
|
196
|
+
startOpenState() {
|
|
197
|
+
this.previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : undefined;
|
|
198
|
+
this.setListeners(true);
|
|
199
|
+
this.observePanelSize();
|
|
200
|
+
if (this.focusOnOpen) {
|
|
201
|
+
this.focusPanel();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
stopOpenState() {
|
|
205
|
+
this.setListeners(false);
|
|
206
|
+
this.resizeObserver?.disconnect();
|
|
207
|
+
this.resizeObserver = undefined;
|
|
208
|
+
this.mutationObserver?.disconnect();
|
|
209
|
+
this.mutationObserver = undefined;
|
|
210
|
+
this.observedPanelHeight = undefined;
|
|
211
|
+
this.observedPanelScrollHeight = undefined;
|
|
212
|
+
this.currentPlaceTop = undefined;
|
|
213
|
+
this.preservePlacementUpdate = false;
|
|
214
|
+
this.anchorRectSnapshot = undefined;
|
|
215
|
+
this.panelStyle = this.hiddenPanelStyle;
|
|
216
|
+
if (this.restoreFocus) {
|
|
217
|
+
this.restorePreviousFocus();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
requestClose() {
|
|
221
|
+
this.open = false;
|
|
222
|
+
}
|
|
223
|
+
onListSelect(event) {
|
|
224
|
+
event.stopPropagation();
|
|
225
|
+
this.element.dispatchEvent(new CustomEvent('list-select', {
|
|
226
|
+
bubbles: true,
|
|
227
|
+
detail: event.detail
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
focus() {
|
|
231
|
+
this.focusPanel();
|
|
232
|
+
}
|
|
233
|
+
contains(target) {
|
|
234
|
+
return !!this.panelElement?.contains(target);
|
|
235
|
+
}
|
|
236
|
+
focusPanel() {
|
|
237
|
+
const focusTarget = this.panelElement?.querySelector('[tabindex]');
|
|
238
|
+
(focusTarget ?? this.panelElement)?.focus();
|
|
239
|
+
}
|
|
240
|
+
restorePreviousFocus() {
|
|
241
|
+
if (!this.previousFocus || !document.contains(this.previousFocus)) {
|
|
242
|
+
this.previousFocus = undefined;
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this.previousFocus.focus();
|
|
246
|
+
this.previousFocus = undefined;
|
|
247
|
+
}
|
|
248
|
+
focusNextFromTabReference(reverse) {
|
|
249
|
+
const reference = this.tabReference ?? this.anchor;
|
|
250
|
+
if (!(reference instanceof HTMLElement)) {
|
|
251
|
+
this.requestClose();
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
const focusable = this.getFocusableElements();
|
|
255
|
+
const index = focusable.indexOf(reference);
|
|
256
|
+
if (index < 0) {
|
|
257
|
+
this.requestClose();
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
const target = focusable[index + (reverse ? -1 : 1)];
|
|
261
|
+
this.element.dispatchEvent(new CustomEvent('popup-tab-away', {
|
|
262
|
+
bubbles: true,
|
|
263
|
+
detail: { reverse }
|
|
264
|
+
}));
|
|
265
|
+
this.requestClose();
|
|
266
|
+
target?.focus();
|
|
267
|
+
}
|
|
268
|
+
getFocusableElements() {
|
|
269
|
+
const selector = [
|
|
270
|
+
'a[href]',
|
|
271
|
+
'button',
|
|
272
|
+
'input:not([type="hidden"])',
|
|
273
|
+
'select',
|
|
274
|
+
'textarea',
|
|
275
|
+
'iframe',
|
|
276
|
+
'[tabindex]',
|
|
277
|
+
'[contenteditable="true"]'
|
|
278
|
+
].join(',');
|
|
279
|
+
return Array.from(document.querySelectorAll(selector))
|
|
280
|
+
.filter((element) => this.isFocusable(element));
|
|
281
|
+
}
|
|
282
|
+
isFocusable(element) {
|
|
283
|
+
if (this.panelElement?.contains(element)) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
if (element.tabIndex < 0 || element.hasAttribute('disabled') || element.getAttribute('aria-hidden') === 'true') {
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
const style = window.getComputedStyle(element);
|
|
290
|
+
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
291
|
+
}
|
|
292
|
+
setListeners(listen) {
|
|
293
|
+
if (listen === this.listening) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
this.listening = listen;
|
|
297
|
+
if (listen) {
|
|
298
|
+
window.addEventListener('pointerdown', this.onWindowPointerDown, true);
|
|
299
|
+
window.addEventListener('keydown', this.onWindowKeyDown, true);
|
|
300
|
+
window.addEventListener('resize', this.onWindowLayoutChange);
|
|
301
|
+
window.addEventListener('scroll', this.onWindowLayoutChange, true);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
window.removeEventListener('pointerdown', this.onWindowPointerDown, true);
|
|
305
|
+
window.removeEventListener('keydown', this.onWindowKeyDown, true);
|
|
306
|
+
window.removeEventListener('resize', this.onWindowLayoutChange);
|
|
307
|
+
window.removeEventListener('scroll', this.onWindowLayoutChange, true);
|
|
308
|
+
}
|
|
309
|
+
observePanelSize() {
|
|
310
|
+
this.resizeObserver?.disconnect();
|
|
311
|
+
this.resizeObserver = undefined;
|
|
312
|
+
this.mutationObserver?.disconnect();
|
|
313
|
+
this.mutationObserver = undefined;
|
|
314
|
+
this.observedPanelHeight = undefined;
|
|
315
|
+
this.observedPanelScrollHeight = undefined;
|
|
316
|
+
if (!this.open || !this.panelElement) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
this.resizeObserver = new ResizeObserver(([entry]) => {
|
|
320
|
+
const height = entry.contentRect.height;
|
|
321
|
+
if (this.observedPanelHeight === undefined) {
|
|
322
|
+
this.observedPanelHeight = height;
|
|
323
|
+
if (height > 0) {
|
|
324
|
+
this.queuePositionUpdate();
|
|
325
|
+
}
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
const preservePlacement = height <= this.observedPanelHeight;
|
|
329
|
+
this.observedPanelHeight = height;
|
|
330
|
+
this.queuePositionUpdate(preservePlacement);
|
|
331
|
+
});
|
|
332
|
+
this.resizeObserver.observe(this.panelElement);
|
|
333
|
+
this.mutationObserver = new MutationObserver(() => this.handlePanelContentChange());
|
|
334
|
+
this.mutationObserver.observe(this.panelElement, { childList: true, subtree: true, characterData: true });
|
|
335
|
+
}
|
|
336
|
+
handlePanelContentChange() {
|
|
337
|
+
if (!this.open || !this.panelElement) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
const scrollHeight = this.panelElement.scrollHeight;
|
|
341
|
+
if (this.observedPanelScrollHeight === undefined) {
|
|
342
|
+
this.observedPanelScrollHeight = scrollHeight;
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const preservePlacement = scrollHeight <= this.observedPanelScrollHeight;
|
|
346
|
+
this.observedPanelScrollHeight = scrollHeight;
|
|
347
|
+
this.queuePositionUpdate(preservePlacement);
|
|
348
|
+
}
|
|
349
|
+
queuePositionUpdate(preservePlacement = false) {
|
|
350
|
+
if (!this.open) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
this.preservePlacementUpdate = this.preservePlacementUpdate || preservePlacement;
|
|
354
|
+
const shouldPreservePlacement = this.preservePlacementUpdate;
|
|
355
|
+
this.preservePlacementUpdate = false;
|
|
356
|
+
this.updatePosition(shouldPreservePlacement);
|
|
357
|
+
}
|
|
358
|
+
updatePosition(preservePlacement = false) {
|
|
359
|
+
if (!this.open || !this.panelElement) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
if (!this.anchor) {
|
|
363
|
+
this.panelStyle = this.hiddenPanelStyle;
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
const anchorRect = this.anchorRectSnapshot || this.anchor.getBoundingClientRect();
|
|
367
|
+
this.anchorRectSnapshot = undefined;
|
|
368
|
+
const panelRect = this.panelElement.getBoundingClientRect();
|
|
369
|
+
this.observedPanelHeight = panelRect.height;
|
|
370
|
+
this.observedPanelScrollHeight = this.panelElement.scrollHeight;
|
|
371
|
+
const viewportPadding = 8;
|
|
372
|
+
const alignEnd = this.placement.endsWith('end');
|
|
373
|
+
const preferTop = this.placement.startsWith('top');
|
|
374
|
+
const fallbackBottom = anchorRect.bottom + this.offset;
|
|
375
|
+
const availableTop = Math.max(0, anchorRect.top - this.offset - viewportPadding);
|
|
376
|
+
const availableBottom = Math.max(0, window.innerHeight - fallbackBottom - viewportPadding);
|
|
377
|
+
const nextPlaceTop = preferTop
|
|
378
|
+
? panelRect.height <= availableTop || availableTop >= availableBottom
|
|
379
|
+
: panelRect.height > availableBottom && availableTop > availableBottom;
|
|
380
|
+
const placeTop = preservePlacement && this.currentPlaceTop !== undefined ? this.currentPlaceTop : nextPlaceTop;
|
|
381
|
+
this.currentPlaceTop = placeTop;
|
|
382
|
+
const availableHeight = placeTop ? availableTop : availableBottom;
|
|
383
|
+
const panelHeight = Math.min(panelRect.height, availableHeight);
|
|
384
|
+
let top = placeTop ? anchorRect.top - this.offset - panelHeight : fallbackBottom;
|
|
385
|
+
top = Math.max(viewportPadding, Math.min(top, window.innerHeight - panelHeight - viewportPadding));
|
|
386
|
+
let left = alignEnd ? anchorRect.right - panelRect.width : anchorRect.left;
|
|
387
|
+
left = Math.max(viewportPadding, Math.min(left, window.innerWidth - panelRect.width - viewportPadding));
|
|
388
|
+
const maxWidth = `max-width: calc(100vw - ${viewportPadding * 2}px);`;
|
|
389
|
+
const maxHeight = `max-height: ${availableHeight}px; --ui-popup-available-height: ${availableHeight}px;`;
|
|
390
|
+
const minWidth = this.matchAnchorWidth ? `min-width: min(${anchorRect.width}px, calc(100vw - ${viewportPadding * 2}px));` : '';
|
|
391
|
+
this.panelStyle = `position: fixed; top: ${top}px; left: ${left}px; ${maxWidth} ${maxHeight} ${minWidth}`;
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
return UiPopup = _classThis;
|
|
395
|
+
})();
|
|
396
|
+
export { UiPopup };
|
|
397
|
+
//# sourceMappingURL=ui-popup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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AAI,GAAG,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;YAC3E,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC;YAExG,MAAM,QAAQ,GAAG,2BAA2B,eAAe,GAAG,CAAC,MAAM,CAAC;YACtE,MAAM,SAAS,GAAG,eAAe,eAAe,oCAAoC,eAAe,KAAK,CAAC;YACzG,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,UAAU,CAAC,KAAK,oBAAoB,eAAe,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/H,IAAI,CAAC,UAAU,GAAG,yBAAyB,GAAG,aAAa,IAAI,OAAO,QAAQ,IAAI,SAAS,IAAI,QAAQ,EAAE,CAAC;QAC5G,CAAC;;;;SA7XU,OAAO","sourcesContent":["import { bindable, BindingMode, customElement, INode, resolve } from 'aurelia';\nimport { booleanAttr } from '../base/boolean-attr';\r\nimport { Keys } from '../base/keys';\r\nimport template from './ui-popup.html?raw';\r\n\r\ntype PopupPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';\r\n\r\n@customElement({ name: 'ui-popup', template })\r\nexport class UiPopup {\n readonly element = resolve(INode) as HTMLElement;\n readonly slotHost = this;\n private readonly hiddenPanelStyle = 'position: fixed; top: -10000px; left: -10000px; visibility: hidden;';\n\r\n @bindable({ mode: BindingMode.twoWay, set: booleanAttr })\r\n open: boolean = false;\r\n openChanged(newValue: boolean): void {\r\n if (newValue) {\r\n this.panelStyle = this.hiddenPanelStyle;\r\n this.startOpenState();\r\n return;\r\n }\r\n\r\n this.stopOpenState();\r\n }\r\n\r\n @bindable({ set: booleanAttr })\r\n closeOnOutside: boolean = true;\r\n\r\n @bindable({ set: booleanAttr })\r\n closeOnEscape: boolean = true;\r\n\r\n @bindable({ set: booleanAttr })\n matchAnchorWidth: boolean = false;\n matchAnchorWidthChanged(): void {\n this.queuePositionUpdate();\n }\n\n @bindable({ set: booleanAttr })\n focusOnOpen: boolean = true;\n\n @bindable({ set: booleanAttr })\n restoreFocus: boolean = true;\n\r\n @bindable\n anchor: Element | undefined;\n anchorChanged(newValue: Element | undefined, oldValue: Element | undefined): void {\n oldValue?.removeEventListener('pointerdown', this.onAnchorPointerDownCapture, true);\n newValue?.addEventListener('pointerdown', this.onAnchorPointerDownCapture, true);\n this.queuePositionUpdate();\n }\n\n @bindable\n tabReference: HTMLElement | undefined;\n\r\n @bindable\r\n placement: PopupPlacement = 'bottom-start';\r\n placementChanged(): void {\r\n this.queuePositionUpdate();\r\n }\r\n\r\n @bindable\r\n offset: number = 8;\r\n offsetChanged(): void {\r\n this.queuePositionUpdate();\r\n }\r\n\r\n @bindable\r\n portalTarget: string | Element | null | undefined;\r\n\r\n @bindable\n portalPosition: InsertPosition = 'beforeend';\n\n @bindable\n exposedHost: unknown;\n\n @bindable\n panelRole: string = 'dialog';\n\n @bindable\n panelId: string | undefined;\n\n panelStyle = this.hiddenPanelStyle;\n panelElement: HTMLElement | undefined;\n\n get effectiveSlotHost(): unknown {\n return this.exposedHost ?? this.slotHost;\n }\n\n attaching(): void {\n this.anchor?.addEventListener('pointerdown', this.onAnchorPointerDownCapture, true);\n if (this.open) {\n this.startOpenState();\n }\n }\n\n detaching(): void {\n this.anchor?.removeEventListener('pointerdown', this.onAnchorPointerDownCapture, true);\n this.stopOpenState();\n }\n\n private listening = false;\n private anchorRectSnapshot: DOMRect | undefined;\n private previousFocus: HTMLElement | undefined;\n private resizeObserver: ResizeObserver | undefined;\n private observedPanelHeight: number | undefined;\n private observedPanelScrollHeight: number | undefined;\n private mutationObserver: MutationObserver | undefined;\n private currentPlaceTop: boolean | undefined;\n private preservePlacementUpdate = false;\n\n private readonly onAnchorPointerDownCapture = (): void => {\n if (!this.anchor) {\n return;\n }\n\n this.anchorRectSnapshot = this.anchor.getBoundingClientRect();\n };\n\r\n private readonly onWindowPointerDown = (event: PointerEvent): void => {\r\n if (!this.open || !this.closeOnOutside) {\r\n return;\r\n }\r\n\r\n const target = event.target as Node | null;\r\n if (!target) {\r\n return;\r\n }\r\n\r\n if (this.panelElement?.contains(target) || this.anchor?.contains(target)) {\r\n return;\r\n }\r\n\r\n this.requestClose();\r\n };\r\n\r\n private readonly onWindowKeyDown = (event: KeyboardEvent): void => {\n if (!this.open) {\n return;\n }\n\n if (event.key === Keys.Tab && this.panelElement?.contains(event.target as Node | null)) {\n this.focusNextFromTabReference(event.shiftKey);\n event.preventDefault();\n return;\n }\n\n if (!this.closeOnEscape || event.key !== Keys.Escape) {\n return;\n }\n\n event.preventDefault();\n this.requestClose();\n };\n\r\n private readonly onWindowLayoutChange = (): void => {\r\n this.queuePositionUpdate();\r\n };\r\n\r\n private startOpenState(): void {\n this.previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : undefined;\n this.setListeners(true);\n this.observePanelSize();\n if (this.focusOnOpen) {\n this.focusPanel();\n }\n }\n\n private stopOpenState(): void {\n this.setListeners(false);\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n this.mutationObserver?.disconnect();\n this.mutationObserver = undefined;\n this.observedPanelHeight = undefined;\n this.observedPanelScrollHeight = undefined;\n this.currentPlaceTop = undefined;\n this.preservePlacementUpdate = false;\n this.anchorRectSnapshot = undefined;\n this.panelStyle = this.hiddenPanelStyle;\n if (this.restoreFocus) {\n this.restorePreviousFocus();\n }\n }\n\r\n private requestClose(): void {\n this.open = false;\n }\n\n onListSelect(event: Event): void {\n event.stopPropagation();\n this.element.dispatchEvent(new CustomEvent('list-select', {\n bubbles: true,\n detail: (event as CustomEvent).detail\n }));\n }\n\n focus(): void {\n this.focusPanel();\n }\n\n contains(target: Node): boolean {\n return !!this.panelElement?.contains(target);\n }\n\n private focusPanel(): void {\n const focusTarget = this.panelElement?.querySelector('[tabindex]') as HTMLElement | null;\n (focusTarget ?? this.panelElement)?.focus();\n }\n\n private restorePreviousFocus(): void {\n if (!this.previousFocus || !document.contains(this.previousFocus)) {\n this.previousFocus = undefined;\n return;\n }\n\n this.previousFocus.focus();\n this.previousFocus = undefined;\n }\n\n private focusNextFromTabReference(reverse: boolean): void {\n const reference = this.tabReference ?? this.anchor;\n if (!(reference instanceof HTMLElement)) {\n this.requestClose();\n return;\n }\n\n const focusable = this.getFocusableElements();\n const index = focusable.indexOf(reference);\n if (index < 0) {\n this.requestClose();\n return;\n }\n\n const target = focusable[index + (reverse ? -1 : 1)];\n\n this.element.dispatchEvent(new CustomEvent('popup-tab-away', {\n bubbles: true,\n detail: { reverse }\n }));\n this.requestClose();\n target?.focus();\n }\n\n private getFocusableElements(): HTMLElement[] {\n const selector = [\n 'a[href]',\n 'button',\n 'input:not([type=\"hidden\"])',\n 'select',\n 'textarea',\n 'iframe',\n '[tabindex]',\n '[contenteditable=\"true\"]'\n ].join(',');\n\n return Array.from(document.querySelectorAll<HTMLElement>(selector))\n .filter((element) => this.isFocusable(element));\n }\n\n private isFocusable(element: HTMLElement): boolean {\n if (this.panelElement?.contains(element)) {\n return false;\n }\n\n if (element.tabIndex < 0 || element.hasAttribute('disabled') || element.getAttribute('aria-hidden') === 'true') {\n return false;\n }\n\n const style = window.getComputedStyle(element);\n return style.display !== 'none' && style.visibility !== 'hidden';\n }\n\n private setListeners(listen: boolean): void {\n if (listen === this.listening) {\r\n return;\r\n }\r\n\r\n this.listening = listen;\r\n if (listen) {\r\n window.addEventListener('pointerdown', this.onWindowPointerDown, true);\r\n window.addEventListener('keydown', this.onWindowKeyDown, true);\r\n window.addEventListener('resize', this.onWindowLayoutChange);\r\n window.addEventListener('scroll', this.onWindowLayoutChange, true);\r\n return;\r\n }\r\n\r\n window.removeEventListener('pointerdown', this.onWindowPointerDown, true);\r\n window.removeEventListener('keydown', this.onWindowKeyDown, true);\r\n window.removeEventListener('resize', this.onWindowLayoutChange);\r\n window.removeEventListener('scroll', this.onWindowLayoutChange, true);\n }\n\n private observePanelSize(): void {\n this.resizeObserver?.disconnect();\n this.resizeObserver = undefined;\n this.mutationObserver?.disconnect();\n this.mutationObserver = undefined;\n this.observedPanelHeight = undefined;\n this.observedPanelScrollHeight = undefined;\n\n if (!this.open || !this.panelElement) {\n return;\n }\n\n this.resizeObserver = new ResizeObserver(([entry]) => {\n const height = entry.contentRect.height;\n if (this.observedPanelHeight === undefined) {\n this.observedPanelHeight = height;\n if (height > 0) {\n this.queuePositionUpdate();\n }\n return;\n }\n\n const preservePlacement = height <= this.observedPanelHeight;\n this.observedPanelHeight = height;\n this.queuePositionUpdate(preservePlacement);\n });\n this.resizeObserver.observe(this.panelElement);\n this.mutationObserver = new MutationObserver(() => this.handlePanelContentChange());\n this.mutationObserver.observe(this.panelElement, { childList: true, subtree: true, characterData: true });\n }\n\n private handlePanelContentChange(): void {\n if (!this.open || !this.panelElement) {\n return;\n }\n\n const scrollHeight = this.panelElement.scrollHeight;\n if (this.observedPanelScrollHeight === undefined) {\n this.observedPanelScrollHeight = scrollHeight;\n return;\n }\n\n const preservePlacement = scrollHeight <= this.observedPanelScrollHeight;\n this.observedPanelScrollHeight = scrollHeight;\n this.queuePositionUpdate(preservePlacement);\n }\n\n private queuePositionUpdate(preservePlacement = false): void {\n if (!this.open) {\n return;\n }\n\n this.preservePlacementUpdate = this.preservePlacementUpdate || preservePlacement;\n const shouldPreservePlacement = this.preservePlacementUpdate;\n this.preservePlacementUpdate = false;\n this.updatePosition(shouldPreservePlacement);\n }\n\n private updatePosition(preservePlacement = false): void {\n if (!this.open || !this.panelElement) {\n return;\n }\r\n\r\n if (!this.anchor) {\r\n this.panelStyle = this.hiddenPanelStyle;\r\n return;\r\n }\r\n\r\n const anchorRect = this.anchorRectSnapshot || this.anchor.getBoundingClientRect();\n this.anchorRectSnapshot = undefined;\n const panelRect = this.panelElement.getBoundingClientRect();\n this.observedPanelHeight = panelRect.height;\n this.observedPanelScrollHeight = this.panelElement.scrollHeight;\n const viewportPadding = 8;\n const alignEnd = this.placement.endsWith('end');\n const preferTop = this.placement.startsWith('top');\n const fallbackBottom = anchorRect.bottom + this.offset;\n const availableTop = Math.max(0, anchorRect.top - this.offset - viewportPadding);\n const availableBottom = Math.max(0, window.innerHeight - fallbackBottom - viewportPadding);\n const nextPlaceTop = preferTop\n ? panelRect.height <= availableTop || availableTop >= availableBottom\n : panelRect.height > availableBottom && availableTop > availableBottom;\n const placeTop = preservePlacement && this.currentPlaceTop !== undefined ? this.currentPlaceTop : nextPlaceTop;\n this.currentPlaceTop = placeTop;\n const availableHeight = placeTop ? availableTop : availableBottom;\n const panelHeight = Math.min(panelRect.height, availableHeight);\n\n let top = placeTop ? anchorRect.top - this.offset - panelHeight : fallbackBottom;\n top = Math.max(viewportPadding, Math.min(top, window.innerHeight - panelHeight - viewportPadding));\n\n let left = alignEnd ? anchorRect.right - panelRect.width : anchorRect.left;\n left = Math.max(viewportPadding, Math.min(left, window.innerWidth - panelRect.width - viewportPadding));\n\n const maxWidth = `max-width: calc(100vw - ${viewportPadding * 2}px);`;\n const maxHeight = `max-height: ${availableHeight}px; --ui-popup-available-height: ${availableHeight}px;`;\n const minWidth = this.matchAnchorWidth ? `min-width: min(${anchorRect.width}px, calc(100vw - ${viewportPadding * 2}px));` : '';\n this.panelStyle = `position: fixed; top: ${top}px; left: ${left}px; ${maxWidth} ${maxHeight} ${minWidth}`;\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template class="ui-progress"
|
|
2
|
+
role="progressbar"
|
|
3
|
+
aria-label.attr="label || null"
|
|
4
|
+
aria-valuemin="0"
|
|
5
|
+
aria-valuemax.attr="indeterminate ? null : normalizedMax"
|
|
6
|
+
aria-valuenow.attr="indeterminate ? null : normalizedValue"
|
|
7
|
+
aria-valuetext.attr="indeterminate ? 'Loading' : null"
|
|
8
|
+
data-circular.attr="circular ? '' : null"
|
|
9
|
+
data-indeterminate.attr="indeterminate ? '' : null">
|
|
10
|
+
<span class="ui-progress__track" aria-hidden="true" if.bind="!circular">
|
|
11
|
+
<span class="ui-progress__bar" style.bind="barStyle"></span>
|
|
12
|
+
</span>
|
|
13
|
+
<svg class="ui-progress__circle" viewBox="0 0 36 36" aria-hidden="true" if.bind="circular">
|
|
14
|
+
<circle class="ui-progress__circle-track" cx="18" cy="18" r="16" pathLength="100" fill="none"></circle>
|
|
15
|
+
<circle class="ui-progress__circle-bar" cx="18" cy="18" r="16" pathLength="100" fill="none" style.bind="circleStyle"></circle>
|
|
16
|
+
</svg>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
+
import { bindable, customElement } from 'aurelia';
|
|
3
|
+
import { booleanAttr } from '../base/boolean-attr';
|
|
4
|
+
import template from './ui-progress.html?raw';
|
|
5
|
+
let UiProgress = (() => {
|
|
6
|
+
let _classDecorators = [customElement({ name: 'ui-progress', template })];
|
|
7
|
+
let _classDescriptor;
|
|
8
|
+
let _classExtraInitializers = [];
|
|
9
|
+
let _classThis;
|
|
10
|
+
let _value_decorators;
|
|
11
|
+
let _value_initializers = [];
|
|
12
|
+
let _value_extraInitializers = [];
|
|
13
|
+
let _max_decorators;
|
|
14
|
+
let _max_initializers = [];
|
|
15
|
+
let _max_extraInitializers = [];
|
|
16
|
+
let _label_decorators;
|
|
17
|
+
let _label_initializers = [];
|
|
18
|
+
let _label_extraInitializers = [];
|
|
19
|
+
let _circular_decorators;
|
|
20
|
+
let _circular_initializers = [];
|
|
21
|
+
let _circular_extraInitializers = [];
|
|
22
|
+
var UiProgress = class {
|
|
23
|
+
static { _classThis = this; }
|
|
24
|
+
static {
|
|
25
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
26
|
+
_value_decorators = [bindable];
|
|
27
|
+
_max_decorators = [bindable];
|
|
28
|
+
_label_decorators = [bindable];
|
|
29
|
+
_circular_decorators = [bindable({ set: booleanAttr })];
|
|
30
|
+
__esDecorate(null, null, _value_decorators, { kind: "field", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
|
|
31
|
+
__esDecorate(null, null, _max_decorators, { kind: "field", name: "max", static: false, private: false, access: { has: obj => "max" in obj, get: obj => obj.max, set: (obj, value) => { obj.max = value; } }, metadata: _metadata }, _max_initializers, _max_extraInitializers);
|
|
32
|
+
__esDecorate(null, null, _label_decorators, { kind: "field", name: "label", static: false, private: false, access: { has: obj => "label" in obj, get: obj => obj.label, set: (obj, value) => { obj.label = value; } }, metadata: _metadata }, _label_initializers, _label_extraInitializers);
|
|
33
|
+
__esDecorate(null, null, _circular_decorators, { kind: "field", name: "circular", static: false, private: false, access: { has: obj => "circular" in obj, get: obj => obj.circular, set: (obj, value) => { obj.circular = value; } }, metadata: _metadata }, _circular_initializers, _circular_extraInitializers);
|
|
34
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
35
|
+
UiProgress = _classThis = _classDescriptor.value;
|
|
36
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
37
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
38
|
+
}
|
|
39
|
+
value = __runInitializers(this, _value_initializers, void 0);
|
|
40
|
+
valueChanged() {
|
|
41
|
+
this.updateState();
|
|
42
|
+
}
|
|
43
|
+
max = (__runInitializers(this, _value_extraInitializers), __runInitializers(this, _max_initializers, 100));
|
|
44
|
+
maxChanged() {
|
|
45
|
+
this.updateState();
|
|
46
|
+
}
|
|
47
|
+
label = (__runInitializers(this, _max_extraInitializers), __runInitializers(this, _label_initializers, void 0));
|
|
48
|
+
circular = (__runInitializers(this, _label_extraInitializers), __runInitializers(this, _circular_initializers, false));
|
|
49
|
+
indeterminate = (__runInitializers(this, _circular_extraInitializers), true);
|
|
50
|
+
normalizedMax = 100;
|
|
51
|
+
normalizedValue = 0;
|
|
52
|
+
barStyle;
|
|
53
|
+
circleStyle;
|
|
54
|
+
binding() {
|
|
55
|
+
this.updateState();
|
|
56
|
+
}
|
|
57
|
+
updateState() {
|
|
58
|
+
const max = Number(this.max);
|
|
59
|
+
this.normalizedMax = max > 0 ? max : 100;
|
|
60
|
+
this.indeterminate = this.value === undefined || this.value === null || Number.isNaN(Number(this.value));
|
|
61
|
+
if (this.indeterminate) {
|
|
62
|
+
this.normalizedValue = 0;
|
|
63
|
+
this.barStyle = undefined;
|
|
64
|
+
this.circleStyle = undefined;
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.normalizedValue = Math.max(0, Math.min(Number(this.value), this.normalizedMax));
|
|
68
|
+
const percent = this.normalizedValue / this.normalizedMax * 100;
|
|
69
|
+
this.barStyle = `width: ${percent}%`;
|
|
70
|
+
this.circleStyle = `stroke-dasharray: ${percent} 100`;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
return UiProgress = _classThis;
|
|
74
|
+
})();
|
|
75
|
+
export { UiProgress };
|
|
76
|
+
//# sourceMappingURL=ui-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-progress.js","sourceRoot":"","sources":["../../src/progress/ui-progress.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,QAAQ,MAAM,wBAAwB,CAAC;IAGjC,UAAU;4BADtB,aAAa,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;iCAE9C,QAAQ;+BAMR,QAAQ;iCAMR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;YACT,CAAC;YAED,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;YACrF,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC;YAChE,IAAI,CAAC,QAAQ,GAAG,UAAU,OAAO,GAAG,CAAC;YACrC,IAAI,CAAC,WAAW,GAAG,qBAAqB,OAAO,MAAM,CAAC;QACxD,CAAC;;;;SA5CU,UAAU","sourcesContent":["import { bindable, customElement } from 'aurelia';\nimport { booleanAttr } from '../base/boolean-attr';\nimport template from './ui-progress.html?raw';\n\n@customElement({ name: 'ui-progress', template })\nexport class UiProgress {\n @bindable\n value: number | undefined;\n valueChanged(): void {\n this.updateState();\n }\n\n @bindable\n max: number = 100;\n maxChanged(): void {\n this.updateState();\n }\n\n @bindable\n label: string | undefined;\n\n @bindable({ set: booleanAttr })\n circular: boolean = false;\n\n indeterminate = true;\n normalizedMax = 100;\n normalizedValue = 0;\n barStyle: string | undefined;\n circleStyle: string | undefined;\n\n binding(): void {\n this.updateState();\n }\n\n private updateState(): void {\n const max = Number(this.max);\n this.normalizedMax = max > 0 ? max : 100;\n this.indeterminate = this.value === undefined || this.value === null || Number.isNaN(Number(this.value));\n if (this.indeterminate) {\n this.normalizedValue = 0;\n this.barStyle = undefined;\n this.circleStyle = undefined;\n return;\n }\n\n this.normalizedValue = Math.max(0, Math.min(Number(this.value), this.normalizedMax));\n const percent = this.normalizedValue / this.normalizedMax * 100;\n this.barStyle = `width: ${percent}%`;\n this.circleStyle = `stroke-dasharray: ${percent} 100`;\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template class="ui-radio-group"
|
|
2
|
+
data-disabled.attr="disabled ? '' : null"
|
|
3
|
+
data-invalid.attr="invalid || errors.size ? '' : null"
|
|
4
|
+
data-focus.attr="focus ? '' : null">
|
|
5
|
+
<div class="ui-radio-group__label" id.bind="label ? labelId : null" show.bind="label">${label}</div>
|
|
6
|
+
|
|
7
|
+
<div class="ui-radio-group__control"
|
|
8
|
+
role="radiogroup"
|
|
9
|
+
aria-labelledby.bind="label ? labelId : null"
|
|
10
|
+
aria-invalid.bind="invalid || errors.size ? 'true' : 'false'"
|
|
11
|
+
aria-describedby.bind="errors.size ? errorsId : (helperNodes.length ? helperId : null)"
|
|
12
|
+
aria-required.attr="required ? 'true' : null"
|
|
13
|
+
focusin.trigger="onFocusIn()"
|
|
14
|
+
focusout.trigger="onFocusOut()">
|
|
15
|
+
<au-slot></au-slot>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="ui-radio-group__subscript" show.bind="errors.size || helperText || helperNodes.length">
|
|
19
|
+
<div class="ui-radio-group__helper" id.bind="helperId" show.bind="!errors.size && (helperText || helperNodes.length)">
|
|
20
|
+
<au-slot name="helper">${helperText}</au-slot>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div class="ui-radio-group__errors" id.bind="errorsId" show.bind="errors.size">
|
|
24
|
+
<div class="ui-radio-group__error" repeat.for="[error, _] of errors" if.bind="error.message">${error.message}</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|