ds-one 0.2.0-alpha.3 → 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/{utils/language.ts → 0-face/i18n.ts} +197 -2
- package/DS1/0-face/preferences.ts +23 -0
- package/DS1/0-face/pricing.ts +57 -0
- package/DS1/1-root/one.css +1 -1
- package/DS1/2-core/ds-button.ts +1 -1
- package/DS1/2-core/ds-cycle.ts +17 -18
- package/DS1/2-core/{ds-year.ts → ds-date.ts} +4 -4
- package/DS1/2-core/ds-input.ts +1 -0
- package/DS1/2-core/ds-text.ts +1 -1
- package/DS1/2-core/ds-tooltip.ts +4 -3
- package/DS1/3-unit/doublenav-v1.ts +105 -0
- package/DS1/3-unit/{ds-doublenav.ts → ds-portfolio-doublenav.ts} +4 -5
- package/DS1/3-unit/ds-portfolio-panel.ts +25 -0
- package/DS1/3-unit/list-v1.ts +24 -0
- package/DS1/3-unit/{ds-panel.ts → panel-v1.ts} +2 -3
- package/DS1/3-unit/row-v1.ts +52 -0
- package/DS1/3-unit/{ds-singlenav.ts → singlenav-v1.ts} +4 -5
- package/DS1/4-page/ds-grid.ts +1 -1
- package/DS1/index.ts +39 -37
- 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/{utils/language.d.ts → 0-face/i18n.d.ts} +1 -1
- package/dist/0-face/i18n.d.ts.map +1 -0
- package/dist/{utils/language.js → 0-face/i18n.js} +141 -2
- 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-button.js +1 -1
- package/dist/2-core/ds-cycle.js +15 -15
- 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} +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.js +1 -1
- package/dist/2-core/ds-tooltip.d.ts.map +1 -1
- package/dist/2-core/ds-tooltip.js +4 -2
- 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} +4 -4
- package/dist/4-page/ds-grid.js +1 -1
- package/dist/ds-one.bundle.js +2075 -3774
- package/dist/ds-one.bundle.js.map +4 -4
- package/dist/ds-one.bundle.min.js +74 -740
- 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 +2 -2
- 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/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/0-face/{2025-04-23-device.ts → device.ts} +0 -0
- /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 → 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/0-face/{2025-04-23-device.js → device.js} +0 -0
- /package/dist/{utils → 0-face}/theme.d.ts +0 -0
- /package/dist/{utils → 0-face}/theme.js +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
interface CustomElementRegistry {
|
|
5
|
+
define(name: string, constructor: typeof LitElement): void;
|
|
6
|
+
}
|
|
7
|
+
var customElements: CustomElementRegistry;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class Row extends LitElement {
|
|
11
|
+
static properties = {
|
|
12
|
+
type: { type: String, reflect: true },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
declare type: "fill" | "centered";
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.type = "fill";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static styles = css`
|
|
23
|
+
:host {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: end;
|
|
26
|
+
width: calc(240px * var(--scaling-factor));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([type="fill"]) {
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
height: calc(var(--1) * var(--scaling-factor));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([type="centered"]) {
|
|
35
|
+
justify-content: center;
|
|
36
|
+
height: calc(var(--1) * var(--scaling-factor));
|
|
37
|
+
gap: calc(var(--025) * var(--scaling-factor));
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
render() {
|
|
42
|
+
return html`<slot></slot>`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
customElements.define("row-v1", Row);
|
|
47
|
+
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
"row-v1": Row;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -3,7 +3,7 @@ import { LitElement, html, css } from "lit";
|
|
|
3
3
|
/**
|
|
4
4
|
* A component for single navigation links
|
|
5
5
|
*
|
|
6
|
-
* @element
|
|
6
|
+
* @element singlenav-v1
|
|
7
7
|
* @prop {string} type - Type of navigation: "projects" or "work"
|
|
8
8
|
* @prop {string} to - Optional custom destination URL
|
|
9
9
|
*/
|
|
@@ -48,7 +48,7 @@ export class SingleNav extends LitElement {
|
|
|
48
48
|
return html`
|
|
49
49
|
<a href="${href}">
|
|
50
50
|
<ds-text key="${navConfig.key}"></ds-text>
|
|
51
|
-
<
|
|
51
|
+
<icon-v1 type="right"></icon-v1>
|
|
52
52
|
</a>
|
|
53
53
|
`;
|
|
54
54
|
}
|
|
@@ -69,11 +69,10 @@ export class SingleNav extends LitElement {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
customElements.define("
|
|
72
|
+
customElements.define("singlenav-v1", SingleNav);
|
|
73
73
|
|
|
74
74
|
declare global {
|
|
75
75
|
interface HTMLElementTagNameMap {
|
|
76
|
-
"
|
|
76
|
+
"singlenav-v1": SingleNav;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
|
package/DS1/4-page/ds-grid.ts
CHANGED
package/DS1/index.ts
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* DS one - Main entry point for all components
|
|
3
|
+
*
|
|
4
|
+
* This module initializes core utilities and exports all design system components
|
|
5
|
+
* organized by layer: 0-face (foundation), 2-core (components), 3-unit (composites), 4-page (layouts)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Initialization (side-effect imports)
|
|
10
|
+
// ============================================================================
|
|
3
11
|
|
|
4
12
|
// Initialize device detection (will auto-detect and log on load)
|
|
5
|
-
import "./0-face/
|
|
13
|
+
import "./0-face/device";
|
|
14
|
+
|
|
15
|
+
// Initialize language utilities (will auto-load external translations if available)
|
|
16
|
+
import "./0-face/i18n";
|
|
17
|
+
|
|
18
|
+
// ============================================================================
|
|
19
|
+
// 0-face: Foundation & Utilities
|
|
20
|
+
// ============================================================================
|
|
21
|
+
|
|
22
|
+
export * from "./0-face/device";
|
|
23
|
+
export * from "./0-face/i18n";
|
|
24
|
+
export * from "./0-face/preferences";
|
|
25
|
+
export * from "./0-face/pricing";
|
|
26
|
+
export * from "./0-face/theme";
|
|
6
27
|
|
|
7
|
-
//
|
|
8
|
-
|
|
28
|
+
// ============================================================================
|
|
29
|
+
// 2-core: Core Components
|
|
30
|
+
// ============================================================================
|
|
9
31
|
|
|
10
|
-
// Core components
|
|
11
32
|
export * from "./2-core/ds-button";
|
|
12
|
-
export * from "./2-core/ds-text";
|
|
13
|
-
export * from "./2-core/ds-icon";
|
|
14
|
-
export * from "./2-core/ds-link";
|
|
15
33
|
export * from "./2-core/ds-cycle";
|
|
34
|
+
export * from "./2-core/ds-icon";
|
|
35
|
+
export * from "./2-core/ds-text";
|
|
16
36
|
export * from "./2-core/ds-tooltip";
|
|
17
|
-
export * from "./2-core/ds-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export * from "./2-core/ds-attributes";
|
|
24
|
-
export * from "./2-core/ds-downloadcv";
|
|
25
|
-
export * from "./2-core/ds-article";
|
|
26
|
-
export * from "./2-core/ds-viewtoggle";
|
|
27
|
-
export * from "./2-core/ds-squarecircle";
|
|
28
|
-
|
|
29
|
-
// Unit components
|
|
37
|
+
export * from "./2-core/ds-date";
|
|
38
|
+
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// 3-unit: Composite Components
|
|
41
|
+
// ============================================================================
|
|
42
|
+
|
|
30
43
|
export * from "./3-unit/ds-list";
|
|
31
|
-
export * from "./3-unit/ds-panel";
|
|
32
44
|
export * from "./3-unit/ds-row";
|
|
33
|
-
export * from "./3-unit/ds-singlenav";
|
|
34
|
-
export * from "./3-unit/ds-doublenav";
|
|
35
45
|
export * from "./3-unit/ds-table";
|
|
36
46
|
|
|
37
|
-
//
|
|
47
|
+
// ============================================================================
|
|
48
|
+
// 4-page: Layout Components
|
|
49
|
+
// ============================================================================
|
|
50
|
+
|
|
38
51
|
export * from "./4-page/ds-grid";
|
|
39
52
|
export * from "./4-page/ds-layout";
|
|
40
|
-
|
|
41
|
-
// Utilities
|
|
42
|
-
export * from "./utils/language";
|
|
43
|
-
export * from "./utils/theme";
|
|
44
|
-
export * from "./utils/viewMode";
|
|
45
|
-
export * from "./utils/settings";
|
|
46
|
-
export * from "./utils/pricing";
|
|
47
|
-
export * from "./utils/scroll";
|
|
48
|
-
|
|
49
|
-
// Device detection
|
|
50
|
-
export * from "./0-face/2025-04-23-device";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../DS1/0-face/device.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CA0B5C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CA6B1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CA8ChD"}
|
|
@@ -26,4 +26,4 @@ export declare function getAvailableLanguagesSync(): LanguageCode[];
|
|
|
26
26
|
export declare function loadTranslations(language: LanguageCode, translations: TranslationData): void;
|
|
27
27
|
export declare function setLanguage(language: LanguageCode): void;
|
|
28
28
|
export {};
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../DS1/0-face/i18n.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAGlC,KAAK,eAAe,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAyDF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QACtD,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC;CACF;AAkSD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,YAAY,EAClB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,GAChC,MAAM,CA6CR;AAwDD,wBAAgB,kBAAkB,IAAI,YAAY,CAwBjD;AAWD,eAAO,MAAM,eAAe;;gBAGL,YAAY;CAWlC,CAAC;AAyDF,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAe7C;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,YAAoC,GAC7C,OAAO,CAmBT;AAGD,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAGD,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,YAAoC,GAC7C,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAoBxB;AAGD,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,YAAoC,GAC7C,IAAI,CAKN;AAUD,wBAAgB,qBAAqB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,CAS/D;AAGD,wBAAgB,yBAAyB,IAAI,YAAY,EAAE,CAO1D;AAGD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE,eAAe,GAC5B,IAAI,CAON;AAGD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAgBxD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
1
|
+
// Bundled translations (keys.json may not exist - will use external translations if not available)
|
|
2
|
+
// This is a fallback for when external translations aren't loaded
|
|
3
|
+
let translationKeys = {};
|
|
3
4
|
// Primary language list – prioritise the 10 requested languages when cycling
|
|
4
5
|
const LANGUAGE_PRIORITY_ORDER = [
|
|
5
6
|
"da",
|
|
@@ -42,6 +43,131 @@ const FALLBACK_LANGUAGE_NAMES = {
|
|
|
42
43
|
};
|
|
43
44
|
const DISPLAY_NAME_CACHE = new Map();
|
|
44
45
|
let displayNameFallbackWarningShown = false;
|
|
46
|
+
// CDN Loader: Automatically detects and loads translation JSON files
|
|
47
|
+
// for CDN users who want to use external translations
|
|
48
|
+
const DEFAULT_TRANSLATION_FILE = "./translations.json";
|
|
49
|
+
let loadAttempted = false;
|
|
50
|
+
function normalizeCandidate(path) {
|
|
51
|
+
if (!path) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const trimmed = path.trim();
|
|
55
|
+
if (!trimmed) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
if (trimmed.startsWith("./") ||
|
|
59
|
+
trimmed.startsWith("../") ||
|
|
60
|
+
trimmed.startsWith("/") ||
|
|
61
|
+
/^https?:\/\//i.test(trimmed)) {
|
|
62
|
+
return trimmed;
|
|
63
|
+
}
|
|
64
|
+
return `./${trimmed}`;
|
|
65
|
+
}
|
|
66
|
+
function findAttributeCandidate() {
|
|
67
|
+
if (typeof document === "undefined") {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const scriptWithAttribute = document.querySelector("script[data-ds-one-translations]");
|
|
71
|
+
const scriptCandidate = scriptWithAttribute?.getAttribute("data-ds-one-translations");
|
|
72
|
+
if (scriptCandidate) {
|
|
73
|
+
return scriptCandidate;
|
|
74
|
+
}
|
|
75
|
+
const metaCandidate = document
|
|
76
|
+
.querySelector('meta[name="ds-one:translations"]')
|
|
77
|
+
?.getAttribute("content");
|
|
78
|
+
if (metaCandidate) {
|
|
79
|
+
return metaCandidate;
|
|
80
|
+
}
|
|
81
|
+
const linkCandidate = document
|
|
82
|
+
.querySelector('link[rel="ds-one-translations"]')
|
|
83
|
+
?.getAttribute("href");
|
|
84
|
+
if (linkCandidate) {
|
|
85
|
+
return linkCandidate;
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
function resolveTranslationSources() {
|
|
90
|
+
const candidates = [];
|
|
91
|
+
const windowCandidate = typeof window !== "undefined" ? window.DS_ONE_TRANSLATIONS_FILE : null;
|
|
92
|
+
const attributeCandidate = findAttributeCandidate();
|
|
93
|
+
// Only use explicitly configured paths, or the single default
|
|
94
|
+
const windowNormalized = normalizeCandidate(windowCandidate ?? "");
|
|
95
|
+
if (windowNormalized) {
|
|
96
|
+
candidates.push(windowNormalized);
|
|
97
|
+
}
|
|
98
|
+
const attrNormalized = normalizeCandidate(attributeCandidate ?? "");
|
|
99
|
+
if (attrNormalized && !candidates.includes(attrNormalized)) {
|
|
100
|
+
candidates.push(attrNormalized);
|
|
101
|
+
}
|
|
102
|
+
// Only try default if no explicit path was configured
|
|
103
|
+
if (candidates.length === 0) {
|
|
104
|
+
candidates.push(DEFAULT_TRANSLATION_FILE);
|
|
105
|
+
}
|
|
106
|
+
return candidates;
|
|
107
|
+
}
|
|
108
|
+
function validateTranslationMap(candidate) {
|
|
109
|
+
if (!candidate || typeof candidate !== "object") {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return Object.values(candidate).every((entry) => entry && typeof entry === "object");
|
|
113
|
+
}
|
|
114
|
+
async function fetchTranslationFile(source) {
|
|
115
|
+
try {
|
|
116
|
+
const response = await fetch(source);
|
|
117
|
+
if (!response.ok) {
|
|
118
|
+
// 404 is expected if no translations file exists - don't log as error
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
const translations = await response.json();
|
|
122
|
+
if (!validateTranslationMap(translations)) {
|
|
123
|
+
console.warn(`[DS one] Invalid translation format in ${source}. Expected object with language codes as keys.`);
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
const languages = Object.keys(translations);
|
|
127
|
+
if (languages.length === 0) {
|
|
128
|
+
console.warn(`[DS one] No languages found in ${source}`);
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
return translations;
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
// Silently fail - file likely doesn't exist or isn't valid JSON
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Attempts to load translations from a JSON file in the same directory
|
|
140
|
+
*/
|
|
141
|
+
async function loadExternalTranslations() {
|
|
142
|
+
// Only attempt once
|
|
143
|
+
if (loadAttempted) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
loadAttempted = true;
|
|
147
|
+
if (typeof window === "undefined") {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
// Check if translations are already loaded (e.g., by the application)
|
|
151
|
+
if (window.DS_ONE_TRANSLATIONS &&
|
|
152
|
+
Object.keys(window.DS_ONE_TRANSLATIONS).length > 0) {
|
|
153
|
+
console.log(`[DS one] Translations already loaded (${Object.keys(window.DS_ONE_TRANSLATIONS).length} languages), skipping auto-load`);
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
const sources = resolveTranslationSources();
|
|
157
|
+
for (const source of sources) {
|
|
158
|
+
const translations = await fetchTranslationFile(source);
|
|
159
|
+
if (!translations) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
window.DS_ONE_TRANSLATIONS = translations;
|
|
163
|
+
const languages = Object.keys(translations);
|
|
164
|
+
console.log(`[DS one] External translations loaded from ${source}: ${languages.length} language(s) – ${languages.join(", ")}`);
|
|
165
|
+
window.dispatchEvent(new CustomEvent("translations-ready"));
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
console.info(`[DS one] No external translations found at ${sources[0] ?? DEFAULT_TRANSLATION_FILE}. Using bundled translations.`);
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
45
171
|
// Get translation data - prioritize external, fall back to bundled
|
|
46
172
|
function getTranslationData() {
|
|
47
173
|
// Check for externally loaded translations first (CDN usage)
|
|
@@ -245,6 +371,19 @@ export const currentLanguage = {
|
|
|
245
371
|
}));
|
|
246
372
|
},
|
|
247
373
|
};
|
|
374
|
+
// Auto-load translations when this module is imported (for CDN bundle)
|
|
375
|
+
if (typeof window !== "undefined") {
|
|
376
|
+
// Wait a bit to ensure the DOM is ready
|
|
377
|
+
if (document.readyState === "loading") {
|
|
378
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
379
|
+
loadExternalTranslations();
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
else {
|
|
383
|
+
// DOM is already ready
|
|
384
|
+
loadExternalTranslations();
|
|
385
|
+
}
|
|
386
|
+
}
|
|
248
387
|
// Listen for external translations being loaded
|
|
249
388
|
if (typeof window !== "undefined") {
|
|
250
389
|
window.addEventListener("translations-ready", () => {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LanguageCode } from "./i18n";
|
|
2
|
+
import type { ThemeType } from "./theme";
|
|
3
|
+
export type Preferences = {
|
|
4
|
+
language?: LanguageCode;
|
|
5
|
+
theme?: ThemeType;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare function savePreferences(preferences: Preferences): void;
|
|
9
|
+
//# sourceMappingURL=preferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../DS1/0-face/preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAa9D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function savePreferences(preferences) {
|
|
2
|
+
if (typeof window === "undefined") {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
try {
|
|
6
|
+
const raw = window.localStorage?.getItem("ds-one:preferences");
|
|
7
|
+
const existing = raw ? JSON.parse(raw) : {};
|
|
8
|
+
const next = { ...existing, ...preferences };
|
|
9
|
+
window.localStorage?.setItem("ds-one:preferences", JSON.stringify(next));
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
console.warn("ds-one: unable to persist preferences", error);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Currency label utilities for regional price display
|
|
3
|
+
*
|
|
4
|
+
* Note: This module provides currency symbols/labels based on language and region.
|
|
5
|
+
* Consider moving this functionality into i18n.ts as it's region/locale-related.
|
|
6
|
+
* Actual price values will be stored in a database or managed via Stripe.
|
|
7
|
+
*/
|
|
8
|
+
import type { LanguageCode } from "./i18n";
|
|
9
|
+
type PriceLabelOptions = {
|
|
10
|
+
language: LanguageCode;
|
|
11
|
+
country?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function getPriceLabel(options: PriceLabelOptions): string;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=pricing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../DS1/0-face/pricing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAgBF,wBAAgB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CA2BhE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Currency label utilities for regional price display
|
|
3
|
+
*
|
|
4
|
+
* Note: This module provides currency symbols/labels based on language and region.
|
|
5
|
+
* Consider moving this functionality into i18n.ts as it's region/locale-related.
|
|
6
|
+
* Actual price values will be stored in a database or managed via Stripe.
|
|
7
|
+
*/
|
|
8
|
+
// Simple price label mapping based on language/country
|
|
9
|
+
const PRICE_LABELS = {
|
|
10
|
+
da: "kr.",
|
|
11
|
+
nb: "kr.",
|
|
12
|
+
sv: "kr.",
|
|
13
|
+
de: "€",
|
|
14
|
+
en: "$",
|
|
15
|
+
pt: "€",
|
|
16
|
+
es: "€",
|
|
17
|
+
zh: "¥",
|
|
18
|
+
ja: "¥",
|
|
19
|
+
ko: "₩",
|
|
20
|
+
};
|
|
21
|
+
export function getPriceLabel(options) {
|
|
22
|
+
const { language, country } = options;
|
|
23
|
+
// If country is provided, try to map it to a currency
|
|
24
|
+
if (country) {
|
|
25
|
+
const countryUpper = country.toUpperCase();
|
|
26
|
+
// Add country-specific mappings if needed
|
|
27
|
+
if (countryUpper === "US" || countryUpper === "USA") {
|
|
28
|
+
return "$";
|
|
29
|
+
}
|
|
30
|
+
if (countryUpper === "GB" || countryUpper === "UK") {
|
|
31
|
+
return "£";
|
|
32
|
+
}
|
|
33
|
+
if (countryUpper === "JP" || countryUpper === "JPN") {
|
|
34
|
+
return "¥";
|
|
35
|
+
}
|
|
36
|
+
if (countryUpper === "CN" || countryUpper === "CHN") {
|
|
37
|
+
return "¥";
|
|
38
|
+
}
|
|
39
|
+
if (countryUpper === "KR" || countryUpper === "KOR") {
|
|
40
|
+
return "₩";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Fall back to language-based mapping
|
|
44
|
+
const primaryLang = language.toLowerCase().split(/[-_]/)[0];
|
|
45
|
+
return PRICE_LABELS[primaryLang] || "$";
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../DS1/0-face/theme.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAiBzC,eAAO,MAAM,YAAY,qDAAuC,CAAC;AAEjE,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAwB/C"}
|
package/dist/2-core/ds-button.js
CHANGED
package/dist/2-core/ds-cycle.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
|
-
import { translate, currentLanguage, getAvailableLanguagesSync, getLanguageDisplayName, setLanguage, } from "../
|
|
3
|
-
import { currentTheme, setTheme } from "../
|
|
4
|
-
import {
|
|
2
|
+
import { translate, currentLanguage, getAvailableLanguagesSync, getLanguageDisplayName, setLanguage, } from "../0-face/i18n";
|
|
3
|
+
import { currentTheme, setTheme } from "../0-face/theme";
|
|
4
|
+
import { savePreferences } from "../0-face/preferences";
|
|
5
5
|
import "./ds-button";
|
|
6
6
|
import "./ds-icon";
|
|
7
7
|
// Accent color utilities
|
|
@@ -248,8 +248,8 @@ export class Cycle extends LitElement {
|
|
|
248
248
|
else {
|
|
249
249
|
setLanguage(newLanguage);
|
|
250
250
|
}
|
|
251
|
-
// Save
|
|
252
|
-
|
|
251
|
+
// Save preferences
|
|
252
|
+
savePreferences({ language: newLanguage });
|
|
253
253
|
// Dispatch language change event
|
|
254
254
|
window.dispatchEvent(new CustomEvent("language-changed", {
|
|
255
255
|
detail: { language: newLanguage },
|
|
@@ -264,8 +264,8 @@ export class Cycle extends LitElement {
|
|
|
264
264
|
this.currentValue = newTheme;
|
|
265
265
|
// Set the new theme using the shared helper
|
|
266
266
|
setTheme(newTheme);
|
|
267
|
-
// Save
|
|
268
|
-
|
|
267
|
+
// Save preferences
|
|
268
|
+
savePreferences({ theme: newTheme });
|
|
269
269
|
// Theme helper already emits the change event, so no manual dispatch here
|
|
270
270
|
}
|
|
271
271
|
else if (this.type === "accent-color") {
|
|
@@ -279,8 +279,8 @@ export class Cycle extends LitElement {
|
|
|
279
279
|
saveAccentColor(newColor);
|
|
280
280
|
// Apply the new accent color
|
|
281
281
|
applyAccentColor();
|
|
282
|
-
// Save
|
|
283
|
-
|
|
282
|
+
// Save preferences
|
|
283
|
+
savePreferences({ accentColor: newColor });
|
|
284
284
|
// Dispatch accent color change event
|
|
285
285
|
window.dispatchEvent(new CustomEvent("accent-color-changed", {
|
|
286
286
|
detail: { color: newColor },
|
|
@@ -295,8 +295,8 @@ export class Cycle extends LitElement {
|
|
|
295
295
|
this.currentValue = newStyle;
|
|
296
296
|
// Save the new notes style medium
|
|
297
297
|
saveNotesStyleMedium(newStyle);
|
|
298
|
-
// Save
|
|
299
|
-
|
|
298
|
+
// Save preferences
|
|
299
|
+
savePreferences({ notesStyleMedium: newStyle });
|
|
300
300
|
// Dispatch notes style medium change event
|
|
301
301
|
window.dispatchEvent(new CustomEvent("notes-style-medium-changed", {
|
|
302
302
|
detail: { style: newStyle },
|
|
@@ -311,8 +311,8 @@ export class Cycle extends LitElement {
|
|
|
311
311
|
this.currentValue = newBehavior;
|
|
312
312
|
// Save the new note behavior
|
|
313
313
|
savePageStyle(newBehavior);
|
|
314
|
-
// Save
|
|
315
|
-
|
|
314
|
+
// Save preferences
|
|
315
|
+
savePreferences({ pageStyle: newBehavior });
|
|
316
316
|
// Dispatch note behavior change event
|
|
317
317
|
window.dispatchEvent(new CustomEvent("page-style-changed", {
|
|
318
318
|
detail: { behavior: newBehavior },
|
|
@@ -327,8 +327,8 @@ export class Cycle extends LitElement {
|
|
|
327
327
|
this.currentValue = newIconOnlyValue;
|
|
328
328
|
// Save the new page style
|
|
329
329
|
savePageStyle(newIconOnlyValue);
|
|
330
|
-
// Save
|
|
331
|
-
|
|
330
|
+
// Save preferences
|
|
331
|
+
savePreferences({ pageStyle: newIconOnlyValue });
|
|
332
332
|
// No label update for icon-only type
|
|
333
333
|
this.label = "";
|
|
334
334
|
// Dispatch page style change event
|
|
@@ -2,15 +2,15 @@ import { LitElement } from "lit";
|
|
|
2
2
|
/**
|
|
3
3
|
* A component for displaying the current year
|
|
4
4
|
*
|
|
5
|
-
* @element ds-
|
|
5
|
+
* @element ds-date
|
|
6
6
|
*/
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class DateComponent extends LitElement {
|
|
8
8
|
static styles: import("lit").CSSResult;
|
|
9
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
10
10
|
}
|
|
11
11
|
declare global {
|
|
12
12
|
interface HTMLElementTagNameMap {
|
|
13
|
-
"ds-
|
|
13
|
+
"ds-date": DateComponent;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=ds-
|
|
16
|
+
//# sourceMappingURL=ds-date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-date.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAOX;IAEF,MAAM;CAIP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,aAAa,CAAC;KAC1B;CACF"}
|
|
@@ -2,15 +2,15 @@ import { LitElement, html, css } from "lit";
|
|
|
2
2
|
/**
|
|
3
3
|
* A component for displaying the current year
|
|
4
4
|
*
|
|
5
|
-
* @element ds-
|
|
5
|
+
* @element ds-date
|
|
6
6
|
*/
|
|
7
|
-
export class
|
|
7
|
+
export class DateComponent extends LitElement {
|
|
8
8
|
render() {
|
|
9
9
|
const year = new Date().getFullYear();
|
|
10
10
|
return html `<span>${year}</span>`;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
DateComponent.styles = css `
|
|
14
14
|
:host {
|
|
15
15
|
display: inline;
|
|
16
16
|
font-family: var(--typeface, var(--typeface-regular));
|
|
@@ -18,4 +18,4 @@ Year.styles = css `
|
|
|
18
18
|
color: inherit;
|
|
19
19
|
}
|
|
20
20
|
`;
|
|
21
|
-
customElements.define("ds-
|
|
21
|
+
customElements.define("ds-date", DateComponent);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=ds-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-input.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-input.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// here should be an input component
|
package/dist/2-core/ds-text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-tooltip.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;MAKf;IAEM,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,mBAAmB,CAGzB;IACF,OAAO,CAAC,iBAAiB,CAKvB;;IAsCF,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ds-tooltip.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBAAa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;MAKf;IAEM,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,mBAAmB,CAGzB;IACF,OAAO,CAAC,iBAAiB,CAKvB;;IAsCF,MAAM,CAAC,MAAM,0BA+CX;IAEF,iBAAiB,IAAI,IAAI;IAmBzB,oBAAoB,IAAI,IAAI;IAiB5B,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAMtC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBhC,MAAM;CAUP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,OAAO,CAAC;KACvB;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement, html, css } from "lit";
|
|
2
|
-
import { translate, getNotionText } from "../
|
|
2
|
+
import { translate, getNotionText } from "../0-face/i18n";
|
|
3
3
|
export class Tooltip extends LitElement {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
@@ -119,7 +119,9 @@ Tooltip.styles = css `
|
|
|
119
119
|
pointer-events: none;
|
|
120
120
|
height: calc(var(--08) * var(--scaling-factor));
|
|
121
121
|
opacity: 0;
|
|
122
|
-
transition:
|
|
122
|
+
transition:
|
|
123
|
+
opacity 120ms ease,
|
|
124
|
+
transform 120ms ease;
|
|
123
125
|
background-color: light-dark(var(--black), var(--white));
|
|
124
126
|
color: light-dark(var(--white), var(--black));
|
|
125
127
|
border-radius: 0;
|