ds-one 0.2.5-alpha.8 → 0.3.0-alpha.1
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/device.ts +138 -0
- package/DS1/0-face/i18n.ts +36 -89
- package/DS1/0-face/scaling.ts +152 -0
- package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
- package/DS1/1-root/one.css +124 -77
- package/DS1/2-core/ds-banner.ts +120 -1
- package/DS1/2-core/ds-button.ts +16 -96
- package/DS1/2-core/ds-card.ts +137 -0
- package/DS1/2-core/ds-cycle.ts +82 -184
- package/DS1/2-core/ds-date.ts +3 -10
- package/DS1/2-core/ds-gap.ts +38 -0
- package/DS1/2-core/ds-icon.ts +6 -35
- package/DS1/2-core/ds-input.ts +306 -1
- package/DS1/2-core/ds-pagedots.ts +52 -0
- package/DS1/2-core/ds-text.ts +55 -28
- package/DS1/2-core/ds-tooltip.ts +14 -66
- package/DS1/2-core/styles/ds-banner.css +77 -0
- package/DS1/2-core/styles/ds-button.css +67 -0
- package/DS1/2-core/styles/ds-cycle.css +21 -0
- package/DS1/2-core/styles/ds-date.css +9 -0
- package/DS1/2-core/styles/ds-gap.css +93 -0
- package/DS1/2-core/styles/ds-icon.css +30 -0
- package/DS1/2-core/styles/ds-input.css +46 -0
- package/DS1/2-core/styles/ds-pagedots.css +31 -0
- package/DS1/2-core/styles/ds-text.css +29 -0
- package/DS1/2-core/styles/ds-tooltip.css +49 -0
- package/DS1/3-unit/ds-accordion.ts +95 -0
- package/DS1/3-unit/ds-form.ts +304 -0
- package/DS1/3-unit/ds-list.ts +5 -14
- package/DS1/3-unit/ds-row.ts +3 -19
- package/DS1/3-unit/ds-table.ts +3 -86
- package/DS1/3-unit/styles/ds-accordion.css +46 -0
- package/DS1/3-unit/styles/ds-list.css +9 -0
- package/DS1/3-unit/styles/ds-row.css +19 -0
- package/DS1/3-unit/styles/ds-table.css +80 -0
- package/DS1/4-page/ds-container.ts +28 -0
- package/DS1/4-page/ds-grid.ts +37 -50
- package/DS1/4-page/ds-layout.ts +652 -163
- package/DS1/4-page/styles/ds-container.css +35 -0
- package/DS1/4-page/styles/ds-grid.css +56 -0
- package/DS1/4-page/styles/ds-layout.css +246 -0
- package/DS1/index.ts +9 -1
- package/DS1/vite-env.d.ts +13 -0
- package/DS1/x-icon/2x.svg +4 -0
- package/DS1/x-icon/2xdots.svg +18 -0
- package/DS1/x-icon/2xgrid.svg +6 -0
- package/DS1/x-icon/2xlines.svg +6 -0
- package/DS1/x-icon/4x4.svg +18 -0
- package/DS1/x-icon/apple.svg +4 -0
- package/DS1/x-icon/avatar.svg +4 -0
- package/DS1/x-icon/big.svg +4 -0
- package/DS1/x-icon/blank.svg +3 -0
- package/DS1/x-icon/check.svg +3 -0
- package/DS1/x-icon/close.svg +3 -0
- package/DS1/x-icon/collapse.svg +3 -0
- package/DS1/x-icon/color.svg +4 -0
- package/DS1/x-icon/column.svg +5 -0
- package/DS1/x-icon/default.svg +3 -0
- package/DS1/x-icon/delete.svg +5 -0
- package/DS1/x-icon/dictate.svg +6 -0
- package/DS1/x-icon/do.svg +3 -0
- package/DS1/x-icon/down.svg +3 -0
- package/DS1/x-icon/duplicate.svg +4 -0
- package/DS1/x-icon/gallery.svg +5 -0
- package/DS1/x-icon/google.svg +6 -0
- package/DS1/x-icon/head.svg +5 -0
- package/DS1/x-icon/home.svg +3 -0
- package/DS1/x-icon/icon.svg +4 -0
- package/DS1/x-icon/in.svg +4 -0
- package/DS1/x-icon/lock.svg +5 -0
- package/DS1/x-icon/loop.svg +5 -0
- package/DS1/x-icon/mic.svg +5 -0
- package/DS1/x-icon/minimize.svg +3 -0
- package/DS1/x-icon/more.svg +5 -0
- package/DS1/x-icon/neutral.svg +6 -0
- package/DS1/x-icon/note.svg +6 -0
- package/DS1/x-icon/page.svg +4 -0
- package/DS1/x-icon/plus.svg +3 -0
- package/DS1/x-icon/rewind.svg +4 -0
- package/DS1/x-icon/row.svg +5 -0
- package/DS1/x-icon/sdown.svg +3 -0
- package/DS1/x-icon/search.svg +4 -0
- package/DS1/x-icon/see.svg +4 -0
- package/DS1/x-icon/ship.svg +5 -0
- package/DS1/x-icon/star.svg +3 -0
- package/DS1/x-icon/status.svg +4 -0
- package/DS1/x-icon/sup.svg +3 -0
- package/DS1/x-icon/title.svg +3 -0
- package/DS1/x-icon/undo.svg +3 -0
- package/DS1/x-icon/ungroup.svg +4 -0
- package/DS1/x-icon/unhead.svg +3 -0
- package/DS1/x-icon/unicon.svg +3 -0
- package/DS1/x-icon/unlock.svg +5 -0
- package/DS1/x-icon/unmic.svg +6 -0
- package/DS1/x-icon/unsee.svg +5 -0
- package/DS1/x-icon/unstar.svg +3 -0
- package/DS1/x-icon/untitle.svg +3 -0
- package/DS1/x-icon/up.svg +3 -0
- package/LICENSE +1 -1
- package/README.md +4 -4
- package/dist/0-face/device.d.ts +5 -0
- package/dist/0-face/device.d.ts.map +1 -1
- package/dist/0-face/device.js +111 -0
- package/dist/0-face/i18n.d.ts +0 -2
- package/dist/0-face/i18n.d.ts.map +1 -1
- package/dist/0-face/i18n.js +36 -73
- package/dist/0-face/scaling.d.ts +48 -0
- package/dist/0-face/scaling.d.ts.map +1 -0
- package/dist/0-face/scaling.js +114 -0
- package/dist/2-core/ds-banner.d.ts +67 -0
- package/dist/2-core/ds-banner.d.ts.map +1 -1
- package/dist/2-core/ds-banner.js +97 -1
- package/dist/2-core/ds-button.d.ts +4 -20
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +14 -88
- package/dist/2-core/ds-card.d.ts +39 -0
- package/dist/2-core/ds-card.d.ts.map +1 -0
- package/dist/2-core/ds-card.js +119 -0
- package/dist/2-core/ds-cycle.d.ts +1 -5
- package/dist/2-core/ds-cycle.d.ts.map +1 -1
- package/dist/2-core/ds-cycle.js +79 -166
- package/dist/2-core/ds-date.d.ts.map +1 -1
- package/dist/2-core/ds-date.js +3 -9
- package/dist/2-core/ds-gap.d.ts +28 -0
- package/dist/2-core/ds-gap.d.ts.map +1 -0
- package/dist/2-core/ds-gap.js +25 -0
- package/dist/2-core/ds-icon.d.ts.map +1 -1
- package/dist/2-core/ds-icon.js +6 -35
- package/dist/2-core/ds-input.d.ts +127 -0
- package/dist/2-core/ds-input.d.ts.map +1 -1
- package/dist/2-core/ds-input.js +252 -1
- package/dist/2-core/ds-pagedots.d.ts +32 -0
- package/dist/2-core/ds-pagedots.d.ts.map +1 -0
- package/dist/2-core/ds-pagedots.js +36 -0
- package/dist/2-core/ds-text.d.ts +5 -3
- package/dist/2-core/ds-text.d.ts.map +1 -1
- package/dist/2-core/ds-text.js +49 -27
- package/dist/2-core/ds-tooltip.d.ts +3 -3
- package/dist/2-core/ds-tooltip.d.ts.map +1 -1
- package/dist/2-core/ds-tooltip.js +13 -65
- package/dist/2-core/styles/ds-banner.css +77 -0
- package/dist/2-core/styles/ds-button.css +67 -0
- package/dist/2-core/styles/ds-cycle.css +21 -0
- package/dist/2-core/styles/ds-date.css +9 -0
- package/dist/2-core/styles/ds-gap.css +93 -0
- package/dist/2-core/styles/ds-icon.css +30 -0
- package/dist/2-core/styles/ds-input.css +46 -0
- package/dist/2-core/styles/ds-pagedots.css +26 -0
- package/dist/2-core/styles/ds-text.css +29 -0
- package/dist/2-core/styles/ds-tooltip.css +49 -0
- package/dist/3-unit/ds-accordion.d.ts +47 -0
- package/dist/3-unit/ds-accordion.d.ts.map +1 -0
- package/dist/3-unit/ds-accordion.js +75 -0
- package/dist/3-unit/ds-form.d.ts +70 -0
- package/dist/3-unit/ds-form.d.ts.map +1 -0
- package/dist/3-unit/ds-form.js +232 -0
- package/dist/3-unit/ds-list.d.ts.map +1 -1
- package/dist/3-unit/ds-list.js +5 -11
- package/dist/3-unit/ds-row.d.ts.map +1 -1
- package/dist/3-unit/ds-row.js +3 -19
- package/dist/3-unit/ds-table.d.ts.map +1 -1
- package/dist/3-unit/ds-table.js +3 -86
- package/dist/3-unit/styles/ds-accordion.css +46 -0
- package/dist/3-unit/styles/ds-list.css +9 -0
- package/dist/3-unit/styles/ds-row.css +19 -0
- package/dist/3-unit/styles/ds-table.css +80 -0
- package/dist/{3-unit/row-v1.d.ts → 4-page/ds-container.d.ts} +3 -11
- package/dist/4-page/ds-container.d.ts.map +1 -0
- package/dist/4-page/ds-container.js +11 -0
- package/dist/4-page/ds-grid.d.ts +5 -0
- package/dist/4-page/ds-grid.d.ts.map +1 -1
- package/dist/4-page/ds-grid.js +38 -56
- package/dist/4-page/ds-layout.d.ts +3 -3
- package/dist/4-page/ds-layout.d.ts.map +1 -1
- package/dist/4-page/ds-layout.js +651 -162
- package/dist/4-page/styles/ds-container.css +35 -0
- package/dist/4-page/styles/ds-grid.css +56 -0
- package/dist/4-page/styles/ds-layout.css +251 -0
- package/dist/ds-one.bundle.css +700 -0
- package/dist/ds-one.bundle.css.map +7 -0
- package/dist/ds-one.bundle.js +2728 -1597
- package/dist/ds-one.bundle.js.map +1 -7
- package/dist/ds-one.bundle.min.css +2 -0
- package/dist/ds-one.bundle.min.css.map +7 -0
- package/dist/ds-one.bundle.min.js +3850 -546
- package/dist/ds-one.bundle.min.js.map +1 -7
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/package.json +4 -3
- package/dist/3-unit/doublenav-v1.d.ts +0 -51
- package/dist/3-unit/doublenav-v1.d.ts.map +0 -1
- package/dist/3-unit/doublenav-v1.js +0 -88
- package/dist/3-unit/ds-portfolio-doublenav.d.ts +0 -51
- package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-doublenav.js +0 -88
- package/dist/3-unit/ds-portfolio-panel.d.ts +0 -11
- package/dist/3-unit/ds-portfolio-panel.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-panel.js +0 -16
- package/dist/3-unit/ds-portfolio-singlenav.d.ts +0 -32
- package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +0 -1
- package/dist/3-unit/ds-portfolio-singlenav.js +0 -62
- package/dist/3-unit/list-v1.d.ts +0 -11
- package/dist/3-unit/list-v1.d.ts.map +0 -1
- package/dist/3-unit/list-v1.js +0 -15
- package/dist/3-unit/panel-v1.d.ts +0 -11
- package/dist/3-unit/panel-v1.d.ts.map +0 -1
- package/dist/3-unit/panel-v1.js +0 -16
- package/dist/3-unit/row-v1.d.ts.map +0 -1
- package/dist/3-unit/row-v1.js +0 -32
- package/dist/3-unit/singlenav-v1.d.ts +0 -32
- package/dist/3-unit/singlenav-v1.d.ts.map +0 -1
- package/dist/3-unit/singlenav-v1.js +0 -62
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// scaling.ts
|
|
2
|
+
// Responsive scaling utilities for the design system
|
|
3
|
+
import { signal } from "@lit-labs/signals";
|
|
4
|
+
const defaultConfig = {
|
|
5
|
+
mode: "auto",
|
|
6
|
+
baseWidth: 280,
|
|
7
|
+
minScale: 0.75,
|
|
8
|
+
maxScale: 2.0,
|
|
9
|
+
};
|
|
10
|
+
// Reactive scaling factor signal
|
|
11
|
+
export const scalingFactor = signal(1);
|
|
12
|
+
// Current scaling configuration
|
|
13
|
+
export const scalingConfig = signal(defaultConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Calculate the scaling factor based on viewport width
|
|
16
|
+
* @param viewportWidth - Current viewport width in pixels
|
|
17
|
+
* @param config - Scaling configuration
|
|
18
|
+
* @returns The calculated scaling factor
|
|
19
|
+
*/
|
|
20
|
+
export function calculateScalingFactor(viewportWidth, config = scalingConfig.get()) {
|
|
21
|
+
if (config.mode === "fixed") {
|
|
22
|
+
return 1;
|
|
23
|
+
}
|
|
24
|
+
const rawScale = viewportWidth / config.baseWidth;
|
|
25
|
+
const clampedScale = Math.max(config.minScale, Math.min(config.maxScale, rawScale));
|
|
26
|
+
return Number(clampedScale.toFixed(3));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Set the scaling configuration
|
|
30
|
+
* @param config - Partial scaling configuration to apply
|
|
31
|
+
*/
|
|
32
|
+
export function setScalingConfig(config) {
|
|
33
|
+
const currentConfig = scalingConfig.get();
|
|
34
|
+
const newConfig = { ...currentConfig, ...config };
|
|
35
|
+
scalingConfig.set(newConfig);
|
|
36
|
+
// Recalculate scaling factor if in browser
|
|
37
|
+
if (typeof window !== "undefined") {
|
|
38
|
+
updateScalingFactor();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Update the scaling factor based on current viewport
|
|
43
|
+
*/
|
|
44
|
+
export function updateScalingFactor() {
|
|
45
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const viewportWidth = document.documentElement.clientWidth;
|
|
49
|
+
const config = scalingConfig.get();
|
|
50
|
+
const newFactor = calculateScalingFactor(viewportWidth, config);
|
|
51
|
+
scalingFactor.set(newFactor);
|
|
52
|
+
// Update CSS custom property
|
|
53
|
+
document.documentElement.style.setProperty("--sf", newFactor.toString());
|
|
54
|
+
// Dispatch event for components that need to react
|
|
55
|
+
window.dispatchEvent(new CustomEvent("scaling-changed", {
|
|
56
|
+
detail: { scalingFactor: newFactor, config },
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get the current scaling factor
|
|
61
|
+
* @returns The current scaling factor
|
|
62
|
+
*/
|
|
63
|
+
export function getScalingFactor() {
|
|
64
|
+
return scalingFactor.get();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Convert a design pixel value to scaled pixels
|
|
68
|
+
* @param designPx - The design pixel value (based on 280px width)
|
|
69
|
+
* @returns The scaled pixel value
|
|
70
|
+
*/
|
|
71
|
+
export function scale(designPx) {
|
|
72
|
+
return designPx * scalingFactor.get();
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Convert a scaled pixel value back to design pixels
|
|
76
|
+
* @param scaledPx - The scaled pixel value
|
|
77
|
+
* @returns The design pixel value
|
|
78
|
+
*/
|
|
79
|
+
export function unscale(scaledPx) {
|
|
80
|
+
const factor = scalingFactor.get();
|
|
81
|
+
return factor === 0 ? scaledPx : scaledPx / factor;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Initialize scaling system
|
|
85
|
+
* This is typically called automatically when the module loads
|
|
86
|
+
*/
|
|
87
|
+
export function initScaling() {
|
|
88
|
+
if (typeof window === "undefined") {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Initial calculation
|
|
92
|
+
updateScalingFactor();
|
|
93
|
+
// Update on resize (debounced)
|
|
94
|
+
let resizeTimeout;
|
|
95
|
+
window.addEventListener("resize", () => {
|
|
96
|
+
clearTimeout(resizeTimeout);
|
|
97
|
+
resizeTimeout = setTimeout(() => {
|
|
98
|
+
updateScalingFactor();
|
|
99
|
+
}, 100);
|
|
100
|
+
});
|
|
101
|
+
// Update on orientation change
|
|
102
|
+
window.addEventListener("orientationchange", () => {
|
|
103
|
+
setTimeout(updateScalingFactor, 100);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Auto-initialize when module loads in browser
|
|
107
|
+
if (typeof window !== "undefined") {
|
|
108
|
+
if (document.readyState === "loading") {
|
|
109
|
+
document.addEventListener("DOMContentLoaded", initScaling);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
initScaling();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1 +1,68 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./ds-text.js";
|
|
3
|
+
import "./ds-button.js";
|
|
4
|
+
declare global {
|
|
5
|
+
interface CustomElementRegistry {
|
|
6
|
+
define(name: string, constructor: typeof LitElement): void;
|
|
7
|
+
}
|
|
8
|
+
var customElements: CustomElementRegistry;
|
|
9
|
+
}
|
|
10
|
+
export declare class Banner extends LitElement {
|
|
11
|
+
static properties: {
|
|
12
|
+
text: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
action: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
};
|
|
18
|
+
href: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
mailto: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
};
|
|
24
|
+
subject: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
};
|
|
27
|
+
describe: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
appVersion: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
attribute: string;
|
|
33
|
+
};
|
|
34
|
+
variant: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
};
|
|
37
|
+
version: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
40
|
+
_showVersion: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
state: boolean;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
text: string;
|
|
46
|
+
action: string;
|
|
47
|
+
href: string;
|
|
48
|
+
mailto: string;
|
|
49
|
+
subject: string;
|
|
50
|
+
describe: string;
|
|
51
|
+
appVersion: string;
|
|
52
|
+
variant: string;
|
|
53
|
+
version: string;
|
|
54
|
+
_showVersion: boolean;
|
|
55
|
+
private _boundUpdate;
|
|
56
|
+
connectedCallback(): void;
|
|
57
|
+
disconnectedCallback(): void;
|
|
58
|
+
static styles: import("lit").CSSResult;
|
|
59
|
+
private _toggleVersion;
|
|
60
|
+
private _getMailtoHref;
|
|
61
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
62
|
+
}
|
|
63
|
+
declare global {
|
|
64
|
+
interface HTMLElementTagNameMap {
|
|
65
|
+
"ds-banner": Banner;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
1
68
|
//# sourceMappingURL=ds-banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAElD,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AAGxB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWf;IAEF,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,OAAO,EAAE,MAAM,CAAM;IACrB,QAAQ,EAAE,MAAM,CAAM;IACtB,UAAU,EAAE,MAAM,CAAM;IACxB,OAAO,EAAE,MAAM,CAAa;IAC5B,OAAO,EAAE,MAAM,CAAM;IACrB,YAAY,EAAE,OAAO,CAAS;IAE9B,OAAO,CAAC,YAAY,CAA8B;IAElD,iBAAiB;IAOjB,oBAAoB;IAMpB,MAAM,CAAC,MAAM,0BAAqB;IAElC,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IA6BtB,MAAM;CAoBP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
|
package/dist/2-core/ds-banner.js
CHANGED
|
@@ -1,2 +1,98 @@
|
|
|
1
1
|
// ds-banner.ts
|
|
2
|
-
//
|
|
2
|
+
// Fixed banner component for notifications/alerts
|
|
3
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
4
|
+
import { getText } from "../0-face/i18n.js";
|
|
5
|
+
import "./ds-text.js";
|
|
6
|
+
import "./ds-button.js";
|
|
7
|
+
import styles from "./styles/ds-banner.css?inline";
|
|
8
|
+
export class Banner extends LitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.text = "";
|
|
12
|
+
this.action = "";
|
|
13
|
+
this.href = "";
|
|
14
|
+
this.mailto = "";
|
|
15
|
+
this.subject = "";
|
|
16
|
+
this.describe = "";
|
|
17
|
+
this.appVersion = "";
|
|
18
|
+
this.variant = "warning"; // warning, info, success, error
|
|
19
|
+
this.version = "";
|
|
20
|
+
this._showVersion = false;
|
|
21
|
+
this._boundUpdate = () => this.requestUpdate();
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
super.connectedCallback();
|
|
25
|
+
// Listen for translations and language changes to rebuild mailto URL
|
|
26
|
+
window.addEventListener("translations-loaded", this._boundUpdate);
|
|
27
|
+
window.addEventListener("language-changed", this._boundUpdate);
|
|
28
|
+
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
super.disconnectedCallback();
|
|
31
|
+
window.removeEventListener("translations-loaded", this._boundUpdate);
|
|
32
|
+
window.removeEventListener("language-changed", this._boundUpdate);
|
|
33
|
+
}
|
|
34
|
+
_toggleVersion() {
|
|
35
|
+
if (this.version) {
|
|
36
|
+
this._showVersion = !this._showVersion;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
_getMailtoHref() {
|
|
40
|
+
// If a direct href is provided, use it
|
|
41
|
+
if (this.href && this.href !== "#")
|
|
42
|
+
return this.href;
|
|
43
|
+
// If mailto is provided, build internationalized URL
|
|
44
|
+
if (this.mailto) {
|
|
45
|
+
try {
|
|
46
|
+
const subject = this.subject
|
|
47
|
+
? getText(this.subject) || this.subject
|
|
48
|
+
: "Issue report";
|
|
49
|
+
const describe = this.describe
|
|
50
|
+
? getText(this.describe) || this.describe
|
|
51
|
+
: "Describe the issue:";
|
|
52
|
+
const appVersionLabel = this.appVersion
|
|
53
|
+
? getText(this.appVersion) || this.appVersion
|
|
54
|
+
: "App version:";
|
|
55
|
+
const body = `${describe}\n\n\n${appVersionLabel} ${this.version || ""}`;
|
|
56
|
+
return `mailto:${this.mailto}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
// Fallback if translations fail
|
|
60
|
+
return `mailto:${this.mailto}?subject=Issue%20report&body=Describe%20the%20issue%3A%0A%0A%0AApp%20version%3A%20${this.version || ""}`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return "#";
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
const mailtoHref = this._getMailtoHref();
|
|
67
|
+
return html `
|
|
68
|
+
<div class="text-wrapper" @click=${this._toggleVersion}>
|
|
69
|
+
${this._showVersion && this.version
|
|
70
|
+
? html `<ds-text default-value=${this.version}></ds-text>`
|
|
71
|
+
: html `<ds-text text=${this.text}><slot></slot></ds-text>`}
|
|
72
|
+
</div>
|
|
73
|
+
${this.action
|
|
74
|
+
? html `
|
|
75
|
+
<div class="action-wrapper">
|
|
76
|
+
<a href=${mailtoHref}>
|
|
77
|
+
<ds-text text=${this.action}></ds-text>
|
|
78
|
+
</a>
|
|
79
|
+
</div>
|
|
80
|
+
`
|
|
81
|
+
: ""}
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
Banner.properties = {
|
|
86
|
+
text: { type: String },
|
|
87
|
+
action: { type: String },
|
|
88
|
+
href: { type: String },
|
|
89
|
+
mailto: { type: String },
|
|
90
|
+
subject: { type: String },
|
|
91
|
+
describe: { type: String },
|
|
92
|
+
appVersion: { type: String, attribute: "app-version" },
|
|
93
|
+
variant: { type: String },
|
|
94
|
+
version: { type: String },
|
|
95
|
+
_showVersion: { type: Boolean, state: true },
|
|
96
|
+
};
|
|
97
|
+
Banner.styles = unsafeCSS(styles);
|
|
98
|
+
customElements.define("ds-banner", Banner);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { LitElement
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./ds-text";
|
|
2
3
|
export declare class Button extends LitElement {
|
|
3
4
|
static properties: {
|
|
4
5
|
variant: {
|
|
@@ -22,11 +23,7 @@ export declare class Button extends LitElement {
|
|
|
22
23
|
type: BooleanConstructor;
|
|
23
24
|
reflect: boolean;
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
-
type: StringConstructor;
|
|
27
|
-
attribute: string;
|
|
28
|
-
};
|
|
29
|
-
key: {
|
|
26
|
+
text: {
|
|
30
27
|
type: StringConstructor;
|
|
31
28
|
};
|
|
32
29
|
fallback: {
|
|
@@ -46,34 +43,21 @@ export declare class Button extends LitElement {
|
|
|
46
43
|
type: BooleanConstructor;
|
|
47
44
|
state: boolean;
|
|
48
45
|
};
|
|
49
|
-
_notionText: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
state: boolean;
|
|
52
|
-
};
|
|
53
46
|
};
|
|
54
47
|
variant: string;
|
|
55
48
|
disabled: boolean;
|
|
56
49
|
bold: boolean;
|
|
57
50
|
"no-background": boolean;
|
|
58
51
|
blank: boolean;
|
|
59
|
-
|
|
60
|
-
key: string;
|
|
52
|
+
text: string;
|
|
61
53
|
fallback: string;
|
|
62
54
|
language: string;
|
|
63
55
|
defaultText: string;
|
|
64
56
|
href: string;
|
|
65
57
|
_loading: boolean;
|
|
66
|
-
_notionText: string | null;
|
|
67
58
|
constructor();
|
|
68
59
|
static styles: import("lit").CSSResult;
|
|
69
60
|
connectedCallback(): void;
|
|
70
|
-
disconnectedCallback(): void;
|
|
71
|
-
_handleLanguageChange: () => void;
|
|
72
|
-
updated(changedProps: PropertyValues): void;
|
|
73
|
-
/**
|
|
74
|
-
* Update text from translations (synchronous like Portfolio)
|
|
75
|
-
*/
|
|
76
|
-
private _updateText;
|
|
77
61
|
render(): import("lit-html").TemplateResult<1>;
|
|
78
62
|
private _handleClick;
|
|
79
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-button.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-button.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ds-button.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-button.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAClD,OAAO,WAAW,CAAC;AAGnB,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBf;IAGM,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,OAAO,CAAC;;IAiB1B,MAAM,CAAC,MAAM,0BAAqB;IAElC,iBAAiB;IAIjB,MAAM;IAsBN,OAAO,CAAC,YAAY;CAwBrB;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}
|
package/dist/2-core/ds-button.js
CHANGED
|
@@ -1,56 +1,28 @@
|
|
|
1
1
|
// ds-button.ts
|
|
2
2
|
// Core button component
|
|
3
|
-
import { LitElement, html,
|
|
4
|
-
import
|
|
3
|
+
import { LitElement, html, unsafeCSS } from "lit";
|
|
4
|
+
import "./ds-text";
|
|
5
|
+
import styles from "./styles/ds-button.css?inline";
|
|
5
6
|
export class Button extends LitElement {
|
|
6
7
|
constructor() {
|
|
7
8
|
super();
|
|
8
|
-
this._handleLanguageChange = () => {
|
|
9
|
-
this._updateText();
|
|
10
|
-
};
|
|
11
9
|
this.variant = "title";
|
|
12
10
|
this.disabled = false;
|
|
13
11
|
this.bold = false;
|
|
14
12
|
this["no-background"] = false;
|
|
15
13
|
this.blank = false;
|
|
16
|
-
this.
|
|
17
|
-
this.key = "";
|
|
14
|
+
this.text = "";
|
|
18
15
|
this.fallback = "";
|
|
19
16
|
this.language = "en-US";
|
|
20
17
|
this.defaultText = "";
|
|
21
18
|
this.href = "";
|
|
22
19
|
this._loading = false;
|
|
23
|
-
this._notionText = null;
|
|
24
20
|
}
|
|
25
21
|
connectedCallback() {
|
|
26
22
|
super.connectedCallback();
|
|
27
|
-
this._updateText();
|
|
28
|
-
// Listen for language changes
|
|
29
|
-
window.addEventListener("language-changed", this._handleLanguageChange);
|
|
30
|
-
}
|
|
31
|
-
disconnectedCallback() {
|
|
32
|
-
super.disconnectedCallback();
|
|
33
|
-
window.removeEventListener("language-changed", this._handleLanguageChange);
|
|
34
|
-
}
|
|
35
|
-
updated(changedProps) {
|
|
36
|
-
super.updated(changedProps);
|
|
37
|
-
if (changedProps.has("key") || changedProps.has("defaultText")) {
|
|
38
|
-
this._updateText();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Update text from translations (synchronous like Portfolio)
|
|
43
|
-
*/
|
|
44
|
-
_updateText() {
|
|
45
|
-
if (this.key) {
|
|
46
|
-
this._notionText = getText(this.key);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
this._notionText = this.defaultText || this.fallback || null;
|
|
50
|
-
}
|
|
51
|
-
this.requestUpdate();
|
|
52
23
|
}
|
|
53
24
|
render() {
|
|
25
|
+
const hasTextProps = this.text || this.defaultText || this.fallback;
|
|
54
26
|
return html `
|
|
55
27
|
<button
|
|
56
28
|
class=${this.variant}
|
|
@@ -59,7 +31,13 @@ export class Button extends LitElement {
|
|
|
59
31
|
?no-background=${this["no-background"]}
|
|
60
32
|
@click=${this._handleClick}
|
|
61
33
|
>
|
|
62
|
-
${
|
|
34
|
+
${hasTextProps
|
|
35
|
+
? html `<ds-text
|
|
36
|
+
.text=${this.text}
|
|
37
|
+
.defaultValue=${this.defaultText}
|
|
38
|
+
.fallback=${this.fallback}
|
|
39
|
+
></ds-text>`
|
|
40
|
+
: html `<slot></slot>`}
|
|
63
41
|
</button>
|
|
64
42
|
`;
|
|
65
43
|
}
|
|
@@ -97,64 +75,12 @@ Button.properties = {
|
|
|
97
75
|
attribute: "no-background",
|
|
98
76
|
},
|
|
99
77
|
blank: { type: Boolean, reflect: true },
|
|
100
|
-
|
|
101
|
-
key: { type: String },
|
|
78
|
+
text: { type: String },
|
|
102
79
|
fallback: { type: String },
|
|
103
80
|
language: { type: String },
|
|
104
81
|
defaultText: { type: String, attribute: "default-text" },
|
|
105
82
|
href: { type: String },
|
|
106
83
|
_loading: { type: Boolean, state: true },
|
|
107
|
-
_notionText: { type: String, state: true },
|
|
108
84
|
};
|
|
109
|
-
Button.styles =
|
|
110
|
-
button {
|
|
111
|
-
max-height: calc(var(--08) * var(--scaling-factor));
|
|
112
|
-
border: none;
|
|
113
|
-
cursor: pointer;
|
|
114
|
-
font-size: calc(var(--type-size-default) * var(--scaling-factor));
|
|
115
|
-
padding: 0 calc(1px * var(--scaling-factor));
|
|
116
|
-
color: var(--button-text-color);
|
|
117
|
-
font-family: var(--typeface);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
button.title {
|
|
121
|
-
background-color: var(--button-background-color-secondary);
|
|
122
|
-
color: var(--button-text-color);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
button.primary {
|
|
126
|
-
background-color: var(--accent-color);
|
|
127
|
-
color: var(--button-text-color);
|
|
128
|
-
text-decoration-line: none;
|
|
129
|
-
font-family: var(--typeface);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
button.secondary {
|
|
133
|
-
background-color: var(--button-background-color-secondary);
|
|
134
|
-
color: var(--button-text-color);
|
|
135
|
-
font-family: var(--typeface);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
button[bold] {
|
|
139
|
-
font-weight: var(--type-weight-bold);
|
|
140
|
-
font-family: var(--typeface-medium);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
button[no-background] {
|
|
144
|
-
background-color: transparent;
|
|
145
|
-
max-height: var(--1);
|
|
146
|
-
padding: 0;
|
|
147
|
-
color: var(--button-color, var(--button-text-color-secondary));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
button[no-background][bold] {
|
|
151
|
-
font-weight: var(--type-weight-bold);
|
|
152
|
-
font-family: var(--typeface-medium);
|
|
153
|
-
color: var(--button-color, var(--button-text-color-secondary));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.loading {
|
|
157
|
-
opacity: 0.7;
|
|
158
|
-
}
|
|
159
|
-
`;
|
|
85
|
+
Button.styles = unsafeCSS(styles);
|
|
160
86
|
customElements.define("ds-button", Button);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare class Card extends LitElement {
|
|
3
|
+
static properties: {
|
|
4
|
+
variant: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
reflect: boolean;
|
|
7
|
+
};
|
|
8
|
+
elevation: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
reflect: boolean;
|
|
11
|
+
};
|
|
12
|
+
interactive: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
reflect: boolean;
|
|
15
|
+
};
|
|
16
|
+
disabled: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
reflect: boolean;
|
|
19
|
+
};
|
|
20
|
+
padding: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
reflect: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
variant: "default" | "outlined" | "elevated" | "filled";
|
|
26
|
+
elevation: number;
|
|
27
|
+
interactive: boolean;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
padding: "none" | "small" | "medium" | "large";
|
|
30
|
+
constructor();
|
|
31
|
+
static styles: import("lit").CSSResult;
|
|
32
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
"ds-card": Card;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ds-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-card.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-card.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;MAMf;IAEM,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;;IAWvD,MAAM,CAAC,MAAM,0BA0FX;IAEF,MAAM;CAOP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// ds-card.ts
|
|
2
|
+
// Card component for displaying content in a contained box
|
|
3
|
+
import { LitElement, html, css } from "lit";
|
|
4
|
+
export class Card extends LitElement {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.variant = "default";
|
|
8
|
+
this.elevation = 1;
|
|
9
|
+
this.interactive = false;
|
|
10
|
+
this.disabled = false;
|
|
11
|
+
this.padding = "medium";
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return html `
|
|
15
|
+
<div class="card-content" part="content">
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</div>
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
Card.properties = {
|
|
22
|
+
variant: { type: String, reflect: true },
|
|
23
|
+
elevation: { type: Number, reflect: true },
|
|
24
|
+
interactive: { type: Boolean, reflect: true },
|
|
25
|
+
disabled: { type: Boolean, reflect: true },
|
|
26
|
+
padding: { type: String, reflect: true },
|
|
27
|
+
};
|
|
28
|
+
Card.styles = css `
|
|
29
|
+
:host {
|
|
30
|
+
display: block;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
border-radius: calc(var(--025) * var(--sf, 1));
|
|
33
|
+
background-color: var(--card-background, var(--surface-color, #fff));
|
|
34
|
+
color: var(--text-color-primary);
|
|
35
|
+
transition:
|
|
36
|
+
box-shadow 0.2s ease,
|
|
37
|
+
transform 0.2s ease;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([variant="default"]) {
|
|
41
|
+
background-color: var(--card-background, var(--surface-color, #fff));
|
|
42
|
+
border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([variant="outlined"]) {
|
|
46
|
+
background-color: transparent;
|
|
47
|
+
border: 1px solid var(--border-color, rgba(0, 0, 0, 0.2));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([variant="elevated"]) {
|
|
51
|
+
background-color: var(--card-background, var(--surface-color, #fff));
|
|
52
|
+
border: none;
|
|
53
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([variant="filled"]) {
|
|
57
|
+
background-color: var(
|
|
58
|
+
--card-background-filled,
|
|
59
|
+
var(--surface-color-secondary, #f5f5f5)
|
|
60
|
+
);
|
|
61
|
+
border: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([elevation="0"]) {
|
|
65
|
+
box-shadow: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([elevation="1"]) {
|
|
69
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([elevation="2"]) {
|
|
73
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([elevation="3"]) {
|
|
77
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host([interactive]) {
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host([interactive]:hover:not([disabled])) {
|
|
85
|
+
transform: translateY(-2px);
|
|
86
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:host([interactive]:active:not([disabled])) {
|
|
90
|
+
transform: translateY(0);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:host([disabled]) {
|
|
94
|
+
opacity: 0.5;
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host([padding="none"]) {
|
|
99
|
+
padding: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host([padding="small"]) {
|
|
103
|
+
padding: calc(var(--025) * var(--sf, 1));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:host([padding="medium"]) {
|
|
107
|
+
padding: calc(var(--05) * var(--sf, 1));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:host([padding="large"]) {
|
|
111
|
+
padding: calc(var(--1) * var(--sf, 1));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.card-content {
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 100%;
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
customElements.define("ds-card", Card);
|
|
@@ -10,9 +10,6 @@ export declare class Cycle extends LitElement {
|
|
|
10
10
|
values: {
|
|
11
11
|
type: ArrayConstructor;
|
|
12
12
|
};
|
|
13
|
-
label: {
|
|
14
|
-
type: StringConstructor;
|
|
15
|
-
};
|
|
16
13
|
currentValue: {
|
|
17
14
|
type: StringConstructor;
|
|
18
15
|
state: boolean;
|
|
@@ -32,7 +29,6 @@ export declare class Cycle extends LitElement {
|
|
|
32
29
|
static styles: import("lit").CSSResult;
|
|
33
30
|
type: string;
|
|
34
31
|
values: string[];
|
|
35
|
-
label: string;
|
|
36
32
|
currentValue: string;
|
|
37
33
|
translationsReady: boolean;
|
|
38
34
|
disabled: boolean;
|
|
@@ -48,9 +44,9 @@ export declare class Cycle extends LitElement {
|
|
|
48
44
|
disconnectedCallback(): void;
|
|
49
45
|
handleButtonClick(e: Event): void;
|
|
50
46
|
getValueDisplay(value: string): string | any;
|
|
47
|
+
getColorKey(colorVar: string): string;
|
|
51
48
|
getColorName(colorVar: string): string;
|
|
52
49
|
getNotesStyleIcon(style: string): import("lit-html").TemplateResult<1>;
|
|
53
|
-
getLabel(): string;
|
|
54
50
|
render(): import("lit-html").TemplateResult<1>;
|
|
55
51
|
private waitForTranslations;
|
|
56
52
|
private handleTranslationsLoaded;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-cycle.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-cycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ds-cycle.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-cycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAYlD,OAAO,aAAa,CAAC;AACrB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AAsCnB,qBAAa,KAAM,SAAQ,UAAU;IAEnC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;;;;;MASpB;IAED,MAAM,CAAC,MAAM,0BAAqB;IAI1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAGxB,OAAO,CAAC,aAAa,CAOnB;;IAwBF,iBAAiB;IA6BX,gBAAgB;IA8DtB,sBAAsB;IAatB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IASnE,iBAAiB;IAqCvB,qBAAqB;IAKrB,oBAAoB;IA0BpB,iBAAiB,CAAC,CAAC,EAAE,KAAK;IAiJ1B,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG;IA+C5C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAgBrC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAyBtC,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAe/B,MAAM;YAoDQ,mBAAmB;IAwBjC,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,yBAAyB;CAGlC;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,KAAK,CAAC;KACnB;CACF"}
|