nodality 1.0.84 → 1.0.104

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 (335) hide show
  1. package/dist/animator.cjs.js +1 -2
  2. package/dist/animator.esm.js +1 -2
  3. package/dist/appleanim.cjs.js +1 -1
  4. package/dist/appleanim.esm.js +1 -1
  5. package/dist/audionew.cjs.js +1 -2
  6. package/dist/audionew.esm.js +1 -2
  7. package/dist/base.cjs.js +0 -1
  8. package/dist/base.esm.js +1 -2
  9. package/dist/beta-desktop-bar.cjs.js +1 -0
  10. package/dist/beta-desktop-bar.esm.js +1 -0
  11. package/dist/beta-mobile-bar.cjs.js +1 -0
  12. package/dist/beta-mobile-bar.esm.js +1 -0
  13. package/dist/betaDesktopBar.esm.js +1 -1
  14. package/dist/betaMobileBar.esm.js +1 -1
  15. package/dist/bundle.umd.js +1 -2
  16. package/dist/button.cjs.js +1 -2
  17. package/dist/button.esm.js +1 -2
  18. package/dist/card-getter.cjs.js +1 -0
  19. package/dist/card-getter.esm.js +1 -0
  20. package/dist/cardGetter.esm.js +1 -1
  21. package/dist/center.cjs.js +1 -2
  22. package/dist/center.esm.js +1 -2
  23. package/dist/checkbox.cjs.js +1 -2
  24. package/dist/checkbox.esm.js +1 -2
  25. package/dist/code.cjs.js +1 -2
  26. package/dist/code.esm.js +1 -2
  27. package/dist/container.cjs.js +1 -2
  28. package/dist/container.esm.js +1 -2
  29. package/dist/data-list.cjs.js +1 -0
  30. package/dist/data-list.esm.js +1 -0
  31. package/dist/designer.cjs.js +1 -2
  32. package/dist/designer.esm.js +1 -2
  33. package/dist/dropdown.cjs.js +1 -2
  34. package/dist/dropdown.esm.js +1 -2
  35. package/dist/element-mapper.cjs.js +1 -0
  36. package/dist/element-mapper.esm.js +1 -0
  37. package/dist/elementMapper.cjs.js +1 -1
  38. package/dist/elementMapper.esm.js +1 -1
  39. package/dist/finalresult.esm.js +1 -2
  40. package/dist/flex-card.cjs.js +1 -0
  41. package/dist/flex-card.esm.js +1 -0
  42. package/dist/flex-grid.cjs.js +1 -0
  43. package/dist/flex-grid.esm.js +1 -0
  44. package/dist/flex-row.cjs.js +1 -0
  45. package/dist/flex-row.esm.js +1 -0
  46. package/dist/flexCard.cjs.js +1 -1
  47. package/dist/flexCard.esm.js +1 -1
  48. package/dist/floating-input.cjs.js +1 -0
  49. package/dist/floating-input.esm.js +1 -0
  50. package/dist/free.cjs.js +1 -2
  51. package/dist/free.esm.js +1 -2
  52. package/dist/horizontal-scroller.cjs.js +1 -0
  53. package/dist/horizontal-scroller.esm.js +1 -0
  54. package/dist/image-picker.cjs.js +1 -0
  55. package/dist/image-picker.esm.js +1 -0
  56. package/dist/image.cjs.js +1 -2
  57. package/dist/image.esm.js +1 -2
  58. package/dist/index.cjs.js +1 -2
  59. package/dist/index.esm.js +1 -2
  60. package/dist/keyframe-animation.cjs.js +1 -0
  61. package/dist/keyframe-animation.esm.js +1 -0
  62. package/dist/link-getter.cjs.js +1 -0
  63. package/dist/link-getter.esm.js +1 -0
  64. package/dist/link.cjs.js +1 -2
  65. package/dist/link.esm.js +1 -2
  66. package/dist/linkGetter.cjs.js +1 -1
  67. package/dist/linkGetter.esm.js +1 -1
  68. package/dist/meta-adder.cjs.js +1 -0
  69. package/dist/meta-adder.esm.js +1 -0
  70. package/dist/modal-2025.cjs.js +1 -0
  71. package/dist/modal-2025.esm.js +1 -0
  72. package/dist/multiswitcher.cjs.js +1 -0
  73. package/dist/multiswitcher.esm.js +1 -0
  74. package/dist/new-nav-bar.cjs.js +1 -0
  75. package/dist/new-nav-bar.esm.js +1 -0
  76. package/dist/picker.cjs.js +1 -2
  77. package/dist/picker.esm.js +1 -2
  78. package/dist/progress.cjs.js +1 -2
  79. package/dist/progress.esm.js +1 -2
  80. package/dist/radio.cjs.js +1 -2
  81. package/dist/radio.esm.js +1 -2
  82. package/dist/range.cjs.js +1 -2
  83. package/dist/range.esm.js +1 -2
  84. package/dist/scroll-video.cjs.js +1 -0
  85. package/dist/scroll-video.esm.js +1 -0
  86. package/dist/scrollvideo.cjs.js +1 -1
  87. package/dist/scrollvideo.esm.js +1 -1
  88. package/dist/side-bar.cjs.js +1 -0
  89. package/dist/side-bar.esm.js +1 -0
  90. package/dist/side-nav-bar.cjs.js +1 -0
  91. package/dist/side-nav-bar.esm.js +1 -0
  92. package/dist/simple-bar.cjs.js +1 -0
  93. package/dist/simple-bar.esm.js +1 -0
  94. package/dist/slider-2025.cjs.js +1 -0
  95. package/dist/slider-2025.esm.js +1 -0
  96. package/dist/spacer.cjs.js +0 -1
  97. package/dist/spacer.esm.js +1 -0
  98. package/dist/stack.cjs.js +1 -2
  99. package/dist/stack.esm.js +1 -2
  100. package/dist/stacker.cjs.js +1 -2
  101. package/dist/stacker.esm.js +1 -2
  102. package/dist/table.cjs.js +1 -2
  103. package/dist/table.esm.js +1 -2
  104. package/dist/text-field.cjs.js +1 -0
  105. package/dist/text-field.esm.js +1 -0
  106. package/dist/text.cjs.js +1 -2
  107. package/dist/text.esm.js +1 -2
  108. package/dist/transform-anim.cjs.js +1 -0
  109. package/dist/transform-anim.esm.js +1 -0
  110. package/dist/transformanim.cjs.js +1 -1
  111. package/dist/transformanim.esm.js +1 -1
  112. package/dist/ulist.cjs.js +1 -2
  113. package/dist/ulist.esm.js +1 -2
  114. package/dist/video.cjs.js +1 -0
  115. package/dist/video.esm.js +1 -2
  116. package/dist/wrap.cjs.js +0 -1
  117. package/dist/wrap.esm.js +1 -2
  118. package/dist/zoom-card.cjs.js +1 -0
  119. package/dist/zoom-card.esm.js +1 -0
  120. package/layout/animator.js +1 -1
  121. package/layout/audio.js +1 -1
  122. package/layout/audionew.js +1 -1
  123. package/layout/base-2.js +1 -1
  124. package/layout/base.js +1 -1
  125. package/layout/{betaDesktopBar.js → beta-desktop-bar.js} +1 -1
  126. package/layout/{betaMobileBar.js → beta-mobile-bar.js} +1 -1
  127. package/layout/box.js +1 -1
  128. package/layout/button.js +1 -1
  129. package/layout/cards.js +2 -1
  130. package/layout/center.js +1 -1
  131. package/layout/checkbox.js +1 -1
  132. package/layout/circle.js +1 -1
  133. package/layout/{cleanRow.js → clean-row.js} +1 -1
  134. package/layout/code.js +1 -1
  135. package/layout/container.js +1 -1
  136. package/layout/custom.js +1 -1
  137. package/layout/{divImage.js → div-image.js} +1 -1
  138. package/layout/{dropdown2025.js → dropdown-2025.js} +6 -1
  139. package/layout/dropdown.js +1 -1
  140. package/layout/{emptyElement.js → empty-element.js} +1 -1
  141. package/layout/{externalStylesheet.js → external-stylesheet.js} +1 -1
  142. package/layout/{flexCard.js → flex-card.js} +3 -1
  143. package/layout/{flexGrid.js → flex-grid.js} +1 -1
  144. package/layout/{flexrow.js → flex-row.js} +1 -1
  145. package/layout/footer.js +1 -1
  146. package/layout/{formComponents → form-components}/custom.js +1 -1
  147. package/layout/{formComponents/dataList.js → form-components/data-list.js} +1 -1
  148. package/layout/{formComponents/floatingInput.js → form-components/floating-input.js} +1 -1
  149. package/layout/{formComponents → form-components}/form-all.js +1 -1
  150. package/layout/{formComponents → form-components}/form.js +1 -1
  151. package/layout/{formComponents/imagePicker.js → form-components/image-picker.js} +1 -1
  152. package/layout/{formComponents → form-components}/picker.js +1 -1
  153. package/layout/{formComponents → form-components}/radio.js +1 -1
  154. package/layout/{formComponents → form-components}/radiogroup.js +1 -1
  155. package/layout/{formComponents → form-components}/range.js +1 -1
  156. package/layout/free.js +1 -1
  157. package/layout/grid-new.js +1 -1
  158. package/layout/{gridSwitcher.js → grid-switcher.js} +1 -1
  159. package/layout/grid.js +1 -1
  160. package/layout/group.js +1 -1
  161. package/layout/header.js +1 -1
  162. package/layout/{horizontalScroller.js → horizontal-scroller.js} +1 -1
  163. package/layout/image-old.js +1 -1
  164. package/layout/image.js +1 -1
  165. package/layout/index.js +49 -37
  166. package/layout/label.js +1 -1
  167. package/layout/link.js +1 -1
  168. package/layout/list-OLD.js +1 -1
  169. package/layout/list.js +1 -1
  170. package/layout/{metaAdder.js → meta-adder.js} +1 -1
  171. package/layout/{modal2025.js → modal-2025.js} +1 -1
  172. package/layout/modernwrap.js +1 -1
  173. package/layout/multiswitcher.js +1 -1
  174. package/layout/multiswitcherBeta.js +1 -1
  175. package/layout/{navBar.js → nav-bar.js} +1 -1
  176. package/layout/{navFactor/customDiv.js → nav-factor/custom-div.js} +1 -1
  177. package/layout/navBar-OLD.js +1 -1
  178. package/layout/{newFlatAdder.js → new-flat-adder.js} +1 -1
  179. package/layout/{newNavBar.js → new-nav-bar.js} +1 -1
  180. package/layout/{offsetContainer.js → offset-container.js} +1 -1
  181. package/layout/polygon.js +1 -1
  182. package/layout/progress.js +1 -1
  183. package/layout/row.js +1 -1
  184. package/layout/{savedNewNavBar.js → saved-new-nav-bar.js} +1 -1
  185. package/layout/{scrollvideo.js → scroll-video.js} +1 -1
  186. package/layout/{sideBar.js → side-bar.js} +1 -1
  187. package/layout/{sideNavBar.js → side-nav-bar.js} +1 -1
  188. package/layout/{simpleBar.js → simple-bar.js} +1 -1
  189. package/layout/{slider2025.js → slider-2025.js} +1 -1
  190. package/layout/spacer.js +1 -1
  191. package/layout/stack.js +1 -1
  192. package/layout/styler.js +1 -1
  193. package/layout/switcher.js +1 -1
  194. package/layout/table.js +1 -1
  195. package/layout/{textField.js → text-field.js} +1 -1
  196. package/layout/text.js +1 -1
  197. package/layout/ulist.js +1 -1
  198. package/layout/video.js +1 -1
  199. package/layout/{withoutNew.js → without-new.js} +1 -1
  200. package/layout/wrap.js +1 -1
  201. package/layout/{zoomCard.js → zoom-card.js} +1 -1
  202. package/lib/{cardGetter.js → card-getter.js} +1 -1
  203. package/lib/designer.js +49 -49
  204. package/lib/{elementMapper.js → element-mapper.js} +56 -37
  205. package/lib/{KeyframeAnimation.js → keyframe-animation.js} +1 -1
  206. package/lib/{linkGetter.js → link-getter.js} +1 -1
  207. package/lib/{scrollvideo.js → scroll-video.js} +1 -1
  208. package/lib/{Stacker.js → stacker.js} +2 -1
  209. package/lib/{TransformAnim.js → transform-anim.js} +1 -1
  210. package/package.json +4 -2
  211. package/dist/KeyframeAnimation.cjs.js +0 -2
  212. package/dist/KeyframeAnimation.cjs.js.LICENSE.txt +0 -5
  213. package/dist/KeyframeAnimation.esm.js +0 -2
  214. package/dist/KeyframeAnimation.esm.js.LICENSE.txt +0 -5
  215. package/dist/animator.cjs.js.LICENSE.txt +0 -5
  216. package/dist/animator.esm.js.LICENSE.txt +0 -5
  217. package/dist/appleanim.cjs.js.LICENSE.txt +0 -5
  218. package/dist/appleanim.esm.js.LICENSE.txt +0 -5
  219. package/dist/audionew.cjs.js.LICENSE.txt +0 -5
  220. package/dist/audionew.esm.js.LICENSE.txt +0 -5
  221. package/dist/base.cjs.js.LICENSE.txt +0 -5
  222. package/dist/base.esm.js.LICENSE.txt +0 -5
  223. package/dist/betaDesktopBar.esm.js.LICENSE.txt +0 -5
  224. package/dist/betaMobileBar.esm.js.LICENSE.txt +0 -5
  225. package/dist/bundle.umd.js.LICENSE.txt +0 -5
  226. package/dist/button.cjs.js.LICENSE.txt +0 -5
  227. package/dist/button.esm.js.LICENSE.txt +0 -5
  228. package/dist/cardGetter.cjs.js.LICENSE.txt +0 -5
  229. package/dist/cardGetter.esm.js.LICENSE.txt +0 -5
  230. package/dist/center.cjs.js.LICENSE.txt +0 -5
  231. package/dist/center.esm.js.LICENSE.txt +0 -5
  232. package/dist/checkbox.cjs.js.LICENSE.txt +0 -5
  233. package/dist/checkbox.esm.js.LICENSE.txt +0 -5
  234. package/dist/circle.cjs.js +0 -2
  235. package/dist/circle.cjs.js.LICENSE.txt +0 -5
  236. package/dist/circle.esm.js +0 -2
  237. package/dist/circle.esm.js.LICENSE.txt +0 -5
  238. package/dist/code.cjs.js.LICENSE.txt +0 -5
  239. package/dist/code.esm.js.LICENSE.txt +0 -5
  240. package/dist/container.cjs.js.LICENSE.txt +0 -5
  241. package/dist/container.esm.js.LICENSE.txt +0 -5
  242. package/dist/datalist.cjs.js.LICENSE.txt +0 -5
  243. package/dist/datalist.esm.js.LICENSE.txt +0 -5
  244. package/dist/designer.cjs.js.LICENSE.txt +0 -5
  245. package/dist/designer.esm.js.LICENSE.txt +0 -5
  246. package/dist/dropdown.cjs.js.LICENSE.txt +0 -5
  247. package/dist/dropdown.esm.js.LICENSE.txt +0 -5
  248. package/dist/elementMapper.cjs.js.LICENSE.txt +0 -5
  249. package/dist/elementMapper.esm.js.LICENSE.txt +0 -5
  250. package/dist/finalresult.esm.js.LICENSE.txt +0 -5
  251. package/dist/flexCard.cjs.js.LICENSE.txt +0 -5
  252. package/dist/flexCard.esm.js.LICENSE.txt +0 -5
  253. package/dist/flexGrid.cjs.js.LICENSE.txt +0 -5
  254. package/dist/flexGrid.esm.js.LICENSE.txt +0 -5
  255. package/dist/flexRow.cjs.js.LICENSE.txt +0 -5
  256. package/dist/flexRow.esm.js.LICENSE.txt +0 -5
  257. package/dist/floatingInput.cjs.js.LICENSE.txt +0 -5
  258. package/dist/floatingInput.esm.js.LICENSE.txt +0 -5
  259. package/dist/free.cjs.js.LICENSE.txt +0 -5
  260. package/dist/free.esm.js.LICENSE.txt +0 -5
  261. package/dist/gridSwitcher.cjs.js +0 -2
  262. package/dist/gridSwitcher.cjs.js.LICENSE.txt +0 -5
  263. package/dist/gridSwitcher.esm.js +0 -2
  264. package/dist/gridSwitcher.esm.js.LICENSE.txt +0 -5
  265. package/dist/horizontalScroller.esm.js.LICENSE.txt +0 -5
  266. package/dist/image.cjs.js.LICENSE.txt +0 -5
  267. package/dist/image.esm.js.LICENSE.txt +0 -5
  268. package/dist/imagePicker.cjs.js.LICENSE.txt +0 -5
  269. package/dist/imagePicker.esm.js.LICENSE.txt +0 -5
  270. package/dist/index.cjs.js.LICENSE.txt +0 -5
  271. package/dist/index.esm.js.LICENSE.txt +0 -5
  272. package/dist/link.cjs.js.LICENSE.txt +0 -5
  273. package/dist/link.esm.js.LICENSE.txt +0 -5
  274. package/dist/linkGetter.cjs.js.LICENSE.txt +0 -5
  275. package/dist/linkGetter.esm.js.LICENSE.txt +0 -5
  276. package/dist/metaAdder.cjs.js.LICENSE.txt +0 -5
  277. package/dist/metaAdder.esm.js.LICENSE.txt +0 -5
  278. package/dist/modal2025.cjs.js.LICENSE.txt +0 -5
  279. package/dist/modal2025.esm.js.LICENSE.txt +0 -5
  280. package/dist/multiswitchers.esm.js.LICENSE.txt +0 -5
  281. package/dist/newNavBar.cjs.js.LICENSE.txt +0 -5
  282. package/dist/newNavBar.esm.js.LICENSE.txt +0 -5
  283. package/dist/picker.cjs.js.LICENSE.txt +0 -5
  284. package/dist/picker.esm.js.LICENSE.txt +0 -5
  285. package/dist/polygon.cjs.js +0 -2
  286. package/dist/polygon.cjs.js.LICENSE.txt +0 -5
  287. package/dist/polygon.esm.js +0 -2
  288. package/dist/polygon.esm.js.LICENSE.txt +0 -5
  289. package/dist/progress.cjs.js.LICENSE.txt +0 -5
  290. package/dist/progress.esm.js.LICENSE.txt +0 -5
  291. package/dist/radio.cjs.js.LICENSE.txt +0 -5
  292. package/dist/radio.esm.js.LICENSE.txt +0 -5
  293. package/dist/range.cjs.js.LICENSE.txt +0 -5
  294. package/dist/range.esm.js.LICENSE.txt +0 -5
  295. package/dist/scrollvideo.cjs.js.LICENSE.txt +0 -5
  296. package/dist/scrollvideo.esm.js.LICENSE.txt +0 -5
  297. package/dist/sideBar.cjs.js.LICENSE.txt +0 -5
  298. package/dist/sideBar.esm.js.LICENSE.txt +0 -5
  299. package/dist/sideNavBar.cjs.js.LICENSE.txt +0 -5
  300. package/dist/sideNavBar.esm.js.LICENSE.txt +0 -5
  301. package/dist/simpleBar.cjs.js.LICENSE.txt +0 -5
  302. package/dist/simpleBar.esm.js.LICENSE.txt +0 -5
  303. package/dist/slider2025.cjs.js +0 -2
  304. package/dist/slider2025.cjs.js.LICENSE.txt +0 -5
  305. package/dist/slider2025.esm.js +0 -2
  306. package/dist/slider2025.esm.js.LICENSE.txt +0 -5
  307. package/dist/spacer.cjs.js.LICENSE.txt +0 -5
  308. package/dist/stack.cjs.js.LICENSE.txt +0 -5
  309. package/dist/stack.esm.js.LICENSE.txt +0 -5
  310. package/dist/stacker.cjs.js.LICENSE.txt +0 -5
  311. package/dist/stacker.esm.js.LICENSE.txt +0 -5
  312. package/dist/table.cjs.js.LICENSE.txt +0 -5
  313. package/dist/table.esm.js.LICENSE.txt +0 -5
  314. package/dist/text.cjs.js.LICENSE.txt +0 -5
  315. package/dist/text.esm.js.LICENSE.txt +0 -5
  316. package/dist/textField.cjs.js.LICENSE.txt +0 -5
  317. package/dist/textField.esm.js.LICENSE.txt +0 -5
  318. package/dist/transformanim.cjs.js.LICENSE.txt +0 -5
  319. package/dist/transformanim.esm.js.LICENSE.txt +0 -5
  320. package/dist/ulist.cjs.js.LICENSE.txt +0 -5
  321. package/dist/ulist.esm.js.LICENSE.txt +0 -5
  322. package/dist/video.esm.js.LICENSE.txt +0 -5
  323. package/dist/wrap.cjs.js.LICENSE.txt +0 -5
  324. package/dist/wrap.esm.js.LICENSE.txt +0 -5
  325. package/dist/zoomCard.cjs.js.LICENSE.txt +0 -5
  326. package/dist/zoomCard.esm.js.LICENSE.txt +0 -5
  327. package/layout/<head> +0 -59
  328. package/layout/DEADJOE +0 -49
  329. package/layout/DEPRECATED-PARAGRAPH.js +0 -109
  330. package/layout/edit.sh +0 -39
  331. package/layout/formComponents/edit.sh +0 -39
  332. package/layout/navFactor/edit.sh +0 -39
  333. package/layout/newNavBar copy 2.js +0 -921
  334. package/layout/newNavBar copy.js +0 -780
  335. package/lib/AppleAnim.js +0 -794
