ziko 0.0.13 → 0.0.14

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.
@@ -1,12 +1,13 @@
1
1
  import ZikoUIElement from "../../ZikoUIElement.js";
2
2
  class ZikoUIImage extends ZikoUIElement {
3
- constructor(src, w, h) {
3
+ constructor(src,alt, w, h) {
4
4
  super("img","image");
5
5
  this.value=src;
6
- if (src.nodeName === "IMG")this.element?.setAttribute("src", src.src);
6
+ if (src.nodeName === "IMG")this.element.setAttribute("src", src.src);
7
7
  else this.element?.setAttribute("src", src);
8
8
  if (typeof w == "number") w += "%";
9
9
  if (typeof h == "number") h += "%";
10
+ this.setAttr("alt", alt)
10
11
  this.style({ border: "1px solid black", width: w, height: h });
11
12
  }
12
13
  get isImg(){
@@ -29,7 +30,7 @@ class ZikoUIImage extends ZikoUIElement {
29
30
  return this;
30
31
  }
31
32
  }
32
- const image = (src, width, height) => new ZikoUIImage(src, width, height);
33
+ const image = (src,alt, width, height) => new ZikoUIImage(src,alt, width, height);
33
34
  export{
34
35
  image,
35
36
  ZikoUIImage
@@ -47,6 +47,7 @@ class ZikoUIBr extends ZikoUIElement {
47
47
  class ZikoUIHr extends ZikoUIElement {
48
48
  constructor() {
49
49
  super("hr","hr");
50
+ this.setAttr("role", "none");
50
51
  }
51
52
  get isHr(){
52
53
  return true
@@ -82,6 +82,7 @@ import{
82
82
  Footer,
83
83
  } from "./elements/primitives/semantic/index.js";
84
84
  import { Table } from "./elements/primitives/table/index.js";
85
+ import { PDFViewer } from "./elements/primitives/embaded/index.js";
85
86
  const UI={
86
87
  html,
87
88
  text,
@@ -153,6 +154,7 @@ const UI={
153
154
  infoAlert,
154
155
  warningAlert,
155
156
  dangerAlert,
157
+ PDFViewer,
156
158
  ExtractAll: function () {
157
159
  const keys = Object.keys(this);
158
160
  for (let i = 0; i < keys.length; i++) {