@threadlabs/looma 0.10.12 → 0.11.0
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/editor.js +2 -26
- package/components/shared/icons.js +53 -0
- package/components/ui-avatar-group/ui-avatar-group.html +6 -6
- package/components/ui-avatar-group/ui-avatar-group.js +1 -1
- package/components/ui-breadcrumb-item/ui-breadcrumb-item.html +60 -0
- package/components/ui-breadcrumbs/ui-breadcrumbs.html +31 -0
- package/components/ui-card/ui-card.html +55 -0
- package/components/ui-combobox/ui-combobox.js +2 -2
- package/components/ui-context-menu/ui-context-menu.js +4 -4
- package/components/ui-cover/ui-cover.html +36 -0
- package/components/ui-description-item/ui-description-item.html +46 -0
- package/components/ui-description-list/ui-description-list.html +37 -0
- package/components/ui-icon/ui-icon.js +1 -1
- package/components/ui-menu/ui-menu.js +3 -3
- package/components/ui-page-header/ui-page-header.html +97 -0
- package/components/ui-radio/ui-radio.js +1 -1
- package/components/ui-radio-group/ui-radio-group.js +1 -1
- package/components/ui-section/ui-section.html +108 -0
- package/components/ui-spinner/ui-spinner.html +48 -0
- package/components/ui-status-message/ui-status-message.html +84 -0
- package/components/ui-text/ui-text.html +96 -0
- package/components/ui-tree/ui-tree.js +2 -2
- package/components/ui-tree-item/ui-tree-item.js +3 -3
- package/dist/index.js +1 -1
- package/editor/icons.d.ts +5 -0
- package/editor/index.js +6 -1
- package/package.json +1 -1
- package/styles/ui-avatar-group.css +6 -6
- package/styles/ui-breadcrumb-item.css +57 -0
- package/styles/ui-breadcrumbs.css +32 -0
- package/styles/ui-card.css +51 -0
- package/styles/ui-cover.css +35 -0
- package/styles/ui-description-item.css +43 -0
- package/styles/ui-description-list.css +38 -0
- package/styles/ui-page-header.css +89 -0
- package/styles/ui-section.css +94 -0
- package/styles/ui-spinner.css +42 -0
- package/styles/ui-status-message.css +72 -0
- package/styles/ui-text.css +85 -0
- package/vanilla/UiBreadcrumbItem.d.ts +14 -0
- package/vanilla/UiBreadcrumbItem.js +38 -0
- package/vanilla/UiBreadcrumbs.d.ts +14 -0
- package/vanilla/UiBreadcrumbs.js +39 -0
- package/vanilla/UiCard.d.ts +17 -0
- package/vanilla/UiCard.js +32 -0
- package/vanilla/UiCover.d.ts +14 -0
- package/vanilla/UiCover.js +28 -0
- package/vanilla/UiDescriptionItem.d.ts +14 -0
- package/vanilla/UiDescriptionItem.js +39 -0
- package/vanilla/UiDescriptionList.d.ts +14 -0
- package/vanilla/UiDescriptionList.js +28 -0
- package/vanilla/UiPageHeader.d.ts +14 -0
- package/vanilla/UiPageHeader.js +78 -0
- package/vanilla/UiSection.d.ts +16 -0
- package/vanilla/UiSection.js +64 -0
- package/vanilla/UiSpinner.d.ts +15 -0
- package/vanilla/UiSpinner.js +23 -0
- package/vanilla/UiStatusMessage.d.ts +16 -0
- package/vanilla/UiStatusMessage.js +53 -0
- package/vanilla/UiText.d.ts +20 -0
- package/vanilla/UiText.js +38 -0
- package/vanilla/index.js +11 -0
- package/vue/UiAvatarGroup.vue +6 -6
- package/vue/UiBreadcrumbItem.d.ts +18 -0
- package/vue/UiBreadcrumbItem.js +2 -0
- package/vue/UiBreadcrumbItem.vue +101 -0
- package/vue/UiBreadcrumbs.d.ts +18 -0
- package/vue/UiBreadcrumbs.js +2 -0
- package/vue/UiBreadcrumbs.vue +45 -0
- package/vue/UiCard.d.ts +24 -0
- package/vue/UiCard.js +2 -0
- package/vue/UiCard.vue +82 -0
- package/vue/UiCover.d.ts +18 -0
- package/vue/UiCover.js +2 -0
- package/vue/UiCover.vue +57 -0
- package/vue/UiDescriptionItem.d.ts +18 -0
- package/vue/UiDescriptionItem.js +2 -0
- package/vue/UiDescriptionItem.vue +58 -0
- package/vue/UiDescriptionList.d.ts +18 -0
- package/vue/UiDescriptionList.js +2 -0
- package/vue/UiDescriptionList.vue +62 -0
- package/vue/UiIconButton.d.ts +1 -1
- package/vue/UiPageHeader.d.ts +26 -0
- package/vue/UiPageHeader.js +2 -0
- package/vue/UiPageHeader.vue +118 -0
- package/vue/UiSection.d.ts +26 -0
- package/vue/UiSection.js +2 -0
- package/vue/UiSection.vue +128 -0
- package/vue/UiSpinner.d.ts +10 -0
- package/vue/UiSpinner.js +2 -0
- package/vue/UiSpinner.vue +87 -0
- package/vue/UiStatusMessage.d.ts +24 -0
- package/vue/UiStatusMessage.js +2 -0
- package/vue/UiStatusMessage.vue +121 -0
- package/vue/UiText.d.ts +30 -0
- package/vue/UiText.js +2 -0
- package/vue/UiText.vue +125 -0
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBreadcrumbItem.js +50 -0
- package/vue/chunks/UiBreadcrumbs.js +19 -0
- package/vue/chunks/UiCard.js +31 -0
- package/vue/chunks/UiCover.js +21 -0
- package/vue/chunks/UiDescriptionItem.js +16 -0
- package/vue/chunks/UiDescriptionList.js +21 -0
- package/vue/chunks/UiPageHeader.js +35 -0
- package/vue/chunks/UiSection.js +34 -0
- package/vue/chunks/UiSpinner.js +64 -0
- package/vue/chunks/UiStatusMessage.js +54 -0
- package/vue/chunks/UiText.js +40 -0
- package/vue/components.css +521 -29
- package/vue/index.d.ts +11 -0
- package/vue/index.js +13 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.5 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
|
|
3
|
+
import "../styles/ui-status-message.css";
|
|
4
|
+
|
|
5
|
+
const definition = {...{"contract":{"tag":"ui-status-message","props":{"heading":{"type":"string","required":false,"target":{"attribute":"heading"},"default":""},"kind":{"type":{"enum":["empty","loading","error"]},"required":false,"target":{"attribute":"kind"},"default":"empty"},"layout":{"type":{"enum":["inline","panel","fill"]},"required":false,"target":{"attribute":"layout"},"default":"inline"}}},"template":{"kind":"element","name":"div","attributes":[{"kind":"attribute","name":"role","expression":"{ true: 'alert', false: 'status' }[format('%s', kind = 'error')]","expressionPlan":{"source":"{ true: 'alert', false: 'status' }[format('%s', kind = 'error')]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"literal","value":"alert"}},{"key":"false","value":{"kind":"literal","value":"status"}}]},"index":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"%s"},{"kind":"binary","op":"=","left":{"kind":"id","name":"kind"},"right":{"kind":"literal","value":"error"}}]}},"dependencies":["kind"]}}],"children":[{"kind":"element","name":"ui-spinner","attributes":[{"kind":"literal","name":"size","value":"sm"},{"kind":"attribute","name":"hidden","expression":"kind != 'loading'","expressionPlan":{"source":"kind != 'loading'","ast":{"kind":"binary","op":"!=","left":{"kind":"id","name":"kind"},"right":{"kind":"literal","value":"loading"}},"dependencies":["kind"]}}],"children":[]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"copy"}],"children":[{"kind":"element","name":"strong","attributes":[{"kind":"literal","name":"class","value":"heading"},{"kind":"attribute","name":"hidden","expression":"not heading","expressionPlan":{"source":"not heading","ast":{"kind":"unary","op":"not","operand":{"kind":"id","name":"heading"}},"dependencies":["heading"]}}],"children":[{"kind":"element","name":"template","attributes":[{"kind":"directive","name":"value","expression":"heading","expressionPlan":{"source":"heading","ast":{"kind":"id","name":"heading"},"dependencies":["heading"]}}],"children":[]}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"message"}],"children":[{"kind":"slot"}]}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"action"}],"children":[{"kind":"slot","fallback":[],"name":"action"}]}]},"declarations":[],"root":{"kind":"native","element":"div","choices":["div"]}},source:{file:import.meta.url},css:""};
|
|
6
|
+
|
|
7
|
+
export function createUiStatusMessage(options = {}) {
|
|
8
|
+
const { attributes = {}, children = [], slots = {}, as, ...componentProps } = options;
|
|
9
|
+
const projected = [];
|
|
10
|
+
const element = document.createElement("div");
|
|
11
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
12
|
+
if (value === null || value === undefined || value === false) continue;
|
|
13
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
14
|
+
}
|
|
15
|
+
element.setAttribute("data-component", "ui-status-message");
|
|
16
|
+
const element0 = document.createElement("ui-spinner");
|
|
17
|
+
element0.setAttribute("size", "sm");
|
|
18
|
+
element.append(element0);
|
|
19
|
+
const element1 = document.createElement("span");
|
|
20
|
+
element1.setAttribute("class", "copy");
|
|
21
|
+
const element2 = document.createElement("strong");
|
|
22
|
+
element2.setAttribute("class", "heading");
|
|
23
|
+
const element3 = document.createElement("template");
|
|
24
|
+
element2.append(element3);
|
|
25
|
+
element1.append(element2);
|
|
26
|
+
const element4 = document.createElement("span");
|
|
27
|
+
element4.setAttribute("class", "message");
|
|
28
|
+
if (children.length > 0) {
|
|
29
|
+
for (const child of children) {
|
|
30
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
31
|
+
projected.push([node, ""]);
|
|
32
|
+
element4.append(node);
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
}
|
|
36
|
+
element1.append(element4);
|
|
37
|
+
element.append(element1);
|
|
38
|
+
const element5 = document.createElement("span");
|
|
39
|
+
element5.setAttribute("class", "action");
|
|
40
|
+
if (slots["action"] ?? [].length > 0) {
|
|
41
|
+
for (const child of slots["action"] ?? []) {
|
|
42
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
43
|
+
projected.push([node, "action"]);
|
|
44
|
+
element5.append(node);
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
}
|
|
48
|
+
element.append(element5);
|
|
49
|
+
manageComponentLifecycle(element, definition, { props: componentProps, projected,
|
|
50
|
+
});
|
|
51
|
+
return element;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.5 for Vanilla DOM. Do not edit.
|
|
2
|
+
export interface UiTextEventMap {
|
|
3
|
+
}
|
|
4
|
+
export interface UiTextElement extends HTMLParagraphElement {
|
|
5
|
+
addEventListener<K extends keyof UiTextEventMap>(type: K, listener: (this: UiTextElement, event: UiTextEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
6
|
+
removeEventListener<K extends keyof UiTextEventMap>(type: K, listener: (this: UiTextElement, event: UiTextEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
7
|
+
}
|
|
8
|
+
export interface UiTextProps {
|
|
9
|
+
align?: "start" | "center" | null;
|
|
10
|
+
size?: "inherit" | "xs" | "sm" | "md" | "lg" | null;
|
|
11
|
+
tone?: "default" | "secondary" | "muted" | "accent" | "danger" | "success" | null;
|
|
12
|
+
truncate?: boolean | null;
|
|
13
|
+
variant?: "body" | "eyebrow" | "code" | null;
|
|
14
|
+
weight?: "inherit" | "normal" | "medium" | "semibold" | null;
|
|
15
|
+
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
16
|
+
children?: readonly (string | Node)[];
|
|
17
|
+
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
|
18
|
+
as?: "p" | "span" | "div" | "small" | "strong" | "label";
|
|
19
|
+
}
|
|
20
|
+
export declare function createUiText(props?: UiTextProps): UiTextElement;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.5 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { manageGeneratedProps } from "@nextwebwg/html-next/generated-runtime";
|
|
3
|
+
import "../styles/ui-text.css";
|
|
4
|
+
|
|
5
|
+
export function createUiText(options = {}) {
|
|
6
|
+
const { attributes = {}, children = [], slots = {}, as, ...componentProps } = options;
|
|
7
|
+
const projected = [];
|
|
8
|
+
const prop0 = componentProps["align"] === undefined ? "start" : componentProps["align"];
|
|
9
|
+
const prop1 = componentProps["size"] === undefined ? "inherit" : componentProps["size"];
|
|
10
|
+
const prop2 = componentProps["tone"] === undefined ? "default" : componentProps["tone"];
|
|
11
|
+
const prop3 = componentProps["truncate"] === undefined ? false : componentProps["truncate"];
|
|
12
|
+
const prop4 = componentProps["variant"] === undefined ? "body" : componentProps["variant"];
|
|
13
|
+
const prop5 = componentProps["weight"] === undefined ? "inherit" : componentProps["weight"];
|
|
14
|
+
const element = document.createElement(as ?? "p");
|
|
15
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
16
|
+
if (value === null || value === undefined || value === false) continue;
|
|
17
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
18
|
+
}
|
|
19
|
+
element.setAttribute("data-component", "ui-text");
|
|
20
|
+
if (children.length > 0) {
|
|
21
|
+
for (const child of children) {
|
|
22
|
+
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
23
|
+
projected.push([node, ""]);
|
|
24
|
+
element.append(node);
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
}
|
|
28
|
+
manageGeneratedProps(element, [
|
|
29
|
+
{ name: "align", attribute: "data-align", value: componentProps["align"], default: "start", type: ["start","center"], required: false },
|
|
30
|
+
{ name: "size", attribute: "data-size", value: componentProps["size"], default: "inherit", type: ["inherit","xs","sm","md","lg"], required: false },
|
|
31
|
+
{ name: "tone", attribute: "data-tone", value: componentProps["tone"], default: "default", type: ["default","secondary","muted","accent","danger","success"], required: false },
|
|
32
|
+
{ name: "truncate", attribute: "data-truncate", value: componentProps["truncate"], default: false, type: "boolean", required: false },
|
|
33
|
+
{ name: "variant", attribute: "data-variant", value: componentProps["variant"], default: "body", type: ["body","eyebrow","code"], required: false },
|
|
34
|
+
{ name: "weight", attribute: "data-weight", value: componentProps["weight"], default: "inherit", type: ["inherit","normal","medium","semibold"], required: false },
|
|
35
|
+
]);
|
|
36
|
+
return element;
|
|
37
|
+
}
|
|
38
|
+
|
package/vanilla/index.js
CHANGED
|
@@ -2,13 +2,19 @@ export * from "./UiAffordanceScope.js";
|
|
|
2
2
|
export * from "./UiAvatar.js";
|
|
3
3
|
export * from "./UiAvatarGroup.js";
|
|
4
4
|
export * from "./UiBadge.js";
|
|
5
|
+
export * from "./UiBreadcrumbItem.js";
|
|
6
|
+
export * from "./UiBreadcrumbs.js";
|
|
5
7
|
export * from "./UiButton.js";
|
|
6
8
|
export * from "./UiCallout.js";
|
|
9
|
+
export * from "./UiCard.js";
|
|
7
10
|
export * from "./UiCheckbox.js";
|
|
8
11
|
export * from "./UiCluster.js";
|
|
9
12
|
export * from "./UiCombobox.js";
|
|
10
13
|
export * from "./UiContainer.js";
|
|
11
14
|
export * from "./UiContextMenu.js";
|
|
15
|
+
export * from "./UiCover.js";
|
|
16
|
+
export * from "./UiDescriptionItem.js";
|
|
17
|
+
export * from "./UiDescriptionList.js";
|
|
12
18
|
export * from "./UiDialog.js";
|
|
13
19
|
export * from "./UiDisclosure.js";
|
|
14
20
|
export * from "./UiEditable.js";
|
|
@@ -29,6 +35,7 @@ export * from "./UiList.js";
|
|
|
29
35
|
export * from "./UiListItem.js";
|
|
30
36
|
export * from "./UiMenu.js";
|
|
31
37
|
export * from "./UiMenuItem.js";
|
|
38
|
+
export * from "./UiPageHeader.js";
|
|
32
39
|
export * from "./UiPopover.js";
|
|
33
40
|
export * from "./UiRadio.js";
|
|
34
41
|
export * from "./UiRadioGroup.js";
|
|
@@ -36,13 +43,17 @@ export * from "./UiReel.js";
|
|
|
36
43
|
export * from "./UiScrollArea.js";
|
|
37
44
|
export * from "./UiSearchResultRow.js";
|
|
38
45
|
export * from "./UiSearchShell.js";
|
|
46
|
+
export * from "./UiSection.js";
|
|
39
47
|
export * from "./UiSelect.js";
|
|
40
48
|
export * from "./UiSeparator.js";
|
|
41
49
|
export * from "./UiSidebar.js";
|
|
50
|
+
export * from "./UiSpinner.js";
|
|
42
51
|
export * from "./UiStack.js";
|
|
52
|
+
export * from "./UiStatusMessage.js";
|
|
43
53
|
export * from "./UiSwitch.js";
|
|
44
54
|
export * from "./UiSwitcher.js";
|
|
45
55
|
export * from "./UiTabs.js";
|
|
56
|
+
export * from "./UiText.js";
|
|
46
57
|
export * from "./UiTextarea.js";
|
|
47
58
|
export * from "./UiToastRegion.js";
|
|
48
59
|
export * from "./UiTooltip.js";
|
package/vue/UiAvatarGroup.vue
CHANGED
|
@@ -47,10 +47,10 @@ useComponentHost(controllerModule.default, {
|
|
|
47
47
|
|
|
48
48
|
<style scoped>
|
|
49
49
|
[data-component~="ui-avatar-group"] {
|
|
50
|
-
/*
|
|
51
|
-
*
|
|
52
|
-
--_overlap-shadow:
|
|
53
|
-
--_edge-ring: 0 0 0
|
|
50
|
+
/* Each avatar is ringed in the surface colour, so where one overlaps the next it reads as a
|
|
51
|
+
* whole circle set on top, not a shape cut into the one beneath. */
|
|
52
|
+
--_overlap-shadow: 0 0 0 0 transparent;
|
|
53
|
+
--_edge-ring: 0 0 0 2px var(--ui-surface);
|
|
54
54
|
|
|
55
55
|
display: flex;
|
|
56
56
|
align-items: center;
|
|
@@ -61,7 +61,7 @@ useComponentHost(controllerModule.default, {
|
|
|
61
61
|
/* Overlap and the separating shadow are applied by the controller: slotted avatars are nested
|
|
62
62
|
* component roots outside this style scope. */
|
|
63
63
|
:slotted(*) {
|
|
64
|
-
margin-inline-start: -0.
|
|
64
|
+
margin-inline-start: -0.5rem;
|
|
65
65
|
flex-shrink: 0;
|
|
66
66
|
border-radius: 999px;
|
|
67
67
|
}
|
|
@@ -71,7 +71,7 @@ useComponentHost(controllerModule.default, {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.overflow {
|
|
74
|
-
margin-inline-start: -0.
|
|
74
|
+
margin-inline-start: -0.5rem;
|
|
75
75
|
display: inline-flex;
|
|
76
76
|
align-items: center;
|
|
77
77
|
justify-content: center;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
current?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_6: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_6) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
current: boolean;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import UiIcon from './UiIcon.vue'
|
|
5
|
+
|
|
6
|
+
defineOptions({ inheritAttrs: false })
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(
|
|
9
|
+
defineProps<{
|
|
10
|
+
current?: boolean
|
|
11
|
+
}>(),
|
|
12
|
+
{
|
|
13
|
+
current: false,
|
|
14
|
+
},
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
/** The values the styles' :host-state() rules test. */
|
|
18
|
+
const hostState = computed(() =>
|
|
19
|
+
[
|
|
20
|
+
props.current && 'current',
|
|
21
|
+
].filter(Boolean).join(' ')
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
function text(value: unknown): string {
|
|
25
|
+
if (Array.isArray(value)) return value.map(text).join(' ')
|
|
26
|
+
return value === null || value === undefined || typeof value === 'object' ? '' : String(value)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function attribute(value: unknown): any {
|
|
30
|
+
if (
|
|
31
|
+
value === null || value === undefined || value === false
|
|
32
|
+
|| (typeof value === 'object' && !Array.isArray(value))
|
|
33
|
+
) return undefined
|
|
34
|
+
return value === true ? '' : text(value)
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<li
|
|
40
|
+
data-component="ui-breadcrumb-item"
|
|
41
|
+
v-bind="$attrs"
|
|
42
|
+
:aria-current="typeof (({ true: 'page', false: null })[`${current}`]) === 'boolean'
|
|
43
|
+
? String(({ true: 'page', false: null })[`${current}`])
|
|
44
|
+
: attribute(({ true: 'page', false: null })[`${current}`])"
|
|
45
|
+
:data-ui-breadcrumb-item-state="hostState || undefined"
|
|
46
|
+
>
|
|
47
|
+
<span class="separator" aria-hidden="true"><UiIcon name="chevron-right" /></span>
|
|
48
|
+
<span class="content"><slot /></span>
|
|
49
|
+
</li>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<style scoped>
|
|
53
|
+
/* One step in a ui-breadcrumbs trail: a link up to that place, or the current view. A chevron leads
|
|
54
|
+
every step but the first. An icon slotted before the name sits with it. */
|
|
55
|
+
[data-component~="ui-breadcrumb-item"] {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--ui-space-2);
|
|
59
|
+
min-inline-size: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.separator {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
color: var(--ui-text-muted);
|
|
65
|
+
font-size: var(--ui-font-size-xs);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-component~="ui-breadcrumb-item"]:first-child .separator {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.content {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: var(--ui-space-1);
|
|
76
|
+
min-inline-size: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.content > :slotted(a) {
|
|
80
|
+
display: inline-flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
gap: var(--ui-space-1);
|
|
83
|
+
color: var(--ui-text-secondary);
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.content > :slotted(a:hover) {
|
|
88
|
+
color: var(--ui-text-primary);
|
|
89
|
+
text-decoration: underline;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-component~="ui-breadcrumb-item"][data-ui-breadcrumb-item-state~="current"] .content {
|
|
93
|
+
color: var(--ui-text-primary);
|
|
94
|
+
font-weight: var(--ui-font-medium);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
98
|
+
[data-component~="ui-breadcrumb-item"][hidden] {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
label: string;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
defineOptions({ inheritAttrs: false })
|
|
4
|
+
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
label?: string
|
|
8
|
+
}>(),
|
|
9
|
+
{
|
|
10
|
+
label: 'Breadcrumb',
|
|
11
|
+
},
|
|
12
|
+
)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<nav data-component="ui-breadcrumbs" v-bind="$attrs" :aria-label="label">
|
|
17
|
+
<ol role="list"><slot /></ol>
|
|
18
|
+
</nav>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
/* Where a view sits: a trail of ui-breadcrumb-item, from the top down to the current view. It wraps
|
|
23
|
+
rather than scrolls, so every step stays reachable. */
|
|
24
|
+
[data-component~="ui-breadcrumbs"] {
|
|
25
|
+
display: block;
|
|
26
|
+
min-inline-size: 0;
|
|
27
|
+
color: var(--ui-text-muted);
|
|
28
|
+
font-size: var(--ui-font-size-sm);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
ol {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: var(--ui-space-1) var(--ui-space-2);
|
|
36
|
+
margin: 0;
|
|
37
|
+
padding: 0;
|
|
38
|
+
list-style: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
42
|
+
[data-component~="ui-breadcrumbs"][hidden] {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
package/vue/UiCard.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
as?: 'div' | 'section' | 'article' | 'aside';
|
|
3
|
+
padding?: 'sm' | 'md' | 'lg';
|
|
4
|
+
tone?: 'neutral' | 'danger';
|
|
5
|
+
variant?: 'outlined' | 'subtle' | 'elevated';
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_8: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_8) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
tone: "neutral" | "danger";
|
|
13
|
+
variant: "outlined" | "subtle" | "elevated";
|
|
14
|
+
as: "div" | "section" | "article" | "aside";
|
|
15
|
+
padding: "sm" | "md" | "lg";
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
package/vue/UiCard.js
ADDED
package/vue/UiCard.vue
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
as?: 'div' | 'section' | 'article' | 'aside'
|
|
10
|
+
padding?: 'sm' | 'md' | 'lg'
|
|
11
|
+
tone?: 'neutral' | 'danger'
|
|
12
|
+
variant?: 'outlined' | 'subtle' | 'elevated'
|
|
13
|
+
}>(),
|
|
14
|
+
{
|
|
15
|
+
as: 'div',
|
|
16
|
+
padding: 'md',
|
|
17
|
+
tone: 'neutral',
|
|
18
|
+
variant: 'outlined',
|
|
19
|
+
},
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
/** The values the styles' :host-state() rules test. */
|
|
23
|
+
const hostState = computed(() =>
|
|
24
|
+
[
|
|
25
|
+
props.padding && `padding padding=${props.padding}`,
|
|
26
|
+
props.variant && `variant variant=${props.variant}`,
|
|
27
|
+
props.tone && `tone tone=${props.tone}`,
|
|
28
|
+
].filter(Boolean).join(' ')
|
|
29
|
+
)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<component
|
|
34
|
+
:is="as" data-component="ui-card" v-bind="$attrs" :data-ui-card-state="hostState || undefined">
|
|
35
|
+
<slot />
|
|
36
|
+
</component>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style scoped>
|
|
40
|
+
/* A surface that groups content. Its children stack with even space between them, so a card
|
|
41
|
+
needs no layout of its own. */
|
|
42
|
+
[data-component~="ui-card"] {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: var(--ui-space-4);
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
min-inline-size: 0;
|
|
48
|
+
padding: var(--ui-space-5);
|
|
49
|
+
border: 1px solid var(--ui-border-default);
|
|
50
|
+
border-radius: var(--ui-radius-lg);
|
|
51
|
+
background: var(--ui-surface-raised);
|
|
52
|
+
color: var(--ui-text-primary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[data-component~="ui-card"][data-ui-card-state~="padding=sm"] {
|
|
56
|
+
gap: var(--ui-space-2);
|
|
57
|
+
padding: var(--ui-space-3);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[data-component~="ui-card"][data-ui-card-state~="padding=lg"] {
|
|
61
|
+
padding: var(--ui-space-6);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
[data-component~="ui-card"][data-ui-card-state~="variant=subtle"] {
|
|
65
|
+
border-color: transparent;
|
|
66
|
+
background: var(--ui-surface-muted);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-component~="ui-card"][data-ui-card-state~="variant=elevated"] {
|
|
70
|
+
border-color: var(--ui-border-subtle);
|
|
71
|
+
box-shadow: var(--ui-shadow-lg);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[data-component~="ui-card"][data-ui-card-state~="tone=danger"] {
|
|
75
|
+
border-color: var(--ui-danger);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
79
|
+
[data-component~="ui-card"][hidden] {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
</style>
|
package/vue/UiCover.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
size?: 'screen' | 'fill';
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
size: "screen" | "fill";
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
package/vue/UiCover.js
ADDED
package/vue/UiCover.vue
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.5 for Vue 3.5. Do not edit. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
size?: 'screen' | 'fill'
|
|
10
|
+
}>(),
|
|
11
|
+
{
|
|
12
|
+
size: 'screen',
|
|
13
|
+
},
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
/** The values the styles' :host-state() rules test. */
|
|
17
|
+
const hostState = computed(() =>
|
|
18
|
+
[
|
|
19
|
+
props.size && `size size=${props.size}`,
|
|
20
|
+
].filter(Boolean).join(' ')
|
|
21
|
+
)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div data-component="ui-cover" v-bind="$attrs" :data-ui-cover-state="hostState || undefined">
|
|
26
|
+
<slot />
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style scoped>
|
|
31
|
+
/* A layout primitive that centres its content in the space, both ways, with room around it: the
|
|
32
|
+
frame for a view that is one card or one message. */
|
|
33
|
+
[data-component~="ui-cover"] {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
gap: var(--ui-space-6);
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
min-block-size: 100dvh;
|
|
41
|
+
padding: var(--ui-space-6) var(--ui-space-4);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-component~="ui-cover"][data-ui-cover-state~="size=fill"] {
|
|
45
|
+
flex: 1;
|
|
46
|
+
min-block-size: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
[data-component~="ui-cover"] > :slotted(*) {
|
|
50
|
+
max-inline-size: 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
54
|
+
[data-component~="ui-cover"][hidden] {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
term?: string;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_1: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_1) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
term: string;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|