ziko 0.0.4 → 0.0.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 (234) hide show
  1. package/dist/ziko.cjs +10000 -9874
  2. package/dist/ziko.js +10001 -9875
  3. package/dist/ziko.min.js +2 -2
  4. package/dist/ziko.mjs +9998 -9873
  5. package/package.json +15 -5
  6. package/starter/bin/index.js +10 -0
  7. package/wrapper/react/README.md +26 -0
  8. package/wrapper/react/index.jsx +22 -0
  9. package/wrapper/svelte/ZikoUI.svelte +15 -0
  10. package/wrapper/vue/ZikoUI.vue +23 -0
  11. package/src/App/Accessibility/index.js +0 -0
  12. package/src/App/Globals/__Target__.js +0 -3
  13. package/src/App/Globals/__UI__.js +0 -38
  14. package/src/App/Globals/__init__.js +0 -8
  15. package/src/App/Globals/index.js +0 -3
  16. package/src/App/Router/index.js +0 -40
  17. package/src/App/Seo/index.js +0 -43
  18. package/src/App/Themes/dark.js +0 -885
  19. package/src/App/Themes/index.js +0 -11
  20. package/src/App/Themes/light.js +0 -255
  21. package/src/App/app.js +0 -46
  22. package/src/App/index.js +0 -11
  23. package/src/Data/Api/fetchdom.js +0 -14
  24. package/src/Data/Api/index.js +0 -4
  25. package/src/Data/Api/preload.js +0 -11
  26. package/src/Data/Converter/canvas.js +0 -25
  27. package/src/Data/Converter/csv.js +0 -33
  28. package/src/Data/Converter/index.js +0 -25
  29. package/src/Data/Converter/json.js +0 -80
  30. package/src/Data/Converter/markdown.js +0 -83
  31. package/src/Data/Converter/svg.js +0 -11
  32. package/src/Data/Parser/markdown.js +0 -0
  33. package/src/Data/Parser/xml.js +0 -47
  34. package/src/Data/Strings/index.js +0 -26
  35. package/src/Data/decorators.js +0 -0
  36. package/src/Data/index.js +0 -64
  37. package/src/Graphics/Canvas/Elements/Basic/arc.js +0 -43
  38. package/src/Graphics/Canvas/Elements/Basic/image.js +0 -0
  39. package/src/Graphics/Canvas/Elements/Basic/line.js +0 -26
  40. package/src/Graphics/Canvas/Elements/Basic/path.js +0 -0
  41. package/src/Graphics/Canvas/Elements/Basic/points.js +0 -48
  42. package/src/Graphics/Canvas/Elements/Basic/polygon.js +0 -7
  43. package/src/Graphics/Canvas/Elements/Basic/polyline.js +0 -0
  44. package/src/Graphics/Canvas/Elements/Basic/rect.js +0 -46
  45. package/src/Graphics/Canvas/Elements/Basic/text.js +0 -0
  46. package/src/Graphics/Canvas/Elements/Chart/histogram.js +0 -0
  47. package/src/Graphics/Canvas/Elements/Chart/plot.js +0 -0
  48. package/src/Graphics/Canvas/Elements/Chart/scatter.js +0 -2
  49. package/src/Graphics/Canvas/Elements/Chart/stem.js +0 -0
  50. package/src/Graphics/Canvas/Elements/Element.js +0 -115
  51. package/src/Graphics/Canvas/Elements/Groupe.js +0 -0
  52. package/src/Graphics/Canvas/Elements/grid.js +0 -0
  53. package/src/Graphics/Canvas/Elements/index.js +0 -13
  54. package/src/Graphics/Canvas/Filter/index.js +0 -0
  55. package/src/Graphics/Canvas/Paint/index.js +0 -0
  56. package/src/Graphics/Canvas/Utils/color.js +0 -8
  57. package/src/Graphics/Canvas/Utils/floodFill.js +0 -58
  58. package/src/Graphics/Canvas/_canvas_offscreen +0 -0
  59. package/src/Graphics/Canvas/canvas.js +0 -189
  60. package/src/Graphics/Canvas/index.js +0 -15
  61. package/src/Graphics/Svg/Elements/ZikoSvgElement.js +0 -28
  62. package/src/Graphics/Svg/Elements/circle.js +0 -34
  63. package/src/Graphics/Svg/Elements/ellipse.js +0 -29
  64. package/src/Graphics/Svg/Elements/foreignObject.js +0 -46
  65. package/src/Graphics/Svg/Elements/grid.js +0 -9
  66. package/src/Graphics/Svg/Elements/groupe.js +0 -29
  67. package/src/Graphics/Svg/Elements/image.js +0 -33
  68. package/src/Graphics/Svg/Elements/line.js +0 -29
  69. package/src/Graphics/Svg/Elements/path.js +0 -59
  70. package/src/Graphics/Svg/Elements/polygon.js +0 -31
  71. package/src/Graphics/Svg/Elements/polyline.js +0 -4
  72. package/src/Graphics/Svg/Elements/rect.js +0 -43
  73. package/src/Graphics/Svg/Elements/text.js +0 -26
  74. package/src/Graphics/Svg/index.js +0 -1
  75. package/src/Graphics/Svg/svg.js +0 -117
  76. package/src/Graphics/index.js +0 -61
  77. package/src/Math/Calculus/Special Functions/bessel.js +0 -31
  78. package/src/Math/Calculus/Special Functions/beta.js +0 -38
  79. package/src/Math/Calculus/Special Functions/gamma.js +0 -30
  80. package/src/Math/Calculus/Special Functions/index.js +0 -4
  81. package/src/Math/Calculus/index.js +0 -1
  82. package/src/Math/Complex/Fractals/julia.js +0 -0
  83. package/src/Math/Complex/index.js +0 -191
  84. package/src/Math/Discret/Combinaison/index.js +0 -34
  85. package/src/Math/Discret/Conversion/index.js +0 -86
  86. package/src/Math/Discret/Logic/index.js +0 -46
  87. package/src/Math/Discret/Permutation/index.js +0 -31
  88. package/src/Math/Discret/Set/index.js +0 -2
  89. package/src/Math/Discret/Set/powerSet.js +0 -15
  90. package/src/Math/Discret/Set/subSet.js +0 -10
  91. package/src/Math/Discret/index.js +0 -23
  92. package/src/Math/Functions/index.js +0 -182
  93. package/src/Math/Matrix/Decomposition.js +0 -90
  94. package/src/Math/Matrix/LinearSystem.js +0 -10
  95. package/src/Math/Matrix/Matrix.js +0 -712
  96. package/src/Math/Matrix/index.js +0 -3
  97. package/src/Math/Numeric/index.js +0 -0
  98. package/src/Math/Random/index.js +0 -173
  99. package/src/Math/Signal/__np.py.txt +0 -40
  100. package/src/Math/Signal/conv.js +0 -175
  101. package/src/Math/Signal/fft.js +0 -55
  102. package/src/Math/Signal/filter.js +0 -39
  103. package/src/Math/Signal/functions.js +0 -146
  104. package/src/Math/Signal/index.js +0 -110
  105. package/src/Math/Statistics/Functions/index.js +0 -100
  106. package/src/Math/Statistics/index.js +0 -16
  107. package/src/Math/Utils/arithmetic.js +0 -139
  108. package/src/Math/Utils/checkers.js +0 -11
  109. package/src/Math/Utils/comparaison.js +0 -1
  110. package/src/Math/Utils/conversions.js +0 -7
  111. package/src/Math/Utils/discret.js +0 -28
  112. package/src/Math/Utils/index.js +0 -102
  113. package/src/Math/Utils/mapfun.js +0 -43
  114. package/src/Math/absract.js +0 -1
  115. package/src/Math/const.js +0 -3
  116. package/src/Math/index.js +0 -193
  117. package/src/Reactivity/Events/Global/Click.js +0 -56
  118. package/src/Reactivity/Events/Global/Clipboard.js +0 -84
  119. package/src/Reactivity/Events/Global/CustomEvent.js +0 -53
  120. package/src/Reactivity/Events/Global/Drag.js +0 -137
  121. package/src/Reactivity/Events/Global/Focus.js +0 -56
  122. package/src/Reactivity/Events/Global/Key.js +0 -104
  123. package/src/Reactivity/Events/Global/Mouse.js +0 -230
  124. package/src/Reactivity/Events/Global/Pointer.js +0 -214
  125. package/src/Reactivity/Events/Global/Touch.js +0 -0
  126. package/src/Reactivity/Events/Global/Wheel.js +0 -44
  127. package/src/Reactivity/Events/Partiel/Hash.js +0 -44
  128. package/src/Reactivity/Events/Partiel/Input.js +0 -59
  129. package/src/Reactivity/Events/Partiel/MediaEvent.js +0 -1
  130. package/src/Reactivity/Events/ZikoEvent.js +0 -91
  131. package/src/Reactivity/Events/index.js +0 -60
  132. package/src/Reactivity/Observer/index.js +0 -3
  133. package/src/Reactivity/Observer/intersection.js +0 -40
  134. package/src/Reactivity/Observer/mutation.js +0 -90
  135. package/src/Reactivity/Observer/resize.js +0 -47
  136. package/src/Reactivity/Use/Contexte/index.js +0 -1
  137. package/src/Reactivity/Use/Contexte/useSuccesifKeys.js +0 -14
  138. package/src/Reactivity/Use/Decorators/index.js +0 -4
  139. package/src/Reactivity/Use/Interactions/index.js +0 -4
  140. package/src/Reactivity/Use/Interactions/useBluetooth.js +0 -48
  141. package/src/Reactivity/Use/Interactions/useChannel.js +0 -50
  142. package/src/Reactivity/Use/Interactions/useEventEmmiter.js +0 -64
  143. package/src/Reactivity/Use/Interactions/useSerial.js +0 -0
  144. package/src/Reactivity/Use/Interactions/useThread.js +0 -44
  145. package/src/Reactivity/Use/Interactions/useUsb.js +0 -0
  146. package/src/Reactivity/Use/Sensors/index.js +0 -2
  147. package/src/Reactivity/Use/Sensors/useBattery.js +0 -36
  148. package/src/Reactivity/Use/Sensors/useCamera.js +0 -0
  149. package/src/Reactivity/Use/Sensors/useGeolocation.js +0 -17
  150. package/src/Reactivity/Use/Sensors/useMicro.js +0 -0
  151. package/src/Reactivity/Use/Sensors/useOrientation.js +0 -0
  152. package/src/Reactivity/Use/Storage/index.js +0 -1
  153. package/src/Reactivity/Use/Storage/useCookie.js +0 -0
  154. package/src/Reactivity/Use/Storage/useIndexedDb.js +0 -0
  155. package/src/Reactivity/Use/Storage/useStorage.js +0 -74
  156. package/src/Reactivity/Use/UI/index.js +0 -4
  157. package/src/Reactivity/Use/UI/useCssLink.js +0 -0
  158. package/src/Reactivity/Use/UI/useCssText.js +0 -21
  159. package/src/Reactivity/Use/UI/useFavIcon.js +0 -38
  160. package/src/Reactivity/Use/UI/useLinearGradient.js +0 -0
  161. package/src/Reactivity/Use/UI/useMediaQuery.js +0 -1
  162. package/src/Reactivity/Use/UI/useRadialGradient.js +0 -0
  163. package/src/Reactivity/Use/UI/useStyle.js +0 -54
  164. package/src/Reactivity/Use/UI/useTheme.js +0 -62
  165. package/src/Reactivity/Use/UI/useTitle.js +0 -30
  166. package/src/Reactivity/Use/index.js +0 -82
  167. package/src/Reactivity/Use/todo.md +0 -26
  168. package/src/Reactivity/index.js +0 -3
  169. package/src/Time/animation.js +0 -76
  170. package/src/Time/index.js +0 -54
  171. package/src/Time/loop.js +0 -83
  172. package/src/Time/utils/decorators.js +0 -17
  173. package/src/Time/utils/ease.js +0 -144
  174. package/src/Time/utils/index.js +0 -18
  175. package/src/Time/utils/performance.js +0 -16
  176. package/src/Time/utils/ui.js +0 -26
  177. package/src/UI/CustomElement/Elements/Accordion/index.js +0 -62
  178. package/src/UI/CustomElement/Elements/Carousel/index.js +0 -47
  179. package/src/UI/CustomElement/Elements/CodeNote/CodeCell.js +0 -176
  180. package/src/UI/CustomElement/Elements/CodeNote/CodeNote.js +0 -69
  181. package/src/UI/CustomElement/Elements/CodeNote/SubElements.js +0 -64
  182. package/src/UI/CustomElement/Elements/CodeNote/index.js +0 -2
  183. package/src/UI/CustomElement/Elements/Columns.js +0 -1
  184. package/src/UI/CustomElement/Elements/FAB.js +0 -0
  185. package/src/UI/CustomElement/Elements/Menu.js +0 -0
  186. package/src/UI/CustomElement/Elements/Notification.js +0 -0
  187. package/src/UI/CustomElement/Elements/Popover.js +0 -0
  188. package/src/UI/CustomElement/Elements/Popup.js +0 -0
  189. package/src/UI/CustomElement/Elements/Swipper.js +0 -4
  190. package/src/UI/CustomElement/Elements/Tabs/index.js +0 -111
  191. package/src/UI/CustomElement/Elements/Timeline.js +0 -0
  192. package/src/UI/CustomElement/Elements/Toast.js +0 -0
  193. package/src/UI/CustomElement/Elements/Treeview.js +0 -0
  194. package/src/UI/CustomElement/Elements/index.js +0 -4
  195. package/src/UI/CustomElement/Flex.js +0 -97
  196. package/src/UI/CustomElement/Grid.js +0 -30
  197. package/src/UI/CustomElement/index.js +0 -3
  198. package/src/UI/Embaded/index.js +0 -1
  199. package/src/UI/Inputs/Primitives/btn.js +0 -31
  200. package/src/UI/Inputs/Primitives/elements.js +0 -28
  201. package/src/UI/Inputs/Primitives/inputs.js +0 -334
  202. package/src/UI/Inputs/Primitives/select.js +0 -15
  203. package/src/UI/Inputs/Primitives/textarea.js +0 -16
  204. package/src/UI/Inputs/camera.js +0 -23
  205. package/src/UI/Inputs/index.js +0 -20
  206. package/src/UI/List/elements.js +0 -0
  207. package/src/UI/List/index.js +0 -130
  208. package/src/UI/Media/Audio/index.js +0 -39
  209. package/src/UI/Media/Image/figure.js +0 -17
  210. package/src/UI/Media/Image/image.js +0 -34
  211. package/src/UI/Media/Image/index.js +0 -2
  212. package/src/UI/Media/Video/index.js +0 -50
  213. package/src/UI/Media/index.js +0 -3
  214. package/src/UI/Misc/index.js +0 -49
  215. package/src/UI/Semantic/index.js +0 -68
  216. package/src/UI/Style/index.js +0 -499
  217. package/src/UI/Table/elements.js +0 -94
  218. package/src/UI/Table/index.js +0 -3
  219. package/src/UI/Table/table.js +0 -113
  220. package/src/UI/Table/utils.js +0 -12
  221. package/src/UI/Text/heading.js +0 -35
  222. package/src/UI/Text/index.js +0 -3
  223. package/src/UI/Text/p.js +0 -37
  224. package/src/UI/Text/pre.js +0 -0
  225. package/src/UI/Text/text.js +0 -66
  226. package/src/UI/Utils/index.js +0 -70
  227. package/src/UI/ZikoUIElement.js +0 -501
  228. package/src/UI/index.js +0 -154
  229. package/src/__proto__/Array.js +0 -74
  230. package/src/__proto__/Function.js +0 -0
  231. package/src/__proto__/Number.js +0 -76
  232. package/src/__proto__/Object.js +0 -0
  233. package/src/__proto__/String.js +0 -0
  234. package/src/index.js +0 -70
