ds-one 0.2.0-alpha.3 → 0.2.5-alpha.10
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/DS1/0-face/{2025-04-23-device.ts → device.ts} +10 -6
- package/DS1/{utils/language.ts → 0-face/i18n.ts} +236 -92
- package/DS1/0-face/preferences.ts +23 -0
- package/DS1/0-face/pricing.ts +57 -0
- package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
- package/DS1/1-root/one.css +76 -107
- package/DS1/2-core/ds-banner.ts +3 -0
- package/DS1/2-core/ds-button.ts +13 -16
- package/DS1/2-core/ds-cycle.ts +84 -39
- package/DS1/2-core/{ds-year.ts → ds-date.ts} +5 -6
- package/DS1/2-core/ds-icon.ts +4 -4
- package/DS1/2-core/ds-input.ts +1 -0
- package/DS1/2-core/ds-text.ts +27 -3
- package/DS1/2-core/ds-tooltip.ts +9 -14
- package/DS1/3-unit/ds-list.ts +7 -0
- package/DS1/3-unit/ds-row.ts +4 -5
- package/DS1/3-unit/ds-table.ts +5 -6
- package/DS1/4-page/ds-grid.ts +9 -59
- package/DS1/4-page/ds-layout.ts +123 -18
- package/DS1/index.ts +39 -37
- package/LICENSE +1 -1
- package/README.md +43 -133
- package/dist/0-face/{2025-04-23-device.d.ts → device.d.ts} +1 -1
- package/dist/0-face/device.d.ts.map +1 -0
- package/dist/0-face/{2025-04-23-device.js → device.js} +7 -3
- package/dist/{utils/language.d.ts → 0-face/i18n.d.ts} +1 -3
- package/dist/0-face/i18n.d.ts.map +1 -0
- package/dist/{utils/language.js → 0-face/i18n.js} +178 -76
- package/dist/0-face/preferences.d.ts +9 -0
- package/dist/0-face/preferences.d.ts.map +1 -0
- package/dist/0-face/preferences.js +14 -0
- package/dist/0-face/pricing.d.ts +15 -0
- package/dist/0-face/pricing.d.ts.map +1 -0
- package/dist/0-face/pricing.js +46 -0
- package/dist/0-face/theme.d.ts.map +1 -0
- package/dist/2-core/ds-banner.d.ts +1 -0
- package/dist/2-core/ds-banner.d.ts.map +1 -0
- package/dist/2-core/ds-banner.js +2 -0
- package/dist/2-core/ds-button.d.ts +2 -7
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +12 -14
- package/dist/2-core/ds-cycle.d.ts +2 -0
- package/dist/2-core/ds-cycle.d.ts.map +1 -1
- package/dist/2-core/ds-cycle.js +80 -34
- package/dist/2-core/{ds-year.d.ts → ds-date.d.ts} +4 -4
- package/dist/2-core/ds-date.d.ts.map +1 -0
- package/dist/2-core/{ds-year.js → ds-date.js} +5 -5
- package/dist/2-core/ds-icon.js +4 -4
- package/dist/2-core/ds-input.d.ts +1 -0
- package/dist/2-core/ds-input.d.ts.map +1 -0
- package/dist/2-core/ds-input.js +1 -0
- package/dist/2-core/ds-text.d.ts +2 -0
- package/dist/2-core/ds-text.d.ts.map +1 -1
- package/dist/2-core/ds-text.js +26 -3
- package/dist/2-core/ds-tooltip.d.ts +1 -1
- package/dist/2-core/ds-tooltip.d.ts.map +1 -1
- package/dist/2-core/ds-tooltip.js +9 -13
- package/dist/3-unit/ds-list.d.ts.map +1 -1
- package/dist/3-unit/ds-list.js +3 -0
- package/dist/3-unit/{ds-doublenav.d.ts → ds-portfolio-doublenav.d.ts} +4 -4
- package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +1 -0
- package/dist/3-unit/{ds-doublenav.js → ds-portfolio-doublenav.js} +4 -4
- package/dist/3-unit/{ds-panel.d.ts → ds-portfolio-panel.d.ts} +3 -3
- package/dist/3-unit/ds-portfolio-panel.d.ts.map +1 -0
- package/dist/3-unit/{ds-panel.js → ds-portfolio-panel.js} +3 -3
- package/dist/3-unit/{ds-singlenav.d.ts → ds-portfolio-singlenav.d.ts} +4 -4
- package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +1 -0
- package/dist/3-unit/{ds-singlenav.js → ds-portfolio-singlenav.js} +7 -7
- package/dist/3-unit/ds-row.js +4 -4
- package/dist/3-unit/ds-table.d.ts.map +1 -1
- package/dist/3-unit/ds-table.js +5 -6
- package/dist/4-page/ds-grid.d.ts +0 -7
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +9 -54
- package/dist/4-page/ds-layout.d.ts +1 -1
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +126 -17
- package/dist/ds-one.bundle.js +2515 -4132
- package/dist/ds-one.bundle.js.map +4 -4
- package/dist/ds-one.bundle.min.js +245 -787
- package/dist/ds-one.bundle.min.js.map +4 -4
- package/dist/index.d.ts +16 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -34
- package/package.json +8 -9
- package/DS1/0-face/2025-04-23-language.ts +0 -4
- package/DS1/2-core/ds-article.ts +0 -454
- package/DS1/2-core/ds-attributes.ts +0 -155
- package/DS1/2-core/ds-downloadcv.ts +0 -146
- package/DS1/2-core/ds-header.ts +0 -82
- package/DS1/2-core/ds-home.ts +0 -168
- package/DS1/2-core/ds-link.ts +0 -121
- package/DS1/2-core/ds-markdown.ts +0 -252
- package/DS1/2-core/ds-price.ts +0 -108
- package/DS1/2-core/ds-squarecircle.ts +0 -155
- package/DS1/2-core/ds-title.ts +0 -139
- package/DS1/2-core/ds-viewtoggle.ts +0 -83
- package/DS1/3-unit/ds-doublenav.ts +0 -106
- package/DS1/3-unit/ds-panel.ts +0 -27
- package/DS1/3-unit/ds-singlenav.ts +0 -79
- package/DS1/utils/cdn-loader.ts +0 -208
- package/DS1/utils/keys.json +0 -41
- package/DS1/utils/pricing.ts +0 -24
- package/DS1/utils/scroll.ts +0 -184
- package/DS1/utils/settings.ts +0 -23
- package/DS1/utils/viewMode.ts +0 -55
- package/dist/0-face/2025-04-23-device.d.ts.map +0 -1
- package/dist/0-face/2025-04-23-language.d.ts +0 -1
- package/dist/0-face/2025-04-23-language.d.ts.map +0 -1
- package/dist/0-face/2025-04-23-language.js +0 -3
- package/dist/2-core/article-v1.d.ts +0 -129
- package/dist/2-core/article-v1.d.ts.map +0 -1
- package/dist/2-core/article-v1.js +0 -361
- package/dist/2-core/attributes-v1.d.ts +0 -47
- package/dist/2-core/attributes-v1.d.ts.map +0 -1
- package/dist/2-core/attributes-v1.js +0 -128
- package/dist/2-core/cycle-v1.d.ts +0 -66
- package/dist/2-core/cycle-v1.d.ts.map +0 -1
- package/dist/2-core/cycle-v1.js +0 -586
- package/dist/2-core/downloadcv-v1.d.ts +0 -58
- package/dist/2-core/downloadcv-v1.d.ts.map +0 -1
- package/dist/2-core/downloadcv-v1.js +0 -119
- package/dist/2-core/ds-article.d.ts +0 -129
- package/dist/2-core/ds-article.d.ts.map +0 -1
- package/dist/2-core/ds-article.js +0 -361
- package/dist/2-core/ds-attributes.d.ts +0 -47
- package/dist/2-core/ds-attributes.d.ts.map +0 -1
- package/dist/2-core/ds-attributes.js +0 -128
- package/dist/2-core/ds-button.figma.d.ts +0 -2
- package/dist/2-core/ds-button.figma.d.ts.map +0 -1
- package/dist/2-core/ds-button.figma.js +0 -6
- package/dist/2-core/ds-downloadcv.d.ts +0 -58
- package/dist/2-core/ds-downloadcv.d.ts.map +0 -1
- package/dist/2-core/ds-downloadcv.js +0 -119
- package/dist/2-core/ds-header.d.ts +0 -28
- package/dist/2-core/ds-header.d.ts.map +0 -1
- package/dist/2-core/ds-header.js +0 -66
- package/dist/2-core/ds-home.d.ts +0 -26
- package/dist/2-core/ds-home.d.ts.map +0 -1
- package/dist/2-core/ds-home.js +0 -148
- package/dist/2-core/ds-link.d.ts +0 -35
- package/dist/2-core/ds-link.d.ts.map +0 -1
- package/dist/2-core/ds-link.js +0 -85
- package/dist/2-core/ds-markdown.d.ts +0 -7
- package/dist/2-core/ds-markdown.d.ts.map +0 -1
- package/dist/2-core/ds-markdown.js +0 -240
- package/dist/2-core/ds-price.d.ts +0 -46
- package/dist/2-core/ds-price.d.ts.map +0 -1
- package/dist/2-core/ds-price.js +0 -72
- package/dist/2-core/ds-squarecircle.d.ts +0 -50
- package/dist/2-core/ds-squarecircle.d.ts.map +0 -1
- package/dist/2-core/ds-squarecircle.js +0 -133
- package/dist/2-core/ds-title.d.ts +0 -50
- package/dist/2-core/ds-title.d.ts.map +0 -1
- package/dist/2-core/ds-title.js +0 -103
- package/dist/2-core/ds-viewtoggle.d.ts +0 -27
- package/dist/2-core/ds-viewtoggle.d.ts.map +0 -1
- package/dist/2-core/ds-viewtoggle.js +0 -49
- package/dist/2-core/ds-year.d.ts.map +0 -1
- package/dist/2-core/header-v1.d.ts +0 -28
- package/dist/2-core/header-v1.d.ts.map +0 -1
- package/dist/2-core/header-v1.js +0 -66
- package/dist/2-core/home-v1.d.ts +0 -26
- package/dist/2-core/home-v1.d.ts.map +0 -1
- package/dist/2-core/home-v1.js +0 -148
- package/dist/2-core/icon-v1.d.ts +0 -28
- package/dist/2-core/icon-v1.d.ts.map +0 -1
- package/dist/2-core/icon-v1.js +0 -297
- package/dist/2-core/link-v1.d.ts +0 -35
- package/dist/2-core/link-v1.d.ts.map +0 -1
- package/dist/2-core/link-v1.js +0 -85
- package/dist/2-core/markdown-v1.d.ts +0 -7
- package/dist/2-core/markdown-v1.d.ts.map +0 -1
- package/dist/2-core/markdown-v1.js +0 -240
- package/dist/2-core/price-v1.d.ts +0 -46
- package/dist/2-core/price-v1.d.ts.map +0 -1
- package/dist/2-core/price-v1.js +0 -72
- package/dist/2-core/squarecircle-v1.d.ts +0 -50
- package/dist/2-core/squarecircle-v1.d.ts.map +0 -1
- package/dist/2-core/squarecircle-v1.js +0 -133
- package/dist/2-core/text-v1.d.ts +0 -48
- package/dist/2-core/text-v1.d.ts.map +0 -1
- package/dist/2-core/text-v1.js +0 -83
- package/dist/2-core/title-v1.d.ts +0 -50
- package/dist/2-core/title-v1.d.ts.map +0 -1
- package/dist/2-core/title-v1.js +0 -103
- package/dist/2-core/tooltip-v1.d.ts +0 -39
- package/dist/2-core/tooltip-v1.d.ts.map +0 -1
- package/dist/2-core/tooltip-v1.js +0 -145
- package/dist/2-core/viewtoggle-v1.d.ts +0 -27
- package/dist/2-core/viewtoggle-v1.d.ts.map +0 -1
- package/dist/2-core/viewtoggle-v1.js +0 -49
- package/dist/2-core/year-v1.d.ts +0 -16
- package/dist/2-core/year-v1.d.ts.map +0 -1
- package/dist/2-core/year-v1.js +0 -21
- package/dist/3-unit/ds-doublenav.d.ts.map +0 -1
- package/dist/3-unit/ds-panel.d.ts.map +0 -1
- package/dist/3-unit/ds-singlenav.d.ts.map +0 -1
- package/dist/utils/cdn-loader.d.ts +0 -19
- package/dist/utils/cdn-loader.d.ts.map +0 -1
- package/dist/utils/cdn-loader.js +0 -142
- package/dist/utils/keys.json +0 -41
- package/dist/utils/language.d.ts.map +0 -1
- package/dist/utils/pricing.d.ts +0 -8
- package/dist/utils/pricing.d.ts.map +0 -1
- package/dist/utils/pricing.js +0 -14
- package/dist/utils/scroll.d.ts +0 -34
- package/dist/utils/scroll.d.ts.map +0 -1
- package/dist/utils/scroll.js +0 -140
- package/dist/utils/settings.d.ts +0 -9
- package/dist/utils/settings.d.ts.map +0 -1
- package/dist/utils/settings.js +0 -14
- package/dist/utils/theme.d.ts.map +0 -1
- package/dist/utils/viewMode.d.ts +0 -14
- package/dist/utils/viewMode.d.ts.map +0 -1
- package/dist/utils/viewMode.js +0 -46
- /package/DS1/{utils → 0-face}/theme.ts +0 -0
- /package/DS1/{x Icon → x-icon}/1x.svg +0 -0
- /package/DS1/{x Icon → x-icon}/1xdots.svg +0 -0
- /package/DS1/{x Icon → x-icon}/1xgrid.svg +0 -0
- /package/DS1/{x Icon → x-icon}/1xlines.svg +0 -0
- /package/DS1/{x Icon → x-icon}/2x.svg +0 -0
- /package/DS1/{x Icon → x-icon}/2xdots.svg +0 -0
- /package/DS1/{x Icon → x-icon}/2xgrid.svg +0 -0
- /package/DS1/{x Icon → x-icon}/2xlines.svg +0 -0
- /package/DS1/{x Icon → x-icon}/big.svg +0 -0
- /package/DS1/{x Icon → x-icon}/blank.svg +0 -0
- /package/DS1/{x Icon → x-icon}/check.svg +0 -0
- /package/DS1/{x Icon → x-icon}/close.svg +0 -0
- /package/DS1/{x Icon → x-icon}/collapse.svg +0 -0
- /package/DS1/{x Icon → x-icon}/color.svg +0 -0
- /package/DS1/{x Icon → x-icon}/column.svg +0 -0
- /package/DS1/{x Icon → x-icon}/default.svg +0 -0
- /package/DS1/{x Icon → x-icon}/delete.svg +0 -0
- /package/DS1/{x Icon → x-icon}/do.svg +0 -0
- /package/DS1/{x Icon → x-icon}/down.svg +0 -0
- /package/DS1/{x Icon → x-icon}/duplicate.svg +0 -0
- /package/DS1/{x Icon → x-icon}/email.svg +0 -0
- /package/DS1/{x Icon → x-icon}/expand.svg +0 -0
- /package/DS1/{x Icon → x-icon}/gallery.svg +0 -0
- /package/DS1/{x Icon → x-icon}/group.svg +0 -0
- /package/DS1/{x Icon → x-icon}/head.svg +0 -0
- /package/DS1/{x Icon → x-icon}/icon.svg +0 -0
- /package/DS1/{x Icon → x-icon}/left.svg +0 -0
- /package/DS1/{x Icon → x-icon}/lock.svg +0 -0
- /package/DS1/{x Icon → x-icon}/mic.svg +0 -0
- /package/DS1/{x Icon → x-icon}/minimize.svg +0 -0
- /package/DS1/{x Icon → x-icon}/more.svg +0 -0
- /package/DS1/{x Icon → x-icon}/note.svg +0 -0
- /package/DS1/{x Icon → x-icon}/open.svg +0 -0
- /package/DS1/{x Icon → x-icon}/page.svg +0 -0
- /package/DS1/{x Icon → x-icon}/plus.svg +0 -0
- /package/DS1/{x Icon → x-icon}/rewind.svg +0 -0
- /package/DS1/{x Icon → x-icon}/right.svg +0 -0
- /package/DS1/{x Icon/row..svg → x-icon/row.svg} +0 -0
- /package/DS1/{x Icon → x-icon}/search.svg +0 -0
- /package/DS1/{x Icon → x-icon}/see.svg +0 -0
- /package/DS1/{x Icon → x-icon}/star.svg +0 -0
- /package/DS1/{x Icon → x-icon}/title.svg +0 -0
- /package/DS1/{x Icon → x-icon}/undo.svg +0 -0
- /package/DS1/{x Icon → x-icon}/ungroup.svg +0 -0
- /package/DS1/{x Icon → x-icon}/unhead.svg +0 -0
- /package/DS1/{x Icon → x-icon}/unicon.svg +0 -0
- /package/DS1/{x Icon → x-icon}/unlock.svg +0 -0
- /package/DS1/{x Icon → x-icon}/unmic.svg +0 -0
- /package/DS1/{x Icon → x-icon}/unsee.svg +0 -0
- /package/DS1/{x Icon → x-icon}/unstar.svg +0 -0
- /package/DS1/{x Icon → x-icon}/untitle.svg +0 -0
- /package/DS1/{x Icon → x-icon}/up.svg +0 -0
- /package/dist/{utils → 0-face}/theme.d.ts +0 -0
- /package/dist/{utils → 0-face}/theme.js +0 -0
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from "lit";
|
|
2
|
-
import { getText } from "../utils/language";
|
|
3
|
-
/**
|
|
4
|
-
* A component for displaying project/work attributes (year, category, status)
|
|
5
|
-
*
|
|
6
|
-
* @element ds-attributes
|
|
7
|
-
* @prop {string} year - Year key for translation
|
|
8
|
-
* @prop {string} category - Category key for translation
|
|
9
|
-
* @prop {string} status - Status key for translation
|
|
10
|
-
* @prop {string} type - Type of attributes: "project" or "work"
|
|
11
|
-
*/
|
|
12
|
-
export class Attributes extends LitElement {
|
|
13
|
-
static get properties() {
|
|
14
|
-
return {
|
|
15
|
-
year: { type: String, reflect: true },
|
|
16
|
-
category: { type: String, reflect: true },
|
|
17
|
-
status: { type: String, reflect: true },
|
|
18
|
-
type: { type: String, reflect: true },
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
constructor() {
|
|
22
|
-
super();
|
|
23
|
-
this.year = "";
|
|
24
|
-
this.category = "";
|
|
25
|
-
this.status = "";
|
|
26
|
-
this.type = "project";
|
|
27
|
-
this.boundHandlers = {
|
|
28
|
-
languageChanged: (() => {
|
|
29
|
-
this.requestUpdate();
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
connectedCallback() {
|
|
34
|
-
super.connectedCallback();
|
|
35
|
-
window.addEventListener("language-changed", this.boundHandlers.languageChanged);
|
|
36
|
-
}
|
|
37
|
-
disconnectedCallback() {
|
|
38
|
-
super.disconnectedCallback();
|
|
39
|
-
window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
|
|
40
|
-
}
|
|
41
|
-
_getStatusClass(status) {
|
|
42
|
-
if (status.includes("Done"))
|
|
43
|
-
return "done";
|
|
44
|
-
if (status.includes("Ongoing"))
|
|
45
|
-
return "ongoing";
|
|
46
|
-
if (status.includes("Pending"))
|
|
47
|
-
return "pending";
|
|
48
|
-
if (status.includes("NotStarted"))
|
|
49
|
-
return "not-started";
|
|
50
|
-
return "pending";
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
return html `
|
|
54
|
-
${this.year
|
|
55
|
-
? html `
|
|
56
|
-
<div class="attribute-row">${getText(this.year) || this.year}</div>
|
|
57
|
-
`
|
|
58
|
-
: ""}
|
|
59
|
-
${this.category
|
|
60
|
-
? html `
|
|
61
|
-
<div class="attribute-row">
|
|
62
|
-
${this.type === "work"
|
|
63
|
-
? html `<span
|
|
64
|
-
class="status-indicator ${this._getStatusClass(this.status)}"
|
|
65
|
-
></span>`
|
|
66
|
-
: ""}
|
|
67
|
-
${getText(this.category) || this.category}
|
|
68
|
-
</div>
|
|
69
|
-
`
|
|
70
|
-
: ""}
|
|
71
|
-
${this.status && this.type === "project"
|
|
72
|
-
? html `
|
|
73
|
-
<div class="attribute-row">
|
|
74
|
-
<span
|
|
75
|
-
class="status-indicator ${this._getStatusClass(this.status)}"
|
|
76
|
-
></span>
|
|
77
|
-
${getText(this.status) || this.status}
|
|
78
|
-
</div>
|
|
79
|
-
`
|
|
80
|
-
: ""}
|
|
81
|
-
`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
Attributes.styles = css `
|
|
85
|
-
:host {
|
|
86
|
-
display: flex;
|
|
87
|
-
flex-direction: row;
|
|
88
|
-
gap: calc(16px * var(--scaling-factor));
|
|
89
|
-
align-items: flex-start;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.attribute-row {
|
|
93
|
-
display: inline-flex;
|
|
94
|
-
height: calc(20px * var(--scaling-factor));
|
|
95
|
-
padding: 0px calc(2px * var(--scaling-factor));
|
|
96
|
-
align-items: flex-start;
|
|
97
|
-
gap: calc(5px * var(--scaling-factor));
|
|
98
|
-
font-family: var(--typeface);
|
|
99
|
-
font-size: calc(14px * var(--scaling-factor));
|
|
100
|
-
color: light-dark(var(--slate), var(--slate-dark));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.status-indicator {
|
|
104
|
-
width: calc(8px * var(--scaling-factor));
|
|
105
|
-
height: calc(8px * var(--scaling-factor));
|
|
106
|
-
display: inline-block;
|
|
107
|
-
transition:
|
|
108
|
-
background 0.2s,
|
|
109
|
-
border-radius 0.2s;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.status-indicator.done {
|
|
113
|
-
background-color: green;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.status-indicator.ongoing {
|
|
117
|
-
background-color: #30adec;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.status-indicator.pending {
|
|
121
|
-
background-color: #f6c71c;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.status-indicator.not-started {
|
|
125
|
-
background-color: #b1b4b9;
|
|
126
|
-
}
|
|
127
|
-
`;
|
|
128
|
-
customElements.define("ds-attributes", Attributes);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ds-button.figma.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-button.figma.ts"],"names":[],"mappings":""}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* Download CV button that resolves language-specific URLs
|
|
4
|
-
*
|
|
5
|
-
* @element ds-downloadcv
|
|
6
|
-
* @prop {string} urlEn - URL for English CV
|
|
7
|
-
* @prop {string} urlDa - URL for Danish CV
|
|
8
|
-
* @prop {string} urlJa - URL for Japanese CV
|
|
9
|
-
* @prop {string} filename - Base filename for download (default: "cv")
|
|
10
|
-
*/
|
|
11
|
-
export declare class DownloadCV extends LitElement {
|
|
12
|
-
static properties: {
|
|
13
|
-
urlEn: {
|
|
14
|
-
type: StringConstructor;
|
|
15
|
-
attribute: string;
|
|
16
|
-
reflect: boolean;
|
|
17
|
-
};
|
|
18
|
-
urlDa: {
|
|
19
|
-
type: StringConstructor;
|
|
20
|
-
attribute: string;
|
|
21
|
-
reflect: boolean;
|
|
22
|
-
};
|
|
23
|
-
urlJa: {
|
|
24
|
-
type: StringConstructor;
|
|
25
|
-
attribute: string;
|
|
26
|
-
reflect: boolean;
|
|
27
|
-
};
|
|
28
|
-
filename: {
|
|
29
|
-
type: StringConstructor;
|
|
30
|
-
reflect: boolean;
|
|
31
|
-
};
|
|
32
|
-
_activeUrl: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
state: boolean;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
urlEn: string;
|
|
38
|
-
urlDa: string;
|
|
39
|
-
urlJa: string;
|
|
40
|
-
filename: string;
|
|
41
|
-
_activeUrl: string;
|
|
42
|
-
constructor();
|
|
43
|
-
static styles: import("lit").CSSResult;
|
|
44
|
-
connectedCallback(): void;
|
|
45
|
-
disconnectedCallback(): void;
|
|
46
|
-
updated(changed: Map<string, unknown>): void;
|
|
47
|
-
private _handleLanguageChange;
|
|
48
|
-
private _resolveUrl;
|
|
49
|
-
private _download;
|
|
50
|
-
private _inferExtFromUrl;
|
|
51
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
52
|
-
}
|
|
53
|
-
declare global {
|
|
54
|
-
interface HTMLElementTagNameMap {
|
|
55
|
-
"ds-downloadcv": DownloadCV;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=ds-downloadcv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ds-downloadcv.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-downloadcv.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;;GAQG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;MAMf;IAEM,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;;IAW3B,MAAM,CAAC,MAAM,0BAIX;IAEF,iBAAiB;IAMjB,oBAAoB;IAKpB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAMrC,OAAO,CAAC,qBAAqB,CAE3B;IAEF,OAAO,CAAC,WAAW;YAYL,SAAS;IAwCvB,OAAO,CAAC,gBAAgB;IAUxB,MAAM;CAWP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,UAAU,CAAC;KAC7B;CACF"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from "lit";
|
|
2
|
-
import { currentLanguage, translate } from "../utils/language";
|
|
3
|
-
/**
|
|
4
|
-
* Download CV button that resolves language-specific URLs
|
|
5
|
-
*
|
|
6
|
-
* @element ds-downloadcv
|
|
7
|
-
* @prop {string} urlEn - URL for English CV
|
|
8
|
-
* @prop {string} urlDa - URL for Danish CV
|
|
9
|
-
* @prop {string} urlJa - URL for Japanese CV
|
|
10
|
-
* @prop {string} filename - Base filename for download (default: "cv")
|
|
11
|
-
*/
|
|
12
|
-
export class DownloadCV extends LitElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this._handleLanguageChange = () => {
|
|
16
|
-
this._resolveUrl();
|
|
17
|
-
};
|
|
18
|
-
this.urlEn = "";
|
|
19
|
-
this.urlDa = "";
|
|
20
|
-
this.urlJa = "";
|
|
21
|
-
this.filename = "cv";
|
|
22
|
-
this._activeUrl = "";
|
|
23
|
-
}
|
|
24
|
-
connectedCallback() {
|
|
25
|
-
super.connectedCallback();
|
|
26
|
-
this._resolveUrl();
|
|
27
|
-
window.addEventListener("language-changed", this._handleLanguageChange);
|
|
28
|
-
}
|
|
29
|
-
disconnectedCallback() {
|
|
30
|
-
super.disconnectedCallback();
|
|
31
|
-
window.removeEventListener("language-changed", this._handleLanguageChange);
|
|
32
|
-
}
|
|
33
|
-
updated(changed) {
|
|
34
|
-
if (changed.has("urlEn") || changed.has("urlDa") || changed.has("urlJa")) {
|
|
35
|
-
this._resolveUrl();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
_resolveUrl() {
|
|
39
|
-
const lang = currentLanguage.value || "en-US";
|
|
40
|
-
const prefix = (lang.split("-")[0] || "en").toLowerCase();
|
|
41
|
-
let url = "";
|
|
42
|
-
if (prefix === "da")
|
|
43
|
-
url = this.urlDa || this.urlEn || this.urlJa;
|
|
44
|
-
else if (prefix === "ja")
|
|
45
|
-
url = this.urlJa || this.urlEn || this.urlDa;
|
|
46
|
-
else
|
|
47
|
-
url = this.urlEn || this.urlDa || this.urlJa;
|
|
48
|
-
this._activeUrl = url || "";
|
|
49
|
-
}
|
|
50
|
-
async _download() {
|
|
51
|
-
if (!this._activeUrl) {
|
|
52
|
-
console.warn("[ds-downloadcv] No URL available");
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
console.log("[ds-downloadcv] Attempting download from:", this._activeUrl);
|
|
56
|
-
try {
|
|
57
|
-
// Prefer blob download (reliable filename, works cross-origin with CORS)
|
|
58
|
-
const res = await fetch(this._activeUrl, { mode: "cors" });
|
|
59
|
-
console.log("[ds-downloadcv] Fetch response:", res.status, res.statusText);
|
|
60
|
-
if (!res.ok)
|
|
61
|
-
throw new Error(`HTTP ${res.status}`);
|
|
62
|
-
const blob = await res.blob();
|
|
63
|
-
const langPrefix = (currentLanguage.value || "en-US")
|
|
64
|
-
.split("-")[0]
|
|
65
|
-
.toLowerCase();
|
|
66
|
-
const fileExt = this._inferExtFromUrl(this._activeUrl) || "pdf";
|
|
67
|
-
const name = `${this.filename || "cv"}-${langPrefix}.${fileExt}`;
|
|
68
|
-
const url = URL.createObjectURL(blob);
|
|
69
|
-
const a = document.createElement("a");
|
|
70
|
-
a.href = url;
|
|
71
|
-
a.download = name;
|
|
72
|
-
document.body.appendChild(a);
|
|
73
|
-
a.click();
|
|
74
|
-
a.remove();
|
|
75
|
-
URL.revokeObjectURL(url);
|
|
76
|
-
console.log("[ds-downloadcv] Download triggered successfully");
|
|
77
|
-
}
|
|
78
|
-
catch (err) {
|
|
79
|
-
console.error("[ds-downloadcv] Fetch failed, using fallback:", err);
|
|
80
|
-
// Fallback: open the file directly
|
|
81
|
-
window.open(this._activeUrl, "_blank", "noopener,noreferrer");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
_inferExtFromUrl(u) {
|
|
85
|
-
const qIndex = u.indexOf("?");
|
|
86
|
-
const clean = qIndex >= 0 ? u.slice(0, qIndex) : u;
|
|
87
|
-
const dot = clean.lastIndexOf(".");
|
|
88
|
-
if (dot === -1)
|
|
89
|
-
return null;
|
|
90
|
-
const ext = clean.slice(dot + 1).toLowerCase();
|
|
91
|
-
if (ext.length > 5)
|
|
92
|
-
return null;
|
|
93
|
-
return ext;
|
|
94
|
-
}
|
|
95
|
-
render() {
|
|
96
|
-
const disabled = !this._activeUrl;
|
|
97
|
-
return html `
|
|
98
|
-
<ds-button
|
|
99
|
-
variant="primary"
|
|
100
|
-
.disabled=${disabled}
|
|
101
|
-
default-text=${translate("downloadCV")}
|
|
102
|
-
@click=${() => this._download()}
|
|
103
|
-
></ds-button>
|
|
104
|
-
`;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
DownloadCV.properties = {
|
|
108
|
-
urlEn: { type: String, attribute: "url-en", reflect: true },
|
|
109
|
-
urlDa: { type: String, attribute: "url-da", reflect: true },
|
|
110
|
-
urlJa: { type: String, attribute: "url-ja", reflect: true },
|
|
111
|
-
filename: { type: String, reflect: true },
|
|
112
|
-
_activeUrl: { type: String, state: true },
|
|
113
|
-
};
|
|
114
|
-
DownloadCV.styles = css `
|
|
115
|
-
:host {
|
|
116
|
-
display: inline-flex;
|
|
117
|
-
}
|
|
118
|
-
`;
|
|
119
|
-
customElements.define("ds-downloadcv", DownloadCV);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* A component for displaying page headers
|
|
4
|
-
*
|
|
5
|
-
* @element ds-header
|
|
6
|
-
* @prop {string} gridarea - Grid area placement
|
|
7
|
-
*/
|
|
8
|
-
export declare class Header extends LitElement {
|
|
9
|
-
private _gridArea;
|
|
10
|
-
static get properties(): {
|
|
11
|
-
gridarea: {
|
|
12
|
-
type: StringConstructor;
|
|
13
|
-
reflect: boolean;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
set gridarea(value: string);
|
|
17
|
-
get gridarea(): string;
|
|
18
|
-
static styles: import("lit").CSSResult;
|
|
19
|
-
constructor();
|
|
20
|
-
firstUpdated(): void;
|
|
21
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
22
|
-
}
|
|
23
|
-
declare global {
|
|
24
|
-
interface HTMLElementTagNameMap {
|
|
25
|
-
"ds-header": Header;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=ds-header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ds-header.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C;;;;;GAKG;AACH,qBAAa,MAAO,SAAQ,UAAU;IACpC,OAAO,CAAC,SAAS,CAAM;IAEvB,MAAM,KAAK,UAAU;;;;;MAIpB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAKzB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,MAAM,CAAC,MAAM,0BAuBX;;IAMF,YAAY;IAMZ,MAAM;CASP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
|
package/dist/2-core/ds-header.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* A component for displaying page headers
|
|
4
|
-
*
|
|
5
|
-
* @element ds-header
|
|
6
|
-
* @prop {string} gridarea - Grid area placement
|
|
7
|
-
*/
|
|
8
|
-
export class Header extends LitElement {
|
|
9
|
-
static get properties() {
|
|
10
|
-
return {
|
|
11
|
-
gridarea: { type: String, reflect: true },
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
set gridarea(value) {
|
|
15
|
-
const oldValue = this._gridArea;
|
|
16
|
-
this._gridArea = value;
|
|
17
|
-
this.style.gridArea = value;
|
|
18
|
-
this.requestUpdate("gridarea", oldValue);
|
|
19
|
-
}
|
|
20
|
-
get gridarea() {
|
|
21
|
-
return this._gridArea;
|
|
22
|
-
}
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
this._gridArea = "";
|
|
26
|
-
}
|
|
27
|
-
firstUpdated() {
|
|
28
|
-
if (this.hasAttribute("gridarea")) {
|
|
29
|
-
this.style.gridArea = this.getAttribute("gridarea") || "";
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
render() {
|
|
33
|
-
return html `
|
|
34
|
-
<h2
|
|
35
|
-
style="display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; width: 100%;"
|
|
36
|
-
>
|
|
37
|
-
<slot></slot>
|
|
38
|
-
</h2>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
Header.styles = css `
|
|
43
|
-
:host {
|
|
44
|
-
display: flex;
|
|
45
|
-
padding: calc(2px * var(--scaling-factor));
|
|
46
|
-
align-items: flex-start;
|
|
47
|
-
width: 100%;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
h2 {
|
|
51
|
-
display: flex;
|
|
52
|
-
place-content: center;
|
|
53
|
-
font-family: var(--typeface);
|
|
54
|
-
color: light-dark(var(--black), var(--white));
|
|
55
|
-
align-items: center;
|
|
56
|
-
font-weight: 500;
|
|
57
|
-
font-size: calc(14px * var(--scaling-factor));
|
|
58
|
-
margin: 0;
|
|
59
|
-
width: 100%;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
::slotted(*) {
|
|
63
|
-
margin: 0;
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
customElements.define("ds-header", Header);
|
package/dist/2-core/ds-home.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
export declare class Home extends LitElement {
|
|
3
|
-
static properties: any;
|
|
4
|
-
state: "active" | "disabled";
|
|
5
|
-
/**
|
|
6
|
-
* Ensure Home is always disabled on mobile devices.
|
|
7
|
-
* Runs once when the element is connected to the DOM.
|
|
8
|
-
*/
|
|
9
|
-
connectedCallback(): void;
|
|
10
|
-
/**
|
|
11
|
-
* Lightweight mobile detection. Mirrors the app's utility without importing it
|
|
12
|
-
* to keep the design system component self-contained.
|
|
13
|
-
*/
|
|
14
|
-
private _isMobileDevice;
|
|
15
|
-
protected updated(): void;
|
|
16
|
-
static styles: import("lit").CSSResult;
|
|
17
|
-
private _navigateHome;
|
|
18
|
-
private _onKeyDown;
|
|
19
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
20
|
-
}
|
|
21
|
-
declare global {
|
|
22
|
-
interface HTMLElementTagNameMap {
|
|
23
|
-
"ds-home": Home;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=ds-home.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ds-home.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU,EAEZ,GAAG,CAAC;IAET,KAAK,EAAE,QAAQ,GAAG,UAAU,CAAY;IAExC;;;OAGG;IACH,iBAAiB;IAOjB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAoBvB,SAAS,CAAC,OAAO,IAAI,IAAI;IAOzB,MAAM,CAAC,MAAM,0BAyEX;IAIF,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,UAAU;IAQlB,MAAM;CAgBP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
package/dist/2-core/ds-home.js
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from "lit";
|
|
2
|
-
// Home tab button that reveals on hover (active) or stays visible and non-interactive (disabled)
|
|
3
|
-
export class Home extends LitElement {
|
|
4
|
-
constructor() {
|
|
5
|
-
super(...arguments);
|
|
6
|
-
this.state = "active";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Ensure Home is always disabled on mobile devices.
|
|
10
|
-
* Runs once when the element is connected to the DOM.
|
|
11
|
-
*/
|
|
12
|
-
connectedCallback() {
|
|
13
|
-
super.connectedCallback();
|
|
14
|
-
if (this._isMobileDevice()) {
|
|
15
|
-
this.state = "disabled";
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Lightweight mobile detection. Mirrors the app's utility without importing it
|
|
20
|
-
* to keep the design system component self-contained.
|
|
21
|
-
*/
|
|
22
|
-
_isMobileDevice() {
|
|
23
|
-
const nav = globalThis.navigator;
|
|
24
|
-
const win = globalThis.window;
|
|
25
|
-
const ua = (nav && (nav.userAgent || nav.vendor)) || (win && win.opera) || "";
|
|
26
|
-
const uaMatchesMobile = /Mobile|Android|iP(ad|hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)|Windows Phone|Phone|Tablet/i.test(ua);
|
|
27
|
-
const touchPoints = (nav && nav.maxTouchPoints) || 0;
|
|
28
|
-
const isTouchCapable = touchPoints > 1;
|
|
29
|
-
const narrowViewport = win
|
|
30
|
-
? Math.min(win.innerWidth || 0, win.innerHeight || 0) <= 820
|
|
31
|
-
: false;
|
|
32
|
-
return uaMatchesMobile || (isTouchCapable && narrowViewport);
|
|
33
|
-
}
|
|
34
|
-
updated() {
|
|
35
|
-
// Enforce disabled on mobile even if someone flips the state later
|
|
36
|
-
if (this._isMobileDevice() && this.state !== "disabled") {
|
|
37
|
-
this.state = "disabled";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
// No setup needed; `state` defaults to "active" and reflects if provided
|
|
41
|
-
_navigateHome() {
|
|
42
|
-
if (this.state === "disabled")
|
|
43
|
-
return;
|
|
44
|
-
window.location.href = "./home.html";
|
|
45
|
-
}
|
|
46
|
-
_onKeyDown(e) {
|
|
47
|
-
if (this.state === "disabled")
|
|
48
|
-
return;
|
|
49
|
-
if (e?.key === "Enter" || e?.key === " ") {
|
|
50
|
-
e.preventDefault();
|
|
51
|
-
this._navigateHome();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
const isDisabled = this.state === "disabled";
|
|
56
|
-
return html `
|
|
57
|
-
<div class="hover-fill"></div>
|
|
58
|
-
<div
|
|
59
|
-
class="home ${isDisabled ? "is-disabled" : "is-active"}"
|
|
60
|
-
role="button"
|
|
61
|
-
aria-disabled="${String(isDisabled)}"
|
|
62
|
-
tabindex="${isDisabled ? -1 : 0}"
|
|
63
|
-
@click="${this._navigateHome}"
|
|
64
|
-
@keydown="${this._onKeyDown}"
|
|
65
|
-
>
|
|
66
|
-
<ds-text key="home"></ds-text>
|
|
67
|
-
</div>
|
|
68
|
-
`;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
Home.properties = {
|
|
72
|
-
state: { type: String, reflect: true }, // "active" | "disabled"
|
|
73
|
-
};
|
|
74
|
-
Home.styles = css `
|
|
75
|
-
:host {
|
|
76
|
-
/* local sizing vars, derived from one.css */
|
|
77
|
-
--home-visible: calc(var(--1) * 0.1); /* 2px */
|
|
78
|
-
|
|
79
|
-
position: relative;
|
|
80
|
-
display: flex; /* expand hover zone horizontally */
|
|
81
|
-
width: 100%; /* take the whole row width of the app container */
|
|
82
|
-
height: calc(
|
|
83
|
-
var(--1) * var(--scaling-factor)
|
|
84
|
-
); /* provide hover zone under the tab */
|
|
85
|
-
font-family: var(--typeface);
|
|
86
|
-
overflow: hidden; /* hide the part above the host */
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* Disabled: preserve full hover area space but keep inactive */
|
|
90
|
-
:host([state="disabled"]) {
|
|
91
|
-
height: var(--1); /* keep same layout height as active */
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.home {
|
|
96
|
-
position: absolute;
|
|
97
|
-
left: 0;
|
|
98
|
-
width: calc(var(--4) * var(--scaling-factor));
|
|
99
|
-
height: calc(var(--1) * var(--scaling-factor));
|
|
100
|
-
margin: 0 calc(var(--1) * var(--scaling-factor));
|
|
101
|
-
display: flex;
|
|
102
|
-
align-items: center;
|
|
103
|
-
background: var(--accent-color);
|
|
104
|
-
color: light-dark(var(--black), var(--black));
|
|
105
|
-
user-select: none;
|
|
106
|
-
transition: top 120ms ease;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* Inner text spacing without affecting the 80px outer width */
|
|
110
|
-
.home > ds-text {
|
|
111
|
-
padding: 0 calc(var(--1) * 0.15 * var(--scaling-factor));
|
|
112
|
-
box-sizing: border-box;
|
|
113
|
-
height: 100%;
|
|
114
|
-
display: inline-flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* invisible flex filler to extend hover area to the right */
|
|
119
|
-
.hover-fill {
|
|
120
|
-
flex: 1 1 auto;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Active: hidden until hover */
|
|
124
|
-
.home.is-active {
|
|
125
|
-
cursor: pointer;
|
|
126
|
-
/* Hide above, leave a 2px strip visible */
|
|
127
|
-
top: calc(var(--home-visible) - var(--1));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* Reveal the tab when hovering anywhere in the host area
|
|
131
|
-
(the host is 80x20, while the tab starts hidden above) */
|
|
132
|
-
:host(:hover) .home.is-active {
|
|
133
|
-
top: 0;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* Disabled: stays hidden and not interactive */
|
|
137
|
-
.home.is-disabled {
|
|
138
|
-
top: calc(var(--home-visible) - var(--1));
|
|
139
|
-
cursor: default;
|
|
140
|
-
pointer-events: none;
|
|
141
|
-
color: var(--accent-color);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.label {
|
|
145
|
-
font-size: var(--type-size-default);
|
|
146
|
-
}
|
|
147
|
-
`;
|
|
148
|
-
customElements.define("ds-home", Home);
|
package/dist/2-core/ds-link.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
2
|
-
/**
|
|
3
|
-
* A component for creating localized links that open in new tabs
|
|
4
|
-
*
|
|
5
|
-
* @element ds-link
|
|
6
|
-
* @prop {string} href - The URL to link to
|
|
7
|
-
*/
|
|
8
|
-
export declare class Link extends LitElement {
|
|
9
|
-
static get properties(): {
|
|
10
|
-
href: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
reflect: boolean;
|
|
13
|
-
};
|
|
14
|
-
_text: {
|
|
15
|
-
type: StringConstructor;
|
|
16
|
-
state: boolean;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
href: string;
|
|
20
|
-
_text: string;
|
|
21
|
-
private boundHandlers;
|
|
22
|
-
constructor();
|
|
23
|
-
static styles: import("lit").CSSResult;
|
|
24
|
-
connectedCallback(): void;
|
|
25
|
-
disconnectedCallback(): void;
|
|
26
|
-
updated(changedProperties: Map<string, unknown>): void;
|
|
27
|
-
_loadText(): void;
|
|
28
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
29
|
-
}
|
|
30
|
-
declare global {
|
|
31
|
-
interface HTMLElementTagNameMap {
|
|
32
|
-
"ds-link": Link;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=ds-link.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ds-link.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;GAKG;AACH,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,KAAK,UAAU;;;;;;;;;MAKpB;IAEO,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,aAAa,CAAqC;;IAe1D,MAAM,CAAC,MAAM,0BAeX;IAEF,iBAAiB;IAiBjB,oBAAoB;IAYpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ/C,SAAS;IAWT,MAAM;CAYP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|