create-basicjs 0.1.4 → 0.1.6

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 (625) hide show
  1. package/README.md +12 -2
  2. package/bin/create-basicjs.js +58 -5
  3. package/bin/verify-package.js +1 -1
  4. package/package.json +2 -2
  5. package/payload/projects/tauri/.github/workflows/build.yml +86 -0
  6. package/payload/projects/tauri/.github/workflows/tests.yml +87 -0
  7. package/payload/projects/tauri/AGENTS.md +128 -0
  8. package/payload/projects/tauri/CLAUDE.md +1 -0
  9. package/payload/projects/tauri/LICENSE +201 -0
  10. package/payload/projects/tauri/NOTICE +8 -0
  11. package/payload/projects/tauri/README.md +269 -0
  12. package/payload/projects/tauri/checks/window-check.js +189 -0
  13. package/payload/projects/tauri/gitignore +8 -0
  14. package/payload/projects/tauri/handbook/01-getting-started.md +188 -0
  15. package/payload/projects/tauri/handbook/02-the-project.md +264 -0
  16. package/payload/projects/tauri/handbook/03-the-page.md +260 -0
  17. package/payload/projects/tauri/handbook/04-commands.md +265 -0
  18. package/payload/projects/tauri/handbook/05-events-and-state.md +275 -0
  19. package/payload/projects/tauri/handbook/06-plugins.md +282 -0
  20. package/payload/projects/tauri/handbook/07-the-window-and-the-app.md +431 -0
  21. package/payload/projects/tauri/handbook/08-security.md +374 -0
  22. package/payload/projects/tauri/handbook/09-tests-and-checks.md +266 -0
  23. package/payload/projects/tauri/handbook/10-building-and-releasing.md +238 -0
  24. package/payload/projects/tauri/handbook/11-troubleshooting.md +259 -0
  25. package/payload/projects/tauri/handbook/README.md +125 -0
  26. package/payload/projects/tauri/handbook/turkce/01-getting-started.md +193 -0
  27. package/payload/projects/tauri/handbook/turkce/02-the-project.md +272 -0
  28. package/payload/projects/tauri/handbook/turkce/03-the-page.md +272 -0
  29. package/payload/projects/tauri/handbook/turkce/04-commands.md +271 -0
  30. package/payload/projects/tauri/handbook/turkce/05-events-and-state.md +284 -0
  31. package/payload/projects/tauri/handbook/turkce/06-plugins.md +286 -0
  32. package/payload/projects/tauri/handbook/turkce/07-the-window-and-the-app.md +433 -0
  33. package/payload/projects/tauri/handbook/turkce/08-security.md +384 -0
  34. package/payload/projects/tauri/handbook/turkce/09-tests-and-checks.md +275 -0
  35. package/payload/projects/tauri/handbook/turkce/10-building-and-releasing.md +241 -0
  36. package/payload/projects/tauri/handbook/turkce/11-troubleshooting.md +264 -0
  37. package/payload/projects/tauri/handbook/turkce/README.md +128 -0
  38. package/payload/projects/tauri/images/app.png +0 -0
  39. package/payload/projects/tauri/src-tauri/Cargo.lock +4389 -0
  40. package/payload/projects/tauri/src-tauri/Cargo.toml +31 -0
  41. package/payload/projects/tauri/src-tauri/app-icon.svg +16 -0
  42. package/payload/projects/tauri/src-tauri/build.rs +15 -0
  43. package/payload/projects/tauri/src-tauri/capabilities/default.json +7 -0
  44. package/payload/projects/tauri/src-tauri/gitignore +5 -0
  45. package/payload/projects/tauri/src-tauri/icons/128x128.png +0 -0
  46. package/payload/projects/tauri/src-tauri/icons/128x128@2x.png +0 -0
  47. package/payload/projects/tauri/src-tauri/icons/32x32.png +0 -0
  48. package/payload/projects/tauri/src-tauri/icons/icon.icns +0 -0
  49. package/payload/projects/tauri/src-tauri/icons/icon.ico +0 -0
  50. package/payload/projects/tauri/src-tauri/src/check.rs +144 -0
  51. package/payload/projects/tauri/src-tauri/src/files.rs +255 -0
  52. package/payload/projects/tauri/src-tauri/src/main.rs +45 -0
  53. package/payload/projects/tauri/src-tauri/src/sizes.rs +214 -0
  54. package/payload/projects/tauri/src-tauri/tauri.conf.json +44 -0
  55. package/payload/projects/tauri/src-tauri/tests/project.rs +243 -0
  56. package/payload/projects/tauri/ui/app.js +459 -0
  57. package/payload/projects/tauri/ui/backend.js +196 -0
  58. package/payload/projects/tauri/ui/basic/LICENSE +14 -0
  59. package/payload/projects/tauri/ui/basic/basic.min.css +1 -0
  60. package/payload/projects/tauri/ui/basic/basic.min.js +78 -0
  61. package/payload/projects/tauri/ui/basic/font/open-sans/LICENSE.txt +206 -0
  62. package/payload/projects/tauri/ui/basic/font/open-sans/OpenSans-Bold.ttf +0 -0
  63. package/payload/projects/tauri/ui/basic/font/open-sans/OpenSans-Regular.ttf +0 -0
  64. package/payload/projects/tauri/ui/basic/scroll-bar.min.js +3 -0
  65. package/payload/projects/tauri/ui/comp/_sources.txt +9 -0
  66. package/payload/projects/tauri/ui/comp/components.min.js +21 -0
  67. package/payload/projects/tauri/ui/index.html +28 -0
  68. package/payload/projects/tauri/ui/sizes.js +104 -0
  69. package/payload/starter/AGENTS.md +11 -6
  70. package/payload/starter/README.md +1 -1
  71. package/payload/starter/_basic/VERSION +1 -1
  72. package/payload/starter/_basic/assets/cards/almond-blossom.png +0 -0
  73. package/payload/starter/_basic/assets/cards/blackberry.png +0 -0
  74. package/payload/starter/_basic/assets/cards/borage.png +0 -0
  75. package/payload/starter/_basic/assets/cards/chamomile.png +0 -0
  76. package/payload/starter/_basic/assets/cards/dill.png +0 -0
  77. package/payload/starter/_basic/assets/cards/eucalyptus.png +0 -0
  78. package/payload/starter/_basic/assets/cards/fennel.png +0 -0
  79. package/payload/starter/_basic/assets/cards/fig.png +0 -0
  80. package/payload/starter/_basic/assets/cards/juniper.png +0 -0
  81. package/payload/starter/_basic/assets/cards/lavender.png +0 -0
  82. package/payload/starter/_basic/assets/cards/lemon.png +0 -0
  83. package/payload/starter/_basic/assets/cards/olives.png +0 -0
  84. package/payload/starter/_basic/assets/cards/oregano.png +0 -0
  85. package/payload/starter/_basic/assets/cards/pepper.png +0 -0
  86. package/payload/starter/_basic/assets/cards/physalis.png +0 -0
  87. package/payload/starter/_basic/assets/cards/pomegranate.png +0 -0
  88. package/payload/starter/_basic/assets/cards/poppy.png +0 -0
  89. package/payload/starter/_basic/assets/cards/rosehip.png +0 -0
  90. package/payload/starter/_basic/assets/cards/saffron.png +0 -0
  91. package/payload/starter/_basic/assets/categories/cappuccino.png +0 -0
  92. package/payload/starter/_basic/assets/categories/chocolate-milk.png +0 -0
  93. package/payload/starter/_basic/assets/categories/coffee.png +0 -0
  94. package/payload/starter/_basic/assets/categories/frappe.png +0 -0
  95. package/payload/starter/_basic/assets/categories/iced-caffee.png +0 -0
  96. package/payload/starter/_basic/assets/categories/milkshake.png +0 -0
  97. package/payload/starter/_basic/assets/categories/orange-juice.png +0 -0
  98. package/payload/starter/_basic/assets/categories/tea.png +0 -0
  99. package/payload/starter/_basic/assets/fruids/brokoli.png +0 -0
  100. package/payload/starter/_basic/assets/fruids/cilek.png +0 -0
  101. package/payload/starter/_basic/assets/fruids/domates.png +0 -0
  102. package/payload/starter/_basic/assets/fruids/elma.png +0 -0
  103. package/payload/starter/_basic/assets/fruids/havuc.png +0 -0
  104. package/payload/starter/_basic/assets/fruids/karpuz.png +0 -0
  105. package/payload/starter/_basic/assets/fruids/limon.png +0 -0
  106. package/payload/starter/_basic/assets/fruids/muz.png +0 -0
  107. package/payload/starter/_basic/assets/fruids/nar.png +0 -0
  108. package/payload/starter/_basic/assets/fruids/patlican.png +0 -0
  109. package/payload/starter/_basic/assets/fruids/yabanmersini.png +0 -0
  110. package/payload/starter/_basic/assets/fruids/yesilbiber.png +0 -0
  111. package/payload/starter/_basic/basic/LICENSE +1 -1
  112. package/payload/starter/_basic/basic/basic.css +3 -6
  113. package/payload/starter/_basic/basic/basic.js +154 -60
  114. package/payload/starter/_basic/basic/basic.min.js +19 -6
  115. package/payload/starter/_basic/basic/scroll-bar.js +4 -2
  116. package/payload/starter/_basic/basic/scroll-bar.min.js +1 -0
  117. package/payload/starter/_basic/comp/accordion.js +659 -0
  118. package/payload/starter/_basic/comp/action-button.js +22 -23
  119. package/payload/starter/_basic/comp/action-tab-bar.js +8 -8
  120. package/payload/starter/_basic/comp/app-bar.js +12 -11
  121. package/payload/starter/_basic/comp/{badge-v2.js → badge.js} +51 -5
  122. package/payload/starter/_basic/comp/bottom-bar.js +62 -26
  123. package/payload/starter/_basic/comp/breadcrumbs.js +4 -2
  124. package/payload/starter/_basic/comp/canvas.js +652 -0
  125. package/payload/starter/_basic/comp/chat-view.js +827 -0
  126. package/payload/starter/_basic/comp/check-box.js +137 -21
  127. package/payload/starter/_basic/comp/code-editor.js +1171 -0
  128. package/payload/starter/_basic/comp/{select-color.js → color-picker.js} +62 -29
  129. package/payload/starter/_basic/comp/context-menu.js +348 -31
  130. package/payload/starter/_basic/comp/{currency-input-b.js → currency-field.js} +48 -29
  131. package/payload/starter/_basic/comp/data-table.js +114 -42
  132. package/payload/starter/_basic/comp/{select-date.js → date-picker.js} +104 -52
  133. package/payload/starter/_basic/comp/dialog.js +214 -76
  134. package/payload/starter/_basic/comp/email-field.js +65 -0
  135. package/payload/starter/_basic/comp/{select-file.js → file-picker.js} +245 -57
  136. package/payload/starter/_basic/comp/filters.js +374 -60
  137. package/payload/starter/_basic/comp/form.js +38 -26
  138. package/payload/starter/_basic/comp/full-screen-select.js +36 -33
  139. package/payload/starter/_basic/comp/gauge.js +12 -8
  140. package/payload/starter/_basic/comp/graph-box.js +3911 -0
  141. package/payload/starter/_basic/comp/grid-group.js +185 -0
  142. package/payload/starter/_basic/comp/hold-to-confirm-button.js +16 -7
  143. package/payload/starter/_basic/comp/image-view.js +598 -0
  144. package/payload/starter/_basic/comp/item-list.js +507 -163
  145. package/payload/starter/_basic/comp/json-editor.js +3221 -0
  146. package/payload/starter/_basic/comp/json-view.js +597 -0
  147. package/payload/starter/_basic/comp/label-editor.js +22 -19
  148. package/payload/starter/_basic/comp/left-menu.js +89 -22
  149. package/payload/starter/_basic/comp/line-progress-bar.js +196 -45
  150. package/payload/starter/_basic/comp/loading-screen.js +49 -18
  151. package/payload/starter/_basic/comp/log-view.js +530 -0
  152. package/payload/starter/_basic/comp/{login-page-v2.js → login-page.js} +205 -106
  153. package/payload/starter/_basic/comp/markdown-view.js +1046 -0
  154. package/payload/starter/_basic/comp/menu-bar.js +624 -0
  155. package/payload/starter/_basic/comp/mini-graph-box.js +20 -11
  156. package/payload/starter/_basic/comp/minimal-accent.js +208 -0
  157. package/payload/starter/_basic/comp/notice.js +15 -13
  158. package/payload/starter/_basic/comp/{number-input-b.js → number-field.js} +26 -19
  159. package/payload/starter/_basic/comp/numeric-keyboard.js +15 -13
  160. package/payload/starter/_basic/comp/page-control.js +21 -4
  161. package/payload/starter/_basic/comp/page-header.js +7 -6
  162. package/payload/starter/_basic/comp/password-field.js +192 -0
  163. package/payload/starter/_basic/comp/period-bar.js +8 -7
  164. package/payload/starter/_basic/comp/{phone-input-b.js → phone-field.js} +80 -45
  165. package/payload/starter/_basic/comp/progress-bar.js +401 -85
  166. package/payload/starter/_basic/comp/property-panel.js +1022 -123
  167. package/payload/starter/_basic/comp/radio-button.js +79 -19
  168. package/payload/starter/_basic/comp/range-slider.js +569 -0
  169. package/payload/starter/_basic/comp/rich-text-editor.js +33 -30
  170. package/payload/starter/_basic/comp/scroll-area.js +308 -0
  171. package/payload/starter/_basic/comp/scrolling-text.js +10 -9
  172. package/payload/starter/_basic/comp/search-input.js +725 -0
  173. package/payload/starter/_basic/comp/search-results.js +60 -24
  174. package/payload/starter/_basic/comp/select-box.js +229 -107
  175. package/payload/starter/_basic/comp/settings-row.js +20 -19
  176. package/payload/starter/_basic/comp/side-panel.js +53 -10
  177. package/payload/starter/_basic/comp/slider-field.js +264 -88
  178. package/payload/starter/_basic/comp/slider.js +556 -86
  179. package/payload/starter/_basic/comp/smart-button.js +438 -353
  180. package/payload/starter/_basic/comp/smart-table.js +748 -186
  181. package/payload/starter/_basic/comp/sortable-list.js +47 -38
  182. package/payload/starter/_basic/comp/spark-line-box.js +25 -16
  183. package/payload/starter/_basic/comp/splitter.js +411 -0
  184. package/payload/starter/_basic/comp/status-bar.js +408 -0
  185. package/payload/starter/_basic/comp/step-bar.js +345 -0
  186. package/payload/starter/_basic/comp/stepper.js +103 -49
  187. package/payload/starter/_basic/comp/tabs.js +67 -18
  188. package/payload/starter/_basic/comp/tag-input.js +50 -10
  189. package/payload/starter/_basic/comp/tap-effect.js +6 -4
  190. package/payload/starter/_basic/comp/text-area-field.js +233 -0
  191. package/payload/starter/_basic/comp/text-field.js +1006 -0
  192. package/payload/starter/_basic/comp/time-line.js +102 -28
  193. package/payload/starter/_basic/comp/{select-time.js → time-picker.js} +104 -51
  194. package/payload/starter/_basic/comp/tiny-select.js +79 -39
  195. package/payload/starter/_basic/comp/tiny-table.js +12 -8
  196. package/payload/starter/_basic/comp/toast.js +87 -34
  197. package/payload/starter/_basic/comp/toggle.js +149 -28
  198. package/payload/starter/_basic/comp/tool-bar.js +760 -0
  199. package/payload/starter/_basic/comp/tooltip.js +80 -17
  200. package/payload/starter/_basic/comp/tree-view.js +124 -41
  201. package/payload/starter/_basic/comp/ui-effects.js +17 -11
  202. package/payload/starter/_basic/comp/ui-standards.js +5 -4
  203. package/payload/starter/_basic/comp/url-field.js +190 -0
  204. package/payload/starter/_basic/comp/web-view.js +70 -16
  205. package/payload/starter/_basic/docs/basic-js-animated-rules.md +15 -9
  206. package/payload/starter/_basic/docs/basic-js-code-rules.md +42 -5
  207. package/payload/starter/_basic/docs/basic-js-components.md +12 -17
  208. package/payload/starter/_basic/docs/basic-js-core.md +5 -4
  209. package/payload/starter/_basic/docs/component-index.md +248 -107
  210. package/payload/starter/_basic/docs/component-template.js +28 -24
  211. package/payload/starter/_basic/docs/handbook/00-introduction.md +6 -2
  212. package/payload/starter/_basic/docs/handbook/00-what-is-new.md +21 -0
  213. package/payload/starter/_basic/docs/handbook/01-label.md +4 -4
  214. package/payload/starter/_basic/docs/handbook/02-box.md +7 -7
  215. package/payload/starter/_basic/docs/handbook/03-image.md +4 -4
  216. package/payload/starter/_basic/docs/handbook/04-common-properties.md +6 -5
  217. package/payload/starter/_basic/docs/handbook/05-autolayout.md +8 -7
  218. package/payload/starter/_basic/docs/handbook/06-button.md +3 -3
  219. package/payload/starter/_basic/docs/handbook/07-input.md +3 -3
  220. package/payload/starter/_basic/docs/handbook/08-page.md +3 -3
  221. package/payload/starter/_basic/docs/handbook/09-useful-examples.md +39 -58
  222. package/payload/starter/_basic/docs/handbook/10-motion.md +6 -6
  223. package/payload/starter/_basic/docs/handbook/11-other-functions.md +1 -0
  224. package/payload/starter/_basic/docs/handbook/13-sound.md +3 -3
  225. package/payload/starter/_basic/docs/handbook/14-using-components.md +180 -0
  226. package/payload/starter/_basic/docs/handbook/15-making-a-component.md +338 -0
  227. package/payload/starter/_basic/docs/what-is-new.md +106 -0
  228. package/payload/starter/_basic/examples/accordion.htm +174 -0
  229. package/payload/starter/_basic/examples/action-button.htm +74 -32
  230. package/payload/starter/_basic/examples/action-tab-bar.htm +5 -6
  231. package/payload/starter/_basic/examples/app-bar.htm +63 -41
  232. package/payload/starter/_basic/examples/badge.htm +96 -0
  233. package/payload/starter/_basic/examples/bottom-bar-2.htm +61 -48
  234. package/payload/starter/_basic/examples/bottom-bar.htm +74 -16
  235. package/payload/starter/_basic/examples/breadcrumbs.htm +160 -150
  236. package/payload/starter/_basic/examples/canvas.htm +190 -0
  237. package/payload/starter/_basic/examples/chat-view.htm +143 -0
  238. package/payload/starter/_basic/examples/check-box-2.htm +71 -82
  239. package/payload/starter/_basic/examples/check-box-3.htm +72 -83
  240. package/payload/starter/_basic/examples/check-box.htm +207 -0
  241. package/payload/starter/_basic/examples/code-editor-2.htm +259 -0
  242. package/payload/starter/_basic/examples/code-editor.htm +272 -0
  243. package/payload/starter/_basic/examples/color-picker.htm +206 -0
  244. package/payload/starter/_basic/examples/context-menu.htm +180 -139
  245. package/payload/starter/_basic/examples/currency-field.htm +105 -0
  246. package/payload/starter/_basic/examples/data-table-2.htm +2 -1
  247. package/payload/starter/_basic/examples/data-table-3.htm +1 -1
  248. package/payload/starter/_basic/examples/data-table-4.htm +15 -12
  249. package/payload/starter/_basic/examples/data-table-5.htm +11 -3
  250. package/payload/starter/_basic/examples/data-table.htm +90 -40
  251. package/payload/starter/_basic/examples/date-picker.htm +239 -0
  252. package/payload/starter/_basic/examples/dialog-centered.htm +394 -40
  253. package/payload/starter/_basic/examples/dialog.htm +267 -46
  254. package/payload/starter/_basic/examples/email-field.htm +102 -0
  255. package/payload/starter/_basic/examples/file-picker.htm +296 -0
  256. package/payload/starter/_basic/examples/filters.htm +33 -22
  257. package/payload/starter/_basic/examples/{form-1.htm → form.htm} +18 -19
  258. package/payload/starter/_basic/examples/full-screen-select.htm +81 -58
  259. package/payload/starter/_basic/examples/gallery-styled.htm +896 -0
  260. package/payload/starter/_basic/examples/gauge.htm +95 -81
  261. package/payload/starter/_basic/examples/graph-box.htm +365 -0
  262. package/payload/starter/_basic/examples/grid-group.htm +179 -0
  263. package/payload/starter/_basic/examples/hold-to-confirm-button.htm +102 -113
  264. package/payload/starter/_basic/examples/image-view.htm +195 -0
  265. package/payload/starter/_basic/examples/item-list-2.htm +138 -94
  266. package/payload/starter/_basic/examples/item-list.htm +191 -86
  267. package/payload/starter/_basic/examples/json-editor.htm +206 -0
  268. package/payload/starter/_basic/examples/json-view.htm +153 -0
  269. package/payload/starter/_basic/examples/label-editor.htm +85 -89
  270. package/payload/starter/_basic/examples/left-menu-2.htm +93 -0
  271. package/payload/starter/_basic/examples/left-menu.htm +42 -37
  272. package/payload/starter/_basic/examples/line-progress-bar.htm +155 -114
  273. package/payload/starter/_basic/examples/loading-screen.htm +149 -125
  274. package/payload/starter/_basic/examples/log-view.htm +175 -0
  275. package/payload/starter/_basic/examples/{login-page-dark-v2.htm → login-page-dark.htm} +265 -267
  276. package/payload/starter/_basic/examples/{login-page-v2.htm → login-page.htm} +266 -267
  277. package/payload/starter/_basic/examples/markdown-view.htm +220 -0
  278. package/payload/starter/_basic/examples/menu-bar-2.htm +225 -0
  279. package/payload/starter/_basic/examples/menu-bar.htm +145 -0
  280. package/payload/starter/_basic/examples/mini-graph-box.htm +98 -109
  281. package/payload/starter/_basic/examples/minimal-accent.htm +196 -0
  282. package/payload/starter/_basic/examples/minimal-theme.htm +432 -0
  283. package/payload/starter/_basic/examples/notice.htm +13 -4
  284. package/payload/starter/_basic/examples/number-field.htm +103 -0
  285. package/payload/starter/_basic/examples/numeric-keyboard.htm +44 -42
  286. package/payload/starter/_basic/examples/page-control.htm +181 -130
  287. package/payload/starter/_basic/examples/page-header.htm +57 -30
  288. package/payload/starter/_basic/examples/password-field.htm +117 -0
  289. package/payload/starter/_basic/examples/period-bar.htm +43 -29
  290. package/payload/starter/_basic/examples/phone-field-select-country.htm +292 -0
  291. package/payload/starter/_basic/examples/phone-field.htm +104 -0
  292. package/payload/starter/_basic/examples/progress-bar-ozden.htm +229 -92
  293. package/payload/starter/_basic/examples/progress-bar.htm +222 -174
  294. package/payload/starter/_basic/examples/property-panel.htm +152 -52
  295. package/payload/starter/_basic/examples/radio-button-2.htm +101 -109
  296. package/payload/starter/_basic/examples/radio-button-3.htm +81 -71
  297. package/payload/starter/_basic/examples/radio-button.htm +289 -0
  298. package/payload/starter/_basic/examples/range-slider.htm +171 -0
  299. package/payload/starter/_basic/examples/rich-text-editor.htm +115 -110
  300. package/payload/starter/_basic/examples/scroll-area.htm +293 -0
  301. package/payload/starter/_basic/examples/scrolling-text.htm +27 -6
  302. package/payload/starter/_basic/examples/search-input-2-light.htm +112 -0
  303. package/payload/starter/_basic/examples/search-input-3-dark.htm +105 -0
  304. package/payload/starter/_basic/examples/{search-input-v2-place.htm → search-input-place.htm} +25 -26
  305. package/payload/starter/_basic/examples/search-input.htm +159 -0
  306. package/payload/starter/_basic/examples/search-results.htm +85 -88
  307. package/payload/starter/_basic/examples/select-box-2-item-view.htm +304 -0
  308. package/payload/starter/_basic/examples/select-box-ozden-dark-text.htm +70 -0
  309. package/payload/starter/_basic/examples/select-box-ozden-item.htm +6 -5
  310. package/payload/starter/_basic/examples/select-box-ozden-text.htm +5 -3
  311. package/payload/starter/_basic/examples/select-box.htm +190 -159
  312. package/payload/starter/_basic/examples/settings-row.htm +92 -43
  313. package/payload/starter/_basic/examples/side-panel-2.htm +63 -25
  314. package/payload/starter/_basic/examples/side-panel.htm +84 -70
  315. package/payload/starter/_basic/examples/slider-2-split.htm +186 -0
  316. package/payload/starter/_basic/examples/slider-field-ozden.htm +286 -0
  317. package/payload/starter/_basic/examples/slider-field.htm +174 -134
  318. package/payload/starter/_basic/examples/slider.htm +257 -180
  319. package/payload/starter/_basic/examples/smart-button-3-ozden.htm +170 -257
  320. package/payload/starter/_basic/examples/smart-button-4-dark.htm +86 -47
  321. package/payload/starter/_basic/examples/smart-button-5-features.htm +130 -125
  322. package/payload/starter/_basic/examples/smart-button-alternatif.htm +266 -0
  323. package/payload/starter/_basic/examples/smart-button.htm +207 -174
  324. package/payload/starter/_basic/examples/smart-table-2.htm +43 -56
  325. package/payload/starter/_basic/examples/smart-table-3.htm +148 -113
  326. package/payload/starter/_basic/examples/smart-table-4.htm +37 -50
  327. package/payload/starter/_basic/examples/{smart-table-1.htm → smart-table-5.htm} +37 -48
  328. package/payload/starter/_basic/examples/smart-table.htm +183 -0
  329. package/payload/starter/_basic/examples/sortable-list.htm +191 -142
  330. package/payload/starter/_basic/examples/spark-line-box.htm +149 -161
  331. package/payload/starter/_basic/examples/splitter.htm +164 -0
  332. package/payload/starter/_basic/examples/status-bar.htm +166 -0
  333. package/payload/starter/_basic/examples/step-bar.htm +129 -0
  334. package/payload/starter/_basic/examples/stepper-2.htm +86 -58
  335. package/payload/starter/_basic/examples/stepper.htm +146 -135
  336. package/payload/starter/_basic/examples/tabs-2.htm +58 -67
  337. package/payload/starter/_basic/examples/tabs.htm +197 -180
  338. package/payload/starter/_basic/examples/tag-input.htm +150 -153
  339. package/payload/starter/_basic/examples/tap-effect.htm +23 -19
  340. package/payload/starter/_basic/examples/text-area-field.htm +104 -0
  341. package/payload/starter/_basic/examples/text-field-2.htm +113 -0
  342. package/payload/starter/_basic/examples/text-field-3-style.htm +105 -0
  343. package/payload/starter/_basic/examples/text-field-4-custom-unit.htm +96 -0
  344. package/payload/starter/_basic/examples/{input-b-ex5-warning-icon.htm → text-field-5-warning-icon.htm} +19 -19
  345. package/payload/starter/_basic/examples/text-field-6-modern-dark.htm +114 -0
  346. package/payload/starter/_basic/examples/text-field-7-modern.htm +106 -0
  347. package/payload/starter/_basic/examples/text-field-8-light-dark.htm +159 -0
  348. package/payload/starter/_basic/examples/text-field.htm +163 -0
  349. package/payload/starter/_basic/examples/time-line.htm +180 -116
  350. package/payload/starter/_basic/examples/time-picker.htm +240 -0
  351. package/payload/starter/_basic/examples/tiny-select.htm +118 -86
  352. package/payload/starter/_basic/examples/tiny-table.htm +40 -34
  353. package/payload/starter/_basic/examples/toast.htm +145 -147
  354. package/payload/starter/_basic/examples/toggle-2.htm +99 -68
  355. package/payload/starter/_basic/examples/toggle-3.htm +104 -101
  356. package/payload/starter/_basic/examples/toggle.htm +161 -93
  357. package/payload/starter/_basic/examples/tool-bar.htm +172 -0
  358. package/payload/starter/_basic/examples/tooltip-2.htm +110 -60
  359. package/payload/starter/_basic/examples/tooltip-3.htm +124 -65
  360. package/payload/starter/_basic/examples/tooltip-4.htm +218 -0
  361. package/payload/starter/_basic/examples/tooltip.htm +206 -124
  362. package/payload/starter/_basic/examples/tree-view.htm +210 -182
  363. package/payload/starter/_basic/examples/ui-effects.htm +207 -185
  364. package/payload/starter/_basic/examples/ui-standards.htm +200 -139
  365. package/payload/starter/_basic/examples/url-field.htm +120 -0
  366. package/payload/starter/_basic/examples/web-view.htm +109 -110
  367. package/payload/starter/_basic/min/accordion.min.js +2 -0
  368. package/payload/starter/_basic/min/action-button.min.js +1 -1
  369. package/payload/starter/_basic/min/app-bar.min.js +1 -1
  370. package/payload/starter/_basic/min/badge.min.js +2 -0
  371. package/payload/starter/_basic/min/bottom-bar.min.js +1 -1
  372. package/payload/starter/_basic/min/canvas.min.js +2 -0
  373. package/payload/starter/_basic/min/chat-view.min.js +2 -0
  374. package/payload/starter/_basic/min/check-box.min.js +1 -1
  375. package/payload/starter/_basic/min/code-editor.min.js +2 -0
  376. package/payload/starter/_basic/min/color-picker.min.js +2 -0
  377. package/payload/starter/_basic/min/context-menu.min.js +1 -1
  378. package/payload/starter/_basic/min/currency-field.min.js +2 -0
  379. package/payload/starter/_basic/min/data-table.min.js +1 -1
  380. package/payload/starter/_basic/min/date-picker.min.js +2 -0
  381. package/payload/starter/_basic/min/dialog.min.js +1 -1
  382. package/payload/starter/_basic/min/email-field.min.js +2 -0
  383. package/payload/starter/_basic/min/file-picker.min.js +2 -0
  384. package/payload/starter/_basic/min/filters.min.js +1 -1
  385. package/payload/starter/_basic/min/form.min.js +1 -1
  386. package/payload/starter/_basic/min/full-screen-select.min.js +1 -1
  387. package/payload/starter/_basic/min/gauge.min.js +1 -1
  388. package/payload/starter/_basic/min/graph-box.min.js +2 -0
  389. package/payload/starter/_basic/min/grid-group.min.js +2 -0
  390. package/payload/starter/_basic/min/hold-to-confirm-button.min.js +1 -1
  391. package/payload/starter/_basic/min/image-view.min.js +2 -0
  392. package/payload/starter/_basic/min/item-list.min.js +1 -1
  393. package/payload/starter/_basic/min/json-editor.min.js +2 -0
  394. package/payload/starter/_basic/min/json-view.min.js +2 -0
  395. package/payload/starter/_basic/min/label-editor.min.js +1 -1
  396. package/payload/starter/_basic/min/left-menu.min.js +1 -1
  397. package/payload/starter/_basic/min/line-progress-bar.min.js +1 -1
  398. package/payload/starter/_basic/min/loading-screen.min.js +1 -1
  399. package/payload/starter/_basic/min/log-view.min.js +2 -0
  400. package/payload/starter/_basic/min/login-page.min.js +2 -0
  401. package/payload/starter/_basic/min/markdown-view.min.js +2 -0
  402. package/payload/starter/_basic/min/menu-bar.min.js +2 -0
  403. package/payload/starter/_basic/min/mini-graph-box.min.js +1 -1
  404. package/payload/starter/_basic/min/minimal-accent.min.js +2 -0
  405. package/payload/starter/_basic/min/notice.min.js +1 -1
  406. package/payload/starter/_basic/min/number-field.min.js +2 -0
  407. package/payload/starter/_basic/min/numeric-keyboard.min.js +1 -1
  408. package/payload/starter/_basic/min/page-control.min.js +1 -1
  409. package/payload/starter/_basic/min/password-field.min.js +2 -0
  410. package/payload/starter/_basic/min/phone-field.min.js +2 -0
  411. package/payload/starter/_basic/min/progress-bar.min.js +1 -1
  412. package/payload/starter/_basic/min/property-panel.min.js +1 -1
  413. package/payload/starter/_basic/min/radio-button.min.js +1 -1
  414. package/payload/starter/_basic/min/range-slider.min.js +2 -0
  415. package/payload/starter/_basic/min/rich-text-editor.min.js +1 -1
  416. package/payload/starter/_basic/min/scroll-area.min.js +2 -0
  417. package/payload/starter/_basic/min/scrolling-text.min.js +1 -1
  418. package/payload/starter/_basic/min/search-input.min.js +2 -0
  419. package/payload/starter/_basic/min/search-results.min.js +1 -1
  420. package/payload/starter/_basic/min/select-box.min.js +1 -1
  421. package/payload/starter/_basic/min/settings-row.min.js +1 -1
  422. package/payload/starter/_basic/min/side-panel.min.js +1 -1
  423. package/payload/starter/_basic/min/slider-field.min.js +1 -1
  424. package/payload/starter/_basic/min/slider.min.js +1 -1
  425. package/payload/starter/_basic/min/smart-button.min.js +1 -1
  426. package/payload/starter/_basic/min/smart-table.min.js +1 -1
  427. package/payload/starter/_basic/min/sortable-list.min.js +1 -1
  428. package/payload/starter/_basic/min/spark-line-box.min.js +1 -1
  429. package/payload/starter/_basic/min/splitter.min.js +2 -0
  430. package/payload/starter/_basic/min/status-bar.min.js +2 -0
  431. package/payload/starter/_basic/min/step-bar.min.js +2 -0
  432. package/payload/starter/_basic/min/stepper.min.js +1 -1
  433. package/payload/starter/_basic/min/tabs.min.js +1 -1
  434. package/payload/starter/_basic/min/tag-input.min.js +1 -1
  435. package/payload/starter/_basic/min/text-area-field.min.js +2 -0
  436. package/payload/starter/_basic/min/text-field.min.js +2 -0
  437. package/payload/starter/_basic/min/time-line.min.js +1 -1
  438. package/payload/starter/_basic/min/time-picker.min.js +2 -0
  439. package/payload/starter/_basic/min/tiny-select.min.js +1 -1
  440. package/payload/starter/_basic/min/toast.min.js +1 -1
  441. package/payload/starter/_basic/min/toggle.min.js +1 -1
  442. package/payload/starter/_basic/min/tool-bar.min.js +2 -0
  443. package/payload/starter/_basic/min/tooltip.min.js +1 -1
  444. package/payload/starter/_basic/min/tree-view.min.js +1 -1
  445. package/payload/starter/_basic/min/ui-effects.min.js +1 -1
  446. package/payload/starter/_basic/min/url-field.min.js +2 -0
  447. package/payload/starter/_basic/min/web-view.min.js +1 -1
  448. package/payload/templates/booking/app/app.js +11 -8
  449. package/payload/templates/booking/app/settings.js +4 -4
  450. package/payload/templates/booking/index.htm +3 -3
  451. package/payload/templates/booking/pages/account.js +6 -6
  452. package/payload/templates/booking/pages/book.js +1 -1
  453. package/payload/templates/booking/pages/services.js +5 -4
  454. package/payload/templates/classic/app/app.js +15 -11
  455. package/payload/templates/classic/app/settings.js +22 -20
  456. package/payload/templates/classic/assets/_attribute.txt +2 -0
  457. package/payload/templates/classic/assets/cards/dill.png +0 -0
  458. package/payload/templates/classic/assets/cards/fennel.png +0 -0
  459. package/payload/templates/classic/assets/cards/juniper.png +0 -0
  460. package/payload/templates/classic/assets/cards/olives.png +0 -0
  461. package/payload/templates/classic/assets/cards/oregano.png +0 -0
  462. package/payload/templates/classic/assets/cards/pepper.png +0 -0
  463. package/payload/templates/classic/assets/cards/rosehip.png +0 -0
  464. package/payload/templates/classic/assets/categories/cappuccino.png +0 -0
  465. package/payload/templates/classic/assets/categories/chocolate-milk.png +0 -0
  466. package/payload/templates/classic/assets/categories/coffee.png +0 -0
  467. package/payload/templates/classic/assets/categories/frappe.png +0 -0
  468. package/payload/templates/classic/assets/categories/iced-caffee.png +0 -0
  469. package/payload/templates/classic/assets/categories/milkshake.png +0 -0
  470. package/payload/templates/classic/assets/categories/orange-juice.png +0 -0
  471. package/payload/templates/classic/assets/categories/tea.png +0 -0
  472. package/payload/templates/classic/index.htm +2 -2
  473. package/payload/templates/classic/pages/example.js +10 -10
  474. package/payload/templates/classic/pages/examples.js +44 -43
  475. package/payload/templates/classic/pages/home.js +16 -15
  476. package/payload/templates/classic/pages/info-pages.js +5 -5
  477. package/payload/templates/classic/pages/search.js +8 -7
  478. package/payload/templates/classic/pages/settings.js +13 -13
  479. package/payload/templates/classic/pages/tasks.js +1 -0
  480. package/payload/templates/classic/pages/template-pages.js +12 -11
  481. package/payload/templates/coffee-shop/app/app.js +12 -8
  482. package/payload/templates/coffee-shop/app/settings.js +4 -4
  483. package/payload/templates/coffee-shop/index.htm +3 -3
  484. package/payload/templates/coffee-shop/pages/drink.js +1 -1
  485. package/payload/templates/coffee-shop/pages/menu.js +5 -4
  486. package/payload/templates/forms/TEMPLATE.md +1 -1
  487. package/payload/templates/forms/appointment-form.htm +55 -53
  488. package/payload/templates/forms/contact-form-to-mail.htm +38 -37
  489. package/payload/templates/forms/contact-form-to-supabase.htm +47 -46
  490. package/payload/templates/forms/dark-contact-form.htm +43 -40
  491. package/payload/templates/forms/event-registration-form.htm +80 -77
  492. package/payload/templates/forms/feedback-form.htm +54 -54
  493. package/payload/templates/forms/order-form.htm +88 -84
  494. package/payload/templates/forms/recruitment-form.htm +60 -60
  495. package/payload/templates/forms/service/readme.md +9 -8
  496. package/payload/templates/forms/service/send-form-mail.php +38 -21
  497. package/payload/templates/forms/support-ticket-form.htm +67 -65
  498. package/payload/templates/panel/common/module-page.js +2 -2
  499. package/payload/templates/panel/common/theme.js +37 -10
  500. package/payload/templates/panel/common/top-bar.js +45 -40
  501. package/payload/templates/panel/index.htm +59 -60
  502. package/payload/templates/panel/module10/greenhouse.htm +98 -113
  503. package/payload/templates/panel/module11/arduino-projects.htm +47 -58
  504. package/payload/templates/panel/module6/energy-hub.htm +71 -103
  505. package/payload/templates/panel/module7/3d-printers.htm +58 -81
  506. package/payload/templates/panel/module8/cold-rooms.htm +58 -79
  507. package/payload/templates/panel/module9/elevator-fleet.htm +72 -93
  508. package/payload/templates/panel/pages/activity.js +134 -152
  509. package/payload/templates/panel/pages/contents.js +291 -308
  510. package/payload/templates/panel/pages/customers.js +250 -267
  511. package/payload/templates/panel/pages/edit-user.js +31 -30
  512. package/payload/templates/panel/pages/home.js +39 -70
  513. package/payload/templates/panel/pages/media.js +166 -183
  514. package/payload/templates/panel/pages/notifications.js +7 -7
  515. package/payload/templates/panel/pages/orders.js +200 -217
  516. package/payload/templates/panel/pages/products.js +259 -278
  517. package/payload/templates/panel/pages/reports.js +74 -123
  518. package/payload/templates/panel/pages/roles.js +57 -60
  519. package/payload/templates/panel/pages/settings.js +127 -143
  520. package/payload/templates/panel/pages/user-actions.js +106 -110
  521. package/payload/templates/panel/pages/user-list.js +221 -238
  522. package/payload/templates/panel/pages/users.js +14 -29
  523. package/payload/templates/shop/TEMPLATE.md +1 -1
  524. package/payload/templates/shop/app/app.js +11 -8
  525. package/payload/templates/shop/app/settings.js +4 -4
  526. package/payload/templates/shop/index.htm +3 -3
  527. package/payload/templates/shop/pages/account.js +7 -7
  528. package/payload/templates/shop/pages/cart.js +1 -1
  529. package/payload/templates/shop/pages/checkout.js +2 -2
  530. package/payload/templates/shop/pages/product.js +2 -2
  531. package/payload/templates/shop/pages/shop.js +6 -5
  532. package/payload/templates/starter/TEMPLATE.md +1 -1
  533. package/payload/templates/starter/app/app.js +12 -8
  534. package/payload/templates/starter/app/settings.js +14 -11
  535. package/payload/templates/starter/index.htm +3 -3
  536. package/payload/templates/starter/pages/about.js +1 -1
  537. package/payload/templates/starter/pages/home.js +2 -2
  538. package/payload/templates/starter/pages/product.js +1 -1
  539. package/payload/templates/starter/pages/products.js +5 -5
  540. package/payload/templates/starter/pages/settings.js +1 -1
  541. package/payload/templates/starter/pages/tasks.js +8 -8
  542. package/payload/templates/starter/pages/website.js +1 -1
  543. package/payload/starter/_basic/comp/chart-box/chart-4.5.1.umd.min.js +0 -13
  544. package/payload/starter/_basic/comp/chart-box/chart-js-LICENSE.md +0 -9
  545. package/payload/starter/_basic/comp/chart-box.js +0 -868
  546. package/payload/starter/_basic/comp/email-input-b.js +0 -57
  547. package/payload/starter/_basic/comp/input-b.js +0 -759
  548. package/payload/starter/_basic/comp/password-input-b.js +0 -164
  549. package/payload/starter/_basic/comp/search-input-v2.js +0 -427
  550. package/payload/starter/_basic/comp/textarea-b.js +0 -184
  551. package/payload/starter/_basic/comp/url-input-b.js +0 -145
  552. package/payload/starter/_basic/examples/badgeV2.htm +0 -68
  553. package/payload/starter/_basic/examples/chart-box.htm +0 -287
  554. package/payload/starter/_basic/examples/check-box-1.htm +0 -220
  555. package/payload/starter/_basic/examples/currency-input-b.htm +0 -71
  556. package/payload/starter/_basic/examples/email-input-b.htm +0 -67
  557. package/payload/starter/_basic/examples/input-b-ex1.htm +0 -132
  558. package/payload/starter/_basic/examples/input-b-ex2.htm +0 -136
  559. package/payload/starter/_basic/examples/input-b-ex3-style.htm +0 -113
  560. package/payload/starter/_basic/examples/input-b-ex4-custom-unit.htm +0 -112
  561. package/payload/starter/_basic/examples/input-b-ex6-dark.htm +0 -108
  562. package/payload/starter/_basic/examples/input-b-ex7-ozden.htm +0 -153
  563. package/payload/starter/_basic/examples/number-input-b.htm +0 -68
  564. package/payload/starter/_basic/examples/password-input-b.htm +0 -70
  565. package/payload/starter/_basic/examples/phone-input-b-select-country.htm +0 -298
  566. package/payload/starter/_basic/examples/phone-input-b.htm +0 -72
  567. package/payload/starter/_basic/examples/radio-button-1.htm +0 -264
  568. package/payload/starter/_basic/examples/search-input-v2-ozden.htm +0 -128
  569. package/payload/starter/_basic/examples/search-input-v2.htm +0 -65
  570. package/payload/starter/_basic/examples/select-color.htm +0 -215
  571. package/payload/starter/_basic/examples/select-date.htm +0 -244
  572. package/payload/starter/_basic/examples/select-file.htm +0 -268
  573. package/payload/starter/_basic/examples/select-time.htm +0 -249
  574. package/payload/starter/_basic/examples/smart-button-2.htm +0 -220
  575. package/payload/starter/_basic/examples/textarea-b.htm +0 -76
  576. package/payload/starter/_basic/examples/unfinished-login-page-dark-supabase.htm +0 -221
  577. package/payload/starter/_basic/examples/unfinished-login-page-supabase.htm +0 -221
  578. package/payload/starter/_basic/examples/url-input-b.htm +0 -85
  579. package/payload/starter/_basic/min/badge-v2.min.js +0 -2
  580. package/payload/starter/_basic/min/chart-box.min.js +0 -2
  581. package/payload/starter/_basic/min/currency-input-b.min.js +0 -2
  582. package/payload/starter/_basic/min/email-input-b.min.js +0 -2
  583. package/payload/starter/_basic/min/input-b.min.js +0 -2
  584. package/payload/starter/_basic/min/login-page-v2.min.js +0 -2
  585. package/payload/starter/_basic/min/number-input-b.min.js +0 -2
  586. package/payload/starter/_basic/min/password-input-b.min.js +0 -2
  587. package/payload/starter/_basic/min/phone-input-b.min.js +0 -2
  588. package/payload/starter/_basic/min/search-input-v2.min.js +0 -2
  589. package/payload/starter/_basic/min/select-color.min.js +0 -2
  590. package/payload/starter/_basic/min/select-date.min.js +0 -2
  591. package/payload/starter/_basic/min/select-file.min.js +0 -2
  592. package/payload/starter/_basic/min/select-time.min.js +0 -2
  593. package/payload/starter/_basic/min/textarea-b.min.js +0 -2
  594. package/payload/starter/_basic/min/url-input-b.min.js +0 -2
  595. package/payload/templates/panel/common/bridge.min.js +0 -0
  596. package/payload/templates/panel/common/full-view.min.js +0 -1
  597. package/payload/templates/panel/common/main-view.min.js +0 -1
  598. package/payload/templates/panel/common/module-page.min.js +0 -1
  599. package/payload/templates/panel/common/right-view.min.js +0 -1
  600. package/payload/templates/panel/common/start-page.min.js +0 -1
  601. package/payload/templates/panel/common/top-bar-v25-07-29-1.js +0 -330
  602. package/payload/templates/panel/common/top-bar-v25-07-29-2.js +0 -265
  603. package/payload/templates/panel/common/top-bar.min.js +0 -1
  604. package/payload/templates/panel/common/ui-standards.min.js +0 -1
  605. package/payload/templates/panel/managers/database.min.js +0 -1
  606. package/payload/templates/panel/managers/login.min.js +0 -1
  607. package/payload/templates/panel/pages/_page-template.min.js +0 -1
  608. package/payload/templates/panel/pages/contents.min.js +0 -1
  609. package/payload/templates/panel/pages/edit-user.min.js +0 -1
  610. package/payload/templates/panel/pages/edit-users-table.min.js +0 -1
  611. package/payload/templates/panel/pages/home.min.js +0 -1
  612. package/payload/templates/panel/pages/notifications.min.js +0 -1
  613. package/payload/templates/panel/pages/reports.min.js +0 -1
  614. package/payload/templates/panel/pages/settings.min.js +0 -1
  615. package/payload/templates/panel/pages/user-actions.min.js +0 -2
  616. package/payload/templates/panel/pages/users.min.js +0 -1
  617. /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn.png +0 -0
  618. /package/payload/starter/_basic/comp/{password-input-b → password-field}/hide-btn2.png +0 -0
  619. /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn.png +0 -0
  620. /package/payload/starter/_basic/comp/{password-input-b → password-field}/show-btn2.png +0 -0
  621. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear-round.svg +0 -0
  622. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/clear.svg +0 -0
  623. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.png +0 -0
  624. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/filter.svg +0 -0
  625. /package/payload/starter/_basic/comp/{search-input-v2 → search-input}/search.svg +0 -0
