@threadlabs/looma 0.1.9 → 0.1.10
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/dist/{chunk-UMFO4QNN.js → chunk-DYIMEQY7.js} +27 -26
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +152 -0
- package/dist/cjs/ui-avatar-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ui-badge.cjs.entry.js +1 -1
- package/dist/cjs/ui-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-disclosure.cjs.entry.js +1 -1
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-form-field.cjs.entry.js +1 -1
- package/dist/cjs/ui-icon-button.cjs.entry.js +4 -2
- package/dist/cjs/ui-input.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-popover.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-switch.cjs.entry.js +2 -2
- package/dist/cjs/ui-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/ui-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.css +8 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +70 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +1 -1
- package/dist/collection/components/ui-badge/ui-badge.js +1 -1
- package/dist/collection/components/ui-button/ui-button.js +1 -1
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +1 -1
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +1 -1
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.js +1 -1
- package/dist/collection/components/ui-icon-button/ui-icon-button.css +53 -0
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +23 -1
- package/dist/collection/components/ui-input/ui-input.js +1 -1
- package/dist/collection/components/ui-menu/ui-menu.js +1 -1
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-radio/ui-radio.js +1 -1
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-switch/ui-switch.js +2 -2
- package/dist/collection/components/ui-tabs/ui-tabs.js +1 -1
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/overlay/positioning.js +135 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-gHC_Ei92.js → p-QiwSQmKJ.js} +1 -1
- package/dist/components/ui-affordance-scope.d.ts +11 -0
- package/dist/components/ui-affordance-scope.js +1 -0
- package/dist/components/ui-avatar-group.js +1 -1
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-disclosure.js +1 -1
- package/dist/components/ui-floating-action-button.js +1 -1
- package/dist/components/ui-form-field.js +1 -1
- package/dist/components/ui-icon-button.js +1 -1
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-menu-item.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-radio.js +1 -1
- package/dist/components/ui-search-result-row.js +1 -1
- package/dist/components/ui-search-shell.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/ui-affordance-scope.entry.js +150 -0
- package/dist/esm/ui-avatar-group.entry.js +1 -1
- package/dist/esm/ui-avatar.entry.js +1 -1
- package/dist/esm/ui-badge.entry.js +1 -1
- package/dist/esm/ui-button.entry.js +1 -1
- package/dist/esm/ui-checkbox.entry.js +1 -1
- package/dist/esm/ui-context-menu.entry.js +1 -1
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-disclosure.entry.js +1 -1
- package/dist/esm/ui-floating-action-button.entry.js +1 -1
- package/dist/esm/ui-form-field.entry.js +1 -1
- package/dist/esm/ui-icon-button.entry.js +4 -2
- package/dist/esm/ui-input.entry.js +1 -1
- package/dist/esm/ui-menu-item.entry.js +1 -1
- package/dist/esm/ui-menu.entry.js +1 -1
- package/dist/esm/ui-popover.entry.js +1 -1
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-radio.entry.js +1 -1
- package/dist/esm/ui-search-result-row.entry.js +1 -1
- package/dist/esm/ui-search-shell.entry.js +1 -1
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-switch.entry.js +2 -2
- package/dist/esm/ui-tabs.entry.js +1 -1
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-toast-region.entry.js +1 -1
- package/dist/esm/ui-tooltip.entry.js +1 -1
- package/dist/esm/ui-top-bar.entry.js +1 -1
- package/dist/index.cjs +306 -29
- package/dist/index.d.cts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +127 -2
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-0198bb21.entry.js +1 -0
- package/dist/looma/{p-d39905f9.entry.js → p-051f578c.entry.js} +1 -1
- package/dist/looma/{p-c14233bc.entry.js → p-0584a051.entry.js} +1 -1
- package/dist/looma/{p-cb15e8e3.entry.js → p-078f9fb8.entry.js} +1 -1
- package/dist/looma/{p-dc857ed4.entry.js → p-0f45c5f0.entry.js} +1 -1
- package/dist/looma/{p-201243dc.entry.js → p-1681b218.entry.js} +1 -1
- package/dist/looma/{p-41d62a83.entry.js → p-2ae73d5b.entry.js} +1 -1
- package/dist/looma/{p-5a645647.entry.js → p-2ed7e241.entry.js} +1 -1
- package/dist/looma/{p-5717a4c4.entry.js → p-34417499.entry.js} +1 -1
- package/dist/looma/{p-610b2eca.entry.js → p-4b422d40.entry.js} +1 -1
- package/dist/looma/{p-15e619fd.entry.js → p-5ba9d496.entry.js} +1 -1
- package/dist/looma/p-5d4713a6.entry.js +1 -0
- package/dist/looma/{p-96de71ad.entry.js → p-624ba086.entry.js} +1 -1
- package/dist/looma/{p-01425a37.entry.js → p-65c25c94.entry.js} +1 -1
- package/dist/looma/{p-66a203a1.entry.js → p-7e94d90d.entry.js} +1 -1
- package/dist/looma/p-8c09c724.entry.js +1 -0
- package/dist/looma/{p-4c54d489.entry.js → p-8d5adb17.entry.js} +1 -1
- package/dist/looma/p-95340a13.entry.js +1 -0
- package/dist/looma/{p-07167650.entry.js → p-95cd639d.entry.js} +1 -1
- package/dist/looma/{p-03f0594b.entry.js → p-96f73d07.entry.js} +1 -1
- package/dist/looma/p-a33522a2.entry.js +1 -0
- package/dist/looma/{p-ee31c7b4.entry.js → p-a5127c7d.entry.js} +1 -1
- package/dist/looma/{p-dfcb2cca.entry.js → p-a9f46811.entry.js} +1 -1
- package/dist/looma/{p-93ce1c62.entry.js → p-b7aa4488.entry.js} +1 -1
- package/dist/looma/{p-5df568d8.entry.js → p-c6721aba.entry.js} +1 -1
- package/dist/looma/{p-3ecd7120.entry.js → p-d273b857.entry.js} +1 -1
- package/dist/looma/{p-24d7aa5b.entry.js → p-ed5abf6d.entry.js} +1 -1
- package/dist/types/components/ui-affordance-scope/ui-affordance-scope.d.ts +11 -0
- package/dist/types/components/ui-icon-button/ui-icon-button.d.ts +2 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/overlay/positioning.d.ts +40 -0
- package/dist/ui-affordance-scope.entry-ZKUJ5AT4.js +144 -0
- package/dist/{ui-avatar-group.entry-S6DFXYB7.js → ui-avatar-group.entry-I4XM44BI.js} +2 -2
- package/dist/{ui-avatar.entry-MDRGXLWQ.js → ui-avatar.entry-ZZAMZAVF.js} +2 -2
- package/dist/{ui-badge.entry-RLL4YKPD.js → ui-badge.entry-DQXYMC3E.js} +2 -2
- package/dist/{ui-button.entry-IYMYLBFY.js → ui-button.entry-DM7BUZLI.js} +2 -2
- package/dist/{ui-checkbox.entry-K5FGWDG2.js → ui-checkbox.entry-X3PPWKIJ.js} +2 -2
- package/dist/{ui-context-menu.entry-KWXXJ3ZV.js → ui-context-menu.entry-KAW4NIFE.js} +2 -2
- package/dist/{ui-dialog.entry-RKHLQLQM.js → ui-dialog.entry-D23SNXWB.js} +2 -2
- package/dist/{ui-disclosure.entry-FRZKGEJP.js → ui-disclosure.entry-DOG6JZU7.js} +2 -2
- package/dist/{ui-floating-action-button.entry-BH4FDSTL.js → ui-floating-action-button.entry-VPQ7VBFS.js} +2 -2
- package/dist/{ui-form-field.entry-3CR2KSUH.js → ui-form-field.entry-SYZ6XSCG.js} +2 -2
- package/dist/ui-icon-button.entry-2SZBOIH5.js +26 -0
- package/dist/{ui-input.entry-5PQR37HS.js → ui-input.entry-PALICYLZ.js} +2 -2
- package/dist/{ui-menu-item.entry-2T3QWHLK.js → ui-menu-item.entry-W6TEFP5Y.js} +2 -2
- package/dist/{ui-menu.entry-Q5Z5YO5P.js → ui-menu.entry-7NARDV6S.js} +2 -2
- package/dist/{ui-popover.entry-4P2NWWAY.js → ui-popover.entry-ZXYHLDTP.js} +2 -2
- package/dist/{ui-radio-group.entry-QKPRNV26.js → ui-radio-group.entry-XEUKMD6J.js} +2 -2
- package/dist/{ui-radio.entry-O4DOMFNU.js → ui-radio.entry-4ABBHDLN.js} +2 -2
- package/dist/{ui-search-result-row.entry-BR5O3UCH.js → ui-search-result-row.entry-3HHM7OV4.js} +2 -2
- package/dist/{ui-search-shell.entry-2ZBP7SA3.js → ui-search-shell.entry-PJTFOBPT.js} +2 -2
- package/dist/{ui-select.entry-L75HQY72.js → ui-select.entry-A3RI5XCG.js} +2 -2
- package/dist/{ui-switch.entry-L5QWD3BT.js → ui-switch.entry-JNRS2YTN.js} +3 -3
- package/dist/{ui-tabs.entry-KWRD6Y7J.js → ui-tabs.entry-MQ4V5XCP.js} +2 -2
- package/dist/{ui-textarea.entry-JC3HPEBS.js → ui-textarea.entry-JJXJQZQR.js} +2 -2
- package/dist/{ui-toast-region.entry-C6KK4OM4.js → ui-toast-region.entry-STHVESL5.js} +2 -2
- package/dist/{ui-tooltip.entry-G5EOCWP4.js → ui-tooltip.entry-4W7CRIKI.js} +2 -2
- package/dist/{ui-top-bar.entry-YLKVAQFH.js → ui-top-bar.entry-WM3SS2HR.js} +2 -2
- package/editor/{chunk-OK5NARJI.js → chunk-4VGVEHU2.js} +244 -70
- package/editor/{chunk-NJ2KAMS2.js → chunk-CCDKTWYA.js} +70 -34
- package/editor/extensions/index.d.ts +2 -2
- package/editor/extensions/index.js +1 -1
- package/editor/index.d.ts +1 -1
- package/editor/index.js +7 -2
- package/editor/table-overlay-jjvdARTJ.d.ts +95 -0
- package/editor/ui.d.ts +1 -1
- package/editor/ui.js +7 -2
- package/editor.css +232 -73
- package/layout/index.cjs +5 -0
- package/layout/index.css +22 -3
- package/layout/index.js +5 -0
- package/layout.css +24 -3
- package/package.json +1 -1
- package/tokens.css +9 -0
- package/vue/{chunk-5ELJ4UPG.js → chunk-YN4IUYVY.js} +14 -2
- package/vue/editor/index.js +94 -37
- package/vue/index.d.ts +5 -1
- package/vue/index.js +3 -1
- package/dist/looma/p-754cfff3.entry.js +0 -1
- package/dist/looma/p-940a931a.entry.js +0 -1
- package/dist/looma/p-941221ad.entry.js +0 -1
- package/dist/looma/p-955fb814.entry.js +0 -1
- package/dist/ui-icon-button.entry-LB54U25M.js +0 -24
- package/editor/table-overlay-Bq0F5xPg.d.ts +0 -64
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export function getVisualViewportRect(owner = window) {
|
|
2
|
+
const viewport = owner.visualViewport;
|
|
3
|
+
const left = viewport?.offsetLeft ?? 0;
|
|
4
|
+
const top = viewport?.offsetTop ?? 0;
|
|
5
|
+
const width = viewport?.width ?? owner.innerWidth;
|
|
6
|
+
const height = viewport?.height ?? owner.innerHeight;
|
|
7
|
+
return {
|
|
8
|
+
left,
|
|
9
|
+
top,
|
|
10
|
+
right: left + width,
|
|
11
|
+
bottom: top + height,
|
|
12
|
+
width,
|
|
13
|
+
height,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export function clampRectToViewport(rect, viewport = getVisualViewportRect(), gutter = 0) {
|
|
17
|
+
const availableWidth = Math.max(0, viewport.width - (gutter * 2));
|
|
18
|
+
const availableHeight = Math.max(0, viewport.height - (gutter * 2));
|
|
19
|
+
const targetLeft = rect.width > availableWidth
|
|
20
|
+
? viewport.left + gutter
|
|
21
|
+
: Math.min(Math.max(rect.left, viewport.left + gutter), viewport.right - gutter - rect.width);
|
|
22
|
+
const targetTop = rect.height > availableHeight
|
|
23
|
+
? viewport.top + gutter
|
|
24
|
+
: Math.min(Math.max(rect.top, viewport.top + gutter), viewport.bottom - gutter - rect.height);
|
|
25
|
+
return { x: targetLeft - rect.left, y: targetTop - rect.top };
|
|
26
|
+
}
|
|
27
|
+
export function distanceFromPointToRect(point, rect) {
|
|
28
|
+
const dx = Math.max(rect.left - point.x, 0, point.x - rect.right);
|
|
29
|
+
const dy = Math.max(rect.top - point.y, 0, point.y - rect.bottom);
|
|
30
|
+
return Math.hypot(dx, dy);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Coordinates anticipatory UI within one interaction scope.
|
|
34
|
+
*
|
|
35
|
+
* The coordinator deliberately owns one pointer listener and one animation-frame
|
|
36
|
+
* update for the whole scope. Anchors remain the only hit-testable controls; the
|
|
37
|
+
* reflected state is presentation-only, so overlapping near regions do not steal
|
|
38
|
+
* pointer input from each other or from surrounding content.
|
|
39
|
+
*/
|
|
40
|
+
export function createProximityCoordinator(scope, options = {}) {
|
|
41
|
+
const owner = scope.ownerDocument.defaultView ?? window;
|
|
42
|
+
const pointerTarget = options.pointerTarget ?? scope;
|
|
43
|
+
const anchorSelector = options.anchorSelector ?? "[data-ui-affordance]";
|
|
44
|
+
const configuredRadius = options.nearRadius ?? 32;
|
|
45
|
+
const nearRadius = Number.isFinite(configuredRadius)
|
|
46
|
+
? Math.max(0, configuredRadius)
|
|
47
|
+
: 32;
|
|
48
|
+
const abort = new AbortController();
|
|
49
|
+
let anchors = [];
|
|
50
|
+
let frame = null;
|
|
51
|
+
let point = null;
|
|
52
|
+
let geometryDirty = false;
|
|
53
|
+
const clear = () => {
|
|
54
|
+
for (const { element } of anchors) {
|
|
55
|
+
if (element.hasAttribute("data-ui-proximity")) {
|
|
56
|
+
element.removeAttribute("data-ui-proximity");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (scope.hasAttribute("data-ui-interaction")) {
|
|
60
|
+
scope.removeAttribute("data-ui-interaction");
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const measure = () => {
|
|
64
|
+
anchors = Array.from(scope.querySelectorAll(anchorSelector))
|
|
65
|
+
.filter((element) => !element.hasAttribute("disabled") && element.getAttribute("aria-disabled") !== "true")
|
|
66
|
+
.map((element) => ({ element, rect: element.getBoundingClientRect() }));
|
|
67
|
+
geometryDirty = false;
|
|
68
|
+
};
|
|
69
|
+
const update = () => {
|
|
70
|
+
frame = null;
|
|
71
|
+
if (geometryDirty)
|
|
72
|
+
measure();
|
|
73
|
+
if (!point) {
|
|
74
|
+
clear();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
let engaged = false;
|
|
78
|
+
for (const anchor of anchors) {
|
|
79
|
+
const near = distanceFromPointToRect(point, anchor.rect) <= nearRadius;
|
|
80
|
+
if (near && anchor.element.getAttribute("data-ui-proximity") !== "near") {
|
|
81
|
+
anchor.element.setAttribute("data-ui-proximity", "near");
|
|
82
|
+
}
|
|
83
|
+
else if (!near && anchor.element.hasAttribute("data-ui-proximity")) {
|
|
84
|
+
anchor.element.removeAttribute("data-ui-proximity");
|
|
85
|
+
}
|
|
86
|
+
engaged ||= near;
|
|
87
|
+
}
|
|
88
|
+
if (engaged && scope.getAttribute("data-ui-interaction") !== "engaged") {
|
|
89
|
+
scope.setAttribute("data-ui-interaction", "engaged");
|
|
90
|
+
}
|
|
91
|
+
else if (!engaged && scope.hasAttribute("data-ui-interaction")) {
|
|
92
|
+
scope.removeAttribute("data-ui-interaction");
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const schedule = () => {
|
|
96
|
+
if (frame !== null)
|
|
97
|
+
return;
|
|
98
|
+
frame = owner.requestAnimationFrame(update);
|
|
99
|
+
};
|
|
100
|
+
const onPointerMove = (event) => {
|
|
101
|
+
const pointer = event;
|
|
102
|
+
if (pointer.pointerType === "touch") {
|
|
103
|
+
point = null;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
point = { x: pointer.clientX, y: pointer.clientY };
|
|
107
|
+
}
|
|
108
|
+
schedule();
|
|
109
|
+
};
|
|
110
|
+
const invalidate = () => {
|
|
111
|
+
geometryDirty = true;
|
|
112
|
+
schedule();
|
|
113
|
+
};
|
|
114
|
+
pointerTarget.addEventListener("pointermove", onPointerMove, {
|
|
115
|
+
passive: true,
|
|
116
|
+
signal: abort.signal,
|
|
117
|
+
});
|
|
118
|
+
owner.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
119
|
+
owner.addEventListener("scroll", invalidate, { passive: true, capture: true, signal: abort.signal });
|
|
120
|
+
owner.visualViewport?.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
121
|
+
owner.visualViewport?.addEventListener("scroll", invalidate, { passive: true, signal: abort.signal });
|
|
122
|
+
measure();
|
|
123
|
+
return {
|
|
124
|
+
refresh: invalidate,
|
|
125
|
+
destroy() {
|
|
126
|
+
abort.abort();
|
|
127
|
+
if (frame !== null)
|
|
128
|
+
owner.cancelAnimationFrame(frame);
|
|
129
|
+
frame = null;
|
|
130
|
+
point = null;
|
|
131
|
+
clear();
|
|
132
|
+
anchors = [];
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/* looma custom elements */
|
|
2
|
+
export { UIAffordanceScope as UiAffordanceScope } from '../types/components/ui-affordance-scope/ui-affordance-scope';
|
|
3
|
+
export { defineCustomElement as defineCustomElementUiAffordanceScope } from './ui-affordance-scope';
|
|
2
4
|
export { UIAvatar as UiAvatar } from '../types/components/ui-avatar/ui-avatar';
|
|
3
5
|
export { defineCustomElement as defineCustomElementUiAvatar } from './ui-avatar';
|
|
4
6
|
export { UIAvatarGroup as UiAvatarGroup } from '../types/components/ui-avatar-group/ui-avatar-group';
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CIA4RyEp.js";export{UiAvatar,defineCustomElement as defineCustomElementUiAvatar}from"./ui-avatar.js";export{UiAvatarGroup,defineCustomElement as defineCustomElementUiAvatarGroup}from"./ui-avatar-group.js";export{UiBadge,defineCustomElement as defineCustomElementUiBadge}from"./ui-badge.js";export{UiButton,defineCustomElement as defineCustomElementUiButton}from"./ui-button.js";export{UiCheckbox,defineCustomElement as defineCustomElementUiCheckbox}from"./ui-checkbox.js";export{UiContextMenu,defineCustomElement as defineCustomElementUiContextMenu}from"./ui-context-menu.js";export{UiDialog,defineCustomElement as defineCustomElementUiDialog}from"./ui-dialog.js";export{UiDisclosure,defineCustomElement as defineCustomElementUiDisclosure}from"./ui-disclosure.js";export{UiFloatingActionButton,defineCustomElement as defineCustomElementUiFloatingActionButton}from"./ui-floating-action-button.js";export{UiFormField,defineCustomElement as defineCustomElementUiFormField}from"./ui-form-field.js";export{UiIconButton,defineCustomElement as defineCustomElementUiIconButton}from"./ui-icon-button.js";export{UiInput,defineCustomElement as defineCustomElementUiInput}from"./ui-input.js";export{UiMenu,defineCustomElement as defineCustomElementUiMenu}from"./ui-menu.js";export{UiMenuItem,defineCustomElement as defineCustomElementUiMenuItem}from"./ui-menu-item.js";export{UiPopover,defineCustomElement as defineCustomElementUiPopover}from"./ui-popover.js";export{UiRadio,defineCustomElement as defineCustomElementUiRadio}from"./ui-radio.js";export{UiRadioGroup,defineCustomElement as defineCustomElementUiRadioGroup}from"./ui-radio-group.js";export{UiSearchResultRow,defineCustomElement as defineCustomElementUiSearchResultRow}from"./ui-search-result-row.js";export{UiSearchShell,defineCustomElement as defineCustomElementUiSearchShell}from"./ui-search-shell.js";export{UiSelect,defineCustomElement as defineCustomElementUiSelect}from"./ui-select.js";export{UiSwitch,defineCustomElement as defineCustomElementUiSwitch}from"./ui-switch.js";export{UiTabs,defineCustomElement as defineCustomElementUiTabs}from"./ui-tabs.js";export{UiTextarea,defineCustomElement as defineCustomElementUiTextarea}from"./ui-textarea.js";export{UiToastRegion,defineCustomElement as defineCustomElementUiToastRegion}from"./ui-toast-region.js";export{UiTooltip,defineCustomElement as defineCustomElementUiTooltip}from"./ui-tooltip.js";export{UiTopBar,defineCustomElement as defineCustomElementUiTopBar}from"./ui-top-bar.js";
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CIA4RyEp.js";export{UiAffordanceScope,defineCustomElement as defineCustomElementUiAffordanceScope}from"./ui-affordance-scope.js";export{UiAvatar,defineCustomElement as defineCustomElementUiAvatar}from"./ui-avatar.js";export{UiAvatarGroup,defineCustomElement as defineCustomElementUiAvatarGroup}from"./ui-avatar-group.js";export{UiBadge,defineCustomElement as defineCustomElementUiBadge}from"./ui-badge.js";export{UiButton,defineCustomElement as defineCustomElementUiButton}from"./ui-button.js";export{UiCheckbox,defineCustomElement as defineCustomElementUiCheckbox}from"./ui-checkbox.js";export{UiContextMenu,defineCustomElement as defineCustomElementUiContextMenu}from"./ui-context-menu.js";export{UiDialog,defineCustomElement as defineCustomElementUiDialog}from"./ui-dialog.js";export{UiDisclosure,defineCustomElement as defineCustomElementUiDisclosure}from"./ui-disclosure.js";export{UiFloatingActionButton,defineCustomElement as defineCustomElementUiFloatingActionButton}from"./ui-floating-action-button.js";export{UiFormField,defineCustomElement as defineCustomElementUiFormField}from"./ui-form-field.js";export{UiIconButton,defineCustomElement as defineCustomElementUiIconButton}from"./ui-icon-button.js";export{UiInput,defineCustomElement as defineCustomElementUiInput}from"./ui-input.js";export{UiMenu,defineCustomElement as defineCustomElementUiMenu}from"./ui-menu.js";export{UiMenuItem,defineCustomElement as defineCustomElementUiMenuItem}from"./ui-menu-item.js";export{UiPopover,defineCustomElement as defineCustomElementUiPopover}from"./ui-popover.js";export{UiRadio,defineCustomElement as defineCustomElementUiRadio}from"./ui-radio.js";export{UiRadioGroup,defineCustomElement as defineCustomElementUiRadioGroup}from"./ui-radio-group.js";export{UiSearchResultRow,defineCustomElement as defineCustomElementUiSearchResultRow}from"./ui-search-result-row.js";export{UiSearchShell,defineCustomElement as defineCustomElementUiSearchShell}from"./ui-search-shell.js";export{UiSelect,defineCustomElement as defineCustomElementUiSelect}from"./ui-select.js";export{UiSwitch,defineCustomElement as defineCustomElementUiSwitch}from"./ui-switch.js";export{UiTabs,defineCustomElement as defineCustomElementUiTabs}from"./ui-tabs.js";export{UiTextarea,defineCustomElement as defineCustomElementUiTextarea}from"./ui-textarea.js";export{UiToastRegion,defineCustomElement as defineCustomElementUiToastRegion}from"./ui-toast-region.js";export{UiTooltip,defineCustomElement as defineCustomElementUiTooltip}from"./ui-tooltip.js";export{UiTopBar,defineCustomElement as defineCustomElementUiTopBar}from"./ui-top-bar.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as i,c as r,t as a}from"./p-CIA4RyEp.js";import{d as o,e as s}from"./p-JwSoedEO.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;internalOpen=!1;syncFromProp(){this.internalOpen=this.open}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown)}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";o(this.host,"select",{value:i,trigger:s(e)}),o(this.host,"close",{open:!1,reason:"action",trigger:s(e)}),this.internalOpen=!1};onKeydown=e=>{const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const r=e.target.closest?.("ui-menu-item"),a=r&&r instanceof t?i.indexOf(r):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?a<0?0:Math.min(a+1,i.length-1):a<=0?i.length-1:a-1].focus());else if(e.preventDefault(),r&&a>=0){const e=r.getAttribute("value")??r.getAttribute("data-value")??"";o(this.host,"select",{value:e,trigger:"keyboard"}),o(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return i(r,{key:"
|
|
1
|
+
import{p as e,H as t,h as i,c as r,t as a}from"./p-CIA4RyEp.js";import{d as o,e as s}from"./p-JwSoedEO.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;internalOpen=!1;syncFromProp(){this.internalOpen=this.open}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown)}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";o(this.host,"select",{value:i,trigger:s(e)}),o(this.host,"close",{open:!1,reason:"action",trigger:s(e)}),this.internalOpen=!1};onKeydown=e=>{const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const r=e.target.closest?.("ui-menu-item"),a=r&&r instanceof t?i.indexOf(r):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?a<0?0:Math.min(a+1,i.length-1):a<=0?i.length-1:a-1].focus());else if(e.preventDefault(),r&&a>=0){const e=r.getAttribute("value")??r.getAttribute("data-value")??"";o(this.host,"select",{value:e,trigger:"keyboard"}),o(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return i(r,{key:"5e463cbbce272c6b6132a839b818deef3e39a532",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("slot",{key:"feea6a21d41a7b27a6270814bcf0b3f3ded394a1"}))}static get watchers(){return{open:[{syncFromProp:0}]}}static get style(){return":host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}"}},[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},void 0,{open:[{syncFromProp:0}]}]);function u(){"undefined"!=typeof customElements&&["ui-menu"].forEach((e=>{"ui-menu"===e&&(customElements.get(a(e))||customElements.define(a(e),n))}))}export{n as U,u as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UiAffordanceScope extends Components.UiAffordanceScope, HTMLElement {}
|
|
4
|
+
export const UiAffordanceScope: {
|
|
5
|
+
prototype: UiAffordanceScope;
|
|
6
|
+
new (): UiAffordanceScope;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,t as e,H as a,h as n,c as i}from"./p-CIA4RyEp.js";function o(t,e){return Math.hypot(Math.max(e.left-t.x,0,t.x-e.right),Math.max(e.top-t.y,0,t.y-e.bottom))}const r=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}nearRadius=32;coordinator=null;componentDidLoad(){this.connectCoordinator()}disconnectedCallback(){this.coordinator?.destroy(),this.coordinator=null}connectCoordinator(){this.coordinator?.destroy(),this.coordinator=function(t,e={}){const a=t.ownerDocument.defaultView??window,n=e.pointerTarget??t,i=e.anchorSelector??"[data-ui-affordance]",r=e.nearRadius??32,s=Number.isFinite(r)?Math.max(0,r):32,c=new AbortController;let d=[],u=null,l=null,f=!1;const p=()=>{for(const{element:t}of d)t.hasAttribute("data-ui-proximity")&&t.removeAttribute("data-ui-proximity");t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},h=()=>{d=Array.from(t.querySelectorAll(i)).filter((t=>!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled"))).map((t=>({element:t,rect:t.getBoundingClientRect()}))),f=!1},g=()=>{if(u=null,f&&h(),!l)return void p();let e=!1;for(const t of d){const a=o(l,t.rect)<=s;a&&"near"!==t.element.getAttribute("data-ui-proximity")?t.element.setAttribute("data-ui-proximity","near"):!a&&t.element.hasAttribute("data-ui-proximity")&&t.element.removeAttribute("data-ui-proximity"),e||=a}e&&"engaged"!==t.getAttribute("data-ui-interaction")?t.setAttribute("data-ui-interaction","engaged"):!e&&t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},m=()=>{null===u&&(u=a.requestAnimationFrame(g))},y=()=>{f=!0,m()};return n.addEventListener("pointermove",(t=>{l="touch"===t.pointerType?null:{x:t.clientX,y:t.clientY},m()}),{passive:!0,signal:c.signal}),a.addEventListener("resize",y,{passive:!0,signal:c.signal}),a.addEventListener("scroll",y,{passive:!0,capture:!0,signal:c.signal}),a.visualViewport?.addEventListener("resize",y,{passive:!0,signal:c.signal}),a.visualViewport?.addEventListener("scroll",y,{passive:!0,signal:c.signal}),h(),{refresh:y,destroy(){c.abort(),null!==u&&a.cancelAnimationFrame(u),u=null,l=null,p(),d=[]}}}(this.host,{nearRadius:this.nearRadius})}onSlotChange=()=>{this.coordinator?.refresh()};render(){return n(i,{key:"2bc861652826e6227deaba6d1030ecf43753f575"},n("slot",{key:"5e0544939e6b20747f12023dbb45329eb3853715",onSlotchange:this.onSlotChange}))}static get watchers(){return{nearRadius:[{connectCoordinator:0}]}}static get style(){return":host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}"}},[769,"ui-affordance-scope",{nearRadius:[514,"near-radius"]},void 0,{nearRadius:[{connectCoordinator:0}]}]),s=r,c=function(){"undefined"!=typeof customElements&&["ui-affordance-scope"].forEach((t=>{"ui-affordance-scope"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))};export{s as UiAffordanceScope,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as r,c as a,t as o}from"./p-CIA4RyEp.js";const i=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}max=5;label="People";overflowCount=0;slotRef;syncOverflow(){this.updateOverflow()}componentDidLoad(){this.slotRef?.addEventListener("slotchange",(()=>this.updateOverflow())),this.updateOverflow()}componentDidUpdate(){this.updateOverflow()}updateOverflow(){const e=this.host.shadowRoot?.querySelector("slot"),t=(e?.assignedElements()??Array.from(this.host.children)).filter((e=>!e.hasAttribute("data-ui-avatar-group-overflow"))),r=t.length,a=Math.min(this.max,r),o=r>this.max?r-this.max:0;t.forEach(((e,t)=>{e.hidden=t>=a,e.setAttribute("aria-hidden",(t>=a)+"")})),this.overflowCount=o}render(){return r(a,{key:"
|
|
1
|
+
import{p as e,H as t,h as r,c as a,t as o}from"./p-CIA4RyEp.js";const i=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}max=5;label="People";overflowCount=0;slotRef;syncOverflow(){this.updateOverflow()}componentDidLoad(){this.slotRef?.addEventListener("slotchange",(()=>this.updateOverflow())),this.updateOverflow()}componentDidUpdate(){this.updateOverflow()}updateOverflow(){const e=this.host.shadowRoot?.querySelector("slot"),t=(e?.assignedElements()??Array.from(this.host.children)).filter((e=>!e.hasAttribute("data-ui-avatar-group-overflow"))),r=t.length,a=Math.min(this.max,r),o=r>this.max?r-this.max:0;t.forEach(((e,t)=>{e.hidden=t>=a,e.setAttribute("aria-hidden",(t>=a)+"")})),this.overflowCount=o}render(){return r(a,{key:"bef6efd3c80d29e47742412a497893789ea8790b",role:"list","aria-label":this.label||void 0},r("slot",{key:"21585b11dcde36868c3e3bc7fbd0c216be6f011b"}),this.overflowCount>0&&r("span",{key:"ede3b71945d379fe78d522a3346aa29c02d74b15",class:"overflow",role:"listitem","aria-label":this.overflowCount+" more","data-ui-avatar-group-overflow":!0},"+",this.overflowCount))}static get watchers(){return{max:[{syncOverflow:0}]}}static get style(){return":host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}"}},[769,"ui-avatar-group",{max:[2],label:[1],overflowCount:[32]},void 0,{max:[{syncOverflow:0}]}]),s=i,n=function(){"undefined"!=typeof customElements&&["ui-avatar-group"].forEach((e=>{"ui-avatar-group"===e&&(customElements.get(o(e))||customElements.define(o(e),i))}))};export{s as UiAvatarGroup,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,
|
|
1
|
+
import{p as a,H as e,h as t,c as i,t as s}from"./p-CIA4RyEp.js";const r=a(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow()}src="";alt="";name="";fallback="";hasImage=!1;watchSrc(){this.hasImage=!1}onImageLoad=()=>{this.hasImage=!0};onImageError=()=>{this.hasImage=!1};render(){const a=this.fallback||function(a){const e=a.trim().split(/\s+/).filter((a=>a.length>0));return 0===e.length?"?":1===e.length?e[0].slice(0,2).toUpperCase():`${e[0][0]??""}${e[1][0]??""}`.toUpperCase()}(this.name||this.alt),e=this.alt||this.name||"Avatar";return t(i,{key:"18214960ad2f1a0370907c0281102af924739de9",role:"img","aria-label":e,"data-has-image":this.hasImage?"":void 0},t("div",{key:"c6d0a00de56b756f0e24fdc4b306d89cdae2a44f",class:"avatar"},t("img",{key:"c5bfecb9d18797bc934ff087ce7ed8a4616ab347",src:this.src,alt:e,onLoad:this.onImageLoad,onError:this.onImageError,hidden:!this.hasImage,"aria-hidden":this.hasImage?"false":"true"}),t("span",{key:"1875a45a9c21de3e3a52924ef25b3f8429a788c4",class:"fallback",hidden:this.hasImage,"aria-hidden":this.hasImage?"true":"false"},a)))}static get watchers(){return{src:[{watchSrc:0}]}}static get style(){return":host{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar{display:contents}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}"}},[513,"ui-avatar",{src:[1],alt:[1],name:[1],fallback:[1],hasImage:[32]},void 0,{src:[{watchSrc:0}]}]),c=r,n=function(){"undefined"!=typeof customElements&&["ui-avatar"].forEach((a=>{"ui-avatar"===a&&(customElements.get(s(a))||customElements.define(s(a),r))}))};export{c as UiAvatar,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as o,H as a,h as r,c as t,t as e}from"./p-CIA4RyEp.js";const n=o(class extends a{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow()}variant;tone;render(){return r(t,{key:"8766c0331ac7fbd6409b604578e159ae093c844b","data-variant":this.variant||void 0,"data-tone":this.tone||void 0},r("slot",{key:"65016ab530b850c82261e2da718622ff72567634"}))}static get style(){return":host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}"}},[769,"ui-badge",{variant:[1],tone:[1]}]),i=n,s=function(){"undefined"!=typeof customElements&&["ui-badge"].forEach((o=>{"ui-badge"===o&&(customElements.get(e(o))||customElements.define(e(o),n))}))};export{i as UiBadge,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as o,h as a,c as
|
|
1
|
+
import{p as t,H as o,h as a,c as e,t as r}from"./p-CIA4RyEp.js";import{i as s}from"./p-JwSoedEO.js";const i=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}variant="outline";size;disabled=!1;slotRef;syncToButton(){const t=this.getButton();t&&(this.host.dataset.size=this.size||"",this.host.dataset.disabled=this.disabled?"true":"",t.disabled=this.disabled)}componentDidLoad(){this.slotRef?.addEventListener("slotchange",(()=>this.syncToButton())),this.syncToButton()}componentDidUpdate(){this.syncToButton()}getButton(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>"BUTTON"===t.tagName))??null}onKeydown=t=>{this.getButton()||this.disabled||!s(t)||(t.preventDefault(),this.host.click())};render(){return a(e,{key:"b5f9152db70a276334df047f5cf53d1b8efe2174","data-size":this.size||void 0,"data-disabled":this.disabled?"":void 0,onKeyDown:this.onKeydown},a("slot",{key:"b39657e832abc63a6ea6090fa061779c3ae654b5",ref:t=>this.slotRef=t}))}static get watchers(){return{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}}static get style(){return":host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}:host([variant='outline'])::slotted(button),::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none;transform:translateY(0)}:host([variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='destructive'])::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}"}},[769,"ui-button",{variant:[1],size:[1],disabled:[4]},void 0,{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}]),n=i,d=function(){"undefined"!=typeof customElements&&["ui-button"].forEach((t=>{"ui-button"===t&&(customElements.get(r(t))||customElements.define(r(t),i))}))};export{n as UiButton,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as s,c as i,t as c}from"./p-CIA4RyEp.js";import{d as n,e as o}from"./p-JwSoedEO.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}checked=!1;defaultChecked=!1;disabled=!1;indeterminate=!1;required=!1;value="on";internalChecked=!1;slotRef;syncFromProp(){this.internalChecked=this.checked}syncToInput(){const e=this.getInput();e&&(this.host.dataset.disabled=this.disabled?"true":"",this.host.setAttribute("aria-disabled",this.disabled+""),e.checked=this.internalChecked,e.indeterminate=this.indeterminate,e.disabled=this.disabled,e.required=this.required,e.value=this.value)}componentDidLoad(){this.syncFromProp(),this.internalChecked=this.internalChecked||this.defaultChecked,this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const e=this.getInput();e?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const e=this.getInput();e?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const e=this.host.shadowRoot?.querySelector("slot");return(e?.assignedElements()??Array.from(this.host.children)).find((e=>e instanceof HTMLInputElement&&"checkbox"===e.type))??null}onInputChange=e=>{const t=e.target;t&&(this.internalChecked=t.checked,this.indeterminate=t.indeterminate,n(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:o(e)}))};render(){return s(i,{key:"
|
|
1
|
+
import{p as e,H as t,h as s,c as i,t as c}from"./p-CIA4RyEp.js";import{d as n,e as o}from"./p-JwSoedEO.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}checked=!1;defaultChecked=!1;disabled=!1;indeterminate=!1;required=!1;value="on";internalChecked=!1;slotRef;syncFromProp(){this.internalChecked=this.checked}syncToInput(){const e=this.getInput();e&&(this.host.dataset.disabled=this.disabled?"true":"",this.host.setAttribute("aria-disabled",this.disabled+""),e.checked=this.internalChecked,e.indeterminate=this.indeterminate,e.disabled=this.disabled,e.required=this.required,e.value=this.value)}componentDidLoad(){this.syncFromProp(),this.internalChecked=this.internalChecked||this.defaultChecked,this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const e=this.getInput();e?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const e=this.getInput();e?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const e=this.host.shadowRoot?.querySelector("slot");return(e?.assignedElements()??Array.from(this.host.children)).find((e=>e instanceof HTMLInputElement&&"checkbox"===e.type))??null}onInputChange=e=>{const t=e.target;t&&(this.internalChecked=t.checked,this.indeterminate=t.indeterminate,n(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:o(e)}))};render(){return s(i,{key:"66b6708ae71c9eca6c03c63891b590bd050c2506",role:"checkbox","aria-checked":this.indeterminate?"mixed":this.internalChecked+"","aria-disabled":this.disabled+"","data-disabled":this.disabled?"":void 0},s("slot",{key:"b5e168a9ff0c6e5e747fff6c6264c59744f10a56",ref:e=>this.slotRef=e}))}static get watchers(){return{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}}static get style(){return":host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}"}},[769,"ui-checkbox",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],indeterminate:[4],required:[4],value:[1],internalChecked:[32]},void 0,{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}]),h=a,r=function(){"undefined"!=typeof customElements&&["ui-checkbox"].forEach((e=>{"ui-checkbox"===e&&(customElements.get(c(e))||customElements.define(c(e),a))}))};export{h as UiCheckbox,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as i,c as s,t as n}from"./p-CIA4RyEp.js";import{o,c as r,r as a}from"./p-CR7f2MQC.js";import{d as h}from"./p-JwSoedEO.js";import{d as c}from"./p-
|
|
1
|
+
import{p as t,H as e,h as i,c as s,t as n}from"./p-CIA4RyEp.js";import{o,c as r,r as a}from"./p-CR7f2MQC.js";import{d as h}from"./p-JwSoedEO.js";import{d as c}from"./p-QiwSQmKJ.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;for;internalOpen=!1;overlayId="ui-context-menu-"+Math.random().toString(36).slice(2,11);trigger=null;contextTarget=null;pointerX=0;pointerY=0;syncFromProp(){this.internalOpen=this.open}syncTarget(){this.resolveTargets(),this.attachTargetListeners()}syncOverlay(){this.syncTriggerState(),this.internalOpen?o({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(t,e)=>this.closeMenu(t,e)}):r(this.overlayId)}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.resolveTargets(),this.attachTargetListeners(),this.syncTriggerState(),this.syncOverlay()}componentDidUpdate(){this.resolveTargets(),this.attachTargetListeners(),this.syncTriggerState()}disconnectedCallback(){this.detachTargetListeners(),r(this.overlayId)}resolveTargets(){const t=this.trigger,e=this.contextTarget,i=this.host.querySelector('[slot="trigger"]'),s=this.for?document.getElementById(this.for):null;this.trigger=i,this.contextTarget=s??i??this.host.parentElement,t===this.trigger&&e===this.contextTarget||(t?.removeEventListener("click",this.onTriggerClick),t?.removeEventListener("keydown",this.onTriggerKeydown),e?.removeEventListener("contextmenu",this.onContextMenu))}attachTargetListeners(){this.detachTargetListeners(),this.trigger?.addEventListener("click",this.onTriggerClick),this.trigger?.addEventListener("keydown",this.onTriggerKeydown),this.contextTarget?.addEventListener("contextmenu",this.onContextMenu)}detachTargetListeners(){this.trigger?.removeEventListener("click",this.onTriggerClick),this.trigger?.removeEventListener("keydown",this.onTriggerKeydown),this.contextTarget?.removeEventListener("contextmenu",this.onContextMenu)}syncTriggerState(){this.trigger&&(this.trigger.setAttribute("aria-haspopup","menu"),this.trigger.setAttribute("aria-expanded",this.internalOpen?"true":"false"))}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item")).filter((t=>!this.isItemDisabled(t)))}focusFirstItem(){requestAnimationFrame((()=>this.getItems()[0]?.focus()))}openMenu(t,e,i){this.pointerX=t,this.pointerY=e,this.internalOpen=!0,h(this.host,"open",{open:!0,reason:"action",trigger:i}),this.focusFirstItem()}openFromTrigger(t){if(!this.trigger)return;const e=this.trigger.getBoundingClientRect();this.openMenu(e.left,e.bottom,t)}closeMenu(t,e,i=!0){this.internalOpen&&(this.internalOpen=!1,h(this.host,"close",{open:!1,reason:t,trigger:e}),i&&this.trigger?.focus())}onTriggerClick=t=>{this.internalOpen?this.closeMenu("action",0===t.detail?"keyboard":"pointer"):this.openFromTrigger(0===t.detail?"keyboard":"pointer")};onTriggerKeydown=t=>{"Enter"!==t.key&&" "!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.internalOpen?this.focusFirstItem():this.openFromTrigger("keyboard"))};onContextMenu=t=>{t.preventDefault(),this.openMenu(t.clientX,t.clientY,"pointer")};isItemDisabled(t){return"true"===t.getAttribute("aria-disabled")||t.hasAttribute("disabled")||"true"===t.getAttribute("disabled")||!0===t.disabled}onKeydown=t=>{if(this.internalOpen){if("Escape"===t.key)return t.preventDefault(),void a("escape","keyboard");if("Enter"===t.key||" "===t.key){const e=t.target.closest?.("ui-menu-item");if(!e||this.isItemDisabled(e))return;t.preventDefault();const i=e.getAttribute("value")??e.getAttribute("data-value")??"";h(this.host,"select",{value:i,trigger:"keyboard"}),this.closeMenu("action","keyboard")}}};onItemClick=t=>{const e=t.target.closest?.("ui-menu-item");if(!e||this.isItemDisabled(e))return;const i=e.getAttribute("value")??e.getAttribute("data-value")??"";h(this.host,"select",{value:i,trigger:"pointer"}),this.closeMenu("action","pointer")};render(){return i(s,{key:"79fbca2c89f1d1fd1f4796ad88d2a599e811a3f9","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown,onClick:this.onItemClick},i("slot",{key:"9308cadfa155930e3e46dfb4a69a847ae388958b",name:"trigger"}),i("div",{key:"16cfba2b32444ac9e3cac1f040f81f17fd5db23c",class:"menu","data-open":this.internalOpen?"":void 0,style:{left:this.pointerX+"px",top:this.pointerY+"px"}},i("ui-menu",{key:"59f18e0df3bb1fe85efa8eeca00b336bbde47c70",open:this.internalOpen},i("slot",{key:"5bdbb7773c9c1ae43ec2e05fca9558482815e28a"}))))}static get watchers(){return{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}}static get style(){return":host{display:contents}.menu{position:fixed;z-index:var(--ui-z-overlay, 1000);min-width:12rem}.menu[data-open]{display:block}.menu:not([data-open]){display:none !important}"}},[769,"ui-context-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}]),u=d,l=function(){"undefined"!=typeof customElements&&["ui-context-menu","ui-menu"].forEach((t=>{switch(t){case"ui-context-menu":customElements.get(n(t))||customElements.define(n(t),d);break;case"ui-menu":customElements.get(n(t))||c()}}))};export{u as UiContextMenu,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as i,H as
|
|
1
|
+
import{p as i,H as a,h as o,c as e,t}from"./p-CIA4RyEp.js";import{o as s,c as r,r as n}from"./p-CR7f2MQC.js";import{d}from"./p-JwSoedEO.js";const l=i(class extends a{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;overlayId="ui-dialog-"+Math.random().toString(36).slice(2,11);dialogRef;syncFromProp(){this.internalOpen=this.open}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),s({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),r(this.overlayId)))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),r(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){this.internalOpen=!1,d(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(this.internalOpen=!1,r(this.overlayId),d(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&n("escape","keyboard")};render(){return o(e,{key:"c10f9063a1c2677caff3b8d1f26b37bf25978a77","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("dialog",{key:"a7111bd363cab94f394cca526bf34ea8081e5228",ref:i=>this.dialogRef=i,open:this.internalOpen,"aria-label":this.label},o("slot",{key:"b0a9699fe0be09e331cfea81b6bbeaec11d48956"})))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}}static get style(){return":host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}"}},[769,"ui-dialog",{open:[4],defaultOpen:[4,"default-open"],modal:[4],dismissible:[4],label:[1],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}]),u=l,c=function(){"undefined"!=typeof customElements&&["ui-dialog"].forEach((i=>{"ui-dialog"===i&&(customElements.get(t(i))||customElements.define(t(i),l))}))};export{u as UiDialog,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as s,h as i,c as e,t as n}from"./p-CIA4RyEp.js";import{c as o}from"./p-hgBUJRDa.js";import{d as r,e as
|
|
1
|
+
import{p as t,H as s,h as i,c as e,t as n}from"./p-CIA4RyEp.js";import{c as o}from"./p-hgBUJRDa.js";import{d as r,e as a,i as h}from"./p-JwSoedEO.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;disabled=!1;internalOpen=!1;contentId="";trigger=null;content=null;syncFromProp(){this.internalOpen=this.open}syncState(){this.trigger&&this.trigger.setAttribute("aria-expanded",this.internalOpen+""),this.content&&(this.content.hidden=!this.internalOpen)}componentDidLoad(){this.resolveParts(),this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.syncState(),this.trigger?.addEventListener("click",this.onTriggerClick),this.trigger?.addEventListener("keydown",this.onTriggerKeydown)}disconnectedCallback(){this.trigger?.removeEventListener("click",this.onTriggerClick),this.trigger?.removeEventListener("keydown",this.onTriggerKeydown)}componentDidUpdate(){this.syncState()}resolveParts(){this.trigger=this.host.querySelector("[data-ui-disclosure-trigger], button, [aria-controls]");const t=this.trigger?.getAttribute("aria-controls")??"";if(t)this.content=document.getElementById(t);else{const t=Array.from(this.host.children);this.content=t.find((t=>t!==this.trigger))??null}this.trigger&&this.content&&(this.content.id||(this.content.id=o("disclosure-content")),this.trigger.setAttribute("aria-controls",this.content.id),this.contentId=this.content.id),this.trigger instanceof HTMLButtonElement?this.trigger.disabled=this.disabled:this.trigger&&this.trigger.setAttribute("aria-disabled",this.disabled+"")}setOpen(t,s){this.internalOpen!==t&&(this.internalOpen=t,r(this.host,t?"open":"close",{open:t,reason:s.reason,trigger:s.trigger}))}onTriggerClick=t=>{this.disabled?t.preventDefault():this.setOpen(!this.internalOpen,{reason:"action",trigger:a(t)})};onTriggerKeydown=t=>{!this.disabled&&h(t)&&(t.preventDefault(),this.setOpen(!this.internalOpen,{reason:"action",trigger:"keyboard"}))};render(){return i(e,{key:"7fbc83614f8e988a43d1baac0379a6dc8826b1d5"},i("slot",{key:"6ef33ca7bce5c4d83ab65642f52a9d17febb794d"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}}static get style(){return":host{display:block}::slotted([hidden]){display:none !important}"}},[769,"ui-disclosure",{open:[4],defaultOpen:[4,"default-open"],disabled:[4],internalOpen:[32],contentId:[32]},void 0,{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}]),d=c,l=function(){"undefined"!=typeof customElements&&["ui-disclosure"].forEach((t=>{"ui-disclosure"===t&&(customElements.get(n(t))||customElements.define(n(t),c))}))};export{d as UiDisclosure,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,h as o,c as n,t as
|
|
1
|
+
import{p as t,H as i,h as o,c as n,t as e}from"./p-CIA4RyEp.js";const a=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}disabled=!1;mobileOnly=!1;label="";render(){return o(n,{key:"6f67f3967cf8883005f6c56747db515db5ebe1d0","data-disabled":this.disabled?"":void 0},o("button",{key:"deebb9261221c144b30bc3e41790158fc339cd14",type:"button","aria-label":this.label||void 0,disabled:this.disabled},o("slot",{key:"3b045b69a4508c84dd5b7c8b3df0e6f3eded1c13"})))}static get style(){return":host{position:fixed;inset-block-end:calc( var(--ui-floating-action-button-bottom, var(--ui-space-6, 1.5rem)) + env(safe-area-inset-bottom) );inset-inline-end:max( var(--ui-floating-action-button-inline-end, var(--ui-space-5, 1.25rem)), env(safe-area-inset-right) );inline-size:var(--ui-floating-action-button-size, 56px);block-size:var(--ui-floating-action-button-size, 56px);display:inline-flex;z-index:var(--ui-floating-action-button-z-index, 100)}button{appearance:none;inline-size:100%;block-size:100%;border:none;border-radius:999px;margin:0;padding:0;display:inline-flex;align-items:center;justify-content:center;background:var(--ui-floating-action-button-bg, var(--ui-accent-solid));color:var(--ui-floating-action-button-color, var(--ui-text-on-accent));box-shadow:var( --ui-floating-action-button-shadow, 0 4px 12px color-mix(in srgb, var(--ui-accent-solid) 40%, transparent) );cursor:pointer;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), transform var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease), box-shadow var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}button:hover:enabled{background:var(--ui-floating-action-button-hover-bg, var(--ui-accent-hover));box-shadow:var( --ui-floating-action-button-hover-shadow, 0 6px 16px color-mix(in srgb, var(--ui-accent-solid) 50%, transparent) )}button:active:enabled{transform:scale(var(--ui-floating-action-button-active-scale, 0.94))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-floating-action-button-icon-size, 24px);block-size:var(--ui-floating-action-button-icon-size, 24px);flex-shrink:0}@media (min-width: 768px){:host([mobile-only]){display:none}}"}},[769,"ui-floating-action-button",{disabled:[516],mobileOnly:[516,"mobile-only"],label:[1]}]),s=a,r=function(){"undefined"!=typeof customElements&&["ui-floating-action-button"].forEach((t=>{"ui-floating-action-button"===t&&(customElements.get(e(t))||customElements.define(e(t),a))}))};export{s as UiFloatingActionButton,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as i,c as r,t as s}from"./p-CIA4RyEp.js";import{c as
|
|
1
|
+
import{p as e,H as t,h as i,c as r,t as s}from"./p-CIA4RyEp.js";import{c as a}from"./p-hgBUJRDa.js";const o=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}invalid=!1;disabled=!1;required=!1;componentDidLoad(){this.wire()}componentDidUpdate(){this.wire()}wire(){const e=this.host.querySelector("label"),t=this.host.querySelector("input, textarea, select"),i=this.host.querySelector('[data-slot="help"]'),r=this.host.querySelector('[data-slot="error"], [role="alert"]');if(!t)return;t.id||(t.id=a("form-field-input")),e&&!e.getAttribute("for")&&e.setAttribute("for",t.id);const s=[];i&&(i.id||(i.id=a("form-field-help")),s.push(i.id)),r&&(r.id||(r.id=a("form-field-error")),s.push(r.id)),s.length&&t.setAttribute("aria-describedby",s.join(" ")),t.disabled=this.disabled,t.required=this.required,t.setAttribute("aria-invalid",this.invalid?"true":"false")}render(){return i(r,{key:"c0a01ac28a7dd0e0b285e4b9f9763ef536a83a2e","data-invalid":this.invalid?"":void 0,"data-disabled":this.disabled?"":void 0,"data-required":this.required?"":void 0},i("slot",{key:"b09be4482299d866a0651393e269299dedb0cbf4"}))}static get style(){return":host{display:grid;gap:var(--ui-space-2);color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){color:var(--ui-text-muted);font-size:0.875rem}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}"}},[769,"ui-form-field",{invalid:[4],disabled:[4],required:[4]}]),d=o,l=function(){"undefined"!=typeof customElements&&["ui-form-field"].forEach((e=>{"ui-form-field"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))};export{d as UiFormField,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as o,H as i,h as t,c as n,t as e}from"./p-CIA4RyEp.js";const r=o(class extends i{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow()}disabled=!1;label="";size="md";variant="ghost";anticipatory=!1;render(){return t(n,{key:"dd6149d96d534a641eedaf808df5348eef48f31f","data-disabled":this.disabled?"":void 0,"data-ui-affordance":this.anticipatory?"button":void 0},t("button",{key:"3e1b83a3e01b724cb75ddb7243a1e85bd9eb3420",type:"button","aria-label":this.label||void 0,disabled:this.disabled},t("slot",{key:"d280293841471ad37f556c73d86de3223e1f98e6"})))}static get style(){return":host{display:inline-flex;color:var(--ui-text-secondary)}:host([anticipatory]){position:relative}:host([anticipatory])::before{content:'';position:absolute;inset:50% auto auto 50%;z-index:1;inline-size:var(--ui-affordance-guide-size, 0.25rem);block-size:var(--ui-affordance-guide-size, 0.25rem);border-radius:var(--ui-radius-round, 999px);background:var(--ui-affordance-guide-color, var(--ui-border-strong));opacity:var(--ui-affordance-guide-opacity, 0.42);transform:translate(-50%, -50%);transition:opacity var(--ui-affordance-motion, var(--ui-motion-fast)) var(--ui-motion-ease);pointer-events:none}:host([anticipatory]) button{opacity:0;transform:scale(0.72);pointer-events:none}:host([anticipatory][data-ui-proximity='near'])::before,:host([anticipatory]:focus-within)::before,:host([anticipatory]:hover)::before,:host([anticipatory][variant='solid'])::before{opacity:0}:host([anticipatory][data-ui-proximity='near']) button,:host([anticipatory]:focus-within) button,:host([anticipatory]:hover) button,:host([anticipatory][variant='solid']) button{opacity:1;transform:scale(1);pointer-events:auto}button{appearance:none;inline-size:var(--ui-icon-button-size, 2.5rem);block-size:var(--ui-icon-button-size, 2.5rem);min-inline-size:var(--ui-icon-button-size, 2.5rem);min-block-size:var(--ui-icon-button-size, 2.5rem);padding:0;margin:0;border:1px solid transparent;border-radius:var(--ui-icon-button-radius, var(--ui-radius-2));background:var(--ui-icon-button-bg, transparent);color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease)}@media (hover: none), (pointer: coarse){:host([anticipatory])::before{opacity:0}:host([anticipatory]) button{opacity:1;transform:none;pointer-events:auto}}:host([size='sm']) button{inline-size:var(--ui-icon-button-size-sm, 2rem);block-size:var(--ui-icon-button-size-sm, 2rem);min-inline-size:var(--ui-icon-button-size-sm, 2rem);min-block-size:var(--ui-icon-button-size-sm, 2rem)}:host([size='lg']) button{inline-size:var(--ui-icon-button-size-lg, 2.75rem);block-size:var(--ui-icon-button-size-lg, 2.75rem);min-inline-size:var(--ui-icon-button-size-lg, 2.75rem);min-block-size:var(--ui-icon-button-size-lg, 2.75rem)}:host([variant='outline']) button{border-color:var(--ui-icon-button-border, var(--ui-border-default));background:var(--ui-icon-button-outline-bg, var(--ui-surface-default));color:var(--ui-icon-button-outline-color, var(--ui-text-primary))}:host([variant='solid']) button{background:var(--ui-icon-button-solid-bg, var(--ui-accent-solid));color:var(--ui-icon-button-solid-color, var(--ui-text-on-accent));box-shadow:var( --ui-icon-button-solid-shadow, 0 1px 2px color-mix(in srgb, var(--ui-accent-solid) 18%, transparent) )}button:hover:enabled{background:var(--ui-icon-button-hover-bg, var(--ui-surface-muted));color:var(--ui-icon-button-hover-color, var(--ui-text-primary))}:host([variant='outline']) button:hover:enabled{border-color:var(--ui-icon-button-hover-border, var(--ui-border-strong))}:host([variant='solid']) button:hover:enabled{background:var(--ui-icon-button-solid-hover-bg, var(--ui-accent-hover))}button:active:enabled{transform:scale(var(--ui-icon-button-active-scale, 0.96))}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:2px}button:disabled,:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(svg){inline-size:var(--ui-icon-button-icon-size, 1.125rem);block-size:var(--ui-icon-button-icon-size, 1.125rem);flex-shrink:0;stroke-width:var(--ui-icon-button-icon-stroke-width, 1.75)}"}},[769,"ui-icon-button",{disabled:[516],label:[1],size:[513],variant:[513],anticipatory:[516]}]),a=r,s=function(){"undefined"!=typeof customElements&&["ui-icon-button"].forEach((o=>{"ui-icon-button"===o&&(customElements.get(e(o))||customElements.define(e(o),r))}))};export{a as UiIconButton,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,h as e,c as n,t as s}from"./p-CIA4RyEp.js";import{d as
|
|
1
|
+
import{p as t,H as i,h as e,c as n,t as s}from"./p-CIA4RyEp.js";import{d as a,e as o}from"./p-JwSoedEO.js";const r=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}value="";defaultValue="";disabled=!1;invalid=!1;readOnly=!1;internalValue="";slotRef;syncFromProp(){this.internalValue=this.value}syncToInput(){const t=this.getInput();t&&(this.host.dataset.invalid=this.invalid?"true":"",t.value=this.internalValue,t.defaultValue=this.defaultValue,t.disabled=this.disabled,t.readOnly=this.readOnly,t.setAttribute("aria-invalid",this.invalid?"true":"false"))}componentDidLoad(){this.syncFromProp(),this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const t=this.getInput();t?.addEventListener("input",this.onInput),t?.addEventListener("change",this.onChange)}disconnectedCallback(){const t=this.getInput();t?.removeEventListener("input",this.onInput),t?.removeEventListener("change",this.onChange)}componentDidUpdate(){this.syncToInput()}getInput(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>"INPUT"===t.tagName))??null}onInput=t=>{const i=t.target;i&&(this.internalValue=i.value,a(this.host,"input",{value:this.internalValue,trigger:o(t)}))};onChange=t=>{const i=this.getInput();i&&(this.internalValue=i.value,a(this.host,"change",{value:this.internalValue,trigger:o(t)}))};render(){return e(n,{key:"2b3b4f6862cf5c5e413aaefb349c53d4e66eb6d0","data-invalid":this.invalid?"":void 0},e("slot",{key:"140dc656f13399b8ef05adb6cfa1d9a7e1373c2d",ref:t=>this.slotRef=t}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncToInput:0}],defaultValue:[{syncToInput:0}],disabled:[{syncToInput:0}],invalid:[{syncToInput:0}],readOnly:[{syncToInput:0}]}}static get style(){return":host{display:inline-flex;color:var(--ui-text-primary)}::slotted(input){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(input:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(input:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(input),::slotted(input[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(input:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(input:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}"}},[769,"ui-input",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],internalValue:[32]},void 0,{value:[{syncFromProp:0}],internalValue:[{syncToInput:0}],defaultValue:[{syncToInput:0}],disabled:[{syncToInput:0}],invalid:[{syncToInput:0}],readOnly:[{syncToInput:0}]}]),u=r,d=function(){"undefined"!=typeof customElements&&["ui-input"].forEach((t=>{"ui-input"===t&&(customElements.get(s(t))||customElements.define(s(t),r))}))};export{u as UiInput,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as
|
|
1
|
+
import{p as e,H as t,h as i,c as a,t as o}from"./p-CIA4RyEp.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}disabled=!1;value="";render(){return i(a,{key:"c0024d4bb84224019121b98a6fec36bfdad00864",role:"menuitem",tabIndex:this.disabled?-1:0,"aria-disabled":this.disabled?"true":void 0,"data-value":this.value||void 0},i("slot",{key:"00eee7c496dfaf71e8ec158606ebc6641e2ef0d8"}))}static get style(){return":host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}"}},[769,"ui-menu-item",{disabled:[516],value:[1]}]),s=r,u=function(){"undefined"!=typeof customElements&&["ui-menu-item"].forEach((e=>{"ui-menu-item"===e&&(customElements.get(o(e))||customElements.define(o(e),r))}))};export{s as UiMenuItem,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as o,d as s}from"./p-
|
|
1
|
+
import{U as o,d as s}from"./p-QiwSQmKJ.js";const m=o,p=s;export{m as UiMenu,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as o,h as t,c as s,t as r}from"./p-CIA4RyEp.js";import{o as i,c as a,r as n}from"./p-CR7f2MQC.js";import{d as p}from"./p-JwSoedEO.js";const
|
|
1
|
+
import{p as e,H as o,h as t,c as s,t as r}from"./p-CIA4RyEp.js";import{o as i,c as a,r as n}from"./p-CR7f2MQC.js";import{d as p}from"./p-JwSoedEO.js";const d=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;internalOpen=!1;overlayId="ui-popover-"+Math.random().toString(36).slice(2,11);syncFromProp(){this.internalOpen=this.open}onOpenChange(){this.syncOverlay(),this.internalOpen?p(this.host,"open",{open:!0,reason:"programmatic",trigger:"programmatic"}):p(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"})}syncOverlay(){this.internalOpen?i({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(e,o)=>this.handleRequestClose(e,o)}):a(this.overlayId)}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("keydown",this.onKeydown),this.syncOverlay()}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),a(this.overlayId)}componentDidUpdate(){this.syncOverlay()}handleRequestClose(e,o){this.internalOpen=!1,p(this.host,"close",{open:!1,reason:e,trigger:o})}onKeydown=e=>{"Escape"===e.key&&n("escape","keyboard")};render(){return t(s,{key:"67e7f52220db9d997fb11b686d6abcbdf9557a8d","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},t("slot",{key:"d7c1fa2ab75994fe0a7dd63f8289754c7754c30f"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}]}}static get style(){return":host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto}"}},[769,"ui-popover",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}]}]),c=d,h=function(){"undefined"!=typeof customElements&&["ui-popover"].forEach((e=>{"ui-popover"===e&&(customElements.get(r(e))||customElements.define(r(e),d))}))};export{c as UiPopover,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,h as
|
|
1
|
+
import{p as t,H as i,h as a,c as e,t as s}from"./p-CIA4RyEp.js";import{d as o,e as r}from"./p-JwSoedEO.js";const n=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}value="";name="";orientation="horizontal";disabled=!1;required=!1;internalValue="";syncFromProp(){this.internalValue=this.value}syncToRadios(){this.getRadios().forEach((t=>{t.checked=(t.getAttribute("value")??"")===this.internalValue,t.name=this.name||this.groupId,this.disabled?(t.setAttribute("aria-disabled","true"),t.setAttribute("data-disabled","true")):(t.removeAttribute("aria-disabled"),t.removeAttribute("data-disabled"))})),this.updateRovingTabindex()}groupId="ui-radio-group-"+Math.random().toString(36).slice(2,9);componentDidLoad(){this.syncFromProp(),this.syncToRadios(),this.host.addEventListener("change",this.onRadioChange),this.host.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){this.host.removeEventListener("change",this.onRadioChange),this.host.removeEventListener("keydown",this.onKeydown)}componentDidUpdate(){this.syncToRadios()}getRadios(){return Array.from(this.host.querySelectorAll("ui-radio"))}updateRovingTabindex(){const t=this.getRadios(),i=t.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue));t.forEach(((t,a)=>{const e=t.querySelector('input[type="radio"]');e&&(e.tabIndex=a===(i>=0?i:0)?0:-1)}))}setValue(t,i){const a=this.internalValue;this.internalValue=t,this.syncToRadios(),o(this.host,"select",{value:t,previousValue:a,trigger:i}),o(this.host,"change",{checked:!0,value:t,trigger:i})}onRadioChange=t=>{const i=t.target.closest?.("ui-radio");if(!i||i.getRootNode()!==this.host.getRootNode())return;const a=i.getAttribute("value")??"";a&&a!==this.internalValue&&this.setValue(a,r(t))};onKeydown=t=>{const i=this.getRadios();if(0===i.length)return;const a=i.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue)),e="vertical"===this.orientation?"vertical":"horizontal",s="horizontal"===e?"ArrowRight"===t.key:"ArrowDown"===t.key;if(!("horizontal"===e?"ArrowLeft"===t.key:"ArrowUp"===t.key)&&!s)return;let o;t.preventDefault(),o=s?a<0?0:Math.min(a+1,i.length-1):a<=0?i.length-1:a-1;const r=i[o],n=r?.getAttribute("value")??"";n&&(this.setValue(n,"keyboard"),r?.querySelector('input[type="radio"]')?.focus())};render(){return a(e,{key:"5410f4adb5d4ca888287150f57de38ab59cc791d",role:"radiogroup","aria-orientation":this.orientation,"data-orientation":this.orientation,"data-disabled":this.disabled?"":void 0},a("slot",{key:"d3988acaf5456e89f26d449ccaadaf237c223bbd"}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}}static get style(){return":host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}"}},[769,"ui-radio-group",{value:[1],name:[1],orientation:[1],disabled:[4],required:[4],internalValue:[32]},void 0,{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}]),d=n,h=function(){"undefined"!=typeof customElements&&["ui-radio-group"].forEach((t=>{"ui-radio-group"===t&&(customElements.get(s(t))||customElements.define(s(t),n))}))};export{d as UiRadioGroup,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,H as t,h as s,c as i,t as n}from"./p-CIA4RyEp.js";import{d as a,e as o}from"./p-JwSoedEO.js";const c=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}checked=!1;defaultChecked=!1;disabled=!1;name="";required=!1;value="on";slotRef;syncToInput(){const e=this.getInput();e&&(this.host.dataset.disabled=this.disabled?"true":"",e.checked=this.checked,e.disabled=this.disabled,e.name=this.name,e.required=this.required,e.value=this.value)}componentDidLoad(){!this.checked&&this.defaultChecked&&(this.checked=!0),this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const e=this.getInput();e?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const e=this.getInput();e?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const e=this.host.shadowRoot?.querySelector("slot");return(e?.assignedElements()??Array.from(this.host.children)).find((e=>e instanceof HTMLInputElement&&"radio"===e.type))??null}onInputChange=e=>{const t=e.target;t&&t.checked&&a(this.host,"change",{checked:!0,value:this.value,trigger:o(e)})};render(){return s(i,{key:"e3025fa3ee89c684ab27e7780f11399e1e455eff",role:"radio","aria-checked":this.checked+"","aria-disabled":this.disabled+"","data-disabled":this.disabled?"":void 0},s("slot",{key:"279fd849b1ea8f2f84e34043a01da710008aba51",ref:e=>this.slotRef=e}))}static get watchers(){return{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}}static get style(){return":host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([data-disabled='true']),:host([aria-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='radio']){accent-color:var(--ui-accent-solid);cursor:pointer}::slotted(input[type='radio']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}"}},[769,"ui-radio",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],name:[1],required:[4],value:[1]},void 0,{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}]),d=c,r=function(){"undefined"!=typeof customElements&&["ui-radio"].forEach((e=>{"ui-radio"===e&&(customElements.get(n(e))||customElements.define(n(e),c))}))};export{d as UiRadio,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as r,h as s,c as a,t}from"./p-CIA4RyEp.js";function i(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||!!e.textContent?.trim()))}const l=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}disabled=!1;selected=!1;hasLeading=!1;hasMeta=!1;hasExcerpt=!1;hasTrailing=!1;leadingSlot;metaSlot;excerptSlot;trailingSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasLeading=i(this.leadingSlot),this.hasMeta=i(this.metaSlot),this.hasExcerpt=i(this.excerptSlot),this.hasTrailing=i(this.trailingSlot)};render(){return s(a,{key:"
|
|
1
|
+
import{p as e,H as r,h as s,c as a,t}from"./p-CIA4RyEp.js";function i(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||!!e.textContent?.trim()))}const l=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}disabled=!1;selected=!1;hasLeading=!1;hasMeta=!1;hasExcerpt=!1;hasTrailing=!1;leadingSlot;metaSlot;excerptSlot;trailingSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasLeading=i(this.leadingSlot),this.hasMeta=i(this.metaSlot),this.hasExcerpt=i(this.excerptSlot),this.hasTrailing=i(this.trailingSlot)};render(){return s(a,{key:"4fb3b963d73890850b58d03f225f125066412350"},s("button",{key:"55332d2d06d279e5c6d39d044cfb89256cffdf69",class:"search-result-row",type:"button",disabled:this.disabled,part:"button"},s("span",{key:"1c9178595fb6f54ffc4e55b3a7cb5fe7dea94b40",class:"search-result-row__leading",part:"leading",hidden:!this.hasLeading},s("slot",{key:"239d0a74e80e58f1b25d6b328293d9692a4483b6",name:"leading",ref:e=>this.leadingSlot=e,onSlotchange:this.syncSlots})),s("span",{key:"f80e39d4002bfa1ae7665857e27d184004654c03",class:"search-result-row__content",part:"content"},s("span",{key:"b1a1e7f378eee6db5a01949d8a299583556c79c1",class:"search-result-row__title",part:"title"},s("slot",{key:"4d94ed22c472309e0ece5f7a2a744f400589c87e",name:"title"})),s("span",{key:"3dbc540f67e11cca515208597b7b6bb75e2772f5",class:"search-result-row__meta",part:"meta",hidden:!this.hasMeta},s("slot",{key:"3ed5c8fd300a19801ac332d2e9516aadb19f664e",name:"meta",ref:e=>this.metaSlot=e,onSlotchange:this.syncSlots})),s("span",{key:"8403a7e6adc3b1fae04d659bfbf7ff5676ac113a",class:"search-result-row__excerpt",part:"excerpt",hidden:!this.hasExcerpt},s("slot",{key:"f0b0b07df739f780320394dae9b318f6676e9a94",name:"excerpt",ref:e=>this.excerptSlot=e,onSlotchange:this.syncSlots}))),s("span",{key:"2ebdf8d2ed7fefd31118052495503659c957d317",class:"search-result-row__trailing",part:"trailing",hidden:!this.hasTrailing},s("slot",{key:"60dfc20a47fff6aac28755bedb80e9a4b3fd93e0",name:"trailing",ref:e=>this.trailingSlot=e,onSlotchange:this.syncSlots}))))}static get style(){return":host{display:block}.search-result-row{appearance:none;inline-size:100%;min-block-size:var(--ui-search-result-row-min-height, 56px);margin:0;padding-block:var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));display:flex;align-items:flex-start;gap:var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));background:var(--ui-search-result-row-bg, transparent);border:none;border-block-end:1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));color:inherit;cursor:pointer;text-align:left;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}:host(:last-child) .search-result-row{border-block-end:none}.search-result-row:hover:enabled{background:var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%))}:host([selected]) .search-result-row{background:var( --ui-search-result-row-selected-bg, var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%)) )}.search-result-row:focus-visible{outline:2px solid var(--ui-focus-ring, #2563eb);outline-offset:-2px}.search-result-row:disabled,:host([disabled]) .search-result-row{opacity:0.6;cursor:not-allowed}.search-result-row__leading,.search-result-row__trailing{display:inline-flex;align-items:flex-start;flex-shrink:0}.search-result-row__content{min-inline-size:0;flex:1;display:flex;flex-direction:column}.search-result-row__title,.search-result-row__meta,.search-result-row__excerpt{display:block;min-inline-size:0}[hidden]{display:none}::slotted([slot='title']),::slotted([slot='meta']),::slotted([slot='excerpt']){display:block;margin:0}"}},[769,"ui-search-result-row",{disabled:[516],selected:[516],hasLeading:[32],hasMeta:[32],hasExcerpt:[32],hasTrailing:[32]}]),o=l,c=function(){"undefined"!=typeof customElements&&["ui-search-result-row"].forEach((e=>{"ui-search-result-row"===e&&(customElements.get(t(e))||customElements.define(t(e),l))}))};export{o as UiSearchResultRow,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as s,h as a,t as l}from"./p-CIA4RyEp.js";function r(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||!!e.textContent?.trim()))}const t=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}hasStatus=!1;hasFooter=!1;statusSlot;footerSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasStatus=r(this.statusSlot),this.hasFooter=r(this.footerSlot)};render(){return a("div",{key:"
|
|
1
|
+
import{p as e,H as s,h as a,t as l}from"./p-CIA4RyEp.js";function r(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||!!e.textContent?.trim()))}const t=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}hasStatus=!1;hasFooter=!1;statusSlot;footerSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasStatus=r(this.statusSlot),this.hasFooter=r(this.footerSlot)};render(){return a("div",{key:"946e3575a3b48f83315a5299d144a10647c31189",class:"search-shell",part:"base"},a("slot",{key:"6146d441648a9cafca12b764e94373252b3940be",name:"backdrop"}),a("div",{key:"e4389c8f39994209e1f8dc4dbf913e3728295545",class:"search-shell__panel",part:"panel"},a("div",{key:"8c660767d3ac12e1d94086bb80bb459e2f45d173",class:"search-shell__search",part:"search"},a("slot",{key:"c870a4266f689654c76a1fc9e2bc23bf690a931c",name:"search"})),a("div",{key:"b5a68d509a92fec24603008514e938ba27655f4d",class:"search-shell__status",part:"status",hidden:!this.hasStatus},a("slot",{key:"bc3233c23289cb56ca8d4217c9b3c37df9570abc",name:"status",ref:e=>this.statusSlot=e,onSlotchange:this.syncSlots})),a("div",{key:"291b357ed1c7949001952813c950fbaab24cd0fc",class:"search-shell__body",part:"body"},a("slot",{key:"72ecf55e7267cef21e612c1aff840fef67442fb5",name:"body"})),a("div",{key:"e393d0cc4bd0bbbf349a135d9f352ec08bd523cb",class:"search-shell__footer",part:"footer",hidden:!this.hasFooter},a("slot",{key:"2468bdafc67f01094a4461a1a1e2fd474a88ffcf",name:"footer",ref:e=>this.footerSlot=e,onSlotchange:this.syncSlots}))))}static get style(){return":host{position:fixed;inset:0;z-index:var(--ui-search-shell-z-index, 400);display:block}.search-shell{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-block-start:var(--ui-search-shell-padding-top, 10vh)}.search-shell__panel{position:relative;inline-size:min( calc(100% - (var(--ui-search-shell-margin-inline, var(--ui-space-4, 1rem)) * 2)), var(--ui-search-shell-max-width, 640px) );max-block-size:var(--ui-search-shell-max-height, 80vh);display:flex;flex-direction:column;overflow:hidden;background:var(--ui-search-shell-bg, var(--ui-surface, #ffffff));border:1px solid var(--ui-search-shell-border, var(--ui-border, #e5e7eb));border-radius:var(--ui-search-shell-radius, var(--ui-radius-xl, 1rem));box-shadow:var(--ui-search-shell-shadow, var(--ui-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12)))}.search-shell__search,.search-shell__status,.search-shell__footer{flex-shrink:0}.search-shell__body{flex:1;min-block-size:0}[hidden]{display:none}@media (max-width: 767px){.search-shell{padding-block-start:0;align-items:stretch}.search-shell__panel{inline-size:100%;block-size:100vh;block-size:100dvh;max-block-size:none;border-radius:0;border-inline:none;border-block-start:none}}"}},[769,"ui-search-shell",{hasStatus:[32],hasFooter:[32]}]),c=t,i=function(){"undefined"!=typeof customElements&&["ui-search-shell"].forEach((e=>{"ui-search-shell"===e&&(customElements.get(l(e))||customElements.define(l(e),t))}))};export{c as UiSearchShell,i as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as i,c as a,t as s}from"./p-CIA4RyEp.js";import{d as r,e as o}from"./p-JwSoedEO.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}value="";defaultValue="";disabled=!1;invalid=!1;required=!1;internalValue="";slotRef;syncFromProp(){this.internalValue=this.value}syncToSelect(){const e=this.getSelect();e&&(this.host.dataset.invalid=this.invalid?"true":"",e.value=this.internalValue||this.defaultValue,e.disabled=this.disabled,e.required=this.required,e.setAttribute("aria-invalid",this.invalid?"true":"false"))}componentDidLoad(){this.syncFromProp(),this.slotRef?.addEventListener("slotchange",(()=>this.syncToSelect())),this.syncToSelect();const e=this.getSelect();e?.addEventListener("input",this.onInput),e?.addEventListener("change",this.onChange)}disconnectedCallback(){const e=this.getSelect();e?.removeEventListener("input",this.onInput),e?.removeEventListener("change",this.onChange)}componentDidUpdate(){this.syncToSelect()}getSelect(){const e=this.host.shadowRoot?.querySelector("slot");return(e?.assignedElements()??Array.from(this.host.children)).find((e=>"SELECT"===e.tagName))??null}onInput=e=>{const t=e.target;t&&(this.internalValue=t.value,r(this.host,"input",{value:this.internalValue,trigger:o(e)}))};onChange=e=>{const t=this.getSelect();t&&(this.internalValue=t.value,r(this.host,"change",{value:this.internalValue,trigger:o(e)}))};render(){return i(a,{key:"
|
|
1
|
+
import{p as e,H as t,h as i,c as a,t as s}from"./p-CIA4RyEp.js";import{d as r,e as o}from"./p-JwSoedEO.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}value="";defaultValue="";disabled=!1;invalid=!1;required=!1;internalValue="";slotRef;syncFromProp(){this.internalValue=this.value}syncToSelect(){const e=this.getSelect();e&&(this.host.dataset.invalid=this.invalid?"true":"",e.value=this.internalValue||this.defaultValue,e.disabled=this.disabled,e.required=this.required,e.setAttribute("aria-invalid",this.invalid?"true":"false"))}componentDidLoad(){this.syncFromProp(),this.slotRef?.addEventListener("slotchange",(()=>this.syncToSelect())),this.syncToSelect();const e=this.getSelect();e?.addEventListener("input",this.onInput),e?.addEventListener("change",this.onChange)}disconnectedCallback(){const e=this.getSelect();e?.removeEventListener("input",this.onInput),e?.removeEventListener("change",this.onChange)}componentDidUpdate(){this.syncToSelect()}getSelect(){const e=this.host.shadowRoot?.querySelector("slot");return(e?.assignedElements()??Array.from(this.host.children)).find((e=>"SELECT"===e.tagName))??null}onInput=e=>{const t=e.target;t&&(this.internalValue=t.value,r(this.host,"input",{value:this.internalValue,trigger:o(e)}))};onChange=e=>{const t=this.getSelect();t&&(this.internalValue=t.value,r(this.host,"change",{value:this.internalValue,trigger:o(e)}))};render(){return i(a,{key:"65420b700d6a80e3575efa25d72ccbf4b0398805","data-invalid":this.invalid?"":void 0},i("slot",{key:"fa6b175770fcbf9ec904a528f0d41aa04f4e9c01",ref:e=>this.slotRef=e}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncToSelect:0}],defaultValue:[{syncToSelect:0}],disabled:[{syncToSelect:0}],invalid:[{syncToSelect:0}],required:[{syncToSelect:0}]}}static get style(){return":host{display:inline-flex;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background-color:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(select:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}"}},[769,"ui-select",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],required:[4],internalValue:[32]},void 0,{value:[{syncFromProp:0}],internalValue:[{syncToSelect:0}],defaultValue:[{syncToSelect:0}],disabled:[{syncToSelect:0}],invalid:[{syncToSelect:0}],required:[{syncToSelect:0}]}]),l=n,c=function(){"undefined"!=typeof customElements&&["ui-select"].forEach((e=>{"ui-select"===e&&(customElements.get(s(e))||customElements.define(s(e),n))}))};export{l as UiSelect,c as defineCustomElement}
|