UNPKG

1.88 kBJavaScriptView Raw
1var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5 return c > 3 && r && Object.defineProperty(target, key, r), r;
6};
7import { adoptedStyle, customElement } from '@mantou/gem/lib/decorators';
8import { createCSSSheet, css } from '@mantou/gem/lib/utils';
9import { GemLinkElement, GemActiveLinkElement } from '@mantou/gem/elements/base/link';
10import { commonHandle } from '../lib/hotkeys';
11import { focusStyle } from '../lib/styles';
12export * from '@mantou/gem/elements/base/link';
13const style = createCSSSheet(css `
14 :host {
15 color: inherit;
16 text-decoration: inherit;
17 }
18`);
19/**
20 * @customElement dy-link
21 */
22let DuoyunLinkElement = class DuoyunLinkElement extends GemLinkElement {
23 constructor() {
24 super();
25 this.addEventListener('keydown', commonHandle);
26 }
27};
28DuoyunLinkElement = __decorate([
29 customElement('dy-link'),
30 adoptedStyle(style),
31 adoptedStyle(focusStyle)
32], DuoyunLinkElement);
33export { DuoyunLinkElement };
34/**
35 * @customElement dy-active-link
36 */
37let DuoyunActiveLinkElement = class DuoyunActiveLinkElement extends GemActiveLinkElement {
38 constructor() {
39 super();
40 this.addEventListener('keydown', commonHandle);
41 }
42};
43DuoyunActiveLinkElement = __decorate([
44 customElement('dy-active-link'),
45 adoptedStyle(style),
46 adoptedStyle(focusStyle)
47], DuoyunActiveLinkElement);
48export { DuoyunActiveLinkElement };
49//# sourceMappingURL=link.js.map
\No newline at end of file