ds-one 0.2.5-alpha.9 → 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.
Files changed (209) hide show
  1. package/DS1/0-face/device.ts +138 -0
  2. package/DS1/0-face/scaling.ts +152 -0
  3. package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
  4. package/DS1/1-root/one.css +124 -77
  5. package/DS1/2-core/ds-banner.ts +120 -1
  6. package/DS1/2-core/ds-button.ts +16 -93
  7. package/DS1/2-core/ds-card.ts +137 -0
  8. package/DS1/2-core/ds-cycle.ts +77 -179
  9. package/DS1/2-core/ds-date.ts +3 -10
  10. package/DS1/2-core/ds-gap.ts +38 -0
  11. package/DS1/2-core/ds-icon.ts +6 -35
  12. package/DS1/2-core/ds-input.ts +306 -1
  13. package/DS1/2-core/ds-pagedots.ts +52 -0
  14. package/DS1/2-core/ds-text.ts +55 -28
  15. package/DS1/2-core/ds-tooltip.ts +12 -58
  16. package/DS1/2-core/styles/ds-banner.css +77 -0
  17. package/DS1/2-core/styles/ds-button.css +67 -0
  18. package/DS1/2-core/styles/ds-cycle.css +21 -0
  19. package/DS1/2-core/styles/ds-date.css +9 -0
  20. package/DS1/2-core/styles/ds-gap.css +93 -0
  21. package/DS1/2-core/styles/ds-icon.css +30 -0
  22. package/DS1/2-core/styles/ds-input.css +46 -0
  23. package/DS1/2-core/styles/ds-pagedots.css +31 -0
  24. package/DS1/2-core/styles/ds-text.css +29 -0
  25. package/DS1/2-core/styles/ds-tooltip.css +49 -0
  26. package/DS1/3-unit/ds-accordion.ts +95 -0
  27. package/DS1/3-unit/ds-form.ts +304 -0
  28. package/DS1/3-unit/ds-list.ts +5 -14
  29. package/DS1/3-unit/ds-row.ts +3 -19
  30. package/DS1/3-unit/ds-table.ts +3 -86
  31. package/DS1/3-unit/styles/ds-accordion.css +46 -0
  32. package/DS1/3-unit/styles/ds-list.css +9 -0
  33. package/DS1/3-unit/styles/ds-row.css +19 -0
  34. package/DS1/3-unit/styles/ds-table.css +80 -0
  35. package/DS1/4-page/ds-container.ts +28 -0
  36. package/DS1/4-page/ds-grid.ts +37 -50
  37. package/DS1/4-page/ds-layout.ts +652 -163
  38. package/DS1/4-page/styles/ds-container.css +35 -0
  39. package/DS1/4-page/styles/ds-grid.css +56 -0
  40. package/DS1/4-page/styles/ds-layout.css +246 -0
  41. package/DS1/index.ts +9 -1
  42. package/DS1/vite-env.d.ts +13 -0
  43. package/DS1/x-icon/2x.svg +4 -0
  44. package/DS1/x-icon/2xdots.svg +18 -0
  45. package/DS1/x-icon/2xgrid.svg +6 -0
  46. package/DS1/x-icon/2xlines.svg +6 -0
  47. package/DS1/x-icon/4x4.svg +18 -0
  48. package/DS1/x-icon/apple.svg +4 -0
  49. package/DS1/x-icon/avatar.svg +4 -0
  50. package/DS1/x-icon/big.svg +4 -0
  51. package/DS1/x-icon/blank.svg +3 -0
  52. package/DS1/x-icon/check.svg +3 -0
  53. package/DS1/x-icon/close.svg +3 -0
  54. package/DS1/x-icon/collapse.svg +3 -0
  55. package/DS1/x-icon/color.svg +4 -0
  56. package/DS1/x-icon/column.svg +5 -0
  57. package/DS1/x-icon/default.svg +3 -0
  58. package/DS1/x-icon/delete.svg +5 -0
  59. package/DS1/x-icon/dictate.svg +6 -0
  60. package/DS1/x-icon/do.svg +3 -0
  61. package/DS1/x-icon/down.svg +3 -0
  62. package/DS1/x-icon/duplicate.svg +4 -0
  63. package/DS1/x-icon/gallery.svg +5 -0
  64. package/DS1/x-icon/google.svg +6 -0
  65. package/DS1/x-icon/head.svg +5 -0
  66. package/DS1/x-icon/home.svg +3 -0
  67. package/DS1/x-icon/icon.svg +4 -0
  68. package/DS1/x-icon/in.svg +4 -0
  69. package/DS1/x-icon/lock.svg +5 -0
  70. package/DS1/x-icon/loop.svg +5 -0
  71. package/DS1/x-icon/mic.svg +5 -0
  72. package/DS1/x-icon/minimize.svg +3 -0
  73. package/DS1/x-icon/more.svg +5 -0
  74. package/DS1/x-icon/neutral.svg +6 -0
  75. package/DS1/x-icon/note.svg +6 -0
  76. package/DS1/x-icon/page.svg +4 -0
  77. package/DS1/x-icon/plus.svg +3 -0
  78. package/DS1/x-icon/rewind.svg +4 -0
  79. package/DS1/x-icon/row.svg +5 -0
  80. package/DS1/x-icon/sdown.svg +3 -0
  81. package/DS1/x-icon/search.svg +4 -0
  82. package/DS1/x-icon/see.svg +4 -0
  83. package/DS1/x-icon/ship.svg +5 -0
  84. package/DS1/x-icon/star.svg +3 -0
  85. package/DS1/x-icon/status.svg +4 -0
  86. package/DS1/x-icon/sup.svg +3 -0
  87. package/DS1/x-icon/title.svg +3 -0
  88. package/DS1/x-icon/undo.svg +3 -0
  89. package/DS1/x-icon/ungroup.svg +4 -0
  90. package/DS1/x-icon/unhead.svg +3 -0
  91. package/DS1/x-icon/unicon.svg +3 -0
  92. package/DS1/x-icon/unlock.svg +5 -0
  93. package/DS1/x-icon/unmic.svg +6 -0
  94. package/DS1/x-icon/unsee.svg +5 -0
  95. package/DS1/x-icon/unstar.svg +3 -0
  96. package/DS1/x-icon/untitle.svg +3 -0
  97. package/DS1/x-icon/up.svg +3 -0
  98. package/LICENSE +1 -1
  99. package/README.md +4 -4
  100. package/dist/0-face/device.d.ts +5 -0
  101. package/dist/0-face/device.d.ts.map +1 -1
  102. package/dist/0-face/device.js +111 -0
  103. package/dist/0-face/scaling.d.ts +48 -0
  104. package/dist/0-face/scaling.d.ts.map +1 -0
  105. package/dist/0-face/scaling.js +114 -0
  106. package/dist/2-core/ds-banner.d.ts +67 -0
  107. package/dist/2-core/ds-banner.d.ts.map +1 -1
  108. package/dist/2-core/ds-banner.js +97 -1
  109. package/dist/2-core/ds-button.d.ts +4 -15
  110. package/dist/2-core/ds-button.d.ts.map +1 -1
  111. package/dist/2-core/ds-button.js +14 -86
  112. package/dist/2-core/ds-card.d.ts +39 -0
  113. package/dist/2-core/ds-card.d.ts.map +1 -0
  114. package/dist/2-core/ds-card.js +119 -0
  115. package/dist/2-core/ds-cycle.d.ts +1 -5
  116. package/dist/2-core/ds-cycle.d.ts.map +1 -1
  117. package/dist/2-core/ds-cycle.js +74 -163
  118. package/dist/2-core/ds-date.d.ts.map +1 -1
  119. package/dist/2-core/ds-date.js +3 -9
  120. package/dist/2-core/ds-gap.d.ts +28 -0
  121. package/dist/2-core/ds-gap.d.ts.map +1 -0
  122. package/dist/2-core/ds-gap.js +25 -0
  123. package/dist/2-core/ds-icon.d.ts.map +1 -1
  124. package/dist/2-core/ds-icon.js +6 -35
  125. package/dist/2-core/ds-input.d.ts +127 -0
  126. package/dist/2-core/ds-input.d.ts.map +1 -1
  127. package/dist/2-core/ds-input.js +252 -1
  128. package/dist/2-core/ds-pagedots.d.ts +32 -0
  129. package/dist/2-core/ds-pagedots.d.ts.map +1 -0
  130. package/dist/2-core/ds-pagedots.js +36 -0
  131. package/dist/2-core/ds-text.d.ts +5 -3
  132. package/dist/2-core/ds-text.d.ts.map +1 -1
  133. package/dist/2-core/ds-text.js +49 -27
  134. package/dist/2-core/ds-tooltip.d.ts +2 -2
  135. package/dist/2-core/ds-tooltip.d.ts.map +1 -1
  136. package/dist/2-core/ds-tooltip.js +11 -57
  137. package/dist/2-core/styles/ds-banner.css +77 -0
  138. package/dist/2-core/styles/ds-button.css +67 -0
  139. package/dist/2-core/styles/ds-cycle.css +21 -0
  140. package/dist/2-core/styles/ds-date.css +9 -0
  141. package/dist/2-core/styles/ds-gap.css +93 -0
  142. package/dist/2-core/styles/ds-icon.css +30 -0
  143. package/dist/2-core/styles/ds-input.css +46 -0
  144. package/dist/2-core/styles/ds-pagedots.css +26 -0
  145. package/dist/2-core/styles/ds-text.css +29 -0
  146. package/dist/2-core/styles/ds-tooltip.css +49 -0
  147. package/dist/3-unit/ds-accordion.d.ts +47 -0
  148. package/dist/3-unit/ds-accordion.d.ts.map +1 -0
  149. package/dist/3-unit/ds-accordion.js +75 -0
  150. package/dist/3-unit/ds-form.d.ts +70 -0
  151. package/dist/3-unit/ds-form.d.ts.map +1 -0
  152. package/dist/3-unit/ds-form.js +232 -0
  153. package/dist/3-unit/ds-list.d.ts.map +1 -1
  154. package/dist/3-unit/ds-list.js +5 -11
  155. package/dist/3-unit/ds-row.d.ts.map +1 -1
  156. package/dist/3-unit/ds-row.js +3 -19
  157. package/dist/3-unit/ds-table.d.ts.map +1 -1
  158. package/dist/3-unit/ds-table.js +3 -86
  159. package/dist/3-unit/styles/ds-accordion.css +46 -0
  160. package/dist/3-unit/styles/ds-list.css +9 -0
  161. package/dist/3-unit/styles/ds-row.css +19 -0
  162. package/dist/3-unit/styles/ds-table.css +80 -0
  163. package/dist/{3-unit/row-v1.d.ts → 4-page/ds-container.d.ts} +3 -11
  164. package/dist/4-page/ds-container.d.ts.map +1 -0
  165. package/dist/4-page/ds-container.js +11 -0
  166. package/dist/4-page/ds-grid.d.ts +5 -0
  167. package/dist/4-page/ds-grid.d.ts.map +1 -1
  168. package/dist/4-page/ds-grid.js +38 -56
  169. package/dist/4-page/ds-layout.d.ts +3 -3
  170. package/dist/4-page/ds-layout.d.ts.map +1 -1
  171. package/dist/4-page/ds-layout.js +651 -162
  172. package/dist/4-page/styles/ds-container.css +35 -0
  173. package/dist/4-page/styles/ds-grid.css +56 -0
  174. package/dist/4-page/styles/ds-layout.css +251 -0
  175. package/dist/ds-one.bundle.css +700 -0
  176. package/dist/ds-one.bundle.css.map +7 -0
  177. package/dist/ds-one.bundle.js +2642 -1469
  178. package/dist/ds-one.bundle.js.map +1 -7
  179. package/dist/ds-one.bundle.min.css +2 -0
  180. package/dist/ds-one.bundle.min.css.map +7 -0
  181. package/dist/ds-one.bundle.min.js +3850 -550
  182. package/dist/ds-one.bundle.min.js.map +1 -7
  183. package/dist/index.d.ts +9 -1
  184. package/dist/index.d.ts.map +1 -1
  185. package/dist/index.js +9 -1
  186. package/package.json +4 -2
  187. package/dist/3-unit/doublenav-v1.d.ts +0 -51
  188. package/dist/3-unit/doublenav-v1.d.ts.map +0 -1
  189. package/dist/3-unit/doublenav-v1.js +0 -88
  190. package/dist/3-unit/ds-portfolio-doublenav.d.ts +0 -51
  191. package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +0 -1
  192. package/dist/3-unit/ds-portfolio-doublenav.js +0 -88
  193. package/dist/3-unit/ds-portfolio-panel.d.ts +0 -11
  194. package/dist/3-unit/ds-portfolio-panel.d.ts.map +0 -1
  195. package/dist/3-unit/ds-portfolio-panel.js +0 -16
  196. package/dist/3-unit/ds-portfolio-singlenav.d.ts +0 -32
  197. package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +0 -1
  198. package/dist/3-unit/ds-portfolio-singlenav.js +0 -62
  199. package/dist/3-unit/list-v1.d.ts +0 -11
  200. package/dist/3-unit/list-v1.d.ts.map +0 -1
  201. package/dist/3-unit/list-v1.js +0 -15
  202. package/dist/3-unit/panel-v1.d.ts +0 -11
  203. package/dist/3-unit/panel-v1.d.ts.map +0 -1
  204. package/dist/3-unit/panel-v1.js +0 -16
  205. package/dist/3-unit/row-v1.d.ts.map +0 -1
  206. package/dist/3-unit/row-v1.js +0 -32
  207. package/dist/3-unit/singlenav-v1.d.ts +0 -32
  208. package/dist/3-unit/singlenav-v1.d.ts.map +0 -1
  209. package/dist/3-unit/singlenav-v1.js +0 -62
