ziko 0.0.24 → 0.0.26
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.
- package/README.md +1 -1
- package/dist/ziko.cjs +50 -8
- package/dist/ziko.js +53 -11
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +53 -11
- package/package.json +1 -1
- package/src/data/parser/index.js +1 -1
- package/src/reactivity/events/click.js +43 -1
- package/src/ui/elements/ZikoUIElement.js +6 -6
- package/src/ui/elements/text/__ZikoUIText__.js +3 -3
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/arc.js +0 -43
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/image.js +0 -0
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/line.js +0 -26
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/path.js +0 -0
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/points.js +0 -48
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/polygon.js +0 -7
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/polyline.js +0 -0
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/rect.js +0 -46
- package/src/graphics/canvas/elements ( To Be Moved )/Basic/text.js +0 -0
- package/src/graphics/canvas/elements ( To Be Moved )/Chart/histogram.js +0 -0
- package/src/graphics/canvas/elements ( To Be Moved )/Chart/plot.js +0 -0
- package/src/graphics/canvas/elements ( To Be Moved )/Chart/scatter.js +0 -2
- package/src/graphics/canvas/elements ( To Be Moved )/Chart/stem.js +0 -0
- package/src/graphics/canvas/elements ( To Be Moved )/Element.js +0 -115
- package/src/graphics/canvas/elements ( To Be Moved )/index.js +0 -13
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/circle.js +0 -29
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/ellipse.js +0 -24
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/foreign-object.js +0 -36
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/groupe.js +0 -32
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/image.js +0 -36
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/index.js +0 -11
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/line.js +0 -32
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/link.js +0 -33
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/path.js +0 -62
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/polygon.js +0 -32
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/polyline.js +0 -7
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/rect.js +0 -46
- package/src/graphics/svg/Elements ( To Be Moved )/Basic/text.js +0 -29
- package/src/graphics/svg/Elements ( To Be Moved )/Derived/grid.js +0 -9
- package/src/graphics/svg/Elements ( To Be Moved )/Derived/index.js +0 -1
- package/src/graphics/svg/Elements ( To Be Moved )/index.js +0 -2
- package/src/graphics/svg/Elements ( To Be Moved )/ziko-svg-element.js +0 -48
- package/src/ui/elements/derived ( To Be Moved)/accordion/accordion.js +0 -42
- package/src/ui/elements/derived ( To Be Moved)/accordion/collapsible.js +0 -82
- package/src/ui/elements/derived ( To Be Moved)/accordion/index.js +0 -2
- package/src/ui/elements/derived ( To Be Moved)/alert/alert.js +0 -80
- package/src/ui/elements/derived ( To Be Moved)/alert/index.js +0 -1
- package/src/ui/elements/derived ( To Be Moved)/alert/palette.js +0 -52
- package/src/ui/elements/derived ( To Be Moved)/carousel/index.js +0 -51
- package/src/ui/elements/derived ( To Be Moved)/code-note/SubElements.js.txt +0 -105
- package/src/ui/elements/derived ( To Be Moved)/code-note/code-cell.js +0 -195
- package/src/ui/elements/derived ( To Be Moved)/code-note/code-note.js +0 -72
- package/src/ui/elements/derived ( To Be Moved)/code-note/index.js +0 -2
- package/src/ui/elements/derived ( To Be Moved)/code-note/sub-elements.js +0 -67
- package/src/ui/elements/derived ( To Be Moved)/index.js +0 -12
- package/src/ui/elements/derived ( To Be Moved)/menu/index.js +0 -1
- package/src/ui/elements/derived ( To Be Moved)/menu/menu3d.js +0 -260
- package/src/ui/elements/derived ( To Be Moved)/modal/index.js +0 -92
- package/src/ui/elements/derived ( To Be Moved)/pagination/breadcrumbs.js +0 -54
- package/src/ui/elements/derived ( To Be Moved)/pagination/index.js +0 -1
- package/src/ui/elements/derived ( To Be Moved)/slider/__ZikoUISlider__.js +0 -112
- package/src/ui/elements/derived ( To Be Moved)/slider/hSlider.js +0 -34
- package/src/ui/elements/derived ( To Be Moved)/slider/index.js +0 -12
- package/src/ui/elements/derived ( To Be Moved)/slider/vSlider.js +0 -27
- package/src/ui/elements/derived ( To Be Moved)/splitter/__ZikoUISplitter__.js +0 -62
- package/src/ui/elements/derived ( To Be Moved)/splitter/hsplitter.js +0 -40
- package/src/ui/elements/derived ( To Be Moved)/splitter/index.js +0 -12
- package/src/ui/elements/derived ( To Be Moved)/splitter/vsplitter.js +0 -40
- package/src/ui/elements/derived ( To Be Moved)/tabs/index.js +0 -180
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/_themes/dark.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/_themes/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/_themes/light.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/app/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/component/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/globals/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/params/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/router/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/seo/index.js +0 -0
- /package/src/{_global (To Be Replaced ) → _global (To Be Removed )}/style/index.js +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { __ZikoUISplitter__ } from "./__ZikoUISplitter__";
|
|
2
|
-
class ZikoUIHorizontalSplitter extends __ZikoUISplitter__{
|
|
3
|
-
constructor(leftPane, rightPane){
|
|
4
|
-
super("row", "ew-resize", "width")
|
|
5
|
-
this.leftPane = leftPane.style({
|
|
6
|
-
width:"50%",
|
|
7
|
-
flexGrow: 1,
|
|
8
|
-
overflow: "hidden"
|
|
9
|
-
});
|
|
10
|
-
this.rightPane = rightPane.style({
|
|
11
|
-
width:"50%",
|
|
12
|
-
flexGrow: 1,
|
|
13
|
-
overflow: "hidden"
|
|
14
|
-
});
|
|
15
|
-
this.element?.append(
|
|
16
|
-
this.leftPane.element,
|
|
17
|
-
this.resizer.element,
|
|
18
|
-
this.rightPane.element
|
|
19
|
-
);
|
|
20
|
-
this.onPtrMove(e=>{
|
|
21
|
-
if (!this.cache.isResizing) return;
|
|
22
|
-
const containerWidth = this.element.getBoundingClientRect().width; // height
|
|
23
|
-
const pointerRelativeXpos = e.event.clientX - this.element.getBoundingClientRect().x; // y
|
|
24
|
-
let newLeftPaneWidth = (pointerRelativeXpos / containerWidth) * 100;
|
|
25
|
-
let newRightPaneWidth = 100 - newLeftPaneWidth;
|
|
26
|
-
if (newLeftPaneWidth < 0) newLeftPaneWidth = 0;
|
|
27
|
-
if (newRightPaneWidth < 0) newRightPaneWidth = 0;
|
|
28
|
-
this.leftPane.element.style.width = `${newLeftPaneWidth}%`;
|
|
29
|
-
this.rightPane.element.style.width = `${newRightPaneWidth}%`;
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
get isHorizontalSplitter(){
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const hSplitter=(leftPane, rightPane)=>new ZikoUIHorizontalSplitter(leftPane, rightPane);
|
|
37
|
-
export{
|
|
38
|
-
ZikoUIHorizontalSplitter,
|
|
39
|
-
hSplitter
|
|
40
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from "./hsplitter.js"
|
|
2
|
-
export * from "./vsplitter.js"
|
|
3
|
-
import { hSplitter } from "./hsplitter.js"
|
|
4
|
-
import { vSplitter } from "./vsplitter.js"
|
|
5
|
-
const Splitter = ({orintation = "horizontal",slides = []}) =>{
|
|
6
|
-
if(["v","vertical"].includes(orintation.toLowerCase())) return vSplitter(...slides);
|
|
7
|
-
else if(["h","horizontal"].includes(orintation.toLowerCase())) return hSplitter(...slides);
|
|
8
|
-
else Error(`{ orientation : ${orintation}} Not supported`)
|
|
9
|
-
}
|
|
10
|
-
export{
|
|
11
|
-
Splitter
|
|
12
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { __ZikoUISplitter__ } from "./__ZikoUISplitter__";
|
|
2
|
-
class ZikoUIVerticalSplitter extends __ZikoUISplitter__{
|
|
3
|
-
constructor(topPane, bottomPane){
|
|
4
|
-
super("column", "ns-resize", "height")
|
|
5
|
-
this.topPane = topPane.style({
|
|
6
|
-
height:"50%",
|
|
7
|
-
flexGrow: 1,
|
|
8
|
-
overflow: "hidden"
|
|
9
|
-
});
|
|
10
|
-
this.bottomPane = bottomPane.style({
|
|
11
|
-
height:"50%",
|
|
12
|
-
flexGrow: 1,
|
|
13
|
-
overflow: "hidden"
|
|
14
|
-
});
|
|
15
|
-
this.element?.append(
|
|
16
|
-
this.topPane.element,
|
|
17
|
-
this.resizer.element,
|
|
18
|
-
this.bottomPane.element
|
|
19
|
-
);
|
|
20
|
-
this.onPtrMove(e=>{
|
|
21
|
-
if (!this.cache.isResizing) return;
|
|
22
|
-
const containerHeight = this.element.getBoundingClientRect().height; // height
|
|
23
|
-
const pointerRelativeYpos = e.event.clientY - this.element.getBoundingClientRect().y; // y
|
|
24
|
-
let newTopPaneHeight = (pointerRelativeYpos / containerHeight) * 100;
|
|
25
|
-
let newBottomPaneHeight = 100 - newTopPaneHeight;
|
|
26
|
-
if (newTopPaneHeight < 0) newTopPaneHeight = 0;
|
|
27
|
-
if (newBottomPaneHeight < 0) newBottomPaneHeight = 0;
|
|
28
|
-
this.topPane.element.style.height = `${newTopPaneHeight}%`;
|
|
29
|
-
this.bottomPane.element.style.height = `${newBottomPaneHeight}%`;
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
get isHorizontalSplitter(){
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const vSplitter=(topPane, bottomPane)=>new ZikoUIVerticalSplitter(topPane, bottomPane);
|
|
37
|
-
export{
|
|
38
|
-
ZikoUIVerticalSplitter,
|
|
39
|
-
vSplitter
|
|
40
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
// Next
|
|
2
|
-
// Previous
|
|
3
|
-
// Vertical
|
|
4
|
-
// Horizontal
|
|
5
|
-
import { Flex, ZikoUIFlex } from "../Flex";
|
|
6
|
-
class ZikoUITabs extends ZikoUIFlex{
|
|
7
|
-
#ACTIVE_ELEMENT_INDEX=0;
|
|
8
|
-
constructor(Controllers,Contents){
|
|
9
|
-
super("div","Tabs");
|
|
10
|
-
Object.assign(this.cache,{
|
|
11
|
-
config:{
|
|
12
|
-
controllersPercent : .50
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
this.style({
|
|
16
|
-
boxSizing:"border-box",
|
|
17
|
-
backgroundColor: "blanchedalmond",
|
|
18
|
-
border:"1px red solid",
|
|
19
|
-
margin:"30px",
|
|
20
|
-
});
|
|
21
|
-
this.controllersContainer = Flex().size("auto","auto").style({
|
|
22
|
-
boxSizing:"border-box",
|
|
23
|
-
justifyContent:"center",
|
|
24
|
-
alignItems:"center",
|
|
25
|
-
textAlign:"center",
|
|
26
|
-
|
|
27
|
-
minWidth:"50px",
|
|
28
|
-
minHeight:"50px",
|
|
29
|
-
|
|
30
|
-
backgroundColor:"darkblue",
|
|
31
|
-
border:"1px darkblue solid",
|
|
32
|
-
|
|
33
|
-
}).setAttr("role","tablist")
|
|
34
|
-
this.contentContainer = Flex().style({
|
|
35
|
-
boxSizing:"border-box",
|
|
36
|
-
justifyContent:"center",
|
|
37
|
-
alignItems:"center",
|
|
38
|
-
textAlign:"center",
|
|
39
|
-
|
|
40
|
-
width:"100%",
|
|
41
|
-
height:"100%",
|
|
42
|
-
backgroundColor:"darkslategrey",
|
|
43
|
-
})
|
|
44
|
-
this.append(
|
|
45
|
-
this.controllersContainer,
|
|
46
|
-
this.contentContainer
|
|
47
|
-
)
|
|
48
|
-
if(Controllers.length!==Contents.length)console.error("")
|
|
49
|
-
else {
|
|
50
|
-
this.controllersContainer.append(...Controllers);
|
|
51
|
-
this.contentContainer.append(...Contents);
|
|
52
|
-
}
|
|
53
|
-
this.init()
|
|
54
|
-
this.display(0);
|
|
55
|
-
this.useVertical()
|
|
56
|
-
}
|
|
57
|
-
get isTabs(){
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
init(){
|
|
61
|
-
// Remove old listener
|
|
62
|
-
for(let i=0;i<this.controllersContainer.length;i++){
|
|
63
|
-
this.controllersContainer[i].setAttr("role","tab").setAttr("aria-controls",`tab${i}`);
|
|
64
|
-
this.contentContainer[i].setAttr("role","tabpanel").setAttr("aria-labelledby",`tab${i}`).setAttr("tabindex",-1);
|
|
65
|
-
}
|
|
66
|
-
this.controllersContainer.forEach(item=>item.onClick(e=>{
|
|
67
|
-
const tab=e.target.element.getAttribute("aria-controls");
|
|
68
|
-
const index=+tab.slice(3)
|
|
69
|
-
this.contentContainer.filter(n=>n.element.getAttribute("aria-labelledby")===tab,()=>{
|
|
70
|
-
if(this.#ACTIVE_ELEMENT_INDEX!==index)this.display(index);
|
|
71
|
-
})
|
|
72
|
-
}))
|
|
73
|
-
return this;
|
|
74
|
-
}
|
|
75
|
-
addPairs(ControllerItem,ContentItem){
|
|
76
|
-
this.controllersContainer.append(ControllerItem);
|
|
77
|
-
this.contentContainer.append(ContentItem);
|
|
78
|
-
const length=this.controllersContainer.length;
|
|
79
|
-
this.controllersContainer.at(-1).setAttr("role","tab").setAttr("aria-controls",`tab${length-1}`);
|
|
80
|
-
this.contentContainer.at(-1).setAttr("role","tabpanel").setAttr("aria-labelledby",`tab${length-1}`).setAttr("tabindex",-1);
|
|
81
|
-
// Add listener
|
|
82
|
-
return this;
|
|
83
|
-
}
|
|
84
|
-
removePairs(index){
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
display(index){
|
|
88
|
-
this.#ACTIVE_ELEMENT_INDEX=index%this.contentContainer.length;
|
|
89
|
-
const ActiveContent = this.contentContainer.at(this.#ACTIVE_ELEMENT_INDEX);
|
|
90
|
-
this.controllersContainer.forEach(n=>n.setAttr("tabindex",-1).setAttr("aria-selected",false));
|
|
91
|
-
this.controllersContainer.at(this.#ACTIVE_ELEMENT_INDEX).setAttr("tabindex",0).setAttr("aria-selected",true);
|
|
92
|
-
|
|
93
|
-
this.contentContainer.forEach(n=>n.st.hide());
|
|
94
|
-
|
|
95
|
-
ActiveContent.st.translateX(100,0)
|
|
96
|
-
ActiveContent.setAttr("tabindex",0).st.show();
|
|
97
|
-
ActiveContent.st.translateX(0,1000)
|
|
98
|
-
|
|
99
|
-
return this;
|
|
100
|
-
}
|
|
101
|
-
next(i=1){
|
|
102
|
-
this.display(this.#ACTIVE_ELEMENT_INDEX+i);
|
|
103
|
-
return this;
|
|
104
|
-
}
|
|
105
|
-
previous(i=1){
|
|
106
|
-
this.display(this.#ACTIVE_ELEMENT_INDEX-i);
|
|
107
|
-
return this;
|
|
108
|
-
}
|
|
109
|
-
useVertical(){
|
|
110
|
-
this.vertical(0,0);
|
|
111
|
-
this.controllersContainer.horizontal(0,0)
|
|
112
|
-
this.controllersContainer.style({
|
|
113
|
-
width : "100%",
|
|
114
|
-
height : `${this.cache.config.controllersPercent*100}%`
|
|
115
|
-
});
|
|
116
|
-
this.contentContainer.style({
|
|
117
|
-
width : "100%",
|
|
118
|
-
height : `${(1-this.cache.config.controllersPercent)*100}%`
|
|
119
|
-
})
|
|
120
|
-
return this;
|
|
121
|
-
}
|
|
122
|
-
useHorizontal(){
|
|
123
|
-
this.horizontal(0,0);
|
|
124
|
-
this.controllersContainer.vertical(0, 0)
|
|
125
|
-
this.controllersContainer.style({
|
|
126
|
-
height : "100%",
|
|
127
|
-
width : `${this.cache.config.controllersPercent*100}%`
|
|
128
|
-
});
|
|
129
|
-
this.contentContainer.style({
|
|
130
|
-
height : "100%",
|
|
131
|
-
width : `${(1-this.cache.config.controllersPercent)*100}%`
|
|
132
|
-
})
|
|
133
|
-
return this;
|
|
134
|
-
}
|
|
135
|
-
// useHorizontalSwippe(){
|
|
136
|
-
// this.onPtrDown();
|
|
137
|
-
// this.onPtrUp(e=>this.next(Math.sign(e.swippe.delta_x)));
|
|
138
|
-
// return this;
|
|
139
|
-
// }
|
|
140
|
-
// useVerticalSwippe(){
|
|
141
|
-
// this.onPtrDown();
|
|
142
|
-
// this.onPtrUp(e=>this.next(Math.sign(e.swippe.delta_y)));
|
|
143
|
-
// return this;
|
|
144
|
-
// }
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const Tabs=(Controllers,Contents)=>new ZikoUITabs(Controllers,Contents)
|
|
148
|
-
export {Tabs}
|
|
149
|
-
|
|
150
|
-
/*
|
|
151
|
-
|
|
152
|
-
const cont=(txt = "A")=>btn(txt).style({width:"170px"})
|
|
153
|
-
a=Tabs(
|
|
154
|
-
[cont("A1"),cont("A2"),cont("A3"),cont("A4")],
|
|
155
|
-
[cont("A1"),cont("A2"),cont("A3"),cont("A4")]
|
|
156
|
-
).vertical().size("400px")
|
|
157
|
-
a.controllersContainer.style({
|
|
158
|
-
overflowX:"auto"
|
|
159
|
-
})
|
|
160
|
-
a.useHorizontal()
|
|
161
|
-
|
|
162
|
-
*/
|
|
163
|
-
|
|
164
|
-
/*
|
|
165
|
-
|
|
166
|
-
a=Flex().size("400px","400px").style({background:"red"})
|
|
167
|
-
a.element.animate([
|
|
168
|
-
{ borderRadius: "0" , background : "red" },
|
|
169
|
-
{ borderRadius: "50% 0" },
|
|
170
|
-
{ borderRadius: "50% 50%" },
|
|
171
|
-
{ borderRadius: "0 50%" },
|
|
172
|
-
{ borderRadius: "0", background : "yellow" },
|
|
173
|
-
],
|
|
174
|
-
{
|
|
175
|
-
// temporisation
|
|
176
|
-
duration: 2000,
|
|
177
|
-
iterations: Infinity,
|
|
178
|
-
})
|
|
179
|
-
|
|
180
|
-
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|