@@ -5,37 +5,44 @@
5
5
  Dialog - v26.10
6
6
 
7
7
  A dialog window over the page: a title, a message, your fields (inputs) or any content, and buttons. The page under
8
- it waits (a modal dialog: a dark cover, the keyboard stays in the dialog). The new version of comp/dialog.js with
9
- the features of comp/modal.js and the look of _basic/examples/smart-button-3-ozden.htm (the first dialog).
10
- NOTE: still in development (the user, 2026-10-29): more style packages come; their buttons may be animated.
8
+ it waits (a modal dialog: a dark cover, the keyboard stays in the dialog).
9
+ NOTE: still in development: more style packages come; their buttons may be animated.
11
10
 
12
- - Buttons (SmartButton of comp-m4, load it first): [{ text, type, key, iconFile, align, ask, ariaLabel, onClick }]
11
+ - Buttons (SmartButton, load it first): [{ text, type, key, iconFile, align, ask, ariaLabel, onClick }]
13
12
  - type: "primary" (the main action), "secondary" (Cancel), "danger" (a delete), "warning", "success", "info"
14
- (the situation packages of SmartButton: primary, danger...), "icon" (only an icon: a square).
13
+ (the tones of SmartButton: cyan, orange, yellow, green, blue), "icon" (only an icon: a white square).
15
14
  - align: "left": at the left side of the footer (Ex: the trash); the others stay at the right side.
