@threadlabs/looma 0.1.8 → 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-KDA4RFLQ.js → chunk-YN4IUYVY.js} +16 -4
- 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
package/dist/index.d.cts
CHANGED
|
@@ -13,4 +13,45 @@ declare function getTopOverlay(): OverlayRecord | undefined;
|
|
|
13
13
|
declare function isTopOverlay(id: string): boolean;
|
|
14
14
|
declare function requestTopOverlayClose(reason: OverlayCloseReason, trigger: OverlayTrigger): boolean;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
interface ViewportRect {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
right: number;
|
|
20
|
+
bottom: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
interface RectLike extends ViewportRect {
|
|
25
|
+
}
|
|
26
|
+
interface Point {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
}
|
|
30
|
+
interface ProximityCoordinatorOptions {
|
|
31
|
+
/** Event surface for pointer tracking. Defaults to the interaction scope. */
|
|
32
|
+
pointerTarget?: EventTarget;
|
|
33
|
+
/** Descendants participating in proximity. */
|
|
34
|
+
anchorSelector?: string;
|
|
35
|
+
/** Distance outside an anchor that activates its anticipatory state. */
|
|
36
|
+
nearRadius?: number;
|
|
37
|
+
}
|
|
38
|
+
interface ProximityCoordinator {
|
|
39
|
+
/** Refreshes the anchor list and its cached geometry after a layout change. */
|
|
40
|
+
refresh(): void;
|
|
41
|
+
/** Removes the scope-level listeners and all reflected interaction state. */
|
|
42
|
+
destroy(): void;
|
|
43
|
+
}
|
|
44
|
+
declare function getVisualViewportRect(owner?: Window): ViewportRect;
|
|
45
|
+
declare function clampRectToViewport(rect: RectLike, viewport?: ViewportRect, gutter?: number): Point;
|
|
46
|
+
declare function distanceFromPointToRect(point: Point, rect: RectLike): number;
|
|
47
|
+
/**
|
|
48
|
+
* Coordinates anticipatory UI within one interaction scope.
|
|
49
|
+
*
|
|
50
|
+
* The coordinator deliberately owns one pointer listener and one animation-frame
|
|
51
|
+
* update for the whole scope. Anchors remain the only hit-testable controls; the
|
|
52
|
+
* reflected state is presentation-only, so overlapping near regions do not steal
|
|
53
|
+
* pointer input from each other or from surrounding content.
|
|
54
|
+
*/
|
|
55
|
+
declare function createProximityCoordinator(scope: HTMLElement, options?: ProximityCoordinatorOptions): ProximityCoordinator;
|
|
56
|
+
|
|
57
|
+
export { type OverlayCloseReason, type OverlayRecord, type OverlayTrigger, type Point, type ProximityCoordinator, type ProximityCoordinatorOptions, type RectLike, type ViewportRect, clampRectToViewport, closeOverlay, createProximityCoordinator, distanceFromPointToRect, getTopOverlay, getVisualViewportRect, isTopOverlay, openOverlay, requestTopOverlayClose };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,4 +13,45 @@ declare function getTopOverlay(): OverlayRecord | undefined;
|
|
|
13
13
|
declare function isTopOverlay(id: string): boolean;
|
|
14
14
|
declare function requestTopOverlayClose(reason: OverlayCloseReason, trigger: OverlayTrigger): boolean;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
interface ViewportRect {
|
|
17
|
+
left: number;
|
|
18
|
+
top: number;
|
|
19
|
+
right: number;
|
|
20
|
+
bottom: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
interface RectLike extends ViewportRect {
|
|
25
|
+
}
|
|
26
|
+
interface Point {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
}
|
|
30
|
+
interface ProximityCoordinatorOptions {
|
|
31
|
+
/** Event surface for pointer tracking. Defaults to the interaction scope. */
|
|
32
|
+
pointerTarget?: EventTarget;
|
|
33
|
+
/** Descendants participating in proximity. */
|
|
34
|
+
anchorSelector?: string;
|
|
35
|
+
/** Distance outside an anchor that activates its anticipatory state. */
|
|
36
|
+
nearRadius?: number;
|
|
37
|
+
}
|
|
38
|
+
interface ProximityCoordinator {
|
|
39
|
+
/** Refreshes the anchor list and its cached geometry after a layout change. */
|
|
40
|
+
refresh(): void;
|
|
41
|
+
/** Removes the scope-level listeners and all reflected interaction state. */
|
|
42
|
+
destroy(): void;
|
|
43
|
+
}
|
|
44
|
+
declare function getVisualViewportRect(owner?: Window): ViewportRect;
|
|
45
|
+
declare function clampRectToViewport(rect: RectLike, viewport?: ViewportRect, gutter?: number): Point;
|
|
46
|
+
declare function distanceFromPointToRect(point: Point, rect: RectLike): number;
|
|
47
|
+
/**
|
|
48
|
+
* Coordinates anticipatory UI within one interaction scope.
|
|
49
|
+
*
|
|
50
|
+
* The coordinator deliberately owns one pointer listener and one animation-frame
|
|
51
|
+
* update for the whole scope. Anchors remain the only hit-testable controls; the
|
|
52
|
+
* reflected state is presentation-only, so overlapping near regions do not steal
|
|
53
|
+
* pointer input from each other or from surrounding content.
|
|
54
|
+
*/
|
|
55
|
+
declare function createProximityCoordinator(scope: HTMLElement, options?: ProximityCoordinatorOptions): ProximityCoordinator;
|
|
56
|
+
|
|
57
|
+
export { type OverlayCloseReason, type OverlayRecord, type OverlayTrigger, type Point, type ProximityCoordinator, type ProximityCoordinatorOptions, type RectLike, type ViewportRect, clampRectToViewport, closeOverlay, createProximityCoordinator, distanceFromPointToRect, getTopOverlay, getVisualViewportRect, isTopOverlay, openOverlay, requestTopOverlayClose };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bootstrapLazy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DYIMEQY7.js";
|
|
4
4
|
|
|
5
5
|
// dist/esm/app-globals-DQuL1Twl.js
|
|
6
6
|
var globalScripts = () => {
|
|
@@ -10,7 +10,7 @@ var globalScripts = () => {
|
|
|
10
10
|
var defineCustomElements = async (win, options) => {
|
|
11
11
|
if (typeof window === "undefined") return void 0;
|
|
12
12
|
await globalScripts();
|
|
13
|
-
return bootstrapLazy([["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]]], options);
|
|
13
|
+
return bootstrapLazy([["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]]], options);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
// loader/index.js
|
|
@@ -118,11 +118,136 @@ function requestTopOverlayClose(reason, trigger) {
|
|
|
118
118
|
return true;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
// src/overlay/positioning.ts
|
|
122
|
+
function getVisualViewportRect(owner = window) {
|
|
123
|
+
const viewport = owner.visualViewport;
|
|
124
|
+
const left = viewport?.offsetLeft ?? 0;
|
|
125
|
+
const top = viewport?.offsetTop ?? 0;
|
|
126
|
+
const width = viewport?.width ?? owner.innerWidth;
|
|
127
|
+
const height = viewport?.height ?? owner.innerHeight;
|
|
128
|
+
return {
|
|
129
|
+
left,
|
|
130
|
+
top,
|
|
131
|
+
right: left + width,
|
|
132
|
+
bottom: top + height,
|
|
133
|
+
width,
|
|
134
|
+
height
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function clampRectToViewport(rect, viewport = getVisualViewportRect(), gutter = 0) {
|
|
138
|
+
const availableWidth = Math.max(0, viewport.width - gutter * 2);
|
|
139
|
+
const availableHeight = Math.max(0, viewport.height - gutter * 2);
|
|
140
|
+
const targetLeft = rect.width > availableWidth ? viewport.left + gutter : Math.min(
|
|
141
|
+
Math.max(rect.left, viewport.left + gutter),
|
|
142
|
+
viewport.right - gutter - rect.width
|
|
143
|
+
);
|
|
144
|
+
const targetTop = rect.height > availableHeight ? viewport.top + gutter : Math.min(
|
|
145
|
+
Math.max(rect.top, viewport.top + gutter),
|
|
146
|
+
viewport.bottom - gutter - rect.height
|
|
147
|
+
);
|
|
148
|
+
return { x: targetLeft - rect.left, y: targetTop - rect.top };
|
|
149
|
+
}
|
|
150
|
+
function distanceFromPointToRect(point, rect) {
|
|
151
|
+
const dx = Math.max(rect.left - point.x, 0, point.x - rect.right);
|
|
152
|
+
const dy = Math.max(rect.top - point.y, 0, point.y - rect.bottom);
|
|
153
|
+
return Math.hypot(dx, dy);
|
|
154
|
+
}
|
|
155
|
+
function createProximityCoordinator(scope, options = {}) {
|
|
156
|
+
const owner = scope.ownerDocument.defaultView ?? window;
|
|
157
|
+
const pointerTarget = options.pointerTarget ?? scope;
|
|
158
|
+
const anchorSelector = options.anchorSelector ?? "[data-ui-affordance]";
|
|
159
|
+
const configuredRadius = options.nearRadius ?? 32;
|
|
160
|
+
const nearRadius = Number.isFinite(configuredRadius) ? Math.max(0, configuredRadius) : 32;
|
|
161
|
+
const abort = new AbortController();
|
|
162
|
+
let anchors = [];
|
|
163
|
+
let frame = null;
|
|
164
|
+
let point = null;
|
|
165
|
+
let geometryDirty = false;
|
|
166
|
+
const clear = () => {
|
|
167
|
+
for (const { element } of anchors) {
|
|
168
|
+
if (element.hasAttribute("data-ui-proximity")) {
|
|
169
|
+
element.removeAttribute("data-ui-proximity");
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (scope.hasAttribute("data-ui-interaction")) {
|
|
173
|
+
scope.removeAttribute("data-ui-interaction");
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
const measure = () => {
|
|
177
|
+
anchors = Array.from(scope.querySelectorAll(anchorSelector)).filter((element) => !element.hasAttribute("disabled") && element.getAttribute("aria-disabled") !== "true").map((element) => ({ element, rect: element.getBoundingClientRect() }));
|
|
178
|
+
geometryDirty = false;
|
|
179
|
+
};
|
|
180
|
+
const update = () => {
|
|
181
|
+
frame = null;
|
|
182
|
+
if (geometryDirty) measure();
|
|
183
|
+
if (!point) {
|
|
184
|
+
clear();
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
let engaged = false;
|
|
188
|
+
for (const anchor of anchors) {
|
|
189
|
+
const near = distanceFromPointToRect(point, anchor.rect) <= nearRadius;
|
|
190
|
+
if (near && anchor.element.getAttribute("data-ui-proximity") !== "near") {
|
|
191
|
+
anchor.element.setAttribute("data-ui-proximity", "near");
|
|
192
|
+
} else if (!near && anchor.element.hasAttribute("data-ui-proximity")) {
|
|
193
|
+
anchor.element.removeAttribute("data-ui-proximity");
|
|
194
|
+
}
|
|
195
|
+
engaged ||= near;
|
|
196
|
+
}
|
|
197
|
+
if (engaged && scope.getAttribute("data-ui-interaction") !== "engaged") {
|
|
198
|
+
scope.setAttribute("data-ui-interaction", "engaged");
|
|
199
|
+
} else if (!engaged && scope.hasAttribute("data-ui-interaction")) {
|
|
200
|
+
scope.removeAttribute("data-ui-interaction");
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
const schedule = () => {
|
|
204
|
+
if (frame !== null) return;
|
|
205
|
+
frame = owner.requestAnimationFrame(update);
|
|
206
|
+
};
|
|
207
|
+
const onPointerMove = (event) => {
|
|
208
|
+
const pointer = event;
|
|
209
|
+
if (pointer.pointerType === "touch") {
|
|
210
|
+
point = null;
|
|
211
|
+
} else {
|
|
212
|
+
point = { x: pointer.clientX, y: pointer.clientY };
|
|
213
|
+
}
|
|
214
|
+
schedule();
|
|
215
|
+
};
|
|
216
|
+
const invalidate = () => {
|
|
217
|
+
geometryDirty = true;
|
|
218
|
+
schedule();
|
|
219
|
+
};
|
|
220
|
+
pointerTarget.addEventListener("pointermove", onPointerMove, {
|
|
221
|
+
passive: true,
|
|
222
|
+
signal: abort.signal
|
|
223
|
+
});
|
|
224
|
+
owner.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
225
|
+
owner.addEventListener("scroll", invalidate, { passive: true, capture: true, signal: abort.signal });
|
|
226
|
+
owner.visualViewport?.addEventListener("resize", invalidate, { passive: true, signal: abort.signal });
|
|
227
|
+
owner.visualViewport?.addEventListener("scroll", invalidate, { passive: true, signal: abort.signal });
|
|
228
|
+
measure();
|
|
229
|
+
return {
|
|
230
|
+
refresh: invalidate,
|
|
231
|
+
destroy() {
|
|
232
|
+
abort.abort();
|
|
233
|
+
if (frame !== null) owner.cancelAnimationFrame(frame);
|
|
234
|
+
frame = null;
|
|
235
|
+
point = null;
|
|
236
|
+
clear();
|
|
237
|
+
anchors = [];
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
121
242
|
// index.ts
|
|
122
243
|
defineCustomElements();
|
|
123
244
|
export {
|
|
245
|
+
clampRectToViewport,
|
|
124
246
|
closeOverlay,
|
|
247
|
+
createProximityCoordinator,
|
|
248
|
+
distanceFromPointToRect,
|
|
125
249
|
getTopOverlay,
|
|
250
|
+
getVisualViewportRect,
|
|
126
251
|
isTopOverlay,
|
|
127
252
|
openOverlay,
|
|
128
253
|
requestTopOverlayClose
|
package/dist/looma/looma.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-CEeiinfk.js";export{s as setNonce}from"./p-CEeiinfk.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const n=import.meta.url,a={};return""!==n&&(a.resourcesUrl=new URL(".",n).href),e(a)})().then((async e=>(await a(),n([["p-
|
|
1
|
+
import{p as e,b as n}from"./p-CEeiinfk.js";export{s as setNonce}from"./p-CEeiinfk.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const n=import.meta.url,a={};return""!==n&&(a.resourcesUrl=new URL(".",n).href),e(a)})().then((async e=>(await a(),n([["p-2ae73d5b",[[769,"ui-context-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],for:[{syncTarget:0}],internalOpen:[{syncOverlay:0}]}]]],["p-95340a13",[[769,"ui-affordance-scope",{nearRadius:[514,"near-radius"]},null,{nearRadius:[{connectCoordinator:0}]}]]],["p-1681b218",[[513,"ui-avatar",{src:[1],alt:[1],name:[1],fallback:[1],hasImage:[32]},null,{src:[{watchSrc:0}]}]]],["p-5ba9d496",[[769,"ui-avatar-group",{max:[2],label:[1],overflowCount:[32]},null,{max:[{syncOverflow:0}]}]]],["p-0584a051",[[769,"ui-badge",{variant:[1],tone:[1]}]]],["p-34417499",[[769,"ui-button",{variant:[1],size:[1],disabled:[4]},null,{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}]]],["p-0f45c5f0",[[769,"ui-checkbox",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],indeterminate:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}]]],["p-c6721aba",[[769,"ui-dialog",{open:[4],defaultOpen:[4,"default-open"],modal:[4],dismissible:[4],label:[1],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}]]],["p-a9f46811",[[769,"ui-disclosure",{open:[4],defaultOpen:[4,"default-open"],disabled:[4],internalOpen:[32],contentId:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}]]],["p-051f578c",[[769,"ui-floating-action-button",{disabled:[516],mobileOnly:[516,"mobile-only"],label:[1]}]]],["p-5d4713a6",[[769,"ui-form-field",{invalid:[4],disabled:[4],required:[4]}]]],["p-0198bb21",[[769,"ui-icon-button",{disabled:[516],label:[1],size:[513],variant:[513],anticipatory:[516]}]]],["p-624ba086",[[769,"ui-input",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToInput:0}],defaultValue:[{syncToInput:0}],disabled:[{syncToInput:0}],invalid:[{syncToInput:0}],readOnly:[{syncToInput:0}]}]]],["p-ed5abf6d",[[769,"ui-menu-item",{disabled:[516],value:[1]}]]],["p-95cd639d",[[769,"ui-popover",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}]}]]],["p-8d5adb17",[[769,"ui-radio",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],name:[1],required:[4],value:[1]},null,{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}]]],["p-7e94d90d",[[769,"ui-radio-group",{value:[1],name:[1],orientation:[1],disabled:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToRadios:0}],name:[{syncToRadios:0}],orientation:[{syncToRadios:0}],disabled:[{syncToRadios:0}]}]]],["p-2ed7e241",[[769,"ui-search-result-row",{disabled:[516],selected:[516],hasLeading:[32],hasMeta:[32],hasExcerpt:[32],hasTrailing:[32]}]]],["p-d273b857",[[769,"ui-search-shell",{hasStatus:[32],hasFooter:[32]}]]],["p-a5127c7d",[[769,"ui-select",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],required:[4],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToSelect:0}],defaultValue:[{syncToSelect:0}],disabled:[{syncToSelect:0}],invalid:[{syncToSelect:0}],required:[{syncToSelect:0}]}]]],["p-b7aa4488",[[769,"ui-switch",{checked:[4],defaultChecked:[4,"default-checked"],disabled:[4],required:[4],value:[1],internalChecked:[32]},null,{checked:[{syncFromProp:0}]}]]],["p-078f9fb8",[[769,"ui-tabs",{value:[1],defaultValue:[1,"default-value"],orientation:[1],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncState:0}],orientation:[{syncState:0}]}]]],["p-4b422d40",[[769,"ui-textarea",{value:[1],defaultValue:[1,"default-value"],disabled:[4],invalid:[4],readOnly:[4,"readonly"],rows:[2],internalValue:[32]},null,{value:[{syncFromProp:0}],internalValue:[{syncToTextarea:0}],defaultValue:[{syncToTextarea:0}],disabled:[{syncToTextarea:0}],invalid:[{syncToTextarea:0}],readOnly:[{syncToTextarea:0}],rows:[{syncToTextarea:0}]}]]],["p-8c09c724",[[769,"ui-toast-region",{open:[4],internalOpen:[32]},null,{open:[{syncFromProp:0}]}]]],["p-96f73d07",[[769,"ui-tooltip",{for:[1],open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},null,{open:[{syncFromProp:0}],internalOpen:[{syncOverlay:0}]}]]],["p-a33522a2",[[769,"ui-top-bar",{hasLeading:[32],hasSearch:[32],hasActions:[32]}]]],["p-65c25c94",[[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],internalOpen:[32]},null,{open:[{syncFromProp:0}]}]]]],e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as i,H as t}from"./p-CEeiinfk.js";const n=class{constructor(i){o(this,i)}disabled=!1;label="";size="md";variant="ghost";anticipatory=!1;render(){return i(t,{key:"dd6149d96d534a641eedaf808df5348eef48f31f","data-disabled":this.disabled?"":void 0,"data-ui-affordance":this.anticipatory?"button":void 0},i("button",{key:"3e1b83a3e01b724cb75ddb7243a1e85bd9eb3420",type:"button","aria-label":this.label||void 0,disabled:this.disabled},i("slot",{key:"d280293841471ad37f556c73d86de3223e1f98e6"})))}};n.style=":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)}";export{n as ui_icon_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as o,H as t}from"./p-CEeiinfk.js";const
|
|
1
|
+
import{r as i,h as o,H as t}from"./p-CEeiinfk.js";const n=class{constructor(o){i(this,o)}disabled=!1;mobileOnly=!1;label="";render(){return o(t,{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"})))}};n.style=":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}}";export{n as ui_floating_action_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as o,h as a,H as r}from"./p-CEeiinfk.js";const t=class{constructor(a){o(this,a)}variant;tone;render(){return a(r,{key:"8766c0331ac7fbd6409b604578e159ae093c844b","data-variant":this.variant||void 0,"data-tone":this.tone||void 0},a("slot",{key:"65016ab530b850c82261e2da718622ff72567634"}))}};t.style=":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)}";export{t as ui_badge}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as o,h as e,H as r}from"./p-CEeiinfk.js";import{d as i,e as a}from"./p-JwSoedEO.js";const n=class{constructor(o){t(this,o)}get host(){return o(this)}value="";defaultValue="";orientation="horizontal";internalValue="";syncFromProp(){this.internalValue=this.value}syncState(){const t=this.getTabs();0!==t.length&&t.forEach((t=>{const o=(t.id??t.getAttribute("aria-controls")??"")===this.internalValue;t.setAttribute("aria-selected",String(o)),t.tabIndex=o?0:-1;const e=t.getAttribute("aria-controls");if(e){const t=this.host.querySelector(`#${CSS.escape(e)}`)??document.getElementById(e);t&&(t.hidden=!o)}}))}componentDidLoad(){if(this.syncFromProp(),!this.internalValue&&this.defaultValue&&(this.internalValue=this.defaultValue),!this.internalValue){const t=this.getTabs();t.length>0&&(this.internalValue=t[0]?.id??t[0]?.getAttribute("aria-controls")??"")}this.syncState(),this.host.addEventListener("keydown",this.onKeydown),this.host.addEventListener("click",this.onClick)}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),this.host.removeEventListener("click",this.onClick)}componentDidUpdate(){this.syncState()}getTabs(){return Array.from(this.host.querySelectorAll('[role="tab"]'))}setValueFromTab(t,o){const e=t.id??t.getAttribute("aria-controls")??"";if(!e)return;const r=this.internalValue;this.internalValue=e,this.syncState(),i(this.host,"select",{value:e,previousValue:r||void 0,trigger:o})}onClick=t=>{const o=t.target.closest?.('[role="tab"]');o&&this.host.contains(o)&&this.setValueFromTab(o,a(t))};onKeydown=t=>{const o=t.target.closest?.('[role="tab"]');if(!o||!this.host.contains(o))return;const e=this.getTabs();if(0===e.length)return;const r=e.indexOf(o),i="vertical"===this.orientation,a=i?"ArrowDown":"ArrowRight";if(t.key===a||t.key===(i?"ArrowUp":"ArrowLeft")){t.preventDefault();const o=t.key===a?Math.min(r+1,e.length-1):r<=0?e.length-1:r-1;this.setValueFromTab(e[o],"keyboard"),e[o].focus()}};render(){return e(r,{key:"
|
|
1
|
+
import{r as t,g as o,h as e,H as r}from"./p-CEeiinfk.js";import{d as i,e as a}from"./p-JwSoedEO.js";const n=class{constructor(o){t(this,o)}get host(){return o(this)}value="";defaultValue="";orientation="horizontal";internalValue="";syncFromProp(){this.internalValue=this.value}syncState(){const t=this.getTabs();0!==t.length&&t.forEach((t=>{const o=(t.id??t.getAttribute("aria-controls")??"")===this.internalValue;t.setAttribute("aria-selected",String(o)),t.tabIndex=o?0:-1;const e=t.getAttribute("aria-controls");if(e){const t=this.host.querySelector(`#${CSS.escape(e)}`)??document.getElementById(e);t&&(t.hidden=!o)}}))}componentDidLoad(){if(this.syncFromProp(),!this.internalValue&&this.defaultValue&&(this.internalValue=this.defaultValue),!this.internalValue){const t=this.getTabs();t.length>0&&(this.internalValue=t[0]?.id??t[0]?.getAttribute("aria-controls")??"")}this.syncState(),this.host.addEventListener("keydown",this.onKeydown),this.host.addEventListener("click",this.onClick)}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),this.host.removeEventListener("click",this.onClick)}componentDidUpdate(){this.syncState()}getTabs(){return Array.from(this.host.querySelectorAll('[role="tab"]'))}setValueFromTab(t,o){const e=t.id??t.getAttribute("aria-controls")??"";if(!e)return;const r=this.internalValue;this.internalValue=e,this.syncState(),i(this.host,"select",{value:e,previousValue:r||void 0,trigger:o})}onClick=t=>{const o=t.target.closest?.('[role="tab"]');o&&this.host.contains(o)&&this.setValueFromTab(o,a(t))};onKeydown=t=>{const o=t.target.closest?.('[role="tab"]');if(!o||!this.host.contains(o))return;const e=this.getTabs();if(0===e.length)return;const r=e.indexOf(o),i="vertical"===this.orientation,a=i?"ArrowDown":"ArrowRight";if(t.key===a||t.key===(i?"ArrowUp":"ArrowLeft")){t.preventDefault();const o=t.key===a?Math.min(r+1,e.length-1):r<=0?e.length-1:r-1;this.setValueFromTab(e[o],"keyboard"),e[o].focus()}};render(){return e(r,{key:"99cd907204f73b1cbb1c8f2a182743c6554d5b0a",orientation:this.orientation,"data-orientation":this.orientation},e("slot",{key:"a8158e593a3708e8819761d86356a58535a53e40"}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncState:0}],orientation:[{syncState:0}]}}};n.style=":host{display:flex;flex-direction:column;gap:0}:host([data-orientation='vertical']){flex-direction:row}::slotted([role='tablist']){display:flex;gap:0;max-inline-size:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-bottom:1px solid var(--ui-border-default)}:host([data-orientation='vertical']) ::slotted([role='tablist']){flex-direction:column;border-bottom:none;border-inline-end:1px solid var(--ui-border-default)}::slotted(button[role='tab']),::slotted([role='tab']),::slotted(ui-button) button[role='tab']{padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-medium, 500);color:var(--ui-text-secondary);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color var(--ui-motion-fast) var(--ui-motion-ease);box-shadow:none}::slotted(button[role='tab']:hover),::slotted([role='tab']:hover){color:var(--ui-text-primary)}::slotted(button[role='tab'][aria-selected='true']),::slotted([role='tab'][aria-selected='true']){color:var(--ui-accent-solid);border-bottom-color:var(--ui-accent-solid)}:host([data-orientation='vertical']) ::slotted(button[role='tab']),:host([data-orientation='vertical']) ::slotted([role='tab']){border-bottom:none;border-inline-end:2px solid transparent;margin-bottom:0;margin-inline-end:-1px}:host([data-orientation='vertical']) ::slotted(button[role='tab'][aria-selected='true']),:host([data-orientation='vertical']) ::slotted([role='tab'][aria-selected='true']){border-inline-end-color:var(--ui-accent-solid)}::slotted([role='tabpanel']){padding:var(--ui-space-4)}";export{n as ui_tabs}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as e,h as i,H as s}from"./p-CEeiinfk.js";import{d as c,e as n}from"./p-JwSoedEO.js";const
|
|
1
|
+
import{r as t,g as e,h as i,H as s}from"./p-CEeiinfk.js";import{d as c,e as n}from"./p-JwSoedEO.js";const o=class{constructor(e){t(this,e)}get host(){return e(this)}checked=!1;defaultChecked=!1;disabled=!1;indeterminate=!1;required=!1;value="on";internalChecked=!1;slotRef;syncFromProp(){this.internalChecked=this.checked}syncToInput(){const t=this.getInput();t&&(this.host.dataset.disabled=this.disabled?"true":"",this.host.setAttribute("aria-disabled",String(this.disabled)),t.checked=this.internalChecked,t.indeterminate=this.indeterminate,t.disabled=this.disabled,t.required=this.required,t.value=this.value)}componentDidLoad(){this.syncFromProp(),this.internalChecked=this.internalChecked||this.defaultChecked,this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const t=this.getInput();t?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const t=this.getInput();t?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>t instanceof HTMLInputElement&&"checkbox"===t.type))??null}onInputChange=t=>{const e=t.target;e&&(this.internalChecked=e.checked,this.indeterminate=e.indeterminate,c(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:n(t)}))};render(){return i(s,{key:"66b6708ae71c9eca6c03c63891b590bd050c2506",role:"checkbox","aria-checked":this.indeterminate?"mixed":String(this.internalChecked),"aria-disabled":String(this.disabled),"data-disabled":this.disabled?"":void 0},i("slot",{key:"b5e168a9ff0c6e5e747fff6c6264c59744f10a56",ref:t=>this.slotRef=t}))}static get watchers(){return{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}}};o.style=":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}";export{o as ui_checkbox}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,h as e,H as i}from"./p-CEeiinfk.js";const t=class{constructor(e){a(this,e)}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),t=this.alt||this.name||"Avatar";return e(i,{key:"
|
|
1
|
+
import{r as a,h as e,H as i}from"./p-CEeiinfk.js";const t=class{constructor(e){a(this,e)}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),t=this.alt||this.name||"Avatar";return e(i,{key:"18214960ad2f1a0370907c0281102af924739de9",role:"img","aria-label":t,"data-has-image":this.hasImage?"":void 0},e("div",{key:"c6d0a00de56b756f0e24fdc4b306d89cdae2a44f",class:"avatar"},e("img",{key:"c5bfecb9d18797bc934ff087ce7ed8a4616ab347",src:this.src,alt:t,onLoad:this.onImageLoad,onError:this.onImageError,hidden:!this.hasImage,"aria-hidden":this.hasImage?"false":"true"}),e("span",{key:"1875a45a9c21de3e3a52924ef25b3f8429a788c4",class:"fallback",hidden:this.hasImage,"aria-hidden":this.hasImage?"true":"false"},a)))}static get watchers(){return{src:[{watchSrc:0}]}}};t.style=":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%}";export{t as ui_avatar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as e,h as i,H as s}from"./p-CEeiinfk.js";import{o as n,c as o,r}from"./p-CR7f2MQC.js";import{d as a}from"./p-JwSoedEO.js";const h=class{constructor(e){t(this,e)}get host(){return e(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?n({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(t,e)=>this.closeMenu(t,e)}):o(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(),o(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,a(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,a(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 r("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")??"";a(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")??"";a(this.host,"select",{value:i,trigger:"pointer"}),this.closeMenu("action","pointer")};render(){return i(s,{key:"
|
|
1
|
+
import{r as t,g as e,h as i,H as s}from"./p-CEeiinfk.js";import{o as n,c as o,r}from"./p-CR7f2MQC.js";import{d as a}from"./p-JwSoedEO.js";const h=class{constructor(e){t(this,e)}get host(){return e(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?n({id:this.overlayId,modal:!1,element:this.host,dismissible:!0,requestClose:(t,e)=>this.closeMenu(t,e)}):o(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(),o(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,a(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,a(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 r("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")??"";a(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")??"";a(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}]}}};h.style=":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}";export{h as ui_context_menu}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as r,H as a}from"./p-CEeiinfk.js";function s(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||Boolean(e.textContent?.trim())))}const t=class{constructor(r){e(this,r)}disabled=!1;selected=!1;hasLeading=!1;hasMeta=!1;hasExcerpt=!1;hasTrailing=!1;leadingSlot;metaSlot;excerptSlot;trailingSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasLeading=s(this.leadingSlot),this.hasMeta=s(this.metaSlot),this.hasExcerpt=s(this.excerptSlot),this.hasTrailing=s(this.trailingSlot)};render(){return r(a,{key:"
|
|
1
|
+
import{r as e,h as r,H as a}from"./p-CEeiinfk.js";function s(e){return!!e&&e.assignedNodes({flatten:!0}).some((e=>e.nodeType!==Node.TEXT_NODE||Boolean(e.textContent?.trim())))}const t=class{constructor(r){e(this,r)}disabled=!1;selected=!1;hasLeading=!1;hasMeta=!1;hasExcerpt=!1;hasTrailing=!1;leadingSlot;metaSlot;excerptSlot;trailingSlot;componentDidLoad(){this.syncSlots()}syncSlots=()=>{this.hasLeading=s(this.leadingSlot),this.hasMeta=s(this.metaSlot),this.hasExcerpt=s(this.excerptSlot),this.hasTrailing=s(this.trailingSlot)};render(){return r(a,{key:"4fb3b963d73890850b58d03f225f125066412350"},r("button",{key:"55332d2d06d279e5c6d39d044cfb89256cffdf69",class:"search-result-row",type:"button",disabled:this.disabled,part:"button"},r("span",{key:"1c9178595fb6f54ffc4e55b3a7cb5fe7dea94b40",class:"search-result-row__leading",part:"leading",hidden:!this.hasLeading},r("slot",{key:"239d0a74e80e58f1b25d6b328293d9692a4483b6",name:"leading",ref:e=>this.leadingSlot=e,onSlotchange:this.syncSlots})),r("span",{key:"f80e39d4002bfa1ae7665857e27d184004654c03",class:"search-result-row__content",part:"content"},r("span",{key:"b1a1e7f378eee6db5a01949d8a299583556c79c1",class:"search-result-row__title",part:"title"},r("slot",{key:"4d94ed22c472309e0ece5f7a2a744f400589c87e",name:"title"})),r("span",{key:"3dbc540f67e11cca515208597b7b6bb75e2772f5",class:"search-result-row__meta",part:"meta",hidden:!this.hasMeta},r("slot",{key:"3ed5c8fd300a19801ac332d2e9516aadb19f664e",name:"meta",ref:e=>this.metaSlot=e,onSlotchange:this.syncSlots})),r("span",{key:"8403a7e6adc3b1fae04d659bfbf7ff5676ac113a",class:"search-result-row__excerpt",part:"excerpt",hidden:!this.hasExcerpt},r("slot",{key:"f0b0b07df739f780320394dae9b318f6676e9a94",name:"excerpt",ref:e=>this.excerptSlot=e,onSlotchange:this.syncSlots}))),r("span",{key:"2ebdf8d2ed7fefd31118052495503659c957d317",class:"search-result-row__trailing",part:"trailing",hidden:!this.hasTrailing},r("slot",{key:"60dfc20a47fff6aac28755bedb80e9a4b3fd93e0",name:"trailing",ref:e=>this.trailingSlot=e,onSlotchange:this.syncSlots}))))}};t.style=":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}";export{t as ui_search_result_row}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as o,h as a,H as r}from"./p-CEeiinfk.js";import{i as e}from"./p-JwSoedEO.js";const s=class{constructor(o){t(this,o)}get host(){return o(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||!e(t)||(t.preventDefault(),this.host.click())};render(){return a(r,{key:"
|
|
1
|
+
import{r as t,g as o,h as a,H as r}from"./p-CEeiinfk.js";import{i as e}from"./p-JwSoedEO.js";const s=class{constructor(o){t(this,o)}get host(){return o(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||!e(t)||(t.preventDefault(),this.host.click())};render(){return a(r,{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}]}}};s.style=":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}";export{s as ui_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as
|
|
1
|
+
import{r as t,g as e,h as a,H as i}from"./p-CEeiinfk.js";import{d as r,e as s}from"./p-JwSoedEO.js";const o=class{constructor(e){t(this,e)}get host(){return e(this)}value="";defaultValue="";disabled=!1;invalid=!1;readOnly=!1;rows=4;internalValue="";slotRef;syncFromProp(){this.internalValue=this.value}syncToTextarea(){const t=this.getTextarea();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.rows=this.rows,t.setAttribute("aria-invalid",this.invalid?"true":"false"))}componentDidLoad(){this.syncFromProp(),this.slotRef?.addEventListener("slotchange",(()=>this.syncToTextarea())),this.syncToTextarea();const t=this.getTextarea();t?.addEventListener("input",this.onInput),t?.addEventListener("change",this.onChange)}disconnectedCallback(){const t=this.getTextarea();t?.removeEventListener("input",this.onInput),t?.removeEventListener("change",this.onChange)}componentDidUpdate(){this.syncToTextarea()}getTextarea(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>"TEXTAREA"===t.tagName))??null}onInput=t=>{const e=t.target;e&&(this.internalValue=e.value,r(this.host,"input",{value:this.internalValue,trigger:s(t)}))};onChange=t=>{const e=this.getTextarea();e&&(this.internalValue=e.value,r(this.host,"change",{value:this.internalValue,trigger:s(t)}))};render(){return a(i,{key:"697c98bf66c016b21b28c7805eee2223bb9d275a","data-invalid":this.invalid?"":void 0},a("slot",{key:"bd95bd79b1fe4e4103510a3cb036419c55976611",ref:t=>this.slotRef=t}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncToTextarea:0}],defaultValue:[{syncToTextarea:0}],disabled:[{syncToTextarea:0}],invalid:[{syncToTextarea:0}],readOnly:[{syncToTextarea:0}],rows:[{syncToTextarea:0}]}}};o.style=":host{display:inline-flex;color:var(--ui-text-primary)}::slotted(textarea){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);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;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(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(textarea:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}";export{o as ui_textarea}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,g as t,h as r,H as
|
|
1
|
+
import{r as e,g as t,h as r,H as i}from"./p-CEeiinfk.js";const a=class{constructor(t){e(this,t)}get host(){return t(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,i=Math.min(this.max,r),a=r>this.max?r-this.max:0;t.forEach(((e,t)=>{e.hidden=t>=i,e.setAttribute("aria-hidden",String(t>=i))})),this.overflowCount=a}render(){return r(i,{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}]}}};a.style=":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}";export{a as ui_avatar_group}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as e,h as r,H as a}from"./p-CEeiinfk.js";import{c as i}from"./p-hgBUJRDa.js";const o=class{constructor(e){t(this,e)}get host(){return e(this)}invalid=!1;disabled=!1;required=!1;componentDidLoad(){this.wire()}componentDidUpdate(){this.wire()}wire(){const t=this.host.querySelector("label"),e=this.host.querySelector("input, textarea, select"),r=this.host.querySelector('[data-slot="help"]'),a=this.host.querySelector('[data-slot="error"], [role="alert"]');if(!e)return;e.id||(e.id=i("form-field-input")),t&&!t.getAttribute("for")&&t.setAttribute("for",e.id);const o=[];r&&(r.id||(r.id=i("form-field-help")),o.push(r.id)),a&&(a.id||(a.id=i("form-field-error")),o.push(a.id)),o.length&&e.setAttribute("aria-describedby",o.join(" ")),e.disabled=this.disabled,e.required=this.required,e.setAttribute("aria-invalid",this.invalid?"true":"false")}render(){return r(a,{key:"c0a01ac28a7dd0e0b285e4b9f9763ef536a83a2e","data-invalid":this.invalid?"":void 0,"data-disabled":this.disabled?"":void 0,"data-required":this.required?"":void 0},r("slot",{key:"b09be4482299d866a0651393e269299dedb0cbf4"}))}};o.style=":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}";export{o as ui_form_field}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as i,h as o,H as
|
|
1
|
+
import{r as t,g as i,h as o,H as e}from"./p-CEeiinfk.js";import{d as s,e as a}from"./p-JwSoedEO.js";const r=class{constructor(i){t(this,i)}get host(){return i(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,s(this.host,"input",{value:this.internalValue,trigger:a(t)}))};onChange=t=>{const i=this.getInput();i&&(this.internalValue=i.value,s(this.host,"change",{value:this.internalValue,trigger:a(t)}))};render(){return o(e,{key:"2b3b4f6862cf5c5e413aaefb349c53d4e66eb6d0","data-invalid":this.invalid?"":void 0},o("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}]}}};r.style=":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}";export{r as ui_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,g as i,h as t,H as r}from"./p-CEeiinfk.js";import{d as a,e as o}from"./p-JwSoedEO.js";const s=class{constructor(i){e(this,i)}get host(){return i(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 i=e.target.closest?.("ui-menu-item");if(!i||i.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(i))return;const t=i.getAttribute("value")??i.getAttribute("data-value")??"";a(this.host,"select",{value:t,trigger:o(e)}),a(this.host,"close",{open:!1,reason:"action",trigger:o(e)}),this.internalOpen=!1};onKeydown=e=>{const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const t=e.target.closest?.("ui-menu-item"),r=t&&t instanceof HTMLElement?i.indexOf(t):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?r<0?0:Math.min(r+1,i.length-1):r<=0?i.length-1:r-1].focus());else if(e.preventDefault(),t&&r>=0){const e=t.getAttribute("value")??t.getAttribute("data-value")??"";a(this.host,"select",{value:e,trigger:"keyboard"}),a(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return t(r,{key:"
|
|
1
|
+
import{r as e,g as i,h as t,H as r}from"./p-CEeiinfk.js";import{d as a,e as o}from"./p-JwSoedEO.js";const s=class{constructor(i){e(this,i)}get host(){return i(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 i=e.target.closest?.("ui-menu-item");if(!i||i.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(i))return;const t=i.getAttribute("value")??i.getAttribute("data-value")??"";a(this.host,"select",{value:t,trigger:o(e)}),a(this.host,"close",{open:!1,reason:"action",trigger:o(e)}),this.internalOpen=!1};onKeydown=e=>{const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const t=e.target.closest?.("ui-menu-item"),r=t&&t instanceof HTMLElement?i.indexOf(t):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?r<0?0:Math.min(r+1,i.length-1):r<=0?i.length-1:r-1].focus());else if(e.preventDefault(),t&&r>=0){const e=t.getAttribute("value")??t.getAttribute("data-value")??"";a(this.host,"select",{value:e,trigger:"keyboard"}),a(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return t(r,{key:"5e463cbbce272c6b6132a839b818deef3e39a532",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},t("slot",{key:"feea6a21d41a7b27a6270814bcf0b3f3ded394a1"}))}static get watchers(){return{open:[{syncFromProp:0}]}}};s.style=":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}";export{s as ui_menu}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as i,h as a,H as s}from"./p-CEeiinfk.js";import{d as e,e as o}from"./p-JwSoedEO.js";const r=class{constructor(i){t(this,i)}get host(){return i(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 s=t.querySelector('input[type="radio"]');s&&(s.tabIndex=a===(i>=0?i:0)?0:-1)}))}setValue(t,i){const a=this.internalValue;this.internalValue=t,this.syncToRadios(),e(this.host,"select",{value:t,previousValue:a,trigger:i}),e(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,o(t))};onKeydown=t=>{const i=this.getRadios();if(0===i.length)return;const a=i.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue)),s="vertical"===this.orientation?"vertical":"horizontal",e="horizontal"===s?"ArrowRight"===t.key:"ArrowDown"===t.key;if(!("horizontal"===s?"ArrowLeft"===t.key:"ArrowUp"===t.key)&&!e)return;let o;t.preventDefault(),o=e?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(s,{key:"
|
|
1
|
+
import{r as t,g as i,h as a,H as s}from"./p-CEeiinfk.js";import{d as e,e as o}from"./p-JwSoedEO.js";const r=class{constructor(i){t(this,i)}get host(){return i(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 s=t.querySelector('input[type="radio"]');s&&(s.tabIndex=a===(i>=0?i:0)?0:-1)}))}setValue(t,i){const a=this.internalValue;this.internalValue=t,this.syncToRadios(),e(this.host,"select",{value:t,previousValue:a,trigger:i}),e(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,o(t))};onKeydown=t=>{const i=this.getRadios();if(0===i.length)return;const a=i.findIndex((t=>(t.getAttribute("value")??"")===this.internalValue)),s="vertical"===this.orientation?"vertical":"horizontal",e="horizontal"===s?"ArrowRight"===t.key:"ArrowDown"===t.key;if(!("horizontal"===s?"ArrowLeft"===t.key:"ArrowUp"===t.key)&&!e)return;let o;t.preventDefault(),o=e?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(s,{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}]}}};r.style=":host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}";export{r as ui_radio_group}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as a,h as e,H as i}from"./p-CEeiinfk.js";import{d as s,e as r}from"./p-JwSoedEO.js";const o=class{constructor(a){t(this,a)}get host(){return a(this)}open=!0;internalOpen=!0;syncFromProp(){this.internalOpen=this.open}componentDidLoad(){this.syncFromProp(),this.host.addEventListener("click",this.onClick)}disconnectedCallback(){this.host.removeEventListener("click",this.onClick)}getToasts(){return Array.from(this.host.querySelectorAll("[data-ui-toast]"))}updateOpenState(){const t=this.getToasts();this.internalOpen=t.length>0}onClick=t=>{const a=t.target.closest?.("[data-ui-toast-dismiss]");if(!a)return;const e=a.closest?.("[data-ui-toast]");if(!e)return;const i=e.id??"";e.setAttribute("aria-hidden","true"),e.remove(),s(this.host,"dismiss",{id:i,reason:"action",trigger:r(t)}),this.updateOpenState(),0===this.getToasts().length&&s(this.host,"close",{open:!1,reason:"action",trigger:r(t)})};render(){return e(i,{key:"0edcce54864ba991b092d004d3b45cf697b9c3ac",role:"region","aria-label":"Notifications","data-open":this.internalOpen?"":void 0},e("slot",{key:"2e30794a05b018fb55c4313c8e17f7262ecee7da"}))}static get watchers(){return{open:[{syncFromProp:0}]}}};o.style=":host{position:fixed;top:calc(var(--ui-space-4) + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);inline-size:min(24rem, calc(100vw - (var(--ui-space-4) * 2)));max-inline-size:100%;pointer-events:none}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}";export{o as ui_toast_region}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as e,h as s,H as i}from"./p-CEeiinfk.js";import{d as a,e as o}from"./p-JwSoedEO.js";const n=class{constructor(e){t(this,e)}get host(){return e(this)}checked=!1;defaultChecked=!1;disabled=!1;name="";required=!1;value="on";slotRef;syncToInput(){const t=this.getInput();t&&(this.host.dataset.disabled=this.disabled?"true":"",t.checked=this.checked,t.disabled=this.disabled,t.name=this.name,t.required=this.required,t.value=this.value)}componentDidLoad(){!this.checked&&this.defaultChecked&&(this.checked=!0),this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const t=this.getInput();t?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const t=this.getInput();t?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>t instanceof HTMLInputElement&&"radio"===t.type))??null}onInputChange=t=>{const e=t.target;e&&e.checked&&a(this.host,"change",{checked:!0,value:this.value,trigger:o(t)})};render(){return s(i,{key:"
|
|
1
|
+
import{r as t,g as e,h as s,H as i}from"./p-CEeiinfk.js";import{d as a,e as o}from"./p-JwSoedEO.js";const n=class{constructor(e){t(this,e)}get host(){return e(this)}checked=!1;defaultChecked=!1;disabled=!1;name="";required=!1;value="on";slotRef;syncToInput(){const t=this.getInput();t&&(this.host.dataset.disabled=this.disabled?"true":"",t.checked=this.checked,t.disabled=this.disabled,t.name=this.name,t.required=this.required,t.value=this.value)}componentDidLoad(){!this.checked&&this.defaultChecked&&(this.checked=!0),this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const t=this.getInput();t?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const t=this.getInput();t?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>t instanceof HTMLInputElement&&"radio"===t.type))??null}onInputChange=t=>{const e=t.target;e&&e.checked&&a(this.host,"change",{checked:!0,value:this.value,trigger:o(t)})};render(){return s(i,{key:"e3025fa3ee89c684ab27e7780f11399e1e455eff",role:"radio","aria-checked":String(this.checked),"aria-disabled":String(this.disabled),"data-disabled":this.disabled?"":void 0},s("slot",{key:"279fd849b1ea8f2f84e34043a01da710008aba51",ref:t=>this.slotRef=t}))}static get watchers(){return{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}}};n.style=":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}";export{n as ui_radio}
|