@@ -1,130 +0,0 @@
1
- import ZikoUIElement from "../ZikoUIElement.js";
2
- import {text} from "../Text/index.js";
3
- class ZikoUILI extends ZikoUIElement{
4
- constructor(UI){
5
- super();
6
- this.element=document.createElement("li");
7
- this.append(UI);
8
- this.render()
9
- }
10
- }
11
- class ZikoUIList extends ZikoUIElement {
12
- constructor(element,name) {
13
- super(element,name);
14
- delete this.append;
15
- //this.style({ listStylePosition: "inside" });
16
- }
17
- append(...arr){
18
- for (let i = 0; i < arr.length; i++) {
19
- let li = null;
20
- if(["string","number"].includes(typeof arr[i]))arr[i]=text(arr[i])
21
- if (arr[i] instanceof ZikoUIElement)li=new ZikoUILI(arr[i]);
22
- li.setTarget(this.element)
23
- this.items.push(li[0]);
24
- this.maintain();
25
- }
26
- }
27
- remove(...ele) {
28
- if(ele.length==0){
29
- if(this.Target.children.length) this.Target.removeChild(this.element);
30
- }
31
- else {
32
- const remove = (ele) => {
33
- if(typeof ele === "number") ele=this.items[ele];
34
- if(ele instanceof ZikoUIElement)this.element.removeChild(ele.parent.element);
35
- this.items=this.items.filter(n=>n!==ele);
36
- };
37
- for (let i = 0; i < ele.length; i++) remove(ele[i]);
38
- for (let i = 0; i < this.items.length; i++)
39
- Object.assign(this, { [[i]]: this.items[i] });
40
- }
41
- return this;
42
- }
43
- insertAt(index, ...ele) {
44
- if (index >= this.element.children.length) this.append(...ele);
45
- else
46
- for (let i = 0; i < ele.length; i++) {
47
- let li = null;
48
- if(["number","string"].includes(typeof ele[i]))ele[i]=text(ele[i]);
49
- if (ele[i] instanceof ZikoUIElement)li=new ZikoUILI(ele[i]);
50
- this.element.insertBefore(li.element, this.items[index].parent.element);
51
- this.items.splice(index, 0, ele[i][0]);
52
- }
53
- return this;
54
- }
55
- filterByTextContent(text,exactMatch=false){
56
- this.items.map(n=>n.parent.render());
57
- this.items.filter(n=>{
58
- const content=n.element.textContent
59
- return !(exactMatch?content===text:content.includes(text))
60
- }).map(n=>n.parent.render(false));
61
- return this;
62
- }
63
- sortByTextContent(order=1){
64
- this.items.map(n=>n.parent.render(false));
65
- // To Fix
66
- this.sortedItems=this.items.sort((a,b)=>order*a.element.textContent.localeCompare(b.element.textContent))
67
- this.append(...this.sortedItems);
68
- return this;
69
- }
70
- filterByClass(value) {
71
- this.items.map(n=>n.parent.render(true));
72
- this.items.filter(n=>!n.Classes.includes(value)).map(n=>n.parent.render(false));
73
- return this;
74
- }
75
- delete(value) {
76
- const valueIndex = [...this.element.children].indexOf(value);
77
- return valueIndex;
78
- /*if(valueIndex >= 0) {
79
- return this.list.splice(valueIndex, 1);
80
- }*/
81
- }
82
- push(){
83
-
84
- }
85
- pop(){
86
-
87
- }
88
- unshift(){
89
-
90
- }
91
- shift(){
92
-
93
- }
94
- sort(){
95
-
96
- }
97
- filter(){
98
-
99
- }
100
- slice(){
101
-
102
- }
103
- }
104
- class ZikoUIOList extends ZikoUIList{
105
- constructor(...arr){
106
- super("ol","ol");
107
- this.append(...arr);
108
- this.render();
109
- }
110
- type(tp = 1) {
111
- this.element.setAttribute("type", tp);
112
- return this;
113
- }
114
- start(st = 1) {
115
- this.element.setAttribute("start", st);
116
- return this;
117
- }
118
- }
119
- class ZikoUIUList extends ZikoUIList{
120
- constructor(...arr){
121
- super("ul","ul");
122
- this.append(...arr);
123
- this.render();
124
- }
125
- }
126
- const li=UI=>new ZikoUILI(UI)
127
- const ol = (...arr) => new ZikoUIOList(...arr);
128
- const ul = (...arr) => new ZikoUIUList(...arr);
129
-
130
- export{ol,ul,li}
@@ -1,39 +0,0 @@
1
- import ZikoUIElement from "../../ZikoUIElement";
2
- class ZikoUIAudio extends ZikoUIElement {
3
- constructor(src) {
4
- super("audio","audio");
5
- this.element.setAttribute("src", src);
6
- this.render();
7
- this.useControls();
8
- }
9
- get t(){
10
- return this.element.currentTime;
11
- }
12
- useControls(enabled = true) {
13
- this.element.controls = enabled;
14
- return this;
15
- }
16
- play() {
17
- this.element.play();
18
- return this;
19
- }
20
- pause() {
21
- this.element.pause();
22
- return this;
23
- }
24
- seekTo(time) {
25
- this.element.currentTime = time;
26
- return this;
27
- }
28
- onPlay(){
29
-
30
- }
31
- onPause(){
32
-
33
- }
34
- }
35
- const audio = (src) => new ZikoUIAudio(src);
36
- export {
37
- audio,
38
- ZikoUIAudio
39
- }
@@ -1,17 +0,0 @@
1
- import ZikoUIElement from "../../ZikoUIElement";
2
- class ZikoUIFigure extends ZikoUIElement{
3
- constructor(src,caption){
4
- super("figure","figure")
5
- this.img=src.width("100%").element;
6
- this.caption=document.createElement("figcaption");
7
- this.caption.append(caption.element)
8
- this.element.append(this.img);
9
- this.element.append(this.caption);
10
- this.render();
11
- }
12
- }
13
- const figure =(image,caption) =>new ZikoUIFigure(image,caption);
14
- export{
15
- figure,
16
- ZikoUIFigure
17
- }
@@ -1,34 +0,0 @@
1
- import ZikoUIElement from "../../ZikoUIElement.js";
2
- class ZikoUIImage extends ZikoUIElement {
3
- constructor(src, w, h) {
4
- super("image","image");
5
- this.value=src;
6
- if (src.nodeName === "IMG")this.element.setAttribute("src", src.src);
7
- else this.element.setAttribute("src", src);
8
- if (typeof w == "number") w += "%";
9
- if (typeof h == "number") h += "%";
10
- this.style({ border: "1px solid black", width: w, height: h });
11
- this.render();
12
- }
13
- updateSrc(url){
14
- this.value=url;
15
- this.element.src=url;
16
- return this;
17
- }
18
- toggleSrc(...values){
19
- values=values.map(n=>""+n);
20
- let index=values.indexOf(""+this.value);
21
- if(index!=-1&&index!=(values.length-1))this.updateSrc(values[index+1]);
22
- else this.updateSrc(values[0]);
23
- return this;
24
- }
25
- alt(alt){
26
- this.element.alt=alt;
27
- return this;
28
- }
29
- }
30
- const image = (src, width, height) => new ZikoUIImage(src, width, height);
31
- export{
32
- image,
33
- ZikoUIImage
34
- }
@@ -1,2 +0,0 @@
1
- export * from "./image";
2
- export * from "./figure";
@@ -1,50 +0,0 @@
1
- import ZikoUIElement from "../../ZikoUIElement.js";
2
- class ZikoUIVideo extends ZikoUIElement {
3
- constructor(src="", w = "100%", h = "50vh") {
4
- super("video","video");
5
- if (src.nodeName === "VIDEO") this.element.setAttribute("src", src.src);
6
- else this.element.setAttribute("src", src);
7
- if (typeof w == "number") w += "%";
8
- if (typeof h == "number") h += "%";
9
- this.style({ width: w, height: h });
10
- this.render();
11
- }
12
- get t(){
13
- return this.element.currentTime;
14
- }
15
- useControls(enabled = true) {
16
- this.element.controls = enabled;
17
- return this;
18
- }
19
- play() {
20
- this.element.play();
21
- return this;
22
- }
23
- pause() {
24
- this.element.pause();
25
- return this;
26
- }
27
- poster(src=""){
28
- this.element.poster=src;
29
- return this;
30
- }
31
- usePIP(e){
32
- this.element.requestPictureInPicture(e);
33
- return this;
34
- }
35
- seekTo(time) {
36
- this.element.currentTime = time;
37
- return this;
38
- }
39
- onPlay(){
40
-
41
- }
42
- onPause(){
43
-
44
- }
45
- }
46
- const video = (src, width, height) => new ZikoUIVideo(src, width, height);
47
- export {
48
- video,
49
- ZikoUIVideo
50
- }
@@ -1,3 +0,0 @@
1
- export * from "./image";
2
- export * from "./video";
3
- export * from "./audio";
@@ -1,49 +0,0 @@
1
- import ZikoUIElement from "../ZikoUIElement.js";
2
- class ZikoUIHtmlTag extends ZikoUIElement {
3
- constructor(element) {
4
- super(element,"ZikoHtml");
5
- this.render();
6
- }
7
- }
8
- class ZikoUIBr extends ZikoUIElement {
9
- constructor() {
10
- super("br","br");
11
- this.render();
12
- delete this.append
13
- }
14
- }
15
- class ZikoUIHr extends ZikoUIElement {
16
- constructor() {
17
- super("hr","hr");
18
- this.render();
19
- delete this.append
20
- }
21
- }
22
- class ZikoUILink extends ZikoUIElement{
23
- constructor(href){
24
- super("a","link");
25
- this.setHref(href);
26
- this.render();
27
- }
28
- setHref(href){
29
- this.element.href=href;
30
- }
31
- }
32
- const br = () => new ZikoUIBr();
33
- const hr = () => new ZikoUIHr();
34
- const brs = (n=1)=> new Array(n).fill(new ZikoUIBr());
35
- const hrs = (n=1)=> new Array(n).fill(new ZikoUIHr());
36
- const link=(href,...UIElement)=>new ZikoUILink(href).append(...UIElement);
37
- const ZikoHtml=(tag,...UIElement)=>new ZikoUIHtmlTag(tag).append(...UIElement);
38
- export{
39
- ZikoHtml,
40
- br,
41
- hr,
42
- brs,
43
- hrs,
44
- link,
45
- ZikoUIHtmlTag,
46
- ZikoUIBr,
47
- ZikoUIHr,
48
- ZikoUILink
49
- }
@@ -1,68 +0,0 @@
1
- import ZikoUIElement from "../ZikoUIElement.js";
2
- class ZikoUIMain extends ZikoUIElement{
3
- constructor(){
4
- super("main","Main");
5
- this.render();
6
- }
7
- }
8
- class ZikoUIHeader extends ZikoUIElement{
9
- constructor(){
10
- super("header","Header");
11
- this.render();
12
- }
13
- }
14
- class ZikoUINav extends ZikoUIElement{
15
- constructor(){
16
- super("nav","Nav");
17
- this.render();
18
- }
19
- }
20
- class ZikoUISection extends ZikoUIElement{
21
- constructor(){
22
- super("section","Section");
23
- this.style({position:"relative"})
24
- this.render();
25
- }
26
- }
27
- class ZikoUIArticle extends ZikoUIElement{
28
- constructor(){
29
- super("article","Article");
30
- this.render();
31
- }
32
- }
33
- class ZikoUIAside extends ZikoUIElement{
34
- constructor(){
35
- super("aside","Aside");
36
- this.render();
37
- }
38
- }
39
- class ZikoUIFooter extends ZikoUIElement{
40
- constructor(){
41
- super("footer","Footer");
42
- this.element=document.createElement("footer");
43
- this.render();
44
- }
45
- }
46
- const Section = (...ZikoUIElement) => new ZikoUISection().append(...ZikoUIElement);
47
- const Article = (...ZikoUIElement) => new ZikoUIArticle().append(...ZikoUIElement);
48
- const Main = (...ZikoUIElement) => new ZikoUIMain().append(...ZikoUIElement);
49
- const Header = (...ZikoUIElement) => new ZikoUIHeader().append(...ZikoUIElement);
50
- const Footer = (...ZikoUIElement) => new ZikoUIFooter().append(...ZikoUIElement);
51
- const Nav = (...ZikoUIElement) => new ZikoUINav().append(...ZikoUIElement);
52
- const Aside = (...ZikoUIElement) => new ZikoUIAside().append(...ZikoUIElement);
53
- export{
54
- Header,
55
- Main,
56
- Section,
57
- Article,
58
- Aside,
59
- Nav,
60
- Footer,
61
- ZikoUIHeader,
62
- ZikoUIMain,
63
- ZikoUISection,
64
- ZikoUIArticle,
65
- ZikoUIAside,
66
- ZikoUINav,
67
- ZikoUIFooter
68
- }