16
- - ask: "Click again to delete." -> two clicks: the first one turns the button red and shows the text in a bubble
17
- over it; the second one runs onClick. It forgets after 5 s. (The ask of SmartButton, 2026-10-30.)
15
+ - ask: "Click again to delete." -> two clicks: the first one turns the button orange and shows the text in a bubble
16
+ over it; the second one runs onClick. It forgets after 5 s. (The ask of SmartButton.)
18
17
  - onClick(dialog, button) returns false: the dialog stays open. A Promise: the button waits (its clock), the
19
18
  others are disabled, and the dialog closes when it ends (a rejected one keeps it open).
20
- - Fields: fields: [{ key, titleText, placeholder, value, required, validate(value) -> error text }] make InputB
21
- fields (comp/input-b.js, load it with comp/tooltip.js; without it a plain Input). A "primary" button checks
19
+ - Fields: fields: [{ key, titleText, placeholder, value, required, validate(value) -> error text }] make TextField
20
+ fields (comp/text-field.js, load it with comp/tooltip.js; without it a plain Input). A "primary" button checks
22
21
  them first: an error is written under the message and the field gets the focus. getValues() -> { key: value }.
23
22
  - content(dialog): any objects in the body (under the message).
24
- - Closes with a button, Escape, a click on the cover (closeOnCover) or close(). onClose(dialog, reason, buttonKey).
23
+ - setStatus(text, type): a line under the content: "error" (red), "success" (green) or "info" (gray).
24
+ - Closes with a button, Escape, a click on the cover (closeOnCover) or close(). onClose(self, reason, buttonKey).
25
25
  - Keyboard: Tab stays in the dialog; the first field (else the primary button) gets the focus; the focus goes back to
