ds-one 0.2.5-alpha.8 → 0.3.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/DS1/0-face/device.ts +138 -0
  2. package/DS1/0-face/i18n.ts +36 -89
  3. package/DS1/0-face/scaling.ts +152 -0
  4. package/DS1/1-root/fonts/Iosevka-Regular.woff2 +0 -0
  5. package/DS1/1-root/one.css +124 -77
  6. package/DS1/2-core/ds-banner.ts +120 -1
  7. package/DS1/2-core/ds-button.ts +16 -96
  8. package/DS1/2-core/ds-card.ts +137 -0
  9. package/DS1/2-core/ds-cycle.ts +82 -184
  10. package/DS1/2-core/ds-date.ts +3 -10
  11. package/DS1/2-core/ds-gap.ts +38 -0
  12. package/DS1/2-core/ds-icon.ts +6 -35
  13. package/DS1/2-core/ds-input.ts +306 -1
  14. package/DS1/2-core/ds-pagedots.ts +52 -0
  15. package/DS1/2-core/ds-text.ts +55 -28
  16. package/DS1/2-core/ds-tooltip.ts +14 -66
  17. package/DS1/2-core/styles/ds-banner.css +77 -0
  18. package/DS1/2-core/styles/ds-button.css +67 -0
  19. package/DS1/2-core/styles/ds-cycle.css +21 -0
  20. package/DS1/2-core/styles/ds-date.css +9 -0
  21. package/DS1/2-core/styles/ds-gap.css +93 -0
  22. package/DS1/2-core/styles/ds-icon.css +30 -0
  23. package/DS1/2-core/styles/ds-input.css +46 -0
  24. package/DS1/2-core/styles/ds-pagedots.css +31 -0
  25. package/DS1/2-core/styles/ds-text.css +29 -0
  26. package/DS1/2-core/styles/ds-tooltip.css +49 -0
  27. package/DS1/3-unit/ds-accordion.ts +95 -0
  28. package/DS1/3-unit/ds-form.ts +304 -0
  29. package/DS1/3-unit/ds-list.ts +5 -14
  30. package/DS1/3-unit/ds-row.ts +3 -19
  31. package/DS1/3-unit/ds-table.ts +3 -86
  32. package/DS1/3-unit/styles/ds-accordion.css +46 -0
  33. package/DS1/3-unit/styles/ds-list.css +9 -0
  34. package/DS1/3-unit/styles/ds-row.css +19 -0
  35. package/DS1/3-unit/styles/ds-table.css +80 -0
  36. package/DS1/4-page/ds-container.ts +28 -0
  37. package/DS1/4-page/ds-grid.ts +37 -50
  38. package/DS1/4-page/ds-layout.ts +652 -163
  39. package/DS1/4-page/styles/ds-container.css +35 -0
  40. package/DS1/4-page/styles/ds-grid.css +56 -0
  41. package/DS1/4-page/styles/ds-layout.css +246 -0
  42. package/DS1/index.ts +9 -1
  43. package/DS1/vite-env.d.ts +13 -0
  44. package/DS1/x-icon/2x.svg +4 -0
  45. package/DS1/x-icon/2xdots.svg +18 -0
  46. package/DS1/x-icon/2xgrid.svg +6 -0
  47. package/DS1/x-icon/2xlines.svg +6 -0
  48. package/DS1/x-icon/4x4.svg +18 -0
  49. package/DS1/x-icon/apple.svg +4 -0
  50. package/DS1/x-icon/avatar.svg +4 -0
  51. package/DS1/x-icon/big.svg +4 -0
  52. package/DS1/x-icon/blank.svg +3 -0
  53. package/DS1/x-icon/check.svg +3 -0
  54. package/DS1/x-icon/close.svg +3 -0
  55. package/DS1/x-icon/collapse.svg +3 -0
  56. package/DS1/x-icon/color.svg +4 -0
  57. package/DS1/x-icon/column.svg +5 -0
  58. package/DS1/x-icon/default.svg +3 -0
  59. package/DS1/x-icon/delete.svg +5 -0
  60. package/DS1/x-icon/dictate.svg +6 -0
  61. package/DS1/x-icon/do.svg +3 -0
  62. package/DS1/x-icon/down.svg +3 -0
  63. package/DS1/x-icon/duplicate.svg +4 -0
  64. package/DS1/x-icon/gallery.svg +5 -0
  65. package/DS1/x-icon/google.svg +6 -0
  66. package/DS1/x-icon/head.svg +5 -0
  67. package/DS1/x-icon/home.svg +3 -0
  68. package/DS1/x-icon/icon.svg +4 -0
  69. package/DS1/x-icon/in.svg +4 -0
  70. package/DS1/x-icon/lock.svg +5 -0
  71. package/DS1/x-icon/loop.svg +5 -0
  72. package/DS1/x-icon/mic.svg +5 -0
  73. package/DS1/x-icon/minimize.svg +3 -0
  74. package/DS1/x-icon/more.svg +5 -0
  75. package/DS1/x-icon/neutral.svg +6 -0
  76. package/DS1/x-icon/note.svg +6 -0
  77. package/DS1/x-icon/page.svg +4 -0
  78. package/DS1/x-icon/plus.svg +3 -0
  79. package/DS1/x-icon/rewind.svg +4 -0
  80. package/DS1/x-icon/row.svg +5 -0
  81. package/DS1/x-icon/sdown.svg +3 -0
  82. package/DS1/x-icon/search.svg +4 -0
  83. package/DS1/x-icon/see.svg +4 -0
  84. package/DS1/x-icon/ship.svg +5 -0
  85. package/DS1/x-icon/star.svg +3 -0
  86. package/DS1/x-icon/status.svg +4 -0
  87. package/DS1/x-icon/sup.svg +3 -0
  88. package/DS1/x-icon/title.svg +3 -0
  89. package/DS1/x-icon/undo.svg +3 -0
  90. package/DS1/x-icon/ungroup.svg +4 -0
  91. package/DS1/x-icon/unhead.svg +3 -0
  92. package/DS1/x-icon/unicon.svg +3 -0
  93. package/DS1/x-icon/unlock.svg +5 -0
  94. package/DS1/x-icon/unmic.svg +6 -0
  95. package/DS1/x-icon/unsee.svg +5 -0
  96. package/DS1/x-icon/unstar.svg +3 -0
  97. package/DS1/x-icon/untitle.svg +3 -0
  98. package/DS1/x-icon/up.svg +3 -0
  99. package/LICENSE +1 -1
  100. package/README.md +4 -4
  101. package/dist/0-face/device.d.ts +5 -0
  102. package/dist/0-face/device.d.ts.map +1 -1
  103. package/dist/0-face/device.js +111 -0
  104. package/dist/0-face/i18n.d.ts +0 -2
  105. package/dist/0-face/i18n.d.ts.map +1 -1
  106. package/dist/0-face/i18n.js +36 -73
  107. package/dist/0-face/scaling.d.ts +48 -0
  108. package/dist/0-face/scaling.d.ts.map +1 -0
  109. package/dist/0-face/scaling.js +114 -0
  110. package/dist/2-core/ds-banner.d.ts +67 -0
  111. package/dist/2-core/ds-banner.d.ts.map +1 -1
  112. package/dist/2-core/ds-banner.js +97 -1
  113. package/dist/2-core/ds-button.d.ts +4 -20
  114. package/dist/2-core/ds-button.d.ts.map +1 -1
  115. package/dist/2-core/ds-button.js +14 -88
  116. package/dist/2-core/ds-card.d.ts +39 -0
  117. package/dist/2-core/ds-card.d.ts.map +1 -0
  118. package/dist/2-core/ds-card.js +119 -0
  119. package/dist/2-core/ds-cycle.d.ts +1 -5
  120. package/dist/2-core/ds-cycle.d.ts.map +1 -1
  121. package/dist/2-core/ds-cycle.js +79 -166
  122. package/dist/2-core/ds-date.d.ts.map +1 -1
  123. package/dist/2-core/ds-date.js +3 -9
  124. package/dist/2-core/ds-gap.d.ts +28 -0
  125. package/dist/2-core/ds-gap.d.ts.map +1 -0
  126. package/dist/2-core/ds-gap.js +25 -0
  127. package/dist/2-core/ds-icon.d.ts.map +1 -1
  128. package/dist/2-core/ds-icon.js +6 -35
  129. package/dist/2-core/ds-input.d.ts +127 -0
  130. package/dist/2-core/ds-input.d.ts.map +1 -1
  131. package/dist/2-core/ds-input.js +252 -1
  132. package/dist/2-core/ds-pagedots.d.ts +32 -0
  133. package/dist/2-core/ds-pagedots.d.ts.map +1 -0
  134. package/dist/2-core/ds-pagedots.js +36 -0
  135. package/dist/2-core/ds-text.d.ts +5 -3
  136. package/dist/2-core/ds-text.d.ts.map +1 -1
  137. package/dist/2-core/ds-text.js +49 -27
  138. package/dist/2-core/ds-tooltip.d.ts +3 -3
  139. package/dist/2-core/ds-tooltip.d.ts.map +1 -1
  140. package/dist/2-core/ds-tooltip.js +13 -65
  141. package/dist/2-core/styles/ds-banner.css +77 -0
  142. package/dist/2-core/styles/ds-button.css +67 -0
  143. package/dist/2-core/styles/ds-cycle.css +21 -0
  144. package/dist/2-core/styles/ds-date.css +9 -0
  145. package/dist/2-core/styles/ds-gap.css +93 -0
  146. package/dist/2-core/styles/ds-icon.css +30 -0
  147. package/dist/2-core/styles/ds-input.css +46 -0
  148. package/dist/2-core/styles/ds-pagedots.css +26 -0
  149. package/dist/2-core/styles/ds-text.css +29 -0
  150. package/dist/2-core/styles/ds-tooltip.css +49 -0
  151. package/dist/3-unit/ds-accordion.d.ts +47 -0
  152. package/dist/3-unit/ds-accordion.d.ts.map +1 -0
  153. package/dist/3-unit/ds-accordion.js +75 -0
  154. package/dist/3-unit/ds-form.d.ts +70 -0
  155. package/dist/3-unit/ds-form.d.ts.map +1 -0
  156. package/dist/3-unit/ds-form.js +232 -0
  157. package/dist/3-unit/ds-list.d.ts.map +1 -1
  158. package/dist/3-unit/ds-list.js +5 -11
  159. package/dist/3-unit/ds-row.d.ts.map +1 -1
  160. package/dist/3-unit/ds-row.js +3 -19
  161. package/dist/3-unit/ds-table.d.ts.map +1 -1
  162. package/dist/3-unit/ds-table.js +3 -86
  163. package/dist/3-unit/styles/ds-accordion.css +46 -0
  164. package/dist/3-unit/styles/ds-list.css +9 -0
  165. package/dist/3-unit/styles/ds-row.css +19 -0
  166. package/dist/3-unit/styles/ds-table.css +80 -0
  167. package/dist/{3-unit/row-v1.d.ts → 4-page/ds-container.d.ts} +3 -11
  168. package/dist/4-page/ds-container.d.ts.map +1 -0
  169. package/dist/4-page/ds-container.js +11 -0
  170. package/dist/4-page/ds-grid.d.ts +5 -0
  171. package/dist/4-page/ds-grid.d.ts.map +1 -1
  172. package/dist/4-page/ds-grid.js +38 -56
  173. package/dist/4-page/ds-layout.d.ts +3 -3
  174. package/dist/4-page/ds-layout.d.ts.map +1 -1
  175. package/dist/4-page/ds-layout.js +651 -162
  176. package/dist/4-page/styles/ds-container.css +35 -0
  177. package/dist/4-page/styles/ds-grid.css +56 -0
  178. package/dist/4-page/styles/ds-layout.css +251 -0
  179. package/dist/ds-one.bundle.css +700 -0
  180. package/dist/ds-one.bundle.css.map +7 -0
  181. package/dist/ds-one.bundle.js +2728 -1597
  182. package/dist/ds-one.bundle.js.map +1 -7
  183. package/dist/ds-one.bundle.min.css +2 -0
  184. package/dist/ds-one.bundle.min.css.map +7 -0
  185. package/dist/ds-one.bundle.min.js +3850 -546
  186. package/dist/ds-one.bundle.min.js.map +1 -7
  187. package/dist/index.d.ts +9 -1
  188. package/dist/index.d.ts.map +1 -1
  189. package/dist/index.js +9 -1
  190. package/package.json +4 -3
  191. package/dist/3-unit/doublenav-v1.d.ts +0 -51
  192. package/dist/3-unit/doublenav-v1.d.ts.map +0 -1
  193. package/dist/3-unit/doublenav-v1.js +0 -88
  194. package/dist/3-unit/ds-portfolio-doublenav.d.ts +0 -51
  195. package/dist/3-unit/ds-portfolio-doublenav.d.ts.map +0 -1
  196. package/dist/3-unit/ds-portfolio-doublenav.js +0 -88
  197. package/dist/3-unit/ds-portfolio-panel.d.ts +0 -11
  198. package/dist/3-unit/ds-portfolio-panel.d.ts.map +0 -1
  199. package/dist/3-unit/ds-portfolio-panel.js +0 -16
  200. package/dist/3-unit/ds-portfolio-singlenav.d.ts +0 -32
  201. package/dist/3-unit/ds-portfolio-singlenav.d.ts.map +0 -1
  202. package/dist/3-unit/ds-portfolio-singlenav.js +0 -62
  203. package/dist/3-unit/list-v1.d.ts +0 -11
  204. package/dist/3-unit/list-v1.d.ts.map +0 -1
  205. package/dist/3-unit/list-v1.js +0 -15
  206. package/dist/3-unit/panel-v1.d.ts +0 -11
  207. package/dist/3-unit/panel-v1.d.ts.map +0 -1
  208. package/dist/3-unit/panel-v1.js +0 -16
  209. package/dist/3-unit/row-v1.d.ts.map +0 -1
  210. package/dist/3-unit/row-v1.js +0 -32
  211. package/dist/3-unit/singlenav-v1.d.ts +0 -32
  212. package/dist/3-unit/singlenav-v1.d.ts.map +0 -1
  213. package/dist/3-unit/singlenav-v1.js +0 -62
