create-basicjs 0.1.4 → 0.1.5

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 (559) hide show
  1. package/README.md +2 -2
  2. package/bin/create-basicjs.js +31 -4
  3. package/bin/verify-package.js +1 -1
  4. package/package.json +2 -2
  5. package/payload/starter/AGENTS.md +11 -6
  6. package/payload/starter/README.md +1 -1
  7. package/payload/starter/_basic/VERSION +1 -1
  8. package/payload/starter/_basic/assets/cards/almond-blossom.png +0 -0
  9. package/payload/starter/_basic/assets/cards/blackberry.png +0 -0
  10. package/payload/starter/_basic/assets/cards/borage.png +0 -0
  11. package/payload/starter/_basic/assets/cards/chamomile.png +0 -0
  12. package/payload/starter/_basic/assets/cards/dill.png +0 -0
  13. package/payload/starter/_basic/assets/cards/eucalyptus.png +0 -0
  14. package/payload/starter/_basic/assets/cards/fennel.png +0 -0
  15. package/payload/starter/_basic/assets/cards/fig.png +0 -0
  16. package/payload/starter/_basic/assets/cards/juniper.png +0 -0
  17. package/payload/starter/_basic/assets/cards/lavender.png +0 -0
  18. package/payload/starter/_basic/assets/cards/lemon.png +0 -0
  19. package/payload/starter/_basic/assets/cards/olives.png +0 -0
  20. package/payload/starter/_basic/assets/cards/oregano.png +0 -0
  21. package/payload/starter/_basic/assets/cards/pepper.png +0 -0
  22. package/payload/starter/_basic/assets/cards/physalis.png +0 -0
  23. package/payload/starter/_basic/assets/cards/pomegranate.png +0 -0
  24. package/payload/starter/_basic/assets/cards/poppy.png +0 -0
  25. package/payload/starter/_basic/assets/cards/rosehip.png +0 -0
  26. package/payload/starter/_basic/assets/cards/saffron.png +0 -0
  27. package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
  28. package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
  29. package/payload/starter/_basic/assets/categories/coffee.png +0 -0
  30. package/payload/starter/_basic/assets/categories/frappe.png +0 -0
  31. package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
  32. package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
  33. package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
  34. package/payload/starter/_basic/assets/categories/tea.png +0 -0
  35. package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
  36. package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
  37. package/payload/starter/_basic/assets/fruids/domates.png +0 -0
  38. package/payload/starter/_basic/assets/fruids/elma.png +0 -0
  39. package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
  40. package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
  41. package/payload/starter/_basic/assets/fruids/limon.png +0 -0
  42. package/payload/starter/_basic/assets/fruids/muz.png +0 -0
  43. package/payload/starter/_basic/assets/fruids/nar.png +0 -0
  44. package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
  45. package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
  46. package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
  47. package/payload/starter/_basic/basic/LICENSE +1 -1
  48. package/payload/starter/_basic/basic/basic.css +3 -6
  49. package/payload/starter/_basic/basic/basic.js +154 -60
  50. package/payload/starter/_basic/basic/basic.min.js +19 -6
  51. package/payload/starter/_basic/basic/scroll-bar.js +4 -2
  52. package/payload/starter/_basic/basic/scroll-bar.min.js +1 -0
  53. package/payload/starter/_basic/comp/accordion.js +659 -0
  54. package/payload/starter/_basic/comp/action-button.js +22 -23
  55. package/payload/starter/_basic/comp/action-tab-bar.js +8 -8
  56. package/payload/starter/_basic/comp/app-bar.js +12 -11
  57. package/payload/starter/_basic/comp/{badge-v2.js → badge.js} +51 -5
  58. package/payload/starter/_basic/comp/bottom-bar.js +31 -23
  59. package/payload/starter/_basic/comp/breadcrumbs.js +4 -2
  60. package/payload/starter/_basic/comp/canvas.js +652 -0
  61. package/payload/starter/_basic/comp/chat-view.js +827 -0
  62. package/payload/starter/_basic/comp/check-box.js +137 -21
  63. package/payload/starter/_basic/comp/code-editor.js +953 -0
  64. package/payload/starter/_basic/comp/{select-color.js → color-picker.js} +62 -29
  65. package/payload/starter/_basic/comp/context-menu.js +342 -30
  66. package/payload/starter/_basic/comp/{currency-input-b.js → currency-field.js} +48 -29
  67. package/payload/starter/_basic/comp/data-table.js +114 -42
  68. package/payload/starter/_basic/comp/{select-date.js → date-picker.js} +104 -52
  69. package/payload/starter/_basic/comp/dialog.js +214 -76
  70. package/payload/starter/_basic/comp/email-field.js +65 -0
  71. package/payload/starter/_basic/comp/{select-file.js → file-picker.js} +245 -57
  72. package/payload/starter/_basic/comp/filters.js +374 -60
  73. package/payload/starter/_basic/comp/form.js +38 -26
  74. package/payload/starter/_basic/comp/full-screen-select.js +36 -33
  75. package/payload/starter/_basic/comp/gauge.js +12 -8
  76. package/payload/starter/_basic/comp/graph-box.js +3911 -0
  77. package/payload/starter/_basic/comp/grid-group.js +185 -0
  78. package/payload/starter/_basic/comp/hold-to-confirm-button.js +16 -7
  79. package/payload/starter/_basic/comp/image-view.js +598 -0
  80. package/payload/starter/_basic/comp/item-list.js +507 -163
  81. package/payload/starter/_basic/comp/json-editor.js +3221 -0
  82. package/payload/starter/_basic/comp/json-view.js +597 -0
  83. package/payload/starter/_basic/comp/label-editor.js +22 -19
  84. package/payload/starter/_basic/comp/left-menu.js +89 -22
  85. package/payload/starter/_basic/comp/line-progress-bar.js +196 -45
  86. package/payload/starter/_basic/comp/loading-screen.js +49 -18
  87. package/payload/starter/_basic/comp/log-view.js +530 -0
  88. package/payload/starter/_basic/comp/{login-page-v2.js → login-page.js} +205 -106
  89. package/payload/starter/_basic/comp/markdown-view.js +1044 -0
  90. package/payload/starter/_basic/comp/menu-bar.js +624 -0
  91. package/payload/starter/_basic/comp/mini-graph-box.js +20 -11
  92. package/payload/starter/_basic/comp/minimal-accent.js +208 -0
  93. package/payload/starter/_basic/comp/notice.js +15 -13
  94. package/payload/starter/_basic/comp/{number-input-b.js → number-field.js} +26 -19
  95. package/payload/starter/_basic/comp/numeric-keyboard.js +15 -13
  96. package/payload/starter/_basic/comp/page-control.js +21 -4
  97. package/payload/starter/_basic/comp/page-header.js +7 -6
  98. package/payload/starter/_basic/comp/password-field.js +192 -0
  99. package/payload/starter/_basic/comp/period-bar.js +8 -7
  100. package/payload/starter/_basic/comp/{phone-input-b.js → phone-field.js} +80 -45
  101. package/payload/starter/_basic/comp/progress-bar.js +401 -85
  102. package/payload/starter/_basic/comp/property-panel.js +1022 -123
  103. package/payload/starter/_basic/comp/radio-button.js +79 -19
  104. package/payload/starter/_basic/comp/range-slider.js +569 -0
  105. package/payload/starter/_basic/comp/rich-text-editor.js +33 -30
  106. package/payload/starter/_basic/comp/scroll-area.js +308 -0
  107. package/payload/starter/_basic/comp/scrolling-text.js +10 -9
  108. package/payload/starter/_basic/comp/search-input.js +725 -0
  109. package/payload/starter/_basic/comp/search-results.js +60 -24
  110. package/payload/starter/_basic/comp/select-box.js +229 -107
  111. package/payload/starter/_basic/comp/settings-row.js +20 -19
  112. package/payload/starter/_basic/comp/side-panel.js +53 -10
  113. package/payload/starter/_basic/comp/slider-field.js +264 -88
  114. package/payload/starter/_basic/comp/slider.js +541 -86
  115. package/payload/starter/_basic/comp/smart-button.js +433 -352
  116. package/payload/starter/_basic/comp/smart-table.js +740 -185
  117. package/payload/starter/_basic/comp/sortable-list.js +47 -38
  118. package/payload/starter/_basic/comp/spark-line-box.js +25 -16
  119. package/payload/starter/_basic/comp/splitter.js +411 -0
  120. package/payload/starter/_basic/comp/status-bar.js +408 -0
  121. package/payload/starter/_basic/comp/step-bar.js +345 -0
  122. package/payload/starter/_basic/comp/stepper.js +77 -49
  123. package/payload/starter/_basic/comp/tabs.js +67 -18
  124. package/payload/starter/_basic/comp/tag-input.js +50 -10
  125. package/payload/starter/_basic/comp/tap-effect.js +6 -4
  126. package/payload/starter/_basic/comp/text-area-field.js +233 -0
  127. package/payload/starter/_basic/comp/text-field.js +1006 -0
  128. package/payload/starter/_basic/comp/time-line.js +102 -28
  129. package/payload/starter/_basic/comp/{select-time.js → time-picker.js} +104 -51
  130. package/payload/starter/_basic/comp/tiny-select.js +79 -39
  131. package/payload/starter/_basic/comp/tiny-table.js +12 -8
  132. package/payload/starter/_basic/comp/toast.js +87 -34
  133. package/payload/starter/_basic/comp/toggle.js +147 -27
  134. package/payload/starter/_basic/comp/tool-bar.js +760 -0
  135. package/payload/starter/_basic/comp/tooltip.js +80 -17
  136. package/payload/starter/_basic/comp/tree-view.js +124 -41
  137. package/payload/starter/_basic/comp/ui-effects.js +17 -11
  138. package/payload/starter/_basic/comp/ui-standards.js +5 -4
  139. package/payload/starter/_basic/comp/url-field.js +190 -0
  140. package/payload/starter/_basic/comp/web-view.js +70 -16
  141. package/payload/starter/_basic/docs/basic-js-animated-rules.md +15 -9
  142. package/payload/starter/_basic/docs/basic-js-code-rules.md +42 -5
  143. package/payload/starter/_basic/docs/basic-js-components.md +12 -17
  144. package/payload/starter/_basic/docs/basic-js-core.md +5 -4
  145. package/payload/starter/_basic/docs/component-index.md +245 -104
  146. package/payload/starter/_basic/docs/component-template.js +28 -24
  147. package/payload/starter/_basic/docs/handbook/00-introduction.md +6 -2
  148. package/payload/starter/_basic/docs/handbook/00-what-is-new.md +21 -0
  149. package/payload/starter/_basic/docs/handbook/01-label.md +4 -4
  150. package/payload/starter/_basic/docs/handbook/02-box.md +7 -7
  151. package/payload/starter/_basic/docs/handbook/03-image.md +4 -4
  152. package/payload/starter/_basic/docs/handbook/04-common-properties.md +6 -5
  153. package/payload/starter/_basic/docs/handbook/05-autolayout.md +8 -7
  154. package/payload/starter/_basic/docs/handbook/06-button.md +3 -3
  155. package/payload/starter/_basic/docs/handbook/07-input.md +3 -3
  156. package/payload/starter/_basic/docs/handbook/08-page.md +3 -3
  157. package/payload/starter/_basic/docs/handbook/09-useful-examples.md +39 -58
  158. package/payload/starter/_basic/docs/handbook/10-motion.md +6 -6
  159. package/payload/starter/_basic/docs/handbook/11-other-functions.md +1 -0
  160. package/payload/starter/_basic/docs/handbook/13-sound.md +3 -3
  161. package/payload/starter/_basic/docs/handbook/14-using-components.md +180 -0
  162. package/payload/starter/_basic/docs/handbook/15-making-a-component.md +338 -0
  163. package/payload/starter/_basic/docs/what-is-new.md +106 -0
  164. package/payload/starter/_basic/examples/accordion.htm +174 -0
  165. package/payload/starter/_basic/examples/action-button.htm +74 -32
  166. package/payload/starter/_basic/examples/action-tab-bar.htm +5 -6
  167. package/payload/starter/_basic/examples/app-bar.htm +63 -41
  168. package/payload/starter/_basic/examples/badge.htm +96 -0
  169. package/payload/starter/_basic/examples/bottom-bar-2.htm +61 -48
  170. package/payload/starter/_basic/examples/bottom-bar.htm +74 -16
  171. package/payload/starter/_basic/examples/breadcrumbs.htm +160 -150
  172. package/payload/starter/_basic/examples/canvas.htm +190 -0
  173. package/payload/starter/_basic/examples/chat-view.htm +143 -0
  174. package/payload/starter/_basic/examples/check-box-2.htm +71 -82
  175. package/payload/starter/_basic/examples/check-box-3.htm +72 -83
  176. package/payload/starter/_basic/examples/check-box.htm +207 -0
  177. package/payload/starter/_basic/examples/code-editor-2.htm +259 -0
  178. package/payload/starter/_basic/examples/code-editor.htm +225 -0
  179. package/payload/starter/_basic/examples/color-picker.htm +206 -0
  180. package/payload/starter/_basic/examples/context-menu.htm +180 -139
  181. package/payload/starter/_basic/examples/currency-field.htm +105 -0
  182. package/payload/starter/_basic/examples/data-table-2.htm +2 -1
  183. package/payload/starter/_basic/examples/data-table-3.htm +1 -1
  184. package/payload/starter/_basic/examples/data-table-4.htm +15 -12
  185. package/payload/starter/_basic/examples/data-table-5.htm +11 -3
  186. package/payload/starter/_basic/examples/data-table.htm +90 -40
  187. package/payload/starter/_basic/examples/date-picker.htm +239 -0
  188. package/payload/starter/_basic/examples/dialog-centered.htm +394 -40
  189. package/payload/starter/_basic/examples/dialog.htm +267 -46
  190. package/payload/starter/_basic/examples/email-field.htm +102 -0
  191. package/payload/starter/_basic/examples/file-picker.htm +296 -0
  192. package/payload/starter/_basic/examples/filters.htm +33 -22
  193. package/payload/starter/_basic/examples/{form-1.htm → form.htm} +18 -19
  194. package/payload/starter/_basic/examples/full-screen-select.htm +81 -58
  195. package/payload/starter/_basic/examples/gauge.htm +95 -81
  196. package/payload/starter/_basic/examples/graph-box.htm +365 -0
  197. package/payload/starter/_basic/examples/grid-group.htm +179 -0
  198. package/payload/starter/_basic/examples/hold-to-confirm-button.htm +102 -113
  199. package/payload/starter/_basic/examples/image-view.htm +195 -0
  200. package/payload/starter/_basic/examples/item-list-2.htm +138 -94
  201. package/payload/starter/_basic/examples/item-list.htm +191 -86
  202. package/payload/starter/_basic/examples/json-editor.htm +206 -0
  203. package/payload/starter/_basic/examples/json-view.htm +153 -0
  204. package/payload/starter/_basic/examples/label-editor.htm +85 -89
  205. package/payload/starter/_basic/examples/left-menu-2.htm +93 -0
  206. package/payload/starter/_basic/examples/left-menu.htm +42 -37
  207. package/payload/starter/_basic/examples/line-progress-bar.htm +155 -114
  208. package/payload/starter/_basic/examples/loading-screen.htm +149 -125
  209. package/payload/starter/_basic/examples/log-view.htm +175 -0
  210. package/payload/starter/_basic/examples/{login-page-dark-v2.htm → login-page-dark.htm} +265 -267
  211. package/payload/starter/_basic/examples/{login-page-v2.htm → login-page.htm} +266 -267
  212. package/payload/starter/_basic/examples/markdown-view.htm +220 -0
  213. package/payload/starter/_basic/examples/menu-bar-2.htm +225 -0
  214. package/payload/starter/_basic/examples/menu-bar.htm +145 -0
  215. package/payload/starter/_basic/examples/mini-graph-box.htm +98 -109
  216. package/payload/starter/_basic/examples/minimal-accent.htm +196 -0
  217. package/payload/starter/_basic/examples/minimal-theme.htm +432 -0
  218. package/payload/starter/_basic/examples/notice.htm +13 -4
  219. package/payload/starter/_basic/examples/number-field.htm +103 -0
  220. package/payload/starter/_basic/examples/numeric-keyboard.htm +44 -42
  221. package/payload/starter/_basic/examples/page-control.htm +181 -130
  222. package/payload/starter/_basic/examples/page-header.htm +57 -30
  223. package/payload/starter/_basic/examples/password-field.htm +117 -0
  224. package/payload/starter/_basic/examples/period-bar.htm +43 -29
  225. package/payload/starter/_basic/examples/phone-field-select-country.htm +292 -0
  226. package/payload/starter/_basic/examples/phone-field.htm +104 -0
  227. package/payload/starter/_basic/examples/progress-bar-ozden.htm +229 -92
  228. package/payload/starter/_basic/examples/progress-bar.htm +222 -174
  229. package/payload/starter/_basic/examples/property-panel.htm +152 -52
  230. package/payload/starter/_basic/examples/radio-button-2.htm +101 -109
  231. package/payload/starter/_basic/examples/radio-button-3.htm +81 -71
  232. package/payload/starter/_basic/examples/radio-button.htm +289 -0
  233. package/payload/starter/_basic/examples/range-slider.htm +171 -0
  234. package/payload/starter/_basic/examples/rich-text-editor.htm +115 -110
  235. package/payload/starter/_basic/examples/scroll-area.htm +293 -0
  236. package/payload/starter/_basic/examples/scrolling-text.htm +27 -6
  237. package/payload/starter/_basic/examples/search-input-2-light.htm +112 -0
  238. package/payload/starter/_basic/examples/search-input-3-dark.htm +105 -0
  239. package/payload/starter/_basic/examples/{search-input-v2-place.htm → search-input-place.htm} +25 -26
  240. package/payload/starter/_basic/examples/search-input.htm +159 -0
  241. package/payload/starter/_basic/examples/search-results.htm +85 -88
  242. package/payload/starter/_basic/examples/select-box-ozden-dark-text.htm +70 -0
  243. package/payload/starter/_basic/examples/select-box-ozden-item.htm +6 -5
  244. package/payload/starter/_basic/examples/select-box-ozden-text.htm +5 -3
  245. package/payload/starter/_basic/examples/select-box.htm +190 -159
  246. package/payload/starter/_basic/examples/settings-row.htm +92 -43
  247. package/payload/starter/_basic/examples/side-panel-2.htm +63 -25
  248. package/payload/starter/_basic/examples/side-panel.htm +84 -70
  249. package/payload/starter/_basic/examples/slider-2-classic.htm +152 -0
  250. package/payload/starter/_basic/examples/slider-field-ozden.htm +286 -0
  251. package/payload/starter/_basic/examples/slider-field.htm +174 -134
  252. package/payload/starter/_basic/examples/slider.htm +257 -180
  253. package/payload/starter/_basic/examples/smart-button-3-ozden.htm +170 -257
  254. package/payload/starter/_basic/examples/smart-button-4-dark.htm +86 -47
  255. package/payload/starter/_basic/examples/smart-button-5-features.htm +130 -125
  256. package/payload/starter/_basic/examples/smart-button-alternatif.htm +266 -0
  257. package/payload/starter/_basic/examples/smart-button.htm +207 -174
  258. package/payload/starter/_basic/examples/smart-table-2.htm +43 -56
  259. package/payload/starter/_basic/examples/smart-table-3.htm +148 -113
  260. package/payload/starter/_basic/examples/smart-table-4.htm +37 -50
  261. package/payload/starter/_basic/examples/{smart-table-1.htm → smart-table-5.htm} +37 -48
  262. package/payload/starter/_basic/examples/smart-table.htm +183 -0
  263. package/payload/starter/_basic/examples/sortable-list.htm +191 -142
  264. package/payload/starter/_basic/examples/spark-line-box.htm +149 -161
  265. package/payload/starter/_basic/examples/splitter.htm +164 -0
  266. package/payload/starter/_basic/examples/status-bar.htm +166 -0
  267. package/payload/starter/_basic/examples/step-bar.htm +129 -0
  268. package/payload/starter/_basic/examples/stepper-2.htm +71 -59
  269. package/payload/starter/_basic/examples/stepper.htm +146 -135
  270. package/payload/starter/_basic/examples/tabs-2.htm +58 -67
  271. package/payload/starter/_basic/examples/tabs.htm +197 -180
  272. package/payload/starter/_basic/examples/tag-input.htm +150 -153
  273. package/payload/starter/_basic/examples/tap-effect.htm +23 -19
  274. package/payload/starter/_basic/examples/text-area-field.htm +104 -0
  275. package/payload/starter/_basic/examples/text-field-2.htm +113 -0
  276. package/payload/starter/_basic/examples/text-field-3-style.htm +105 -0
  277. package/payload/starter/_basic/examples/text-field-4-custom-unit.htm +96 -0
  278. package/payload/starter/_basic/examples/{input-b-ex5-warning-icon.htm → text-field-5-warning-icon.htm} +19 -19
  279. package/payload/starter/_basic/examples/text-field-6-modern-dark.htm +114 -0
  280. package/payload/starter/_basic/examples/text-field-7-modern.htm +106 -0
  281. package/payload/starter/_basic/examples/text-field-8-light-dark.htm +159 -0
  282. package/payload/starter/_basic/examples/text-field.htm +163 -0
  283. package/payload/starter/_basic/examples/time-line.htm +180 -116
  284. package/payload/starter/_basic/examples/time-picker.htm +240 -0
  285. package/payload/starter/_basic/examples/tiny-select.htm +118 -86
  286. package/payload/starter/_basic/examples/tiny-table.htm +40 -34
  287. package/payload/starter/_basic/examples/toast.htm +145 -147
  288. package/payload/starter/_basic/examples/toggle-2.htm +99 -68
  289. package/payload/starter/_basic/examples/toggle-3.htm +104 -101
  290. package/payload/starter/_basic/examples/toggle.htm +161 -93
  291. package/payload/starter/_basic/examples/tool-bar.htm +172 -0
  292. package/payload/starter/_basic/examples/tooltip-2.htm +110 -60
  293. package/payload/starter/_basic/examples/tooltip-3.htm +124 -65
  294. package/payload/starter/_basic/examples/tooltip-4.htm +218 -0
  295. package/payload/starter/_basic/examples/tooltip.htm +206 -124
  296. package/payload/starter/_basic/examples/tree-view.htm +210 -182
  297. package/payload/starter/_basic/examples/ui-effects.htm +207 -185
  298. package/payload/starter/_basic/examples/ui-standards.htm +200 -139
  299. package/payload/starter/_basic/examples/url-field.htm +120 -0
  300. package/payload/starter/_basic/examples/web-view.htm +109 -110
  301. package/payload/starter/_basic/min/accordion.min.js +2 -0
  302. package/payload/starter/_basic/min/action-button.min.js +1 -1
  303. package/payload/starter/_basic/min/app-bar.min.js +1 -1
  304. package/payload/starter/_basic/min/badge.min.js +2 -0
  305. package/payload/starter/_basic/min/bottom-bar.min.js +1 -1
  306. package/payload/starter/_basic/min/canvas.min.js +2 -0
  307. package/payload/starter/_basic/min/chat-view.min.js +2 -0
  308. package/payload/starter/_basic/min/check-box.min.js +1 -1
  309. package/payload/starter/_basic/min/code-editor.min.js +2 -0
  310. package/payload/starter/_basic/min/color-picker.min.js +2 -0
  311. package/payload/starter/_basic/min/context-menu.min.js +1 -1
  312. package/payload/starter/_basic/min/currency-field.min.js +2 -0
  313. package/payload/starter/_basic/min/data-table.min.js +1 -1
  314. package/payload/starter/_basic/min/date-picker.min.js +2 -0
  315. package/payload/starter/_basic/min/dialog.min.js +1 -1
  316. package/payload/starter/_basic/min/email-field.min.js +2 -0
  317. package/payload/starter/_basic/min/file-picker.min.js +2 -0
  318. package/payload/starter/_basic/min/filters.min.js +1 -1
  319. package/payload/starter/_basic/min/form.min.js +1 -1
  320. package/payload/starter/_basic/min/full-screen-select.min.js +1 -1
  321. package/payload/starter/_basic/min/gauge.min.js +1 -1
  322. package/payload/starter/_basic/min/graph-box.min.js +2 -0
  323. package/payload/starter/_basic/min/grid-group.min.js +2 -0
  324. package/payload/starter/_basic/min/hold-to-confirm-button.min.js +1 -1
  325. package/payload/starter/_basic/min/image-view.min.js +2 -0
  326. package/payload/starter/_basic/min/item-list.min.js +1 -1
  327. package/payload/starter/_basic/min/json-editor.min.js +2 -0
  328. package/payload/starter/_basic/min/json-view.min.js +2 -0
  329. package/payload/starter/_basic/min/label-editor.min.js +1 -1
  330. package/payload/starter/_basic/min/left-menu.min.js +1 -1
  331. package/payload/starter/_basic/min/line-progress-bar.min.js +1 -1
  332. package/payload/starter/_basic/min/loading-screen.min.js +1 -1
  333. package/payload/starter/_basic/min/log-view.min.js +2 -0
  334. package/payload/starter/_basic/min/login-page.min.js +2 -0
  335. package/payload/starter/_basic/min/markdown-view.min.js +2 -0
  336. package/payload/starter/_basic/min/menu-bar.min.js +2 -0
  337. package/payload/starter/_basic/min/mini-graph-box.min.js +1 -1
  338. package/payload/starter/_basic/min/minimal-accent.min.js +2 -0
  339. package/payload/starter/_basic/min/notice.min.js +1 -1
  340. package/payload/starter/_basic/min/number-field.min.js +2 -0
  341. package/payload/starter/_basic/min/numeric-keyboard.min.js +1 -1
  342. package/payload/starter/_basic/min/page-control.min.js +1 -1
  343. package/payload/starter/_basic/min/password-field.min.js +2 -0
  344. package/payload/starter/_basic/min/phone-field.min.js +2 -0
  345. package/payload/starter/_basic/min/progress-bar.min.js +1 -1
  346. package/payload/starter/_basic/min/property-panel.min.js +1 -1
  347. package/payload/starter/_basic/min/radio-button.min.js +1 -1
  348. package/payload/starter/_basic/min/range-slider.min.js +2 -0
  349. package/payload/starter/_basic/min/rich-text-editor.min.js +1 -1
  350. package/payload/starter/_basic/min/scroll-area.min.js +2 -0
  351. package/payload/starter/_basic/min/scrolling-text.min.js +1 -1
  352. package/payload/starter/_basic/min/search-input.min.js +2 -0
  353. package/payload/starter/_basic/min/search-results.min.js +1 -1
  354. package/payload/starter/_basic/min/select-box.min.js +1 -1
  355. package/payload/starter/_basic/min/settings-row.min.js +1 -1
  356. package/payload/starter/_basic/min/side-panel.min.js +1 -1
  357. package/payload/starter/_basic/min/slider-field.min.js +1 -1
  358. package/payload/starter/_basic/min/slider.min.js +1 -1
  359. package/payload/starter/_basic/min/smart-button.min.js +1 -1
  360. package/payload/starter/_basic/min/smart-table.min.js +1 -1
  361. package/payload/starter/_basic/min/sortable-list.min.js +1 -1
  362. package/payload/starter/_basic/min/spark-line-box.min.js +1 -1
  363. package/payload/starter/_basic/min/splitter.min.js +2 -0
  364. package/payload/starter/_basic/min/status-bar.min.js +2 -0
  365. package/payload/starter/_basic/min/step-bar.min.js +2 -0
  366. package/payload/starter/_basic/min/stepper.min.js +1 -1
  367. package/payload/starter/_basic/min/tabs.min.js +1 -1
  368. package/payload/starter/_basic/min/tag-input.min.js +1 -1
  369. package/payload/starter/_basic/min/text-area-field.min.js +2 -0
  370. package/payload/starter/_basic/min/text-field.min.js +2 -0
  371. package/payload/starter/_basic/min/time-line.min.js +1 -1
  372. package/payload/starter/_basic/min/time-picker.min.js +2 -0
  373. package/payload/starter/_basic/min/tiny-select.min.js +1 -1
  374. package/payload/starter/_basic/min/toast.min.js +1 -1
  375. package/payload/starter/_basic/min/toggle.min.js +1 -1
  376. package/payload/starter/_basic/min/tool-bar.min.js +2 -0
  377. package/payload/starter/_basic/min/tooltip.min.js +1 -1
  378. package/payload/starter/_basic/min/tree-view.min.js +1 -1
  379. package/payload/starter/_basic/min/ui-effects.min.js +1 -1
  380. package/payload/starter/_basic/min/url-field.min.js +2 -0
  381. package/payload/starter/_basic/min/web-view.min.js +1 -1
  382. package/payload/templates/booking/app/app.js +11 -8
  383. package/payload/templates/booking/app/settings.js +4 -4
  384. package/payload/templates/booking/index.htm +3 -3
  385. package/payload/templates/booking/pages/account.js +6 -6
  386. package/payload/templates/booking/pages/book.js +1 -1
  387. package/payload/templates/booking/pages/services.js +5 -4
  388. package/payload/templates/classic/app/app.js +15 -11
  389. package/payload/templates/classic/app/settings.js +22 -20
  390. package/payload/templates/classic/assets/_attribute.txt +2 -0
  391. package/payload/templates/classic/assets/cards/dill.png +0 -0
  392. package/payload/templates/classic/assets/cards/fennel.png +0 -0
  393. package/payload/templates/classic/assets/cards/juniper.png +0 -0
  394. package/payload/templates/classic/assets/cards/olives.png +0 -0
  395. package/payload/templates/classic/assets/cards/oregano.png +0 -0
  396. package/payload/templates/classic/assets/cards/pepper.png +0 -0
  397. package/payload/templates/classic/assets/cards/rosehip.png +0 -0
  398. package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
  399. package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
  400. package/payload/templates/classic/assets/categories/coffee.png +0 -0
  401. package/payload/templates/classic/assets/categories/frappe.png +0 -0
  402. package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
  403. package/payload/templates/classic/assets/categories/milkshake.png +0 -0
  404. package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
  405. package/payload/templates/classic/assets/categories/tea.png +0 -0
  406. package/payload/templates/classic/index.htm +2 -2
  407. package/payload/templates/classic/pages/example.js +10 -10
  408. package/payload/templates/classic/pages/examples.js +44 -43
  409. package/payload/templates/classic/pages/home.js +16 -15
  410. package/payload/templates/classic/pages/info-pages.js +5 -5
  411. package/payload/templates/classic/pages/search.js +8 -7
  412. package/payload/templates/classic/pages/settings.js +13 -13
  413. package/payload/templates/classic/pages/tasks.js +1 -0
  414. package/payload/templates/classic/pages/template-pages.js +12 -11
  415. package/payload/templates/coffee-shop/app/app.js +12 -8
  416. package/payload/templates/coffee-shop/app/settings.js +4 -4
  417. package/payload/templates/coffee-shop/index.htm +3 -3
  418. package/payload/templates/coffee-shop/pages/drink.js +1 -1
  419. package/payload/templates/coffee-shop/pages/menu.js +5 -4
  420. package/payload/templates/forms/TEMPLATE.md +1 -1
  421. package/payload/templates/forms/appointment-form.htm +55 -53
  422. package/payload/templates/forms/contact-form-to-mail.htm +38 -37
  423. package/payload/templates/forms/contact-form-to-supabase.htm +47 -46
  424. package/payload/templates/forms/dark-contact-form.htm +43 -40
  425. package/payload/templates/forms/event-registration-form.htm +80 -77
  426. package/payload/templates/forms/feedback-form.htm +54 -54
  427. package/payload/templates/forms/order-form.htm +88 -84
  428. package/payload/templates/forms/recruitment-form.htm +60 -60
  429. package/payload/templates/forms/service/readme.md +9 -8
  430. package/payload/templates/forms/service/send-form-mail.php +38 -21
  431. package/payload/templates/forms/support-ticket-form.htm +67 -65
  432. package/payload/templates/panel/common/module-page.js +2 -2
  433. package/payload/templates/panel/common/theme.js +37 -10
  434. package/payload/templates/panel/common/top-bar.js +45 -40
  435. package/payload/templates/panel/index.htm +59 -60
  436. package/payload/templates/panel/module10/greenhouse.htm +98 -113
  437. package/payload/templates/panel/module11/arduino-projects.htm +47 -58
  438. package/payload/templates/panel/module6/energy-hub.htm +71 -103
  439. package/payload/templates/panel/module7/3d-printers.htm +58 -81
  440. package/payload/templates/panel/module8/cold-rooms.htm +58 -79
  441. package/payload/templates/panel/module9/elevator-fleet.htm +72 -93
  442. package/payload/templates/panel/pages/activity.js +134 -152
  443. package/payload/templates/panel/pages/contents.js +291 -308
  444. package/payload/templates/panel/pages/customers.js +250 -267
  445. package/payload/templates/panel/pages/edit-user.js +31 -30
  446. package/payload/templates/panel/pages/home.js +39 -70
  447. package/payload/templates/panel/pages/media.js +166 -183
  448. package/payload/templates/panel/pages/notifications.js +7 -7
  449. package/payload/templates/panel/pages/orders.js +200 -217
  450. package/payload/templates/panel/pages/products.js +259 -278
  451. package/payload/templates/panel/pages/reports.js +74 -123
  452. package/payload/templates/panel/pages/roles.js +57 -60
  453. package/payload/templates/panel/pages/settings.js +127 -143
  454. package/payload/templates/panel/pages/user-actions.js +106 -110
  455. package/payload/templates/panel/pages/user-list.js +221 -238
  456. package/payload/templates/panel/pages/users.js +14 -29
  457. package/payload/templates/shop/TEMPLATE.md +1 -1
  458. package/payload/templates/shop/app/app.js +11 -8
  459. package/payload/templates/shop/app/settings.js +4 -4
  460. package/payload/templates/shop/index.htm +3 -3
  461. package/payload/templates/shop/pages/account.js +7 -7
  462. package/payload/templates/shop/pages/cart.js +1 -1
  463. package/payload/templates/shop/pages/checkout.js +2 -2
  464. package/payload/templates/shop/pages/product.js +2 -2
  465. package/payload/templates/shop/pages/shop.js +6 -5
  466. package/payload/templates/starter/TEMPLATE.md +1 -1
  467. package/payload/templates/starter/app/app.js +12 -8
  468. package/payload/templates/starter/app/settings.js +14 -11
  469. package/payload/templates/starter/index.htm +3 -3
  470. package/payload/templates/starter/pages/about.js +1 -1
  471. package/payload/templates/starter/pages/home.js +2 -2
  472. package/payload/templates/starter/pages/product.js +1 -1
  473. package/payload/templates/starter/pages/products.js +5 -5
  474. package/payload/templates/starter/pages/settings.js +1 -1
  475. package/payload/templates/starter/pages/tasks.js +8 -8
  476. package/payload/templates/starter/pages/website.js +1 -1
  477. package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +0 -13
  478. package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +0 -9
  479. package/payload/starter/_basic/comp/chart-box.js +0 -868
  480. package/payload/starter/_basic/comp/email-input-b.js +0 -57
  481. package/payload/starter/_basic/comp/input-b.js +0 -759
  482. package/payload/starter/_basic/comp/password-input-b.js +0 -164
  483. package/payload/starter/_basic/comp/search-input-v2.js +0 -427
  484. package/payload/starter/_basic/comp/textarea-b.js +0 -184
  485. package/payload/starter/_basic/comp/url-input-b.js +0 -145
  486. package/payload/starter/_basic/examples/badgeV2.htm +0 -68
  487. package/payload/starter/_basic/examples/chart-box.htm +0 -287
  488. package/payload/starter/_basic/examples/check-box-1.htm +0 -220
  489. package/payload/starter/_basic/examples/currency-input-b.htm +0 -71
  490. package/payload/starter/_basic/examples/email-input-b.htm +0 -67
  491. package/payload/starter/_basic/examples/input-b-ex1.htm +0 -132
  492. package/payload/starter/_basic/examples/input-b-ex2.htm +0 -136
  493. package/payload/starter/_basic/examples/input-b-ex3-style.htm +0 -113
  494. package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +0 -112
  495. package/payload/starter/_basic/examples/input-b-ex6-dark.htm +0 -108
  496. package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +0 -153
  497. package/payload/starter/_basic/examples/number-input-b.htm +0 -68
  498. package/payload/starter/_basic/examples/password-input-b.htm +0 -70
  499. package/payload/starter/_basic/examples/phone-input-b-select-country.htm +0 -298
  500. package/payload/starter/_basic/examples/phone-input-b.htm +0 -72
  501. package/payload/starter/_basic/examples/radio-button-1.htm +0 -264
  502. package/payload/starter/_basic/examples/search-input-v2-ozden.htm +0 -128
  503. package/payload/starter/_basic/examples/search-input-v2.htm +0 -65
  504. package/payload/starter/_basic/examples/select-color.htm +0 -215
  505. package/payload/starter/_basic/examples/select-date.htm +0 -244
  506. package/payload/starter/_basic/examples/select-file.htm +0 -268
  507. package/payload/starter/_basic/examples/select-time.htm +0 -249
  508. package/payload/starter/_basic/examples/smart-button-2.htm +0 -220
  509. package/payload/starter/_basic/examples/textarea-b.htm +0 -76
  510. package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +0 -221
  511. package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +0 -221
  512. package/payload/starter/_basic/examples/url-input-b.htm +0 -85
  513. package/payload/starter/_basic/min/badge-v2.min.js +0 -2
  514. package/payload/starter/_basic/min/chart-box.min.js +0 -2
  515. package/payload/starter/_basic/min/currency-input-b.min.js +0 -2
  516. package/payload/starter/_basic/min/email-input-b.min.js +0 -2
  517. package/payload/starter/_basic/min/input-b.min.js +0 -2
  518. package/payload/starter/_basic/min/login-page-v2.min.js +0 -2
  519. package/payload/starter/_basic/min/number-input-b.min.js +0 -2
  520. package/payload/starter/_basic/min/password-input-b.min.js +0 -2
  521. package/payload/starter/_basic/min/phone-input-b.min.js +0 -2
  522. package/payload/starter/_basic/min/search-input-v2.min.js +0 -2
  523. package/payload/starter/_basic/min/select-color.min.js +0 -2
  524. package/payload/starter/_basic/min/select-date.min.js +0 -2
  525. package/payload/starter/_basic/min/select-file.min.js +0 -2
  526. package/payload/starter/_basic/min/select-time.min.js +0 -2
  527. package/payload/starter/_basic/min/textarea-b.min.js +0 -2
  528. package/payload/starter/_basic/min/url-input-b.min.js +0 -2
  529. package/payload/templates/panel/common/bridge.min.js +0 -0
  530. package/payload/templates/panel/common/full-view.min.js +0 -1
  531. package/payload/templates/panel/common/main-view.min.js +0 -1
  532. package/payload/templates/panel/common/module-page.min.js +0 -1
  533. package/payload/templates/panel/common/right-view.min.js +0 -1
  534. package/payload/templates/panel/common/start-page.min.js +0 -1
  535. package/payload/templates/panel/common/top-bar-v25-07-29-1.js +0 -330
  536. package/payload/templates/panel/common/top-bar-v25-07-29-2.js +0 -265
  537. package/payload/templates/panel/common/top-bar.min.js +0 -1
  538. package/payload/templates/panel/common/ui-standards.min.js +0 -1
  539. package/payload/templates/panel/managers/database.min.js +0 -1
  540. package/payload/templates/panel/managers/login.min.js +0 -1
  541. package/payload/templates/panel/pages/_page-template.min.js +0 -1
  542. package/payload/templates/panel/pages/contents.min.js +0 -1
  543. package/payload/templates/panel/pages/edit-user.min.js +0 -1
  544. package/payload/templates/panel/pages/edit-users-table.min.js +0 -1
  545. package/payload/templates/panel/pages/home.min.js +0 -1
  546. package/payload/templates/panel/pages/notifications.min.js +0 -1
  547. package/payload/templates/panel/pages/reports.min.js +0 -1
  548. package/payload/templates/panel/pages/settings.min.js +0 -1
  549. package/payload/templates/panel/pages/user-actions.min.js +0 -2
  550. package/payload/templates/panel/pages/users.min.js +0 -1
  551. /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn.png +0 -0
  552. /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn2.png +0 -0
  553. /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn.png +0 -0
  554. /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn2.png +0 -0
  555. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear-round.svg +0 -0
  556. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear.svg +0 -0
  557. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.png +0 -0
  558. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.svg +0 -0
  559. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/search.svg +0 -0
