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
@@ -0,0 +1,4 @@
1
+ <svg width="10" height="12" viewBox="0 0 10 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 2C1 1.44772 1.44772 1 2 1H6L9 4V10C9 10.5523 8.55228 11 8 11H2C1.44772 11 1 10.5523 1 10V2Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
3
+ <path d="M6 1V4H9" stroke="currentColor" stroke-width="1.2" fill="none"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 2V10M2 6H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 1L1 5L6 9V1Z" fill="currentColor"/>
3
+ <path d="M12 1L7 5L12 9V1Z" fill="currentColor"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="0.5" y="0.5" width="11" height="3" stroke="currentColor" stroke-width="1" fill="none"/>
3
+ <rect x="0.5" y="4.5" width="11" height="3" stroke="currentColor" stroke-width="1" fill="none"/>
4
+ <rect x="0.5" y="8.5" width="11" height="3" stroke="currentColor" stroke-width="1" fill="none"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 1L4 4L7 1" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="5" cy="5" r="4" stroke="currentColor" stroke-width="1.2" fill="none"/>
3
+ <line x1="8" y1="8" x2="11" y2="11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="14" height="10" viewBox="0 0 14 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7 1C3.5 1 1 5 1 5C1 5 3.5 9 7 9C10.5 9 13 5 13 5C13 5 10.5 1 7 1Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
3
+ <circle cx="7" cy="5" r="2" fill="currentColor"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M2 8L1 11H13L12 8" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
3
+ <path d="M3 8V4H6V1H8V4H11V8H3Z" fill="currentColor"/>
4
+ <rect x="5" y="5" width="4" height="2" fill="var(--surface-color, #fff)"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 1L7.5 4.5L11 5L8.5 7.5L9 11L6 9.5L3 11L3.5 7.5L1 5L4.5 4.5L6 1Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" fill="none"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="6" cy="6" r="5" stroke="currentColor" stroke-width="1.2" fill="none"/>
3
+ <circle cx="6" cy="6" r="2" fill="currentColor"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="8" height="5" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 4L4 1L7 4" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 1H11M6 1V9M3 9H9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 4L4 1M1 4L4 7M1 4H8C9.65685 4 11 5.34315 11 7V9" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="0.5" y="0.5" width="5" height="5" stroke="currentColor" stroke-width="1" stroke-dasharray="2 1" fill="none"/>
3
+ <rect x="6.5" y="6.5" width="5" height="5" stroke="currentColor" stroke-width="1" stroke-dasharray="2 1" fill="none"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 1H11M1 1V10C1 10.5523 1.44772 11 2 11H10C10.5523 11 11 10.5523 11 10V1" stroke="currentColor" stroke-width="1.2" stroke-dasharray="2 1" fill="none"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="1" width="10" height="10" rx="2" stroke="currentColor" stroke-width="1.2" stroke-dasharray="2 1" fill="none"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="10" height="12" viewBox="0 0 10 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="1" y="5" width="8" height="6" rx="1" stroke="currentColor" stroke-width="1.2" fill="none"/>
3
+ <path d="M3 5V3C3 1.89543 3.89543 1 5 1C6.10457 1 7 1.89543 7 3" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" fill="none"/>
4
+ <circle cx="5" cy="8" r="1" fill="currentColor"/>
5
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="10" height="14" viewBox="0 0 10 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="2.5" y="1" width="5" height="7" rx="2.5" stroke="currentColor" stroke-width="1.2" fill="none"/>
3
+ <path d="M1 6C1 8.76142 2.79086 11 5 11C7.20914 11 9 8.76142 9 6" stroke="currentColor" stroke-width="1.2" fill="none"/>
4
+ <line x1="5" y1="11" x2="5" y2="13" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
5
+ <line x1="1" y1="1" x2="9" y2="13" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
6
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7 2C3.5 2 1 6 1 6C1 6 3.5 10 7 10C10.5 10 13 6 13 6C13 6 10.5 2 7 2Z" stroke="currentColor" stroke-width="1.2" fill="none"/>
3
+ <circle cx="7" cy="6" r="2" stroke="currentColor" stroke-width="1.2" fill="none"/>
4
+ <line x1="2" y1="1" x2="12" y2="11" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 1L7.5 4.5L11 5L8.5 7.5L9 11L6 9.5L3 11L3.5 7.5L1 5L4.5 4.5L6 1Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" stroke-dasharray="2 1" fill="none"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1 1H11M6 1V9M3 9H9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-dasharray="2 1"/>
3
+ </svg>
package/DS1/x-icon/up.svg CHANGED
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6 10V2M6 2L2 6M6 2L10 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Jo4712
3
+ Copyright (c) 2025 0001
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # DS one (0.2.5-alpha.9)
1
+ # DS one (0.3.0-alpha.1)
2
2
 