@@ -1,780 +0,0 @@
1
- /*!
2
- * nodality v1.0.84
3
- * (c) 2025 Filip Vabrousek
4
- * License: MIT
5
- */
6
-
7
- import {Animator} from "./animator.js";
8
-
9
- // const { TIS620_THAI_CI } = require("mysql/lib/protocol/constants/charsets");
10
-
11
- class UINavBar extends Animator {
12
- constructor(els) {
13
- super();
14
- this.titleText = "";
15
- this.hasHamburger = false;
16
- this.code = [];
17
- this.attributes = {};
18
- }
19
-
20
- toCode(){
21
- let codeStr = `new UINavBar()`;
22
- // 16:01:09 09/11/24 What????
23
- // Convert attributes to .set({...}) format if there are any attributes
24
- if (Object.keys(this.attributes).length > 0) {
25
- codeStr += `.setup(${JSON.stringify(this.attributes, null, 2).replace(/"([^"]+)":/g, '$1:')})`;
26
-
27
- // codeStr += `.set(${JSON.stringify(this.attributes, null, 2)})`;
28
- } else {
29
- codeStr += `.setup({})`;
30
- }
31
-
32
- codeStr += `.items([\n`;
33
-
34
- // Generate the code for each item and join with commas only between items
35
- codeStr += this.items
36
- .map(item => item.toCode().join("").trim()) // Trim any line breaks or whitespace around the item code
37
- .join(",\n"); // Insert commas only between items
38
-
39
- codeStr += `\n])`;
40
-
41
- return codeStr;
42
-
43
- }
44
-
45
- styled(obj) {
46
- this.setup(obj);
47
- this.styles = obj;
48
- return this;
49
- }
50
-
51
- setup(obj) {
52
- this.obj = obj;
53
- if (!this.obj.isSide) { // fuck that, not even Ing. can solve this
54
- this.obj.animate = false;
55
- }
56
-
57
- this.attributes = obj;
58
- let wrap = document.createElement("div");
59
- wrap.setAttribute("id", "sars");
60
- wrap.style.padding = 0;
61
- wrap.style.margin = 0;
62
-
63
- let el = document.createElement("div");
64
- el.setAttribute("id", "covid");
65
- el.style.position = "absolute";
66
- el.style.width = "100%";
67
- el.style.zIndex = 1;
68
- el.style.alignItems = "flex-start";
69
- // LINE 700 FINAL STYLING !!!
70
-
71
-
72
-
73
- let back = document.createElement("div");
74
- back.style.background = "green";
75
- back.style.position = "absolute";
76
-
77
- el.style.margin = "20px";
78
- el.style.display = "flex";
79
- el.style.alignItems = "flex-end";
80
- el.style.margin = 0;
81
- el.style.padding = 0;
82
- el.style.margin = 0;
83
-
84
- wrap.appendChild(el);
85
-
86
-
87
- this.addCloseButton = false;
88
- this.res = wrap;
89
- console.log(this.res);
90
-
91
-
92
- if (obj.background) {
93
- this.background({
94
- color: obj.background
95
- });
96
- }
97
-
98
-
99
- if (obj.openColor){
100
- this.openColor = obj.openColor;
101
- }
102
-
103
-
104
- if (obj.sticky) {
105
- this.sticky();
106
- }
107
-
108
-
109
- if (obj.hamburgerColour) {
110
- this.hamburgerColour = obj.hamburgerColour;
111
- }
112
-
113
- if (obj.mobileSize) {
114
- this.mobileSize = obj.mobileSize;
115
- }
116
-
117
- if (obj.desktopSize) {
118
- this.desktopSize = obj.desktopSize;
119
- }
120
-
121
- if (obj.height) {
122
- this.res.children[0].style.height = obj.height;
123
- }
124
-
125
- return this;
126
- }
127
-
128
-
129
- items(items) {
130
-
131
- this.items = items;
132
-
133
- let starts = ["Link", "Image", "Spacer"].some(e => {
134
- return items[0].__proto__
135
- .constructor
136
- .toString()
137
- .startsWith(`class ${e}`);
138
- });
139
-
140
- console.log(starts);
141
-
142
- if (starts) { // We are adding class instances to the Area
143
-
144
- this.itemCount = items.length; // 675 lines was
145
- let rend = new CustomDivRenderer(this.obj, this.items);
146
- let outerDiv = rend.render();
147
-
148
- this.res.children[0].appendChild(outerDiv);
149
-
150
-
151
-
152
- let child = this.res.children[0].children[0].children[0];
153
- console.log("AHELLO");
154
- console.log(child);
155
- console.log(child.children);
156
-
157
-
158
- // dont solve range object
159
- console.log("ANIMATION OBJECT ");
160
-
161
- // Read initial state from this
162
-
163
- let animation = this.items[0].options.animation.op;
164
- console.log(animation);
165
-
166
-
167
-
168
- if (animation){
169
-
170
-
171
- let mobileMedia = window.matchMedia(`(max-device-width: 415px)`);
172
-
173
- let smallScreen = window.matchMedia(`(max-width: 600px)`);
174
-
175
- if (!mobileMedia.matches && !smallScreen.matches){
176
-
177
-
178
- for (var i = 0; i < child.children.length; i++){
179
- child.children[i].style.border = "1px solid purple";
180
-
181
- // 1 - SET HIDDEN STATE BY IMMEDIATELLY FIRING ANIM
182
- // set hidden state immediatelly on the mobile
183
- let immediateAll = {
184
- duration: 1, // 1 should be acceptable here when I close
185
- fill: 'forwards',
186
- delay: 1
187
- }
188
-
189
- child.children[i].animate(animation.keyframesClose, immediateAll);
190
-
191
- // 2 - ANIMATE INTO THE VIEW
192
- // animate using opening keyframes on the mobile when user click the button
193
- // when mobile nav is in opended state an I click button to set it to closing state
194
- // animate "#innerItemsWrapper" children using closing options
195
- child.children[i].animate(animation.keyframesOpen, animation.openOptions);
196
-
197
-
198
-
199
-
200
- }
201
- } else { // We are in animated state on mobile
202
- let immediateAll = {
203
- duration: 1, // 1 should be acceptable here when I close
204
- fill: 'forwards',
205
- delay: 1
206
- }
207
-
208
- console.log("CHILDREN");
209
- console.log(child);
210
- console.log(child.children);
211
-
212
- for (var i = 0; i < child.children.length; i++){
213
- child.children[i].animate(animation.keyframesClose, immediateAll);
214
- }
215
-
216
- }
217
-
218
- }
219
-
220
- this.adjust();
221
- }
222
-
223
- if (!starts) { // User is lazy
224
-
225
- this.itemCount = items.length;
226
-
227
- let div = document.createElement("div");
228
- div.style.backgroundColor = "orange";
229
-
230
- for (var i = 0; i < items.length; i++) {
231
- let item = items[i];
232
-
233
-
234
- if (item.logo) {
235
- let logo = new Image(item.logo).width("100px");
236
- let spacer = document.createElement("div");
237
- spacer.style.flex = "1";
238
- spacer.style.height = 23;
239
-
240
- let wr = document.createElement("div");
241
- wr.setAttribute("id", "WR")
242
- wr.style.display = "flex";
243
- wr.style.flexDirection = "row";
244
- wr.appendChild(logo.render());
245
- this.res.children[0].appendChild(logo.render());
246
-
247
-
248
-
249
- // throws it
250
-
251
- if (this.obj.spacing) {
252
- this.res.children[0].appendChild(spacer);
253
- }
254
- }
255
-
256
-
257
- if (item.logo) {
258
- this.allowPad = true;
259
- }
260
-
261
- if (item.logo && this.obj.spacing) {
262
- this.res.children[0].children[0].style.marginLeft = this.obj.spacing.sides;
263
- this.res.children[0].children[0].style.marginRight = this.obj.spacing.sides;
264
- }
265
-
266
-
267
- if (item.title) {
268
-
269
- let link;
270
- if (this.allowPad) {
271
- if (item.type) {
272
- link = new Dropdown(item.items, item.title)
273
- } else {
274
- link = new Link(item.title, item.url)
275
- .arrayPadding(["left", "right"], "1em");
276
- }
277
-
278
- } else {
279
-
280
- if (item.type) {
281
- link = new Link("DRPA", item.url);
282
- } else {
283
- link = new Link(item.title, item.url);
284
- }
285
-
286
- }
287
-
288
- div.appendChild(link.render());
289
- }
290
-
291
- }
292
-
293
- this.res.children[0].appendChild(div);
294
- this.adjust();
295
- }
296
-
297
-
298
-
299
-
300
- // Insert hamburger button at the correct place
301
- var btn = this.addHamburger();
302
-
303
- let newCount = this.itemCount;
304
- if (this.obj.spacing) {
305
- newCount += 1;
306
- }
307
-
308
- btn.style.zIndex = 1;
309
-
310
- if (this.res.children[0].children.length === 1) { // Problem here
311
- this.res.children[0].insertBefore(btn, this.res.children[0].firstChild);
312
- }
313
-
314
- return this;
315
- }
316
-
317
- instance() {
318
- return this.res.children[0];
319
- }
320
-
321
- sticky() {
322
- this.res.children[0].style.position = "fixed";
323
- return this;
324
- }
325
-
326
- font(family) {
327
-
328
- for (var i = 0; i < this.res.children[0].children; i++) {
329
- this.res.children[0].children[i].style.fontFamily = family;
330
- }
331
-
332
- return this;
333
- }
334
-
335
-
336
-
337
- openSymbol(symbol) {
338
- this.symbol = symbol;
339
- return this;
340
- }
341
-
342
-
343
- background(obj) {
344
-
345
- if (!obj.background){
346
- this.res.children[0].style.backgroundColor = "transparent";
347
- return this;
348
- }
349
-
350
- this.res.children[0].style.backgroundColor = obj.color;
351
- this.res.children[0].style.opacity = obj.opacity;
352
- return this;
353
- }
354
-
355
- transluescent() {
356
- this.res.children[0].style.backgroundColor = "rgba(255,255,255,0.72)";
357
- return this;
358
- }
359
-
360
-
361
- keepItem(item) {
362
- console.log("Wow");
363
- this.keepItem = item;
364
- return this;
365
- }
366
-
367
- addHamburger = () => {
368
- let media2 = window.matchMedia(`(max-device-width: 415px)`);
369
-
370
- var btn = document.createElement("button");
371
- btn.setAttribute("id", "hamburger");
372
- btn.style.border = "none";
373
- btn.style.fontWeight = "bold";
374
- btn.style.position = "absolute"; // NEW
375
- btn.style.color = "orange";//this.obj.hamColour.opened; //this.hamburgerColour ?? "#3498db";
376
- btn.style.backgroundColor = "transparent";
377
- btn.style.fontSize = media2.matches ? "2.1em" : "2em";
378
-
379
- var node = document.createTextNode(this.symbol ? this.symbol : "☰");
380
- btn.appendChild(node);
381
- btn.style.marginLeft = "auto";
382
-
383
- this.isShown = false;
384
-
385
- btn.addEventListener("click", () => {
386
- this.isShown = !this.isShown;
387
-
388
- this.hasAnimatedToWide = false;
389
-
390
- // alert("Hello");
391
- // alert(this.res.children[0].children[1].children[0].getAttribute("id"));
392
-
393
- // zmenším, otevřu, roztáhnu, zmenším => musím klinout 2x
394
- // zmenším => kliknu => animace se rozjede 2x
395
-
396
- let animation = this.items[0].options.animation.op;
397
-
398
-
399
-
400
- const innerItemsWrapper = this.res.children[0].children[1].children[0];
401
-
402
- if (animation){
403
-
404
-
405
-
406
- console.log("Why not showing on 600px????");
407
- console.log(this.isShown);
408
-
409
- if (this.isShown){
410
- innerItemsWrapper.parentElement.style.display = "block";
411
- } else {
412
- innerItemsWrapper.parentElement.style.display = "none";
413
- }
414
-
415
- for (var i = 0; i < innerItemsWrapper.children.length; i++){
416
- let inner = innerItemsWrapper.children[i];
417
-
418
- if (this.isShown){
419
-
420
- // if (inner.style.translateX != 0)
421
- inner.animate(animation.keyframesOpen, animation.openOptions);
422
- } else {
423
- inner.animate(animation.keyframesClose, animation.closeOptions);
424
- }
425
- }
426
-
427
- /* if (!this.isShown){
428
- inner.animate(animation.keyframesClose, animation.closeOptions);
429
- }*/
430
-
431
- }
432
-
433
-
434
- // Hide outerItemsWrapper or animate links
435
- })
436
-
437
- // let hamb = document.querySelector("#hamburger");
438
- // alert(this.res.children[0].children[0].getAttribute("id"));
439
-
440
- return btn;
441
- }
442
-
443
- /*--------------------------------------------------ADJUST--------------------------------------------------*/
444
- // set habmurger icon
445
- adjust(w) {
446
- let media = window.matchMedia(`(max-width: 600px)`);
447
- let media2 = window.matchMedia(`(max-device-width: 415px)`);
448
-
449
- const adjustFontSize = () => {
450
- console.log("IN VIEWPORT");
451
-
452
- console.log(this.res);
453
- for (var i = 0; i < this.res.children[0].children.length; i++) {
454
- let el = this.res.children[0].children[i];
455
- el.style.fontSize = media2.matches ? (this.mobileSize ? this.mobileSize : "1.2em") : (this.desktopSize ? this.desktopSize : "1em");
456
-
457
-
458
- if (el.textContent === "☰") {
459
- el.style.fontSize = "2em";
460
- }
461
- }
462
-
463
-
464
- }
465
-
466
-
467
- const findNestedDivWithId = (elements, targetId) => {
468
- for (var i = 0; i < elements.length; i++) {
469
- var element = elements[i];
470
-
471
- if (element.id === targetId) {
472
- return element; // Found the target div
473
- }
474
-
475
- // Check nested children recursively
476
- var foundInChildren = findNestedDivWithId(element.children, targetId);
477
- if (foundInChildren) {
478
- return foundInChildren;
479
- }
480
- }
481
- return null; // If not found
482
- }
483
-
484
- const toWideScreen = () => {
485
-
486
-
487
- let my = this.res.children[0];
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
-
496
-
497
-
498
-
499
-
500
-
501
-
502
-
503
-
504
-
505
-
506
-
507
-
508
- for (var i = 0; i < this.res.children[0].children.length; i++) {
509
-
510
- let child = this.res.children[0].children[i];
511
-
512
- child.style.marginTop = "0em";
513
-
514
- if (child.id === "WR") {
515
- child.style.display = "flex";
516
- } else {
517
- child.style.display = "flex";
518
- }
519
-
520
- if (child.textContent === this.titleText && this.titleText.length > 0) {
521
- alert(child.textContent)
522
- child.style.fontSize = "2em";
523
- }
524
- }
525
-
526
-
527
-
528
-
529
- // animate back
530
-
531
-
532
- let animation = this.items[0].options.animation.op;
533
-
534
-
535
-
536
- const covid = this.res.children[0];
537
- const innerItemsWrapper = findNestedDivWithId(this.res.children, 'innerItemsWrapper');
538
- ///covid.children[0].children[1].children[0];
539
-
540
- console.log("KINNERA");
541
- console.log(innerItemsWrapper);
542
-
543
- console.log("COVID");
544
- console.log(covid);
545
- // innerItemsWrapper.style.border = "3px solid orange";
546
- innerItemsWrapper.style.marginTop = "0";
547
-
548
- if (animation){
549
- console.log("Why not showing on 600px????")
550
- console.log("TOWIDE");
551
-
552
-
553
- console.log(covid);
554
- // console.log(covid.children[1].children[0]);
555
-
556
- // alert("OIJHIOHO")
557
-
558
- // close the nav an expand bad
559
-
560
- if (!this.hasAnimatedToWide){
561
- this.hasAnimatedToWide = true;
562
-
563
- for (var i = 0; i < innerItemsWrapper.children.length; i++){
564
-
565
- let link = innerItemsWrapper.children[i];
566
-
567
-
568
-
569
-
570
- link.animate(animation.keyframesOpen, animation.openOptions);
571
-
572
- }
573
- }
574
-
575
- // after expannding and closing inner is udnefined
576
-
577
-
578
- // inner.animate(animation.keyframesOpen, animation.openOptions);
579
-
580
- /* if (this.isShown){
581
- inner.animate(animation.keyframesOpen, animation.openOptions);
582
- } else {
583
- inner.animate(animation.keyframesClose, animation.closeOptions);
584
- }*/
585
- // }
586
- }
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
-
602
-
603
-
604
-
605
-
606
-
607
-
608
-
609
-
610
- }
611
-
612
- // nice library!
613
- const doInAdjust = () => {
614
-
615
- this.isShown = false;
616
-
617
-
618
- let my = this.res.children[0];
619
-
620
-
621
- adjustFontSize();
622
- var closed = false;
623
-
624
-
625
- this.res.children[0].style.flexDirection = "column";
626
-
627
- for (var i = 0; i < this.res.children[0].children.length; i++) {
628
- if (this.res.children[0].children[i].textContent == "☰" || this.res.children[0].children[i].textContent == /*"Lands"*/ this.keepItem) {
629
-
630
-
631
- let child = this.res.children[0].children[i];
632
- if (child.id === "WR") {
633
- this.res.children[0].children[i].style.display = "flex";
634
- } else {
635
- this.res.children[0].children[i].style.display = "flex";
636
- }
637
-
638
-
639
-
640
- } else {
641
- this.res.children[0].children[i].style.display = "none";
642
- }
643
- }
644
-
645
-
646
-
647
-
648
- }
649
-
650
- const adjust = () => {
651
- if (!this.obj.isSide) {
652
- if (media.matches || media2.matches) {
653
- doInAdjust();
654
- } else {
655
- toWideScreen();
656
- }
657
- }
658
-
659
-
660
- }
661
-
662
-
663
- if (!this.obj.isSide) {
664
-
665
- let inner = this.res.children[1]; //document.querySelector("#outerItemsWrapper")
666
- if (inner != null) {
667
- inner.style.background = "yellow";
668
- }
669
-
670
- if (media.matches || media2.matches) {
671
- doInAdjust();
672
- //alert("P")
673
- //this.res.children[0].style.opacity = 0.3;
674
- console.log("884A");
675
- console.warn(this.res);
676
- console.log(this.res.children[0].children[0]);
677
- } else {
678
- toWideScreen();
679
- }
680
- } else {
681
- doInAdjust();
682
- }
683
-
684
- this.hasAnimatedToWide = false;
685
- window.addEventListener("resize", adjust);
686
- return this;
687
- }
688
-
689
- /*--------------------------------------------------ADJUST--------------------------------------------------*/
690
- render(div) {
691
-
692
-
693
- const method = () => {
694
- let media = window.matchMedia(`(max-width: 600px)`);
695
-
696
- // This gets owervwritten, column fires
697
-
698
- let myMedia = window.matchMedia(`(max-device-width: 415px)`);
699
- let outerItemsWrapper = this.res.children[0].children[1];
700
- let innerIW = outerItemsWrapper.children[0];
701
-
702
- console.log("TEETH");
703
- console.log(outerItemsWrapper);
704
- console.log(innerIW);
705
-
706
-
707
- if (myMedia.matches) {
708
- innerIW.style.position = "relative";
709
- }
710
-
711
-
712
-
713
- if ((media.matches || myMedia.matches) && innerIW != undefined) {
714
- //alert("PP")
715
- innerIW.style.flexDirection = "column";
716
- } else if (innerIW != undefined && !this.obj.isSide) {
717
- innerIW.style.flexDirection = "row";
718
- }
719
-
720
- if (!this.obj.isSide && !media.matches && !myMedia.matches) {
721
- this.res.children[0].children[0].style.display = "none";
722
- }
723
-
724
-
725
- if (this.obj.isSide) {
726
- innerIW.style.flexDirection = "column";
727
- }
728
-
729
- if (!this.obj.isSide && !media.matches) {
730
- this.res.children[0].style.position = "relative";
731
- outerItemsWrapper.style.transform = "translateY(0px)";
732
- }
733
-
734
- if (!this.obj.isSide && media.matches) {
735
- this.res.children[0].style.position = "absolute";
736
- }
737
-
738
-
739
- // my custom
740
-
741
- if (this.obj.customStyle){
742
- // this.res.children[0].children[1].children[0].style.width = "200px";
743
- this.res.children[0].style.marginTop = "1rem";
744
- this.res.children[0].style.position = "absolute";
745
- this.res.children[0].style.borderRadius = "1rem";
746
- outerItemsWrapper.style.borderRadius = "1rem";
747
-
748
- }
749
-
750
-
751
- // Add line 700
752
- if (this.obj.radius){
753
- // this.res.children[0].children[1].children[0].style.width = "200px";
754
- // alert("P")
755
-
756
- // Both need to be like this
757
- this.res.children[0].style.borderRadius = "1rem";
758
- outerItemsWrapper.style.borderRadius = "1rem";
759
-
760
- }
761
- }
762
-
763
- window.addEventListener("resize", () => method());
764
- method();
765
-
766
- if (div) {
767
- document.querySelector(div).style.padding = 0;
768
- document.querySelector(div).style.margin = 0;
769
- document.querySelector(div).appendChild(this.res);
770
- } else {
771
- return this.res; //.children[0];
772
- }
773
- return this.res; //.children[0];
774
- }
775
- }
776
- window.UINavBar
777
- instances = UINavBar
778
- instances;
779
- export { UINavBar
780
- instances };