@@ -1,2 +1,98 @@
1
1
  // ds-banner.ts
2
- // Core component
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, type PropertyValues } from "lit";
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,7 +23,7 @@ export declare class Button extends LitElement {
22
23
  type: BooleanConstructor;
23
24
  reflect: boolean;
24
25
  };
25
- key: {
26
+ text: {
26
27
  type: StringConstructor;
27
28
  };
28
29
  fallback: {
@@ -42,33 +43,21 @@ export declare class Button extends LitElement {
42
43
  type: BooleanConstructor;
43
44
  state: boolean;
44
45
  };
45
- _text: {
46
- type: StringConstructor;
47
- state: boolean;
48
- };
49
46
  };
50
47
  variant: string;
51
48
  disabled: boolean;
52
49
  bold: boolean;
53
50
  "no-background": boolean;
54
51
  blank: boolean;
55
- key: string;
52
+ text: string;
56
53
  fallback: string;
57
54
  language: string;
58
55
  defaultText: string;
59
56
  href: string;
60
57
  _loading: boolean;
61
- _text: string | null;
62
58
  constructor();
63
59
  static styles: import("lit").CSSResult;
64
60
  connectedCallback(): void;
65
- disconnectedCallback(): void;
66
- _handleLanguageChange: () => void;
67
- updated(changedProps: PropertyValues): void;
68
- /**
69
- * Update text from translations (synchronous like Portfolio)
70
- */
71
- private _updateText;
72
61
  render(): import("lit-html").TemplateResult<1>;
73
62
  private _handleClick;
74
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,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC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AAM,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"}
@@ -1,55 +1,28 @@
1
1
  // ds-button.ts
2
2
  // Core button component
3
- import { LitElement, html, css } from "lit";
4
- import { getText } from "../0-face/i18n";
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.key = "";
14
+ this.text = "";
17
15
  this.fallback = "";
18
16
  this.language = "en-US";
19
17
  this.defaultText = "";
20
18
  this.href = "";
21
19
  this._loading = false;
22
- this._text = null;
23
20
  }
