openproject-primer_view_components 0.82.1 → 0.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_bar_element.js +68 -77
- data/app/components/primer/alpha/action_bar_element.ts +48 -70
- data/app/components/primer/alpha/action_list.js +1 -1
- data/app/components/primer/alpha/action_list.ts +1 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.js +1 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +1 -1
- data/app/components/primer/alpha/action_menu/menu.rb +5 -1
- data/app/components/primer/alpha/action_menu/primary_menu.rb +4 -0
- data/app/components/primer/alpha/action_menu/sub_menu.rb +4 -0
- data/app/components/primer/alpha/banner.css +1 -1
- data/app/components/primer/alpha/banner.css.json +0 -1
- data/app/components/primer/alpha/banner.css.map +1 -1
- data/app/components/primer/alpha/banner.pcss +1 -5
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.json +2 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.pcss +12 -0
- data/app/components/primer/alpha/layout.rb +6 -2
- data/app/components/primer/alpha/overlay.rb +14 -1
- data/app/components/primer/alpha/segmented_control.js +1 -1
- data/app/components/primer/alpha/segmented_control.ts +1 -1
- data/app/components/primer/alpha/select_panel_element.js +3 -1
- data/app/components/primer/alpha/select_panel_element.ts +4 -1
- data/app/components/primer/alpha/toggle_switch.js +1 -1
- data/app/components/primer/alpha/toggle_switch.rb +3 -0
- data/app/components/primer/alpha/toggle_switch.ts +1 -1
- data/app/components/primer/alpha/tool_tip.js +1 -1
- data/app/components/primer/alpha/tool_tip.ts +1 -1
- data/app/components/primer/alpha/tree_view/tree_view.js +1 -1
- data/app/components/primer/alpha/tree_view/tree_view.ts +1 -1
- data/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.js +1 -1
- data/app/components/primer/alpha/tree_view/tree_view_icon_pair_element.ts +1 -1
- data/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.js +1 -1
- data/app/components/primer/alpha/tree_view/tree_view_include_fragment_element.ts +1 -1
- data/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.js +25 -2
- data/app/components/primer/alpha/tree_view/tree_view_sub_tree_node_element.ts +27 -1
- data/app/components/primer/alpha/x_banner.js +1 -1
- data/app/components/primer/alpha/x_banner.ts +1 -1
- data/app/components/primer/beta/auto_complete/no_result_item.rb +23 -13
- data/app/components/primer/beta/blankslate.css +1 -1
- data/app/components/primer/beta/blankslate.css.json +1 -0
- data/app/components/primer/beta/blankslate.css.map +1 -1
- data/app/components/primer/beta/blankslate.pcss +5 -0
- data/app/components/primer/beta/blankslate.rb +1 -0
- data/app/components/primer/beta/details_toggle_element.js +1 -1
- data/app/components/primer/beta/details_toggle_element.ts +1 -1
- data/app/components/primer/beta/nav_list.js +1 -1
- data/app/components/primer/beta/nav_list.ts +1 -1
- data/app/components/primer/beta/nav_list_group_element.js +1 -1
- data/app/components/primer/beta/nav_list_group_element.ts +1 -1
- data/app/components/primer/dialog_helper.js +24 -9
- data/app/components/primer/dialog_helper.ts +24 -12
- data/app/components/primer/scrollable_region.js +1 -1
- data/app/components/primer/scrollable_region.ts +1 -1
- data/app/lib/primer/forms/primer_multi_input.js +1 -1
- data/app/lib/primer/forms/primer_multi_input.ts +1 -1
- data/app/lib/primer/forms/primer_text_area.js +1 -1
- data/app/lib/primer/forms/primer_text_area.ts +1 -1
- data/app/lib/primer/forms/primer_text_field.js +1 -1
- data/app/lib/primer/forms/primer_text_field.ts +1 -1
- data/app/lib/primer/forms/toggle_switch_input.js +1 -1
- data/app/lib/primer/forms/toggle_switch_input.ts +1 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/action_menu_preview/sub_menus.html.erb +2 -2
- data/previews/primer/alpha/action_menu_preview.rb +35 -1
- data/previews/primer/beta/button_preview/summary_as_button.html.erb +0 -1
- data/previews/primer/beta/truncate_preview/advanced_multiple_items.html.erb +32 -0
- data/previews/primer/beta/truncate_preview/max_widths.html.erb +22 -0
- data/previews/primer/beta/truncate_preview/multiple_items.html.erb +14 -0
- data/previews/primer/beta/truncate_preview.rb +3 -26
- data/static/arguments.json +38 -1
- data/static/classes.json +3 -0
- data/static/constants.json +17 -0
- data/static/info_arch.json +77 -58
- data/static/previews.json +13 -0
- metadata +5 -2
|
@@ -15,7 +15,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
15
15
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
16
16
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17
17
|
};
|
|
18
|
-
var _ActionBarElement_instances, _ActionBarElement_focusZoneAbortController, _ActionBarElement_firstItem_get, _ActionBarElement_showItem, _ActionBarElement_hideItem, _ActionBarElement_menuItems_get
|
|
18
|
+
var _ActionBarElement_instances, _ActionBarElement_focusZoneAbortController, _ActionBarElement_pendingUpdate, _ActionBarElement_performUpdate, _ActionBarElement_firstItem_get, _ActionBarElement_showItem, _ActionBarElement_hideItem, _ActionBarElement_menuItems_get;
|
|
19
19
|
import { controller, targets, target } from '@github/catalyst';
|
|
20
20
|
import { focusZone, FocusKeys } from '@primer/behaviors';
|
|
21
21
|
const instersectionObserver = new IntersectionObserver(entries => {
|
|
@@ -35,27 +35,21 @@ const resizeObserver = new ResizeObserver(entries => {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
// These are definitely used, but eslint is dumb apparently
|
|
38
|
-
var ItemType;
|
|
39
|
-
(function (ItemType) {
|
|
40
|
-
ItemType[ItemType["Item"] = 0] = "Item";
|
|
41
|
-
ItemType[ItemType["Divider"] = 1] = "Divider";
|
|
42
|
-
})(ItemType || (ItemType = {}));
|
|
43
38
|
let ActionBarElement = class ActionBarElement extends HTMLElement {
|
|
44
39
|
constructor() {
|
|
45
40
|
super(...arguments);
|
|
46
41
|
_ActionBarElement_instances.add(this);
|
|
47
42
|
_ActionBarElement_focusZoneAbortController.set(this, null);
|
|
43
|
+
_ActionBarElement_pendingUpdate.set(this, false);
|
|
48
44
|
}
|
|
49
45
|
connectedCallback() {
|
|
50
46
|
resizeObserver.observe(this);
|
|
51
47
|
instersectionObserver.observe(this);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.update();
|
|
58
|
-
});
|
|
48
|
+
// This overflow visible is needed for browsers that don't support PopoverElement
|
|
49
|
+
// to ensure the menu and tooltips are visible when the action bar is in a collapsed state
|
|
50
|
+
// once popover is fully supported we can remove this.style.overflow = 'visible'
|
|
51
|
+
this.style.overflow = 'visible';
|
|
52
|
+
this.update();
|
|
59
53
|
}
|
|
60
54
|
disconnectedCallback() {
|
|
61
55
|
resizeObserver.unobserve(this);
|
|
@@ -69,75 +63,81 @@ let ActionBarElement = class ActionBarElement extends HTMLElement {
|
|
|
69
63
|
}
|
|
70
64
|
}
|
|
71
65
|
update() {
|
|
72
|
-
|
|
73
|
-
if (!firstItem)
|
|
66
|
+
if (__classPrivateFieldGet(this, _ActionBarElement_pendingUpdate, "f"))
|
|
74
67
|
return;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (type === ItemType.Item) {
|
|
80
|
-
if (itemTop > firstItemTop) {
|
|
81
|
-
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_hideItem).call(this, index);
|
|
82
|
-
if (this.moreMenu.hidden) {
|
|
83
|
-
this.moreMenu.hidden = false;
|
|
84
|
-
}
|
|
85
|
-
if (previousItemType === ItemType.Divider) {
|
|
86
|
-
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_hideItem).call(this, index - 1);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_showItem).call(this, index);
|
|
91
|
-
if (index === this.items.length - 1) {
|
|
92
|
-
this.moreMenu.hidden = true;
|
|
93
|
-
}
|
|
94
|
-
if (previousItemType === ItemType.Divider) {
|
|
95
|
-
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_showItem).call(this, index - 1);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
previousItemType = type;
|
|
100
|
-
return true;
|
|
68
|
+
__classPrivateFieldSet(this, _ActionBarElement_pendingUpdate, true, "f");
|
|
69
|
+
requestAnimationFrame(() => {
|
|
70
|
+
__classPrivateFieldSet(this, _ActionBarElement_pendingUpdate, false, "f");
|
|
71
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_performUpdate).call(this);
|
|
101
72
|
});
|
|
102
|
-
if (__classPrivateFieldGet(this, _ActionBarElement_focusZoneAbortController, "f")) {
|
|
103
|
-
__classPrivateFieldGet(this, _ActionBarElement_focusZoneAbortController, "f").abort();
|
|
104
|
-
}
|
|
105
|
-
__classPrivateFieldSet(this, _ActionBarElement_focusZoneAbortController, focusZone(this, {
|
|
106
|
-
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
107
|
-
focusOutBehavior: 'wrap',
|
|
108
|
-
focusableElementFilter: element => {
|
|
109
|
-
const idx = this.items.indexOf(element.parentElement);
|
|
110
|
-
const elementIsVisibleItem = idx > -1 && this.items[idx].style.visibility === 'visible';
|
|
111
|
-
const elementIsVisibleActionMenuInvoker = element === this.moreMenu.invokerElement && !this.moreMenu.hidden;
|
|
112
|
-
return elementIsVisibleItem || elementIsVisibleActionMenuInvoker;
|
|
113
|
-
},
|
|
114
|
-
}), "f");
|
|
115
73
|
}
|
|
116
74
|
};
|
|
117
75
|
_ActionBarElement_focusZoneAbortController = new WeakMap();
|
|
76
|
+
_ActionBarElement_pendingUpdate = new WeakMap();
|
|
118
77
|
_ActionBarElement_instances = new WeakSet();
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
78
|
+
_ActionBarElement_performUpdate = function _ActionBarElement_performUpdate() {
|
|
79
|
+
const firstItem = __classPrivateFieldGet(this, _ActionBarElement_instances, "a", _ActionBarElement_firstItem_get);
|
|
80
|
+
if (!firstItem)
|
|
81
|
+
return;
|
|
82
|
+
const baseTop = firstItem.getBoundingClientRect().top;
|
|
83
|
+
const cachedMenuItems = __classPrivateFieldGet(this, _ActionBarElement_instances, "a", _ActionBarElement_menuItems_get);
|
|
84
|
+
// Snapshot geometry in one pass before mutating the DOM
|
|
85
|
+
const snapshots = Array.from(this.items, el => ({
|
|
86
|
+
top: el.getBoundingClientRect().top,
|
|
87
|
+
isDivider: el.classList.contains('ActionBar-divider'),
|
|
88
|
+
}));
|
|
89
|
+
// Apply visibility changes after all reads are complete
|
|
90
|
+
let prevWasDivider = false;
|
|
91
|
+
for (let n = 0; n < snapshots.length; n++) {
|
|
92
|
+
const snap = snapshots[n];
|
|
93
|
+
if (snap.isDivider) {
|
|
94
|
+
prevWasDivider = true;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (snap.top > baseTop) {
|
|
98
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_hideItem).call(this, n, cachedMenuItems);
|
|
99
|
+
if (this.moreMenu.hidden)
|
|
100
|
+
this.moreMenu.hidden = false;
|
|
101
|
+
if (prevWasDivider)
|
|
102
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_hideItem).call(this, n - 1, cachedMenuItems);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_showItem).call(this, n, cachedMenuItems);
|
|
106
|
+
if (n === this.items.length - 1)
|
|
107
|
+
this.moreMenu.hidden = true;
|
|
108
|
+
if (prevWasDivider)
|
|
109
|
+
__classPrivateFieldGet(this, _ActionBarElement_instances, "m", _ActionBarElement_showItem).call(this, n - 1, cachedMenuItems);
|
|
125
110
|
}
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
111
|
+
prevWasDivider = false;
|
|
112
|
+
}
|
|
113
|
+
if (__classPrivateFieldGet(this, _ActionBarElement_focusZoneAbortController, "f")) {
|
|
114
|
+
__classPrivateFieldGet(this, _ActionBarElement_focusZoneAbortController, "f").abort();
|
|
115
|
+
}
|
|
116
|
+
__classPrivateFieldSet(this, _ActionBarElement_focusZoneAbortController, focusZone(this, {
|
|
117
|
+
bindKeys: FocusKeys.ArrowHorizontal | FocusKeys.HomeAndEnd,
|
|
118
|
+
focusOutBehavior: 'wrap',
|
|
119
|
+
focusableElementFilter: element => {
|
|
120
|
+
const idx = this.items.indexOf(element.parentElement);
|
|
121
|
+
const elementIsVisibleItem = idx > -1 && this.items[idx].style.visibility === 'visible';
|
|
122
|
+
const elementIsVisibleActionMenuInvoker = element === this.moreMenu.invokerElement && !this.moreMenu.hidden;
|
|
123
|
+
return elementIsVisibleItem || elementIsVisibleActionMenuInvoker;
|
|
124
|
+
},
|
|
125
|
+
}), "f");
|
|
126
|
+
};
|
|
127
|
+
_ActionBarElement_firstItem_get = function _ActionBarElement_firstItem_get() {
|
|
128
|
+
return this.items.find(el => !el.classList.contains('ActionBar-divider')) ?? null;
|
|
129
129
|
};
|
|
130
|
-
_ActionBarElement_showItem = function _ActionBarElement_showItem(index) {
|
|
130
|
+
_ActionBarElement_showItem = function _ActionBarElement_showItem(index, menuItems) {
|
|
131
131
|
const item = this.items[index];
|
|
132
|
-
const menuItem =
|
|
132
|
+
const menuItem = menuItems[index];
|
|
133
133
|
if (!item || !menuItem)
|
|
134
134
|
return;
|
|
135
135
|
item.style.setProperty('visibility', 'visible');
|
|
136
136
|
menuItem.hidden = true;
|
|
137
137
|
};
|
|
138
|
-
_ActionBarElement_hideItem = function _ActionBarElement_hideItem(index) {
|
|
138
|
+
_ActionBarElement_hideItem = function _ActionBarElement_hideItem(index, menuItems) {
|
|
139
139
|
const item = this.items[index];
|
|
140
|
-
const menuItem =
|
|
140
|
+
const menuItem = menuItems[index];
|
|
141
141
|
if (!item || !menuItem)
|
|
142
142
|
return;
|
|
143
143
|
item.style.setProperty('visibility', 'hidden');
|
|
@@ -146,15 +146,6 @@ _ActionBarElement_hideItem = function _ActionBarElement_hideItem(index) {
|
|
|
146
146
|
_ActionBarElement_menuItems_get = function _ActionBarElement_menuItems_get() {
|
|
147
147
|
return this.moreMenu.querySelectorAll('[role="menu"] > li');
|
|
148
148
|
};
|
|
149
|
-
_ActionBarElement_eachItem = function _ActionBarElement_eachItem(callback) {
|
|
150
|
-
for (let i = 0; i < this.items.length; i++) {
|
|
151
|
-
const item = this.items[i];
|
|
152
|
-
const type = item.classList.contains('ActionBar-divider') ? ItemType.Divider : ItemType.Item;
|
|
153
|
-
if (!callback(item, i, type)) {
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
149
|
__decorate([
|
|
159
150
|
targets
|
|
160
151
|
], ActionBarElement.prototype, "items", void 0);
|
|
@@ -165,6 +156,6 @@ __decorate([
|
|
|
165
156
|
target
|
|
166
157
|
], ActionBarElement.prototype, "moreMenu", void 0);
|
|
167
158
|
ActionBarElement = __decorate([
|
|
168
|
-
controller
|
|
159
|
+
controller('action-bar')
|
|
169
160
|
], ActionBarElement);
|
|
170
161
|
window.ActionBarElement = ActionBarElement;
|
|
@@ -22,30 +22,24 @@ const resizeObserver = new ResizeObserver(entries => {
|
|
|
22
22
|
|
|
23
23
|
// These are definitely used, but eslint is dumb apparently
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
Item,
|
|
27
|
-
Divider,
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@controller
|
|
25
|
+
@controller('action-bar')
|
|
31
26
|
class ActionBarElement extends HTMLElement {
|
|
32
27
|
@targets items: HTMLElement[]
|
|
33
28
|
@target itemContainer: HTMLElement
|
|
34
29
|
@target moreMenu: ActionMenuElement
|
|
35
30
|
|
|
36
31
|
#focusZoneAbortController: AbortController | null = null
|
|
32
|
+
#pendingUpdate = false
|
|
37
33
|
|
|
38
34
|
connectedCallback() {
|
|
39
35
|
resizeObserver.observe(this)
|
|
40
36
|
instersectionObserver.observe(this)
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.update()
|
|
48
|
-
})
|
|
38
|
+
// This overflow visible is needed for browsers that don't support PopoverElement
|
|
39
|
+
// to ensure the menu and tooltips are visible when the action bar is in a collapsed state
|
|
40
|
+
// once popover is fully supported we can remove this.style.overflow = 'visible'
|
|
41
|
+
this.style.overflow = 'visible'
|
|
42
|
+
this.update()
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
disconnectedCallback() {
|
|
@@ -64,43 +58,48 @@ class ActionBarElement extends HTMLElement {
|
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
update() {
|
|
61
|
+
if (this.#pendingUpdate) return
|
|
62
|
+
this.#pendingUpdate = true
|
|
63
|
+
requestAnimationFrame(() => {
|
|
64
|
+
this.#pendingUpdate = false
|
|
65
|
+
this.#performUpdate()
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#performUpdate() {
|
|
67
70
|
const firstItem = this.#firstItem
|
|
68
71
|
if (!firstItem) return
|
|
69
72
|
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
} else {
|
|
88
|
-
this.#showItem(index)
|
|
89
|
-
|
|
90
|
-
if (index === this.items.length - 1) {
|
|
91
|
-
this.moreMenu.hidden = true
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (previousItemType === ItemType.Divider) {
|
|
95
|
-
this.#showItem(index - 1)
|
|
96
|
-
}
|
|
97
|
-
}
|
|
73
|
+
const baseTop = firstItem.getBoundingClientRect().top
|
|
74
|
+
const cachedMenuItems = this.#menuItems
|
|
75
|
+
|
|
76
|
+
// Snapshot geometry in one pass before mutating the DOM
|
|
77
|
+
const snapshots = Array.from(this.items, el => ({
|
|
78
|
+
top: el.getBoundingClientRect().top,
|
|
79
|
+
isDivider: el.classList.contains('ActionBar-divider'),
|
|
80
|
+
}))
|
|
81
|
+
|
|
82
|
+
// Apply visibility changes after all reads are complete
|
|
83
|
+
let prevWasDivider = false
|
|
84
|
+
for (let n = 0; n < snapshots.length; n++) {
|
|
85
|
+
const snap = snapshots[n]
|
|
86
|
+
if (snap.isDivider) {
|
|
87
|
+
prevWasDivider = true
|
|
88
|
+
continue
|
|
98
89
|
}
|
|
99
90
|
|
|
100
|
-
|
|
91
|
+
if (snap.top > baseTop) {
|
|
92
|
+
this.#hideItem(n, cachedMenuItems)
|
|
93
|
+
if (this.moreMenu.hidden) this.moreMenu.hidden = false
|
|
94
|
+
if (prevWasDivider) this.#hideItem(n - 1, cachedMenuItems)
|
|
95
|
+
} else {
|
|
96
|
+
this.#showItem(n, cachedMenuItems)
|
|
97
|
+
if (n === this.items.length - 1) this.moreMenu.hidden = true
|
|
98
|
+
if (prevWasDivider) this.#showItem(n - 1, cachedMenuItems)
|
|
99
|
+
}
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
}
|
|
101
|
+
prevWasDivider = false
|
|
102
|
+
}
|
|
104
103
|
|
|
105
104
|
if (this.#focusZoneAbortController) {
|
|
106
105
|
this.#focusZoneAbortController.abort()
|
|
@@ -119,31 +118,20 @@ class ActionBarElement extends HTMLElement {
|
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
get #firstItem(): HTMLElement | null {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
this.#eachItem((item: HTMLElement, _index: number, type: ItemType): boolean => {
|
|
125
|
-
if (type === ItemType.Item) {
|
|
126
|
-
foundItem = item
|
|
127
|
-
return false
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return true
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
return foundItem
|
|
121
|
+
return this.items.find(el => !el.classList.contains('ActionBar-divider')) ?? null
|
|
134
122
|
}
|
|
135
123
|
|
|
136
|
-
#showItem(index: number) {
|
|
124
|
+
#showItem(index: number, menuItems: NodeListOf<HTMLElement>) {
|
|
137
125
|
const item = this.items[index]
|
|
138
|
-
const menuItem =
|
|
126
|
+
const menuItem = menuItems[index]
|
|
139
127
|
if (!item || !menuItem) return
|
|
140
128
|
item.style.setProperty('visibility', 'visible')
|
|
141
129
|
menuItem.hidden = true
|
|
142
130
|
}
|
|
143
131
|
|
|
144
|
-
#hideItem(index: number) {
|
|
132
|
+
#hideItem(index: number, menuItems: NodeListOf<HTMLElement>) {
|
|
145
133
|
const item = this.items[index]
|
|
146
|
-
const menuItem =
|
|
134
|
+
const menuItem = menuItems[index]
|
|
147
135
|
if (!item || !menuItem) return
|
|
148
136
|
item.style.setProperty('visibility', 'hidden')
|
|
149
137
|
menuItem.hidden = false
|
|
@@ -152,16 +140,6 @@ class ActionBarElement extends HTMLElement {
|
|
|
152
140
|
get #menuItems(): NodeListOf<HTMLElement> {
|
|
153
141
|
return this.moreMenu.querySelectorAll('[role="menu"] > li')
|
|
154
142
|
}
|
|
155
|
-
|
|
156
|
-
#eachItem(callback: (item: HTMLElement, index: number, type: ItemType) => boolean): void {
|
|
157
|
-
for (let i = 0; i < this.items.length; i++) {
|
|
158
|
-
const item = this.items[i]
|
|
159
|
-
const type = item.classList.contains('ActionBar-divider') ? ItemType.Divider : ItemType.Item
|
|
160
|
-
if (!callback(item, i, type)) {
|
|
161
|
-
break
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
143
|
}
|
|
166
144
|
|
|
167
145
|
declare global {
|
|
@@ -65,6 +65,6 @@ let ActionListElement = class ActionListElement extends HTMLElement {
|
|
|
65
65
|
};
|
|
66
66
|
_ActionListElement_truncationObserver = new WeakMap();
|
|
67
67
|
ActionListElement = __decorate([
|
|
68
|
-
controller
|
|
68
|
+
controller('action-list')
|
|
69
69
|
], ActionListElement);
|
|
70
70
|
export { ActionListElement };
|
|
@@ -582,7 +582,7 @@ __decorate([
|
|
|
582
582
|
target
|
|
583
583
|
], ActionMenuElement.prototype, "list", void 0);
|
|
584
584
|
ActionMenuElement = ActionMenuElement_1 = __decorate([
|
|
585
|
-
controller
|
|
585
|
+
controller('action-menu')
|
|
586
586
|
], ActionMenuElement);
|
|
587
587
|
export { ActionMenuElement };
|
|
588
588
|
if (!window.customElements.get('action-menu')) {
|
|
@@ -16,7 +16,7 @@ module Primer
|
|
|
16
16
|
DEFAULT_SELECT_VARIANT
|
|
17
17
|
].freeze
|
|
18
18
|
|
|
19
|
-
attr_reader :menu_id, :anchor_side, :anchor_align, :list, :preload, :src, :select_variant, :form_arguments
|
|
19
|
+
attr_reader :menu_id, :anchor_side, :anchor_align, :anchor_when_narrow, :list, :preload, :src, :select_variant, :form_arguments
|
|
20
20
|
|
|
21
21
|
delegate :with_item, :with_avatar_item, :with_divider, :with_group, :items, :acts_as_form_input?, to: :@list
|
|
22
22
|
|
|
@@ -55,6 +55,7 @@ module Primer
|
|
|
55
55
|
|
|
56
56
|
# @param anchor_align [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_ALIGN_OPTIONS) %>
|
|
57
57
|
# @param anchor_side [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_SIDE_OPTIONS) %>
|
|
58
|
+
# @param anchor_when_narrow [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_WHEN_NARROW_OPTIONS) %>
|
|
58
59
|
# @param menu_id [String] Id of the menu.
|
|
59
60
|
# @param size [Symbol] <%= one_of(Primer::Alpha::Overlay::SIZE_OPTIONS) %>
|
|
60
61
|
# @param src [String] Used with an `include-fragment` element to load menu content from the given source URL.
|
|
@@ -67,6 +68,7 @@ module Primer
|
|
|
67
68
|
def initialize(
|
|
68
69
|
anchor_align:,
|
|
69
70
|
anchor_side:,
|
|
71
|
+
anchor_when_narrow:,
|
|
70
72
|
menu_id: self.class.generate_id,
|
|
71
73
|
size: Primer::Alpha::Overlay::DEFAULT_SIZE,
|
|
72
74
|
src: nil,
|
|
@@ -82,6 +84,7 @@ module Primer
|
|
|
82
84
|
@preload = fetch_or_fallback_boolean(preload, DEFAULT_PRELOAD)
|
|
83
85
|
@anchor_side = anchor_side
|
|
84
86
|
@anchor_align = anchor_align
|
|
87
|
+
@anchor_when_narrow = anchor_when_narrow
|
|
85
88
|
|
|
86
89
|
@select_variant = fetch_or_fallback(SELECT_VARIANT_OPTIONS, select_variant, DEFAULT_SELECT_VARIANT)
|
|
87
90
|
@form_arguments = form_arguments
|
|
@@ -98,6 +101,7 @@ module Primer
|
|
|
98
101
|
visually_hide_title: true,
|
|
99
102
|
anchor_align: anchor_align,
|
|
100
103
|
anchor_side: anchor_side,
|
|
104
|
+
anchor_when_narrow: anchor_when_narrow,
|
|
101
105
|
size: size,
|
|
102
106
|
**overlay_arguments
|
|
103
107
|
)
|
|
@@ -9,6 +9,7 @@ module Primer
|
|
|
9
9
|
class PrimaryMenu < Menu
|
|
10
10
|
DEFAULT_ANCHOR_ALIGN = :start
|
|
11
11
|
DEFAULT_ANCHOR_SIDE = :outside_bottom
|
|
12
|
+
DEFAULT_ANCHOR_WHEN_NARROW = :inherit
|
|
12
13
|
|
|
13
14
|
attr_reader :dynamic_label, :dynamic_label_prefix
|
|
14
15
|
|
|
@@ -45,12 +46,14 @@ module Primer
|
|
|
45
46
|
|
|
46
47
|
# @param anchor_align [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_ALIGN_OPTIONS) %>
|
|
47
48
|
# @param anchor_side [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_SIDE_OPTIONS) %>
|
|
49
|
+
# @param anchor_when_narrow [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_WHEN_NARROW_OPTIONS) %>.
|
|
48
50
|
# @param dynamic_label [Boolean] Whether or not to display the text of the currently selected item in the show button.
|
|
49
51
|
# @param dynamic_label_prefix [String] If provided, the prefix is prepended to the dynamic label and displayed in the show button.
|
|
50
52
|
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>.
|
|
51
53
|
def initialize(
|
|
52
54
|
anchor_align: DEFAULT_ANCHOR_ALIGN,
|
|
53
55
|
anchor_side: DEFAULT_ANCHOR_SIDE,
|
|
56
|
+
anchor_when_narrow: DEFAULT_ANCHOR_WHEN_NARROW,
|
|
54
57
|
dynamic_label: false,
|
|
55
58
|
dynamic_label_prefix: nil,
|
|
56
59
|
**system_arguments
|
|
@@ -68,6 +71,7 @@ module Primer
|
|
|
68
71
|
super(
|
|
69
72
|
anchor_align: anchor_align,
|
|
70
73
|
anchor_side: anchor_side,
|
|
74
|
+
anchor_when_narrow: anchor_when_narrow,
|
|
71
75
|
**system_arguments
|
|
72
76
|
)
|
|
73
77
|
end
|
|
@@ -9,6 +9,7 @@ module Primer
|
|
|
9
9
|
class SubMenu < Menu
|
|
10
10
|
DEFAULT_ANCHOR_ALIGN = :start
|
|
11
11
|
DEFAULT_ANCHOR_SIDE = :outside_right
|
|
12
|
+
DEFAULT_ANCHOR_WHEN_NARROW = :inherit
|
|
12
13
|
|
|
13
14
|
# @!parse
|
|
14
15
|
# # Adds an item to the menu.
|
|
@@ -44,12 +45,14 @@ module Primer
|
|
|
44
45
|
# @param menu_id [String] Id of the menu.
|
|
45
46
|
# @param anchor_align [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_ALIGN_OPTIONS) %>
|
|
46
47
|
# @param anchor_side [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_SIDE_OPTIONS) %>
|
|
48
|
+
# @param anchor_when_narrow [Symbol] <%= one_of(Primer::Alpha::Overlay::ANCHOR_WHEN_NARROW_OPTIONS) %>.
|
|
47
49
|
# @param overlay_arguments [Hash] Arguments to pass to the underlying <%= link_to_component(Primer::Alpha::Overlay) %>
|
|
48
50
|
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>.
|
|
49
51
|
def initialize(
|
|
50
52
|
menu_id: self.class.generate_id,
|
|
51
53
|
anchor_align: DEFAULT_ANCHOR_ALIGN,
|
|
52
54
|
anchor_side: DEFAULT_ANCHOR_SIDE,
|
|
55
|
+
anchor_when_narrow: DEFAULT_ANCHOR_WHEN_NARROW,
|
|
53
56
|
overlay_arguments: {},
|
|
54
57
|
**system_arguments
|
|
55
58
|
)
|
|
@@ -64,6 +67,7 @@ module Primer
|
|
|
64
67
|
super(
|
|
65
68
|
anchor_align: anchor_align, # carry over to sub-menus
|
|
66
69
|
anchor_side: anchor_side, # carry over to sub-menus
|
|
70
|
+
anchor_when_narrow: anchor_when_narrow, # carry over to sub-menus
|
|
67
71
|
**system_arguments,
|
|
68
72
|
&block
|
|
69
73
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
.Banner{background-image:linear-gradient(var(--bgColor-accent-muted),var(--bgColor-accent-muted));border:var(--borderWidth-thin) solid var(--borderColor-accent-muted);border-radius:var(--borderRadius-medium);color:var(--fgColor-default);display:grid;grid-auto-flow:column;grid-template-areas:"visual message actions close";grid-template-columns:min-content 1fr minmax(0,auto) min-content;grid-template-rows:min-content;padding:var(--base-size-8);position:relative}@media (max-width:543.98px){.Banner{grid-template-areas:"visual message close" ". actions actions";grid-template-columns:min-content 1fr min-content;grid-template-rows:min-content min-content}.Banner .Banner-actions{margin:var(--base-size-8) 0 0 var(--base-size-8)}}.Banner .Banner-visual{align-self:start;display:grid;grid-area:visual;padding:var(--base-size-6) var(--base-size-8)}:is(.Banner .Banner-visual)>.octicon{margin-block:calc(var(--base-size-4)/2)}:is(.Banner .Banner-visual)>*{align-self:center}.Banner .Banner-message{align-self:center;grid-area:message;padding:var(--base-size-6) var(--base-size-8)}:is(.Banner .Banner-message) p:last-child{margin-bottom:0}:is(.Banner .Banner-message) .Banner-title:not(:only-child){font-weight:var(--base-text-weight-semibold);margin-bottom:0}.Banner .Banner-actions{grid-area:actions}:is(.Banner .Banner-actions):last-child{align-self:center}.Banner .Banner-close{grid-area:close;margin-left:var(--controlStack-medium-gap-condensed)}.Banner .Banner-visual .octicon{color:var(--fgColor-accent)}.Banner.Banner--warning{background-image:linear-gradient(var(--bgColor-attention-muted),var(--bgColor-attention-muted));border-color:var(--borderColor-attention-muted);color:var(--fgColor-default)}.Banner.Banner--warning .Banner-visual .octicon{color:var(--fgColor-attention)}.Banner.Banner--error{background-image:linear-gradient(var(--bgColor-danger-muted),var(--bgColor-danger-muted));border-color:var(--borderColor-danger-muted);color:var(--fgColor-default)}.Banner.Banner--error .Banner-visual .octicon{color:var(--fgColor-danger)}.Banner.Banner--success{background-image:linear-gradient(var(--bgColor-success-muted),var(--bgColor-success-muted));border-color:var(--borderColor-success-muted);color:var(--fgColor-default)}.Banner.Banner--success .Banner-visual .octicon{color:var(--fgColor-success)}.Banner.Banner--upsell{background-image:linear-gradient(var(--bgColor-done-muted),var(--bgColor-done-muted));border-color:var(--borderColor-done-muted);color:var(--fgColor-default)}.Banner.Banner--upsell .Banner-visual .octicon{color:var(--fgColor-done)}.Banner.Banner--full{border-left:0;border-radius:0;border-right:0;margin-top:calc(var(--borderWidth-thin)*-1)}@media (max-width:767.98px){.Banner.Banner--full-whenNarrow{border-left:0;border-radius:0;border-right:0;margin-top:calc(var(--borderWidth-thin)*-1)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["banner.pcss"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["banner.pcss"],"names":[],"mappings":"AAEA,QAKE,yFAA2F,CAC3F,oEAAqE,CACrE,wCAAyC,CAHzC,4BAA6B,CAF7B,YAAa,CAMb,qBAAsB,CACtB,kDAAmD,CACnD,gEAAkE,CAClE,8BAA+B,CAR/B,0BAA2B,CAF3B,iBAwIF,CA3HE,4BAdF,QAeI,8DAEqB,CACrB,iDAAkD,CAClD,0CAsHJ,CApHI,wBACE,gDACF,CACF,CAIA,uBAIE,gBAAiB,CAHjB,YAAa,CAEb,gBAAiB,CADjB,6CAWF,CAPE,qCACE,uCACF,CAEA,8BACE,iBACF,CAGF,wBAGE,iBAAkB,CADlB,iBAAkB,CADlB,6CAaF,CARE,0CACE,eACF,CAEA,4DAEE,4CAA6C,CAD7C,eAEF,CAGF,wBACE,iBAKF,CAHE,wCACE,iBACF,CAIF,sBACE,eAAgB,CAEhB,oDACF,CAEA,gCACE,2BACF,CAEA,wBAEE,+FAAiG,CACjG,+CAAgD,CAFhD,4BAOF,CAHE,gDACE,8BACF,CAGF,sBAEE,yFAA2F,CAC3F,4CAA6C,CAF7C,4BAOF,CAHE,8CACE,2BACF,CAGF,wBAEE,2FAA6F,CAC7F,6CAA8C,CAF9C,4BAOF,CAHE,gDACE,4BACF,CAGF,uBAEE,qFAAuF,CACvF,0CAA2C,CAF3C,4BAOF,CAHE,+CACE,yBACF,CAKF,qBAIE,aAAc,CACd,eAAgB,CAFhB,cAAe,CADf,2CAIF,CAEA,4BACE,gCAIE,aAAc,CACd,eAAgB,CAFhB,cAAe,CADf,2CAIF,CACF","file":"banner.css","sourcesContent":["/* Banner alert */\n\n.Banner {\n position: relative;\n display: grid;\n padding: var(--base-size-8);\n color: var(--fgColor-default);\n background-image: linear-gradient(var(--bgColor-accent-muted), var(--bgColor-accent-muted));\n border: var(--borderWidth-thin) solid var(--borderColor-accent-muted);\n border-radius: var(--borderRadius-medium);\n grid-auto-flow: column;\n grid-template-areas: 'visual message actions close';\n grid-template-columns: min-content 1fr minmax(0, auto) min-content;\n grid-template-rows: min-content;\n\n /* `sm` breakpoint variation */\n @media (max-width: 543.98px) {\n grid-template-areas:\n 'visual message close'\n '. actions actions';\n grid-template-columns: min-content 1fr min-content;\n grid-template-rows: min-content min-content;\n\n & .Banner-actions {\n margin: var(--base-size-8) 0 0 var(--base-size-8);\n }\n }\n\n /* Elements */\n\n & .Banner-visual {\n display: grid;\n padding: var(--base-size-6) var(--base-size-8);\n grid-area: visual;\n align-self: start;\n\n & > .octicon {\n margin-block: calc(var(--base-size-4) / 2);\n }\n\n & > * {\n align-self: center;\n }\n }\n\n & .Banner-message {\n padding: var(--base-size-6) var(--base-size-8);\n grid-area: message;\n align-self: center;\n\n /* stylelint-disable-next-line selector-max-type */\n & p:last-child {\n margin-bottom: 0;\n }\n\n & .Banner-title:not(:only-child) {\n margin-bottom: 0;\n font-weight: var(--base-text-weight-semibold);\n }\n }\n\n & .Banner-actions {\n grid-area: actions;\n\n &:last-child {\n align-self: center;\n }\n }\n\n /* is this used anywhere? could not find any use, but unsure */\n & .Banner-close {\n grid-area: close;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: var(--controlStack-medium-gap-condensed);\n }\n\n & .Banner-visual .octicon {\n color: var(--fgColor-accent);\n }\n\n &.Banner--warning {\n color: var(--fgColor-default);\n background-image: linear-gradient(var(--bgColor-attention-muted), var(--bgColor-attention-muted));\n border-color: var(--borderColor-attention-muted);\n\n & .Banner-visual .octicon {\n color: var(--fgColor-attention);\n }\n }\n\n &.Banner--error {\n color: var(--fgColor-default);\n background-image: linear-gradient(var(--bgColor-danger-muted), var(--bgColor-danger-muted));\n border-color: var(--borderColor-danger-muted);\n\n & .Banner-visual .octicon {\n color: var(--fgColor-danger);\n }\n }\n\n &.Banner--success {\n color: var(--fgColor-default);\n background-image: linear-gradient(var(--bgColor-success-muted), var(--bgColor-success-muted));\n border-color: var(--borderColor-success-muted);\n\n & .Banner-visual .octicon {\n color: var(--fgColor-success);\n }\n }\n\n &.Banner--upsell {\n color: var(--fgColor-default);\n background-image: linear-gradient(var(--bgColor-done-muted), var(--bgColor-done-muted));\n border-color: var(--borderColor-done-muted);\n\n & .Banner-visual .octicon {\n color: var(--fgColor-done);\n }\n }\n\n /* Full-width */\n\n &.Banner--full {\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc(var(--borderWidth-thin) * -1);\n border-right: 0;\n border-left: 0;\n border-radius: 0;\n }\n\n @media (max-width: 767.98px) {\n &.Banner--full-whenNarrow {\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc(var(--borderWidth-thin) * -1);\n border-right: 0;\n border-left: 0;\n border-radius: 0;\n }\n }\n}\n"]}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/* Banner alert */
|
|
2
|
-
x-banner {
|
|
3
|
-
container-type: inline-size;
|
|
4
|
-
display: block;
|
|
5
|
-
}
|
|
6
2
|
|
|
7
3
|
.Banner {
|
|
8
4
|
position: relative;
|
|
@@ -18,7 +14,7 @@ x-banner {
|
|
|
18
14
|
grid-template-rows: min-content;
|
|
19
15
|
|
|
20
16
|
/* `sm` breakpoint variation */
|
|
21
|
-
@
|
|
17
|
+
@media (max-width: 543.98px) {
|
|
22
18
|
grid-template-areas:
|
|
23
19
|
'visual message close'
|
|
24
20
|
'. actions actions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@property --dialog-scrollgutter{initial-value:0;inherits:false;syntax:"<length>"}body:has(dialog:modal.Overlay--disableScroll){overflow:hidden!important;padding-right:var(--dialog-scrollgutter)!important}dialog.Overlay:not([open]){display:none}.Overlay--hidden{display:none!important}.Overlay--visibilityHidden{height:0;opacity:0;overflow:hidden;visibility:hidden}@supports not selector(:popover-open){[popover]:not(.\:popover-open){display:none}}.Overlay{background-color:var(--overlay-bgColor);border:0;border-radius:var(--borderRadius-large);box-shadow:var(--shadow-floating-small);color:var(--fgColor-default);display:flex;flex-direction:column;inset:0;margin:auto;max-height:min(calc(100vh - 2rem),var(--overlay-height));min-width:192px;opacity:1;padding:0;position:static;white-space:normal;width:min(var(--overlay-width),100vw - 2rem)}.Overlay.Overlay--size-auto{max-height:calc(100vh - 2rem);max-width:calc(100vw - 2rem);min-width:192px}.Overlay.Overlay--size-full{height:100vh;width:100vw}.Overlay.Overlay--size-xsmall{--overlay-width:192px;max-height:calc(100vh - 2rem)}.Overlay.Overlay--size-small{--overlay-height:256px;--overlay-width:320px}.Overlay.Overlay--size-small-portrait{--overlay-height:432px;--overlay-width:320px}.Overlay.Overlay--size-medium{--overlay-height:320px;--overlay-width:480px}.Overlay.Overlay--size-medium-portrait{--overlay-height:600px;--overlay-width:480px}.Overlay.Overlay--size-large{--overlay-height:432px;--overlay-width:640px}.Overlay.Overlay--size-xlarge{--overlay-height:600px;--overlay-width:960px}.Overlay.Overlay--height-auto{height:auto}.Overlay.Overlay--placement-left,.Overlay.Overlay--placement-right{height:100%;max-height:unset;position:fixed}@media screen and (prefers-reduced-motion:no-preference){.Overlay.Overlay--motion-scaleFade,.Overlay.Overlay--placement-left,.Overlay.Overlay--placement-right{animation:Overlay--motion-scaleFade .2s cubic-bezier(.33,1,.68,1) 0s 1 normal none running}}.Overlay.Overlay--placement-left{animation-name:Overlay--motion-slideInRight;border-bottom-left-radius:0;border-top-left-radius:0;inset:0 auto 0 0}.Overlay.Overlay--placement-right{animation-name:Overlay--motion-slideInLeft;border-bottom-right-radius:0;border-top-right-radius:0;inset:0 0 0 auto}.Overlay.Overlay--height-xsmall{height:min(192px,100vh - 2rem)}.Overlay.Overlay--height-small{height:min(256px,100vh - 2rem)}.Overlay.Overlay--height-medium{height:min(320px,100vh - 2rem)}.Overlay.Overlay--height-large{height:min(432px,100vh - 2rem)}.Overlay.Overlay--height-xlarge{height:min(600px,100vh - 2rem)}.Overlay.Overlay--width-auto{width:auto}.Overlay.Overlay--width-small{width:min(256px,100vw - 2rem)}.Overlay.Overlay--width-medium{width:min(320px,100vw - 2rem)}.Overlay.Overlay--width-large{width:min(480px,100vw - 2rem)}.Overlay.Overlay--width-xlarge{width:min(640px,100vw - 2rem)}.Overlay.Overlay--width-xxlarge{width:min(960px,100vw - 2rem)}.Overlay:modal{position:fixed}@keyframes Overlay--motion-scaleFade{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.Overlay-form{flex-grow:1;overflow:auto}.Overlay-form,.Overlay-header{display:flex;flex-direction:column}.Overlay-header{color:var(--fgColor-default);z-index:1}.Overlay-header.Overlay-header--divided{box-shadow:inset 0 calc(var(--borderWidth-thin)*-1) var(--borderColor-default);padding-bottom:var(--stack-padding-condensed)}:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap{gap:var(--stack-gap-condensed)}:is(:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-title{font-size:var(--text-title-size-medium)}:is(:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-description{font-size:var(--text-body-size-medium)}.Overlay-header .Overlay-headerContentWrap{align-items:flex-start;display:flex;gap:var(--stack-gap-condensed);padding:var(--stack-gap-condensed) var(--stack-gap-condensed) 0 var(--stack-gap-condensed)}:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-actionWrap{display:flex;flex-direction:row;gap:var(--stack-gap-condensed)}:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap{display:flex;flex-direction:column;flex-grow:1;gap:var(--control-small-gap);padding:calc(var(--stack-gap-condensed)*.75) 0 calc(var(--stack-gap-condensed)*.75) var(--stack-gap-condensed)}:is(:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-title{font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-semibold);margin:0}:is(:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-description{color:var(--fgColor-muted);font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-normal);margin:0}.Overlay-headerFilter{padding:var(--stack-gap-condensed) var(--stack-gap-condensed) 0 var(--stack-gap-condensed)}.Overlay-body{flex-grow:1;font-size:var(--text-body-size-medium);overflow-y:auto;padding:var(--stack-padding-normal);scrollbar-width:thin}.Overlay-body.Overlay-body--paddingCondensed{padding:var(--stack-padding-condensed);padding-top:0}.Overlay-body.Overlay-body--paddingNone{padding:0}.Overlay-footer{display:flex;flex-direction:row;flex-shrink:0;flex-wrap:wrap;padding:0 var(--stack-padding-normal) var(--stack-padding-normal) var(--stack-padding-normal);z-index:1}.Overlay-footer.Overlay-footer--divided{box-shadow:inset 0 var(--borderWidth-thin) var(--borderColor-default);padding-top:var(--stack-padding-normal)}.Overlay-footer.Overlay-footer--alignStart{gap:var(--stack-gap-condensed);justify-content:flex-start}.Overlay-footer.Overlay-footer--alignCenter{gap:var(--stack-gap-condensed);justify-content:center}.Overlay-footer.Overlay-footer--alignEnd{gap:var(--stack-gap-condensed);justify-content:flex-end}.Overlay-closeButton{align-self:flex-start;background-color:initial;border:var(--borderWidth-thin) solid #0000;border-radius:var(--borderRadius-medium);color:var(--fgColor-muted);cursor:pointer;display:grid;flex-shrink:0;height:var(--base-size-32);padding:0;place-content:center;position:relative;transition:.2s cubic-bezier(.3,0,.5,1);transition-property:color,background-color,border-color;-webkit-user-select:none;user-select:none;width:var(--base-size-32)}.Overlay-closeButton:focus,.Overlay-closeButton:hover{background-color:var(--button-default-bgColor-hover);border:var(--borderWidth-thin) solid var(--control-bgColor-hover)}.Overlay-closeButton.close-button{border:var(--borderWidth-thin) solid #0000}.Overlay--full{border-radius:unset!important;flex-grow:1;height:100%;max-height:100vh;max-width:100vw;width:100%}@media (max-width:767px){.Overlay--placement-right-whenNarrow,.Overlay.Overlay--placement-left-whenNarrow{height:100%;max-height:100vh;position:fixed}.Overlay.Overlay--placement-left-whenNarrow{animation-name:Overlay--motion-slideInLeft;border-bottom-left-radius:0;border-top-left-radius:0;inset:0 auto 0 0}.Overlay.Overlay--placement-right-whenNarrow{animation-name:Overlay--motion-slideInLeft;border-bottom-right-radius:0;border-top-right-radius:0;inset:0 0 0 auto}.Overlay.Overlay--placement-bottom-whenNarrow{animation-name:Overlay--motion-slideUp;border-bottom-left-radius:0;border-bottom-right-radius:0;inset:auto 0 0;max-width:100vw;width:100%}.Overlay--full-whenNarrow{border-radius:unset!important;flex-grow:1;height:100%;max-height:100vh;max-width:100vw;width:100%}}@keyframes Overlay--motion-slideDown{0%{transform:translateY(-100%)}}@keyframes Overlay--motion-slideUp{0%{transform:translateY(100%)}}@keyframes Overlay--motion-slideInRight{0%{transform:translateX(-100%)}}@keyframes Overlay--motion-slideInLeft{0%{transform:translateX(100%)}}
|
|
1
|
+
@property --dialog-scrollgutter{initial-value:0;inherits:false;syntax:"<length>"}body:has(dialog:modal.Overlay--disableScroll){overflow:hidden!important;padding-right:var(--dialog-scrollgutter)!important}dialog.Overlay:not([open]){display:none}.Overlay--hidden{display:none!important}.Overlay--visibilityHidden{height:0;opacity:0;overflow:hidden;visibility:hidden}@supports not selector(:popover-open){[popover]:not(.\:popover-open){display:none}}.Overlay{background-color:var(--overlay-bgColor);border:0;border-radius:var(--borderRadius-large);box-shadow:var(--shadow-floating-small);color:var(--fgColor-default);display:flex;flex-direction:column;inset:0;margin:auto;max-height:min(calc(100vh - 2rem),var(--overlay-height));min-width:192px;opacity:1;padding:0;position:static;white-space:normal;width:min(var(--overlay-width),100vw - 2rem)}.Overlay.Overlay--size-auto{max-height:calc(100vh - 2rem);max-width:calc(100vw - 2rem);min-width:192px}.Overlay.Overlay--size-full{height:100vh;width:100vw}.Overlay.Overlay--size-xsmall{--overlay-width:192px;max-height:calc(100vh - 2rem)}.Overlay.Overlay--size-small{--overlay-height:256px;--overlay-width:320px}.Overlay.Overlay--size-small-portrait{--overlay-height:432px;--overlay-width:320px}.Overlay.Overlay--size-medium{--overlay-height:320px;--overlay-width:480px}.Overlay.Overlay--size-medium-portrait{--overlay-height:600px;--overlay-width:480px}.Overlay.Overlay--size-large{--overlay-height:432px;--overlay-width:640px}.Overlay.Overlay--size-xlarge{--overlay-height:600px;--overlay-width:960px}.Overlay.Overlay--height-auto{height:auto}.Overlay.Overlay--placement-left,.Overlay.Overlay--placement-right{height:100%;max-height:unset;position:fixed}@media screen and (prefers-reduced-motion:no-preference){.Overlay.Overlay--motion-scaleFade,.Overlay.Overlay--placement-left,.Overlay.Overlay--placement-right{animation:Overlay--motion-scaleFade .2s cubic-bezier(.33,1,.68,1) 0s 1 normal none running}}.Overlay.Overlay--placement-left{animation-name:Overlay--motion-slideInRight;border-bottom-left-radius:0;border-top-left-radius:0;inset:0 auto 0 0}.Overlay.Overlay--placement-right{animation-name:Overlay--motion-slideInLeft;border-bottom-right-radius:0;border-top-right-radius:0;inset:0 0 0 auto}.Overlay.Overlay--height-xsmall{height:min(192px,100vh - 2rem)}.Overlay.Overlay--height-small{height:min(256px,100vh - 2rem)}.Overlay.Overlay--height-medium{height:min(320px,100vh - 2rem)}.Overlay.Overlay--height-large{height:min(432px,100vh - 2rem)}.Overlay.Overlay--height-xlarge{height:min(600px,100vh - 2rem)}.Overlay.Overlay--width-auto{width:auto}.Overlay.Overlay--width-small{width:min(256px,100vw - 2rem)}.Overlay.Overlay--width-medium{width:min(320px,100vw - 2rem)}.Overlay.Overlay--width-large{width:min(480px,100vw - 2rem)}.Overlay.Overlay--width-xlarge{width:min(640px,100vw - 2rem)}.Overlay.Overlay--width-xxlarge{width:min(960px,100vw - 2rem)}.Overlay:modal{position:fixed}@keyframes Overlay--motion-scaleFade{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.Overlay-form{flex-grow:1;overflow:auto}.Overlay-form,.Overlay-header{display:flex;flex-direction:column}.Overlay-header{color:var(--fgColor-default);z-index:1}.Overlay-header.Overlay-header--divided{box-shadow:inset 0 calc(var(--borderWidth-thin)*-1) var(--borderColor-default);padding-bottom:var(--stack-padding-condensed)}:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap{gap:var(--stack-gap-condensed)}:is(:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-title{font-size:var(--text-title-size-medium)}:is(:is(.Overlay-header.Overlay-header--large .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-description{font-size:var(--text-body-size-medium)}.Overlay-header .Overlay-headerContentWrap{align-items:flex-start;display:flex;gap:var(--stack-gap-condensed);padding:var(--stack-gap-condensed) var(--stack-gap-condensed) 0 var(--stack-gap-condensed)}:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-actionWrap{display:flex;flex-direction:row;gap:var(--stack-gap-condensed)}:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap{display:flex;flex-direction:column;flex-grow:1;gap:var(--control-small-gap);padding:calc(var(--stack-gap-condensed)*.75) 0 calc(var(--stack-gap-condensed)*.75) var(--stack-gap-condensed)}:is(:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-title{font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-semibold);margin:0}:is(:is(.Overlay-header .Overlay-headerContentWrap) .Overlay-titleWrap) .Overlay-description{color:var(--fgColor-muted);font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-normal);margin:0}.Overlay-headerFilter{padding:var(--stack-gap-condensed) var(--stack-gap-condensed) 0 var(--stack-gap-condensed)}.Overlay-body{flex-grow:1;font-size:var(--text-body-size-medium);overflow-y:auto;padding:var(--stack-padding-normal);scrollbar-width:thin}.Overlay-body.Overlay-body--paddingCondensed{padding:var(--stack-padding-condensed);padding-top:0}.Overlay-body.Overlay-body--paddingNone{padding:0}.Overlay-footer{display:flex;flex-direction:row;flex-shrink:0;flex-wrap:wrap;padding:0 var(--stack-padding-normal) var(--stack-padding-normal) var(--stack-padding-normal);z-index:1}.Overlay-footer.Overlay-footer--divided{box-shadow:inset 0 var(--borderWidth-thin) var(--borderColor-default);padding-top:var(--stack-padding-normal)}.Overlay-footer.Overlay-footer--alignStart{gap:var(--stack-gap-condensed);justify-content:flex-start}.Overlay-footer.Overlay-footer--alignCenter{gap:var(--stack-gap-condensed);justify-content:center}.Overlay-footer.Overlay-footer--alignEnd{gap:var(--stack-gap-condensed);justify-content:flex-end}.Overlay-closeButton{align-self:flex-start;background-color:initial;border:var(--borderWidth-thin) solid #0000;border-radius:var(--borderRadius-medium);color:var(--fgColor-muted);cursor:pointer;display:grid;flex-shrink:0;height:var(--base-size-32);padding:0;place-content:center;position:relative;transition:.2s cubic-bezier(.3,0,.5,1);transition-property:color,background-color,border-color;-webkit-user-select:none;user-select:none;width:var(--base-size-32)}.Overlay-closeButton:focus,.Overlay-closeButton:hover{background-color:var(--button-default-bgColor-hover);border:var(--borderWidth-thin) solid var(--control-bgColor-hover)}.Overlay-closeButton.close-button{border:var(--borderWidth-thin) solid #0000}.Overlay--full{border-radius:unset!important;flex-grow:1;height:100%;max-height:100vh;max-width:100vw;width:100%}@media (max-width:767px){.Overlay--placement-right-whenNarrow,.Overlay.Overlay--placement-left-whenNarrow{height:100%;max-height:100vh;position:fixed}.Overlay.Overlay--placement-left-whenNarrow{animation-name:Overlay--motion-slideInLeft;border-bottom-left-radius:0;border-top-left-radius:0;inset:0 auto 0 0}.Overlay.Overlay--placement-right-whenNarrow{animation-name:Overlay--motion-slideInLeft;border-bottom-right-radius:0;border-top-right-radius:0;inset:0 0 0 auto}.Overlay.Overlay--placement-bottom-whenNarrow{animation-name:Overlay--motion-slideUp;border-bottom-left-radius:0;border-bottom-right-radius:0;inset:auto 0 0;max-width:100vw;width:100%}.Overlay--full-whenNarrow{border-radius:unset!important;flex-grow:1;height:100%;max-height:100vh;max-width:100vw;width:100%}.Overlay--fullscreen-whenNarrow{border-radius:unset!important;height:100vh;left:0;margin:0;max-height:none!important;max-width:none!important;position:fixed;top:0;width:100vw}}@keyframes Overlay--motion-slideDown{0%{transform:translateY(-100%)}}@keyframes Overlay--motion-slideUp{0%{transform:translateY(100%)}}@keyframes Overlay--motion-slideInRight{0%{transform:translateX(-100%)}}@keyframes Overlay--motion-slideInLeft{0%{transform:translateX(100%)}}
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
".Overlay.Overlay--placement-left-whenNarrow",
|
|
62
62
|
".Overlay.Overlay--placement-right-whenNarrow",
|
|
63
63
|
".Overlay.Overlay--placement-bottom-whenNarrow",
|
|
64
|
-
".Overlay--full-whenNarrow"
|
|
64
|
+
".Overlay--full-whenNarrow",
|
|
65
|
+
".Overlay--fullscreen-whenNarrow"
|
|
65
66
|
]
|
|
66
67
|
}
|