ds-one 0.2.5-alpha.1 → 0.2.5-alpha.2
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/1-root/one.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-portfolio-panel.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-portfolio-panel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ds-portfolio-panel.d.ts","sourceRoot":"","sources":["../../DS1/3-unit/ds-portfolio-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,qBAAa,cAAe,SAAQ,UAAU;IAC5C,MAAM,CAAC,MAAM,0BAQX;IAEF,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,cAAc,CAAC;KACnC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ds-one",
|
|
3
|
-
"version": "0.2.5-alpha.
|
|
3
|
+
"version": "0.2.5-alpha.2",
|
|
4
4
|
"description": "A component-based design system built with TypeScript and LitElement that provides reusable UI components with built-in theming, internationalization, and accessibility features.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from "lit";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A component for single navigation links
|
|
5
|
-
*
|
|
6
|
-
* @element portfolio-singlenav
|
|
7
|
-
* @prop {string} type - Type of navigation: "projects" or "work"
|
|
8
|
-
* @prop {string} to - Optional custom destination URL
|
|
9
|
-
*/
|
|
10
|
-
export class PortfolioSingleNav extends LitElement {
|
|
11
|
-
static get properties() {
|
|
12
|
-
return {
|
|
13
|
-
type: { type: String, reflect: true },
|
|
14
|
-
to: { type: String, reflect: true },
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare type: "projects" | "work";
|
|
19
|
-
declare to?: string;
|
|
20
|
-
|
|
21
|
-
constructor() {
|
|
22
|
-
super();
|
|
23
|
-
this.type = "work";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static styles = css`
|
|
27
|
-
:host {
|
|
28
|
-
display: flex;
|
|
29
|
-
justify-content: end;
|
|
30
|
-
gap: calc(5px * var(--scaling-factor));
|
|
31
|
-
padding: calc(2px * var(--scaling-factor));
|
|
32
|
-
align-items: center;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
a {
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
gap: calc(5px * var(--scaling-factor));
|
|
39
|
-
text-decoration: none;
|
|
40
|
-
color: inherit;
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
|
|
44
|
-
render() {
|
|
45
|
-
const navConfig = this.getNavConfig();
|
|
46
|
-
const href = this.to || navConfig.href;
|
|
47
|
-
|
|
48
|
-
return html`
|
|
49
|
-
<a href="${href}">
|
|
50
|
-
<ds-text key="${navConfig.key}"></ds-text>
|
|
51
|
-
<ds-icon type="right"></ds-icon>
|
|
52
|
-
</a>
|
|
53
|
-
`;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private getNavConfig() {
|
|
57
|
-
switch (this.type) {
|
|
58
|
-
case "projects":
|
|
59
|
-
return {
|
|
60
|
-
href: "/projects",
|
|
61
|
-
key: "projects",
|
|
62
|
-
};
|
|
63
|
-
case "work":
|
|
64
|
-
return {
|
|
65
|
-
href: "/",
|
|
66
|
-
key: "workExperience",
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
customElements.define("portfolio-singlenav", PortfolioSingleNav);
|
|
73
|
-
|
|
74
|
-
declare global {
|
|
75
|
-
interface HTMLElementTagNameMap {
|
|
76
|
-
"portfolio-singlenav": PortfolioSingleNav;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|