@threadlabs/looma 0.23.21 → 0.23.23
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/components/shared/overlay.js +1 -1
- package/components/ui-button/ui-button.html +68 -2
- package/components/ui-image/ui-image.html +177 -0
- package/components/ui-image/ui-image.js +107 -0
- package/components/ui-menu/ui-menu.js +1 -1
- package/components/ui-popover/ui-popover.js +4 -1
- package/components/ui-separator/ui-separator.html +26 -2
- package/dist/index.js +24 -23
- package/editor/chunks/extensions.js +633 -20
- package/editor/extensions/block-selection.d.ts +6 -0
- package/editor/extensions/expand.d.ts +31 -0
- package/editor/extensions/image.d.ts +12 -0
- package/editor/extensions/index.d.ts +4 -1
- package/editor/extensions/index.js +2 -2
- package/editor/extensions/preset.d.ts +8 -0
- package/editor/extensions/slash-command.d.ts +31 -3
- package/editor/extensions/table-of-contents.d.ts +58 -0
- package/editor/index.js +2 -2
- package/package.json +1 -1
- package/styles/ui-button.css +39 -0
- package/styles/ui-image.css +153 -0
- package/styles/ui-separator.css +22 -2
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +126 -10
- package/vanilla/UiImage.d.ts +21 -0
- package/vanilla/UiImage.js +84 -0
- package/vanilla/UiSeparator.d.ts +3 -0
- package/vanilla/UiSeparator.js +14 -4
- package/vanilla/index.js +1 -0
- package/vue/UiButton.d.ts +18 -6
- package/vue/UiButton.vue +269 -8
- package/vue/UiImage.d.ts +100 -0
- package/vue/UiImage.js +2 -0
- package/vue/UiImage.vue +463 -0
- package/vue/UiListItem.d.ts +1 -1
- package/vue/UiSection.d.ts +1 -1
- package/vue/UiSeparator.d.ts +27 -0
- package/vue/UiSeparator.vue +94 -3
- package/vue/UiSidebar.d.ts +1 -1
- package/vue/chunks/UiButton.js +196 -12
- package/vue/chunks/UiImage.js +313 -0
- package/vue/chunks/UiSeparator.js +106 -22
- package/vue/components.css +252 -53
- package/vue/editor/LoomaEditor.d.ts +19 -2
- package/vue/editor/divider.d.ts +6 -0
- package/vue/editor/expand.d.ts +7 -0
- package/vue/editor/image-controls.d.ts +19 -0
- package/vue/editor/image-delivery.d.ts +2 -2
- package/vue/editor/image.d.ts +7 -0
- package/vue/editor/index.d.ts +1 -1
- package/vue/editor/index.js +1188 -52
- package/vue/editor/table-of-contents.d.ts +7 -0
- package/vue/index.d.ts +1 -0
- package/vue/index.js +2 -1
package/vanilla/UiButton.js
CHANGED
|
@@ -3,7 +3,7 @@ import { componentRootIndex, manageComponentLifecycle } from "@nextwebwg/html-ne
|
|
|
3
3
|
import * as controller from "../components/ui-button/ui-button.js";
|
|
4
4
|
import "../styles/ui-button.css";
|
|
5
5
|
|
|
6
|
-
const definition = {...{"contract":{"tag":"ui-button","props":{"align":{"type":{"kind":"terminal","name":"keyword"},"values":["center","start"],"required":false,"target":{"attribute":"align"},"default":"center"},"as":{"type":{"kind":"terminal","name":"keyword"},"values":["button","a"],"required":false,"target":{"attribute":"as"},"default":"button"},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"href":{"type":"string","required":false,"target":{"attribute":"href"}},"loading":{"type":"boolean","required":false,"target":{"attribute":"loading"},"default":false},"pending":{"type":"boolean","required":false,"target":{"attribute":"pending"},"default":false},"rel":{"type":"string","required":false,"target":{"attribute":"rel"}},"shape":{"type":{"kind":"terminal","name":"keyword"},"values":["rounded","pill"],"required":false,"target":{"attribute":"shape"},"default":"rounded"},"size":{"type":{"kind":"terminal","name":"keyword"},"values":["xs","sm","md","lg"],"required":false,"target":{"attribute":"size"},"default":"md"},"stretch":{"type":"boolean","required":false,"target":{"attribute":"stretch"},"default":false},"target":{"type":"string","required":false,"target":{"attribute":"target"}},"tone":{"type":{"kind":"terminal","name":"keyword"},"values":["accent","neutral","danger","success","warning","info"],"required":false,"target":{"attribute":"tone"},"default":"accent"},"type":{"type":{"kind":"terminal","name":"keyword"},"values":["button","submit","reset"],"required":false,"target":{"attribute":"type"},"default":"button"},"variant":{"type":{"kind":"terminal","name":"keyword"},"values":["outline","solid","danger","ghost","link"],"required":false,"target":{"attribute":"variant"},"default":"outline"}}},"template":{"kind":"element","name":"template","attributes":[],"children":[{"kind":"element","name":"a","attributes":[{"kind":"attribute","name":"href","expression":"{ true: null, false: href }[concat(disabled or loading or pending)]","expressionPlan":{"source":"{ true: null, false: href }[concat(disabled or loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":null}},{"key":"false","value":{"kind":"id","name":"href"}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"disabled"},"right":{"kind":"id","name":"loading"}},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["disabled","href","loading","pending"]}},{"kind":"attribute","name":"target","expression":"target","expressionPlan":{"source":"target","ast":{"kind":"id","name":"target"},"dependencies":["target"]}},{"kind":"attribute","name":"rel","expression":"rel","expressionPlan":{"source":"rel","ast":{"kind":"id","name":"rel"},"dependencies":["rel"]}},{"kind":"attribute","name":"aria-disabled","expression":"{ true: 'true', false: null }[concat(disabled or loading or pending)]","expressionPlan":{"source":"{ true: 'true', false: null }[concat(disabled or loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"true"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"disabled"},"right":{"kind":"id","name":"loading"}},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["disabled","loading","pending"]}},{"kind":"attribute","name":"aria-busy","expression":"loading or pending","expressionPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}},{"kind":"attribute","name":"tabindex","expression":"{ true: '0', false: null }[concat((loading or pending) and not disabled)]","expressionPlan":{"source":"{ true: '0', false: null }[concat((loading or pending) and not disabled)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"0"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"and","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"right":{"kind":"unary","op":"not","operand":{"kind":"id","name":"disabled"}}}]}},"dependencies":["disabled","loading","pending"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"spinner-wrap"}],"children":[{"kind":"element","name":"ui-spinner","attributes":[{"kind":"literal","name":"size","value":"sm"}],"children":[]}],"flow":{"kind":"if","test":"loading or pending","testPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}},{"kind":"slot"}],"flow":{"kind":"when","test":"as = 'a'","testPlan":{"source":"as = 'a'","ast":{"kind":"binary","op":"=","left":{"kind":"id","name":"as"},"right":{"kind":"literal","value":"a"}},"dependencies":["as"]}}},{"kind":"element","name":"button","attributes":[{"kind":"attribute","name":"type","expression":"type","expressionPlan":{"source":"type","ast":{"kind":"id","name":"type"},"dependencies":["type"]}},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"aria-disabled","expression":"{ true: 'true', false: null }[concat(loading or pending)]","expressionPlan":{"source":"{ true: 'true', false: null }[concat(loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"true"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["loading","pending"]}},{"kind":"attribute","name":"aria-busy","expression":"loading or pending","expressionPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"spinner-wrap"}],"children":[{"kind":"element","name":"ui-spinner","attributes":[{"kind":"literal","name":"size","value":"sm"}],"children":[]}],"flow":{"kind":"if","test":"loading or pending","testPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}},{"kind":"slot"}],"flow":{"kind":"else"}}],"flow":{"kind":"match"}},"declarations":[],"root":{"kind":"native","element":"button","choices":["a","button"]}},source:{file:import.meta.url},css:""};
|
|
6
|
+
const definition = {...{"contract":{"tag":"ui-button","props":{"align":{"type":{"kind":"terminal","name":"keyword"},"values":["center","start"],"required":false,"target":{"attribute":"align"},"default":"center"},"as":{"type":{"kind":"terminal","name":"keyword"},"values":["button","a"],"required":false,"target":{"attribute":"as"},"default":"button"},"disabled":{"type":"boolean","required":false,"target":{"attribute":"disabled"},"default":false},"href":{"type":"string","required":false,"target":{"attribute":"href"}},"loading":{"type":"boolean","required":false,"target":{"attribute":"loading"},"default":false},"pending":{"type":"boolean","required":false,"target":{"attribute":"pending"},"default":false},"rel":{"type":"string","required":false,"target":{"attribute":"rel"}},"shape":{"type":{"kind":"terminal","name":"keyword"},"values":["rounded","pill"],"required":false,"target":{"attribute":"shape"},"default":"rounded"},"size":{"type":{"kind":"terminal","name":"keyword"},"values":["xs","sm","md","lg"],"required":false,"target":{"attribute":"size"},"default":"md"},"stretch":{"type":"boolean","required":false,"target":{"attribute":"stretch"},"default":false},"target":{"type":"string","required":false,"target":{"attribute":"target"}},"tone":{"type":{"kind":"terminal","name":"keyword"},"values":["accent","neutral","danger","success","warning","info"],"required":false,"target":{"attribute":"tone"},"default":"accent"},"type":{"type":{"kind":"terminal","name":"keyword"},"values":["button","submit","reset"],"required":false,"target":{"attribute":"type"},"default":"button"},"variant":{"type":{"kind":"terminal","name":"keyword"},"values":["outline","solid","danger","ghost","link","card"],"required":false,"target":{"attribute":"variant"},"default":"outline"}}},"template":{"kind":"element","name":"template","attributes":[],"children":[{"kind":"element","name":"a","attributes":[{"kind":"attribute","name":"href","expression":"{ true: null, false: href }[concat(disabled or loading or pending)]","expressionPlan":{"source":"{ true: null, false: href }[concat(disabled or loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":null}},{"key":"false","value":{"kind":"id","name":"href"}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"disabled"},"right":{"kind":"id","name":"loading"}},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["disabled","href","loading","pending"]}},{"kind":"attribute","name":"target","expression":"target","expressionPlan":{"source":"target","ast":{"kind":"id","name":"target"},"dependencies":["target"]}},{"kind":"attribute","name":"rel","expression":"rel","expressionPlan":{"source":"rel","ast":{"kind":"id","name":"rel"},"dependencies":["rel"]}},{"kind":"attribute","name":"aria-disabled","expression":"{ true: 'true', false: null }[concat(disabled or loading or pending)]","expressionPlan":{"source":"{ true: 'true', false: null }[concat(disabled or loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"true"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"disabled"},"right":{"kind":"id","name":"loading"}},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["disabled","loading","pending"]}},{"kind":"attribute","name":"aria-busy","expression":"loading or pending","expressionPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}},{"kind":"attribute","name":"tabindex","expression":"{ true: '0', false: null }[concat((loading or pending) and not disabled)]","expressionPlan":{"source":"{ true: '0', false: null }[concat((loading or pending) and not disabled)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"0"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"and","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"right":{"kind":"unary","op":"not","operand":{"kind":"id","name":"disabled"}}}]}},"dependencies":["disabled","loading","pending"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"card-icon"}],"children":[{"kind":"element","name":"ui-spinner","attributes":[{"kind":"literal","name":"size","value":"sm"}],"children":[],"flow":{"kind":"if","test":"loading or pending","testPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}},{"kind":"element","name":"template","attributes":[],"children":[{"kind":"slot","fallback":[],"name":"icon"}],"flow":{"kind":"if","test":"not (loading or pending)","testPlan":{"source":"not (loading or pending)","ast":{"kind":"unary","op":"not","operand":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}}},"dependencies":["loading","pending"]}}}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"card-content"}],"children":[{"kind":"slot"}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"card-action"}],"children":[{"kind":"slot","fallback":[{"kind":"element","name":"ui-icon","attributes":[{"kind":"literal","name":"name","value":"chevron-right"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}],"name":"action"}]}],"flow":{"kind":"when","test":"variant = 'card' and as = 'a'","testPlan":{"source":"variant = 'card' and as = 'a'","ast":{"kind":"binary","op":"and","left":{"kind":"binary","op":"=","left":{"kind":"id","name":"variant"},"right":{"kind":"literal","value":"card"}},"right":{"kind":"binary","op":"=","left":{"kind":"id","name":"as"},"right":{"kind":"literal","value":"a"}}},"dependencies":["as","variant"]}}},{"kind":"element","name":"button","attributes":[{"kind":"attribute","name":"type","expression":"type","expressionPlan":{"source":"type","ast":{"kind":"id","name":"type"},"dependencies":["type"]}},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"aria-disabled","expression":"{ true: 'true', false: null }[concat(loading or pending)]","expressionPlan":{"source":"{ true: 'true', false: null }[concat(loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"true"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["loading","pending"]}},{"kind":"attribute","name":"aria-busy","expression":"loading or pending","expressionPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"card-icon"}],"children":[{"kind":"element","name":"ui-spinner","attributes":[{"kind":"literal","name":"size","value":"sm"}],"children":[],"flow":{"kind":"if","test":"loading or pending","testPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}},{"kind":"element","name":"template","attributes":[],"children":[{"kind":"slot","fallback":[],"name":"icon"}],"flow":{"kind":"if","test":"not (loading or pending)","testPlan":{"source":"not (loading or pending)","ast":{"kind":"unary","op":"not","operand":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}}},"dependencies":["loading","pending"]}}}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"card-content"}],"children":[{"kind":"slot"}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"card-action"}],"children":[{"kind":"slot","fallback":[{"kind":"element","name":"ui-icon","attributes":[{"kind":"literal","name":"name","value":"chevron-right"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}],"name":"action"}]}],"flow":{"kind":"when","test":"variant = 'card'","testPlan":{"source":"variant = 'card'","ast":{"kind":"binary","op":"=","left":{"kind":"id","name":"variant"},"right":{"kind":"literal","value":"card"}},"dependencies":["variant"]}}},{"kind":"element","name":"a","attributes":[{"kind":"attribute","name":"href","expression":"{ true: null, false: href }[concat(disabled or loading or pending)]","expressionPlan":{"source":"{ true: null, false: href }[concat(disabled or loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":null}},{"key":"false","value":{"kind":"id","name":"href"}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"disabled"},"right":{"kind":"id","name":"loading"}},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["disabled","href","loading","pending"]}},{"kind":"attribute","name":"target","expression":"target","expressionPlan":{"source":"target","ast":{"kind":"id","name":"target"},"dependencies":["target"]}},{"kind":"attribute","name":"rel","expression":"rel","expressionPlan":{"source":"rel","ast":{"kind":"id","name":"rel"},"dependencies":["rel"]}},{"kind":"attribute","name":"aria-disabled","expression":"{ true: 'true', false: null }[concat(disabled or loading or pending)]","expressionPlan":{"source":"{ true: 'true', false: null }[concat(disabled or loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"true"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"disabled"},"right":{"kind":"id","name":"loading"}},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["disabled","loading","pending"]}},{"kind":"attribute","name":"aria-busy","expression":"loading or pending","expressionPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}},{"kind":"attribute","name":"tabindex","expression":"{ true: '0', false: null }[concat((loading or pending) and not disabled)]","expressionPlan":{"source":"{ true: '0', false: null }[concat((loading or pending) and not disabled)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"0"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"and","left":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"right":{"kind":"unary","op":"not","operand":{"kind":"id","name":"disabled"}}}]}},"dependencies":["disabled","loading","pending"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"spinner-wrap"}],"children":[{"kind":"element","name":"ui-spinner","attributes":[{"kind":"literal","name":"size","value":"sm"}],"children":[]}],"flow":{"kind":"if","test":"loading or pending","testPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}},{"kind":"slot"}],"flow":{"kind":"when","test":"as = 'a'","testPlan":{"source":"as = 'a'","ast":{"kind":"binary","op":"=","left":{"kind":"id","name":"as"},"right":{"kind":"literal","value":"a"}},"dependencies":["as"]}}},{"kind":"element","name":"button","attributes":[{"kind":"attribute","name":"type","expression":"type","expressionPlan":{"source":"type","ast":{"kind":"id","name":"type"},"dependencies":["type"]}},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"aria-disabled","expression":"{ true: 'true', false: null }[concat(loading or pending)]","expressionPlan":{"source":"{ true: 'true', false: null }[concat(loading or pending)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"true"}},{"key":"false","value":{"kind":"literal","value":null}}]},"index":{"kind":"call","fn":"concat","args":[{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}}]}},"dependencies":["loading","pending"]}},{"kind":"attribute","name":"aria-busy","expression":"loading or pending","expressionPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"spinner-wrap"}],"children":[{"kind":"element","name":"ui-spinner","attributes":[{"kind":"literal","name":"size","value":"sm"}],"children":[]}],"flow":{"kind":"if","test":"loading or pending","testPlan":{"source":"loading or pending","ast":{"kind":"binary","op":"or","left":{"kind":"id","name":"loading"},"right":{"kind":"id","name":"pending"}},"dependencies":["loading","pending"]}}},{"kind":"slot"}],"flow":{"kind":"else"}}],"flow":{"kind":"match"}},"declarations":[],"root":{"kind":"native","element":"button","choices":["a","button"]}},source:{file:import.meta.url},css:""};
|
|
7
7
|
|
|
8
8
|
export function createUiButton(options = {}) {
|
|
9
9
|
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
@@ -24,21 +24,51 @@ export function createUiButton(options = {}) {
|
|
|
24
24
|
else element.setAttribute("rel", String(value1));
|
|
25
25
|
element.setAttribute("data-component", "ui-button");
|
|
26
26
|
const element0 = document.createElement("span");
|
|
27
|
-
element0.setAttribute("class", "
|
|
27
|
+
element0.setAttribute("class", "card-icon");
|
|
28
28
|
const element1 = document.createElement("ui-spinner");
|
|
29
29
|
element1.setAttribute("size", "sm");
|
|
30
30
|
element0.append(element1);
|
|
31
|
+
const element2 = document.createElement("template");
|
|
32
|
+
if (slots["icon"] ?? [].length > 0) {
|
|
33
|
+
for (const child of slots["icon"] ?? []) {
|
|
34
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
35
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
36
|
+
projected.push([node, "icon"]);
|
|
37
|
+
element2.append(node);
|
|
38
|
+
}
|
|
39
|
+
} else {
|
|
40
|
+
}
|
|
41
|
+
element0.append(element2);
|
|
31
42
|
element.append(element0);
|
|
43
|
+
const element3 = document.createElement("span");
|
|
44
|
+
element3.setAttribute("class", "card-content");
|
|
32
45
|
if (children.length > 0) {
|
|
33
46
|
for (const child of children) {
|
|
34
47
|
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
35
48
|
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
36
49
|
projected.push([node, ""]);
|
|
37
|
-
|
|
50
|
+
element3.append(node);
|
|
38
51
|
}
|
|
39
52
|
} else {
|
|
40
53
|
}
|
|
41
|
-
|
|
54
|
+
element.append(element3);
|
|
55
|
+
const element4 = document.createElement("span");
|
|
56
|
+
element4.setAttribute("class", "card-action");
|
|
57
|
+
if (slots["action"] ?? [].length > 0) {
|
|
58
|
+
for (const child of slots["action"] ?? []) {
|
|
59
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
60
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
61
|
+
projected.push([node, "action"]);
|
|
62
|
+
element4.append(node);
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
const element5 = document.createElement("ui-icon");
|
|
66
|
+
element5.setAttribute("name", "chevron-right");
|
|
67
|
+
element5.setAttribute("aria-hidden", "true");
|
|
68
|
+
element4.append(element5);
|
|
69
|
+
}
|
|
70
|
+
element.append(element4);
|
|
71
|
+
} else if (root === 1) {
|
|
42
72
|
element = document.createElement("button");
|
|
43
73
|
for (const [name, value] of Object.entries(attributes)) {
|
|
44
74
|
if (value === null || value === undefined || value === false) continue;
|
|
@@ -51,12 +81,98 @@ export function createUiButton(options = {}) {
|
|
|
51
81
|
if (value3 === true) element.setAttribute("disabled", "");
|
|
52
82
|
else element.removeAttribute("disabled");
|
|
53
83
|
element.setAttribute("data-component", "ui-button");
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
84
|
+
const element6 = document.createElement("span");
|
|
85
|
+
element6.setAttribute("class", "card-icon");
|
|
86
|
+
const element7 = document.createElement("ui-spinner");
|
|
87
|
+
element7.setAttribute("size", "sm");
|
|
88
|
+
element6.append(element7);
|
|
89
|
+
const element8 = document.createElement("template");
|
|
90
|
+
if (slots["icon"] ?? [].length > 0) {
|
|
91
|
+
for (const child of slots["icon"] ?? []) {
|
|
92
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
93
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
94
|
+
projected.push([node, "icon"]);
|
|
95
|
+
element8.append(node);
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
}
|
|
99
|
+
element6.append(element8);
|
|
100
|
+
element.append(element6);
|
|
101
|
+
const element9 = document.createElement("span");
|
|
102
|
+
element9.setAttribute("class", "card-content");
|
|
103
|
+
if (children.length > 0) {
|
|
104
|
+
for (const child of children) {
|
|
105
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
106
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
107
|
+
projected.push([node, ""]);
|
|
108
|
+
element9.append(node);
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
}
|
|
112
|
+
element.append(element9);
|
|
113
|
+
const element10 = document.createElement("span");
|
|
114
|
+
element10.setAttribute("class", "card-action");
|
|
115
|
+
if (slots["action"] ?? [].length > 0) {
|
|
116
|
+
for (const child of slots["action"] ?? []) {
|
|
117
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
118
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
119
|
+
projected.push([node, "action"]);
|
|
120
|
+
element10.append(node);
|
|
121
|
+
}
|
|
122
|
+
} else {
|
|
123
|
+
const element11 = document.createElement("ui-icon");
|
|
124
|
+
element11.setAttribute("name", "chevron-right");
|
|
125
|
+
element11.setAttribute("aria-hidden", "true");
|
|
126
|
+
element10.append(element11);
|
|
127
|
+
}
|
|
128
|
+
element.append(element10);
|
|
129
|
+
} else if (root === 2) {
|
|
130
|
+
element = document.createElement("a");
|
|
131
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
132
|
+
if (value === null || value === undefined || value === false) continue;
|
|
133
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
134
|
+
}
|
|
135
|
+
const value4 = componentProps["target"] === undefined ? null : componentProps["target"];
|
|
136
|
+
if (value4 === null || value4 === undefined) element.removeAttribute("target");
|
|
137
|
+
else element.setAttribute("target", String(value4));
|
|
138
|
+
const value5 = componentProps["rel"] === undefined ? null : componentProps["rel"];
|
|
139
|
+
if (value5 === null || value5 === undefined) element.removeAttribute("rel");
|
|
140
|
+
else element.setAttribute("rel", String(value5));
|
|
141
|
+
element.setAttribute("data-component", "ui-button");
|
|
142
|
+
const element12 = document.createElement("span");
|
|
143
|
+
element12.setAttribute("class", "spinner-wrap");
|
|
144
|
+
const element13 = document.createElement("ui-spinner");
|
|
145
|
+
element13.setAttribute("size", "sm");
|
|
146
|
+
element12.append(element13);
|
|
147
|
+
element.append(element12);
|
|
148
|
+
if (children.length > 0) {
|
|
149
|
+
for (const child of children) {
|
|
150
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
151
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
152
|
+
projected.push([node, ""]);
|
|
153
|
+
element.append(node);
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
}
|
|
157
|
+
} else {
|
|
158
|
+
element = document.createElement("button");
|
|
159
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
160
|
+
if (value === null || value === undefined || value === false) continue;
|
|
161
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
162
|
+
}
|
|
163
|
+
const value6 = componentProps["type"] === undefined ? "button" : componentProps["type"];
|
|
164
|
+
if (value6 === null || value6 === undefined) element.removeAttribute("type");
|
|
165
|
+
else element.setAttribute("type", String(value6));
|
|
166
|
+
const value7 = componentProps["disabled"] === undefined ? false : componentProps["disabled"];
|
|
167
|
+
if (value7 === true) element.setAttribute("disabled", "");
|
|
168
|
+
else element.removeAttribute("disabled");
|
|
169
|
+
element.setAttribute("data-component", "ui-button");
|
|
170
|
+
const element14 = document.createElement("span");
|
|
171
|
+
element14.setAttribute("class", "spinner-wrap");
|
|
172
|
+
const element15 = document.createElement("ui-spinner");
|
|
173
|
+
element15.setAttribute("size", "sm");
|
|
174
|
+
element14.append(element15);
|
|
175
|
+
element.append(element14);
|
|
60
176
|
if (children.length > 0) {
|
|
61
177
|
for (const child of children) {
|
|
62
178
|
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.26 for Vanilla DOM. Do not edit.
|
|
2
|
+
export interface UiImageEventMap {
|
|
3
|
+
resize: CustomEvent<{ readonly width: number; readonly height: number; readonly phase: "preview" | "commit" | "cancel"; readonly trigger: "pointer" | "keyboard" }>;
|
|
4
|
+
}
|
|
5
|
+
export interface UiImageElement extends HTMLElement {
|
|
6
|
+
addEventListener<K extends keyof UiImageEventMap>(type: K, listener: (this: UiImageElement, event: UiImageEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
7
|
+
removeEventListener<K extends keyof UiImageEventMap>(type: K, listener: (this: UiImageElement, event: UiImageEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
8
|
+
}
|
|
9
|
+
export interface UiImageProps {
|
|
10
|
+
alt?: string | null;
|
|
11
|
+
height?: number | null;
|
|
12
|
+
placement?: "block" | "center" | "wrap-left" | "wrap-right" | null;
|
|
13
|
+
resizable?: boolean | null;
|
|
14
|
+
selected?: boolean | null;
|
|
15
|
+
src?: string | null;
|
|
16
|
+
width?: number | null;
|
|
17
|
+
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
18
|
+
children?: readonly (string | Node)[];
|
|
19
|
+
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
|
20
|
+
}
|
|
21
|
+
export declare function createUiImage(props?: UiImageProps): UiImageElement;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.26 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
|
|
3
|
+
import * as controller from "../components/ui-image/ui-image.js";
|
|
4
|
+
import "../styles/ui-image.css";
|
|
5
|
+
|
|
6
|
+
const definition = {...{"contract":{"tag":"ui-image","props":{"alt":{"type":"string","required":false,"target":{"attribute":"alt"},"default":""},"height":{"type":{"kind":"terminal","name":"integer"},"required":false,"target":{"attribute":"height"}},"placement":{"type":{"kind":"terminal","name":"keyword"},"values":["block","center","wrap-left","wrap-right"],"required":false,"target":{"attribute":"placement"},"default":"block"},"resizable":{"type":"boolean","required":false,"target":{"attribute":"resizable"},"default":false},"selected":{"type":"boolean","required":false,"target":{"attribute":"selected"},"default":false},"src":{"type":"string","required":false,"target":{"attribute":"src"},"default":""},"width":{"type":{"kind":"terminal","name":"integer"},"required":false,"target":{"attribute":"width"}}}},"template":{"kind":"element","name":"figure","attributes":[],"children":[{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"frame"}],"children":[{"kind":"slot","fallback":[{"kind":"element","name":"img","attributes":[{"kind":"attribute","name":"src","expression":"src","expressionPlan":{"source":"src","ast":{"kind":"id","name":"src"},"dependencies":["src"]}},{"kind":"attribute","name":"alt","expression":"alt","expressionPlan":{"source":"alt","ast":{"kind":"id","name":"alt"},"dependencies":["alt"]}},{"kind":"attribute","name":"width","expression":"width","expressionPlan":{"source":"width","ast":{"kind":"id","name":"width"},"dependencies":["width"]}},{"kind":"attribute","name":"height","expression":"height","expressionPlan":{"source":"height","ast":{"kind":"id","name":"height"},"dependencies":["height"]}}],"children":[]}],"name":"media"},{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"handles"},{"kind":"attribute","name":"hidden","expression":"not (selected and resizable)","expressionPlan":{"source":"not (selected and resizable)","ast":{"kind":"unary","op":"not","operand":{"kind":"binary","op":"and","left":{"kind":"id","name":"selected"},"right":{"kind":"id","name":"resizable"}}},"dependencies":["resizable","selected"]}}],"children":[{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"class","value":"handle"},{"kind":"literal","name":"data-corner","value":"top-left"},{"kind":"literal","name":"aria-label","value":"Resize image from top left"}],"children":[]},{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"class","value":"handle"},{"kind":"literal","name":"data-corner","value":"top-right"},{"kind":"literal","name":"aria-label","value":"Resize image from top right"}],"children":[]},{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"class","value":"handle"},{"kind":"literal","name":"data-corner","value":"bottom-left"},{"kind":"literal","name":"aria-label","value":"Resize image from bottom left"}],"children":[]},{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"class","value":"handle"},{"kind":"literal","name":"data-corner","value":"bottom-right"},{"kind":"literal","name":"aria-label","value":"Resize image from bottom right"}],"children":[]}]},{"kind":"slot","fallback":[],"name":"controls"}],"ref":"frame"}]},"declarations":[{"kind":"event","name":"resize","type":"object","shape":{"kind":"object","fields":[{"name":"width","type":{"kind":"terminal","name":"integer"},"optional":false},{"name":"height","type":{"kind":"terminal","name":"integer"},"optional":false},{"name":"phase","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["preview","commit","cancel"]},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["pointer","keyboard"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"figure","choices":["figure"]}},source:{file:import.meta.url},css:""};
|
|
7
|
+
|
|
8
|
+
export function createUiImage(options = {}) {
|
|
9
|
+
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
10
|
+
const projected = [];
|
|
11
|
+
const element = document.createElement("figure");
|
|
12
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
13
|
+
if (value === null || value === undefined || value === false) continue;
|
|
14
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
15
|
+
}
|
|
16
|
+
element.setAttribute("data-component", "ui-image");
|
|
17
|
+
const element0 = document.createElement("div");
|
|
18
|
+
element0.setAttribute("class", "frame");
|
|
19
|
+
if (slots["media"] ?? [].length > 0) {
|
|
20
|
+
for (const child of slots["media"] ?? []) {
|
|
21
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
22
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
23
|
+
projected.push([node, "media"]);
|
|
24
|
+
element0.append(node);
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
const element1 = document.createElement("img");
|
|
28
|
+
const value0 = componentProps["src"] === undefined ? "" : componentProps["src"];
|
|
29
|
+
if (value0 === null || value0 === undefined) element1.removeAttribute("src");
|
|
30
|
+
else element1.setAttribute("src", String(value0));
|
|
31
|
+
const value1 = componentProps["alt"] === undefined ? "" : componentProps["alt"];
|
|
32
|
+
if (value1 === null || value1 === undefined) element1.removeAttribute("alt");
|
|
33
|
+
else element1.setAttribute("alt", String(value1));
|
|
34
|
+
const value2 = componentProps["width"] === undefined ? null : componentProps["width"];
|
|
35
|
+
if (value2 === null || value2 === undefined) element1.removeAttribute("width");
|
|
36
|
+
else element1.setAttribute("width", String(value2));
|
|
37
|
+
const value3 = componentProps["height"] === undefined ? null : componentProps["height"];
|
|
38
|
+
if (value3 === null || value3 === undefined) element1.removeAttribute("height");
|
|
39
|
+
else element1.setAttribute("height", String(value3));
|
|
40
|
+
element0.append(element1);
|
|
41
|
+
}
|
|
42
|
+
const element2 = document.createElement("div");
|
|
43
|
+
element2.setAttribute("class", "handles");
|
|
44
|
+
const element3 = document.createElement("button");
|
|
45
|
+
element3.setAttribute("type", "button");
|
|
46
|
+
element3.setAttribute("class", "handle");
|
|
47
|
+
element3.setAttribute("data-corner", "top-left");
|
|
48
|
+
element3.setAttribute("aria-label", "Resize image from top left");
|
|
49
|
+
element2.append(element3);
|
|
50
|
+
const element4 = document.createElement("button");
|
|
51
|
+
element4.setAttribute("type", "button");
|
|
52
|
+
element4.setAttribute("class", "handle");
|
|
53
|
+
element4.setAttribute("data-corner", "top-right");
|
|
54
|
+
element4.setAttribute("aria-label", "Resize image from top right");
|
|
55
|
+
element2.append(element4);
|
|
56
|
+
const element5 = document.createElement("button");
|
|
57
|
+
element5.setAttribute("type", "button");
|
|
58
|
+
element5.setAttribute("class", "handle");
|
|
59
|
+
element5.setAttribute("data-corner", "bottom-left");
|
|
60
|
+
element5.setAttribute("aria-label", "Resize image from bottom left");
|
|
61
|
+
element2.append(element5);
|
|
62
|
+
const element6 = document.createElement("button");
|
|
63
|
+
element6.setAttribute("type", "button");
|
|
64
|
+
element6.setAttribute("class", "handle");
|
|
65
|
+
element6.setAttribute("data-corner", "bottom-right");
|
|
66
|
+
element6.setAttribute("aria-label", "Resize image from bottom right");
|
|
67
|
+
element2.append(element6);
|
|
68
|
+
element0.append(element2);
|
|
69
|
+
if (slots["controls"] ?? [].length > 0) {
|
|
70
|
+
for (const child of slots["controls"] ?? []) {
|
|
71
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
72
|
+
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
73
|
+
projected.push([node, "controls"]);
|
|
74
|
+
element0.append(node);
|
|
75
|
+
}
|
|
76
|
+
} else {
|
|
77
|
+
}
|
|
78
|
+
element.append(element0);
|
|
79
|
+
manageComponentLifecycle(element, definition, { props: componentProps, projected,
|
|
80
|
+
controller,
|
|
81
|
+
});
|
|
82
|
+
return element;
|
|
83
|
+
}
|
|
84
|
+
|
package/vanilla/UiSeparator.d.ts
CHANGED
|
@@ -6,7 +6,10 @@ export interface UiSeparatorElement extends HTMLHRElement {
|
|
|
6
6
|
removeEventListener<K extends keyof UiSeparatorEventMap>(type: K, listener: (this: UiSeparatorElement, event: UiSeparatorEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
7
7
|
}
|
|
8
8
|
export interface UiSeparatorProps {
|
|
9
|
+
emphasis?: "normal" | "strong" | null;
|
|
9
10
|
orientation?: "horizontal" | "vertical" | null;
|
|
11
|
+
selectable?: boolean | null;
|
|
12
|
+
selected?: boolean | null;
|
|
10
13
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
11
14
|
children?: readonly (string | Node)[];
|
|
12
15
|
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
package/vanilla/UiSeparator.js
CHANGED
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
// Generated by HTML Next 1.0.0-alpha.26 for Vanilla DOM. Do not edit.
|
|
2
|
-
import {
|
|
2
|
+
import { manageGeneratedProps } from "@nextwebwg/html-next/generated-runtime";
|
|
3
3
|
import "../styles/ui-separator.css";
|
|
4
4
|
|
|
5
5
|
export function createUiSeparator(options = {}) {
|
|
6
6
|
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
7
7
|
const projected = [];
|
|
8
|
-
const prop0 = componentProps["
|
|
8
|
+
const prop0 = componentProps["emphasis"] === undefined ? "normal" : componentProps["emphasis"];
|
|
9
|
+
const prop1 = componentProps["orientation"] === undefined ? "horizontal" : componentProps["orientation"];
|
|
10
|
+
const prop2 = componentProps["selectable"] === undefined ? false : componentProps["selectable"];
|
|
11
|
+
const prop3 = componentProps["selected"] === undefined ? false : componentProps["selected"];
|
|
9
12
|
const element = document.createElement("hr");
|
|
10
13
|
for (const [name, value] of Object.entries(attributes)) {
|
|
11
14
|
if (value === null || value === undefined || value === false) continue;
|
|
12
15
|
element.setAttribute(name, value === true ? "" : String(value));
|
|
13
16
|
}
|
|
14
|
-
const value0 =
|
|
17
|
+
const value0 = prop1;
|
|
15
18
|
if (value0 === null || value0 === undefined) element.removeAttribute("aria-orientation");
|
|
16
19
|
else element.setAttribute("aria-orientation", String(value0));
|
|
17
20
|
element.setAttribute("data-component", "ui-separator");
|
|
18
|
-
|
|
21
|
+
manageGeneratedProps(element, [
|
|
22
|
+
{ name: "emphasis", attribute: "data-emphasis", value: componentProps["emphasis"], default: "normal", type: ["normal","strong"], required: false },
|
|
23
|
+
{ name: "orientation", attribute: "data-orientation", value: componentProps["orientation"], default: "horizontal", type: ["horizontal","vertical"], required: false },
|
|
24
|
+
{ name: "selectable", attribute: "data-selectable", value: componentProps["selectable"], default: false, type: "boolean", required: false },
|
|
25
|
+
{ name: "selected", attribute: "data-selected", value: componentProps["selected"], default: false, type: "boolean", required: false },
|
|
26
|
+
], (name, value) => {
|
|
27
|
+
if (name === "orientation") {
|
|
19
28
|
if (value === null || value === undefined) element.removeAttribute("aria-orientation");
|
|
20
29
|
else element.setAttribute("aria-orientation", String(value));
|
|
30
|
+
}
|
|
21
31
|
});
|
|
22
32
|
return element;
|
|
23
33
|
}
|
package/vanilla/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export * from "./UiFormField.js";
|
|
|
34
34
|
export * from "./UiGrid.js";
|
|
35
35
|
export * from "./UiIcon.js";
|
|
36
36
|
export * from "./UiIconButton.js";
|
|
37
|
+
export * from "./UiImage.js";
|
|
37
38
|
export * from "./UiInput.js";
|
|
38
39
|
export * from "./UiInputGroup.js";
|
|
39
40
|
export * from "./UiList.js";
|
package/vue/UiButton.d.ts
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
declare var __VLS_6: {},
|
|
2
|
+
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_22: {}, __VLS_24: {}, __VLS_26: {}, __VLS_38: {}, __VLS_45: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
|
|
4
|
+
icon?: (props: typeof __VLS_6) => any;
|
|
5
5
|
} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
|
+
} & {
|
|
8
|
+
action?: (props: typeof __VLS_10) => any;
|
|
9
|
+
} & {
|
|
10
|
+
icon?: (props: typeof __VLS_22) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_24) => any;
|
|
13
|
+
} & {
|
|
14
|
+
action?: (props: typeof __VLS_26) => any;
|
|
15
|
+
} & {
|
|
16
|
+
default?: (props: typeof __VLS_38) => any;
|
|
17
|
+
} & {
|
|
18
|
+
default?: (props: typeof __VLS_45) => any;
|
|
7
19
|
};
|
|
8
20
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
21
|
align: {
|
|
@@ -59,7 +71,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
59
71
|
default: string;
|
|
60
72
|
};
|
|
61
73
|
variant: {
|
|
62
|
-
type: PropType<"outline" | "solid" | "danger" | "ghost" | "link" | null>;
|
|
74
|
+
type: PropType<"outline" | "solid" | "danger" | "ghost" | "link" | "card" | null>;
|
|
63
75
|
default: string;
|
|
64
76
|
};
|
|
65
77
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -116,7 +128,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
116
128
|
default: string;
|
|
117
129
|
};
|
|
118
130
|
variant: {
|
|
119
|
-
type: PropType<"outline" | "solid" | "danger" | "ghost" | "link" | null>;
|
|
131
|
+
type: PropType<"outline" | "solid" | "danger" | "ghost" | "link" | "card" | null>;
|
|
120
132
|
default: string;
|
|
121
133
|
};
|
|
122
134
|
}>> & Readonly<{}>, {
|
|
@@ -124,7 +136,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
124
136
|
shape: "pill" | "rounded" | null;
|
|
125
137
|
size: "xs" | "sm" | "md" | "lg" | null;
|
|
126
138
|
tone: "info" | "neutral" | "accent" | "success" | "warning" | "danger" | null;
|
|
127
|
-
variant: "link" | "danger" | "solid" | "outline" | "ghost" | null;
|
|
139
|
+
variant: "link" | "danger" | "solid" | "outline" | "ghost" | "card" | null;
|
|
128
140
|
align: "center" | "start" | null;
|
|
129
141
|
as: "a" | "button" | null;
|
|
130
142
|
disabled: boolean | null;
|