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,16 +1,17 @@
1
- import { LitElement, html, css } from "lit";
1
+ import { LitElement, html, unsafeCSS } from "lit";
2
2
  import { translate, currentLanguage, getAvailableLanguagesSync, getLanguageDisplayName, setLanguage, } from "../0-face/i18n";
3
3
  import { currentTheme, setTheme } from "../0-face/theme";
4
4
  import { savePreferences } from "../0-face/preferences";
5
5
  import "./ds-button";
6
6
  import "./ds-icon";
7
7
  import "./ds-text";
8
+ import styles from "./styles/ds-cycle.css?inline";
8
9
  // Accent color utilities
9
10
  const saveAccentColor = (color) => {
10
11
  localStorage.setItem("accentColor", color);
11
12
  };
12
13
  const getAccentColor = () => {
13
- return localStorage.getItem("accentColor") || "--blue"; // Default color if none set
14
+ return localStorage.getItem("accentColor") || "--sharp-blue"; // Default color if none set
14
15
  };
15
16
  const applyAccentColor = () => {
16
17
  const color = getAccentColor();
@@ -38,7 +39,6 @@ export class Cycle extends LitElement {
38
39
  return {
39
40
  type: { type: String },
40
41
  values: { type: Array },
41
- label: { type: String },
42
42
  currentValue: { type: String, state: true }, // Make this a private state property
43
43
  translationsReady: { type: Boolean, state: true }, // Track if translations are loaded
44
44
  disabled: { type: Boolean, state: true },
@@ -50,7 +50,6 @@ export class Cycle extends LitElement {
50
50
  // Initialize properties with default values
51
51
  this.type = "";
52
52
  this.values = [];
53
- this.label = "";
54
53
  this.currentValue = "";
55
54
  this.translationsReady = false;
56
55
  this.disabled = false;
@@ -82,8 +81,6 @@ export class Cycle extends LitElement {
82
81
  const availableLanguages = getAvailableLanguagesSync();
83
82
  this.values = availableLanguages;
84
83
  this.currentValue = currentLanguage.value;
85
- // Set label
86
- this.label = this.getLabel();
87
84
  }
88
85
  else if (this.type === "theme") {
89
86
  // Set up theme cycling
@@ -91,18 +88,16 @@ export class Cycle extends LitElement {
91
88
  // Set initial value based on current theme
92
89
  const currentThemeValue = currentTheme.get();
93
90
  this.currentValue = currentThemeValue;
94
- // Set label
95
- this.label = this.getLabel();
96
91
  }
97
92
  else if (this.type === "accent-color") {
98
93
  // Set up accent color cycling
99
94
  this.values = [
100
- "--light-green",
101
- "--green",
102
- "--light-blue",
103
- "--blue",
95
+ "--apple-green",
96
+ "--every-green",
97
+ "--zenith-blue",
98
+ "--sharp-blue",
104
99
  "--pink",
105
- "--red",
100
+ "--tuned-red",
106
101
  "--orange",
107
102
  "--yellow",
108
103
  ];
@@ -121,8 +116,6 @@ export class Cycle extends LitElement {
121
116
  // Check if this should be disabled based on note behavior
122
117
  const currentPageStyle = getPageStyle();
123
118
  this.disabled = currentPageStyle === "note";
124
- // Set label
125
- this.label = this.getLabel();
126
119
  }
127
120
  else if (this.type === "page-style") {
128
121
  // Set up page style cycling
@@ -130,16 +123,12 @@ export class Cycle extends LitElement {
130
123
  // Set initial value based on current page style
131
124
  const currentPageStyle = getPageStyle();
132
125
  this.currentValue = currentPageStyle;
133
- // Set label
134
- this.label = this.getLabel();
135
126
  }
136
127
  else if (this.type === "icon-only") {
137
128
  // Set up icon-only cycling (no label)
138
129
  this.values = ["note", "page"];
139
130
  // Set initial value
140
131
  this.currentValue = this.values[0];
141
- // No label for icon-only type
142
- this.label = "";
143
132
  }
144
133
  // Request update to re-render with new values
145
134
  this.requestUpdate();
@@ -166,15 +155,11 @@ export class Cycle extends LitElement {
166
155
  // Get current language
167
156
  const currentLang = currentLanguage.value;
168
157
  this.currentValue = currentLang;
169
- // Update label
170
- this.label = this.getLabel();
171
158
  }
172
159
  else if (this.type === "theme") {
173
160
  // Get current theme
174
161
  const currentThemeValue = currentTheme.get();
175
162
  this.currentValue = currentThemeValue;
176
- // Update label
177
- this.label = this.getLabel();
178
163
  }
179
164
  else if (this.type === "accent-color") {
180
165
  // Get current accent color
@@ -190,22 +175,16 @@ export class Cycle extends LitElement {
190
175
  // Check if this should be disabled based on note behavior
191
176
  const currentPageStyle = getPageStyle();
192
177
  this.disabled = currentPageStyle === "note";
193
- // Update label
194
- this.label = this.getLabel();
195
178
  }
196
179
  else if (this.type === "page-style") {
197
180
  // Get current page style
198
181
  const currentPageStyle = getPageStyle();
199
182
  this.currentValue = currentPageStyle;
200
- // Update label
201
- this.label = this.getLabel();
202
183
  }
203
184
  else if (this.type === "icon-only") {
204
185
  // Get current page style for icon-only
205
186
  const currentPageStyle = getPageStyle();
206
187
  this.currentValue = currentPageStyle;
207
- // Update label
208
- this.label = "";
209
188
  }
210
189
  this.requestUpdate();
211
190
  }
@@ -326,15 +305,11 @@ export class Cycle extends LitElement {
326
305
  savePageStyle(newIconOnlyValue);
327
306
  // Save preferences
328
307
  savePreferences({ pageStyle: newIconOnlyValue });
329
- // No label update for icon-only type
330
- this.label = "";
331
308
  // Dispatch page style change event
332
309
  window.dispatchEvent(new CustomEvent("page-style-changed", {
333
310
  detail: { behavior: newIconOnlyValue },
334
311
  }));
335
312
  }
336
- // Update label
337
- this.label = this.getLabel();
338
313
  // Request update to re-render
339
314
  this.requestUpdate();
340
315
  }
@@ -366,9 +341,9 @@ export class Cycle extends LitElement {
366
341
  else if (this.type === "page-style") {
367
342
  // Return translated text for note behavior
368
343
  if (this.translationsReady) {
369
- const translatedText = translate(value === "note" ? "note" : "page");
344
+ const translatedText = translate(value === "note" ? "Note" : "Page");
370
345
  if (translatedText &&
371
- translatedText !== (value === "note" ? "note" : "page")) {
346
+ translatedText !== (value === "note" ? "Note" : "Page")) {
372
347
  return translatedText;
373
348
  }
374
349
  }
@@ -386,22 +361,36 @@ export class Cycle extends LitElement {
386
361
  }
387
362
  return value;
388
363
  }
364
+ getColorKey(colorVar) {
365
+ // Map CSS variables to translation text keys
366
+ const colorMap = {
367
+ "--tuned-red": "Red",
368
+ "--orange": "Orange",
369
+ "--yellow": "Yellow",
370
+ "--apple-green": "Apple green",
371
+ "--every-green": "Green",
372
+ "--zenith-blue": "Light blue",
373
+ "--sharp-blue": "Blue",
374
+ "--pink": "Pink",
375
+ };
376
+ return colorMap[colorVar] || colorVar.replace("--", "").replace("-", " ");
377
+ }
389
378
  getColorName(colorVar) {
390
- // Map CSS variables to language keys
379
+ // Map CSS variables to translation text keys
391
380
  const colorMap = {
392
- "--red": "red",
393
- "--orange": "orange",
394
- "--yellow": "yellow",
395
- "--light-green": "lightGreen",
396
- "--green": "green",
397
- "--light-blue": "lightBlue",
398
- "--blue": "blue",
399
- "--pink": "pink",
381
+ "--tuned-red": "Red",
382
+ "--orange": "Orange",
383
+ "--yellow": "Yellow",
384
+ "--apple-green": "Apple green",
385
+ "--every-green": "Green",
386
+ "--zenith-blue": "Light blue",
387
+ "--sharp-blue": "Blue",
388
+ "--pink": "Pink",
400
389
  };
401
- const languageKey = colorMap[colorVar];
402
- if (languageKey && this.translationsReady) {
403
- const translatedName = translate(languageKey);
404
- if (translatedName && translatedName !== languageKey) {
390
+ const translationText = colorMap[colorVar];
391
+ if (translationText && this.translationsReady) {
392
+ const translatedName = translate(translationText);
393
+ if (translatedName && translatedName !== translationText) {
405
394
  return translatedName;
406
395
  }
407
396
  }
@@ -426,121 +415,54 @@ export class Cycle extends LitElement {
426
415
  }
427
416
  return html `<span>${style}</span>`;
428
417
  }
429
- getLabel() {
430
- if (this.type === "language") {
431
- // Try to get translated label
432
- if (this.translationsReady) {
433
- const translatedLabel = translate("language");
434
- if (translatedLabel && translatedLabel !== "language") {
435
- return translatedLabel;
436
- }
437
- }
438
- // Fall back to English
439
- return "Language";
440
- }
441
- else if (this.type === "theme") {
442
- // Try to get translated label
443
- if (this.translationsReady) {
444
- const translatedLabel = translate("theme");
445
- if (translatedLabel && translatedLabel !== "theme") {
446
- return translatedLabel;
447
- }
448
- }
449
- // Fall back to English
450
- return "Theme";
451
- }
452
- else if (this.type === "accent-color") {
453
- // Try to get translated label
454
- if (this.translationsReady) {
455
- const translatedLabel = translate("accentColor");
456
- if (translatedLabel && translatedLabel !== "accentColor") {
457
- return translatedLabel;
458
- }
459
- }
460
- // Fall back to English
461
- return "Accent Color";
462
- }
463
- else if (this.type === "notes-style-medium") {
464
- // Try to get translated label
465
- if (this.translationsReady) {
466
- const translatedLabel = translate("notesStyle");
467
- if (translatedLabel && translatedLabel !== "notesStyle") {
468
- return translatedLabel;
469
- }
470
- }
471
- // Fall back to English
472
- return "Notes Style";
473
- }
474
- else if (this.type === "page-style") {
475
- // Try to get translated label
476
- if (this.translationsReady) {
477
- const translatedLabel = translate("clickingItem");
478
- if (translatedLabel && translatedLabel !== "clickingItem") {
479
- return translatedLabel;
480
- }
481
- }
482
- // Fall back to English
483
- return "Clic";
484
- }
485
- else if (this.type === "icon-only") {
486
- // No label for icon-only type
487
- return "";
488
- }
489
- return this.label;
490
- }
491
418
  render() {
492
419
  return html `
493
- <div class="cycle-container">
494
- ${this.type !== "icon-only"
495
- ? html `${this.type === "language"
420
+ <div class="cycle">
421
+ <ds-button
422
+ variant=${this.variant ||
423
+ (this.type === "language" || this.type === "theme"
424
+ ? "secondary"
425
+ : "primary")}
426
+ ?disabled=${this.disabled}
427
+ @click=${this.handleButtonClick}
428
+ >
429
+ ${this.type === "notes-style-medium" || this.type === "icon-only"
430
+ ? html `<span
431
+ style="display: inline-flex; align-items: center; gap: var(--025)"
432
+ >${this.getValueDisplay(this.currentValue)}</span
433
+ >`
434
+ : this.type === "language"
496
435
  ? html `<ds-text
497
- key="language"
498
- default-value="Language"
499
- class="cycle-label"
436
+ default-value=${this.getValueDisplay(this.currentValue)}
500
437
  ></ds-text>`
501
438
  : this.type === "theme"
502
439
  ? html `<ds-text
503
- key="theme"
504
- default-value="Theme"
505
- class="cycle-label"
440
+ text=${this.currentValue}
441
+ default-value=${this.currentValue}
506
442
  ></ds-text>`
507
443
  : this.type === "accent-color"
508
444
  ? html `<ds-text
509
- key="accentColor"
510
- default-value="Accent color"
511
- class="cycle-label"
445
+ text=${this.getColorKey(this.currentValue)}
446
+ default-value=${this.getColorName(this.currentValue)}
512
447
  ></ds-text>`
513
- : html `<span class="cycle-label">${this.label}</span>`}`
514
- : ""}
515
- <div
516
- style="display: flex; align-items: center; ${this.type === "icon-only"
517
- ? "justify-content: center;"
518
- : ""}"
519
- >
520
- <ds-button
521
- variant=${this.variant ||
522
- (this.type === "language" || this.type === "theme"
523
- ? "secondary"
524
- : "primary")}
525
- ?disabled=${this.disabled}
526
- @click=${this.handleButtonClick}
527
- >
528
- ${this.type === "notes-style-medium" || this.type === "icon-only"
529
- ? html `<span
530
- style="display: inline-flex; align-items: center; gap: var(--025)"
531
- >${this.getValueDisplay(this.currentValue)}</span
532
- >`
533
- : html `<span>${this.getValueDisplay(this.currentValue)}</span>`}
534
- </ds-button>
535
- ${this.type === "accent-color"
448
+ : this.type === "page-style"
449
+ ? html `<ds-text
450
+ text=${this.currentValue === "note" ? "Note" : "Page"}
451
+ default-value=${this.currentValue}
452
+ ></ds-text>`
453
+ : html `<ds-text
454
+ default-value=${this.getValueDisplay(this.currentValue)}
455
+ ></ds-text>`}
456
+ </ds-button>
457
+
458
+ ${this.type === "accent-color"
536
459
  ? html `
537
- <div
538
- class="color-preview"
539
- style="background-color: var(${this.currentValue})"
540
- ></div>
541
- `
460
+ <div
461
+ class="color-preview"
462
+ style="background-color: var(${this.currentValue})"
463
+ ></div>
464
+ `
542
465
  : ""}
543
- </div>
544
466
  </div>
545
467
  `;
546
468
  }
@@ -586,16 +508,5 @@ export class Cycle extends LitElement {
586
508
  this.setupInitialValue();
587
509
  }
588
510
  }
589
- Cycle.styles = css `
590
- .cycle-container {
591
- display: flex;
592
- justify-content: space-between;
593
- gap: var(--025);
594
- width: 100%;
595
- }
596
-
597
- .cycle-label {
598
- color: var(--text-color-primary);
599
- }
600
- `;
511
+ Cycle.styles = unsafeCSS(styles);
601
512
  customElements.define("ds-cycle", Cycle);
@@ -1 +1 @@
1
- {"version":3,"file":"ds-date.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAOX;IAEF,MAAM;CAIP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,aAAa,CAAC;KAC1B;CACF"}
1
+ {"version":3,"file":"ds-date.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAAqB;IAElC,MAAM;CAIP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,aAAa,CAAC;KAC1B;CACF"}
@@ -1,4 +1,5 @@
1
- import { LitElement, html, css } from "lit";
1
+ import { LitElement, html, unsafeCSS } from "lit";
2
+ import styles from "./styles/ds-date.css?inline";
2
3
  /**
3
4
  * A component for displaying the current year
4
5
  *
@@ -10,12 +11,5 @@ export class DateComponent extends LitElement {
10
11
  return html `<span>${year}</span>`;
11
12
  }
12
13
  }
13
- DateComponent.styles = css `
14
- :host {
15
- display: inline;
16
- font-family: var(--typeface, var(--typeface-regular));
17
- font-size: inherit;
18
- color: inherit;
19
- }
20
- `;
14
+ DateComponent.styles = unsafeCSS(styles);
21
15
  customElements.define("ds-date", DateComponent);
@@ -0,0 +1,28 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Full-width vertical spacer.
4
+ *
5
+ * Usage:
6
+ * - <ds-gap unit></ds-gap>
7
+ * - <ds-gap double></ds-gap>
8
+ * - <ds-gap size="05"></ds-gap>
9
+ */
10
+ export declare class Gap extends LitElement {
11
+ static properties: {
12
+ /** Raw scale token selector ("01", "025", "05", "08", "1", "2", "3", "4", "8", "12") */
13
+ size: {
14
+ type: StringConstructor;
15
+ reflect: boolean;
16
+ };
17
+ };
18
+ size: string;
19
+ constructor();
20
+ static styles: import("lit").CSSResult;
21
+ render(): import("lit-html").TemplateResult<1>;
22
+ }
23
+ declare global {
24
+ interface HTMLElementTagNameMap {
25
+ "ds-gap": Gap;
26
+ }
27
+ }
28
+ //# sourceMappingURL=ds-gap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ds-gap.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-gap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAGlD;;;;;;;GAOG;AACH,qBAAa,GAAI,SAAQ,UAAU;IACjC,MAAM,CAAC,UAAU;QACf,wFAAwF;;;;;MAExF;IAEM,IAAI,EAAE,MAAM,CAAC;;IAOrB,MAAM,CAAC,MAAM,0BAAqB;IAElC,MAAM;CAGP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,QAAQ,EAAE,GAAG,CAAC;KACf;CACF"}
@@ -0,0 +1,25 @@
1
+ import { LitElement, html, unsafeCSS } from "lit";
2
+ import styles from "./styles/ds-gap.css?inline";
3
+ /**
4
+ * Full-width vertical spacer.
5
+ *
6
+ * Usage:
7
+ * - <ds-gap unit></ds-gap>
8
+ * - <ds-gap double></ds-gap>
9
+ * - <ds-gap size="05"></ds-gap>
10
+ */
11
+ export class Gap extends LitElement {
12
+ constructor() {
13
+ super();
14
+ this.size = "";
15
+ }
16
+ render() {
17
+ return html ``;
18
+ }
19
+ }
20
+ Gap.properties = {
21
+ /** Raw scale token selector ("01", "025", "05", "08", "1", "2", "3", "4", "8", "12") */
22
+ size: { type: String, reflect: true },
23
+ };
24
+ Gap.styles = unsafeCSS(styles);
25
+ customElements.define("ds-gap", Gap);
@@ -1 +1 @@
1
- {"version":3,"file":"ds-icon.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGjE,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU;;;;;MAEf;IAEF,OAAO,CAAC,KAAK,CAAM;IAEnB,IAAI,SAAS;IACb,KAAK,SAAkB;IACvB,UAAU,SAAiB;IAE3B,IAAI,IAAI,WAEP;IACD,IAAI,IAAI,CAAC,GAAG,QAAA,EAIX;IAED,MAAM,CAAC,MAAM,0BA+BX;IAIF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAyBnC;;IAOL,iBAAiB;IAKjB,UAAU;IA4MV,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAQzC,MAAM;CAIP;AAOD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
1
+ {"version":3,"file":"ds-icon.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAIvE,qBAAa,IAAK,SAAQ,UAAU;IAClC,MAAM,CAAC,UAAU;;;;;MAEf;IAEF,OAAO,CAAC,KAAK,CAAM;IAEnB,IAAI,SAAS;IACb,KAAK,SAAkB;IACvB,UAAU,SAAiB;IAE3B,IAAI,IAAI,WAEP;IACD,IAAI,IAAI,CAAC,GAAG,QAAA,EAIX;IAED,MAAM,CAAC,MAAM,0BAAqB;IAIlC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CA0BnC;;IAOL,iBAAiB;IAKjB,UAAU;IA4MV,OAAO,CAAC,iBAAiB,EAAE,cAAc;IAQzC,MAAM;CAIP;AAOD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,IAAI,CAAC;KACjB;CACF"}
@@ -1,5 +1,6 @@
1
- import { LitElement, html, css } from "lit";
1
+ import { LitElement, html, unsafeCSS } from "lit";
2
2
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
3
+ import styles from "./styles/ds-icon.css?inline";
3
4
  export class Icon extends LitElement {
4
5
  get type() {
5
6
  return this._type;
@@ -235,45 +236,15 @@ export class Icon extends LitElement {
235
236
  Icon.properties = {
236
237
  type: { type: String, reflect: true },
237
238
  };
238
- Icon.styles = css `
239
- :host {
240
- display: inline-flex;
241
- justify-content: center;
242
- align-items: center;
243
- width: calc(16px * var(--sf));
244
- height: calc(16px * var(--sf));
245
- }
246
-
247
- svg {
248
- width: 100%;
249
- height: 100%;
250
- fill: var(--icon-color, currentColor);
251
- }
252
-
253
- path {
254
- fill: var(--icon-color, currentColor);
255
- }
256
-
257
- .icon-container {
258
- display: flex;
259
- justify-content: center;
260
- align-items: center;
261
- width: calc(16px * var(--sf));
262
- height: calc(16px * var(--sf));
263
- }
264
-
265
- /* Notes style color variable for future implementation */
266
- :host {
267
- --notes-style-color: #ffb6b9;
268
- }
269
- `;
239
+ Icon.styles = unsafeCSS(styles);
270
240
  // Load all SVGs from `x Icon/` as raw strings at build time (Vite)
271
241
  // The keys will be the file base names (without extension), lowercased.
272
242
  Icon.iconNameToSvgMap = (() => {
273
243
  try {
274
244
  // Note: folder name contains a space, keep it exact.
275
- const modules = import.meta.glob("../x Icon/*.svg", {
276
- as: "raw",
245
+ const modules = import.meta.glob("../x-icon/*.svg", {
246
+ query: "?raw",
247
+ import: "default",
277
248
  eager: true,
278
249
  });
279
250
  const map = {};
@@ -1 +1,128 @@
1
+ import { LitElement } from "lit";
2
+ import "./ds-text";
3
+ export declare class Input extends LitElement {
4
+ static properties: {
5
+ type: {
6
+ type: StringConstructor;
7
+ reflect: boolean;
8
+ };
9
+ name: {
10
+ type: StringConstructor;
11
+ reflect: boolean;
12
+ };
13
+ value: {
14
+ type: StringConstructor;
15
+ };
16
+ placeholder: {
17
+ type: StringConstructor;
18
+ };
19
+ placeholderKey: {
20
+ type: StringConstructor;
21
+ attribute: string;
22
+ };
23
+ label: {
24
+ type: StringConstructor;
25
+ };
26
+ labelText: {
27
+ type: StringConstructor;
28
+ attribute: string;
29
+ };
30
+ disabled: {
31
+ type: BooleanConstructor;
32
+ reflect: boolean;
33
+ };
34
+ readonly: {
35
+ type: BooleanConstructor;
36
+ reflect: boolean;
37
+ };
38
+ required: {
39
+ type: BooleanConstructor;
40
+ reflect: boolean;
41
+ };
42
+ autofocus: {
43
+ type: BooleanConstructor;
44
+ };
45
+ autocomplete: {
46
+ type: StringConstructor;
47
+ };
48
+ pattern: {
49
+ type: StringConstructor;
50
+ };
51
+ minlength: {
52
+ type: NumberConstructor;
53
+ };
54
+ maxlength: {
55
+ type: NumberConstructor;
56
+ };
57
+ min: {
58
+ type: StringConstructor;
59
+ };
60
+ max: {
61
+ type: StringConstructor;
62
+ };
63
+ step: {
64
+ type: StringConstructor;
65
+ };
66
+ variant: {
67
+ type: StringConstructor;
68
+ reflect: boolean;
69
+ };
70
+ error: {
71
+ type: StringConstructor;
72
+ };
73
+ errorText: {
74
+ type: StringConstructor;
75
+ attribute: string;
76
+ };
77
+ _focused: {
78
+ type: BooleanConstructor;
79
+ state: boolean;
80
+ };
81
+ };
82
+ type: "text" | "password" | "email" | "number" | "tel" | "url" | "search" | "date" | "time" | "datetime-local";
83
+ name: string;
84
+ value: string;
85
+ placeholder: string;
86
+ placeholderKey: string;
87
+ label: string;
88
+ labelText: string;
89
+ disabled: boolean;
90
+ readonly: boolean;
91
+ required: boolean;
92
+ autofocus: boolean;
93
+ autocomplete: string;
94
+ pattern: string;
95
+ minlength: number;
96
+ maxlength: number;
97
+ min: string;
98
+ max: string;
99
+ step: string;
100
+ variant: "default" | "filled" | "outlined";
101
+ error: string;
102
+ errorText: string;
103
+ _focused: boolean;
104
+ constructor();
105
+ static styles: import("lit").CSSResult;
106
+ private _handleInput;
107
+ private _handleFocus;
108
+ private _handleBlur;
109
+ /**
110
+ * Focus the input element
111
+ */
112
+ focus(): void;
113
+ /**
114
+ * Blur the input element
115
+ */
116
+ blur(): void;
117
+ /**
118
+ * Select all text in the input
119
+ */
120
+ select(): void;
121
+ render(): import("lit-html").TemplateResult<1>;
122
+ }
123
+ declare global {
124
+ interface HTMLElementTagNameMap {
125
+ "ds-input": Input;
126
+ }
127
+ }
1
128
  //# sourceMappingURL=ds-input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ds-input.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-input.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ds-input.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-input.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAC5C,OAAO,WAAW,CAAC;AAEnB,qBAAa,KAAM,SAAQ,UAAU;IACnC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBf;IAEM,IAAI,EACR,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,GACR,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,GACN,MAAM,GACN,gBAAgB,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;;IA4B1B,MAAM,CAAC,MAAM,0BA2GX;IAEF,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,WAAW;IAKnB;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;OAEG;IACH,MAAM,IAAI,IAAI;IAKd,MAAM;CAoDP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,KAAK,CAAC;KACnB;CACF"}