24
21
  connectedCallback() {
25
22
  super.connectedCallback();
26
- this._updateText();
27
- // Listen for language changes
28
- window.addEventListener("language-changed", this._handleLanguageChange);
29
- }
30
- disconnectedCallback() {
31
- super.disconnectedCallback();
32
- window.removeEventListener("language-changed", this._handleLanguageChange);
33
- }
34
- updated(changedProps) {
35
- super.updated(changedProps);
36
- if (changedProps.has("key") || changedProps.has("defaultText")) {
37
- this._updateText();
38
- }
39
- }
40
- /**
41
- * Update text from translations (synchronous like Portfolio)
42
- */
43
- _updateText() {
44
- if (this.key) {
45
- this._text = getText(this.key);
46
- }
47
- else {
48
- this._text = this.defaultText || this.fallback || null;
49
- }
50
- this.requestUpdate();
51
23
  }
52
24
  render() {
25
+ const hasTextProps = this.text || this.defaultText || this.fallback;
53
26
  return html `
54
27
  <button
55
28
  class=${this.variant}
@@ -58,7 +31,13 @@ export class Button extends LitElement {
58
31
  ?no-background=${this["no-background"]}
59
32
  @click=${this._handleClick}
60
33
  >
61
- ${this._text ? this._text : html `<slot></slot>`}
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>`}
62
41
  </button>