@@ -5,21 +5,34 @@
5
5
  ItemList - v26.11
6
6
 
7
7
  UI COMPONENT TEMPLATE
8
+ - NEW PROJECTS: use styleName "ozden" on a light page (the default: rows that are white with a thin line above
9
+ and under them under the mouse; its search box the ozden SearchInput in white) and "ozdenDark" on a dark page (_basic/examples/item-list.htm), unless the user asks for
10
+ another look.
8
11
  - A list of items: an icon, a title and a description on every row, or your own row (createItemView).
9
- The new version of comp-m1/item-list.js (ItemList.create / setItemCreationFunction).
10
12
  - Layouts: "vertical" (a list), "horizontal" (one row of tiles: categories, cards) and "grid" (tiles that
11
- wrap: files, icons, pictures). setLayout() changes it later.
13
+ wrap: files, icons, pictures). setLayout() changes it later. style.tile.fitRow: 1: the tiles of a grid share the
14
+ whole row (as many as fit at tile.width, then wider), so no empty end is left before the scroll bar.
12
15
  - Selection: "single", "multiple" or "none". The selected keys: getSelectedKeys(), the items: getSelected().
16
+ style.selected.canSelectAgain: 0 (ozden, ozdenDark; light and dark: 1): in a single list the selected row can not
17
+ be chosen again: a click, Enter or Space does nothing (no onItemClick), no look under the mouse, no hand cursor.
18
+ The keys can still go to it (its focus ring; a screen reader reads it as selected).
13
19
  onChange(self, selectedItems) is NOT called at create time, by setItems() or with silent: 1.
