@ds-gn/ui 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/custom-elements.json +5527 -2136
- package/dist/common/controllers/OverlayDismissController.d.ts +52 -0
- package/dist/common/controllers/OverlayPositionController.d.ts +168 -0
- package/dist/common/controllers/RovingFocusController.d.ts +99 -0
- package/dist/common/controllers/SectionEntranceController.d.ts +37 -0
- package/dist/common/helpers/field-control.d.ts +35 -0
- package/dist/common/helpers/listbox-navigation.d.ts +50 -0
- package/dist/common/props/size/size.props.d.ts +11 -0
- package/dist/common/styles/overlay-panel.styles.d.ts +55 -0
- package/dist/components/Button/src/Button.d.ts +20 -0
- package/dist/components/Button/src/Button.js +28 -0
- package/dist/components/Container/src/Container.d.ts +10 -0
- package/dist/components/Container/src/Container.js +148 -23
- package/dist/components/DropdownMenu/src/DropdownMenu.d.ts +150 -0
- package/dist/components/DropdownMenu/src/DropdownMenu.js +1550 -0
- package/dist/components/DropdownMenu/src/DropdownMenu.playground.d.ts +2 -0
- package/dist/components/DropdownMenu/src/DropdownMenu.props.d.ts +47 -0
- package/dist/components/DropdownMenu/src/DropdownMenu.props.js +54 -0
- package/dist/components/DropdownMenu/src/DropdownMenu.styles.d.ts +20 -0
- package/dist/components/Field/src/Field.d.ts +39 -0
- package/dist/components/Field/src/Field.js +203 -0
- package/dist/components/Field/src/Field.playground.d.ts +2 -0
- package/dist/components/Field/src/Field.styles.d.ts +6 -0
- package/dist/components/Icon/src/Icon.d.ts +5 -0
- package/dist/components/Icon/src/Icon.js +3 -0
- package/dist/components/Icon/src/icons/arrow-down.d.ts +1 -0
- package/dist/components/Icon/src/icons/arrow-down.js +6 -0
- package/dist/components/Icon/src/icons/arrow-up.d.ts +1 -0
- package/dist/components/Icon/src/icons/arrow-up.js +6 -0
- package/dist/components/Icon/src/icons/chevrons-up-down.d.ts +1 -0
- package/dist/components/Icon/src/icons/chevrons-up-down.js +6 -0
- package/dist/components/Icon/src/icons/cookie.d.ts +1 -0
- package/dist/components/Icon/src/icons/cookie.js +6 -0
- package/dist/components/Icon/src/icons/icon-names.d.ts +1 -1
- package/dist/components/Icon/src/icons/icon-names.js +4 -0
- package/dist/components/Icon/src/icons/index.d.ts +4 -0
- package/dist/components/Icon/src/icons/index.js +4 -0
- package/dist/components/Input/src/Input.d.ts +37 -0
- package/dist/components/Input/src/Input.js +300 -143
- package/dist/components/Input/src/Input.props.d.ts +2 -1
- package/dist/components/Input/src/Input.props.js +12 -6
- package/dist/components/Input/src/Input.styles.d.ts +12 -4
- package/dist/components/Modal/src/Modal.d.ts +1 -0
- package/dist/components/Modal/src/Modal.js +1 -0
- package/dist/components/Nav/src/Nav.js +2 -1
- package/dist/components/NavLink/src/NavLink.d.ts +14 -30
- package/dist/components/NavLink/src/NavLink.js +201 -65
- package/dist/components/Select/src/Select.d.ts +157 -0
- package/dist/components/Select/src/Select.js +1766 -0
- package/dist/components/Select/src/Select.playground.d.ts +2 -0
- package/dist/components/Select/src/Select.props.d.ts +19 -0
- package/dist/components/Select/src/Select.props.js +40 -0
- package/dist/components/Select/src/Select.styles.d.ts +30 -0
- package/dist/components/Table/src/Table.d.ts +93 -0
- package/dist/components/Table/src/Table.js +1105 -0
- package/dist/components/Table/src/Table.playground.d.ts +2 -0
- package/dist/components/Table/src/Table.props.d.ts +53 -0
- package/dist/components/Table/src/Table.props.js +18 -0
- package/dist/components/Table/src/Table.styles.d.ts +33 -0
- package/dist/components/Toaster/src/Toaster.d.ts +174 -0
- package/dist/components/Toaster/src/Toaster.js +1489 -0
- package/dist/components/Toaster/src/Toaster.playground.d.ts +2 -0
- package/dist/components/Toaster/src/Toaster.props.d.ts +14 -0
- package/dist/components/Toaster/src/Toaster.props.js +81 -0
- package/dist/components/Toaster/src/Toaster.styles.d.ts +52 -0
- package/dist/components/Toaster/src/toast.d.ts +115 -0
- package/dist/components/Toaster/src/toast.js +74 -0
- package/dist/playground/types.d.ts +27 -0
- package/dist/playground-manifest.d.ts +3 -2
- package/dist/playground-manifest.js +507 -7
- package/dist/react/DropdownMenu.d.ts +8 -0
- package/dist/react/DropdownMenu.js +13 -0
- package/dist/react/Field.d.ts +6 -0
- package/dist/react/Field.js +13 -0
- package/dist/react/Select.d.ts +8 -0
- package/dist/react/Select.js +13 -0
- package/dist/react/Table.d.ts +8 -0
- package/dist/react/Table.js +13 -0
- package/dist/react/Toaster.d.ts +8 -0
- package/dist/react/Toaster.js +13 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +6 -0
- package/package.json +52 -2
|
@@ -91,6 +91,146 @@ class Base extends LitElement {
|
|
|
91
91
|
}
|
|
92
92
|
defineElement("dsgn-base", Base);
|
|
93
93
|
|
|
94
|
+
// common/controllers/SectionEntranceController.ts
|
|
95
|
+
import {
|
|
96
|
+
prefersReducedMotion,
|
|
97
|
+
splitText
|
|
98
|
+
} from "@ds-gn/motion";
|
|
99
|
+
import { MotionController } from "@ds-gn/motion/lit";
|
|
100
|
+
var HEADING_STAGGER = 20;
|
|
101
|
+
var HEADING_MAX_SPREAD = 500;
|
|
102
|
+
var HEADING_RISE = 4;
|
|
103
|
+
var MOTION_OVERLAP = 160;
|
|
104
|
+
var holdHidden = (el) => el.style.setProperty("opacity", "0");
|
|
105
|
+
var releaseHidden = (el) => el.style.removeProperty("opacity");
|
|
106
|
+
var ENTRANCE_BLOCKS = new Set(["dsgn-heading-block", "dsgn-form-block"]);
|
|
107
|
+
var hasContent = (el) => !["div", "span"].includes(el.localName) || el.children.length > 0 || (el.textContent ?? "").trim() !== "";
|
|
108
|
+
var childrenIn = (parent, ...slots) => Array.from(parent.children).filter((child) => child instanceof HTMLElement && slots.includes(child.slot) && hasContent(child));
|
|
109
|
+
function sectionEntranceParts(root) {
|
|
110
|
+
const parts = [];
|
|
111
|
+
const fade = (els) => {
|
|
112
|
+
if (els.length > 0)
|
|
113
|
+
parts.push({ kind: "fade", els });
|
|
114
|
+
};
|
|
115
|
+
Array.from(root.querySelectorAll("*")).filter((el) => ENTRANCE_BLOCKS.has(el.localName)).forEach((block) => {
|
|
116
|
+
if (block.localName === "dsgn-form-block") {
|
|
117
|
+
fade(childrenIn(block, "input", "button"));
|
|
118
|
+
fade(childrenIn(block, "note"));
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
fade(childrenIn(block, "eyebrow"));
|
|
122
|
+
const [heading] = childrenIn(block, "heading");
|
|
123
|
+
if (heading)
|
|
124
|
+
parts.push({ kind: "letters", el: heading });
|
|
125
|
+
fade(childrenIn(block, "description"));
|
|
126
|
+
fade(childrenIn(block, "action-primary", "action-secondary"));
|
|
127
|
+
});
|
|
128
|
+
return parts;
|
|
129
|
+
}
|
|
130
|
+
var elementsOf = (part) => part.kind === "fade" ? part.els : [part.el];
|
|
131
|
+
|
|
132
|
+
class SectionEntranceController {
|
|
133
|
+
constructor(host, enabled) {
|
|
134
|
+
this.parts = [];
|
|
135
|
+
this.host = host;
|
|
136
|
+
this.enabled = enabled;
|
|
137
|
+
this.motion = new MotionController(host);
|
|
138
|
+
host.addController(this);
|
|
139
|
+
}
|
|
140
|
+
hostUpdated() {
|
|
141
|
+
if (this.observer || this.state !== undefined || !this.enabled())
|
|
142
|
+
return;
|
|
143
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
144
|
+
this.state = "static";
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this.observer = new IntersectionObserver((entries) => {
|
|
148
|
+
const entry = entries[entries.length - 1];
|
|
149
|
+
if (entry)
|
|
150
|
+
this.report(entry.isIntersecting);
|
|
151
|
+
});
|
|
152
|
+
this.observer.observe(this.host);
|
|
153
|
+
}
|
|
154
|
+
hostDisconnected() {
|
|
155
|
+
this.stopObserving();
|
|
156
|
+
if (this.state === "held") {
|
|
157
|
+
this.parts.flatMap(elementsOf).forEach(releaseHidden);
|
|
158
|
+
this.state = undefined;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
report(inView) {
|
|
162
|
+
if (this.state === undefined) {
|
|
163
|
+
const play = !inView && !prefersReducedMotion();
|
|
164
|
+
this.state = play ? "held" : "static";
|
|
165
|
+
if (!play)
|
|
166
|
+
return this.stopObserving();
|
|
167
|
+
this.parts = sectionEntranceParts(this.host);
|
|
168
|
+
this.parts.flatMap(elementsOf).forEach(holdHidden);
|
|
169
|
+
}
|
|
170
|
+
if (this.state === "held" && inView) {
|
|
171
|
+
this.state = "played";
|
|
172
|
+
this.stopObserving();
|
|
173
|
+
this.play();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
play() {
|
|
177
|
+
this.parts.flatMap(elementsOf).forEach(releaseHidden);
|
|
178
|
+
const splits = [];
|
|
179
|
+
const steps = this.parts.map((part, index) => {
|
|
180
|
+
const overlap = index === 0 ? undefined : MOTION_OVERLAP;
|
|
181
|
+
if (part.kind === "fade") {
|
|
182
|
+
return { targets: part.els, preset: "fade", stagger: 0, overlap };
|
|
183
|
+
}
|
|
184
|
+
const split = splitText(part.el);
|
|
185
|
+
splits.push(split);
|
|
186
|
+
return {
|
|
187
|
+
targets: split.chars,
|
|
188
|
+
preset: "fade",
|
|
189
|
+
y: HEADING_RISE,
|
|
190
|
+
stagger: HEADING_STAGGER,
|
|
191
|
+
maxDuration: HEADING_MAX_SPREAD
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
if (steps.length === 0)
|
|
195
|
+
return;
|
|
196
|
+
this.motion.timeline(steps).finished.then(() => splits.forEach((split) => split.revert()));
|
|
197
|
+
}
|
|
198
|
+
stopObserving() {
|
|
199
|
+
this.observer?.disconnect();
|
|
200
|
+
this.observer = undefined;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// common/helpers/enum-validator.ts
|
|
205
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
206
|
+
if (!enumSet.has(candidateValue)) {
|
|
207
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// common/helpers/enum-creator.ts
|
|
212
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
213
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
214
|
+
return {
|
|
215
|
+
type,
|
|
216
|
+
hasChanged(newValue, oldValue) {
|
|
217
|
+
if (newValue !== oldValue) {
|
|
218
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
return false;
|
|
222
|
+
},
|
|
223
|
+
...other
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// common/props/motion/motion.props.ts
|
|
228
|
+
var motionValues = {
|
|
229
|
+
ON: "on",
|
|
230
|
+
OFF: "off"
|
|
231
|
+
};
|
|
232
|
+
var motionProps = enumCreator(Object.values(motionValues), "motion", String, { reflect: true });
|
|
233
|
+
|
|
94
234
|
// components/Container/src/Container.css
|
|
95
235
|
import { css as css2 } from "lit";
|
|
96
236
|
var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
@@ -138,6 +278,9 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
138
278
|
.mx-auto {
|
|
139
279
|
margin-inline: auto;
|
|
140
280
|
}
|
|
281
|
+
.block {
|
|
282
|
+
display: block;
|
|
283
|
+
}
|
|
141
284
|
.w-full {
|
|
142
285
|
width: 100%;
|
|
143
286
|
}
|
|
@@ -229,29 +372,6 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
229
372
|
`;
|
|
230
373
|
var Container_default = styles2;
|
|
231
374
|
|
|
232
|
-
// common/helpers/enum-validator.ts
|
|
233
|
-
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
234
|
-
if (!enumSet.has(candidateValue)) {
|
|
235
|
-
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
// common/helpers/enum-creator.ts
|
|
240
|
-
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
241
|
-
const acceptableValuesSet = new Set(acceptableValues);
|
|
242
|
-
return {
|
|
243
|
-
type,
|
|
244
|
-
hasChanged(newValue, oldValue) {
|
|
245
|
-
if (newValue !== oldValue) {
|
|
246
|
-
enumValidator(propName, acceptableValuesSet, newValue);
|
|
247
|
-
return true;
|
|
248
|
-
}
|
|
249
|
-
return false;
|
|
250
|
-
},
|
|
251
|
-
...other
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
|
|
255
375
|
// components/Container/src/Container.props.ts
|
|
256
376
|
var containerSizeValues = {
|
|
257
377
|
SM: "sm",
|
|
@@ -341,6 +461,8 @@ class Container extends Base {
|
|
|
341
461
|
super(...arguments);
|
|
342
462
|
this.size = containerSizeValues.LG;
|
|
343
463
|
this.section = false;
|
|
464
|
+
this.motion = motionValues.OFF;
|
|
465
|
+
this._entrance = new SectionEntranceController(this, () => this.motion === motionValues.ON);
|
|
344
466
|
}
|
|
345
467
|
static styles = [Base.styles, Container_default];
|
|
346
468
|
render() {
|
|
@@ -366,6 +488,9 @@ __legacyDecorateClassTS([
|
|
|
366
488
|
__legacyDecorateClassTS([
|
|
367
489
|
property({ ...paddingBottomProps })
|
|
368
490
|
], Container.prototype, "paddingBottom", undefined);
|
|
491
|
+
__legacyDecorateClassTS([
|
|
492
|
+
property({ ...motionProps })
|
|
493
|
+
], Container.prototype, "motion", undefined);
|
|
369
494
|
defineElement("dsgn-container", Container);
|
|
370
495
|
export {
|
|
371
496
|
Container
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import '../../../types/global.d.ts';
|
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
|
3
|
+
import { Base } from '../../../common/Base/Base.js';
|
|
4
|
+
import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
|
|
5
|
+
import { type DropdownMenuAlignType, type DropdownMenuEntry, type DropdownMenuSizeType } from './DropdownMenu.props.js';
|
|
6
|
+
type FocusTarget = 'first' | 'last';
|
|
7
|
+
/**
|
|
8
|
+
* A menu of actions opened from a trigger button, following the WAI-ARIA APG
|
|
9
|
+
* menu button: the trigger gets `aria-haspopup="menu"` and `aria-expanded`,
|
|
10
|
+
* and while the `role="menu"` is open DOM focus moves between its
|
|
11
|
+
* `role="menuitem"` rows (roving focus), unlike `dsgn-select`, where focus
|
|
12
|
+
* stays on the trigger. Not a form control: activating an item fires
|
|
13
|
+
* `dsgn-select` and closes the menu.
|
|
14
|
+
*
|
|
15
|
+
* **Keyboard.** On the trigger, Enter, Space and ↓ open the menu on the first
|
|
16
|
+
* item and ↑ on the last. In the menu, ↑ ↓ move with wrap-around, Home/End
|
|
17
|
+
* jump, typing a letter moves to the next item starting with it, Enter and
|
|
18
|
+
* Space activate, Escape closes and returns focus to the trigger, and Tab
|
|
19
|
+
* closes and lets focus move on. Disabled items can be focused but not
|
|
20
|
+
* activated. Hovering an item focuses it, so hover and keyboard highlight are
|
|
21
|
+
* the same.
|
|
22
|
+
*
|
|
23
|
+
* **Pointer.** Clicking the trigger opens the menu on its first item, and
|
|
24
|
+
* clicking it again closes it. A press outside closes the menu without moving
|
|
25
|
+
* focus. Only one menu is open at a time on the page.
|
|
26
|
+
*
|
|
27
|
+
* **Position.** The menu hangs below the trigger, lined up with its start
|
|
28
|
+
* edge or, with `align="end"`, its end edge (for "⋯" triggers at the end of a
|
|
29
|
+
* row). It flips above when there isn't room below and shifts to keep a 16px
|
|
30
|
+
* viewport gutter. It opens in the top layer (`popover="manual"`), so an
|
|
31
|
+
* ancestor's `overflow` or stacking context cannot clip or cover it.
|
|
32
|
+
*
|
|
33
|
+
* **Naming.** The trigger is in light DOM and the menu in this shadow root,
|
|
34
|
+
* so `aria-controls` and `aria-labelledby` cannot point from one to the other.
|
|
35
|
+
* `aria-controls` is omitted (it is optional in the APG pattern); the menu is
|
|
36
|
+
* named from `label`, else from the trigger's `aria-label` or text. An
|
|
37
|
+
* icon-only trigger needs an `aria-label` naming its object, e.g. "Actions
|
|
38
|
+
* for Priya Natarajan".
|
|
39
|
+
*
|
|
40
|
+
* @slot trigger - The button that opens the menu, usually a `dsgn-button`.
|
|
41
|
+
*
|
|
42
|
+
* @fires dsgn-select - Fired when an enabled item is activated, before the menu closes; `detail` is `{ value }`. React: `onDsgnSelect`.
|
|
43
|
+
*
|
|
44
|
+
* @csspart menu - The floating `role="menu"` panel.
|
|
45
|
+
* @csspart item - Each `role="menuitem"` row.
|
|
46
|
+
* @csspart item-icon - An item's leading icon.
|
|
47
|
+
* @csspart item-shortcut - An item's trailing shortcut hint.
|
|
48
|
+
* @csspart separator - A divider between groups of items.
|
|
49
|
+
*/
|
|
50
|
+
export declare class DropdownMenu extends Base {
|
|
51
|
+
static styles: CSSResultGroup;
|
|
52
|
+
surface: SurfaceType;
|
|
53
|
+
/**
|
|
54
|
+
* Item size on the shared `size` scale. On a coarse pointer (touch) items
|
|
55
|
+
* are always `lg`, the 44px touch target.
|
|
56
|
+
*/
|
|
57
|
+
size: DropdownMenuSizeType;
|
|
58
|
+
/**
|
|
59
|
+
* The items and separators, in order. Set as a property, or as a JSON
|
|
60
|
+
* attribute in plain HTML.
|
|
61
|
+
*/
|
|
62
|
+
items: DropdownMenuEntry[];
|
|
63
|
+
/**
|
|
64
|
+
* Which trigger edge the menu lines up with: `start` for text triggers,
|
|
65
|
+
* `end` for icon-only triggers at the end of a row.
|
|
66
|
+
*/
|
|
67
|
+
align: DropdownMenuAlignType;
|
|
68
|
+
/** Whether the menu is open. Opening it moves focus to the first item. */
|
|
69
|
+
open: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Accessible name for the menu. Defaults to the trigger's `aria-label`, or
|
|
72
|
+
* its text.
|
|
73
|
+
*/
|
|
74
|
+
label: string;
|
|
75
|
+
/** Whether the menu is displayed — stays true through the exit animation. */
|
|
76
|
+
private _visible;
|
|
77
|
+
private _placement;
|
|
78
|
+
/** Index of the focused item among `items`, or -1. */
|
|
79
|
+
private _activeIndex;
|
|
80
|
+
private _coarse;
|
|
81
|
+
/** The trigger's name, captured on open (see `label`). */
|
|
82
|
+
private _triggerName;
|
|
83
|
+
private _menu;
|
|
84
|
+
private _trigger;
|
|
85
|
+
/** Where focus goes once the menu has rendered open. */
|
|
86
|
+
private _focusOnOpen;
|
|
87
|
+
/** Whether closing should return focus to the trigger. */
|
|
88
|
+
private _returnFocus;
|
|
89
|
+
private readonly _motion;
|
|
90
|
+
private _exitRun;
|
|
91
|
+
private readonly _topLayer;
|
|
92
|
+
private _inTopLayer;
|
|
93
|
+
private _menuScrollTop;
|
|
94
|
+
private _coarseQuery?;
|
|
95
|
+
private readonly _position;
|
|
96
|
+
private readonly _dismiss;
|
|
97
|
+
private readonly _roving;
|
|
98
|
+
private get _effectiveSize();
|
|
99
|
+
private _itemElements;
|
|
100
|
+
private _entryAt;
|
|
101
|
+
/** Open the menu and focus its first (or last) item. */
|
|
102
|
+
show(focus?: FocusTarget): void;
|
|
103
|
+
/** Close the menu without moving focus. */
|
|
104
|
+
hide(): void;
|
|
105
|
+
private _close;
|
|
106
|
+
private _activate;
|
|
107
|
+
/**
|
|
108
|
+
* Pick up the slotted trigger. Runs on `slotchange` and after the first
|
|
109
|
+
* render, since an element slotted before upgrade may not fire one.
|
|
110
|
+
*/
|
|
111
|
+
private _resolveTrigger;
|
|
112
|
+
private _readTriggerName;
|
|
113
|
+
/**
|
|
114
|
+
* Write the popup state on the trigger. A Lit trigger that declares the
|
|
115
|
+
* properties (`dsgn-button`) forwards them to its inner control; anything
|
|
116
|
+
* else, such as a native `<button>`, takes them as attributes.
|
|
117
|
+
*/
|
|
118
|
+
private _syncTrigger;
|
|
119
|
+
/** Whether an event came from (or through) the trigger. */
|
|
120
|
+
private _fromTrigger;
|
|
121
|
+
private _triggerUnavailable;
|
|
122
|
+
private _handleTriggerClick;
|
|
123
|
+
private _handleTriggerKeydown;
|
|
124
|
+
/** Firefox activates a button on Space keyup; the keydown already acted. */
|
|
125
|
+
private _handleTriggerKeyup;
|
|
126
|
+
private _handleMenuKeydown;
|
|
127
|
+
private _handleItemPointerMove;
|
|
128
|
+
private _handleItemClick;
|
|
129
|
+
/** Focus leaving the component altogether — not to the trigger — closes. */
|
|
130
|
+
private _handleFocusOut;
|
|
131
|
+
private _handleCoarseChange;
|
|
132
|
+
connectedCallback(): void;
|
|
133
|
+
disconnectedCallback(): void;
|
|
134
|
+
firstUpdated(): void;
|
|
135
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
136
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
137
|
+
private _showMenu;
|
|
138
|
+
private _hideMenu;
|
|
139
|
+
private _handleOpenChange;
|
|
140
|
+
private _exit;
|
|
141
|
+
private _renderIcon;
|
|
142
|
+
private _renderEntry;
|
|
143
|
+
render(): import("lit").TemplateResult<1>;
|
|
144
|
+
}
|
|
145
|
+
declare global {
|
|
146
|
+
interface HTMLElementTagNameMap {
|
|
147
|
+
'dsgn-dropdown-menu': DropdownMenu;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export {};
|