3
3
  A plug and play design system
4
4
 
@@ -20,7 +20,7 @@ yarn add ds-one@alpha
20
20
 
21
21
  ```
22
22
 
23
- **Note**: Currently published as alpha version `0.2.5-alpha.9`
23
+ **Note**: Currently published as alpha version `0.3.0-alpha.1`
24
24
 
25
25
  ## Quick Start
26
26
 
@@ -41,8 +41,8 @@ yarn add ds-one@alpha
41
41
  </script>
42
42
  </head>
43
43
  <body>
44
- <ds-button variant="primary" key="getStarted"></ds-button>
45
- <ds-text key="welcome"></ds-text>
44
+ <ds-button variant="primary" text="Get Started"></ds-button>
45
+ <ds-text text="Welcome"></ds-text>
46
46
  </body>
47
47
  </html>
48
48
  ```
@@ -22,4 +22,9 @@ export declare function getDeviceInfo(): DeviceInfo;
22
22
  * Initialize device detection and log to console
23
23
  */
24
24
  export declare function initDeviceDetection(): DeviceInfo;
25
+ /**
26
+ * Disable double-tap to zoom in the browser (app-like behavior)
27
+ * Prevents all zoom gestures including double-tap and pinch-to-zoom
28
+ */
29
+ export declare function applike(): void;
25
30
  //# sourceMappingURL=device.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../DS1/0-face/device.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CA0B5C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CA6B1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CAkDhD"}
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../DS1/0-face/device.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CA0B5C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CA6B1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,UAAU,CA0DhD;AAwBD;;;GAGG;AACH,wBAAgB,OAAO,IAAI,IAAI,CA4H9B"}
@@ -65,6 +65,9 @@ export function initDeviceDetection() {
65
65
  document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
66
66
  // Also set --sf for backwards compatibility
67
67
  document.documentElement.style.setProperty("--sf", scalingFactor.toFixed(3));
68
+ // Add .mobile class to html element for CSS targeting
69
+ document.documentElement.classList.add("mobile");
70
+ document.documentElement.classList.remove("desktop");
68
71
  console.log(`[DS one] Mobile device detected - ${deviceInfo.deviceType} (${deviceInfo.screenWidth}x${deviceInfo.screenHeight}), scaling factor: ${scalingFactor.toFixed(2)}`);
69
72
  }
70
73
  else {
@@ -73,6 +76,9 @@ export function initDeviceDetection() {
73
76
  document.documentElement.style.setProperty("--sf", "1");
74
77
  // Also set --sf for backwards compatibility
75
78
  document.documentElement.style.setProperty("--sf", "1");
79
+ // Add .desktop class and remove .mobile class
80
+ document.documentElement.classList.add("desktop");
81
+ document.documentElement.classList.remove("mobile");
76
82
  }
77
83
  console.log(`[DS one] Desktop device detected (${deviceInfo.screenWidth}x${deviceInfo.screenHeight})`);
78
84
  }
@@ -111,3 +117,108 @@ if (typeof window !== "undefined") {
111
117
  }, 100);
112
118
  });
113
119
  }