14
- - Search box: showSearch: 1 puts a SearchInput (comp/search-input-v2.js, load it first) over the list;
20
+ - Search box: showSearch: 1 puts a SearchInput (comp/search-input.js, load it first) over the list;
15
21
  its look is style.search, more params in searchParams (Ex: the icon paths for your page). box.searchInput.
16
- - Search: search(text) shows only the matching items (title, desc and searchText; Turkish letters are
22
+ - Search: search(text) shows only the matching items (text, description and searchText; Turkish letters are
17
23
  matched without their marks: "isik" finds "Işık"). It returns the count of the shown items.
18
- - Keyboard: the arrow keys move the focus (Up / Down in a list, Left / Right in a row, all four in a grid),
19
- Home / End, Enter or Space selects. Only one row is in the Tab order.
20
- - Items: strings or objects { key, title, desc, iconFile, searchText, disabled }. Any other keys stay on the
21
- item for your createItemView. An item without a key gets its index as its key.
22
- - Sections: an item { type: "section", title: "VIEWS" } is a title row between the items (style.section). It is
24
+ - Keyboard (a listbox): the arrow keys move the focus (Up / Down in a list, Left / Right in a row, all four in a
25
+ grid), Home / End, PageUp / PageDown (a page of rows), letters (type-ahead: the next item whose text starts with
26
+ them). Enter or Space is a click (onItemClick and the selection). Only one row is in the Tab order: the focused
27
+ one, or the first selected one, or the first one. multiple: Shift + a move, Shift + Space and Shift + click select
28
+ the rows from the last clicked one; Ctrl / Cmd + A selects all the shown items (again: none). With a search box:
29
+ the arrow down goes from it into the list, the arrow up from the first line back to it, Escape clears it.
30
+ - A combobox whose keyboard stays in its field (SelectBox) shows its active row with setActiveKey(key): the look of
31
+ the mouse (style.hover), also on a selected row, and only on that row. null: none.
32
+ - Items: strings or objects { key, text, description, iconFile, searchText, enabled }. Any other keys stay on the
33
+ item for your createItemView. An item without a key gets its index as its key. style.title and style.desc are the
34
+ look of its text and its description.
35
+ - Sections: an item { type: "section", text: "VIEWS" } is a title row between the items (style.section). It is
23
36
  never selected, focused, hovered or clicked, the arrow keys skip it, and getSelected(), search() and the empty
24
37
  text count only the items. It is shown while at least one item under it (until the next section) is shown: in
25
38
  a search, only the sections with a match (a section without items is hidden too).
@@ -34,8 +47,11 @@ UI COMPONENT TEMPLATE
34
47
  setAnimated(0/1).
35
48
  - height: "auto" -> The list grows with its rows (no scrolling). Otherwise it scrolls with basic/scroll-bar.js
36
49
  (if it is loaded).
37
- - Style packages: "classic" (default: the rows of the comp-m1 SelectItem list, 02-comp-m1-samples/select-item.htm,
38
- and the tiles of javascript-mobile-app-template), "modern", "dark".
50
+ - Style packages: "ozden" (default; the name "classic" still works), "ozdenDark" (the same on a dark page), "gallery" and
51
+ "galleryDark" (pictures: layout "grid", a big photo on every tile with its title under it),
52
+ "light" and "dark" (the light and dark look of the kit: a white box with one thin line, flat 56 px rows, the
53
+ selected one in a tint of the accent with a full mark: _designs/item-list.htm), "minimal" and "minimalDark"
54
+ (lines, 28 px rows: _designs/minimal-theme.htm).
39
55
  Select with styleName. (ItemList.styles)
40
56
 
41
57
  USAGE:
@@ -43,36 +59,38 @@ const list = ItemList({
43
59
  width: 360,
44
60
  height: 400,
45
61
  items: [
46
- { key: "broccoli", title: "Broccoli", desc: "Vegetable", iconFile: "assets/fruids/brokoli.png" },
47
- { key: "strawberry", title: "Strawberry", desc: "Fruit", iconFile: "assets/fruids/cilek.png" },
62
+ { key: "broccoli", text: "Broccoli", description: "Vegetable", iconFile: "assets/fruids/brokoli.png" },
63
+ { key: "strawberry", text: "Strawberry", description: "Fruit", iconFile: "assets/fruids/cilek.png" },
48
64
  ],
49
65
  onChange: function (self, selectedItems) { println(self.getSelectedKeys()); },
50
66
  });
51
67
  list.search("fruit"); // 1 (the count of the shown items)
52
68
  list.setSelected(["broccoli"], 1); // silent: onChange is not called
53
- list.addItem({ key: "tomato", title: "Tomato", desc: "Vegetable" });
54
- list.updateItem("tomato", { desc: "Fruit, really" });
69
+ list.addItem({ key: "tomato", text: "Tomato", description: "Vegetable" });
70
+ list.updateItem("tomato", { description: "Fruit, really" });
55
71
  list.setLayout("grid");
56
- ItemList({ selection: "multiple", styleName: "modern" });
72
+ ItemList({ selection: "multiple", styleName: "light" });
57
73
  ItemList({ layout: "horizontal", height: 200, styleName: "dark" });
58
- ItemList({ showSearch: 1, searchParams: { placeholderText: "Ara" } });
74
+ ItemList({ showSearch: 1, searchParams: { placeholder: "Ara" } });
59
75
  ItemList({
60
76
  style: { row: { height: "auto" } },
61
77
  createItemView: function (item, row, self) { // Objects created here go into the row.
62
- Label({ plainText: item.title, fontSize: 18 });
78
+ Label({ plainText: item.text, fontSize: 18 });
63
79
  },
64
80
  });
65
- ItemList({ items: [{ type: "section", title: "FRUITS" }, "Apple", "Banana", { type: "section", title: "VEGETABLES" }, "Carrot"] });
81
+ ItemList({ items: [{ type: "section", text: "FRUITS" }, "Apple", "Banana", { type: "section", text: "VEGETABLES" }, "Carrot"] });
66
82
  ItemList({ style: { hover: {} } }); // No look under the mouse
67
83
  ItemList({ selection: "none", style: { pressed: { color: Black(0.2) }, row: { motion: "background-color 0.3s" } } });
68
84
  const animatedList = ItemList({ animated: 1, items: ["A", "B", "C"] });
69
85
  animatedList.removeItem("0"); // "A" fades out, then "B" and "C" move up
70
86
 
71
- Started Date: 14 March 2022 (comp-m1), October 2026 (comp-m4)
72
- Developer: Bugra Ozden
73
- Email: bugra.ozden@gmail.com
87
+ Started Date: October 2026
74
88
  Webpage: https://bug7a.github.io/js-components/
75
89
 
90
+ Copyright 2020-2026 Bugra Ozden <bugra.ozden@gmail.com> (https://bug7a.github.io/)
91
+ Licensed under the Apache License, Version 2.0
92
+ SPDX-License-Identifier: Apache-2.0
93
+
76
94
  */
77
95
 
78
96
  "use strict";
@@ -82,7 +100,7 @@ const ItemListDefaults = {
82
100
  key: "0", // Your name for this object: read it in a callback (self.key)
83
101
  width: 600,
84
102
  height: 400, // "auto": grows with the rows (no scrolling)
85
- items: [], // Strings or { key, title, desc, iconFile, searchText, disabled }. A title row: { type: "section", title: "VIEWS" }
103
+ items: [], // Strings or { key, text, description, iconFile, searchText, enabled }. A title row: { type: "section", text: "VIEWS" }
86
104
  layout: "vertical", // "vertical", "horizontal", "grid"
87
105
  selection: "single", // "single", "multiple", "none"
88
106
  selectedKeys: [], // The keys selected at create time
@@ -90,8 +108,8 @@ const ItemListDefaults = {
90
108
  createItemView: null, // function (item, row, self) { ... } Objects created here go into the row (instead of the icon and texts). Not called for a section.
91
109
  createSectionView: null, // function (item, row, self) { ... } Your own section row (instead of its title)
92
110
  animated: 0, // 1: addItem / removeItem move the rows (a new row fades in, a removed one fades out). setAnimated(0/1)
93
- showSearch: 0, // 1: a search box over the list (comp/search-input-v2.js SearchInput must be loaded)
94
- searchParams: {}, // More params of the SearchInput. Ex: { placeholderText: "Ara", searchIconFile: "_basic/comp/search-input-v2/search.svg" }
111
+ showSearch: 0, // 1: a search box over the list (comp/search-input.js SearchInput must be loaded)
112
+ searchParams: {}, // More params of the SearchInput. Ex: { placeholder: "Ara", searchIconFile: "_basic/comp/search-input/search.svg" }
95
113
  emptyText: "No items",
96
114
  noResultText: "No results",
97
115
  enabled: 1,
@@ -99,20 +117,20 @@ const ItemListDefaults = {
99
117
  ariaLabel: "List",
100
118
  onItemClick: function (self, item, index, event) { },
101
119
  onChange: function (self, selectedItems) { }, // Not at create time, not by setItems(), not with silent: 1
102
- styleName: "classic", // "classic", "modern", "dark" or a name added to ItemList.styles
103
- style: { // Classic style package (default): the rows of the comp-m1 SelectItem list, the tiles of javascript-mobile-app-template
120
+ styleName: "ozden", // "ozden", "ozdenDark", "light", "dark", "gallery", "galleryDark", "minimal", "minimalDark" or a name added to ItemList.styles
121
+ style: { // The ozden style package (default)
104
122
  box: {
105
- color: "transparent",
123
+ color: "whitesmoke", // WHY: A row is white under the mouse: on a white page a list with no color of its own shows nothing.
106
124
  border: 1,
107
125
  borderColor: "rgba(20, 20, 20, 0.45)",
108
- round: 8,
126
+ round: 6,
109
127
  padding: 0, // Around the rows of the vertical layout
110
128
  },
111
129
  list: {
112
130
  gap: 0, // Between the rows of the vertical layout
113
131
  },
114
- // A row of the vertical layout (the list of comp-m1 SelectItem, 02-comp-m1-samples/select-item.htm):
115
- // as wide as the list, white under the mouse, the selected one half transparent.
132
+ // A row of the vertical layout:
133
+ // as wide as the list, white under the mouse with a thin line above and under it, the selected one half transparent.
116
134
  row: {
117
135
  height: 80, // "auto": as high as its content (a createItemView)
118
136
  padding: [20, 12],
@@ -123,7 +141,8 @@ const ItemListDefaults = {
123
141
  round: 0,
124
142
  opacity: 1,
125
143
  boxShadow: "",
126
- motion: "background-color 0.2s",
144
+ lineColor: "", // A line at the top and at the bottom of the row (1 px, inside it: no row moves). "": none
145
+ motion: "background-color 0.2s, box-shadow 0.2s", // WHY: box-shadow: the lines come and go with the color.
127
146
  },
128
147
  // An item of the horizontal and grid layouts: the icon on top, the texts under it
129
148
  // (the category items of the home page of the template)
@@ -134,11 +153,13 @@ const ItemListDefaults = {
134
153
  gap: 15,
135
154
  spacing: 4, // Between the tiles
136
155
  listPadding: [12, 5], // Around the tiles
156
+ fitRow: 0, // 1 (layout "grid"): the tiles share a row: as many as fit at their width, then wider: no empty end
137
157
  iconSize: 70,
138
158
  frameSize: 90, // A circle behind the icon. 0: no circle
139
159
  frameColor: White(0.3),
140
160
  frameRound: 100,
141
161
  iconFilter: "grayscale(100%)", // "": none
162
+ iconFit: "", // How a picture fills its square: "cover" (a photo), "contain". "": as the Icon does
142
163
  iconMotion: "transform 0.3s",
143
164
  hover: {}, // The look under the mouse (the rows use style.hover)
144
165
  selectedColor: "white", // "": the color of style.selected (the rows)
@@ -147,7 +168,7 @@ const ItemListDefaults = {
147
168
  selectedIconFilter: "grayscale(30%)",
148
169
  selectedFontFamily: "opensans-bold", // "": the font does not change
149
170
  },
150
- // A section: an item { type: "section", title: "VIEWS" }, a title between the items
171
+ // A section: an item { type: "section", text: "VIEWS" }, a title between the items
151
172
  section: {
152
173
  height: "auto",
153
174
  padding: [20, 8],
@@ -156,30 +177,28 @@ const ItemListDefaults = {
156
177
  textColor: Black(0.4),
157
178
  },
158
179
  // A state: only the keys that change
159
- hover: { color: "white" }, // style: { hover: {} }: no look under the mouse
180
+ hover: { color: "white", lineColor: Black(0.2) }, // style: { hover: {} }: no look under the mouse.
160
181
  pressed: { color: null }, // A click, Enter or Space: this color at once, then it fades back (style.row.motion). null: none
161
- selected: { color: "transparent", opacity: 0.5 }, // WHY: transparent: a selected row does not get white under the mouse.
182
+ // WHY: a selected row does not get the white and its lines under the mouse.
183
+ // canSelectAgain 0 (single, as SelectBox ozden): it can not be
184
+ // chosen again: a click, Enter or Space does nothing (no onItemClick), no look under the mouse, no hand.
185
+ selected: { color: "transparent", lineColor: "", opacity: 0.5, canSelectAgain: 0 },
162
186
  disabled: { opacity: 0.4 },
163
187
  focus: { ringColor: "rgba(55, 56, 54, 0.5)" }, // The ring of the keyboard focus
164
188
  icon: { size: 50, round: 4, color: "transparent" },
165
189
  title: { fontSize: 20, textColor: "rgba(0, 0, 0, 0.8)", fontFamily: "", selectedTextColor: "" },
166
- desc: { fontSize: 14, textColor: "gray", marginTop: -4 }, // WHY: -4: the old title (top 25) and description (top 49) overlap a little.
190
+ desc: { fontSize: 14, textColor: "gray", marginTop: -4 }, // WHY -4: the title and the description overlap a little.
167
191
  check: { visible: 0, size: 22, color: "#373836", iconColor: "white", borderColor: Black(0.25) }, // A mark on the selected rows
168
192
  empty: { fontSize: 16, textColor: Black(0.4) },
169
- // The search box (showSearch: 1): the params of SearchInput. The old UISearchBox of the template, a little smaller.
193
+ // The search box (showSearch: 1): the params of SearchInput: its ozden package (its font and icon sizes, its
194
+ // icons, its bottom line), white, nearly square and without a border, 44 px high (ozdenDark takes it too).
170
195
  search: {
171
- height: 40,
196
+ styleName: "ozden", // A package of SearchInput.styles
197
+ height: 44,
172
198
  padding: [0, 0, 0, 0], // left, top, right, bottom: 0, as wide as the list
173
- fontSize: 18,
174
199
  color: "white",
175
- textColor: "rgba(0, 0, 0, 0.8)",
176
- placeholderColor: "",
177
- border: 0,
178
- borderColor: "rgba(0, 0, 0, 0.1)",
179
- borderBottomStyle: "2px solid rgba(0, 0, 0, 0.06)",
180
- round: 6,
181
- searchIconSize: 20,
182
- invertIconColor: 0,
200
+ border: 0, // WHY: the list has its own border: only the bottom line of the package
201
+ round: 2,
183
202
  },
184
203
  scrollBar: {
185
204
  bar_border: 0,
@@ -204,7 +223,7 @@ const ItemList = function (params = {}) {
204
223
  const givenHover = params.style && params.style.hover;
205
224
  const isHoverOff = !!givenHover && Object.keys(givenHover).length === 0;
206
225
 
207
- // Merge style package: params.style > ItemList.styles[styleName] > ItemListDefaults.style (classic)
226
+ // Merge style package: params.style > ItemList.styles[styleName] > ItemListDefaults.style (ozden)
208
227
  basic.applyStylePackage(params, ItemList.styles, ItemListDefaults);
209
228
 
210
229
  // Merge params:
@@ -225,10 +244,16 @@ const ItemList = function (params = {}) {
225
244
  let removedEntries = []; // animated: the removed items whose rows still fade out (they leave after the motion)
226
245
  let selectedKeys = []; // Strings, in the order they were selected
227
246
  let focusedKey = null;
247
+ let activeKey = null; // The active row of a combobox (setActiveKey)
248
+ let anchorKey = null; // multiple: a Shift range starts at this row (the last click, Enter or Space without Shift)
249
+ let rangeBaseKeys = []; // multiple: the selection at that time (a Shift range is added to it)
250
+ let typedText = ""; // Type-ahead: the letters typed one after the other
251
+ let cancelTypedText = null;
228
252
  let searchText = "";
229
253
  let wasAnimated = 0;
230
254
  const EMPTY_TEXT_TOP = 24; // The "No results" text under the top of the list
231
255
  const PRESS_HOLD_TIME = 50; // ms: the pressed color stays this long, then it fades back with the row motion
256
+ const TYPE_AHEAD_TIME = 600; // ms: the letters typed in this time make one word
232
257
 
233
258
  // animated: 1
234
259
  const MOTION_TIME = 0.25; // s
@@ -257,7 +282,7 @@ const ItemList = function (params = {}) {
257
282
  };
258
283
 
259
284
  const toItemObject = function (item) {
260
- if (typeof item === "string") return { title: item };
285
+ if (typeof item === "string") return { text: item };
261
286
  return item || {};
262
287
  };
263
288
 
@@ -285,7 +310,17 @@ const ItemList = function (params = {}) {
285
310
  };
286
311
 
287
312
  const isEntryEnabled = function (entry) {
288
- return box.enabled == 1 && !basic.isOn(entry.data.disabled);
313
+ return box.enabled == 1 && (entry.data.enabled === undefined || basic.isOn(entry.data.enabled));
314
+ };
315
+
316
+ // single, style.selected.canSelectAgain: 0 (ozden): the selected row can not be chosen again.
317
+ const isLockedEntry = function (entry) {
318
+ return box.selection === "single" && _s.selected.canSelectAgain == 0 && isSelected(entry);
319
+ };
320
+
321
+ // A row a click, Enter or Space chooses: enabled, not the locked selected one.
322
+ const isEntryChoosable = function (entry) {
323
+ return isEntryEnabled(entry) && !isLockedEntry(entry);
289
324
  };
290
325
 
291
326
  const getSelectedItems = function () {
@@ -314,7 +349,7 @@ const ItemList = function (params = {}) {
314
349
 
315
350
  const getSearchableText = function (entry) {
316
351
  const data = entry.data;
317
- return normalizeText([data.title, data.desc, data.searchText].join(" "));
352
+ return normalizeText([data.text, data.description, data.searchText].join(" "));
318
353
  };
319
354
 
320
355
  const isMatch = function (entry) {
@@ -343,7 +378,12 @@ const ItemList = function (params = {}) {
343
378
  const isTile = entry.row.isTile;
344
379
  const hoverLook = isTile ? _s.tile.hover : _s.hover;
345
380
  const selectedLook = isTile ? { color: _s.tile.selectedColor || _s.selected.color, borderColor: _s.selected.borderColor } : _s.selected;
346
- const look = Object.assign({}, _s.row, entry.isHover ? hoverLook : {}, isOn ? selectedLook : {});
381
+ // WHY: The active row takes the look of the mouse after the selection: the keyboard sees it on a selected row too.
382
+ // WHY: The locked selected row gets no look of the mouse (canSelectAgain: 0).
383
+ const isLocked = isLockedEntry(entry);
384
+ const activeLook = (entry.key === activeKey && !isLocked) ? hoverLook : {};
385
+ const mouseLook = (entry.isHover && !isLocked) ? hoverLook : {};
386
+ const look = Object.assign({}, _s.row, mouseLook, isOn ? selectedLook : {}, activeLook);
347
387
  if (look.opacity === undefined) look.opacity = 1;
348
388
  // WHY: In the look, not only in the click: a paint of the selection or of the mouse keeps the pressed color.
349
389
  if (entry.isPressed && _s.pressed.color) look.color = _s.pressed.color;
@@ -360,6 +400,8 @@ const ItemList = function (params = {}) {
360
400
 
361
401
  row.color = look.color;
362
402
  row.borderColor = look.borderColor;
403
+ paintLines(row, look.lineColor || "");
404
+ row.cursor = isEntryChoosable(entry) ? "pointer" : "default";
363
405
  row.css.opacity = String(isEntryEnabled(entry) ? look.opacity : _s.disabled.opacity);
364
406
  row.aria = { selected: isOn ? "true" : "false", disabled: isEntryEnabled(entry) ? "false" : "true" };
365
407
 
@@ -368,6 +410,20 @@ const ItemList = function (params = {}) {
368
410
  if (row.isTile) paintTile(row, isOn);
369
411
  };
370
412
 
413
+ // The lines at the top and at the bottom of a row (look.lineColor): inset shadows, so no row moves.
414
+ // WHY: Only when the lines change: the own shadow of a row (style.row.boxShadow, or one set by createItemView)
415
+ // stays under them, and a package without lines never touches it.
416
+ const paintLines = function (row, lineColor) {
417
+ const shownLineColor = row.shownLineColor || "";
418
+ if (lineColor === shownLineColor) return;
419
+ if (!shownLineColor) row.ownShadow = row.boxShadow;
420
+ row.shownLineColor = lineColor;
421
+ const shadows = [];
422
+ if (lineColor) shadows.push("inset 0 1px 0 " + lineColor, "inset 0 -1px 0 " + lineColor);
423
+ if (row.ownShadow) shadows.push(row.ownShadow);
424
+ row.boxShadow = shadows.join(", ");
425
+ };
426
+
371
427
  // The effects of a selected tile: the circle goes, the icon grows and gets its colors, the title is bold.
372
428
  const paintTile = function (row, isOn) {
373
429
  const tile = _s.tile;
@@ -391,11 +447,18 @@ const ItemList = function (params = {}) {
391
447
  entries.forEach(paintRow);
392
448
  };
393
449
 
394
- // Only one row is in the Tab order: the focused one (or the first shown one).
395
- const refreshTabOrder = function () {
396
- const shown = getShownEntries();
450
+ // The row of the Tab order: the focused one, or else the first selected shown one, or else the first shown one.
451
+ // WHY: A listbox is entered at its selection, not always at its top.
452
+ const getTabEntry = function () {
397
453
  const focused = findEntry(focusedKey);
398
- const tabEntry = (focused && focused.isShown) ? focused : shown[0];
454
+ if (focused && focused.isShown) return focused;
455
+ const shown = getShownEntries();
456
+ return shown.find(isSelected) || shown[0] || null;
457
+ };
458
+
459
+ // Only one row is in the Tab order (getTabEntry).
460
+ const refreshTabOrder = function () {
461
+ const tabEntry = getTabEntry();
399
462
  entries.forEach(function (e) {
400
463
  // WHY: A section gets no tabIndex: even a click does not focus it.
401
464
  if (!e.row || e.isSection) return;
@@ -411,12 +474,17 @@ const ItemList = function (params = {}) {
411
474
  return icon;
412
475
  };
413
476
 
477
+ const fitTileIcon = function (row) {
478
+ if (row.icon && _s.tile.iconFit) row.icon.imageFit = _s.tile.iconFit;
479
+ };
480
+
414
481
  // A tile icon may sit in a circle (style.tile.frameSize).
415
482
  const createTileIcon = function (row, entry) {
416
483
  const tile = _s.tile;
417
484
  if (!entry.data.iconFile) return;
418
485
  if (!(tile.frameSize > 0)) {
419
486
  row.icon = createIcon(entry, tile.iconSize);
487
+ fitTileIcon(row);
420
488
  return;
421
489
  }
422
490
  // GROUP: The circle behind the icon
@@ -426,6 +494,7 @@ const ItemList = function (params = {}) {
426
494
  row.iconFrame.clipContent = 0; // WHY: The selected icon grows out of the circle.
427
495
  row.iconFrame.setMotion("background-color 0.3s");
428
496
  row.icon = createIcon(entry, tile.iconSize);
497
+ fitTileIcon(row);
429
498
  endGroup();
430
499
  };
431
500
 
@@ -434,11 +503,11 @@ const ItemList = function (params = {}) {
434
503
  row.texts = VGroup({ width: isTile ? "100%" : "auto", height: "auto", align: isTile ? "center top" : "left center", gap: 0 });
435
504
  row.texts.css = { flex: isTile ? "" : "1 1 0", minWidth: "0", alignItems: "stretch" };
436
505
 
437
- row.lblTitle = Label({ plainText: entry.data.title || "", width: "100%", fontSize: _s.title.fontSize, ellipsis: 1 });
506
+ row.lblTitle = Label({ plainText: entry.data.text || "", width: "100%", fontSize: _s.title.fontSize, ellipsis: 1 });
438
507
  if (_s.title.fontFamily) row.lblTitle.fontFamily = _s.title.fontFamily;
439
508
 
440
- if (entry.data.desc) {
441
- row.lblDesc = Label({ plainText: entry.data.desc, width: "100%", fontSize: _s.desc.fontSize, textColor: _s.desc.textColor, ellipsis: 1 });
509
+ if (entry.data.description) {
510
+ row.lblDesc = Label({ plainText: entry.data.description, width: "100%", fontSize: _s.desc.fontSize, textColor: _s.desc.textColor, ellipsis: 1 });
442
511
  row.lblDesc.css.marginTop = (_s.desc.marginTop || 0) + "px";
443
512
  }
444
513
 
@@ -475,9 +544,15 @@ const ItemList = function (params = {}) {
475
544
  createTexts(row, entry, isTile);
476
545
  };
477
546
 
547
+ const isFitRowGrid = function () {
548
+ return box.layout === "grid" && basic.isOn(_s.tile.fitRow);
549
+ };
550
+
478
551
  const createRowBox = function (isTile) {
479
552
  if (isTile) {
480
- return VGroup({ width: _s.tile.width, height: _s.tile.height, align: "center top", gap: _s.tile.gap, padding: _s.tile.padding });
553
+ // WHY "auto": a cell of the grid of fitRow gives the width (createListGroup)
554
+ const width = isFitRowGrid() ? "auto" : _s.tile.width;
555
+ return VGroup({ width: width, height: _s.tile.height, align: "center top", gap: _s.tile.gap, padding: _s.tile.padding });
481
556
  }
482
557
  return HGroup({ width: "100%", height: _s.row.height, align: "left center", gap: _s.row.gap, padding: _s.row.padding });
483
558
  };
@@ -493,13 +568,12 @@ const ItemList = function (params = {}) {
493
568
  row.shrink = 0;
494
569
  row.round = _s.row.round;
495
570
  row.border = _s.row.border;
496
- row.cursor = "pointer";
497
571
  row.clickable = 1;
498
572
  row.clipContent = 0; // WHY: The focus ring is drawn on the edge of the row.
499
573
  if (_s.row.boxShadow) row.boxShadow = _s.row.boxShadow;
500
574
  setStartMotion(row, entry);
501
575
  row.role = "option";
502
- row.aria = { label: entry.data.title || entry.key };
576
+ row.aria = { label: entry.data.text || entry.key };
503
577
  row.setFocusRing(_s.focus.ringColor);
504
578
 
505
579
  createRowContent(row, entry, isTile);
@@ -526,7 +600,7 @@ const ItemList = function (params = {}) {
526
600
  if (typeof box.createSectionView === "function") {
527
601
  box.createSectionView(entry.item, row, box);
528
602
  } else {
529
- row.lblTitle = Label({ plainText: entry.data.title || "", width: width, fontSize: section.fontSize, textColor: section.textColor, ellipsis: 1 });
603
+ row.lblTitle = Label({ plainText: entry.data.text || "", width: width, fontSize: section.fontSize, textColor: section.textColor, ellipsis: 1 });
530
604
  if (section.fontFamily) row.lblTitle.fontFamily = section.fontFamily;
531
605
  }
532
606
 
@@ -560,12 +634,8 @@ const ItemList = function (params = {}) {
560
634
  const row = entry.row;
561
635
  row.on("click", function (self, event) {
562
636
  // WHY: A removed row that still fades out is not clicked (a button made in it by createItemView).
563
- if (entry.isLeaving || !isEntryEnabled(entry)) return;
564
- flashRow(entry);
565
- focusedKey = entry.key;
566
- refreshTabOrder();
567
- box.onItemClick(box, entry.item, indexOf(entry), event);
568
- toggleEntry(entry, 0);
637
+ if (entry.isLeaving) return;
638
+ activateEntry(entry, event);
569
639
  });
570
640
  row.onHoverChange(function (self, isOver) {
571
641
  entry.isHover = (isOver && isEntryEnabled(entry)) ? 1 : 0;
@@ -583,7 +653,10 @@ const ItemList = function (params = {}) {
583
653
  return group;
584
654
  }
585
655
  if (box.layout === "grid") {
586
- return HGroup({ width: "100%", height: "auto", align: "left top", gap: _s.tile.spacing, padding: _s.tile.listPadding, wrap: 1 });
656
+ const grid = HGroup({ width: "100%", height: "auto", align: "left top", gap: _s.tile.spacing, padding: _s.tile.listPadding, wrap: 1 });
657
+ // tile.fitRow: columns of tile.width at least that fill the row (the browser counts them at every width)
658
+ if (isFitRowGrid()) grid.css = { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(" + _s.tile.width + "px, 1fr))" };
659
+ return grid;
587
660
  }
588
661
  const group = VGroup({ width: "100%", height: "auto", align: "left top", gap: _s.list.gap, padding: _s.box.padding });
589
662
  group.css.alignItems = "stretch";
@@ -639,7 +712,11 @@ const ItemList = function (params = {}) {
639
712
  box.wrapper.css.boxSizing = "border-box";
640
713
  box.wrapper.clipContent = 0;
641
714
  box.wrapper.role = "listbox";
642
- box.wrapper.aria = { label: box.ariaLabel, multiselectable: (box.selection === "multiple") ? "true" : "false" };
715
+ box.wrapper.aria = {
716
+ label: box.ariaLabel,
717
+ multiselectable: (box.selection === "multiple") ? "true" : "false",
718
+ orientation: (box.layout === "horizontal") ? "horizontal" : null, // (the default of a listbox: vertical)
719
+ };
643
720
  entries.forEach(createRow);
644
721
  endGroup();
645
722
  });
@@ -863,10 +940,71 @@ const ItemList = function (params = {}) {
863
940
  const before = selectedKeys.join("\n");
864
941
  selectedKeys = keys;
865
942
  paintAll();
943
+ refreshTabOrder(); // WHY: The Tab order goes to the selection while no row was focused.
866
944
  if (silent || before === selectedKeys.join("\n")) return;
867
945
  box.onChange(box, getSelectedItems());
868
946
  };
869
947
 
948
+ // A click, Enter or Space on a row: the pressed flash, onItemClick and the selection. With Shift in a multiple
949
+ // list: the rows from the anchor to this one (selectRange).
950
+ // WHY: Enter and Space did not call onItemClick: a list without selection (a menu) could not be used with keys.
951
+ const activateEntry = function (entry, event) {
952
+ if (!isEntryChoosable(entry)) return;
953
+ flashRow(entry);
954
+ focusedKey = entry.key;
955
+ refreshTabOrder();
956
+ box.onItemClick(box, entry.item, indexOf(entry), event);
957
+ if (isRangeEvent(event)) {
958
+ selectRange(entry, entry);
959
+ return;
960
+ }
961
+ toggleEntry(entry, 0);
962
+ setAnchor(entry);
963
+ };
964
+
965
+ const isRangeEvent = function (event) {
966
+ return box.selection === "multiple" && !!event && event.shiftKey;
967
+ };
968
+
969
+ // multiple: a Shift range starts at this row and is added to the selection of this time.
970
+ const setAnchor = function (entry) {
971
+ anchorKey = entry.key;
972
+ rangeBaseKeys = selectedKeys.slice();
973
+ };
974
+
975
+ // WHY: A selection changed by code: the next Shift range must not bring its old keys back.
976
+ const forgetAnchor = function () {
977
+ anchorKey = null;
978
+ rangeBaseKeys = [];
979
+ };
980
+
981
+ // multiple: the enabled shown rows from the anchor to this one are selected, over the selection of the anchor
982
+ // time. A Shift move back makes the range shorter (the rows it leaves are not selected any more).
983
+ // startEntry: the anchor when there is none yet (the row the Shift move started from).
984
+ const selectRange = function (entry, startEntry) {
985
+ const shown = getShownEntries();
986
+ const anchor = findEntry(anchorKey);
987
+ if (!anchor || !anchor.isShown) setAnchor(startEntry);
988
+ const from = shown.indexOf(findEntry(anchorKey));
989
+ const to = shown.indexOf(entry);
990
+ const rangeKeys = shown.slice(Math.min(from, to), Math.max(from, to) + 1)
991
+ .filter(isEntryEnabled)
992
+ .map(function (e) { return e.key; });
993
+ const newKeys = rangeKeys.filter(function (key) { return !rangeBaseKeys.includes(key); });
994
+ setSelectedKeys(rangeBaseKeys.concat(newKeys), 0);
995
+ };
996
+
997
+ // multiple: Ctrl / Cmd + A selects every shown enabled item; when they are all selected, none of them.
998
+ // The hidden ones (a search) keep their selection.
999
+ const toggleAllShown = function (shown) {
1000
+ const keys = shown.filter(isEntryEnabled).map(function (e) { return e.key; });
1001
+ const isAllSelected = keys.every(function (key) { return selectedKeys.includes(key); });
1002
+ const otherKeys = selectedKeys.filter(function (key) { return !keys.includes(key); });
1003
+ const newKeys = keys.filter(function (key) { return !selectedKeys.includes(key); });
1004
+ setSelectedKeys(isAllSelected ? otherKeys : selectedKeys.concat(newKeys), 0);
1005
+ forgetAnchor();
1006
+ };
1007
+
870
1008
  // A click, Enter or Space on a row.
871
1009
  const toggleEntry = function (entry, silent) {
872
1010
  if (box.selection === "none" || entry.isSection) return;
@@ -986,34 +1124,118 @@ const ItemList = function (params = {}) {
986
1124
  return shown[Math.max(0, Math.min(shown.length - 1, position + step))];
987
1125
  };
988
1126
 
1127
+ // PageDown / PageUp: as many rows (in a grid: lines) as the list shows, less one. null: an "auto" height list
1128
+ // (it does not scroll in itself: the key scrolls the page).
1129
+ const getPageTarget = function (entry, shown, direction) {
1130
+ if (isAutoHeight) return null;
1131
+ const isHorizontal = (box.layout === "horizontal");
1132
+ const visibleSize = isHorizontal ? box.scrollBox.elem.clientWidth : box.scrollBox.elem.clientHeight;
1133
+ const rowSize = isHorizontal ? entry.row.elem.offsetWidth : entry.row.elem.offsetHeight;
1134
+ const count = Math.max(1, Math.floor(visibleSize / Math.max(1, rowSize)) - 1);
1135
+ if (box.layout === "grid") {
1136
+ let target = entry;
1137
+ for (let i = 0; i < count; i++) target = getGridNeighbor(target, shown, direction);
1138
+ return target;
1139
+ }
1140
+ const position = shown.indexOf(entry) + direction * count;
1141
+ return shown[Math.max(0, Math.min(shown.length - 1, position))];
1142
+ };
1143
+
1144
+ // The row a key moves the focus to: an arrow, Home / End, PageUp / PageDown. null: the key does not move it.
1145
+ const getMoveTarget = function (entry, key, shown) {
1146
+ if (key === "Home") return shown[0];
1147
+ if (key === "End") return shown[shown.length - 1];
1148
+ if (key === "PageDown") return getPageTarget(entry, shown, 1);
1149
+ if (key === "PageUp") return getPageTarget(entry, shown, -1);
1150
+ return getArrowTarget(entry, key, shown);
1151
+ };
1152
+
1153
+ // WHY: The arrow up from the first line of the list goes back to the search box over it.
1154
+ const isOnFirstLine = function (entry, shown) {
1155
+ if (box.layout === "horizontal") return true;
1156
+ return entry.row.elem.offsetTop === shown[0].row.elem.offsetTop;
1157
+ };
1158
+
1159
+ const isSelectAllKey = function (event) {
1160
+ const isCommand = event.ctrlKey || event.metaKey;
1161
+ return box.selection === "multiple" && isCommand && event.key.toLowerCase() === "a";
1162
+ };
1163
+
1164
+ // A letter of a word (type-ahead): not a key with Ctrl, Cmd or Alt.
1165
+ const isTypedLetter = function (event) {
1166
+ return event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
1167
+ };
1168
+
1169
+ // Type-ahead: the letters typed one after the other move the focus to the next item whose text starts with them
1170
+ // (Turkish letters without their marks). The same letter again goes on to the next item with that letter.
1171
+ const typeAhead = function (entry, letter, shown) {
1172
+ if (cancelTypedText) cancelTypedText();
1173
+ typedText += normalizeText(letter);
1174
+ cancelTypedText = box.after(TYPE_AHEAD_TIME, function () {
1175
+ typedText = "";
1176
+ cancelTypedText = null;
1177
+ });
1178
+ const isOneLetter = typedText.split("").every(function (c) { return c === typedText[0]; });
1179
+ const word = isOneLetter ? typedText[0] : typedText;
1180
+ // WHY: One letter starts after the focused row (the same letter goes on); a word may stay on it.
1181
+ const start = shown.indexOf(entry) + (isOneLetter ? 1 : 0);
1182
+ const ordered = shown.slice(start).concat(shown.slice(0, start));
1183
+ const target = ordered.find(function (e) { return normalizeText(e.data.text).startsWith(word); });
1184
+ if (target) focusEntry(target);
1185
+ };
1186
+
989
1187
  const onRowKeyDown = function (entry, event) {
1188
+ // WHY: the keys of a field inside the row (createItemView) are its own: a space could not be typed in it
1189
+ if (event.target !== entry.row.elem) return;
990
1190
  if (box.enabled != 1 || entry.isLeaving) return;
991
1191
  const shown = getShownEntries();
992
1192
 
993
- if (event.key === "Enter" || event.key === " ") {
1193
+ if (isSelectAllKey(event)) {
1194
+ event.preventDefault();
1195
+ toggleAllShown(shown);
1196
+ return;
1197
+ }
1198
+ // WHY: A space while a word is typed is a letter of the word (type-ahead).
1199
+ const isSpace = (event.key === " " && typedText === "");
1200
+ if (event.key === "Enter" || isSpace) {
994
1201
  event.preventDefault();
995
- if (!isEntryEnabled(entry)) return;
996
- flashRow(entry);
997
- toggleEntry(entry, 0);
1202
+ // WHY: A key held down repeats: it would open an item again and again, or turn its selection on and off.
1203
+ if (event.repeat) return;
1204
+ activateEntry(entry, event);
998
1205
  return;
999
1206
  }
1000
- if (event.key === "Home" || event.key === "End") {
1207
+ if (event.key === "ArrowUp" && box.searchInput && isOnFirstLine(entry, shown)) {
1001
1208
  event.preventDefault();
1002
- focusEntry(event.key === "Home" ? shown[0] : shown[shown.length - 1]);
1209
+ box.searchInput.focus();
1003
1210
  return;
1004
1211
  }
1212
+ const target = getMoveTarget(entry, event.key, shown);
1213
+ if (target) {
1214
+ event.preventDefault();
1215
+ focusEntry(target);
1216
+ if (isRangeEvent(event)) selectRange(target, entry);
1217
+ return;
1218
+ }
1219
+ if (isTypedLetter(event)) {
1220
+ event.preventDefault();
1221
+ typeAhead(entry, event.key, shown);
1222
+ }
1223
+ };
1005
1224
 
1006
- const target = getArrowTarget(entry, event.key, shown);
1007
- if (!target) return;
1225
+ // The arrow down in the search box goes into the list: to its row of the Tab order (getTabEntry).
1226
+ const onSearchKeyDown = function (self, event) {
1227
+ if (event.key !== "ArrowDown") return;
1228
+ const tabEntry = getTabEntry();
1229
+ if (!tabEntry) return;
1008
1230
  event.preventDefault();
1009
- focusEntry(target);
1231
+ focusEntry(tabEntry);
1010
1232
  };
1011
1233
 
1012
1234
  // The search box over the list (showSearch: 1). Returns its height with its padding (0: no search box).
1013
1235
  const createSearch = function () {
1014
1236
  if (box.showSearch != 1) return 0;
1015
1237
  if (typeof SearchInput === "undefined") {
1016
- console.warn("ItemList: showSearch needs comp/search-input-v2.js (SearchInput).");
1238
+ console.warn("ItemList: showSearch needs comp/search-input.js (SearchInput).");
1017
1239
  return 0;
1018
1240
  }
1019
1241
  const search = _s.search;
@@ -1022,12 +1244,14 @@ const ItemList = function (params = {}) {
1022
1244
  // GROUP: Search area
1023
1245
  box.searchArea = HGroup({ width: "100%", height: search.height + padding[1] + padding[3], align: "left top", padding: padding });
1024
1246
  if (isAutoHeight) box.searchArea.position = "relative";
1025
- const searchParams = Object.assign({}, search, box.searchParams);
1247
+ // WHY clearOnEscape: Escape clears the search (as the clear icon); searchParams can turn it off.
1248
+ const searchParams = Object.assign({ clearOnEscape: 1 }, search, box.searchParams);
1026
1249
  delete searchParams.padding;
1027
1250
  searchParams.width = "100%";
1028
1251
  searchParams.position = "relative";
1029
- searchParams.onSearch = function (text) { box.search(text); };
1252
+ searchParams.onChange = function (self) { box.search(self.getSearchText()); };
1030
1253
  box.searchInput = SearchInput(searchParams);
1254
+ box.searchInput.txtSearch.on("keydown", onSearchKeyDown);
1031
1255
  endGroup();
1032
1256
 
1033
1257
  return search.height + padding[1] + padding[3];
@@ -1037,8 +1261,8 @@ const ItemList = function (params = {}) {
1037
1261
  // WHY: Only when it is another text: the box gives a lower case text to search(); it must not change what is typed.
1038
1262
  const syncSearchInput = function (text) {
1039
1263
  if (!box.searchInput) return;
1040
- if (normalizeText(box.searchInput.getText()).trim() === normalizeText(text).trim()) return;
1041
- box.searchInput.setText(String(text || ""));
1264
+ if (normalizeText(box.searchInput.value).trim() === normalizeText(text).trim()) return;
1265
+ box.searchInput.setValue(String(text || ""), 1);
1042
1266
  };
1043
1267
 
1044
1268
  // *** PUBLIC FUNCTIONS:
@@ -1047,9 +1271,10 @@ const ItemList = function (params = {}) {
1047
1271
  entries = (Array.isArray(items) ? items : []).map(toEntry);
1048
1272
  selectedKeys = selectedKeys.filter(isSelectableKey);
1049
1273
  if (!findEntry(focusedKey)) focusedKey = null;
1274
+ forgetAnchor();
1050
1275
  createRows();
1051
1276
  };
1052
- // USAGE: list.setItems([{ key: "a", title: "A" }, "B"]) // onChange is not called. Selected keys that are still there stay selected.
1277
+ // USAGE: list.setItems([{ key: "a", text: "A" }, "B"]) // onChange is not called. Selected keys that are still there stay selected.
1053
1278
 
1054
1279
  box.getItems = function () {
1055
1280
  return entries.map(function (e) { return e.item; });
@@ -1092,7 +1317,7 @@ const ItemList = function (params = {}) {
1092
1317
  applySearch(isMotionOn());
1093
1318
  });
1094
1319
  };
1095
- // USAGE: list.addItem({ key: "x", title: "X" }) or list.addItem({ key: "y", title: "Y" }, 0)
1320
+ // USAGE: list.addItem({ key: "x", text: "X" }) or list.addItem({ key: "y", text: "Y" }, 0)
1096
1321
 
1097
1322
  // silent: 1 -> onChange is not called (when the removed item was selected). Returns the removed item.
1098
1323
  // animated: 1 -> its row fades out, then it leaves and the rows under it move up. (The data changes at once.)
@@ -1126,7 +1351,7 @@ const ItemList = function (params = {}) {
1126
1351
  oldRow.remove();
1127
1352
  applySearch();
1128
1353
  };
1129
- // USAGE: list.updateItem("tomato", { desc: "Fruit", iconFile: "tomato.png" })
1354
+ // USAGE: list.updateItem("tomato", { description: "Fruit", iconFile: "tomato.png" })
1130
1355
 
1131
1356
  box.getSelectedKeys = function () {
1132
1357
  return selectedKeys.slice();
@@ -1140,6 +1365,7 @@ const ItemList = function (params = {}) {
1140
1365
  // silent: 1 -> onChange is not called.
1141
1366
  box.setSelected = function (keys, silent = 0) {
1142
1367
  setSelectedKeys(cleanKeys(keys), silent);
1368
+ forgetAnchor();
1143
1369
  scrollToFirstSelected();
1144
1370
  };
1145
1371
  // USAGE: list.setSelected("broccoli") or list.setSelected(["a", "b"], 1)
@@ -1148,15 +1374,18 @@ const ItemList = function (params = {}) {
1148
1374
  const entry = findEntry(key);
1149
1375
  if (!entry || entry.isSection || isSelected(entry)) return;
1150
1376
  toggleEntry(entry, silent);
1377
+ forgetAnchor();
1151
1378
  if (box.scrollToSelected == 1) scrollRowIntoView(entry);
1152
1379
  };
1153
1380
 
1154
1381
  box.unselect = function (key, silent = 0) {
1155
1382
  setSelectedKeys(selectedKeys.filter(function (k) { return k !== String(key); }), silent);
1383
+ forgetAnchor();
1156
1384
  };
1157
1385
 
1158
1386
  box.clearSelection = function (silent = 0) {
1159
1387
  setSelectedKeys([], silent);
1388
+ forgetAnchor();
1160
1389
  };
1161
1390
 
1162
1391
  // Shows only the matching items (and the sections over them). Returns the count of the shown items. "": all of them.
@@ -1166,7 +1395,7 @@ const ItemList = function (params = {}) {
1166
1395
  applySearch();
1167
1396
  return getShownEntries().length;
1168
1397
  };
1169
- // USAGE: searchInput.onSearch = function (text) { list.search(text); };
1398
+ // USAGE: searchInput.onChange = function (self) { list.search(self.getSearchText()); };
1170
1399
 
1171
1400
  box.setLayout = function (layout) {
1172
1401
  box.layout = normalizeLayout(layout);
@@ -1178,6 +1407,7 @@ const ItemList = function (params = {}) {
1178
1407
  box.setSelection = function (selection) {
1179
1408
  box.selection = selection;
1180
1409
  selectedKeys = cleanKeys(selectedKeys);
1410
+ forgetAnchor();
1181
1411
  createRows(); // WHY: The check marks are made (or not) with the rows.
1182
1412
  };
1183
1413
  // USAGE: list.setSelection("multiple")
@@ -1214,6 +1444,22 @@ const ItemList = function (params = {}) {
1214
1444
  refreshEmptyText();
1215
1445
  };
1216
1446
 
1447
+ // The active row of a combobox (SelectBox: the row of its arrow keys) gets the look of the mouse (style.hover),
1448
+ // also when it is selected. It is then the only row with that look. null: none.
1449
+ // WHY: The keyboard stays in the field of the combobox: the list does not get the focus, it only shows the row.
1450
+ // The mouse makes its row active itself (SelectBox: mousemove), so the row under the mouse loses its look
1451
+ // when the arrow keys move the active row: two rows were white.
1452
+ box.setActiveKey = function (key) {
1453
+ const oldEntries = entries.filter(function (e) { return e.isHover || e.key === activeKey; });
1454
+ activeKey = (key === null || key === undefined) ? null : String(key);
1455
+ oldEntries.forEach(function (e) {
1456
+ e.isHover = 0;
1457
+ paintRow(e);
1458
+ });
1459
+ const entry = findEntry(activeKey);
1460
+ if (entry) paintRow(entry);
1461
+ };
1462
+
1217
1463
  // *** OBJECT VIEW:
1218
1464
 
1219
1465
  box.color = _s.box.color;
@@ -1270,40 +1516,52 @@ ItemList.getCheckSvg = function (color, size) {
1270
1516
  };
1271
1517
 
1272
1518
  // *** STYLE PACKAGES:
1273
- // USAGE: ItemList({ styleName: "modern" })
1519
+ // USAGE: ItemList({ styleName: "light" })
1274
1520
  // USAGE: ItemList({ styleName: "dark", style: { row: { round: 4 } } }) // Change only some keys.
1275
1521
  // USAGE: ItemList({ style: ItemList.styles.dark }) // The same as styleName: "dark". (The package is copied, never changed.)
1276
- // NOTE: A new package needs only the keys that differ from the default (classic) style.
1522
+ // NOTE: A new package needs only the keys that differ from the default (ozden) style.
1277
1523
  // USAGE: ItemList.styles.myStyle = { row: { color: "ivory" } };
1278
1524
  ItemList.styles = {
1279
1525
 
1280
- // The rows of the comp-m1 SelectItem list (white under the mouse, the selected one half transparent) and the
1281
- // tiles of javascript-mobile-app-template (a grey icon in a circle that grows when it is selected).
1526
+ // The rows: white under the mouse, the selected one half transparent. The tiles: a grey icon in a circle that
1527
+ // grows when it is selected.
1528
+ ozden: ItemListDefaults.style,
1529
+
1530
+ // WHY: The old name of ozden: a page written with styleName: "classic" gets the same look without a warning.
1282
1531
  classic: ItemListDefaults.style,
1283
1532
 
1284
- // Light cards with a thin border and a check mark on the selected rows.
1285
- modern: {
1286
- box: { padding: 8 },
1287
- list: { gap: 8 },
1288
- row: {
1289
- height: 64,
1290
- padding: [14, 10],
1291
- gap: 14,
1292
- color: "white",
1293
- border: 1,
1294
- borderColor: Black(0.08),
1295
- round: 12,
1296
- boxShadow: "0px 1px 2px rgba(0, 0, 0, 0.04)",
1297
- motion: "background-color 0.2s, border-color 0.2s",
1298
- },
1299
- // WHY: The effects of the classic tiles (a grey icon in a circle that grows) are turned off.
1533
+ // The dark theme of ozden: the same shapes on a dark page (#1A1A19). A row gets a lighter
1534
+ // gray with a thin light line above and under it under the mouse, the selected one is half transparent, the
1535
+ // search box is the ozdenDark SearchInput in the gray of the mouse.
1536
+ ozdenDark: {
1537
+ box: { color: "#1A1A19", borderColor: White(0.22) },
1538
+ hover: { color: "#262624", lineColor: White(0.14) },
1539
+ focus: { ringColor: White(0.5) },
1540
+ title: { textColor: White(0.88) },
1541
+ desc: { textColor: White(0.45) },
1542
+ section: { textColor: White(0.4) },
1543
+ check: { color: "#E6E6E4", iconColor: "#1A1A19", borderColor: White(0.3) },
1544
+ empty: { textColor: White(0.4) },
1545
+ tile: { frameColor: White(0.06), selectedColor: "#262624" },
1546
+ search: { styleName: "ozdenDark", color: "#262624" },
1547
+ scrollBar: { bar_color: "#CFCFCD", bar_mouseOverColor: "#CFCFCD" },
1548
+ },
1549
+
1550
+ // The light look of the kit (_designs/item-list.htm): a white box with one thin line and round 10 corners, flat
1551
+ // rows of 56 px; the row under the mouse in a soft gray, the selected one in a tint of the accent with a full
1552
+ // mark (an empty circle on the other rows).
1553
+ light: {
1554
+ box: { color: "#FFFFFF", border: 1, borderColor: Black(0.12), round: 10, padding: 6 },
1555
+ list: { gap: 2 }, // WHY: the colors of two rows never meet
1556
+ row: { height: 56, padding: [12, 10], gap: 12, color: "transparent", round: 8 },
1557
+ // WHY: The effects of the ozden tiles (a grey icon in a circle that grows) are turned off.
1300
1558
  tile: {
1301
1559
  width: 132,
1302
1560
  height: "auto",
1303
1561
  padding: [12, 14],
1304
1562
  gap: 8,
1305
1563
  spacing: 8,
1306
- listPadding: 8,
1564
+ listPadding: 6, // as box.padding
1307
1565
  iconSize: 56,
1308
1566
  frameSize: 0,
1309
1567
  iconFilter: "",
@@ -1311,53 +1569,42 @@ ItemList.styles = {
1311
1569
  selectedIconFilter: "",
1312
1570
  selectedFontFamily: "",
1313
1571
  selectedColor: "",
1314
- hover: { color: "#F7F8F6", borderColor: Black(0.14) },
1572
+ hover: { color: "#F2F3F0" },
1315
1573
  },
1316
- section: { padding: [14, 6], fontSize: 13, textColor: Black(0.45) }, // WHY: 14: over the texts of the cards
1317
- hover: { color: "#F7F8F6", borderColor: Black(0.14) },
1318
- selected: { color: "#EEF6F3", borderColor: "#3D7A6B", opacity: 1 },
1319
- focus: { ringColor: "rgba(61, 122, 107, 0.6)" },
1320
- icon: { size: 40, round: 10, color: "#F1F2EF" },
1321
- title: { fontSize: 15, textColor: Black(0.85), fontFamily: "opensans-bold" },
1322
- desc: { fontSize: 13, textColor: Black(0.5), marginTop: 0 },
1323
- check: { visible: 1, size: 20, color: "#3D7A6B", iconColor: "white", borderColor: Black(0.2) },
1324
- empty: { fontSize: 14, textColor: Black(0.45) },
1574
+ section: { padding: [12, 6], fontSize: 13, textColor: Black(0.55) }, // WHY 12: over the icons of the rows
1575
+ hover: { color: "#F2F3F0", lineColor: "" }, // WHY: "": the lines of ozden are not filled in.
1576
+ selected: { color: "#E4EFEB", opacity: 1, canSelectAgain: 1 }, // WHY 1: a click on it is an onItemClick again (the rule of ozden is its own)
1577
+ focus: { ringColor: "rgba(61, 122, 107, 0.5)" },
1578
+ icon: { size: 36, round: 8, color: "#F2F3F0" },
1579
+ title: { fontSize: 15, textColor: Black(0.88), fontFamily: "opensans" },
1580
+ desc: { fontSize: 13, textColor: Black(0.55), marginTop: 0 },
1581
+ check: { visible: 1, size: 20, color: "#3D7A6B", iconColor: "#FFFFFF", borderColor: Black(0.25) },
1582
+ empty: { fontSize: 14, textColor: Black(0.55) },
1583
+ // The search field of the light look: SearchInput light, round 8 as the rows.
1584
+ // WHY border and round: the search box of ozden (the default) has border 0 and round 2, and its keys fill
1585
+ // this package.
1325
1586
  search: {
1326
- height: 40,
1327
- padding: [8, 8, 8, 4],
1328
- fontSize: 15,
1329
- color: "white",
1587
+ styleName: "light", // A package of SearchInput.styles
1588
+ padding: [6, 6, 6, 0], // left, top, right, bottom: as box.padding (the rows have their own 6 under it)
1330
1589
  border: 1,
1331
- borderColor: Black(0.1),
1332
- borderBottomStyle: "1px solid " + Black(0.1),
1333
- round: 10,
1334
- searchIconSize: 18,
1590
+ round: 8,
1335
1591
  },
1336
1592
  scrollBar: { bar_color: "#A0A0A0", bar_mouseOverColor: "#6E6E6C", neverHide: 0, showDots: 0 },
1337
1593
  },
1338
1594
 
1339
- // The dark cards of the Ozden Panel (webpage-ozden-panel, theme "dark").
1595
+ // The dark look of the kit: the same shapes on the dark surface (#232322, on a #1A1A19 page).
1340
1596
  dark: {
1341
- box: { padding: 8 },
1342
- list: { gap: 8 },
1343
- row: {
1344
- height: 64,
1345
- padding: [14, 10],
1346
- gap: 14,
1347
- color: "#1A1A19", // surface: a card
1348
- border: 1,
1349
- borderColor: White(0.08),
1350
- round: 10,
1351
- motion: "background-color 0.2s, border-color 0.2s",
1352
- },
1353
- // WHY: The effects of the classic tiles (a grey icon in a circle that grows) are turned off.
1597
+ box: { color: "#232322", border: 1, borderColor: White(0.12), round: 10, padding: 6 },
1598
+ list: { gap: 2 },
1599
+ row: { height: 56, padding: [12, 10], gap: 12, color: "transparent", round: 8 },
1600
+ // WHY: The effects of the ozden tiles (a grey icon in a circle that grows) are turned off.
1354
1601
  tile: {
1355
1602
  width: 132,
1356
1603
  height: "auto",
1357
1604
  padding: [12, 14],
1358
1605
  gap: 8,
1359
1606
  spacing: 8,
1360
- listPadding: 8,
1607
+ listPadding: 6, // as box.padding
1361
1608
  iconSize: 56,
1362
1609
  frameSize: 0,
1363
1610
  iconFilter: "",
@@ -1365,32 +1612,129 @@ ItemList.styles = {
1365
1612
  selectedIconFilter: "",
1366
1613
  selectedFontFamily: "",
1367
1614
  selectedColor: "",
1368
- hover: { color: "#232322" },
1615
+ hover: { color: White(0.07) },
1369
1616
  },
1370
- section: { padding: [14, 6], fontSize: 13, textColor: White(0.45) }, // WHY: 14: over the texts of the cards
1371
- hover: { color: "#232322" }, // surface2
1372
- selected: { color: "#2C2C2A", borderColor: "#65A293", opacity: 1 }, // surface3, accent
1373
- focus: { ringColor: "#65A293" },
1374
- icon: { size: 40, round: 8, color: "#232322" },
1375
- title: { fontSize: 15, textColor: White(0.9), fontFamily: "opensans-bold" },
1376
- desc: { fontSize: 13, textColor: White(0.45), marginTop: 0 },
1377
- check: { visible: 1, size: 20, color: "#65A293", iconColor: "#141414", borderColor: White(0.25) },
1378
- empty: { fontSize: 14, textColor: White(0.45) },
1617
+ section: { padding: [12, 6], fontSize: 13, textColor: White(0.55) }, // WHY 12: over the icons of the rows
1618
+ hover: { color: White(0.07), lineColor: "" }, // WHY: "": the lines of ozden are not filled in.
1619
+ selected: { color: "rgba(101, 162, 147, 0.2)", opacity: 1, canSelectAgain: 1 }, // WHY 1: as light
1620
+ focus: { ringColor: "rgba(101, 162, 147, 0.55)" },
1621
+ icon: { size: 36, round: 8, color: White(0.07) },
1622
+ title: { fontSize: 15, textColor: White(0.9), fontFamily: "opensans" },
1623
+ desc: { fontSize: 13, textColor: White(0.55), marginTop: 0 },
1624
+ check: { visible: 1, size: 20, color: "#65A293", iconColor: "#0F1F1B", borderColor: White(0.3) },
1625
+ empty: { fontSize: 14, textColor: White(0.55) },
1626
+ // The search field of the dark look: SearchInput dark, round 8 as the rows.
1627
+ // WHY color, border and round: the search box of ozden (the default) is white with border 0 and round 2, and
1628
+ // its keys fill this package.
1379
1629
  search: {
1380
- height: 40,
1381
- padding: [8, 8, 8, 4],
1382
- fontSize: 15,
1383
- color: "#232322", // surface2: a field
1384
- textColor: White(0.9),
1385
- placeholderColor: White(0.35),
1630
+ styleName: "dark", // A package of SearchInput.styles
1631
+ padding: [6, 6, 6, 0], // left, top, right, bottom: as box.padding (the rows have their own 6 under it)
1632
+ color: "#232322",
1386
1633
  border: 1,
1387
- borderColor: White(0.1),
1388
- borderBottomStyle: "1px solid " + White(0.1),
1389
1634
  round: 8,
1390
- searchIconSize: 18,
1391
- invertIconColor: 1,
1392
1635
  },
1393
1636
  scrollBar: { bar_color: "#8A8A88", bar_mouseOverColor: "#BFBFBD", neverHide: 0, showDots: 0 },
1394
1637
  },
1395
1638
 
1639
+ // Pictures (layout "grid"): a big photo in its square with no filter, its title and description under it, a ring
1640
+ // around the selected one. A picture of any shape fills its square (cover).
1641
+ gallery: {
1642
+ box: { color: "transparent", border: 0, padding: 0 },
1643
+ tile: {
1644
+ width: 132, // WHY: two in a row on a phone too
1645
+ height: "auto",
1646
+ padding: [8, 8],
1647
+ gap: 6,
1648
+ spacing: 8,
1649
+ listPadding: 6,
1650
+ iconSize: 116,
1651
+ frameSize: 0,
1652
+ iconFilter: "",
1653
+ iconFit: "cover",
1654
+ iconMotion: "",
1655
+ selectedIconScale: 1,
1656
+ selectedIconFilter: "",
1657
+ selectedFontFamily: "",
1658
+ selectedColor: "",
1659
+ hover: { color: Black(0.05) },
1660
+ },
1661
+ row: { round: 10, border: 1, borderColor: "transparent", motion: "background-color 0.2s, border-color 0.2s" },
1662
+ hover: { color: Black(0.05), lineColor: "" }, // WHY: "": the lines of ozden are not filled in.
1663
+ selected: { color: "rgba(63, 141, 148, 0.1)", borderColor: "#3F8D94", opacity: 1, canSelectAgain: 1 },
1664
+ focus: { ringColor: "rgba(63, 141, 148, 0.8)" },
1665
+ icon: { round: 6, color: Black(0.05) },
1666
+ title: { fontSize: 14, textColor: Black(0.82), fontFamily: "" },
1667
+ desc: { fontSize: 12, textColor: Black(0.5), marginTop: 0 },
1668
+ empty: { fontSize: 14, textColor: Black(0.45) },
1669
+ },
1670
+
1671
+ // The pictures on a dark page.
1672
+ galleryDark: {
1673
+ box: { color: "transparent", border: 0, padding: 0 },
1674
+ tile: {
1675
+ width: 132, // WHY: two in a row on a phone too
1676
+ height: "auto",
1677
+ padding: [8, 8],
1678
+ gap: 6,
1679
+ spacing: 8,
1680
+ listPadding: 6,
1681
+ iconSize: 116,
1682
+ frameSize: 0,
1683
+ iconFilter: "",
1684
+ iconFit: "cover",
1685
+ iconMotion: "",
1686
+ selectedIconScale: 1,
1687
+ selectedIconFilter: "",
1688
+ selectedFontFamily: "",
1689
+ selectedColor: "",
1690
+ hover: { color: White(0.06) },
1691
+ },
1692
+ row: { round: 10, border: 1, borderColor: "transparent", motion: "background-color 0.2s, border-color 0.2s" },
1693
+ hover: { color: White(0.06), lineColor: "" },
1694
+ selected: { color: "rgba(91, 186, 193, 0.14)", borderColor: "#5BBAC1", opacity: 1, canSelectAgain: 1 },
1695
+ focus: { ringColor: "rgba(111, 198, 205, 0.8)" },
1696
+ icon: { round: 6, color: White(0.06) },
1697
+ title: { fontSize: 14, textColor: White(0.88), fontFamily: "" },
1698
+ desc: { fontSize: 12, textColor: White(0.5), marginTop: 0 },
1699
+ empty: { fontSize: 14, textColor: White(0.45) },
1700
+ check: { color: "#E6E6E4", iconColor: "#1A1A19", borderColor: White(0.3) },
1701
+ search: { styleName: "ozdenDark", color: "#262624" },
1702
+ scrollBar: { bar_color: "#CFCFCD", bar_mouseOverColor: "#CFCFCD" },
1703
+ },
1704
+
1705
+ };
1706
+
1707
+ // The minimal theme (_designs/minimal-theme.htm): no fill (the window shows through: its states are lines, so it
1708
+ // reads on any ground), a line around the list; 28 px rows with a 13 px title and a 14 px icon; a line around the
1709
+ // row under the mouse, an ink line, an ink title and a tick on the selected one; 2 px between the rows, so the lines
1710
+ // of two rows never meet. The search box is the head of the list, a line under it. A row with a description needs
1711
+ // more room: style: { row: { height: 44 } }. minimalDark: the same on a dark window.
1712
+ ItemList.createMinimalStyle = function (colors) {
1713
+ return {
1714
+ box: { color: "transparent", border: 1, borderColor: colors.line, round: 4, padding: 4 },
1715
+ list: { gap: 2 },
1716
+ row: { height: 28, padding: [8, 0], gap: 8, color: "transparent", border: 1, borderColor: "transparent", round: 3, lineColor: "" },
1717
+ section: { padding: [8, 6], fontSize: 11, fontFamily: "opensans-bold", textColor: colors.faintText },
1718
+ hover: { color: "transparent", lineColor: "", borderColor: colors.lineHover },
1719
+ selected: { color: "transparent", lineColor: "", borderColor: colors.ink, opacity: 1, canSelectAgain: 0 },
1720
+ disabled: { opacity: 0.4 },
1721
+ focus: { ringColor: colors.focus },
1722
+ icon: { size: 14, round: 0, color: "transparent" },
1723
+ title: { fontSize: 13, textColor: colors.text, selectedTextColor: colors.ink },
1724
+ desc: { fontSize: 12, textColor: colors.softText, marginTop: 0 },
1725
+ check: { visible: 1, size: 14, color: "transparent", iconColor: colors.ink, borderColor: "transparent" },
1726
+ empty: { fontSize: 12, textColor: colors.softText },
1727
+ search: { styleName: colors.searchStyleName, height: 30, padding: [0, 0, 0, 0], color: "transparent", border: 0, round: 0, borderBottomStyle: "1px solid " + colors.line, searchIconLeft: 13 },
1728
+ scrollBar: { bar_color: colors.scrollBar, bar_mouseOverColor: colors.scrollBar, bar_width: 3, bar_mouseOverWidth: 4, showDots: 0 },
1729
+ };
1730
+ };
1731
+ ItemList.MINIMAL_COLORS = {
1732
+ text: Black(0.85), softText: Black(0.55), faintText: Black(0.54), line: Black(0.2), lineHover: Black(0.45),
1733
+ ink: "#1F1F1F", focus: "#3D8BD9", searchStyleName: "minimal", scrollBar: "#373836",
1734
+ };
1735
+ ItemList.styles.minimal = ItemList.createMinimalStyle(ItemList.MINIMAL_COLORS);
1736
+ ItemList.MINIMAL_DARK_COLORS = {
1737
+ text: White(0.88), softText: White(0.55), faintText: White(0.48), line: White(0.18), lineHover: White(0.42),
1738
+ ink: "#EDEDEB", focus: "#7FB6DE", searchStyleName: "minimalDark", scrollBar: "#CFCFCD",
1396
1739
  };
1740
+ ItemList.styles.minimalDark = ItemList.createMinimalStyle(ItemList.MINIMAL_DARK_COLORS);