1 | var __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 | };
|
7 | import { adoptedStyle, customElement } from '@mantou/gem/lib/decorators';
|
8 | import { createCSSSheet, css } from '@mantou/gem/lib/utils';
|
9 | import { GemLinkElement, GemActiveLinkElement } from '@mantou/gem/elements/base/link';
|
10 | import { commonHandle } from '../lib/hotkeys';
|
11 | import { focusStyle } from '../lib/styles';
|
12 | export * from '@mantou/gem/elements/base/link';
|
13 | const style = createCSSSheet(css `
|
14 | :host {
|
15 | color: inherit;
|
16 | text-decoration: inherit;
|
17 | }
|
18 | `);
|
19 |
|
20 |
|
21 |
|
22 | let DuoyunLinkElement = class DuoyunLinkElement extends GemLinkElement {
|
23 | constructor() {
|
24 | super();
|
25 | this.addEventListener('keydown', commonHandle);
|
26 | }
|
27 | };
|
28 | DuoyunLinkElement = __decorate([
|
29 | customElement('dy-link'),
|
30 | adoptedStyle(style),
|
31 | adoptedStyle(focusStyle)
|
32 | ], DuoyunLinkElement);
|
33 | export { DuoyunLinkElement };
|
34 |
|
35 |
|
36 |
|
37 | let DuoyunActiveLinkElement = class DuoyunActiveLinkElement extends GemActiveLinkElement {
|
38 | constructor() {
|
39 | super();
|
40 | this.addEventListener('keydown', commonHandle);
|
41 | }
|
42 | };
|
43 | DuoyunActiveLinkElement = __decorate([
|
44 | customElement('dy-active-link'),
|
45 | adoptedStyle(style),
|
46 | adoptedStyle(focusStyle)
|
47 | ], DuoyunActiveLinkElement);
|
48 | export { DuoyunActiveLinkElement };
|
49 |
|
\ | No newline at end of file |