ds-one 0.2.0-alpha.3 → 0.2.5-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/DS1/0-face/{2025-04-23-device.ts → device.ts} +10 -6
  2. package/DS1/{utils/language.ts → 0-face/i18n.ts} +236 -92
  3. package/DS1/0-face/preferences.ts +23 -0
  4. package/DS1/0-face/pricing.ts +57 -0
  5. package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
  6. package/DS1/1-root/one.css +76 -107
  7. package/DS1/2-core/ds-banner.ts +3 -0
  8. package/DS1/2-core/ds-button.ts +13 -16
  9. package/DS1/2-core/ds-cycle.ts +84 -39
  10. package/DS1/2-core/{ds-year.ts → ds-date.ts} +5 -6
  11. package/DS1/2-core/ds-icon.ts +4 -4
  12. package/DS1/2-core/ds-input.ts +1 -0
  13. package/DS1/2-core/ds-text.ts +27 -3
  14. package/DS1/2-core/ds-tooltip.ts +9 -14
  15. package/DS1/3-unit/ds-list.ts +7 -0
  16. package/DS1/3-unit/ds-row.ts +4 -5
  17. package/DS1/3-unit/ds-table.ts +5 -6
  18. package/DS1/4-page/ds-grid.ts +9 -59
  19. package/DS1/4-page/ds-layout.ts +123 -18
  20. package/DS1/index.ts +39 -37
  21. package/LICENSE +1 -1
  22. package/README.md +43 -133
  23. package/dist/0-face/{2025-04-23-device.d.ts → device.d.ts} +1 -1
  24. package/dist/0-face/device.d.ts.map +1 -0
  25. package/dist/0-face/{2025-04-23-device.js → device.js} +7 -3
  26. package/dist/{utils/language.d.ts → 0-face/i18n.d.ts} +1 -3
  27. package/dist/0-face/i18n.d.ts.map +1 -0
  28. package/dist/{utils/language.js → 0-face/i18n.js} +178 -76
  29. package/dist/0-face/preferences.d.ts +9 -0
  30. package/dist/0-face/preferences.d.ts.map +1 -0
  31. package/dist/0-face/preferences.js +14 -0
  32. package/dist/0-face/pricing.d.ts +15 -0
  33. package/dist/0-face/pricing.d.ts.map +1 -0
  34. package/dist/0-face/pricing.js +46 -0
  35. package/dist/0-face/theme.d.ts.map +1 -0
  36. package/dist/2-core/ds-banner.d.ts +1 -0
  37. package/dist/2-core/ds-banner.d.ts.map +1 -0
  38. package/dist/2-core/ds-banner.js +2 -0
  39. package/dist/2-core/ds-button.d.ts +2 -7
  40. package/dist/2-core/ds-button.d.ts.map +1 -1
  41. package/dist/2-core/ds-button.js +12 -14
  42. package/dist/2-core/ds-cycle.d.ts +2 -0
  43. package/dist/2-core/ds-cycle.d.ts.map +1 -1
  44. package/dist/2-core/ds-cycle.js +80 -34
  45. package/dist/2-core/{ds-year.d.ts → ds-date.d.ts} +4 -4
  46. package/dist/2-core/ds-date.d.ts.map +1 -0
  47. package/dist/2-core/{ds-year.js → ds-date.js} +5 -5
  48. package/dist/2-core/ds-icon.js +4 -4
  49. package/dist/2-core/ds-input.d.ts +1 -0
  50. package/dist/2-core/ds-input.d.ts.map +1 -0
  51. package/dist/2-core/ds-input.js +1 -0
  52. package/dist/2-core/ds-text.d.ts +2 -0
  53. package/dist/2-core/ds-text.d.ts.map +1 -1
  54. package/dist/2-core/ds-text.js +26 -3
  55. package/dist/2-core/ds-tooltip.d.ts +1 -1
  56. package/dist/2-core/ds-tooltip.d.ts.map +1 -1
  57. package/dist/2-core/ds-tooltip.js +9 -13
  58. package/dist/3-unit/ds-list.d.ts.map +1 -1
  59. package/dist/3-unit/ds-list.js +3 -0
  60. package/dist/3-unit/{ds-doublenav.d.ts → ds-portfolio-doublenav.d.ts} +4 -4
  61. package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +1 -0
  62. package/dist/3-unit/{ds-doublenav.js → ds-portfolio-doublenav.js} +4 -4
  63. package/dist/3-unit/{ds-panel.d.ts → ds-portfolio-panel.d.ts} +3 -3
  64. package/dist/3-unit/ds-portfolio-panel.d.ts.map +1 -0
  65. package/dist/3-unit/{ds-panel.js → ds-portfolio-panel.js} +3 -3
  66. package/dist/3-unit/{ds-singlenav.d.ts → ds-portfolio-singlenav.d.ts} +4 -4
  67. package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +1 -0
  68. package/dist/3-unit/{ds-singlenav.js → ds-portfolio-singlenav.js} +7 -7
  69. package/dist/3-unit/ds-row.js +4 -4
  70. package/dist/3-unit/ds-table.d.ts.map +1 -1
  71. package/dist/3-unit/ds-table.js +5 -6
  72. package/dist/4-page/ds-grid.d.ts +0 -7
  73. package/dist/4-page/ds-grid.d.ts.map +1 -1
  74. package/dist/4-page/ds-grid.js +9 -54
  75. package/dist/4-page/ds-layout.d.ts +1 -1
  76. package/dist/4-page/ds-layout.d.ts.map +1 -1
  77. package/dist/4-page/ds-layout.js +126 -17
  78. package/dist/ds-one.bundle.js +2515 -4132
  79. package/dist/ds-one.bundle.js.map +4 -4
  80. package/dist/ds-one.bundle.min.js +245 -787
  81. package/dist/ds-one.bundle.min.js.map +4 -4
  82. package/dist/index.d.ts +16 -26
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +32 -34
  85. package/package.json +8 -9
  86. package/DS1/0-face/2025-04-23-language.ts +0 -4
  87. package/DS1/2-core/ds-article.ts +0 -454
  88. package/DS1/2-core/ds-attributes.ts +0 -155
  89. package/DS1/2-core/ds-downloadcv.ts +0 -146
  90. package/DS1/2-core/ds-header.ts +0 -82
  91. package/DS1/2-core/ds-home.ts +0 -168
  92. package/DS1/2-core/ds-link.ts +0 -121
  93. package/DS1/2-core/ds-markdown.ts +0 -252
  94. package/DS1/2-core/ds-price.ts +0 -108
  95. package/DS1/2-core/ds-squarecircle.ts +0 -155
  96. package/DS1/2-core/ds-title.ts +0 -139
  97. package/DS1/2-core/ds-viewtoggle.ts +0 -83
  98. package/DS1/3-unit/ds-doublenav.ts +0 -106
  99. package/DS1/3-unit/ds-panel.ts +0 -27
  100. package/DS1/3-unit/ds-singlenav.ts +0 -79
  101. package/DS1/utils/cdn-loader.ts +0 -208
  102. package/DS1/utils/keys.json +0 -41
  103. package/DS1/utils/pricing.ts +0 -24
  104. package/DS1/utils/scroll.ts +0 -184
  105. package/DS1/utils/settings.ts +0 -23
  106. package/DS1/utils/viewMode.ts +0 -55
  107. package/dist/0-face/2025-04-23-device.d.ts.map +0 -1
  108. package/dist/0-face/2025-04-23-language.d.ts +0 -1
  109. package/dist/0-face/2025-04-23-language.d.ts.map +0 -1
  110. package/dist/0-face/2025-04-23-language.js +0 -3
  111. package/dist/2-core/article-v1.d.ts +0 -129
  112. package/dist/2-core/article-v1.d.ts.map +0 -1
  113. package/dist/2-core/article-v1.js +0 -361
  114. package/dist/2-core/attributes-v1.d.ts +0 -47
  115. package/dist/2-core/attributes-v1.d.ts.map +0 -1
  116. package/dist/2-core/attributes-v1.js +0 -128
  117. package/dist/2-core/cycle-v1.d.ts +0 -66
  118. package/dist/2-core/cycle-v1.d.ts.map +0 -1
  119. package/dist/2-core/cycle-v1.js +0 -586
  120. package/dist/2-core/downloadcv-v1.d.ts +0 -58
  121. package/dist/2-core/downloadcv-v1.d.ts.map +0 -1
  122. package/dist/2-core/downloadcv-v1.js +0 -119
  123. package/dist/2-core/ds-article.d.ts +0 -129
  124. package/dist/2-core/ds-article.d.ts.map +0 -1
  125. package/dist/2-core/ds-article.js +0 -361
  126. package/dist/2-core/ds-attributes.d.ts +0 -47
  127. package/dist/2-core/ds-attributes.d.ts.map +0 -1
  128. package/dist/2-core/ds-attributes.js +0 -128
  129. package/dist/2-core/ds-button.figma.d.ts +0 -2
  130. package/dist/2-core/ds-button.figma.d.ts.map +0 -1
  131. package/dist/2-core/ds-button.figma.js +0 -6
  132. package/dist/2-core/ds-downloadcv.d.ts +0 -58
  133. package/dist/2-core/ds-downloadcv.d.ts.map +0 -1
  134. package/dist/2-core/ds-downloadcv.js +0 -119
  135. package/dist/2-core/ds-header.d.ts +0 -28
  136. package/dist/2-core/ds-header.d.ts.map +0 -1
  137. package/dist/2-core/ds-header.js +0 -66
  138. package/dist/2-core/ds-home.d.ts +0 -26
  139. package/dist/2-core/ds-home.d.ts.map +0 -1
  140. package/dist/2-core/ds-home.js +0 -148
  141. package/dist/2-core/ds-link.d.ts +0 -35
  142. package/dist/2-core/ds-link.d.ts.map +0 -1
  143. package/dist/2-core/ds-link.js +0 -85
  144. package/dist/2-core/ds-markdown.d.ts +0 -7
  145. package/dist/2-core/ds-markdown.d.ts.map +0 -1
  146. package/dist/2-core/ds-markdown.js +0 -240
  147. package/dist/2-core/ds-price.d.ts +0 -46
  148. package/dist/2-core/ds-price.d.ts.map +0 -1
  149. package/dist/2-core/ds-price.js +0 -72
  150. package/dist/2-core/ds-squarecircle.d.ts +0 -50
  151. package/dist/2-core/ds-squarecircle.d.ts.map +0 -1
  152. package/dist/2-core/ds-squarecircle.js +0 -133
  153. package/dist/2-core/ds-title.d.ts +0 -50
  154. package/dist/2-core/ds-title.d.ts.map +0 -1
  155. package/dist/2-core/ds-title.js +0 -103
  156. package/dist/2-core/ds-viewtoggle.d.ts +0 -27
  157. package/dist/2-core/ds-viewtoggle.d.ts.map +0 -1
  158. package/dist/2-core/ds-viewtoggle.js +0 -49
  159. package/dist/2-core/ds-year.d.ts.map +0 -1
  160. package/dist/2-core/header-v1.d.ts +0 -28
  161. package/dist/2-core/header-v1.d.ts.map +0 -1
  162. package/dist/2-core/header-v1.js +0 -66
  163. package/dist/2-core/home-v1.d.ts +0 -26
  164. package/dist/2-core/home-v1.d.ts.map +0 -1
  165. package/dist/2-core/home-v1.js +0 -148
  166. package/dist/2-core/icon-v1.d.ts +0 -28
  167. package/dist/2-core/icon-v1.d.ts.map +0 -1
  168. package/dist/2-core/icon-v1.js +0 -297
  169. package/dist/2-core/link-v1.d.ts +0 -35
  170. package/dist/2-core/link-v1.d.ts.map +0 -1
  171. package/dist/2-core/link-v1.js +0 -85
  172. package/dist/2-core/markdown-v1.d.ts +0 -7
  173. package/dist/2-core/markdown-v1.d.ts.map +0 -1
  174. package/dist/2-core/markdown-v1.js +0 -240
  175. package/dist/2-core/price-v1.d.ts +0 -46
  176. package/dist/2-core/price-v1.d.ts.map +0 -1
  177. package/dist/2-core/price-v1.js +0 -72
  178. package/dist/2-core/squarecircle-v1.d.ts +0 -50
  179. package/dist/2-core/squarecircle-v1.d.ts.map +0 -1
  180. package/dist/2-core/squarecircle-v1.js +0 -133
  181. package/dist/2-core/text-v1.d.ts +0 -48
  182. package/dist/2-core/text-v1.d.ts.map +0 -1
  183. package/dist/2-core/text-v1.js +0 -83
  184. package/dist/2-core/title-v1.d.ts +0 -50
  185. package/dist/2-core/title-v1.d.ts.map +0 -1
  186. package/dist/2-core/title-v1.js +0 -103
  187. package/dist/2-core/tooltip-v1.d.ts +0 -39
  188. package/dist/2-core/tooltip-v1.d.ts.map +0 -1
  189. package/dist/2-core/tooltip-v1.js +0 -145
  190. package/dist/2-core/viewtoggle-v1.d.ts +0 -27
  191. package/dist/2-core/viewtoggle-v1.d.ts.map +0 -1
  192. package/dist/2-core/viewtoggle-v1.js +0 -49
  193. package/dist/2-core/year-v1.d.ts +0 -16
  194. package/dist/2-core/year-v1.d.ts.map +0 -1
  195. package/dist/2-core/year-v1.js +0 -21
  196. package/dist/3-unit/ds-doublenav.d.ts.map +0 -1
  197. package/dist/3-unit/ds-panel.d.ts.map +0 -1
  198. package/dist/3-unit/ds-singlenav.d.ts.map +0 -1
  199. package/dist/utils/cdn-loader.d.ts +0 -19
  200. package/dist/utils/cdn-loader.d.ts.map +0 -1
  201. package/dist/utils/cdn-loader.js +0 -142
  202. package/dist/utils/keys.json +0 -41
  203. package/dist/utils/language.d.ts.map +0 -1
  204. package/dist/utils/pricing.d.ts +0 -8
  205. package/dist/utils/pricing.d.ts.map +0 -1
  206. package/dist/utils/pricing.js +0 -14
  207. package/dist/utils/scroll.d.ts +0 -34
  208. package/dist/utils/scroll.d.ts.map +0 -1
  209. package/dist/utils/scroll.js +0 -140
  210. package/dist/utils/settings.d.ts +0 -9
  211. package/dist/utils/settings.d.ts.map +0 -1
  212. package/dist/utils/settings.js +0 -14
  213. package/dist/utils/theme.d.ts.map +0 -1
  214. package/dist/utils/viewMode.d.ts +0 -14
  215. package/dist/utils/viewMode.d.ts.map +0 -1
  216. package/dist/utils/viewMode.js +0 -46
  217. /package/DS1/{utils → 0-face}/theme.ts +0 -0
  218. /package/DS1/{x Icon → x-icon}/1x.svg +0 -0
  219. /package/DS1/{x Icon → x-icon}/1xdots.svg +0 -0
  220. /package/DS1/{x Icon → x-icon}/1xgrid.svg +0 -0
  221. /package/DS1/{x Icon → x-icon}/1xlines.svg +0 -0
  222. /package/DS1/{x Icon → x-icon}/2x.svg +0 -0
  223. /package/DS1/{x Icon → x-icon}/2xdots.svg +0 -0
  224. /package/DS1/{x Icon → x-icon}/2xgrid.svg +0 -0
  225. /package/DS1/{x Icon → x-icon}/2xlines.svg +0 -0
  226. /package/DS1/{x Icon → x-icon}/big.svg +0 -0
  227. /package/DS1/{x Icon → x-icon}/blank.svg +0 -0
  228. /package/DS1/{x Icon → x-icon}/check.svg +0 -0
  229. /package/DS1/{x Icon → x-icon}/close.svg +0 -0
  230. /package/DS1/{x Icon → x-icon}/collapse.svg +0 -0
  231. /package/DS1/{x Icon → x-icon}/color.svg +0 -0
  232. /package/DS1/{x Icon → x-icon}/column.svg +0 -0
  233. /package/DS1/{x Icon → x-icon}/default.svg +0 -0
  234. /package/DS1/{x Icon → x-icon}/delete.svg +0 -0
  235. /package/DS1/{x Icon → x-icon}/do.svg +0 -0
  236. /package/DS1/{x Icon → x-icon}/down.svg +0 -0
  237. /package/DS1/{x Icon → x-icon}/duplicate.svg +0 -0
  238. /package/DS1/{x Icon → x-icon}/email.svg +0 -0
  239. /package/DS1/{x Icon → x-icon}/expand.svg +0 -0
  240. /package/DS1/{x Icon → x-icon}/gallery.svg +0 -0
  241. /package/DS1/{x Icon → x-icon}/group.svg +0 -0
  242. /package/DS1/{x Icon → x-icon}/head.svg +0 -0
  243. /package/DS1/{x Icon → x-icon}/icon.svg +0 -0
  244. /package/DS1/{x Icon → x-icon}/left.svg +0 -0
  245. /package/DS1/{x Icon → x-icon}/lock.svg +0 -0
  246. /package/DS1/{x Icon → x-icon}/mic.svg +0 -0
  247. /package/DS1/{x Icon → x-icon}/minimize.svg +0 -0
  248. /package/DS1/{x Icon → x-icon}/more.svg +0 -0
  249. /package/DS1/{x Icon → x-icon}/note.svg +0 -0
  250. /package/DS1/{x Icon → x-icon}/open.svg +0 -0
  251. /package/DS1/{x Icon → x-icon}/page.svg +0 -0
  252. /package/DS1/{x Icon → x-icon}/plus.svg +0 -0
  253. /package/DS1/{x Icon → x-icon}/rewind.svg +0 -0
  254. /package/DS1/{x Icon → x-icon}/right.svg +0 -0
  255. /package/DS1/{x Icon/row..svg → x-icon/row.svg} +0 -0
  256. /package/DS1/{x Icon → x-icon}/search.svg +0 -0
  257. /package/DS1/{x Icon → x-icon}/see.svg +0 -0
  258. /package/DS1/{x Icon → x-icon}/star.svg +0 -0
  259. /package/DS1/{x Icon → x-icon}/title.svg +0 -0
  260. /package/DS1/{x Icon → x-icon}/undo.svg +0 -0
  261. /package/DS1/{x Icon → x-icon}/ungroup.svg +0 -0
  262. /package/DS1/{x Icon → x-icon}/unhead.svg +0 -0
  263. /package/DS1/{x Icon → x-icon}/unicon.svg +0 -0
  264. /package/DS1/{x Icon → x-icon}/unlock.svg +0 -0
  265. /package/DS1/{x Icon → x-icon}/unmic.svg +0 -0
  266. /package/DS1/{x Icon → x-icon}/unsee.svg +0 -0
  267. /package/DS1/{x Icon → x-icon}/unstar.svg +0 -0
  268. /package/DS1/{x Icon → x-icon}/untitle.svg +0 -0
  269. /package/DS1/{x Icon → x-icon}/up.svg +0 -0
  270. /package/dist/{utils → 0-face}/theme.d.ts +0 -0
  271. /package/dist/{utils → 0-face}/theme.js +0 -0