120
+ /**
121
+ * Disable double-tap to zoom in the browser (app-like behavior)
122
+ * Prevents all zoom gestures including double-tap and pinch-to-zoom
123
+ */
124
+ export function applike() {
125
+ if (typeof document === "undefined" || typeof window === "undefined") {
126
+ return;
127
+ }
128
+ // Set viewport meta tag to prevent zoom - this is the most important step
129
+ let viewport = document.querySelector('meta[name="viewport"]');
130
+ if (!viewport) {
131
+ viewport = document.createElement("meta");
132
+ viewport.setAttribute("name", "viewport");
133
+ document.head.appendChild(viewport);
134
+ }
135
+ viewport.setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no");
136
+ // Apply touch-action: pan-x pan-y globally to prevent zoom but allow panning
137
+ const style = document.createElement("style");
138
+ style.id = "ds-one-applike-style";
139
+ style.textContent = `
140
+ * {
141
+ touch-action: pan-x pan-y !important;
142
+ -ms-touch-action: pan-x pan-y !important;
143
+ }
144
+ html, body {
145
+ touch-action: pan-x pan-y !important;
146
+ -ms-touch-action: pan-x pan-y !important;
147
+ }
148
+ `;
149
+ // Remove existing style if present
150
+ const existingStyle = document.getElementById("ds-one-applike-style");
151
+ if (existingStyle) {
152
+ existingStyle.remove();
153
+ }
154
+ document.head.appendChild(style);
155
+ // Track touch events to prevent double-tap zoom
156
+ let lastTouchEnd = 0;
157
+ let touchStartTime = 0;
158
+ const preventZoom = (event) => {
159
+ // Prevent pinch zoom (two fingers)
160
+ if (event instanceof TouchEvent) {
161
+ if (event.touches.length > 1) {
162
+ event.preventDefault();
163
+ event.stopPropagation();
164
+ return;
165
+ }
166
+ const now = Date.now();
167
+ if (event.type === "touchstart") {
168
+ // If touchstart happens within 300ms of last touchend, it's likely a double-tap
169
+ if (now - lastTouchEnd < 300) {
170
+ event.preventDefault();
171
+ event.stopPropagation();
172
+ return;
173
+ }
174
+ touchStartTime = now;
175
+ }
176
+ else if (event.type === "touchend") {
177
+ const touchDuration = now - touchStartTime;
178
+ // If this is a quick tap (< 300ms) and happened soon after previous touchend, prevent it
179
+ if (touchDuration < 300 && now - lastTouchEnd < 300) {
180
+ event.preventDefault();
181
+ event.stopPropagation();
182
+ return;
183
+ }
184
+ lastTouchEnd = now;
185
+ }
186
+ else if (event.type === "touchmove") {
187
+ // Prevent any touchmove that might trigger zoom
188
+ if (event.touches.length > 1) {
189
+ event.preventDefault();
190
+ event.stopPropagation();
191
+ return;
192
+ }
193
+ }
194
+ }
195
+ // Prevent wheel zoom with ctrl/cmd key (common on trackpads)
196
+ if (event instanceof WheelEvent && (event.ctrlKey || event.metaKey)) {
197
+ event.preventDefault();
198
+ event.stopPropagation();
199
+ return;
200
+ }
201
+ };
202
+ // Use capture phase to catch events earlier
203
+ const options = { passive: false, capture: true };
204
+ // Prevent all zoom gestures - use capture phase
205
+ document.addEventListener("touchstart", preventZoom, options);
206
+ document.addEventListener("touchmove", preventZoom, options);
207
+ document.addEventListener("touchend", preventZoom, options);
208
+ document.addEventListener("touchcancel", preventZoom, options);
209
+ // Prevent wheel zoom
210
+ document.addEventListener("wheel", preventZoom, options);
211
+ // Prevent gesture events (iOS Safari) - use capture phase
212
+ document.addEventListener("gesturestart", (e) => {
213
+ e.preventDefault();
214
+ e.stopPropagation();
215
+ }, options);
216
+ document.addEventListener("gesturechange", (e) => {
217
+ e.preventDefault();
218
+ e.stopPropagation();
219
+ }, options);
220
+ document.addEventListener("gestureend", (e) => {
221
+ e.preventDefault();
222
+ e.stopPropagation();
223
+ }, options);
224
+ }
@@ -0,0 +1,48 @@
1
+ export type ScalingMode = "auto" | "fixed" | "fluid";
2
+ export interface ScalingConfig {
3
+ mode: ScalingMode;
4
+ baseWidth: number;
5
+ minScale: number;
6
+ maxScale: number;
7
+ }
8
+ export declare const scalingFactor: import("@lit-labs/signals").Signal.State<number>;
9
+ export declare const scalingConfig: import("@lit-labs/signals").Signal.State<ScalingConfig>;
10
+ /**
11
+ * Calculate the scaling factor based on viewport width
12
+ * @param viewportWidth - Current viewport width in pixels
13
+ * @param config - Scaling configuration
14
+ * @returns The calculated scaling factor
15
+ */
16
+ export declare function calculateScalingFactor(viewportWidth: number, config?: ScalingConfig): number;
17
+ /**
18
+ * Set the scaling configuration
19
+ * @param config - Partial scaling configuration to apply
20
+ */
21
+ export declare function setScalingConfig(config: Partial<ScalingConfig>): void;
22
+ /**
23
+ * Update the scaling factor based on current viewport
24
+ */
25
+ export declare function updateScalingFactor(): void;
26
+ /**
27
+ * Get the current scaling factor
28
+ * @returns The current scaling factor
29
+ */
30
+ export declare function getScalingFactor(): number;
31
+ /**
32
+ * Convert a design pixel value to scaled pixels
33
+ * @param designPx - The design pixel value (based on 280px width)
34
+ * @returns The scaled pixel value
35
+ */
36
+ export declare function scale(designPx: number): number;
37
+ /**
38
+ * Convert a scaled pixel value back to design pixels
39
+ * @param scaledPx - The scaled pixel value
40
+ * @returns The design pixel value
41
+ */
42
+ export declare function unscale(scaledPx: number): number;
43
+ /**
44
+ * Initialize scaling system
45
+ * This is typically called automatically when the module loads
46
+ */
47
+ export declare function initScaling(): void;
48
+ //# sourceMappingURL=scaling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaling.d.ts","sourceRoot":"","sources":["../../DS1/0-face/scaling.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD,eAAO,MAAM,aAAa,kDAAoB,CAAC;AAG/C,eAAO,MAAM,aAAa,yDAAuC,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,aAAmC,GAC1C,MAAM,CAYR;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CASrE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAoB1C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAqBlC"}
@@ -0,0 +1,114 @@
1
+ // scaling.ts
2
+ // Responsive scaling utilities for the design system
3
+ import { signal } from "@lit-labs/signals";
4
+ const defaultConfig = {
5
+ mode: "auto",
6
+ baseWidth: 280,
7
+ minScale: 0.75,
8
+ maxScale: 2.0,
9
+ };
10
+ // Reactive scaling factor signal
11
+ export const scalingFactor = signal(1);
12
+ // Current scaling configuration
13
+ export const scalingConfig = signal(defaultConfig);
14
+ /**
15
+ * Calculate the scaling factor based on viewport width
16
+ * @param viewportWidth - Current viewport width in pixels
17
+ * @param config - Scaling configuration
18
+ * @returns The calculated scaling factor
19
+ */
20
+ export function calculateScalingFactor(viewportWidth, config = scalingConfig.get()) {
21
+ if (config.mode === "fixed") {
22
+ return 1;
23
+ }
24
+ const rawScale = viewportWidth / config.baseWidth;
25
+ const clampedScale = Math.max(config.minScale, Math.min(config.maxScale, rawScale));
26
+ return Number(clampedScale.toFixed(3));
27
+ }
28
+ /**
29
+ * Set the scaling configuration
30
+ * @param config - Partial scaling configuration to apply
31
+ */
32
+ export function setScalingConfig(config) {
33
+ const currentConfig = scalingConfig.get();
34
+ const newConfig = { ...currentConfig, ...config };
35
+ scalingConfig.set(newConfig);
36
+ // Recalculate scaling factor if in browser
37
+ if (typeof window !== "undefined") {
38
+ updateScalingFactor();
39
+ }
40
+ }
41
+ /**
42
+ * Update the scaling factor based on current viewport
43
+ */
44
+ export function updateScalingFactor() {
45
+ if (typeof window === "undefined" || typeof document === "undefined") {
46
+ return;
47
+ }
48
+ const viewportWidth = document.documentElement.clientWidth;
49
+ const config = scalingConfig.get();
50
+ const newFactor = calculateScalingFactor(viewportWidth, config);
51
+ scalingFactor.set(newFactor);
52
+ // Update CSS custom property
53
+ document.documentElement.style.setProperty("--sf", newFactor.toString());
54
+ // Dispatch event for components that need to react
55
+ window.dispatchEvent(new CustomEvent("scaling-changed", {
56
+ detail: { scalingFactor: newFactor, config },
57
+ }));
58
+ }
59
+ /**
60
+ * Get the current scaling factor
61
+ * @returns The current scaling factor
62
+ */
63
+ export function getScalingFactor() {
64
+ return scalingFactor.get();
65
+ }
66
+ /**
67
+ * Convert a design pixel value to scaled pixels
68
+ * @param designPx - The design pixel value (based on 280px width)
69
+ * @returns The scaled pixel value
70
+ */
71
+ export function scale(designPx) {
72
+ return designPx * scalingFactor.get();
73
+ }
74
+ /**
75
+ * Convert a scaled pixel value back to design pixels
76
+ * @param scaledPx - The scaled pixel value
77
+ * @returns The design pixel value
78
+ */
79
+ export function unscale(scaledPx) {
80
+ const factor = scalingFactor.get();
81
+ return factor === 0 ? scaledPx : scaledPx / factor;
82
+ }
83
+ /**
84
+ * Initialize scaling system
85
+ * This is typically called automatically when the module loads
86
+ */
87
+ export function initScaling() {
88
+ if (typeof window === "undefined") {
89
+ return;
90
+ }
91
+ // Initial calculation
92
+ updateScalingFactor();
93
+ // Update on resize (debounced)
94
+ let resizeTimeout;
95
+ window.addEventListener("resize", () => {
96
+ clearTimeout(resizeTimeout);
97
+ resizeTimeout = setTimeout(() => {
98
+ updateScalingFactor();
99
+ }, 100);
100
+ });
101
+ // Update on orientation change
102
+ window.addEventListener("orientationchange", () => {
103
+ setTimeout(updateScalingFactor, 100);
104
+ });
105
+ }
106
+ // Auto-initialize when module loads in browser
107
+ if (typeof window !== "undefined") {
108
+ if (document.readyState === "loading") {
109
+ document.addEventListener("DOMContentLoaded", initScaling);
110
+ }
111
+ else {
112
+ initScaling();
113
+ }
114
+ }
@@ -1 +1,68 @@
1
+ import { LitElement } from "lit";
2
+ import "./ds-text.js";
3
+ import "./ds-button.js";
4
+ declare global {
5
+ interface CustomElementRegistry {
6
+ define(name: string, constructor: typeof LitElement): void;
7
+ }
8
+ var customElements: CustomElementRegistry;
9
+ }
10
+ export declare class Banner extends LitElement {
11
+ static properties: {
12
+ text: {
13
+ type: StringConstructor;
14
+ };
15
+ action: {
16
+ type: StringConstructor;
17
+ };
18
+ href: {
19
+ type: StringConstructor;
20
+ };
21
+ mailto: {
22
+ type: StringConstructor;
23
+ };
24
+ subject: {
25
+ type: StringConstructor;
26
+ };
27
+ describe: {
28
+ type: StringConstructor;
29
+ };
30
+ appVersion: {
31
+ type: StringConstructor;
32
+ attribute: string;
33
+ };
34
+ variant: {
35
+ type: StringConstructor;
36
+ };
37
+ version: {
38
+ type: StringConstructor;
39
+ };
40
+ _showVersion: {
41
+ type: BooleanConstructor;
42
+ state: boolean;
43
+ };
44
+ };
45
+ text: string;
46
+ action: string;
47
+ href: string;
48
+ mailto: string;
49
+ subject: string;
50
+ describe: string;
51
+ appVersion: string;
52
+ variant: string;
53
+ version: string;
54
+ _showVersion: boolean;
55
+ private _boundUpdate;
56
+ connectedCallback(): void;
57
+ disconnectedCallback(): void;
58
+ static styles: import("lit").CSSResult;
59
+ private _toggleVersion;
60
+ private _getMailtoHref;
61
+ render(): import("lit-html").TemplateResult<1>;
62
+ }
63
+ declare global {
64
+ interface HTMLElementTagNameMap {
65
+ "ds-banner": Banner;
66
+ }
67
+ }
1
68
  //# sourceMappingURL=ds-banner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ds-banner.d.ts","sourceRoot":"","sources":["../../DS1/2-core/ds-banner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAC;AAElD,OAAO,cAAc,CAAC;AACtB,OAAO,gBAAgB,CAAC;AAGxB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,UAAU,GAAG,IAAI,CAAC;KAC5D;IACD,IAAI,cAAc,EAAE,qBAAqB,CAAC;CAC3C;AAED,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWf;IAEF,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,IAAI,EAAE,MAAM,CAAM;IAClB,MAAM,EAAE,MAAM,CAAM;IACpB,OAAO,EAAE,MAAM,CAAM;IACrB,QAAQ,EAAE,MAAM,CAAM;IACtB,UAAU,EAAE,MAAM,CAAM;IACxB,OAAO,EAAE,MAAM,CAAa;IAC5B,OAAO,EAAE,MAAM,CAAM;IACrB,YAAY,EAAE,OAAO,CAAS;IAE9B,OAAO,CAAC,YAAY,CAA8B;IAElD,iBAAiB;IAOjB,oBAAoB;IAMpB,MAAM,CAAC,MAAM,0BAAqB;IAElC,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IA6BtB,MAAM;CAoBP;AAID,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,MAAM,CAAC;KACrB;CACF"}