ds-one 0.2.5-alpha.1 → 0.2.5-alpha.11

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 (67) hide show
  1. package/DS1/0-face/device.ts +10 -6
  2. package/DS1/0-face/i18n.ts +39 -90
  3. package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
  4. package/DS1/1-root/one.css +76 -107
  5. package/DS1/2-core/ds-banner.ts +3 -0
  6. package/DS1/2-core/ds-button.ts +12 -15
  7. package/DS1/2-core/ds-cycle.ts +67 -21
  8. package/DS1/2-core/ds-date.ts +1 -2
  9. package/DS1/2-core/ds-icon.ts +4 -4
  10. package/DS1/2-core/ds-text.ts +27 -3
  11. package/DS1/2-core/ds-tooltip.ts +6 -12
  12. package/DS1/3-unit/ds-list.ts +7 -0
  13. package/DS1/3-unit/ds-row.ts +4 -5
  14. package/DS1/3-unit/ds-table.ts +5 -6
  15. package/DS1/4-page/ds-grid.ts +9 -59
  16. package/DS1/4-page/ds-layout.ts +123 -18
  17. package/LICENSE +1 -1
  18. package/README.md +43 -133
  19. package/dist/0-face/device.d.ts.map +1 -1
  20. package/dist/0-face/device.js +7 -3
  21. package/dist/0-face/i18n.d.ts +0 -2
  22. package/dist/0-face/i18n.d.ts.map +1 -1
  23. package/dist/0-face/i18n.js +37 -74
  24. package/dist/2-core/ds-banner.d.ts +1 -0
  25. package/dist/2-core/ds-banner.d.ts.map +1 -0
  26. package/dist/2-core/ds-banner.js +2 -0
  27. package/dist/2-core/ds-button.d.ts +2 -7
  28. package/dist/2-core/ds-button.d.ts.map +1 -1
  29. package/dist/2-core/ds-button.js +11 -13
  30. package/dist/2-core/ds-cycle.d.ts +2 -0
  31. package/dist/2-core/ds-cycle.d.ts.map +1 -1
  32. package/dist/2-core/ds-cycle.js +65 -19
  33. package/dist/2-core/ds-date.js +1 -1
  34. package/dist/2-core/ds-icon.js +4 -4
  35. package/dist/2-core/ds-text.d.ts +2 -0
  36. package/dist/2-core/ds-text.d.ts.map +1 -1
  37. package/dist/2-core/ds-text.js +26 -3
  38. package/dist/2-core/ds-tooltip.d.ts +1 -1
  39. package/dist/2-core/ds-tooltip.d.ts.map +1 -1
  40. package/dist/2-core/ds-tooltip.js +6 -12
  41. package/dist/3-unit/ds-list.d.ts.map +1 -1
  42. package/dist/3-unit/ds-list.js +3 -0
  43. package/dist/3-unit/ds-portfolio-panel.d.ts.map +1 -1
  44. package/dist/3-unit/ds-portfolio-singlenav.js +3 -3
  45. package/dist/3-unit/ds-row.js +4 -4
  46. package/dist/3-unit/ds-table.d.ts.map +1 -1
  47. package/dist/3-unit/ds-table.js +5 -6
  48. package/dist/4-page/ds-grid.d.ts +0 -7
  49. package/dist/4-page/ds-grid.d.ts.map +1 -1
  50. package/dist/4-page/ds-grid.js +9 -54
  51. package/dist/4-page/ds-layout.d.ts +1 -1
  52. package/dist/4-page/ds-layout.d.ts.map +1 -1
  53. package/dist/4-page/ds-layout.js +126 -17
  54. package/dist/ds-one.bundle.js +347 -265
  55. package/dist/ds-one.bundle.js.map +4 -4
  56. package/dist/ds-one.bundle.min.js +204 -80
  57. package/dist/ds-one.bundle.min.js.map +4 -4
  58. package/package.json +7 -8
  59. package/DS1/3-unit/doublenav-v1.ts +0 -105
  60. package/DS1/3-unit/ds-portfolio-doublenav.ts +0 -105
  61. package/DS1/3-unit/ds-portfolio-panel.ts +0 -27
  62. package/DS1/3-unit/ds-portfolio-singlenav.ts +0 -79
  63. package/DS1/3-unit/list-v1.ts +0 -24
  64. package/DS1/3-unit/panel-v1.ts +0 -26
  65. package/DS1/3-unit/row-v1.ts +0 -52
  66. package/DS1/3-unit/singlenav-v1.ts +0 -78
  67. /package/DS1/x-icon/{row..svg → row.svg} +0 -0