@@ -1,46 +0,0 @@
1
- import { LitElement } from "lit";
2
- /**
3
- * A component for displaying the monthly price label based on language/region
4
- *
5
- * @element price-v1
6
- * @prop {string} country - Preferred country (overrides language mapping)
7
- * @prop {string} region - Alias for country; if provided, takes precedence over country
8
- */
9
- export declare class Price extends LitElement {
10
- static get properties(): {
11
- country: {
12
- type: StringConstructor;
13
- reflect: boolean;
14
- };
15
- region: {
16
- type: StringConstructor;
17
- reflect: boolean;
18
- };
19
- _label: {
20
- type: StringConstructor;
21
- state: boolean;
22
- };
23
- _loading: {
24
- type: BooleanConstructor;
25
- state: boolean;
26
- };
27
- };
28
- country: string;
29
- region: string;
30
- _label: string;
31
- _loading: boolean;
32
- private boundHandlers;
33
- constructor();
34
- static styles: import("lit").CSSResult;
35
- connectedCallback(): void;
36
- disconnectedCallback(): void;
37
- updated(changed: Map<string, unknown>): void;
38
- private _loadPrice;
39
- render(): import("lit-html").TemplateResult<1>;
40
- }
41
- declare global {
42
- interface HTMLElementTagNameMap {
43
- "price-v1": Price;
44
- }
45
- }
46
- //# sourceMappingURL=price-v1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"price-v1.d.ts","sourceRoot":"","sources":["../../DS1/2-core/price-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAK5C;;;;;;GAMG;AACH,qBAAa,KAAM,SAAQ,UAAU;IACnC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;MAOpB;IAEO,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,aAAa,CAAqC;;IAgB1D,MAAM,CAAC,MAAM,0BAOX;IAEF,iBAAiB;IAajB,oBAAoB;IAYpB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrC,OAAO,CAAC,UAAU;IAUlB,MAAM;CAKP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,KAAK,CAAC;KACnB;CACF"}
@@ -1,72 +0,0 @@
1
- import { LitElement, html, css } from "lit";
2
- import { currentLanguage } from "../utils/language";
3
- import { getPriceLabel } from "../utils/pricing";
4
- /**
5
- * A component for displaying the monthly price label based on language/region
6
- *
7
- * @element price-v1
8
- * @prop {string} country - Preferred country (overrides language mapping)
9
- * @prop {string} region - Alias for country; if provided, takes precedence over country
10
- */
11
- export class Price extends LitElement {
12
- static get properties() {
13
- return {
14
- country: { type: String, reflect: true },
15
- region: { type: String, reflect: true },
16
- _label: { type: String, state: true },
17
- _loading: { type: Boolean, state: true },
18
- };
19
- }
20
- constructor() {
21
- super();
22
- this.country = "";
23
- this.region = "";
24
- this._label = "";
25
- this._loading = true;
26
- this.boundHandlers = {
27
- languageChanged: (() => {
28
- this._loadPrice();
29
- }),
30
- };
31
- }
32
- connectedCallback() {
33
- super.connectedCallback();
34
- this._loadPrice();
35
- window.addEventListener("language-changed", this.boundHandlers.languageChanged);
36
- window.addEventListener("translations-loaded", this.boundHandlers.languageChanged);
37
- }
38
- disconnectedCallback() {
39
- super.disconnectedCallback();
40
- window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
41
- window.removeEventListener("translations-loaded", this.boundHandlers.languageChanged);
42
- }
43
- updated(changed) {
44
- super.updated(changed);
45
- if (changed.has("country") || changed.has("region")) {
46
- this._loadPrice();
47
- }
48
- }
49
- _loadPrice() {
50
- this._loading = true;
51
- const lang = currentLanguage.value;
52
- const preferredCountry = this.region || this.country;
53
- const label = getPriceLabel({ language: lang, country: preferredCountry });
54
- this._label = label;
55
- this._loading = false;
56
- this.requestUpdate();
57
- }
58
- render() {
59
- return html `<span class="${this._loading ? "loading" : ""}"
60
- >${this._label}</span
61
- >`;
62
- }
63
- }
64
- Price.styles = css `
65
- :host {
66
- display: inline;
67
- }
68
- .loading {
69
- opacity: 0.6;
70
- }
71
- `;
72
- customElements.define("price-v1", Price);
@@ -1,50 +0,0 @@
1
- import { LitElement } from "lit";
2
- /**
3
- * A component for theme toggle or project links (square or circle shape)
4
- *
5
- * @element squarecircle-v1
6
- * @prop {string} type - "theme-toggle" or "link"
7
- * @prop {string} shape - "square" or "circle"
8
- * @prop {string} href - URL for link type
9
- * @prop {string} project - Project name for color theming
10
- * @prop {boolean} loading - Loading state with pulse animation
11
- */
12
- export declare class SquareCircle extends LitElement {
13
- static get properties(): {
14
- type: {
15
- type: StringConstructor;
16
- reflect: boolean;
17
- };
18
- shape: {
19
- type: StringConstructor;
20
- reflect: boolean;
21
- };
22
- href: {
23
- type: StringConstructor;
24
- };
25
- project: {
26
- type: StringConstructor;
27
- reflect: boolean;
28
- };
29
- loading: {
30
- type: BooleanConstructor;
31
- reflect: boolean;
32
- };
33
- };
34
- type: "theme-toggle" | "link";
35
- shape: "square" | "circle";
36
- href: string;
37
- project: string;
38
- loading: boolean;
39
- constructor();
40
- static styles: import("lit").CSSResult;
41
- private _handleClick;
42
- connectedCallback(): void;
43
- render(): import("lit-html").TemplateResult<1>;
44
- }
45
- declare global {
46
- interface HTMLElementTagNameMap {
47
- "squarecircle-v1": SquareCircle;
48
- }
49
- }
50
- //# sourceMappingURL=squarecircle-v1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"squarecircle-v1.d.ts","sourceRoot":"","sources":["../../DS1/2-core/squarecircle-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;;;GASG;AACH,qBAAa,YAAa,SAAQ,UAAU;IAC1C,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;;;MAQpB;IAEO,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC;IAC9B,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;;IAWzB,MAAM,CAAC,MAAM,0BAgEX;IAEF,OAAO,CAAC,YAAY;IAQpB,iBAAiB;IAOjB,MAAM;CAyBP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,YAAY,CAAC;KACjC;CACF"}
@@ -1,133 +0,0 @@
1
- import { LitElement, css, html } from "lit";
2
- import { setTheme, currentTheme } from "../utils/theme";
3
- /**
4
- * A component for theme toggle or project links (square or circle shape)
5
- *
6
- * @element squarecircle-v1
7
- * @prop {string} type - "theme-toggle" or "link"
8
- * @prop {string} shape - "square" or "circle"
9
- * @prop {string} href - URL for link type
10
- * @prop {string} project - Project name for color theming
11
- * @prop {boolean} loading - Loading state with pulse animation
12
- */
13
- export class SquareCircle extends LitElement {
14
- static get properties() {
15
- return {
16
- type: { type: String, reflect: true },
17
- shape: { type: String, reflect: true },
18
- href: { type: String },
19
- project: { type: String, reflect: true },
20
- loading: { type: Boolean, reflect: true },
21
- };
22
- }
23
- constructor() {
24
- super();
25
- this.type = "theme-toggle";
26
- this.shape = "circle";
27
- this.href = "";
28
- this.project = "";
29
- this.loading = false;
30
- }
31
- _handleClick(e) {
32
- if (this.type === "theme-toggle") {
33
- e.preventDefault();
34
- const newTheme = currentTheme.get() === "light" ? "dark" : "light";
35
- setTheme(newTheme);
36
- }
37
- }
38
- connectedCallback() {
39
- super.connectedCallback();
40
- this.addEventListener("click", (e) => {
41
- this._handleClick(e);
42
- });
43
- }
44
- render() {
45
- const content = html `<div
46
- class="container"
47
- @click="${(e) => {
48
- this._handleClick(e);
49
- }}"
50
- ></div>`;
51
- if (this.type === "link" && this.href) {
52
- return html `
53
- <a href="${this.href}" @click="${this._handleClick}">${content}</a>
54
- `;
55
- }
56
- return html `
57
- <div
58
- class="wrapper"
59
- @click="${(e) => {
60
- this._handleClick(e);
61
- }}"
62
- >
63
- ${content}
64
- </div>
65
- `;
66
- }
67
- }
68
- SquareCircle.styles = css `
69
- :host {
70
- background-color: light-dark(var(--black), var(--white));
71
- display: block;
72
- width: calc(120px * var(--scaling-factor));
73
- height: calc(120px * var(--scaling-factor));
74
- cursor: pointer;
75
- pointer-events: auto;
76
- position: relative;
77
- z-index: 1;
78
- }
79
-
80
- :host([shape="circle"]) {
81
- border-radius: 9999px;
82
- }
83
-
84
- :host([shape="circle"]) .wrapper,
85
- :host([shape="circle"]) .container {
86
- border-radius: 9999px;
87
- }
88
-
89
- .wrapper {
90
- width: 100%;
91
- height: 100%;
92
- cursor: pointer;
93
- pointer-events: auto;
94
- }
95
-
96
- .container {
97
- width: 100%;
98
- height: 100%;
99
- background-color: inherit;
100
- cursor: pointer;
101
- pointer-events: auto;
102
- }
103
-
104
- .container:hover {
105
- opacity: 0.8;
106
- }
107
-
108
- a {
109
- display: block;
110
- width: 100%;
111
- height: 100%;
112
- text-decoration: none;
113
- cursor: pointer;
114
- pointer-events: auto;
115
- }
116
-
117
- :host([loading]) {
118
- animation: gentle-pulse 2s ease-in-out infinite;
119
- }
120
-
121
- @keyframes gentle-pulse {
122
- 0% {
123
- opacity: 1;
124
- }
125
- 50% {
126
- opacity: 0.7;
127
- }
128
- 100% {
129
- opacity: 1;
130
- }
131
- }
132
- `;
133
- customElements.define("squarecircle-v1", SquareCircle);
@@ -1,48 +0,0 @@
1
- import { LitElement } from "lit";
2
- /**
3
- * A component for displaying text from translations
4
- *
5
- * @element text-v1
6
- * @prop {string} key - The translation key to use
7
- * @prop {string} defaultValue - Default value if translation is not found
8
- * @prop {string} fallback - Optional fallback text if translation is not found (deprecated, use defaultValue)
9
- */
10
- export declare class Text extends LitElement {
11
- static get properties(): {
12
- key: {
13
- type: StringConstructor;
14
- reflect: boolean;
15
- };
16
- defaultValue: {
17
- type: StringConstructor;
18
- reflect: boolean;
19
- attribute: string;
20
- };
21
- fallback: {
22
- type: StringConstructor;
23
- reflect: boolean;
24
- };
25
- _text: {
26
- type: StringConstructor;
27
- state: boolean;
28
- };
29
- };
30
- key: string;
31
- defaultValue: string;
32
- fallback: string;
33
- _text: string;
34
- private boundHandlers;
35
- constructor();
36
- static styles: import("lit").CSSResult;
37
- connectedCallback(): void;
38
- disconnectedCallback(): void;
39
- updated(changedProperties: Map<string, unknown>): void;
40
- _loadText(): void;
41
- render(): import("lit-html").TemplateResult<1>;
42
- }
43
- declare global {
44
- interface HTMLElementTagNameMap {
45
- "text-v1": Text;
46
- }
47
- }
48
- //# sourceMappingURL=text-v1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text-v1.d.ts","sourceRoot":"","sources":["../../DS1/2-core/text-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;GAOG;AACH,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;MAOpB;IAEO,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,aAAa,CAAqC;;IAkB1D,MAAM,CAAC,MAAM,0BAQX;IAEF,iBAAiB;IAoBjB,oBAAoB;IAYpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ/C,SAAS;IAgBT,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
@@ -1,83 +0,0 @@
1
- import { LitElement, html, css } from "lit";
2
- import { getText } from "../utils/language";
3
- /**
4
- * A component for displaying text from translations
5
- *
6
- * @element text-v1
7
- * @prop {string} key - The translation key to use
8
- * @prop {string} defaultValue - Default value if translation is not found
9
- * @prop {string} fallback - Optional fallback text if translation is not found (deprecated, use defaultValue)
10
- */
11
- export class Text extends LitElement {
12
- static get properties() {
13
- return {
14
- key: { type: String, reflect: true },
15
- defaultValue: { type: String, reflect: true, attribute: "default-value" },
16
- fallback: { type: String, reflect: true }, // Kept for backward compatibility
17
- _text: { type: String, state: true },
18
- };
19
- }
20
- constructor() {
21
- super();
22
- this.key = "";
23
- this.defaultValue = "";
24
- this.fallback = "";
25
- this._text = "";
26
- // Create bound event handlers for proper cleanup
27
- this.boundHandlers = {
28
- languageChanged: (() => {
29
- console.log("Language changed event received in text-v1");
30
- this._loadText();
31
- }),
32
- };
33
- }
34
- connectedCallback() {
35
- super.connectedCallback();
36
- this._loadText();
37
- // Listen for language changes
38
- window.addEventListener("language-changed", this.boundHandlers.languageChanged);
39
- // Also listen for translations loaded event
40
- window.addEventListener("translations-loaded", this.boundHandlers.languageChanged);
41
- // Listen for language changes via events instead of signals
42
- // The currentLanguage signal changes will trigger the language-changed event
43
- }
44
- disconnectedCallback() {
45
- super.disconnectedCallback();
46
- window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
47
- window.removeEventListener("translations-loaded", this.boundHandlers.languageChanged);
48
- }
49
- updated(changedProperties) {
50
- super.updated(changedProperties);
51
- if (changedProperties.has("key") || changedProperties.has("defaultValue")) {
52
- this._loadText();
53
- }
54
- }
55
- _loadText() {
56
- if (!this.key) {
57
- this._text = this.defaultValue || this.fallback || "";
58
- return;
59
- }
60
- try {
61
- const text = getText(this.key);
62
- this._text = text || this.defaultValue || this.fallback || this.key;
63
- }
64
- catch (error) {
65
- console.error("Error loading text for key:", this.key, error);
66
- this._text = this.defaultValue || this.fallback || this.key;
67
- }
68
- this.requestUpdate();
69
- }
70
- render() {
71
- return html `<span>${this._text || this.defaultValue || this.key}</span>`;
72
- }
73
- }
74
- Text.styles = css `
75
- :host {
76
- display: inline;
77
- }
78
-
79
- .loading {
80
- opacity: 0.6;
81
- }
82
- `;
83
- customElements.define("text-v1", Text);
@@ -1,50 +0,0 @@
1
- import { LitElement } from "lit";
2
- /**
3
- * A component for displaying page titles with localization support
4
- *
5
- * @element title-v1
6
- * @prop {string} key - The translation key to use
7
- * @prop {string} defaultValue - Default value if translation is not found
8
- */
9
- export declare class Title extends LitElement {
10
- private _gridArea;
11
- static get properties(): {
12
- gridarea: {
13
- type: StringConstructor;
14
- reflect: boolean;
15
- };
16
- key: {
17
- type: StringConstructor;
18
- reflect: boolean;
19
- };
20
- defaultValue: {
21
- type: StringConstructor;
22
- reflect: boolean;
23
- attribute: string;
24
- };
25
- _text: {
26
- type: StringConstructor;
27
- state: boolean;
28
- };
29
- };
30
- key: string;
31
- defaultValue: string;
32
- _text: string;
33
- private boundHandlers;
34
- set gridarea(value: string);
35
- get gridarea(): string;
36
- static styles: import("lit").CSSResult;
37
- constructor();
38
- connectedCallback(): void;
39
- disconnectedCallback(): void;
40
- updated(changedProperties: Map<string, unknown>): void;
41
- _loadText(): void;
42
- firstUpdated(): void;
43
- render(): import("lit-html").TemplateResult<1>;
44
- }
45
- declare global {
46
- interface HTMLElementTagNameMap {
47
- "title-v1": Title;
48
- }
49
- }
50
- //# sourceMappingURL=title-v1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"title-v1.d.ts","sourceRoot":"","sources":["../../DS1/2-core/title-v1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;GAMG;AACH,qBAAa,KAAM,SAAQ,UAAU;IACnC,OAAO,CAAC,SAAS,CAAM;IAEvB,MAAM,KAAK,UAAU;;;;;;;;;;;;;;;;;;MAOpB;IAEO,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,aAAa,CAAqC;IAE1D,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAKzB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,MAAM,CAAC,MAAM,0BAwBX;;IAeF,iBAAiB;IASjB,oBAAoB;IAQpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAM/C,SAAS;IAkBT,YAAY;IAMZ,MAAM;CAKP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,KAAK,CAAC;KACnB;CACF"}
@@ -1,103 +0,0 @@
1
- import { LitElement, html, css } from "lit";
2
- import { getText } from "../utils/language";
3
- /**
4
- * A component for displaying page titles with localization support
5
- *
6
- * @element title-v1
7
- * @prop {string} key - The translation key to use
8
- * @prop {string} defaultValue - Default value if translation is not found
9
- */
10
- export class Title extends LitElement {
11
- static get properties() {
12
- return {
13
- gridarea: { type: String, reflect: true },
14
- key: { type: String, reflect: true },
15
- defaultValue: { type: String, reflect: true, attribute: "default-value" },
16
- _text: { type: String, state: true },
17
- };
18
- }
19
- set gridarea(value) {
20
- const oldValue = this._gridArea;
21
- this._gridArea = value;
22
- this.style.gridArea = value;
23
- this.requestUpdate("gridarea", oldValue);
24
- }
25
- get gridarea() {
26
- return this._gridArea;
27
- }
28
- constructor() {
29
- super();
30
- this._gridArea = "";
31
- this.key = "";
32
- this.defaultValue = "";
33
- this._text = "";
34
- this.boundHandlers = {
35
- languageChanged: (() => {
36
- this._loadText();
37
- }),
38
- };
39
- }
40
- connectedCallback() {
41
- super.connectedCallback();
42
- this._loadText();
43
- window.addEventListener("language-changed", this.boundHandlers.languageChanged);
44
- }
45
- disconnectedCallback() {
46
- super.disconnectedCallback();
47
- window.removeEventListener("language-changed", this.boundHandlers.languageChanged);
48
- }
49
- updated(changedProperties) {
50
- if (changedProperties.has("key") || changedProperties.has("defaultValue")) {
51
- this._loadText();
52
- }
53
- }
54
- _loadText() {
55
- if (!this.key) {
56
- this._text = this.defaultValue || "";
57
- return;
58
- }
59
- try {
60
- const text = getText(this.key);
61
- this._text = text || this.defaultValue || this.key;
62
- }
63
- catch (error) {
64
- console.error(`[title-v1] Error loading text for key "${this.key}":`, error);
65
- this._text = this.defaultValue || this.key;
66
- }
67
- }
68
- firstUpdated() {
69
- if (this.hasAttribute("gridarea")) {
70
- this.style.gridArea = this.getAttribute("gridarea") || "";
71
- }
72
- }
73
- render() {
74
- const hasKey = this.key && this._text;
75
- return html ` <h1>${hasKey ? this._text : html `<slot></slot>`}</h1> `;
76
- }
77
- }
78
- Title.styles = css `
79
- :host {
80
- display: flex;
81
- padding: calc(2px * var(--scaling-factor));
82
- align-items: flex-start;
83
- }
84
-
85
- h1 {
86
- display: block;
87
- place-content: center;
88
- font-family: var(--typeface);
89
- color: light-dark(var(--black), var(--white));
90
- font-size: calc(36px * var(--scaling-factor));
91
- font-weight: 500;
92
- align-items: center;
93
- letter-spacing: -0.72px;
94
- margin: 0;
95
- height: 45px;
96
- }
97
-
98
- ::slotted(*) {
99
- margin: 0;
100
- width: 100%;
101
- }
102
- `;
103
- customElements.define("title-v1", Title);
@@ -1,39 +0,0 @@
1
- import { LitElement } from "lit";
2
- export declare class Tooltip extends LitElement {
3
- static properties: {
4
- key: {
5
- type: StringConstructor;
6
- reflect: boolean;
7
- };
8
- defaultValue: {
9
- type: StringConstructor;
10
- reflect: boolean;
11
- attribute: string;
12
- };
13
- _text: {
14
- state: boolean;
15
- };
16
- _visible: {
17
- state: boolean;
18
- };
19
- };
20
- key: string;
21
- defaultValue: string;
22
- private _text;
23
- private _visible;
24
- private boundWindowHandlers;
25
- private boundHostHandlers;
26
- constructor();
27
- static styles: import("lit").CSSResult;
28
- connectedCallback(): void;
29
- disconnectedCallback(): void;
30
- updated(changed: Map<string, unknown>): void;
31
- _loadText(): Promise<void>;
32
- render(): import("lit-html").TemplateResult<1>;
33
- }
34
- declare global {
35
- interface HTMLElementTagNameMap {
36
- "tooltip-v1": Tooltip;
37
- }
38
- }
39
- //# sourceMappingURL=tooltip-v1.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tooltip-v1.d.ts","sourceRoot":"","sources":["../../DS1/2-core/tooltip-v1.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,0BA6CX;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"}