26
26
  the opener when it closes. More than one dialog: Escape closes the top one.
27
27
  - Dialog.confirm(), Dialog.alert(), Dialog.prompt(): Promises.
28
- - variant: "centered" (the user, 2026-10-29): the title and the message in the middle, the buttons one under the other
28
+ - variant: "centered": the title and the message in the middle, the buttons one under the other
29
29
  (as wide as the card; the primary / danger one first, on the gray band of the footer) and an icon at the top
30
30
  (topIconFile: a file or an "<svg" text: dark in a light gray circle). The look: style.centered.
31
+ topIconTone: "cyan", "orange", "yellow", "green" or "blue" (the tones of SmartButton) puts
32
+ the icon in three tones of it (Dialog.ICON_TONES): a light circle, and in an "<svg" text the words LIGHT and STRONG
33
+ are filled in with a light and a strong tone (a two-tone icon; currentColor is the strong tone). "": gray.
34
+ CIRCLE in it is the color of the circle: a ring that cuts a part out (Ex: around the dot of a new mail).
31
35
  - Motion: the cover comes from nothing and the card rises 50 px while it comes (0.2 s); it goes at once; none with reduced motion.
32
- - Style packages: "ozden" (default). (Dialog.styles)
33
- - The buttons (the user, 2026-10-30): style.buttons[type] = { styleName, style }: a style package of SmartButton
34
- (primary / secondary / danger: "ozdenType1", icon: "ozdenType2") and only the keys that differ (the colors).
35
- - Scale (2026-11-01): scale multiplies every size of the dialog (its style, width, motion, its buttons and the bubble
36
+ - Style packages: "ozden" (default), "ozdenDark" (for a dark page; Dialog.confirm / alert / prompt take styleName too),
37
+ "minimal", "minimalDark" (_designs/minimal-theme.htm: a card with a line, no shadow, the minimal buttons and fields).
38
+ (Dialog.styles)
39
+ - The buttons: style.buttons[type] = { styleName, tone, style }: a template of SmartButton
40
+ ("ozden"; Cancel and icon: "ozden3", a faint edge), a tone of it
41
+ (primary: "cyan", danger: "orange"...; icon: "white") and only the keys that differ.
42
+ - Scale: scale multiplies every size of the dialog (its style, width, motion, its buttons and the bubble
36
43
  of their ask). null (default): basic.uiScale (1; a page fitted with page.fit() sets 1 / page.zoom: the dialog keeps
37
44
  its size on the screen). Dialog.confirm / alert / prompt take it too. The objects of content(dialog) are made by
38
- the page: dialog.scale is their scale. (The InputB fields keep their own px: InputB has no scale param yet.)
45
+ the page: dialog.scale is their scale. (The TextField fields keep their own px: TextField has no scale param yet.)
39
46
 
40
47
  USAGE:
41
48
  Dialog({
@@ -47,17 +54,19 @@ Dialog({
47
54
  { key: "cancel", text: "Cancel", type: "secondary" },
48
55
  { key: "publish", text: "Publish", type: "primary", iconFile: PEN_ICON, onClick: function (dialog) { return publish(dialog.getValues()); } },
49
56
  ],
50
- onClose: function (dialog, reason, buttonKey) { },
57
+ onClose: function (self, reason, buttonKey) { },
51
58
  });
52
59
  if (await Dialog.confirm({ titleText: "Delete the file?", messageText: "It can not be undone.", confirmText: "Delete", danger: 1 })) { }
53
60
  const name = await Dialog.prompt({ titleText: "Rename", value: "report.pdf", validate: (text) => (text.trim()) ? "" : "A name is needed." });
54
61
  Dialog.alert({ titleText: "Saved", scale: 1.5 }); // every size x 1.5 (default: basic.uiScale)
55
62
 
56
- Started Date: June 2024 (comp-m2 Dialog), October 2026 (comp-m4 Dialog)
57
- Developer: Bugra Ozden
58
- Email: bugra.ozden@gmail.com
63
+ Started Date: October 2026
59
64
  Webpage: https://bug7a.github.io/js-components/
60
65
 
66
+ Copyright 2020-2026 Bugra Ozden <bugra.ozden@gmail.com> (https://bug7a.github.io/)
67
+ Licensed under the Apache License, Version 2.0
68
+ SPDX-License-Identifier: Apache-2.0
69
+
61
70
  */
62
71
 
63
72
  "use strict";
@@ -78,11 +87,12 @@ const DialogDefaults = {
78
87
  removeOnClose: 1, // 0: close() only hides it; open() shows it again
79
88
  ariaLabel: "", // when there is no title
80
89
  variant: "", // "": the buttons in a row at the bottom; "centered": the texts in the middle, the buttons one under the other
81
- topIconFile: "", // "centered": the icon at the top (a file, or an "<svg" text drawn with currentColor)
90
+ topIconFile: "", // "centered": the icon at the top (a file, or an "<svg" text drawn with currentColor or LIGHT / STRONG)
91
+ topIconTone: "", // "centered": "cyan", "orange", "yellow", "green", "blue": the circle and the icon in its tones; "": gray
82
92
  scale: null, // every size multiplied (Ex: 1.5). null: basic.uiScale (1 / page.zoom on a page fitted with page.fit())
83
- onOpen: function (dialog) { },
84
- onClose: function (dialog, reason, buttonKey) { }, // reason: "button", "escape", "cover", "api"
85
- styleName: "ozden", // "ozden" or a name added to Dialog.styles
93
+ onOpen: function (self) { },
94
+ onClose: function (self, reason, buttonKey) { }, // reason: "button", "escape", "cover", "api"
95
+ styleName: "ozden", // "ozden", "ozdenDark", "minimal", "minimalDark" or a name added to Dialog.styles
86
96
  style: { // The ozden style package (default): the first dialog of smart-button-3-ozden.htm
87
97
  cover: { color: Black(0.8), zIndex: 4000 },
88
98
  card: {
@@ -97,42 +107,45 @@ const DialogDefaults = {
97
107
  },
98
108
  title: { fontSize: 20, textColor: "#1B1F23", fontFamily: "opensans-bold" },
99
109
  message: { fontSize: 16, textColor: Black(0.55), lineHeight: 1.5 },
100
- status: { fontSize: 13, errorColor: "#E8796D", infoColor: Black(0.55) },
110
+ // successColor ("it is saved" under the content): the green of SmartButton (#7BC362), deeper.
111
+ // WHY deeper: #7BC362 is 2.2:1 on white; #498335 is 4.6:1, enough for a small text
112
+ // errorColor: #E8796D deeper and calmer (the same hue). WHY: #E8796D is 2.8:1 on white; #C74B3D is 4.7:1
113
+ status: { fontSize: 13, errorColor: "#C74B3D", infoColor: Black(0.55), successColor: "#498335" },
101
114
  footer: { color: "#FAFAF9", lineColor: Black(0.1), padding: [16, 14], gap: 10, buttonHeight: 40, iconButtonWidth: 50 },
102
- fieldStyleName: "ozden", // the styleName of the InputB fields
103
- // variant: "centered" (a layout the user drew, the colors of ozden)
115
+ fieldStyleName: "ozden", // the styleName of the TextField fields
116
+ // variant: "centered" (the colors of ozden)
104
117
  centered: {
105
- // (2026-10-30, the user: a light gray circle on white, a dark icon; was a dark circle on a gray area)
118
+ // A light gray circle on white, a dark icon
106
119
  iconArea: { height: 116, color: "white", round: 6 }, // the area at the top
107
120
  iconCircle: { size: 100, color: "#EEEEEE" },
108
- icon: { size: 56, color: "#232323" },
121
+ icon: { size: 56, color: "#232323", lightColor: "#D2D2D0" }, // lightColor: LIGHT of a two-tone icon (no tone)
109
122
  buttonHeight: 48,
110
123
  buttonGap: 10,
111
- // The buttons are on the band of the footer (its color and line, the user 2026-10-30), one under the other
124
+ // The buttons are on the band of the footer (its color and line), one under the other
112
125
  footerPadding: [22, 18],
113
126
  },
114
- // The looks of the buttons: a style package of SmartButton and only what differs from it. The colors of the
115
- // situations are the situation packages of SmartButton (2026-10-31, the draft _designs/smart-button-colors.htm)
127
+ // The looks of the buttons: a template of SmartButton, a tone of it and only what differs from them. The colors
128
+ // of the situations are the tones of SmartButton (the draft _designs/smart-button-colors.htm)
116
129
  buttons: {
117
- primary: { styleName: "primary", style: {} },
118
- secondary: { styleName: "ozdenType1", style: {} }, // the gray of the package
119
- danger: { styleName: "danger", style: {} },
120
- warning: { styleName: "warning", style: {} },
121
- success: { styleName: "success", style: {} },
122
- info: { styleName: "info", style: {} },
130
+ primary: { styleName: "ozden", tone: "cyan", style: {} },
131
+ // the gray of the template, a faint edge (as the Cancel of _basic/examples/smart-button.htm)
132
+ secondary: { styleName: "ozden3", tone: "", style: {} },
133
+ danger: { styleName: "ozden", tone: "orange", style: {} },
134
+ warning: { styleName: "ozden", tone: "yellow", style: {} },
135
+ success: { styleName: "ozden", tone: "green", style: {} },
136
+ info: { styleName: "ozden", tone: "blue", style: {} },
137
+ // white, whitesmoke under the mouse (as the trash of the SmartButton samples). An icon button has no room at
138
+ // its sides by itself. A faint edge as Cancel (ozden3)
123
139
  icon: {
124
- styleName: "ozdenType2",
140
+ styleName: "ozden3",
141
+ tone: "white",
125
142
  style: {
126
- layout: { gap: 0, padding: [0, 0] },
127
- box: { color: "white" },
128
- hover: { color: "#FDF1EF" },
129
- active: { color: "#FDF1EF" },
130
- icon: { opacity: 1 }, // (30 px until 2026-10-29)
143
+ icon: { opacity: 1 },
131
144
  },
132
145
  },
133
146
  },
134
147
  // A button that asks again (ask): its red look and its bubble (comp/tooltip.js) are the style.ask of
135
- // SmartButton (its default, the user 2026-10-30). A page or a package may give its own here:
148
+ // SmartButton (its default). A page or a package may give its own here:
136
149
  // ask: { button: { color, border, borderColor, boxShadow, textColor, iconFilter }, bubble, time }
137
150
  },
138
151
  };
@@ -181,13 +194,13 @@ const Dialog = function (params = {}) {
181
194
  const id = "dialog-" + (Dialog.counter++);
182
195
  const OPEN_TIME = "0.2s";
183
196
  const OPEN_CURVE = "cubic-bezier(0.2, 0.8, 0.2, 1)"; // fast at first, soft at its place
184
- const OPEN_MOVE = 50 * box.scale; // px: the card comes up from here (the user, 2026-10-29)
197
+ const OPEN_MOVE = 50 * box.scale; // px: the card comes up from here
185
198
  // The px of the view that are not in the style (multiplied by scale, like the style)
186
199
  const LINE_WIDTH = 1 * box.scale; // the line over the footer
187
200
  const SECTION_SPACE = 8 * box.scale; // over the fields, under the icon at the top
188
201
  const FIELD_GAP = 10 * box.scale; // between the fields (and the objects of content)
189
202
  const STATUS_MIN_HEIGHT = 18 * box.scale;
190
- const INPUT_HEIGHT = 44 * box.scale; // a plain Input (without InputB)
203
+ const INPUT_HEIGHT = 44 * box.scale; // a plain Input (without TextField)
191
204
  const isCentered = (params.variant == "centered");
192
205
  let isOpen = 0;
193
206
  let isBusy = 0;
@@ -197,7 +210,7 @@ const Dialog = function (params = {}) {
197
210
 
198
211
  // *** PUBLIC VARIABLES:
199
212
  box.buttonList = []; // { data, button } (button: the SmartButton)
200
- box.fieldList = []; // { data, input } (input: InputB or Input)
213
+ box.fieldList = []; // { data, input } (input: TextField or Input)
201
214
 
202
215
  // *** PRIVATE FUNCTIONS:
203
216
 
@@ -215,15 +228,15 @@ const Dialog = function (params = {}) {
215
228
 
216
229
  const createField = function (field) {
217
230
  let input;
218
- if (typeof InputB !== "undefined") {
219
- input = InputB({
231
+ if (typeof TextField !== "undefined") {
232
+ input = TextField({
220
233
  styleName: _s.fieldStyleName,
221
- scale: box.scale, // (taken when InputB has a scale param; its sizes are fixed px today)
234
+ scale: box.scale, // (taken when TextField has a scale param; its sizes are fixed px today)
222
235
  width: "100%",
223
236
  titleText: field.titleText,
224
237
  placeholder: field.placeholder,
225
- inputValue: field.value,
226
- isRequired: field.required ? 1 : 0,
238
+ value: field.value,
239
+ required: field.required ? 1 : 0,
227
240
  });
228
241
  } else {
229
242
  input = Input({ width: "100%", height: INPUT_HEIGHT, placeholder: field.placeholder || field.titleText, value: field.value });
@@ -233,7 +246,7 @@ const Dialog = function (params = {}) {
233
246
  };
234
247
 
235
248
  const getFieldValue = function (item) {
236
- if (item.input.getInputValue) return item.input.getInputValue();
249
+ if (item.input.getValue) return item.input.getValue();
237
250
  return item.input.value;
238
251
  };
239
252
 
@@ -286,15 +299,14 @@ const Dialog = function (params = {}) {
286
299
  const style = JSON.parse(JSON.stringify(look.style));
287
300
  if (_s.ask) style.ask = _s.ask;
288
301
  if (box.scale === 1) return style;
289
- return scaleButtonStyle(style, look.styleName);
302
+ return scaleButtonStyle(style, look);
290
303
  };
291
304
 
292
- // WHY: SmartButton has no scale param: its whole style (the look over its package) is multiplied here, and the
293
- // button gets scale 1 (a SmartButton that has one must not multiply it again)
294
- const scaleButtonStyle = function (style, styleName) {
295
- const buttonParams = { styleName: styleName, style: style };
296
- const fullStyle = basic.applyStylePackage(buttonParams, SmartButton.styles, SmartButtonDefaults).style;
297
- mergeIntoIfMissing(fullStyle, SmartButtonDefaults.style);
305
+ // WHY: SmartButton has no scale param: its whole style (the look over its template and tone) is multiplied here,
306
+ // and the button gets scale 1 (a SmartButton that has one must not multiply it again).
307
+ // The whole style has the colors of the tone: a style given in full wins over a tone.
308
+ const scaleButtonStyle = function (style, look) {
309
+ const fullStyle = SmartButton.applyLook({ styleName: look.styleName, tone: look.tone, style: style }).style;
298
310
  const scaled = basic.scaleStyle(fullStyle, box.scale);
299
311
  // (the sizes that are not named like one)
300
312
  scaled.layout.iconSideTrim = fullStyle.layout.iconSideTrim * box.scale;
@@ -312,6 +324,7 @@ const Dialog = function (params = {}) {
312
324
 
313
325
  const button = SmartButton({
314
326
  styleName: look.styleName,
327
+ tone: look.tone || "",
315
328
  scale: 1, // WHY: its style is in the px of the dialog already (getButtonStyle)
316
329
  width: getButtonWidth(isIcon),
317
330
  height: isCentered ? _s.centered.buttonHeight : _s.footer.buttonHeight,
@@ -335,7 +348,7 @@ const Dialog = function (params = {}) {
335
348
  // Before the press of a button (and before its ask: the button asks "Sure?" itself, SmartButton ask)
336
349
  const canPressButton = function (item) {
337
350
  if (!box || isBusy) return false;
338
- // WHY the fields first (the user, 2026-10-29): a form with an error must not ask "Sure?" first
351
+ // WHY the fields first: a form with an error must not ask "Sure?" first
339
352
  if (item.data.type == "primary" && box.fieldList.length) {
340
353
  const error = checkFields();
341
354
  box.setStatus(error, "error");
@@ -504,22 +517,23 @@ const Dialog = function (params = {}) {
504
517
  return isBusy;
505
518
  };
506
519
 
507
- // A line under the message: type "error" (red) or "info"; "" hides it
520
+ // A line under the message (and the fields, the content): type "error" (red), "success" (green) or "info"; "" hides it
508
521
  box.setStatus = function (text, type = "info") {
522
+ const colors = { error: _s.status.errorColor, success: _s.status.successColor, info: _s.status.infoColor };
509
523
  box.lblStatus.plainText = text || "";
510
- box.lblStatus.textColor = (type == "error") ? _s.status.errorColor : _s.status.infoColor;
524
+ box.lblStatus.textColor = colors[type] || _s.status.infoColor;
511
525
  box.lblStatus.visible = text ? 1 : 0;
512
526
  };
513
- // USAGE: dialog.setStatus("Could not save.", "error")
527
+ // USAGE: dialog.setStatus("Could not save.", "error") / dialog.setStatus("The title is saved.", "success")
514
528
 
515
- box.setTitle = function (text) {
529
+ box.setTitleText = function (text) {
516
530
  box.titleText = text;
517
531
  setText(box.lblTitle, text);
518
532
  box.lblTitle.visible = text ? 1 : 0;
519
533
  box.card.aria = { labelledby: text ? box.lblTitle.elem.id : null, label: text ? null : (box.ariaLabel || null) };
520
534
  };
521
535
 
522
- box.setMessage = function (text) {
536
+ box.setMessageText = function (text) {
523
537
  box.messageText = text;
524
538
  setText(box.lblMessage, text);
525
539
  box.lblMessage.visible = text ? 1 : 0;
@@ -571,13 +585,30 @@ const Dialog = function (params = {}) {
571
585
  box.footer.css = { alignItems: "stretch", borderTop: LINE_WIDTH + "px solid " + _s.footer.lineColor, borderRadius: "0 0 " + _s.card.round + "px " + _s.card.round + "px", flexShrink: "0" };
572
586
  };
573
587
 
574
- // The icon at the top: a dark icon in a light gray circle
588
+ // The colors of the icon at the top: three tones of topIconTone, else the gray of the style
589
+ const getTopIconLook = function () {
590
+ const tone = Dialog.ICON_TONES[box.topIconTone];
591
+ if (tone) return tone;
592
+ const _c = _s.centered;
593
+ return { circle: _c.iconCircle.color, light: _c.icon.lightColor, strong: _c.icon.color };
594
+ };
595
+
596
+ // WHY: the words LIGHT and STRONG in an "<svg" text are the places of the two colors of a two-tone icon; CIRCLE
597
+ // is the color of the circle behind it (a ring around a part looks cut out of the icon)
598
+ const fillIconColors = function (file, look) {
599
+ const text = String(file);
600
+ if (!text.trim().startsWith("<svg")) return file;
601
+ return text.split("LIGHT").join(look.light).split("STRONG").join(look.strong).split("CIRCLE").join(look.circle);
602
+ };
603
+
604
+ // The icon at the top: in a light circle (gray: a dark icon; topIconTone: the tones of SmartButton)
575
605
  const createTopIcon = function () {
576
606
  const _c = _s.centered;
607
+ const look = getTopIconLook();
577
608
  box.iconArea = HGroup({ width: "100%", height: _c.iconArea.height, align: "center center", color: _c.iconArea.color, round: _c.iconArea.round });
578
609
  box.iconArea.css = { flexShrink: "0", marginBottom: SECTION_SPACE + "px" };
579
- HGroup({ width: _c.iconCircle.size, height: _c.iconCircle.size, align: "center center", color: _c.iconCircle.color, round: _c.iconCircle.size / 2 });
580
- box.topIcon = createIconView(box.topIconFile, _c.icon);
610
+ HGroup({ width: _c.iconCircle.size, height: _c.iconCircle.size, align: "center center", color: look.circle, round: _c.iconCircle.size / 2 });
611
+ box.topIcon = createIconView(fillIconColors(box.topIconFile, look), { size: _c.icon.size, color: look.strong });
581
612
  endGroup();
582
613
  endGroup();
583
614
  };
@@ -585,11 +616,14 @@ const Dialog = function (params = {}) {
585
616
  // WHY two ways: an "<svg" text takes the color of the style (currentColor); a file keeps its own colors
586
617
  const createIconView = function (file, look) {
587
618
  if (String(file).trim().startsWith("<svg")) {
588
- const label = Label({ width: look.size, height: look.size, text: file, textColor: look.color, css: { lineHeight: "0" } });
619
+ // WHY clipContent 0 and overflow visible: a part that moves (the lid of a bin that lifts) goes out of the
620
+ // drawing for a moment; it was cut at the top
621
+ const label = Label({ width: look.size, height: look.size, text: file, textColor: look.color, clipContent: 0, css: { lineHeight: "0" } });
589
622
  const svg = label.elem.querySelector("svg");
590
623
  if (svg) {
591
624
  svg.setAttribute("width", "100%");
592
625
  svg.setAttribute("height", "100%");
626
+ svg.style.overflow = "visible";
593
627
  }
594
628
  return label;
595
629
  }
@@ -601,7 +635,7 @@ const Dialog = function (params = {}) {
601
635
  box.color = _s.cover.color;
602
636
  // WHY: "absolute", not "fixed": the cover is on page, as big as page (page never scrolls). page.fit() / page.zoom give
603
637
  // <body> a transform, and a fixed box inside a transformed one is measured on it (a 0 px high body: the
604
- // dialog was not seen; the admin panel, 2026-10-31).
638
+ // dialog is not seen).
605
639
  box.css = { position: "absolute" };
606
640
  box.elem.style.display = "block"; // WHY: visible keeps the display type: without it, visible: 1 does not show it again
607
641
  box.clickable = 1;
@@ -673,8 +707,8 @@ const Dialog = function (params = {}) {
673
707
 
674
708
  // *** OBJECT INIT CODE:
675
709
 
676
- box.setTitle(box.titleText);
677
- box.setMessage(box.messageText);
710
+ box.setTitleText(box.titleText);
711
+ box.setMessageText(box.messageText);
678
712
  box.setStatus("");
679
713
  box.footer.visible = buttonList.length ? 1 : 0;
680
714
 
@@ -733,11 +767,16 @@ Dialog.closeAll = function () {
733
767
  document.addEventListener("keydown", function (event) {
734
768
  if (event.key != "Escape" || event.defaultPrevented) return;
735
769
  const top = Dialog.getTop();
736
- if (!top || !basic.isOn(top.closeOnEscape) || top.isBusy()) return;
770
+ if (!top) return;
737
771
  // WHY: the focus in an object made on page over the dialog (Ex: the list of a FullScreenSelect): its Escape
738
772
  const target = event.target;
739
773
  const isFocusFree = (target === document.body || target === document.documentElement);
740
774
  if (!isFocusFree && !top.elem.contains(target)) return;
775
+ // WHY: a modal keeps its Escape even when it does not close (closeOnEscape 0, busy): a SidePanel under it closed
776
+ if (!basic.isOn(top.closeOnEscape) || top.isBusy()) {
777
+ event.preventDefault();
778
+ return;
779
+ }
741
780
  event.preventDefault();
742
781
  event.stopPropagation();
743
782
  top.close("escape");
@@ -768,6 +807,7 @@ Dialog.confirm = function (params = {}) {
768
807
  style: params.style || {},
769
808
  variant: params.variant || "",
770
809
  topIconFile: params.topIconFile || "",
810
+ topIconTone: params.topIconTone || "",
771
811
  scale: params.scale,
772
812
  buttons: [
773
813
  { key: "cancel", text: params.cancelText || "Cancel", type: "secondary" },
@@ -816,6 +856,7 @@ Dialog.alert = function (params = {}) {
816
856
  style: params.style || {},
817
857
  variant: params.variant || "",
818
858
  topIconFile: params.topIconFile || "",
859
+ topIconTone: params.topIconTone || "",
819
860
  scale: params.scale,
820
861
  buttons: [{ key: "ok", text: params.buttonText || "OK", type: params.buttonType || "primary" }],
821
862
  onClose: function () { resolve(); },
@@ -834,6 +875,7 @@ Dialog.prompt = function (params = {}) {
834
875
  style: params.style || {},
835
876
  variant: params.variant || "",
836
877
  topIconFile: params.topIconFile || "",
878
+ topIconTone: params.topIconTone || "",
837
879
  scale: params.scale,
838
880
  fields: [{ key: "value", titleText: params.fieldText || "", placeholder: params.placeholder || "", value: params.value || "", required: params.required ? 1 : 0, validate: params.validate }],
839
881
  buttons: [
@@ -846,9 +888,105 @@ Dialog.prompt = function (params = {}) {
846
888
  };
847
889
  // USAGE: const name = await Dialog.prompt({ titleText: "Rename", value: "a.pdf", validate: (t) => (t.trim()) ? "" : "A name is needed." })
848
890
 
891
+ // The tones of an icon at the top (topIconTone): the circle behind it, the LIGHT shape and the STRONG details, made
892
+ // from the tones of SmartButton (the icons of _basic/examples/dialog-centered.htm).
893
+ // WHY STRONG this deep: the details read on the light shape (2.6:1) and on the circle (3.6:1), a white mark on it (3.9:1)
894
+ Dialog.ICON_TONES = {
895
+ cyan: { circle: "#EAF6F7", light: "#A5D9DD", strong: "#36898F" },
896
+ orange: { circle: "#FBEFEA", light: "#EDBAA5", strong: "#C4532A" },
897
+ yellow: { circle: "#FDF8E7", light: "#F5D77D", strong: "#9A7409" },
898
+ green: { circle: "#EEF7EB", light: "#B6DEA9", strong: "#4A8F33" },
899
+ blue: { circle: "#E9F4F9", light: "#A0CFE5", strong: "#2E81A8" },
900
+ };
901
+ // USAGE: Dialog({ variant: "centered", topIconTone: "green", topIconFile: '<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="11" fill="STRONG"/>...</svg>' })
902
+
849
903
  // *** STYLE PACKAGES:
850
904
  // USAGE: Dialog({ style: { card: { round: 12 } } }) // Change only some keys. (The width of the card is the param width.)
851
- // NOTE: more packages come (the user, 2026-10-29); a new one needs only the keys that differ from ozden.
905
+ // NOTE: more packages come; a new one needs only the keys that differ from ozden.
852
906
  Dialog.styles = {
853
907
  ozden: DialogDefaults.style,
908
+
909
+ // For a dark page: the black tones of the kit; the fields and the buttons take their dark looks.
910
+ ozdenDark: {
911
+ cover: { color: Black(0.65) },
912
+ card: {
913
+ color: "#232322",
914
+ border: 1,
915
+ borderColor: White(0.16),
916
+ boxShadow: "0 10px 30px rgba(0, 0, 0, 0.45)",
917
+ },
918
+ title: { textColor: White(0.92) },
919
+ message: { textColor: White(0.62) },
920
+ // WHY these colors: the errorColor and successColor of ozden are deepened for white; on this card they are too dark.
921
+ status: { errorColor: "#FF9F93", infoColor: White(0.6), successColor: "#7FE3B5" },
922
+ footer: { color: "#1C1C1B", lineColor: White(0.1) },
923
+ fieldStyleName: "ozdenDark",
924
+ centered: {
925
+ iconArea: { color: "#232322" },
926
+ iconCircle: { color: "#32322F" },
927
+ icon: { color: White(0.88), lightColor: White(0.35) },
928
+ },
929
+ buttons: {
930
+ primary: { styleName: "ozdenDark", tone: "cyanDark", style: {} },
931
+ secondary: { styleName: "ozden3Dark", tone: "", style: {} },
932
+ danger: { styleName: "ozdenDark", tone: "orangeDark", style: {} },
933
+ warning: { styleName: "ozdenDark", tone: "yellowDark", style: {} },
934
+ success: { styleName: "ozdenDark", tone: "greenDark", style: {} },
935
+ info: { styleName: "ozdenDark", tone: "blueDark", style: {} },
936
+ icon: {
937
+ styleName: "ozden3Dark",
938
+ tone: "",
939
+ style: {
940
+ icon: { opacity: 1 },
941
+ },
942
+ },
943
+ },
944
+ },
945
+ };
946
+
947
+ // The minimal theme (_designs/minimal-theme.htm): a card on the ground of the window with a line and no shadow, a
948
+ // 14 px title, a 13 px message, the buttons at the right with no band under them: the minimal SmartButtons (the main
949
+ // one "ink", a delete "minimalDanger"), the minimal fields. minimalDark: the same on a dark window.
950
+ Dialog.createMinimalStyle = function (colors) {
951
+ const button = function (tone) {
952
+ return { styleName: colors.buttonName, tone: tone, style: {} };
953
+ };
954
+ return {
955
+ cover: { color: colors.cover },
956
+ card: { color: colors.ground, round: 6, border: 1, borderColor: colors.lineHover, boxShadow: "none", padding: [16, 16], gap: 6, margin: 16 },
957
+ title: { fontSize: 14, textColor: colors.text, fontFamily: "opensans-bold" },
958
+ message: { fontSize: 13, textColor: colors.softText, lineHeight: 1.45 },
959
+ status: { fontSize: 12, errorColor: colors.danger, infoColor: colors.softText, successColor: colors.success },
960
+ footer: { color: "transparent", lineColor: "transparent", padding: [16, 14], gap: 8, buttonHeight: 28, iconButtonWidth: 28 },
961
+ fieldStyleName: colors.fieldName,
962
+ centered: {
963
+ iconArea: { height: 76, color: colors.ground, round: 4 },
964
+ iconCircle: { size: 56, color: colors.iconCircle },
965
+ icon: { size: 28, color: colors.text, lightColor: colors.faintText },
966
+ buttonHeight: 28,
967
+ buttonGap: 8,
968
+ footerPadding: [16, 14],
969
+ },
970
+ buttons: {
971
+ primary: button(colors.inkTone),
972
+ secondary: button(""),
973
+ danger: { styleName: colors.dangerName, tone: "", style: {} },
974
+ warning: button(""),
975
+ success: button(""),
976
+ info: button(""),
977
+ icon: { styleName: colors.buttonName, tone: "", style: { icon: { opacity: 1 } } },
978
+ },
979
+ };
980
+ };
981
+ Dialog.MINIMAL_COLORS = {
982
+ cover: Black(0.3), ground: "#FFFFFF", text: Black(0.85), softText: Black(0.55), faintText: Black(0.54), lineHover: Black(0.45),
983
+ danger: "#C24A36", success: "#2E9E74", iconCircle: Black(0.05),
984
+ buttonName: "minimal", dangerName: "minimalDanger", inkTone: "ink", fieldName: "minimal",
985
+ };
986
+ Dialog.styles.minimal = Dialog.createMinimalStyle(Dialog.MINIMAL_COLORS);
987
+ Dialog.MINIMAL_DARK_COLORS = {
988
+ cover: Black(0.6), ground: "#1A1A19", text: White(0.88), softText: White(0.55), faintText: White(0.48), lineHover: White(0.42),
989
+ danger: "#FF9F93", success: "#7FE3B5", iconCircle: White(0.06),
990
+ buttonName: "minimalDark", dangerName: "minimalDangerDark", inkTone: "inkDark", fieldName: "minimalDark",
854
991
  };
992
+ Dialog.styles.minimalDark = Dialog.createMinimalStyle(Dialog.MINIMAL_DARK_COLORS);
@@ -0,0 +1,65 @@
1
+ /* Bismillah */
2
+
3
+ /*
4
+
5
+ EmailField - v26.11
6
+
7
+ UI COMPONENT TEMPLATE
8
+ - You can customize, this template code as you need:
9
+ - NEW PROJECTS: styleName "light" (the default) on a light page, "dark" on a dark page (the packages
10
+ of TextField, comp/text-field.js; the look of _basic/examples/text-field-8-light-dark.htm), unless the user asks for another one.
11
+
12
+
13
+ Started Date: June 2024
14
+ Webpage: https://bug7a.github.io/js-components/
15
+
16
+ Copyright 2020-2026 Bugra Ozden <bugra.ozden@gmail.com> (https://bug7a.github.io/)
17
+ Licensed under the Apache License, Version 2.0
18
+ SPDX-License-Identifier: Apache-2.0
19
+
20
+ */
21
+
22
+ "use strict";
23
+
24
+ // Default values
25
+ const EmailFieldDefaults = {
26
+ required: 1,
27
+ type: "email",
28
+ titleText: "EMAIL",
29
+ placeholder: "example@site.com",
30
+ warningText: "Invalid email format",
31
+ warningColor: "#E5885E",
32
+ maxLength: 40,
33
+ };
34
+
35
+ const EmailField = function(params = {}) {
36
+
37
+ // Merge params first
38
+ // WHY the style package of TextField first: a key it sets (warningColor) wins over the defaults here, as over the
39
+ // defaults of TextField
40
+ basic.applyStylePackage(params, TextField.styles, TextFieldDefaults);
41
+ mergeIntoIfMissing(params, EmailFieldDefaults);
42
+
43
+ // BOX: Component container
44
+ const box = startExtendedObject(TextField, params);
45
+
46
+ // *** PRIVATE VARIABLES:
47
+ const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; // name@domain.ext
48
+
49
+ // *** PUBLIC VARIABLES:
50
+
51
+ // *** PRIVATE FUNCTIONS:
52
+
53
+ // *** PUBLIC FUNCTIONS:
54
+ box.isValid = function() { // OVERRIDE
55
+ return EMAIL_PATTERN.test(box.getValue()) ? 1 : 0;
56
+ };
57
+
58
+ // *** OBJECT VIEW:
59
+
60
+ // *** OBJECT INIT CODE:
61
+ box.checkInputValue(); // WHY: TextField checked the start value before this isValid(): "not-an-email" got status 0
62
+
63
+ return endExtendedObject(box);
64
+
65
+ };