@@ -93,9 +93,14 @@ export function initDeviceDetection(): DeviceInfo {
93
93
  const actualWidth = deviceInfo.screenWidth;
94
94
  const scalingFactor = actualWidth / designWidth;
95
95
 
96
- // Set CSS custom property for scaling
96
+ // Set CSS custom property for scaling on html element
97
97
  document.documentElement.style.setProperty(
98
- "--scaling-factor-mobile",
98
+ "--sf",
99
+ scalingFactor.toFixed(3)
100
+ );
101
+ // Also set --sf for backwards compatibility
102
+ document.documentElement.style.setProperty(
103
+ "--sf",
99
104
  scalingFactor.toFixed(3)
100
105
  );
101
106
 
@@ -105,10 +110,9 @@ export function initDeviceDetection(): DeviceInfo {
105
110
  } else {
106
111
  // Desktop - no scaling
107
112
  if (typeof document !== "undefined") {
108
- document.documentElement.style.setProperty(
109
- "--scaling-factor-mobile",
110
- "1"
111
- );
113
+ document.documentElement.style.setProperty("--sf", "1");
114
+ // Also set --sf for backwards compatibility
115
+ document.documentElement.style.setProperty("--sf", "1");
112
116
  }
113
117
  console.log(
114
118
  `[DS one] Desktop device detected (${deviceInfo.screenWidth}x${deviceInfo.screenHeight})`
@@ -15,15 +15,15 @@ let translationKeys: TranslationMap = {};
15
15
  // Primary language list – prioritise the 10 requested languages when cycling
16
16
  const LANGUAGE_PRIORITY_ORDER = [
17
17
  "da",
18
- "nb",
19
- "sv",
20
- "pt",
18
+ "de",
19
+ "en",
21
20
  "es",
22
- "zh",
23
- "ko",
21
+ "fr",
22
+ "it",
24
23
  "ja",
25
- "en",
26
- "de",
24
+ "pt",
25
+ "sv",
26
+ "zh",
27
27
  ] as const;
28
28
 
29
29
  const LANGUAGE_PRIORITY_LOOKUP = new Map<string, number>(
@@ -34,27 +34,27 @@ const LANGUAGE_PRIORITY_LOOKUP = new Map<string, number>(
34
34
  const FALLBACK_LANGUAGE_NAMES: Record<string, string> = {
35
35
  da: "Danish",
36
36
  "da-dk": "Danish",
37
- nb: "Norwegian",
38
- "nb-no": "Norwegian",
39
- sv: "Swedish",
40
- "sv-se": "Swedish",
41
37
  de: "German",
42
38
  "de-de": "German",
43
39
  en: "English",
44
40
  "en-us": "English",
45
- pt: "Portuguese",
46
- "pt-pt": "Portuguese",
47
- "pt-br": "Portuguese (Brazil)",
48
41
  es: "Spanish",
49
42
  "es-es": "Spanish",
50
- "es-mx": "Spanish (Mexico)",
51
- zh: "Chinese",
52
- "zh-hans": "Chinese (Simplified)",
53
- "zh-hant": "Chinese (Traditional)",
43
+ fr: "French",
44
+ "fr-fr": "French",
45
+ it: "Italian",
46
+ "it-it": "Italian",
54
47
  ja: "Japanese",
55
48
  "ja-jp": "Japanese",
56
- ko: "Korean",
57
- "ko-kr": "Korean",
49
+ pt: "Portuguese",
50
+ "pt-pt": "Portuguese",
51
+ sv: "Swedish",
52
+ "sv-se": "Swedish",
53
+ zh: "Chinese",
54
+ "zh-cn": "Chinese",
55
+ "zh-tw": "Chinese",
56
+ "zh-hans": "Chinese",
57
+ "zh-hant": "Chinese",
58
58
  };
59
59
 
60
60
  const DISPLAY_NAME_CACHE = new Map<string, Intl.DisplayNames>();
@@ -263,9 +263,6 @@ function getTranslationData(): TranslationMap {
263
263
  // Cached translation data - use getter to always get fresh data
264
264
  let translationData = getTranslationData();
265
265
 
266
- type NotionCache = Map<string, string>;
267
-
268
- const notionStore = new Map<LanguageCode, NotionCache>();
269
266
  const defaultLanguage: LanguageCode = "en";
270
267
 
271
268
  function extractPrimarySubtag(code: LanguageCode): string {
@@ -409,33 +406,30 @@ export function getLanguageDisplayName(
409
406
  const BROWSER_LANGUAGE_PREFERENCES: Record<string, LanguageCode> = {
410
407
  da: "da",
411
408
  "da-dk": "da",
412
- no: "nb",
413
- nb: "nb",
414
- "nb-no": "nb",
415
- nn: "nn",
416
- "nn-no": "nn",
417
- sv: "sv",
418
- "sv-se": "sv",
419
- pt: "pt",
420
- "pt-pt": "pt",
421
- "pt-br": "pt",
409
+ de: "de",
410
+ "de-de": "de",
411
+ en: "en",
412
+ "en-us": "en",
413
+ "en-gb": "en",
422
414
  es: "es",
423
415
  "es-es": "es",
424
416
  "es-mx": "es",
417
+ fr: "fr",
418
+ "fr-fr": "fr",
419
+ it: "it",
420
+ "it-it": "it",
421
+ ja: "ja",
422
+ "ja-jp": "ja",
423
+ pt: "pt",
424
+ "pt-pt": "pt",
425
+ "pt-br": "pt",
426
+ sv: "sv",
427
+ "sv-se": "sv",
425
428
  zh: "zh",
426
429
  "zh-cn": "zh",
427
430
  "zh-hans": "zh",
428
431
  "zh-tw": "zh",
429
432
  "zh-hant": "zh",
430
- ko: "ko",
431
- "ko-kr": "ko",
432
- ja: "ja",
433
- "ja-jp": "ja",
434
- en: "en",
435
- "en-us": "en",
436
- "en-gb": "en",
437
- de: "de",
438
- "de-de": "de",
439
433
  };
440
434
 
441
435
  function resolvePreferredLanguage(languageTag: string): LanguageCode | null {
@@ -532,7 +526,6 @@ if (typeof window !== "undefined") {
532
526
 
533
527
  // Dispatch that translations are loaded
534
528
  window.dispatchEvent(new CustomEvent("translations-loaded"));
535
- (window as any).notionDataLoaded = true;
536
529
 
537
530
  // Dispatch language-changed to update all components
538
531
  const currentLang = currentLanguage.value;
@@ -551,7 +544,6 @@ if (typeof window !== "undefined") {
551
544
  setTimeout(() => {
552
545
  // Since we directly imported the data, just dispatch the events
553
546
  window.dispatchEvent(new CustomEvent("translations-loaded"));
554
- (window as any).notionDataLoaded = true;
555
547
 
556
548
  // Also dispatch language-changed with the current language
557
549
  const currentLang = currentLanguage.value;
@@ -579,7 +571,9 @@ export function translate(key: string): string {
579
571
  return translationData[defaultLanguage][key];
580
572
  }
581
573
 
582
- console.warn(`[translate] No translation found for key "${key}"`);
574
+ console.warn(
575
+ `[DS one (Internationalization)] No translation found for key "${key}"`
576
+ );
583
577
  return key;
584
578
  }
585
579
 
@@ -612,51 +606,6 @@ export function getText(key: string): string {
612
606
  return translate(key);
613
607
  }
614
608
 
615
- // Get text from translation data (async for compatibility)
616
- export async function getNotionText(
617
- key: string,
618
- language: LanguageCode = currentLanguage.value
619
- ): Promise<string | null> {
620
- if (!key) {
621
- return null;
622
- }
623
-
624
- if (!translationData || !translationData[language]) {
625
- return null;
626
- }
627
-
628
- const text = translationData[language][key];
629
- if (text) {
630
- return text;
631
- }
632
-
633
- // Fallback to English
634
- if (language !== defaultLanguage && translationData[defaultLanguage]?.[key]) {
635
- return translationData[defaultLanguage][key];
636
- }
637
-
638
- return null;
639
- }
640
-
641
- // Store Notion text (for dynamic updates)
642
- export function setNotionText(
643
- key: string,
644
- value: string,
645
- language: LanguageCode = currentLanguage.value
646
- ): void {
647
- if (!key) return;
648
-
649
- const bucket = getLanguageBucket(language);
650
- bucket.set(key, value);
651
- }
652
-
653
- function getLanguageBucket(language: LanguageCode): NotionCache {
654
- if (!notionStore.has(language)) {
655
- notionStore.set(language, new Map());
656
- }
657
- return notionStore.get(language)!;
658
- }
659
-
660
609
  // Get available languages - dynamically detect from loaded data
661
610
  export function getAvailableLanguages(): Promise<LanguageCode[]> {
662
611
  // Always get fresh translation data
@@ -1,79 +1,93 @@
1
- /* version 0.2.0-alpha.3 */
1
+ /* version 0.2.5-alpha.11 */
2
+
3
+ @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@200");
4
+
5
+ @font-face {
6
+ font-family: GT-America-Standard-Regular;
7
+ src: url("./fonts/GT-America-Standard-Regular.woff2") format("woff2");
8
+ }
9
+
10
+ @font-face {
11
+ font-family: GT-America-Standard-Medium;
12
+ src: url("./fonts/GT-America-Standard-Medium.woff2") format("woff2");
13
+ }
14
+
15
+ @font-face {
16
+ font-family: GT-America-Compressed-Regular;
17
+ src: url("./fonts/GT-America-Compressed-Regular.woff2") format("woff2");
18
+ }
2
19
 
3
20
  input {
4
21
  padding: 0;
5
22
  }
6
23
 
7
24
  :root {
8
- /* colors */
25
+ /* DS one colors */
26
+
27
+ /* Base/[color] */
28
+
9
29
  --black: #2a2a2a;
10
30
  --white: rgb(255 255 255);
11
31
  --slate: #bdbdbd;
12
32
  --slate-light: #e6e6e6;
13
33
  --slate-dark: #3c3c3c;
14
- --light-green: #99ff73;
15
- --green: #979441;
16
- --light-blue: #ccccff;
17
- --blue: #594dff;
34
+
35
+ /* Accent/[color] */
36
+ --tuned-red: #ff5f5f;
18
37
  --pink: #f5aad1;
19
- --red: #ff5f5f;
38
+ --sharp-blue: #594dff;
39
+ --zenith-blue: #ccccff;
40
+ --every-green: #979441;
41
+ --apple-green: #99ff73;
42
+ --chartreuse-green: #ccff4d;
43
+ --yellow: #eaff00;
20
44
  --orange: #fec20d;
21
- --yellow: #ffff00;
22
-
23
- /* accent color - defaults to blue but can be changed by user */
24
- --accent-color: var(--light-green);
25
-
26
- /* DS1 Documentation Colors */
27
- --ds1-docs-header-bg: light-dark(#f5f5f5, #232323);
28
- --ds1-docs-header-border: light-dark(#e0e0e0, #000000);
29
- --ds1-docs-header-text: light-dark(#2a2a2a, #f1f1f1);
30
- --ds1-docs-header-text-secondary: light-dark(#666666, #cdcdcd);
31
- --ds1-docs-accent-green: #72ff3d;
32
- --ds1-docs-sidebar-bg: light-dark(#fafafa, #1f1f1f);
33
- --ds1-docs-content-bg: light-dark(#ffffff, #171717);
34
- --ds1-docs-search-bg: light-dark(#f0f0f0, #171717);
35
- --ds1-docs-divider: light-dark(#e0e0e0, #000000);
45
+
46
+ /* 4-page component colors */
47
+
48
+ /* ds-grid color */
49
+ --grid-color: light-dark(var(--grid-color-light), var(--grid-color-dark));
50
+ --grid-color-light: var(--slate);
51
+ --grid-color-dark: var(--white);
36
52
 
37
53
  /* typefaces */
38
- --typeface: "GT-America-Standard-Regular";
54
+ --typeface-regular: "GT-America-Standard-Regular";
39
55
  --typeface-medium: "GT-America-Standard-Medium";
40
56
  --typeface-compressed: "GT-America-Compressed-Regular";
41
- --typeface-japanese: "Noto Sans JP";
57
+ --typeface-regular-jp: "Noto Sans JP";
42
58
  --typeface-mono: "Iosevka";
43
- --type-size-default: calc(14px * var(--scaling-factor));
44
- --type-size-small: calc(10px * var(--scaling-factor));
59
+
60
+ --type-size-default: calc(14px * var(--sf));
61
+ --type-size-small: calc(10px * var(--sf));
45
62
  --type-weight-default: 500;
46
- --type-lineheight-default: calc(15px * var(--scaling-factor));
47
- --type-size-heading: calc(15px * var(--scaling-factor));
63
+ --type-lineheight-default: calc(15px * var(--sf));
64
+ --type-size-heading: calc(15px * var(--sf));
48
65
  --type-weight-bold: 500;
49
66
 
50
- --type-size-japanese-default: calc(12px * var(--scaling-factor));
51
- --type-size-japanese-heading: calc(14px * var(--scaling-factor));
52
- --type-lineheight-japanese-default: calc(17px * var(--scaling-factor));
67
+ --type-size-japanese-default: calc(12px * var(--sf));
68
+ --type-size-japanese-heading: calc(14px * var(--sf));
69
+ --type-lineheight-japanese-default: calc(17px * var(--sf));
53
70
  --type-weight-product: var(--type-weight-bold);
54
71
  --type-weight-heading: var(--type-weight-bold);
55
72
  --type-size-book: 9px;
56
73
  --type-weight-book: 400;
57
74
  --type-lineheight-book: 15px;
58
75
 
59
- /* ezo-scaling-factor */
60
- --scaling-factor: var(--scaling-factor-mobile);
61
- --scaling-factor-mobile: 1;
62
-
63
76
  /* size */
64
77
  --outline-stroke: 1px solid light-dark(var(--black), var(--slate-dark));
65
- --outline-stroke-mobile: calc(1px * var(--scaling-factor)) solid
78
+ --outline-stroke-mobile: calc(1px * var(--sf)) solid
66
79
  light-dark(var(--black), var(--slate-dark));
67
- --item-width: calc(79px * var(--scaling-factor));
68
- --item-height: calc(19px * var(--scaling-factor));
69
- --margin-correction: calc(1px * var(--scaling-factor));
80
+ --item-width: calc(79px * var(--sf));
81
+ --item-height: calc(19px * var(--sf));
82
+ --margin-correction: calc(1px * var(--sf));
70
83
 
71
- /* sizes */
84
+ /* SIZING */
72
85
 
73
86
  /* main unit */
74
87
  --1: 20px;
75
88
  /* bigger sizes */
76
89
  --2: calc(var(--1) * 2);
90
+ --3: calc(var(--1) * 3);
77
91
  --4: calc(var(--1) * 4);
78
92
 
79
93
  /* smaller sizes */
@@ -81,7 +95,7 @@ input {
81
95
  --025: calc(var(--1) * 0.25);
82
96
  --08: calc(var(--1) * 0.8);
83
97
 
84
- /* ezo-button */
98
+ /* button */
85
99
  --button-background-color-primary: var(--accent-color);
86
100
  --button-background-color-secondary: light-dark(
87
101
  var(--slate-light),
@@ -93,11 +107,11 @@ input {
93
107
  var(--slate-light)
94
108
  );
95
109
 
96
- /* ezo-text-color */
110
+ /* text-color */
97
111
  --text-color-primary: light-dark(var(--black), var(--white));
98
112
  --text-color-dimmed: light-dark(var(--slate), var(--slate-light));
99
113
 
100
- /* ezo-icon */
114
+ /* icon colors */
101
115
  --icon-background: light-dark(var(--slate-light), var(--slate-dark));
102
116
  --icon-color: light-dark(var(--black), var(--white));
103
117
 
@@ -132,32 +146,6 @@ input {
132
146
  navigation: auto;
133
147
  }
134
148
 
135
- ::-webkit-scrollbar {
136
- display: none;
137
- }
138
-
139
- html {
140
- scrollbar-width: none;
141
- }
142
-
143
- @font-face {
144
- font-family: GT-America-Standard-Regular;
145
- src: url("./fonts/GT-America-Standard-Regular.woff2") format("woff2");
146
- font-display: swap;
147
- }
148
-
149
- @font-face {
150
- font-family: GT-America-Standard-Medium;
151
- src: url("./fonts/GT-America-Standard-Medium.woff2") format("woff2");
152
- font-display: swap;
153
- }
154
-
155
- @font-face {
156
- font-family: GT-America-Compressed-Regular;
157
- src: url("./fonts/GT-America-Compressed-Regular.woff2") format("woff2");
158
- font-display: swap;
159
- }
160
-
161
149
  body {
162
150
  margin: 0;
163
151
  padding: 0;
@@ -165,15 +153,15 @@ body {
165
153
 
166
154
  .matrix__board {
167
155
  position: relative;
168
- top: calc(21.5px * var(--scaling-factor));
169
- left: calc(-20px * var(--scaling-factor));
156
+ top: calc(21.5px * var(--sf));
157
+ left: calc(-20px * var(--sf));
158
+ width: calc(240px * var(--sf));
170
159
  display: flex;
171
- width: calc(240px * var(--scaling-factor));
172
160
  }
173
161
 
174
162
  .matrix__board--vertical {
175
163
  position: relative;
176
- left: calc(20.5px * var(--scaling-factor));
164
+ left: calc(20.5px * var(--sf));
177
165
  display: flex;
178
166
  flex-direction: row;
179
167
  align-items: start;
@@ -181,8 +169,8 @@ body {
181
169
 
182
170
  .matrix__board--horizontal {
183
171
  position: relative;
184
- top: calc(19.5px * var(--scaling-factor));
185
- left: calc(-239.5px * var(--scaling-factor));
172
+ top: calc(19.5px * var(--sf));
173
+ left: calc(-239.5px * var(--sf));
186
174
  display: flex;
187
175
  flex-direction: column;
188
176
  align-items: start;
@@ -212,11 +200,11 @@ body {
212
200
 
213
201
  .matrix__row-header {
214
202
  position: relative;
215
- top: calc(0.5px * var(--scaling-factor));
203
+ top: calc(0.5px * var(--sf));
216
204
  display: flex;
217
205
  align-items: center;
218
206
  justify-content: center;
219
- width: calc(19px * var(--scaling-factor));
207
+ width: calc(19px * var(--sf));
220
208
  height: var(--item-height);
221
209
  margin-right: var(--margin-correction);
222
210
  margin-bottom: var(--margin-correction);
@@ -268,13 +256,13 @@ body {
268
256
 
269
257
  .board__container {
270
258
  position: relative;
271
- top: calc(0.5px * var(--scaling-factor));
259
+ top: calc(0.5px * var(--sf));
272
260
  }
273
261
 
274
262
  .board {
275
263
  position: relative;
276
- top: calc(0.5px * var(--scaling-factor));
277
- left: calc(0.5px * var(--scaling-factor));
264
+ top: calc(0.5px * var(--sf));
265
+ left: calc(0.5px * var(--sf));
278
266
  display: flex;
279
267
  flex-direction: row;
280
268
  align-items: flex-start;
@@ -339,14 +327,13 @@ body {
339
327
  .header {
340
328
  display: flex;
341
329
  justify-content: center;
342
- width: calc(var(--item-width) * var(--scaling-factor));
343
- height: calc(var(--item-height) * var(--scaling-factor));
330
+ width: calc(var(--item-width) * var(--sf));
331
+ height: calc(var(--item-height) * var(--sf));
344
332
  }
345
333
 
346
334
  .header.dragging {
347
- outline: calc(var(--outline-stroke) * var(--scaling-factor)) solid
348
- var(--black);
349
- outline-offset: calc(var(--outline-stroke-offset) * var(--scaling-factor));
335
+ outline: calc(var(--outline-stroke) * var(--sf)) solid var(--black);
336
+ outline-offset: calc(var(--outline-stroke-offset) * var(--sf));
350
337
  background-color: var(--white);
351
338
  }
352
339
 
@@ -382,7 +369,7 @@ body {
382
369
  margin-top: 1px;
383
370
  z-index: 99;
384
371
  margin-bottom: 2px;
385
- padding-left: calc(3px * var(--scaling-factor));
372
+ padding-left: calc(3px * var(--sf));
386
373
  color: var(--text-color-primary);
387
374
  outline: var(--outline-stroke);
388
375
  background-color: var(--accent-color);
@@ -398,7 +385,7 @@ body {
398
385
  }
399
386
 
400
387
  .item-container.mobile {
401
- margin-left: calc(0.25px * var(--scaling-factor));
388
+ margin-left: calc(0.25px * var(--sf));
402
389
  }
403
390
 
404
391
  .group-children {
@@ -417,7 +404,7 @@ body {
417
404
  align-items: center;
418
405
  justify-content: start;
419
406
  width: var(--item-width);
420
- padding-left: calc(5px * var(--scaling-factor));
407
+ padding-left: calc(5px * var(--sf));
421
408
  overflow: hidden;
422
409
  text-overflow: ellipsis;
423
410
  white-space: nowrap;
@@ -438,27 +425,9 @@ table {
438
425
  }
439
426
 
440
427
  tr {
441
- background-color: var(--light-green);
428
+ background-color: var(--apple-green);
442
429
  }
443
430
 
444
431
  td {
445
432
  text-align: left;
446
433
  }
447
-
448
- .layout-grid {
449
- margin-top: 0.5px;
450
- margin-left: -0px;
451
- display: grid;
452
- z-index: -10;
453
- grid-template-columns: repeat(19, 79px);
454
- grid-template-rows: repeat(500, 19px);
455
- gap: 1px;
456
- row-rule: 1px solid #00000012;
457
- column-rule: 1px solid #00000012;
458
- outline: 1px solid #100101e7;
459
- position: absolute;
460
- top: 0;
461
- left: 50%;
462
- transform: translateX(-50%);
463
- pointer-events: none;
464
- }
@@ -0,0 +1,3 @@
1
+ // ds-banner.ts
2
+ // Core component
3
+
@@ -15,14 +15,13 @@ export class Button extends LitElement {
15
15
  attribute: "no-background",
16
16
  },
17
17
  blank: { type: Boolean, reflect: true },
18
- notionKey: { type: String, attribute: "notion-key" },
19
18
  key: { type: String },
20
19
  fallback: { type: String },
21
20
  language: { type: String },
22
21
  defaultText: { type: String, attribute: "default-text" },
23
22
  href: { type: String },
24
23
  _loading: { type: Boolean, state: true },
25
- _notionText: { type: String, state: true },
24
+ _text: { type: String, state: true },
26
25
  };
27
26
 
28
27
  // Public properties
@@ -31,7 +30,6 @@ export class Button extends LitElement {
31
30
  declare bold: boolean;
32
31
  declare "no-background": boolean;
33
32
  declare blank: boolean;
34
- declare notionKey: string | null;
35
33
  declare key: string;
36
34
  declare fallback: string;
37
35
  declare language: string;
@@ -40,7 +38,7 @@ export class Button extends LitElement {
40
38
 
41
39
  // Private state
42
40
  declare _loading: boolean;
43
- declare _notionText: string | null;
41
+ declare _text: string | null;
44
42
 
45
43
  constructor() {
46
44
  super();
@@ -49,25 +47,24 @@ export class Button extends LitElement {
49
47
  this.bold = false;
50
48
  this["no-background"] = false;
51
49
  this.blank = false;
52
- this.notionKey = null;
53
50
  this.key = "";
54
51
  this.fallback = "";
55
52
  this.language = "en-US";
56
53
  this.defaultText = "";
57
54
  this.href = "";
58
55
  this._loading = false;
59
- this._notionText = null;
56
+ this._text = null;
60
57
  }
61
58
 
62
59
  static styles = css`
63
60
  button {
64
- max-height: calc(var(--08) * var(--scaling-factor));
61
+ max-height: calc(var(--08) * var(--sf));
65
62
  border: none;
66
63
  cursor: pointer;
67
- font-size: calc(var(--type-size-default) * var(--scaling-factor));
68
- padding: 0 calc(1px * var(--scaling-factor));
64
+ font-size: calc(var(--type-size-default) * var(--sf));
65
+ padding: 0 calc(1px * var(--sf));
69
66
  color: var(--button-text-color);
70
- font-family: var(--typeface);
67
+ font-family: var(--typeface-regular);
71
68
  }
72
69
 
73
70
  button.title {
@@ -79,13 +76,13 @@ export class Button extends LitElement {
79
76
  background-color: var(--accent-color);
80
77
  color: var(--button-text-color);
81
78
  text-decoration-line: none;
82
- font-family: var(--typeface);
79
+ font-family: var(--typeface-regular);
83
80
  }
84
81
 
85
82
  button.secondary {
86
83
  background-color: var(--button-background-color-secondary);
87
84
  color: var(--button-text-color);
88
- font-family: var(--typeface);
85
+ font-family: var(--typeface-regular);
89
86
  }
90
87
 
91
88
  button[bold] {
@@ -141,9 +138,9 @@ export class Button extends LitElement {
141
138
  */
142
139
  private _updateText() {
143
140
  if (this.key) {
144
- this._notionText = getText(this.key);
141
+ this._text = getText(this.key);
145
142
  } else {
146
- this._notionText = this.defaultText || this.fallback || null;
143
+ this._text = this.defaultText || this.fallback || null;
147
144
  }
148
145
  this.requestUpdate();
149
146
  }
@@ -157,7 +154,7 @@ export class Button extends LitElement {
157
154
  ?no-background=${this["no-background"]}
158
155
  @click=${this._handleClick}
159
156
  >
160
- ${this._notionText ? this._notionText : html`<slot></slot>`}
157
+ ${this._text ? this._text : html`<slot></slot>`}
161
158
  </button>
162
159
  `;
163
160
  }