@threadlabs/looma 0.2.1 → 0.2.3
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-WW7Y67EW.js → chunk-24OTMNIU.js} +32 -32
- package/dist/{chunk-Z4W5W53T.js → chunk-D5WRORG6.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/{positioning-BiPpyC-_.js → positioning-CCR6ifPj.js} +9 -0
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
- package/dist/cjs/ui-button.cjs.entry.js +4 -1
- package/dist/cjs/ui-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/ui-combobox.cjs.entry.js +1 -1
- package/dist/cjs/ui-context-menu.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-toast-region.cjs.entry.js +1 -1
- package/dist/collection/components/ui-button/ui-button.js +5 -2
- package/dist/collection/overlay/positioning.js +9 -0
- package/dist/components/{p-biKnomFl.js → p-6SWSrfmW.js} +1 -1
- package/dist/components/p-B_DaIVEY.js +1 -0
- package/dist/components/{p-Btk_75st.js → p-BzaB_bXo.js} +1 -1
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-combobox.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/{positioning-Ig1jYhE1.js → positioning-ZOr-2PSe.js} +9 -0
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-button.entry.js +4 -1
- package/dist/esm/ui-chip_2.entry.js +1 -1
- package/dist/esm/ui-combobox.entry.js +1 -1
- package/dist/esm/ui-context-menu.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-toast-region.entry.js +1 -1
- package/dist/index.cjs +18 -12
- package/dist/index.js +3 -2
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/{p-7ebbe74e.entry.js → p-0b5b8d9e.entry.js} +1 -1
- package/dist/looma/{p-08c9e253.entry.js → p-16e0669d.entry.js} +1 -1
- package/dist/looma/{p-7ab661ec.entry.js → p-1c5a7522.entry.js} +1 -1
- package/dist/looma/{p-0fa7062f.entry.js → p-6d8b99ee.entry.js} +1 -1
- package/dist/looma/{p-ec1c02e5.entry.js → p-99116a72.entry.js} +1 -1
- package/dist/looma/{p-3fba3edd.entry.js → p-9ff2fa19.entry.js} +1 -1
- package/dist/looma/p-ZOr-2PSe.js +1 -0
- package/dist/looma/{p-172d67ff.entry.js → p-a2dd4c6c.entry.js} +1 -1
- package/dist/looma/{p-4354f48f.entry.js → p-ca2a54fd.entry.js} +1 -1
- package/dist/{ui-affordance-scope.entry-FENYADN3.js → ui-affordance-scope.entry-L6TIXYOP.js} +2 -2
- package/dist/{ui-avatar-group.entry-K7D6QKDP.js → ui-avatar-group.entry-TCAA6P72.js} +1 -1
- package/dist/{ui-avatar.entry-WCYFUQZT.js → ui-avatar.entry-52DQ7VXA.js} +1 -1
- package/dist/{ui-badge.entry-VZC4LONR.js → ui-badge.entry-2XCAA6LL.js} +1 -1
- package/dist/{ui-button.entry-7E2KMPRF.js → ui-button.entry-MNFBMNSX.js} +5 -2
- package/dist/{ui-callout.entry-7WXQ47S6.js → ui-callout.entry-SSHT5TH2.js} +1 -1
- package/dist/{ui-checkbox.entry-GTSEB7ZS.js → ui-checkbox.entry-LOWIWIWI.js} +1 -1
- package/dist/{ui-chip_2.entry-PG24H67I.js → ui-chip_2.entry-BIMTSF6C.js} +2 -2
- package/dist/{ui-combobox.entry-NTCOCZOH.js → ui-combobox.entry-25Z4MN7N.js} +2 -2
- package/dist/{ui-context-menu.entry-7GSDWHTP.js → ui-context-menu.entry-YZDL5Y4M.js} +2 -2
- package/dist/{ui-dialog.entry-F53O6FBQ.js → ui-dialog.entry-HIXZX5AB.js} +1 -1
- package/dist/{ui-disclosure.entry-YWJA42GQ.js → ui-disclosure.entry-2JZHZNDQ.js} +1 -1
- package/dist/{ui-editable.entry-3QPCWDPM.js → ui-editable.entry-U3VR3XPT.js} +1 -1
- package/dist/{ui-floating-action-button.entry-L4UC6RFM.js → ui-floating-action-button.entry-6S3QN3KJ.js} +1 -1
- package/dist/{ui-form-field.entry-2VCITLQA.js → ui-form-field.entry-GQOSMLHT.js} +1 -1
- package/dist/{ui-icon-button.entry-MRRA6NVP.js → ui-icon-button.entry-QJXKVDM6.js} +1 -1
- package/dist/{ui-input.entry-7LYLUJNT.js → ui-input.entry-UWMQ6JMP.js} +1 -1
- package/dist/{ui-menu-item.entry-YHSIKO5W.js → ui-menu-item.entry-NHNZKKJS.js} +1 -1
- package/dist/{ui-menu.entry-ZQBF7B4T.js → ui-menu.entry-D53RUJND.js} +2 -2
- package/dist/{ui-popover.entry-2HG5ZWQX.js → ui-popover.entry-7ZSIWCFQ.js} +2 -2
- package/dist/{ui-radio-group.entry-A6LI3KHW.js → ui-radio-group.entry-37MSYIH4.js} +1 -1
- package/dist/{ui-radio.entry-WBCZZG5D.js → ui-radio.entry-7YGCDHXT.js} +1 -1
- package/dist/{ui-search-result-row.entry-P25POOYP.js → ui-search-result-row.entry-6FCCLGAS.js} +1 -1
- package/dist/{ui-search-shell.entry-R6IVRPSW.js → ui-search-shell.entry-HSBEXPER.js} +1 -1
- package/dist/{ui-select.entry-CAAGCELJ.js → ui-select.entry-GIDIAYRD.js} +1 -1
- package/dist/{ui-switch.entry-SKU445KH.js → ui-switch.entry-MYAL6XPC.js} +1 -1
- package/dist/{ui-tabs.entry-7BQPZEH3.js → ui-tabs.entry-R4TEXQSD.js} +1 -1
- package/dist/{ui-textarea.entry-OFC4YUU7.js → ui-textarea.entry-FW32JNDV.js} +1 -1
- package/dist/{ui-toast-region.entry-7VNTFVDO.js → ui-toast-region.entry-BTMFPKZF.js} +2 -2
- package/dist/{ui-top-bar.entry-2N3EKMVF.js → ui-top-bar.entry-5DQGJF3B.js} +1 -1
- package/dist/{ui-tree-item.entry-SLHAE42A.js → ui-tree-item.entry-ADT7DSOS.js} +1 -1
- package/dist/{ui-tree.entry-LF45JUC4.js → ui-tree.entry-7PYQ5RIN.js} +1 -1
- package/package.json +1 -1
- package/dist/components/p-BOC_l2hE.js +0 -1
- package/dist/looma/p-Ig1jYhE1.js +0 -1
|
@@ -6,38 +6,38 @@ var __glob = (map) => (path) => {
|
|
|
6
6
|
|
|
7
7
|
// import("./**/*.entry.js") in dist/esm/index-8BGiMGQ0.js
|
|
8
8
|
var globImport_entry_js = __glob({
|
|
9
|
-
"./ui-affordance-scope.entry.js": () => import("./ui-affordance-scope.entry-
|
|
10
|
-
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-
|
|
11
|
-
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-
|
|
12
|
-
"./ui-badge.entry.js": () => import("./ui-badge.entry-
|
|
13
|
-
"./ui-button.entry.js": () => import("./ui-button.entry-
|
|
14
|
-
"./ui-callout.entry.js": () => import("./ui-callout.entry-
|
|
15
|
-
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-
|
|
16
|
-
"./ui-chip_2.entry.js": () => import("./ui-chip_2.entry-
|
|
17
|
-
"./ui-combobox.entry.js": () => import("./ui-combobox.entry-
|
|
18
|
-
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-
|
|
19
|
-
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-
|
|
20
|
-
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-
|
|
21
|
-
"./ui-editable.entry.js": () => import("./ui-editable.entry-
|
|
22
|
-
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-
|
|
23
|
-
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-
|
|
24
|
-
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-
|
|
25
|
-
"./ui-input.entry.js": () => import("./ui-input.entry-
|
|
26
|
-
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-
|
|
27
|
-
"./ui-menu.entry.js": () => import("./ui-menu.entry-
|
|
28
|
-
"./ui-popover.entry.js": () => import("./ui-popover.entry-
|
|
29
|
-
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-
|
|
30
|
-
"./ui-radio.entry.js": () => import("./ui-radio.entry-
|
|
31
|
-
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-
|
|
32
|
-
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-
|
|
33
|
-
"./ui-select.entry.js": () => import("./ui-select.entry-
|
|
34
|
-
"./ui-switch.entry.js": () => import("./ui-switch.entry-
|
|
35
|
-
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-
|
|
36
|
-
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-
|
|
37
|
-
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-
|
|
38
|
-
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-
|
|
39
|
-
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-
|
|
40
|
-
"./ui-tree.entry.js": () => import("./ui-tree.entry-
|
|
9
|
+
"./ui-affordance-scope.entry.js": () => import("./ui-affordance-scope.entry-L6TIXYOP.js"),
|
|
10
|
+
"./ui-avatar-group.entry.js": () => import("./ui-avatar-group.entry-TCAA6P72.js"),
|
|
11
|
+
"./ui-avatar.entry.js": () => import("./ui-avatar.entry-52DQ7VXA.js"),
|
|
12
|
+
"./ui-badge.entry.js": () => import("./ui-badge.entry-2XCAA6LL.js"),
|
|
13
|
+
"./ui-button.entry.js": () => import("./ui-button.entry-MNFBMNSX.js"),
|
|
14
|
+
"./ui-callout.entry.js": () => import("./ui-callout.entry-SSHT5TH2.js"),
|
|
15
|
+
"./ui-checkbox.entry.js": () => import("./ui-checkbox.entry-LOWIWIWI.js"),
|
|
16
|
+
"./ui-chip_2.entry.js": () => import("./ui-chip_2.entry-BIMTSF6C.js"),
|
|
17
|
+
"./ui-combobox.entry.js": () => import("./ui-combobox.entry-25Z4MN7N.js"),
|
|
18
|
+
"./ui-context-menu.entry.js": () => import("./ui-context-menu.entry-YZDL5Y4M.js"),
|
|
19
|
+
"./ui-dialog.entry.js": () => import("./ui-dialog.entry-HIXZX5AB.js"),
|
|
20
|
+
"./ui-disclosure.entry.js": () => import("./ui-disclosure.entry-2JZHZNDQ.js"),
|
|
21
|
+
"./ui-editable.entry.js": () => import("./ui-editable.entry-U3VR3XPT.js"),
|
|
22
|
+
"./ui-floating-action-button.entry.js": () => import("./ui-floating-action-button.entry-6S3QN3KJ.js"),
|
|
23
|
+
"./ui-form-field.entry.js": () => import("./ui-form-field.entry-GQOSMLHT.js"),
|
|
24
|
+
"./ui-icon-button.entry.js": () => import("./ui-icon-button.entry-QJXKVDM6.js"),
|
|
25
|
+
"./ui-input.entry.js": () => import("./ui-input.entry-UWMQ6JMP.js"),
|
|
26
|
+
"./ui-menu-item.entry.js": () => import("./ui-menu-item.entry-NHNZKKJS.js"),
|
|
27
|
+
"./ui-menu.entry.js": () => import("./ui-menu.entry-D53RUJND.js"),
|
|
28
|
+
"./ui-popover.entry.js": () => import("./ui-popover.entry-7ZSIWCFQ.js"),
|
|
29
|
+
"./ui-radio-group.entry.js": () => import("./ui-radio-group.entry-37MSYIH4.js"),
|
|
30
|
+
"./ui-radio.entry.js": () => import("./ui-radio.entry-7YGCDHXT.js"),
|
|
31
|
+
"./ui-search-result-row.entry.js": () => import("./ui-search-result-row.entry-6FCCLGAS.js"),
|
|
32
|
+
"./ui-search-shell.entry.js": () => import("./ui-search-shell.entry-HSBEXPER.js"),
|
|
33
|
+
"./ui-select.entry.js": () => import("./ui-select.entry-GIDIAYRD.js"),
|
|
34
|
+
"./ui-switch.entry.js": () => import("./ui-switch.entry-MYAL6XPC.js"),
|
|
35
|
+
"./ui-tabs.entry.js": () => import("./ui-tabs.entry-R4TEXQSD.js"),
|
|
36
|
+
"./ui-textarea.entry.js": () => import("./ui-textarea.entry-FW32JNDV.js"),
|
|
37
|
+
"./ui-toast-region.entry.js": () => import("./ui-toast-region.entry-BTMFPKZF.js"),
|
|
38
|
+
"./ui-top-bar.entry.js": () => import("./ui-top-bar.entry-5DQGJF3B.js"),
|
|
39
|
+
"./ui-tree-item.entry.js": () => import("./ui-tree-item.entry-ADT7DSOS.js"),
|
|
40
|
+
"./ui-tree.entry.js": () => import("./ui-tree.entry-7PYQ5RIN.js")
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
// dist/esm/index-8BGiMGQ0.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dist/esm/positioning-
|
|
1
|
+
// dist/esm/positioning-ZOr-2PSe.js
|
|
2
2
|
var DEFAULT_AFFORDANCE_NEAR_RADIUS = 16;
|
|
3
3
|
var anchorSequence = 0;
|
|
4
4
|
var anchorBindings = /* @__PURE__ */ new WeakMap();
|
|
@@ -162,6 +162,8 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
162
162
|
positionNative();
|
|
163
163
|
const viewport = getVisualViewportRect(owner);
|
|
164
164
|
surfaceRect = surface.getBoundingClientRect();
|
|
165
|
+
if (surfaceRect.width === 0 || surfaceRect.height === 0)
|
|
166
|
+
return;
|
|
165
167
|
const shift = clampRectToViewport(surfaceRect, viewport, viewportGap);
|
|
166
168
|
if (shift.x === 0 && shift.y === 0)
|
|
167
169
|
return;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["ui-combobox.cjs",[[769,"ui-combobox",{"label":[1],"placeholder":[1],"name":[1],"value":[1],"defaultValue":[1,"default-value"],"multiple":[516],"tokenSeparators":[16],"query":[1],"defaultQuery":[1,"default-query"],"config":[16],"disabled":[4],"readOnly":[4,"readonly"],"required":[4],"size":[1],"labelVisibility":[1,"label-visibility"],"disclosure":[4],"clearable":[4],"help":[1],"raw":[32],"display":[32],"selected":[32],"expanded":[32],"rows":[32],"active":[32],"loading":[32],"helpOpen":[32],"lookupError":[32],"validation":[32],"validate":[64],"focusInput":[64]},null,{"value":[{"syncValue":0}],"query":[{"syncQuery":0}],"disabled":[{"syncDisabled":0}],"readOnly":[{"syncDisabled":0}],"config":[{"syncConfig":0}]}]]],["ui-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[32],"focusTrigger":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"syncTarget":0}],"internalOpen":[{"syncOverlay":0}]}]]],["ui-affordance-scope.cjs",[[769,"ui-affordance-scope",{"nearRadius":[514,"near-radius"]},null,{"nearRadius":[{"connectCoordinator":0}]}]]],["ui-avatar.cjs",[[513,"ui-avatar",{"src":[1],"alt":[1],"name":[1],"fallback":[1],"hasImage":[32]},null,{"src":[{"watchSrc":0}]}]]],["ui-avatar-group.cjs",[[769,"ui-avatar-group",{"max":[2],"label":[1],"overflowCount":[32]},null,{"max":[{"syncOverflow":0}]}]]],["ui-badge.cjs",[[769,"ui-badge",{"variant":[1],"tone":[1]}]]],["ui-button.cjs",[[769,"ui-button",{"variant":[1],"size":[1],"disabled":[
|
|
9
|
+
return index.bootstrapLazy([["ui-combobox.cjs",[[769,"ui-combobox",{"label":[1],"placeholder":[1],"name":[1],"value":[1],"defaultValue":[1,"default-value"],"multiple":[516],"tokenSeparators":[16],"query":[1],"defaultQuery":[1,"default-query"],"config":[16],"disabled":[4],"readOnly":[4,"readonly"],"required":[4],"size":[1],"labelVisibility":[1,"label-visibility"],"disclosure":[4],"clearable":[4],"help":[1],"raw":[32],"display":[32],"selected":[32],"expanded":[32],"rows":[32],"active":[32],"loading":[32],"helpOpen":[32],"lookupError":[32],"validation":[32],"validate":[64],"focusInput":[64]},null,{"value":[{"syncValue":0}],"query":[{"syncQuery":0}],"disabled":[{"syncDisabled":0}],"readOnly":[{"syncDisabled":0}],"config":[{"syncConfig":0}]}]]],["ui-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[32],"focusTrigger":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"syncTarget":0}],"internalOpen":[{"syncOverlay":0}]}]]],["ui-affordance-scope.cjs",[[769,"ui-affordance-scope",{"nearRadius":[514,"near-radius"]},null,{"nearRadius":[{"connectCoordinator":0}]}]]],["ui-avatar.cjs",[[513,"ui-avatar",{"src":[1],"alt":[1],"name":[1],"fallback":[1],"hasImage":[32]},null,{"src":[{"watchSrc":0}]}]]],["ui-avatar-group.cjs",[[769,"ui-avatar-group",{"max":[2],"label":[1],"overflowCount":[32]},null,{"max":[{"syncOverflow":0}]}]]],["ui-badge.cjs",[[769,"ui-badge",{"variant":[1],"tone":[1]}]]],["ui-button.cjs",[[769,"ui-button",{"variant":[1],"size":[1],"disabled":[516]},null,{"variant":[{"syncToButton":0}],"size":[{"syncToButton":0}],"disabled":[{"syncToButton":0}]}]]],["ui-callout.cjs",[[769,"ui-callout",{"tone":[1]}]]],["ui-checkbox.cjs",[[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.cjs",[[769,"ui-dialog",{"open":[4],"defaultOpen":[4,"default-open"],"modal":[4],"dismissible":[4],"label":[1],"internalOpen":[32],"accessibleLabel":[32]},null,{"open":[{"syncFromProp":0}],"label":[{"syncLabelFromProp":0}],"internalOpen":[{"syncOpen":0}]}]]],["ui-disclosure.cjs",[[769,"ui-disclosure",{"open":[4],"defaultOpen":[4,"default-open"],"disabled":[4],"internalOpen":[32],"contentId":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncState":0}]}]]],["ui-editable.cjs",[[769,"ui-editable",{"edit":[4],"defaultEdit":[4,"default-edit"],"disabled":[4],"internalEdit":[32]},null,{"edit":[{"syncFromProp":0}]}]]],["ui-floating-action-button.cjs",[[769,"ui-floating-action-button",{"disabled":[516],"mobileOnly":[516,"mobile-only"],"label":[1]}]]],["ui-form-field.cjs",[[769,"ui-form-field",{"invalid":[4],"disabled":[4],"required":[4]}]]],["ui-icon-button.cjs",[[769,"ui-icon-button",{"disabled":[516],"label":[1],"size":[513],"variant":[513],"anticipatory":[516]}]]],["ui-input.cjs",[[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.cjs",[[769,"ui-menu-item",{"disabled":[516],"value":[1]}]]],["ui-popover.cjs",[[769,"ui-popover",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"onOpenChange":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}]}]]],["ui-radio.cjs",[[769,"ui-radio",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"name":[1],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}],"disabled":[{"syncToInput":0}],"name":[{"syncToInput":0}],"required":[{"syncToInput":0}],"value":[{"syncToInput":0}]}]]],["ui-radio-group.cjs",[[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.cjs",[[769,"ui-search-result-row",{"disabled":[516],"selected":[516],"hasLeading":[32],"hasMeta":[32],"hasExcerpt":[32],"hasTrailing":[32]}]]],["ui-search-shell.cjs",[[769,"ui-search-shell",{"hasStatus":[32],"hasFooter":[32]}]]],["ui-select.cjs",[[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.cjs",[[769,"ui-switch",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}]}]]],["ui-tabs.cjs",[[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.cjs",[[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.cjs",[[769,"ui-toast-region",{"open":[4],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-top-bar.cjs",[[769,"ui-top-bar",{"hasLeading":[32],"hasSearch":[32],"hasActions":[32]}]]],["ui-tree.cjs",[[769,"ui-tree",{"label":[1],"hoverExpandDelay":[2,"hover-expand-delay"],"maxDepth":[2,"max-depth"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"dropDepth":[2,"drop-depth"],"subtreeDepth":[2,"subtree-depth"],"container":[4],"sortable":[4],"dragType":[1,"drag-type"],"dropScope":[1,"drop-scope"],"accepts":[1],"expanded":[4],"defaultExpanded":[4,"default-expanded"],"selected":[4],"disabled":[4],"internalExpanded":[32],"structuralLevel":[32],"tabStop":[32]},null,{"expanded":[{"syncExpandedFromProp":0}]}]]],["ui-menu.cjs",[[769,"ui-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-chip_2.cjs",[[769,"ui-chip",{"appearance":[1],"size":[1]}],[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"toggleOnClick":[4,"toggle-on-click"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncOverlay":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/looma.cjs.js
CHANGED
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["ui-combobox.cjs",[[769,"ui-combobox",{"label":[1],"placeholder":[1],"name":[1],"value":[1],"defaultValue":[1,"default-value"],"multiple":[516],"tokenSeparators":[16],"query":[1],"defaultQuery":[1,"default-query"],"config":[16],"disabled":[4],"readOnly":[4,"readonly"],"required":[4],"size":[1],"labelVisibility":[1,"label-visibility"],"disclosure":[4],"clearable":[4],"help":[1],"raw":[32],"display":[32],"selected":[32],"expanded":[32],"rows":[32],"active":[32],"loading":[32],"helpOpen":[32],"lookupError":[32],"validation":[32],"validate":[64],"focusInput":[64]},null,{"value":[{"syncValue":0}],"query":[{"syncQuery":0}],"disabled":[{"syncDisabled":0}],"readOnly":[{"syncDisabled":0}],"config":[{"syncConfig":0}]}]]],["ui-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[32],"focusTrigger":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"syncTarget":0}],"internalOpen":[{"syncOverlay":0}]}]]],["ui-affordance-scope.cjs",[[769,"ui-affordance-scope",{"nearRadius":[514,"near-radius"]},null,{"nearRadius":[{"connectCoordinator":0}]}]]],["ui-avatar.cjs",[[513,"ui-avatar",{"src":[1],"alt":[1],"name":[1],"fallback":[1],"hasImage":[32]},null,{"src":[{"watchSrc":0}]}]]],["ui-avatar-group.cjs",[[769,"ui-avatar-group",{"max":[2],"label":[1],"overflowCount":[32]},null,{"max":[{"syncOverflow":0}]}]]],["ui-badge.cjs",[[769,"ui-badge",{"variant":[1],"tone":[1]}]]],["ui-button.cjs",[[769,"ui-button",{"variant":[1],"size":[1],"disabled":[
|
|
22
|
+
return index.bootstrapLazy([["ui-combobox.cjs",[[769,"ui-combobox",{"label":[1],"placeholder":[1],"name":[1],"value":[1],"defaultValue":[1,"default-value"],"multiple":[516],"tokenSeparators":[16],"query":[1],"defaultQuery":[1,"default-query"],"config":[16],"disabled":[4],"readOnly":[4,"readonly"],"required":[4],"size":[1],"labelVisibility":[1,"label-visibility"],"disclosure":[4],"clearable":[4],"help":[1],"raw":[32],"display":[32],"selected":[32],"expanded":[32],"rows":[32],"active":[32],"loading":[32],"helpOpen":[32],"lookupError":[32],"validation":[32],"validate":[64],"focusInput":[64]},null,{"value":[{"syncValue":0}],"query":[{"syncQuery":0}],"disabled":[{"syncDisabled":0}],"readOnly":[{"syncDisabled":0}],"config":[{"syncConfig":0}]}]]],["ui-context-menu.cjs",[[769,"ui-context-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"internalOpen":[32],"focusTrigger":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"syncTarget":0}],"internalOpen":[{"syncOverlay":0}]}]]],["ui-affordance-scope.cjs",[[769,"ui-affordance-scope",{"nearRadius":[514,"near-radius"]},null,{"nearRadius":[{"connectCoordinator":0}]}]]],["ui-avatar.cjs",[[513,"ui-avatar",{"src":[1],"alt":[1],"name":[1],"fallback":[1],"hasImage":[32]},null,{"src":[{"watchSrc":0}]}]]],["ui-avatar-group.cjs",[[769,"ui-avatar-group",{"max":[2],"label":[1],"overflowCount":[32]},null,{"max":[{"syncOverflow":0}]}]]],["ui-badge.cjs",[[769,"ui-badge",{"variant":[1],"tone":[1]}]]],["ui-button.cjs",[[769,"ui-button",{"variant":[1],"size":[1],"disabled":[516]},null,{"variant":[{"syncToButton":0}],"size":[{"syncToButton":0}],"disabled":[{"syncToButton":0}]}]]],["ui-callout.cjs",[[769,"ui-callout",{"tone":[1]}]]],["ui-checkbox.cjs",[[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.cjs",[[769,"ui-dialog",{"open":[4],"defaultOpen":[4,"default-open"],"modal":[4],"dismissible":[4],"label":[1],"internalOpen":[32],"accessibleLabel":[32]},null,{"open":[{"syncFromProp":0}],"label":[{"syncLabelFromProp":0}],"internalOpen":[{"syncOpen":0}]}]]],["ui-disclosure.cjs",[[769,"ui-disclosure",{"open":[4],"defaultOpen":[4,"default-open"],"disabled":[4],"internalOpen":[32],"contentId":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncState":0}]}]]],["ui-editable.cjs",[[769,"ui-editable",{"edit":[4],"defaultEdit":[4,"default-edit"],"disabled":[4],"internalEdit":[32]},null,{"edit":[{"syncFromProp":0}]}]]],["ui-floating-action-button.cjs",[[769,"ui-floating-action-button",{"disabled":[516],"mobileOnly":[516,"mobile-only"],"label":[1]}]]],["ui-form-field.cjs",[[769,"ui-form-field",{"invalid":[4],"disabled":[4],"required":[4]}]]],["ui-icon-button.cjs",[[769,"ui-icon-button",{"disabled":[516],"label":[1],"size":[513],"variant":[513],"anticipatory":[516]}]]],["ui-input.cjs",[[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.cjs",[[769,"ui-menu-item",{"disabled":[516],"value":[1]}]]],["ui-popover.cjs",[[769,"ui-popover",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"onOpenChange":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}]}]]],["ui-radio.cjs",[[769,"ui-radio",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"name":[1],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}],"disabled":[{"syncToInput":0}],"name":[{"syncToInput":0}],"required":[{"syncToInput":0}],"value":[{"syncToInput":0}]}]]],["ui-radio-group.cjs",[[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.cjs",[[769,"ui-search-result-row",{"disabled":[516],"selected":[516],"hasLeading":[32],"hasMeta":[32],"hasExcerpt":[32],"hasTrailing":[32]}]]],["ui-search-shell.cjs",[[769,"ui-search-shell",{"hasStatus":[32],"hasFooter":[32]}]]],["ui-select.cjs",[[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.cjs",[[769,"ui-switch",{"checked":[4],"defaultChecked":[4,"default-checked"],"disabled":[4],"required":[4],"value":[1],"internalChecked":[32]},null,{"checked":[{"syncFromProp":0}]}]]],["ui-tabs.cjs",[[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.cjs",[[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.cjs",[[769,"ui-toast-region",{"open":[4],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-top-bar.cjs",[[769,"ui-top-bar",{"hasLeading":[32],"hasSearch":[32],"hasActions":[32]}]]],["ui-tree.cjs",[[769,"ui-tree",{"label":[1],"hoverExpandDelay":[2,"hover-expand-delay"],"maxDepth":[2,"max-depth"]}]]],["ui-tree-item.cjs",[[769,"ui-tree-item",{"itemId":[1,"item-id"],"label":[1],"dropDepth":[2,"drop-depth"],"subtreeDepth":[2,"subtree-depth"],"container":[4],"sortable":[4],"dragType":[1,"drag-type"],"dropScope":[1,"drop-scope"],"accepts":[1],"expanded":[4],"defaultExpanded":[4,"default-expanded"],"selected":[4],"disabled":[4],"internalExpanded":[32],"structuralLevel":[32],"tabStop":[32]},null,{"expanded":[{"syncExpandedFromProp":0}]}]]],["ui-menu.cjs",[[769,"ui-menu",{"open":[4],"defaultOpen":[4,"default-open"],"for":[1],"placement":[1],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncSurface":0}]}]]],["ui-chip_2.cjs",[[769,"ui-chip",{"appearance":[1],"size":[1]}],[769,"ui-tooltip",{"for":[1],"open":[4],"defaultOpen":[4,"default-open"],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"toggleOnClick":[4,"toggle-on-click"],"internalOpen":[32]},null,{"open":[{"syncFromProp":0}],"for":[{"resetSurface":0}],"placement":[{"resetSurface":0}],"internalOpen":[{"syncOverlay":0}]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -192,6 +192,15 @@ function createAnchoredSurface(surface, options = {}) {
|
|
|
192
192
|
positionNative();
|
|
193
193
|
const viewport = getVisualViewportRect(owner);
|
|
194
194
|
surfaceRect = surface.getBoundingClientRect();
|
|
195
|
+
// The surface can be measured before it paints (its first frames in the
|
|
196
|
+
// top layer, or while slow content/fonts settle), reporting a zero size.
|
|
197
|
+
// The pixel fallback below would then place it at `anchor - 0`, i.e. off
|
|
198
|
+
// the anchored edge, and leave it stranded there. Trust native anchor
|
|
199
|
+
// placement — which does not depend on our measurement — until the
|
|
200
|
+
// surface has real geometry; the scheduled re-run and ResizeObserver
|
|
201
|
+
// re-position once it does.
|
|
202
|
+
if (surfaceRect.width === 0 || surfaceRect.height === 0)
|
|
203
|
+
return;
|
|
195
204
|
const shift = clampRectToViewport(surfaceRect, viewport, viewportGap);
|
|
196
205
|
if (shift.x === 0 && shift.y === 0)
|
|
197
206
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-BHG9Rpil.js');
|
|
4
|
-
var positioning = require('./positioning-
|
|
4
|
+
var positioning = require('./positioning-CCR6ifPj.js');
|
|
5
5
|
|
|
6
6
|
const uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
7
7
|
|
|
@@ -12,6 +12,9 @@ const UIButton = class {
|
|
|
12
12
|
get host() { return index.getElement(this); }
|
|
13
13
|
variant = 'outline';
|
|
14
14
|
size;
|
|
15
|
+
// Reflect so the attribute always tracks the property (as ui-icon-button does).
|
|
16
|
+
// Without reflection a `disabled` attribute rendered at SSR outlives the enabled
|
|
17
|
+
// state after hydration flips the prop, leaving working buttons styled disabled.
|
|
15
18
|
disabled = false;
|
|
16
19
|
slotRef;
|
|
17
20
|
syncToButton() {
|
|
@@ -53,7 +56,7 @@ const UIButton = class {
|
|
|
53
56
|
this.host.click();
|
|
54
57
|
};
|
|
55
58
|
render() {
|
|
56
|
-
return (index.h(index.Host, { key: '
|
|
59
|
+
return (index.h(index.Host, { key: '27af76cb5db1d0385b6450d2bb12c3bbea5822d2', "data-size": this.size || undefined, "data-variant": this.variant, "data-disabled": this.disabled ? 'true' : undefined, onKeyDown: this.onKeydown }, index.h("slot", { key: 'daeaa9a8c4e4e87e264bb1e09f1ab6bd1d53830c', ref: (el) => (this.slotRef = el) })));
|
|
57
60
|
}
|
|
58
61
|
static get watchers() { return {
|
|
59
62
|
"variant": [{
|
|
@@ -4,7 +4,7 @@ var index = require('./index-BHG9Rpil.js');
|
|
|
4
4
|
var manager = require('./manager-Ce25WRtl.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
6
|
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
7
|
-
var positioning = require('./positioning-
|
|
7
|
+
var positioning = require('./positioning-CCR6ifPj.js');
|
|
8
8
|
|
|
9
9
|
const uiChipCss = () => `:host{--ui-chip-surface:var(--ui-surface-subtle);--ui-chip-text:var(--ui-text-secondary);--ui-chip-border:var(--ui-border-default);--ui-chip-font-size:var(--ui-font-size-xs);--ui-chip-font-weight:var(--ui-font-normal);--ui-chip-line-height:var(--ui-line-height-tight);--ui-chip-padding-block:var(--ui-space-0-5);--ui-chip-padding-inline:var(--ui-space-2);--ui-chip-notch:var(--ui-space-1);display:inline-flex;min-width:0;max-width:100%}:host([data-size='sm']){--ui-chip-font-size:var(--ui-font-size-sm)}.chip__surface{display:inline-flex;align-items:center;box-sizing:border-box;min-width:0;max-width:100%;padding:var(--ui-chip-padding-block) var(--ui-chip-padding-inline);border:1px solid var(--ui-chip-border);background:var(--ui-chip-surface);color:var(--ui-chip-text) !important;font-family:var(--ui-font-family-sans) !important;font-size:var(--ui-chip-font-size) !important;font-weight:var(--ui-chip-font-weight) !important;line-height:var(--ui-chip-line-height) !important}.chip__label{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([data-appearance='pill']) .chip__surface{border-radius:var(--ui-radius-round)}:host([data-appearance='tag']) .chip__surface{border:0;padding-inline-end:calc(var(--ui-chip-padding-inline) + var(--ui-chip-notch));clip-path:polygon(0 0, calc(100% - var(--ui-chip-notch)) 0, 100% 50%, calc(100% - var(--ui-chip-notch)) 100%, 0 100%)}`;
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-BHG9Rpil.js');
|
|
4
|
-
var positioning = require('./positioning-
|
|
4
|
+
var positioning = require('./positioning-CCR6ifPj.js');
|
|
5
5
|
var manager = require('./manager-Ce25WRtl.js');
|
|
6
6
|
|
|
7
7
|
/** Formatting is additive: every original character must survive in order.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var manager = require('./manager-Ce25WRtl.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
|
-
var positioning = require('./positioning-
|
|
6
|
+
var positioning = require('./positioning-CCR6ifPj.js');
|
|
7
7
|
|
|
8
8
|
const uiContextMenuCss = () => `:host{display:contents}:host([data-focus-trigger='pointer']) ::slotted(ui-menu-item:focus){outline:none}.menu{position:fixed;inset:auto;margin:0;z-index:var(--ui-z-overlay, 1000);min-width:12rem;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.menu:popover-open{opacity:1;transform:translateY(0) scale(1)}@starting-style{.menu:popover-open{opacity:0;transform:translateY(-4px) scale(0.99)}}.menu[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){.menu{transition:none}}`;
|
|
9
9
|
|
|
@@ -4,7 +4,7 @@ var index = require('./index-BHG9Rpil.js');
|
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
5
|
var manager = require('./manager-Ce25WRtl.js');
|
|
6
6
|
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
7
|
-
var positioning = require('./positioning-
|
|
7
|
+
var positioning = require('./positioning-CCR6ifPj.js');
|
|
8
8
|
|
|
9
9
|
const uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;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:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;max-inline-size:inherit;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);max-block-size:inherit;overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:visible;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%}`;
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ var index = require('./index-BHG9Rpil.js');
|
|
|
4
4
|
var manager = require('./manager-Ce25WRtl.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
6
|
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
7
|
-
var positioning = require('./positioning-
|
|
7
|
+
var positioning = require('./positioning-CCR6ifPj.js');
|
|
8
8
|
|
|
9
9
|
const uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}.popover__surface{box-sizing:border-box;max-inline-size:inherit;max-block-size:inherit;overflow:auto;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
|
-
var positioning = require('./positioning-
|
|
5
|
+
var positioning = require('./positioning-CCR6ifPj.js');
|
|
6
6
|
|
|
7
7
|
const uiToastRegionCss = () => `: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([popover]){right:auto;bottom:auto;margin:0}: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}`;
|
|
8
8
|
|
|
@@ -4,6 +4,9 @@ export class UIButton {
|
|
|
4
4
|
host;
|
|
5
5
|
variant = 'outline';
|
|
6
6
|
size;
|
|
7
|
+
// Reflect so the attribute always tracks the property (as ui-icon-button does).
|
|
8
|
+
// Without reflection a `disabled` attribute rendered at SSR outlives the enabled
|
|
9
|
+
// state after hydration flips the prop, leaving working buttons styled disabled.
|
|
7
10
|
disabled = false;
|
|
8
11
|
slotRef;
|
|
9
12
|
syncToButton() {
|
|
@@ -45,7 +48,7 @@ export class UIButton {
|
|
|
45
48
|
this.host.click();
|
|
46
49
|
};
|
|
47
50
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '27af76cb5db1d0385b6450d2bb12c3bbea5822d2', "data-size": this.size || undefined, "data-variant": this.variant, "data-disabled": this.disabled ? 'true' : undefined, onKeyDown: this.onKeydown }, h("slot", { key: 'daeaa9a8c4e4e87e264bb1e09f1ab6bd1d53830c', ref: (el) => (this.slotRef = el) })));
|
|
49
52
|
}
|
|
50
53
|
static get is() { return "ui-button"; }
|
|
51
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -116,7 +119,7 @@ export class UIButton {
|
|
|
116
119
|
},
|
|
117
120
|
"getter": false,
|
|
118
121
|
"setter": false,
|
|
119
|
-
"reflect":
|
|
122
|
+
"reflect": true,
|
|
120
123
|
"attribute": "disabled",
|
|
121
124
|
"defaultValue": "false"
|
|
122
125
|
}
|
|
@@ -195,6 +195,15 @@ export function createAnchoredSurface(surface, options = {}) {
|
|
|
195
195
|
positionNative();
|
|
196
196
|
const viewport = getVisualViewportRect(owner);
|
|
197
197
|
surfaceRect = surface.getBoundingClientRect();
|
|
198
|
+
// The surface can be measured before it paints (its first frames in the
|
|
199
|
+
// top layer, or while slow content/fonts settle), reporting a zero size.
|
|
200
|
+
// The pixel fallback below would then place it at `anchor - 0`, i.e. off
|
|
201
|
+
// the anchored edge, and leave it stranded there. Trust native anchor
|
|
202
|
+
// placement — which does not depend on our measurement — until the
|
|
203
|
+
// surface has real geometry; the scheduled re-run and ResizeObserver
|
|
204
|
+
// re-position once it does.
|
|
205
|
+
if (surfaceRect.width === 0 || surfaceRect.height === 0)
|
|
206
|
+
return;
|
|
198
207
|
const shift = clampRectToViewport(surfaceRect, viewport, viewportGap);
|
|
199
208
|
if (shift.x === 0 && shift.y === 0)
|
|
200
209
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,h as i,c as s,t as
|
|
1
|
+
import{p as e,H as t,h as i,c as s,t as a}from"./p-Bh_1GxOD.js";import{d as r,e as o}from"./p-JwSoedEO.js";import{o as n,c,r as l}from"./p-C-0syqXZ.js";import{i as u,c as h}from"./p-BnGhGgTH.js";import{c as p}from"./p-B_DaIVEY.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId=`ui-menu-${Math.random().toString(36).slice(2,11)}`;anchor=null;surface=null;syncFromProp(){u(this.open)&&(this.internalOpen=this.open)}resetSurface(){this.setupSurface(),this.syncSurface()}syncSurface(){this.syncAnchorState(),this.surface&&(this.internalOpen?(this.surface.show(),n({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(e,t)=>this.closeMenu(e,t)})):(this.surface.hide(),c(this.overlayId)))}componentDidLoad(){this.internalOpen=h(this.open,this.defaultOpen),this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncSurface()}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,c(this.overlayId)}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=p(this.host,{anchor:this.anchor,placement:this.placement}))}syncAnchorState(){this.anchor&&(this.anchor.setAttribute("aria-haspopup","menu"),this.anchor.setAttribute("aria-expanded",this.internalOpen?"true":"false"))}closeMenu(e,t){this.internalOpen&&(u(this.open)||(this.internalOpen=!1),r(this.host,"close",{open:!1,reason:e,trigger:t}),"escape"===e&&this.anchor?.focus())}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";r(this.host,"select",{value:i,trigger:o(e)}),r(this.host,"close",{open:!1,reason:"action",trigger:o(e)}),u(this.open)||(this.internalOpen=!1)};onKeydown=e=>{if("Escape"===e.key)return e.preventDefault(),void l("escape","keyboard");const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const s=e.target.closest?.("ui-menu-item"),a=s&&s instanceof t?i.indexOf(s):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?a<0?0:Math.min(a+1,i.length-1):a<=0?i.length-1:a-1].focus());else if(e.preventDefault(),s&&a>=0){const e=s.getAttribute("value")??s.getAttribute("data-value")??"";r(this.host,"select",{value:e,trigger:"keyboard"}),r(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),u(this.open)||(this.internalOpen=!1)}};render(){return i(s,{key:"5b64cc53ca56ea04a63013c8cb61231c9b1045cc",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("div",{key:"6410a56cc5efcffd0673c9abdf8f8aa45295c516",class:"menu__surface"},i("slot",{key:"7e7f9d3b19bbf3024d61ecf44cd8b103748ef966"})))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}}static get style(){return":host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;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:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;max-inline-size:inherit;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);max-block-size:inherit;overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:visible;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%}"}},[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],placement:[1],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}]);function m(){"undefined"!=typeof customElements&&["ui-menu"].forEach((e=>{"ui-menu"===e&&(customElements.get(a(e))||customElements.define(a(e),d))}))}export{d as U,m as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=16;let n=0;const o=new WeakMap;function a(t){try{return t.matches(":popover-open")}catch{return!t.hidden}}function i(t){if(t.setAttribute("popover","manual"),t.hidden=!1,"function"==typeof t.showPopover&&!a(t))try{t.showPopover()}catch{}}function e(t){if("function"==typeof t.hidePopover&&a(t))try{t.hidePopover()}catch{}t.hidden=!0}function r(t){return t.setAttribute("popover","manual"),t.dataset.uiPositioning="viewport",{show(){i(t)},hide(){e(t)},destroy(){e(t)}}}function l(t,n,o,a,i,e=t.getBoundingClientRect()){const r=c(t.ownerDocument.defaultView??window),l=o.startsWith("top"),u=o.endsWith("end"),h=r.bottom-n.bottom-i,f=n.top-r.top-i,p=(l?!(f<e.height+a&&h>f):h<e.height+a&&f>h)?n.top-e.height-a:n.bottom+a,d=u?n.right-e.width:n.left,m=s({left:d,top:p,width:e.width,height:e.height},r,i);t.style.left=`${Math.round(d+m.x)}px`,t.style.top=`${Math.round(p+m.y)}px`,t.style.right="auto",t.style.bottom="auto"}function u(t,a={}){const r=t.ownerDocument.defaultView??window,u=a.placement??"bottom-start",h=Math.max(0,a.gap??4),f=Math.max(0,a.viewportGap??8),p=function(t){const n=t.CSS;return"function"==typeof n?.supports&&n.supports("anchor-name: --ui-anchor-test")&&n.supports("position-anchor: --ui-anchor-test")&&n.supports("top: anchor(bottom)")}(r),d="--ui-anchor-"+ ++n;let m=a.anchor??null,y=null,g=!1,w=null,v=null,b=null;const M=r.ResizeObserver,x=()=>{b||"function"!=typeof M||(b=new M((()=>$())),b.observe(t))},A=()=>{b?.disconnect(),b=null};t.setAttribute("popover","manual"),t.dataset.uiPositioning=p?"anchor":"fallback",t.style.position="fixed",t.style.margin="0";const k=n=>{m&&function(t,n){const a=o.get(t);if(a)if(a.names.delete(n),a.names.size){const n=[a.original,...a.names].filter(Boolean);t.style.setProperty("anchor-name",n.join(", "))}else a.original?t.style.setProperty("anchor-name",a.original):t.style.removeProperty("anchor-name"),o.delete(t)}(m,d),m=n,m?(function(t,n){const a=o.get(t)??{original:t.style.getPropertyValue("anchor-name"),names:new Set};a.names.add(n),o.set(t,a);const i=[a.original,...a.names].filter(Boolean);t.style.setProperty("anchor-name",i.join(", "))}(m,d),t.style.setProperty("position-anchor",d)):t.style.removeProperty("position-anchor")},z=()=>{if(w=null,!g)return;if(y)return void l(t,{left:y.x,right:y.x,top:y.y,bottom:y.y},"bottom-start",h,f);if(!m)return;let n;if(p){(()=>{const n=u.startsWith("bottom"),o=u.endsWith("end");t.style.top=n?`calc(anchor(bottom) + ${h}px)`:"auto",t.style.bottom=n?"auto":`calc(anchor(top) + ${h}px)`,t.style.left=o?"auto":"anchor(left)",t.style.right=o?"anchor(right)":"auto",t.style.setProperty("position-try-fallbacks","flip-block, flip-inline")})();const o=c(r);if(n=t.getBoundingClientRect(),0===n.width||0===n.height)return;const a=s(n,o,f);if(0===a.x&&0===a.y)return}l(t,m.getBoundingClientRect(),u,h,f,n)},$=()=>{g&&null===w&&(w=r.requestAnimationFrame(z))},B=()=>{if(!g||null===y&&null===m)return v?.abort(),void(v=null);if(v)return;v=new AbortController;const t=v.signal;r.addEventListener("resize",$,{passive:!0,signal:t}),r.addEventListener("scroll",$,{passive:!0,capture:!0,signal:t}),r.visualViewport?.addEventListener("resize",$,{passive:!0,signal:t}),r.visualViewport?.addEventListener("scroll",$,{passive:!0,signal:t})};return k(m),{setAnchor(t){y=null,k(t),B(),$()},show(){y=null,g=!0,B(),i(t),z(),$(),x()},showAtPoint(n){y=n,g=!0,B(),i(t),z(),$(),x()},hide(){g=!1,y=null,B(),A(),null!==w&&r.cancelAnimationFrame(w),w=null,e(t)},refresh:$,destroy(){g=!1,v?.abort(),v=null,A(),null!==w&&r.cancelAnimationFrame(w),w=null,e(t),k(null)}}}function c(t=window){const n=t.visualViewport,o=n?.offsetLeft??0,a=n?.offsetTop??0,i=n?.width??t.innerWidth,e=n?.height??t.innerHeight;return{left:o,top:a,right:o+i,bottom:a+e,width:i,height:e}}function s(t,n=c(),o=0){const a=Math.max(0,n.width-2*o),i=Math.max(0,n.height-2*o),e=t.width>a?n.left+o:Math.min(Math.max(t.left,n.left+o),n.right-o-t.width),r=t.height>i?n.top+o:Math.min(Math.max(t.top,n.top+o),n.bottom-o-t.height);return{x:e-t.left,y:r-t.top}}function h(t,n){const o=Math.max(n.left-t.x,0,t.x-n.right),a=Math.max(n.top-t.y,0,t.y-n.bottom);return Math.hypot(o,a)}function f(t,n={}){const o=t.ownerDocument.defaultView??window,a=n.pointerTarget??t,i=n.anchorSelector??"[data-ui-affordance]",e=n.nearRadius??16,r=Number.isFinite(e)?Math.max(0,e):16,l=new AbortController;let u=[],c=null,s=null,f=!1;const p=()=>{for(const{element:t}of u)t.hasAttribute("data-ui-proximity")&&t.removeAttribute("data-ui-proximity");t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},d=()=>{u=Array.from(t.querySelectorAll(i)).filter((t=>!t.hasAttribute("disabled")&&"true"!==t.getAttribute("aria-disabled"))).map((t=>({element:t,rect:t.getBoundingClientRect()}))),f=!1},m=()=>{if(c=null,f&&d(),!s)return void p();let n=!1;for(const t of u){const o=h(s,t.rect)<=r;o&&"near"!==t.element.getAttribute("data-ui-proximity")?t.element.setAttribute("data-ui-proximity","near"):!o&&t.element.hasAttribute("data-ui-proximity")&&t.element.removeAttribute("data-ui-proximity"),n||=o}n&&"engaged"!==t.getAttribute("data-ui-interaction")?t.setAttribute("data-ui-interaction","engaged"):!n&&t.hasAttribute("data-ui-interaction")&&t.removeAttribute("data-ui-interaction")},y=()=>{null===c&&(c=o.requestAnimationFrame(m))},g=()=>{f=!0,y()};return a.addEventListener("pointermove",(t=>{s="touch"===t.pointerType?null:{x:t.clientX,y:t.clientY},y()}),{passive:!0,signal:l.signal}),o.addEventListener("resize",g,{passive:!0,signal:l.signal}),o.addEventListener("scroll",g,{passive:!0,capture:!0,signal:l.signal}),o.visualViewport?.addEventListener("resize",g,{passive:!0,signal:l.signal}),o.visualViewport?.addEventListener("scroll",g,{passive:!0,signal:l.signal}),d(),{refresh:g,destroy(){l.abort(),null!==c&&o.cancelAnimationFrame(c),c=null,s=null,p(),u=[]}}}export{t as D,f as a,r as b,u as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,d as s,h as e,c as o,t as r}from"./p-Bh_1GxOD.js";import{o as h,c as
|
|
1
|
+
import{p as t,H as i,d as s,h as e,c as o,t as r}from"./p-Bh_1GxOD.js";import{o as h,c as a}from"./p-C-0syqXZ.js";import{d as n}from"./p-JwSoedEO.js";import{i as l,c}from"./p-BnGhGgTH.js";import{c as d}from"./p-B_DaIVEY.js";const p=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.opened=s(this,"open"),this.closed=s(this,"close")}get host(){return this}for="";open;defaultOpen=!1;placement="top-start";showDelay=500;hideDelay=100;toggleOnClick=!1;pinned=!1;focused=!1;opened;closed;internalOpen=!1;overlayId=`ui-tooltip-${Math.random().toString(36).slice(2,11)}`;trigger=null;surface=null;showTimer=null;hideTimer=null;syncFromProp(){this.clearTimers(),l(this.open)&&(this.internalOpen=this.open)}resetSurface(){this.syncTrigger(),this.setupSurface(),this.syncOverlay()}syncOverlay(){this.internalOpen?(this.surface?.show(),h({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.trigger?[this.trigger]:void 0,dismissible:!0,requestClose:(t,i)=>this.handleRequestClose(t,i)})):(this.surface?.hide(),a(this.overlayId))}componentDidLoad(){this.host.id||(this.host.id=this.overlayId),this.internalOpen=c(this.open,this.defaultOpen),this.syncTrigger(),this.setupSurface(),this.host.addEventListener("pointerenter",this.onSurfaceEnter),this.host.addEventListener("pointerleave",this.onTriggerLeave),this.syncOverlay()}componentDidUpdate(){this.syncTrigger()}disconnectedCallback(){this.clearTimers(),this.detachTriggerListeners(),this.surface?.destroy(),this.surface=null,this.host.removeEventListener("pointerenter",this.onSurfaceEnter),this.host.removeEventListener("pointerleave",this.onTriggerLeave),a(this.overlayId)}syncTrigger(){const t=this.for?this.host.getRootNode().getElementById(this.for):this.host.previousElementSibling;t!==this.trigger&&(this.detachTriggerListeners(),this.trigger=t,this.attachTriggerListeners(),this.surface?.setAnchor(t))}setupSurface(){this.surface?.destroy(),this.surface=d(this.host,{anchor:this.trigger,placement:this.placement})}attachTriggerListeners(){if(this.detachTriggerListeners(),!this.trigger)return;const t=new Set((this.trigger.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));t.add(this.host.id),this.trigger.setAttribute("aria-describedby",[...t].join(" ")),this.trigger.addEventListener("click",this.onTriggerClick),this.trigger.addEventListener("keydown",this.onTriggerKeydown),this.trigger.addEventListener("pointerenter",this.onTriggerEnter),this.trigger.addEventListener("pointerleave",this.onTriggerLeave),this.trigger.addEventListener("focusin",this.onTriggerFocusIn),this.trigger.addEventListener("focusout",this.onTriggerFocusOut)}detachTriggerListeners(){if(!this.trigger)return;const t=(this.trigger.getAttribute("aria-describedby")||"").split(/\s+/).filter((t=>t&&t!==this.host.id));t.length?this.trigger.setAttribute("aria-describedby",t.join(" ")):this.trigger.removeAttribute("aria-describedby"),this.trigger.removeEventListener("click",this.onTriggerClick),this.trigger.removeEventListener("keydown",this.onTriggerKeydown),this.trigger.removeEventListener("pointerenter",this.onTriggerEnter),this.trigger.removeEventListener("pointerleave",this.onTriggerLeave),this.trigger.removeEventListener("focusin",this.onTriggerFocusIn),this.trigger.removeEventListener("focusout",this.onTriggerFocusOut)}clearShowTimer(){null!==this.showTimer&&(clearTimeout(this.showTimer),this.showTimer=null)}clearHideTimer(){null!==this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null)}clearTimers(){this.clearShowTimer(),this.clearHideTimer()}setInteractionOpen(t,i){this.internalOpen!==t&&(l(this.open)||(this.internalOpen=t),n(this.host,t?"open":"close",{open:t,reason:"action",trigger:i}))}onSurfaceEnter=()=>this.clearHideTimer();onTriggerClick=t=>{this.toggleOnClick&&(this.clearTimers(),this.pinned=!this.pinned,this.setInteractionOpen(this.pinned,0===t.detail?"keyboard":"pointer"))};onTriggerKeydown=t=>{"Escape"===t.key&&this.clearTimers()};onTriggerEnter=t=>{"touch"!==t.pointerType&&(this.clearHideTimer(),this.internalOpen||null!==this.showTimer||(this.showTimer=setTimeout((()=>{this.showTimer=null,this.setInteractionOpen(!0,"pointer")}),Math.max(0,this.showDelay))))};onTriggerLeave=()=>{this.clearShowTimer(),this.focused||this.pinned||!this.internalOpen||null!==this.hideTimer||(this.hideTimer=setTimeout((()=>{this.hideTimer=null,this.setInteractionOpen(!1,"pointer")}),Math.max(0,this.hideDelay)))};onTriggerFocusIn=()=>{this.focused=!0,this.clearTimers(),this.setInteractionOpen(!0,"keyboard")};onTriggerFocusOut=t=>{const i=t.relatedTarget;i&&this.host.contains(i)||(this.focused=!1,this.pinned=!1,this.clearTimers(),this.setInteractionOpen(!1,"keyboard"))};handleRequestClose(t,i){("escape"===t||"light-dismiss"===t&&this.toggleOnClick)&&(this.pinned=!1,this.clearTimers(),l(this.open)||(this.internalOpen=!1),n(this.host,"close",{open:!1,reason:t,trigger:i}))}render(){return e(o,{key:"fd4d81febd147b846aca66e94f25d56f14b171dc",role:"tooltip",hidden:!this.internalOpen,"data-open":this.internalOpen?"":void 0},e("div",{key:"d31ac8c0e087becd7e60459f2cd894a9b15e95fa",class:"tooltip__surface"},e("slot",{key:"06e7aac9b6992a9cf0f92c9d356b97d18fb2da8b"})))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncOverlay:0}]}}static get style(){return":host{position:fixed;inset:auto;margin:0;display:inline-block;box-sizing:border-box;padding:0;border:0;border-radius:0;background:transparent;opacity:0;transform:translateY(4px);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.tooltip__surface{box-sizing:border-box;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}"}},[769,"ui-tooltip",{for:[1],open:[4],defaultOpen:[4,"default-open"],placement:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],toggleOnClick:[4,"toggle-on-click"],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncOverlay:0}]}]);function u(){"undefined"!=typeof customElements&&["ui-tooltip"].forEach((t=>{"ui-tooltip"===t&&(customElements.get(r(t))||customElements.define(r(t),p))}))}export{p as U,u as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,t,H as a,h as n,c as o}from"./p-Bh_1GxOD.js";import{D as s,a as i}from"./p-
|
|
1
|
+
import{p as e,t,H as a,h as n,c as o}from"./p-Bh_1GxOD.js";import{D as s,a as i}from"./p-B_DaIVEY.js";const r=e(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}nearRadius=s;coordinator=null;componentDidLoad(){this.connectCoordinator()}disconnectedCallback(){this.coordinator?.destroy(),this.coordinator=null}connectCoordinator(){this.coordinator?.destroy(),this.coordinator=i(this.host,{nearRadius:this.nearRadius})}onSlotChange=()=>{this.coordinator?.refresh()};render(){return n(o,{key:"f500fa48554ed6224efd2dbe9632880bf0a15a19"},n("slot",{key:"37c5c5b7925b260ff8f9edd411ee6c90a12a4909",onSlotchange:this.onSlotChange}))}static get watchers(){return{nearRadius:[{connectCoordinator:0}]}}static get style(){return":host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}"}},[769,"ui-affordance-scope",{nearRadius:[514,"near-radius"]},void 0,{nearRadius:[{connectCoordinator:0}]}]),c=r,d=function(){"undefined"!=typeof customElements&&["ui-affordance-scope"].forEach((e=>{"ui-affordance-scope"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))};export{c as UiAffordanceScope,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as a,h as o,c as r,t as e}from"./p-Bh_1GxOD.js";import{i}from"./p-JwSoedEO.js";const s=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}variant="outline";size;disabled=!1;slotRef;syncToButton(){const t=this.getButton();t&&(this.size?this.host.dataset.size=this.size:delete this.host.dataset.size,this.disabled?this.host.dataset.disabled="true":delete this.host.dataset.disabled,this.host.dataset.variant=this.variant,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||!i(t)||(t.preventDefault(),this.host.click())};render(){return o(r,{key:"
|
|
1
|
+
import{p as t,H as a,h as o,c as r,t as e}from"./p-Bh_1GxOD.js";import{i}from"./p-JwSoedEO.js";const s=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get host(){return this}variant="outline";size;disabled=!1;slotRef;syncToButton(){const t=this.getButton();t&&(this.size?this.host.dataset.size=this.size:delete this.host.dataset.size,this.disabled?this.host.dataset.disabled="true":delete this.host.dataset.disabled,this.host.dataset.variant=this.variant,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||!i(t)||(t.preventDefault(),this.host.click())};render(){return o(r,{key:"27af76cb5db1d0385b6450d2bb12c3bbea5822d2","data-size":this.size||void 0,"data-variant":this.variant,"data-disabled":this.disabled?"true":void 0,onKeyDown:this.onKeydown},o("slot",{key:"daeaa9a8c4e4e87e264bb1e09f1ab6bd1d53830c",ref:t=>this.slotRef=t}))}static get watchers(){return{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}}static get style(){return":host{display:inline-flex;vertical-align:middle;color:var(--ui-action-secondary-text, var(--ui-text-primary))}:host([data-variant='solid']){color:var(--ui-action-primary-text, var(--ui-text-on-accent))}:host([data-variant='outline']) ::slotted(button),::slotted(button){appearance:none;min-block-size:var(--ui-button-min-block-size, 2.5rem);border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-action-secondary-surface, 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){min-block-size:var(--ui-control-min-block-size, 2.75rem);padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-action-secondary-surface-hover, var(--ui-surface-muted));border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid']) ::slotted(button){border-color:var(--ui-action-primary-surface, var(--ui-accent-solid));background:var(--ui-action-primary-surface, var(--ui-accent-solid));color:var(--ui-action-primary-text, 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([data-variant='solid']) ::slotted(button:hover:enabled){background:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));border-color:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([data-variant='solid']) ::slotted(button:active:enabled){background:var(--ui-action-primary-surface-active, var(--ui-accent-active));border-color:var(--ui-action-primary-surface-active, var(--ui-accent-active));box-shadow:none;transform:translateY(0)}:host([data-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([data-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([data-variant='destructive']) ::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([data-variant='ghost']) ::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost']) ::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-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}:host([data-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(button:disabled){cursor:not-allowed}"}},[769,"ui-button",{variant:[1],size:[1],disabled:[516]},void 0,{variant:[{syncToButton:0}],size:[{syncToButton:0}],disabled:[{syncToButton:0}]}]),n=s,d=function(){"undefined"!=typeof customElements&&["ui-button"].forEach((t=>{"ui-button"===t&&(customElements.get(e(t))||customElements.define(e(t),s))}))};export{n as UiButton,d as defineCustomElement}
|