63
42
  `;
64
43
  }
@@ -96,63 +75,12 @@ Button.properties = {
96
75
  attribute: "no-background",
97
76
  },
98
77
  blank: { type: Boolean, reflect: true },
99
- key: { type: String },
78
+ text: { type: String },
100
79
  fallback: { type: String },
101
80
  language: { type: String },
102
81
  defaultText: { type: String, attribute: "default-text" },
103
82
  href: { type: String },
104
83
  _loading: { type: Boolean, state: true },
105
- _text: { type: String, state: true },
106
84
  };
107
- Button.styles = css `
108
- button {
109
- max-height: calc(var(--08) * var(--scaling-factor));
110
- border: none;
111
- cursor: pointer;
112
- font-size: calc(var(--type-size-default) * var(--scaling-factor));
113
- padding: 0 calc(1px * var(--scaling-factor));
114
- color: var(--button-text-color);
115
- font-family: var(--typeface);
116
- }
117
-
118
- button.title {
119
- background-color: var(--button-background-color-secondary);
120
- color: var(--button-text-color);
121
- }
122
-
123
- button.primary {
124
- background-color: var(--accent-color);
125
- color: var(--button-text-color);
126
- text-decoration-line: none;
127
- font-family: var(--typeface);
128
- }
129
-
130
- button.secondary {
131
- background-color: var(--button-background-color-secondary);
132
- color: var(--button-text-color);
133
- font-family: var(--typeface);
134
- }
135
-
136
- button[bold] {
137
- font-weight: var(--type-weight-bold);
138
- font-family: var(--typeface-medium);
139
- }
140
-
141
- button[no-background] {
142
- background-color: transparent;
143
- max-height: var(--1);
144
- padding: 0;
145
- color: var(--button-color, var(--button-text-color-secondary));
146
- }
147
-
148
- button[no-background][bold] {
149
- font-weight: var(--type-weight-bold);
150
- font-family: var(--typeface-medium);
151
- color: var(--button-color, var(--button-text-color-secondary));
152
- }
153
-
154
- .loading {
155
- opacity: 0.7;
156
- }
157
- `;
85
+ Button.styles = unsafeCSS(styles);
158
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,EAAa,MAAM,KAAK,CAAC;AAY5C,OAAO,aAAa,CAAC;AACrB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AAqCnB,qBAAa,KAAM,SAAQ,UAAU;IAEnC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;MAUpB;IAED,MAAM,CAAC,MAAM,0BAWX;IAIM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAGxB,OAAO,CAAC,aAAa,CAOnB;;IAyBF,iBAAiB;IA6BX,gBAAgB;IA6EtB,sBAAsB;IAatB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IASnE,iBAAiB;IAoDvB,qBAAqB;IAKrB,oBAAoB;IA0BpB,iBAAiB,CAAC,CAAC,EAAE,KAAK;IAuJ1B,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG;IA+C5C,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAyBtC,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAe/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