@@ -1,57 +1,76 @@
1
- /* version 0.2.5-alpha.8 */
1
+ /* version 0.3.0-alpha.1 */
2
+
3
+ @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@200");
4
+ @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@800");
5
+ @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@800");
6
+
7
+ @font-face {
8
+ font-family: GT-America-Standard-Regular;
9
+ src: url("./fonts/GT-America-Standard-Regular.woff2") format("woff2");
10
+ }
11
+
12
+ @font-face {
13
+ font-family: GT-America-Standard-Medium;
14
+ src: url("./fonts/GT-America-Standard-Medium.woff2") format("woff2");
15
+ }
16
+
17
+ @font-face {
18
+ font-family: GT-America-Compressed-Regular;
19
+ src: url("./fonts/GT-America-Compressed-Regular.woff2") format("woff2");
20
+ }
2
21
 
3
22
  input {
4
23
  padding: 0;
5
24
  }
6
25
 
7
26
  :root {
8
- /* colors */
9
- --black: #2a2a2a;
27
+ /* DS one colors */
28
+
29
+ /* Base/[color] */
30
+
10
31
  --white: rgb(255 255 255);
11
- --slate: #bdbdbd;
32
+ --light-grey: #e8e8e8;
33
+ --slate: #1e1e1e;
12
34
  --slate-light: #e6e6e6;
13
35
  --slate-dark: #3c3c3c;
14
- --light-green: #99ff73;
15
- --green: #979441;
16
- --light-blue: #ccccff;
17
- --blue: #594dff;
36
+ --stealth: #554455;
37
+ --black: #2a2a2a;
38
+
39
+ /* Accent/[color] */
40
+ --tuned-red: #ff5f5f;
18
41
  --pink: #f5aad1;
19
- --red: #ff5f5f;
42
+ --sharp-blue: #594dff;
43
+ --zenith-blue: #ccccff;
44
+ --every-green: #979441;
45
+ --apple-green: #99ff73;
46
+ --chartreuse-green: #ccff4d;
47
+ --yellow: #eaff00;
20
48
  --orange: #fec20d;
21
- --yellow: #ffff00;
22
-
23
- /* DS1 Documentation Colors */
24
- --ds1-docs-header-bg: light-dark(#f5f5f5, #232323);
25
- --ds1-docs-header-border: light-dark(#e0e0e0, #000000);
26
- --ds1-docs-header-text: light-dark(#2a2a2a, #f1f1f1);
27
- --ds1-docs-header-text-secondary: light-dark(#666666, #cdcdcd);
28
- --ds1-docs-accent-green: #72ff3d;
29
- --ds1-docs-sidebar-bg: light-dark(#fafafa, #1f1f1f);
30
- --ds1-docs-content-bg: light-dark(#ffffff, #171717);
31
- --ds1-docs-search-bg: light-dark(#f0f0f0, #171717);
32
- --ds1-docs-divider: light-dark(#e0e0e0, #000000);
49
+
50
+ --accent-color: var(--apple-green);
33
51
 
34
52
  /* 4-page component colors */
35
53
 
36
54
  /* ds-grid color */
37
55
  --grid-color: light-dark(var(--grid-color-light), var(--grid-color-dark));
38
- --grid-color-light: var(--slate);
56
+ --grid-color-light: #1e1e1e2b;
39
57
  --grid-color-dark: var(--white);
40
58
 
41
- /* ds-layout colors */
42
-
43
- --layout-color: light-dark(
44
- var(--layout-color-light),
45
- var(--layout-color-dark)
46
- );
47
-
48
59
  /* typefaces */
49
- --typeface: "GT-America-Standard-Regular";
60
+ --typeface-regular: "GT-America-Standard-Regular";
50
61
  --typeface-medium: "GT-America-Standard-Medium";
51
62
  --typeface-compressed: "GT-America-Compressed-Regular";
52
- --typeface-japanese: "Noto Sans JP";
53
63
  --typeface-mono: "Iosevka";
54
64
 
65
+ /* language specific typefaces */
66
+
67
+ --typeface-regular-jp: "Noto Sans JP";
68
+ --typeface-regular-zh-hans: "Noto Sans SC";
69
+ --typeface-regular-zh-hant: "Noto Sans TC";
70
+ --typeface-regular-zh: var(--typeface-regular-zh-hant);
71
+
72
+ /* typefaces sizes and weight */
73
+
55
74
  --type-size-default: calc(14px * var(--sf));
56
75
  --type-size-small: calc(10px * var(--sf));
57
76
  --type-weight-default: 500;
@@ -68,27 +87,80 @@ input {
68
87
  --type-weight-book: 400;
69
88
  --type-lineheight-book: 15px;
70
89
 
90
+ /* ----------------------------------------------------------
91
+ SIZING SCALE
92
+ - Define a base unit ( --1 ) and derive all other sizes
93
+ - Larger sizes are simple multipliers (×2, ×3, ×4)
94
+ - Smaller sizes use fractional multipliers (0.1, 0.25, 0.8)
95
+ ---------------------------------------------------------- */
96
+
97
+ --01: calc(var(--1) * 0.1);
98
+ --025: calc(var(--1) * 0.25);
99
+ --05: calc(var(--1) * 0.5);
100
+ --08: calc(var(--1) * 0.8);
101
+ --1: 20px; /* SET BASE UNIT HERE FOR EXAMPLE 20px */
102
+ --2: calc(var(--1) * 2);
103
+ --3: calc(var(--1) * 3);
104
+ --4: calc(var(--1) * 4);
105
+ --8: calc(var(--1) * 8);
106
+ --12: calc(var(--1) * 12);
107
+ --20: calc(var(--1) * 20);
108
+
109
+ /* Semantic sizing units */
110
+
111
+ --tenth: var(--01);
112
+ --quarter: var(--025);
113
+ --half: var(--05);
114
+ --eight-tenth: var(--08);
115
+ --unit: var(--1);
116
+ --double: var(--2);
117
+ --triple: var(--3);
118
+ --quad: var(--4);
119
+ --oct: var(--8);
120
+ --dozen: var(--12);
121
+ --twenty: var(--20);
122
+
123
+ /* Layouts */
124
+
125
+ /* App layout (used for app) */
126
+ --app-layout:
127
+
128
+
129
+ /* Home layout (used for lists) */ --home-layout: calc(
130
+ var(--unit) * var(--sf)
131
+ )
132
+ calc(var(--unit) * var(--sf)) calc(var(--unit) * var(--sf))
133
+ calc(var(--unit) * var(--sf)) calc(var(--oct) * var(--sf))
134
+ calc(var(--oct) * var(--sf)) calc(var(--quad) * var(--sf))
135
+ calc(var(--double) * var(--sf));
136
+ --home-layout-areas: "banner" "." "header" "." "message" "lists" "." "footer";
137
+
138
+ /* App layout */
139
+ --app-layout: calc(var(--unit) * var(--sf)) calc(var(--unit) * var(--sf))
140
+ calc(var(--unit) * var(--sf)) calc(var(--double) * var(--sf))
141
+ calc(var(--dozen) * var(--sf)) calc(var(--unit) * var(--sf))
142
+ calc(var(--quad) * var(--sf)) calc(var(--double) * var(--sf));
143
+ --app-layout-areas: "banner" "." "header" "." "main" "page-dots" "." "footer";
144
+
71
145
  /* size */
72
- --outline-stroke: 1px solid light-dark(var(--black), var(--slate-dark));
73
- --outline-stroke-mobile: calc(1px * var(--sf)) solid
74
- light-dark(var(--black), var(--slate-dark));
146
+ --outline-stroke: 1px solid var(--slate-light);
147
+ --outline-stroke-mobile: 2px solid var(--sharp-blue);
75
148
  --item-width: calc(79px * var(--sf));
76
149
  --item-height: calc(19px * var(--sf));
77
150
  --margin-correction: calc(1px * var(--sf));
78
151
 
79
- /* SIZING */
152
+ --column-width: calc(var(--quad) * var(--sf));
80
153
 
81
- /* main unit */
82
- --1: 20px;
83
- /* bigger sizes */
84
- --2: calc(var(--1) * 2);
85
- --3: calc(var(--1) * 3);
86
- --4: calc(var(--1) * 4);
154
+ --column-header-height: calc(var(--unit) * var(--sf));
155
+ --column-header-width: calc(var(--quad) * var(--sf));
87
156
 
88
- /* smaller sizes */
89
- --01: calc(var(--1) * 0.1);
90
- --025: calc(var(--1) * 0.25);
91
- --08: calc(var(--1) * 0.8);
157
+ /* ----------------------------------------------------------
158
+ SURFACE COLORS
159
+ -
160
+ ---------------------------------------------------------- */
161
+
162
+ --background: light-dark(var(--white), var(--black));
163
+ --dialog-background: var(--background);
92
164
 
93
165
  /* button */
94
166
  --button-background-color-primary: var(--accent-color);
@@ -103,7 +175,7 @@ input {
103
175
  );
104
176
 
105
177
  /* text-color */
106
- --text-color-primary: light-dark(var(--black), var(--white));
178
+ --text-color: light-dark(var(--black), var(--white));
107
179
  --text-color-dimmed: light-dark(var(--slate), var(--slate-light));
108
180
 
109
181
  /* icon colors */
@@ -141,24 +213,6 @@ input {
141
213
  navigation: auto;
142
214
  }
143
215
 
144
- @font-face {
145
- font-family: GT-America-Standard-Regular;
146
- src: url("./fonts/GT-America-Standard-Regular.woff2") format("woff2");
147
- font-display: swap;
148
- }
149
-
150
- @font-face {
151
- font-family: GT-America-Standard-Medium;
152
- src: url("./fonts/GT-America-Standard-Medium.woff2") format("woff2");
153
- font-display: swap;
154
- }
155
-
156
- @font-face {
157
- font-family: GT-America-Compressed-Regular;
158
- src: url("./fonts/GT-America-Compressed-Regular.woff2") format("woff2");
159
- font-display: swap;
160
- }
161
-
162
216
  body {
163
217
  margin: 0;
164
218
  padding: 0;
@@ -166,7 +220,6 @@ body {
166
220
 
167
221
  .matrix__board {
168
222
  position: relative;
169
- top: calc(21.5px * var(--sf));
170
223
  left: calc(-20px * var(--sf));
171
224
  width: calc(240px * var(--sf));
172
225
  display: flex;
@@ -207,28 +260,22 @@ body {
207
260
  height: var(--item-height);
208
261
  margin-right: var(--margin-correction);
209
262
  margin-bottom: var(--margin-correction);
210
- outline: var(--outline-stroke);
211
263
  background-color: light-dark(var(--white), var(--black));
212
264
  }
213
265
 
214
266
  .matrix__row-header {
215
267
  position: relative;
216
- top: calc(0.5px * var(--sf));
268
+ /* top: calc(0.5px * var(--sf)); */
217
269
  display: flex;
218
270
  align-items: center;
219
271
  justify-content: center;
220
- width: calc(19px * var(--sf));
221
- height: var(--item-height);
222
- margin-right: var(--margin-correction);
223
- margin-bottom: var(--margin-correction);
224
- outline: var(--outline-stroke);
272
+ width: calc(var(--unit) * var(--sf));
273
+ height: calc(var(--unit) * var(--sf));
274
+ /* margin-right: var(--margin-correction);
275
+ margin-bottom: var(--margin-correction); */
225
276
  background-color: light-dark(rgb(220 241 213), var(--slate-dark));
226
277
  }
227
278
 
228
- .mobile .matrix__row-header {
229
- outline: var(--outline-stroke-mobile);
230
- }
231
-
232
279
  .matrix__column-content {
233
280
  display: flex;
234
281
  flex-direction: column;
@@ -438,7 +485,7 @@ table {
438
485
  }
439
486
 
440
487
  tr {
441
- background-color: var(--light-green);
488
+ background-color: var(--apple-green);
442
489
  }
443
490
 
444
491
  td {
@@ -1,3 +1,122 @@
1
1
  // ds-banner.ts
2
- // Core component
2
+ // Fixed banner component for notifications/alerts
3
3
 
4
+ import { LitElement, html, unsafeCSS } from "lit";
5
+ import { getText } from "../0-face/i18n.js";
6
+ import "./ds-text.js";
7
+ import "./ds-button.js";
8
+ import styles from "./styles/ds-banner.css?inline";
9
+
10
+ declare global {
11
+ interface CustomElementRegistry {
12
+ define(name: string, constructor: typeof LitElement): void;
13
+ }
14
+ var customElements: CustomElementRegistry;
15
+ }
16
+
17
+ export class Banner extends LitElement {
18
+ static properties = {
19
+ text: { type: String },
20
+ action: { type: String },
21
+ href: { type: String },
22
+ mailto: { type: String },
23
+ subject: { type: String },
24
+ describe: { type: String },
25
+ appVersion: { type: String, attribute: "app-version" },
26
+ variant: { type: String },
27
+ version: { type: String },
28
+ _showVersion: { type: Boolean, state: true },
29
+ };
30
+
31
+ text: string = "";
32
+ action: string = "";
33
+ href: string = "";
34
+ mailto: string = "";
35
+ subject: string = "";
36
+ describe: string = "";
37
+ appVersion: string = "";
38
+ variant: string = "warning"; // warning, info, success, error
39
+ version: string = "";
40
+ _showVersion: boolean = false;
41
+
42
+ private _boundUpdate = () => this.requestUpdate();
43
+
44
+ connectedCallback() {
45
+ super.connectedCallback();
46
+ // Listen for translations and language changes to rebuild mailto URL
47
+ window.addEventListener("translations-loaded", this._boundUpdate);
48
+ window.addEventListener("language-changed", this._boundUpdate);
49
+ }
50
+
51
+ disconnectedCallback() {
52
+ super.disconnectedCallback();
53
+ window.removeEventListener("translations-loaded", this._boundUpdate);
54
+ window.removeEventListener("language-changed", this._boundUpdate);
55
+ }
56
+
57
+ static styles = unsafeCSS(styles);
58
+
59
+ private _toggleVersion() {
60
+ if (this.version) {
61
+ this._showVersion = !this._showVersion;
62
+ }
63
+ }
64
+
65
+ private _getMailtoHref(): string {
66
+ // If a direct href is provided, use it
67
+ if (this.href && this.href !== "#") return this.href;
68
+
69
+ // If mailto is provided, build internationalized URL
70
+ if (this.mailto) {
71
+ try {
72
+ const subject = this.subject
73
+ ? getText(this.subject) || this.subject
74
+ : "Issue report";
75
+ const describe = this.describe
76
+ ? getText(this.describe) || this.describe
77
+ : "Describe the issue:";
78
+ const appVersionLabel = this.appVersion
79
+ ? getText(this.appVersion) || this.appVersion
80
+ : "App version:";
81
+
82
+ const body = `${describe}\n\n\n${appVersionLabel} ${this.version || ""}`;
83
+
84
+ return `mailto:${this.mailto}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
85
+ } catch (error) {
86
+ // Fallback if translations fail
87
+ return `mailto:${this.mailto}?subject=Issue%20report&body=Describe%20the%20issue%3A%0A%0A%0AApp%20version%3A%20${this.version || ""}`;
88
+ }
89
+ }
90
+
91
+ return "#";
92
+ }
93
+
94
+ render() {
95
+ const mailtoHref = this._getMailtoHref();
96
+
97
+ return html`
98
+ <div class="text-wrapper" @click=${this._toggleVersion}>
99
+ ${this._showVersion && this.version
100
+ ? html`<ds-text default-value=${this.version}></ds-text>`
101
+ : html`<ds-text text=${this.text}><slot></slot></ds-text>`}
102
+ </div>
103
+ ${this.action
104
+ ? html`
105
+ <div class="action-wrapper">
106
+ <a href=${mailtoHref}>
107
+ <ds-text text=${this.action}></ds-text>
108
+ </a>
109
+ </div>
110
+ `
111
+ : ""}
112
+ `;
113
+ }
114
+ }
115
+
116
+ customElements.define("ds-banner", Banner);
117
+
118
+ declare global {
119
+ interface HTMLElementTagNameMap {
120
+ "ds-banner": Banner;
121
+ }
122
+ }
@@ -1,8 +1,9 @@
1
1
  // ds-button.ts
2
2
  // Core button component
3
3
 
4
- import { LitElement, html, css, type PropertyValues } from "lit";
5
- import { getText, currentLanguage } from "../0-face/i18n";
4
+ import { LitElement, html, unsafeCSS } from "lit";
5
+ import "./ds-text";
6
+ import styles from "./styles/ds-button.css?inline";
6
7
 
7
8
  export class Button extends LitElement {
8
9
  static properties = {
@@ -15,14 +16,12 @@ export class Button extends LitElement {
15
16
  attribute: "no-background",
16
17
  },
17
18
  blank: { type: Boolean, reflect: true },
18
- notionKey: { type: String, attribute: "notion-key" },
19
- key: { type: String },
19
+ text: { type: String },
20
20
  fallback: { type: String },
21
21
  language: { type: String },
22
22
  defaultText: { type: String, attribute: "default-text" },
23
23
  href: { type: String },
24
24
  _loading: { type: Boolean, state: true },
25
- _notionText: { type: String, state: true },
26
25
  };
27
26
 
28
27
  // Public properties
@@ -31,8 +30,7 @@ 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
- declare key: string;
33
+ declare text: string;
36
34
  declare fallback: string;
37
35
  declare language: string;
38
36
  declare defaultText: string;
@@ -40,7 +38,6 @@ export class Button extends LitElement {
40
38
 
41
39
  // Private state
42
40
  declare _loading: boolean;
43
- declare _notionText: string | null;
44
41
 
45
42
  constructor() {
46
43
  super();
@@ -49,106 +46,23 @@ export class Button extends LitElement {
49
46
  this.bold = false;
50
47
  this["no-background"] = false;
51
48
  this.blank = false;
52
- this.notionKey = null;
53
- this.key = "";
49
+ this.text = "";
54
50
  this.fallback = "";
55
51
  this.language = "en-US";
56
52
  this.defaultText = "";
57
53
  this.href = "";
58
54
  this._loading = false;
59
- this._notionText = null;
60
55
  }
61
56
 
62
- static styles = css`
63
- button {
64
- max-height: calc(var(--08) * var(--scaling-factor));
65
- border: none;
66
- cursor: pointer;
67
- font-size: calc(var(--type-size-default) * var(--scaling-factor));
68
- padding: 0 calc(1px * var(--scaling-factor));
69
- color: var(--button-text-color);
70
- font-family: var(--typeface);
71
- }
72
-
73
- button.title {
74
- background-color: var(--button-background-color-secondary);
75
- color: var(--button-text-color);
76
- }
77
-
78
- button.primary {
79
- background-color: var(--accent-color);
80
- color: var(--button-text-color);
81
- text-decoration-line: none;
82
- font-family: var(--typeface);
83
- }
84
-
85
- button.secondary {
86
- background-color: var(--button-background-color-secondary);
87
- color: var(--button-text-color);
88
- font-family: var(--typeface);
89
- }
90
-
91
- button[bold] {
92
- font-weight: var(--type-weight-bold);
93
- font-family: var(--typeface-medium);
94
- }
95
-
96
- button[no-background] {
97
- background-color: transparent;
98
- max-height: var(--1);
99
- padding: 0;
100
- color: var(--button-color, var(--button-text-color-secondary));
101
- }
102
-
103
- button[no-background][bold] {
104
- font-weight: var(--type-weight-bold);
105
- font-family: var(--typeface-medium);
106
- color: var(--button-color, var(--button-text-color-secondary));
107
- }
108
-
109
- .loading {
110
- opacity: 0.7;
111
- }
112
- `;
57
+ static styles = unsafeCSS(styles);
113
58
 
114
59
  connectedCallback() {
115
60
  super.connectedCallback();
116
- this._updateText();
117
-
118
- // Listen for language changes
119
- window.addEventListener("language-changed", this._handleLanguageChange);
120
- }
121
-
122
- disconnectedCallback() {
123
- super.disconnectedCallback();
124
- window.removeEventListener("language-changed", this._handleLanguageChange);
125
- }
126
-
127
- _handleLanguageChange = () => {
128
- this._updateText();
129
- };
130
-
131
- updated(changedProps: PropertyValues) {
132
- super.updated(changedProps);
133
-
134
- if (changedProps.has("key") || changedProps.has("defaultText")) {
135
- this._updateText();
136
- }
137
- }
138
-
139
- /**
140
- * Update text from translations (synchronous like Portfolio)
141
- */
142
- private _updateText() {
143
- if (this.key) {
144
- this._notionText = getText(this.key);
145
- } else {
146
- this._notionText = this.defaultText || this.fallback || null;
147
- }
148
- this.requestUpdate();
149
61
  }
150
62
 
151
63
  render() {
64
+ const hasTextProps = this.text || this.defaultText || this.fallback;
65
+
152
66
  return html`
153
67
  <button
154
68
  class=${this.variant}
@@ -157,7 +71,13 @@ export class Button extends LitElement {
157
71
  ?no-background=${this["no-background"]}
158
72
  @click=${this._handleClick}
159
73
  >
160
- ${this._notionText ? this._notionText : html`<slot></slot>`}
74
+ ${hasTextProps
75
+ ? html`<ds-text
76
+ .text=${this.text}
77
+ .defaultValue=${this.defaultText}
78
+ .fallback=${this.fallback}
79
+ ></ds-text>`
80
+ : html`<slot></slot>`}
161
81
  </button>
162
82
  `;
163
83
  }