@threadlabs/looma 0.1.23 → 0.1.24
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-HNFCGIBP.js +8 -0
- package/dist/{chunk-GDMQKT5F.js → chunk-IMHSPETJ.js} +32 -30
- package/dist/chunk-NB6DBRXQ.js +323 -0
- package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
- package/dist/cjs/icons-BAdjrnhS.js +680 -0
- 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 +1 -1
- package/dist/cjs/ui-avatar-group.cjs.entry.js +9 -17
- package/dist/cjs/ui-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ui-badge.cjs.entry.js +2 -2
- package/dist/cjs/ui-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-callout.cjs.entry.js +27 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +13 -7
- package/dist/cjs/ui-chip.cjs.entry.js +19 -0
- package/dist/cjs/ui-combobox.cjs.entry.js +3 -3
- package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-dialog.cjs.entry.js +44 -8
- package/dist/cjs/ui-disclosure.cjs.entry.js +9 -6
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-form-field.cjs.entry.js +59 -4
- package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-input.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ui-menu.cjs.entry.js +14 -9
- package/dist/cjs/ui-popover.cjs.entry.js +10 -7
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio.cjs.entry.js +16 -7
- 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 +19 -10
- package/dist/cjs/ui-tabs.cjs.entry.js +10 -9
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast-region.cjs.entry.js +30 -19
- package/dist/cjs/ui-tooltip.cjs.entry.js +12 -8
- package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
- package/dist/cjs/ui-tree-item.cjs.entry.js +54 -617
- package/dist/cjs/ui-tree.cjs.entry.js +123 -11
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +1 -1
- package/dist/collection/components/ui-avatar/ui-avatar.css +4 -4
- package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +2 -2
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +8 -16
- package/dist/collection/components/ui-badge/ui-badge.css +64 -48
- 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-callout/ui-callout.css +74 -0
- package/dist/collection/components/ui-callout/ui-callout.js +59 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +16 -11
- package/dist/collection/components/ui-chip/ui-chip.css +43 -0
- package/dist/collection/components/ui-chip/ui-chip.js +45 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +3 -3
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.js +49 -13
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +12 -10
- 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 +59 -4
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
- package/dist/collection/components/ui-input/ui-input.js +1 -1
- package/dist/collection/components/ui-menu/ui-menu.css +12 -23
- package/dist/collection/components/ui-menu/ui-menu.js +16 -12
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +9 -3
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.css +14 -5
- package/dist/collection/components/ui-popover/ui-popover.js +12 -10
- package/dist/collection/components/ui-radio/ui-radio.js +24 -11
- 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 +22 -14
- package/dist/collection/components/ui-tabs/ui-tabs.js +13 -13
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +30 -19
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +16 -7
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +14 -11
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.css +2 -1
- package/dist/collection/components/ui-tree/ui-tree.js +122 -10
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +61 -44
- package/dist/collection/icons.js +6 -1
- package/dist/collection/utils/controlled-state.js +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-Bk55QiUK.js +1 -0
- package/dist/components/p-BnGhGgTH.js +1 -0
- package/dist/components/p-CoFximGM.js +13 -0
- package/dist/components/p-DIGcRYAW.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- 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-callout.d.ts +11 -0
- package/dist/components/ui-callout.js +1 -0
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-chip.d.ts +11 -0
- package/dist/components/ui-chip.js +1 -0
- package/dist/components/ui-combobox.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/components/ui-tree-item.js +1 -13
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/controlled-state-BnGhGgTH.js +6 -0
- package/dist/esm/icons-CoFximGM.js +678 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-avatar-group.entry.js +9 -17
- package/dist/esm/ui-avatar.entry.js +2 -2
- package/dist/esm/ui-badge.entry.js +2 -2
- package/dist/esm/ui-button.entry.js +1 -1
- package/dist/esm/ui-callout.entry.js +25 -0
- package/dist/esm/ui-checkbox.entry.js +13 -7
- package/dist/esm/ui-chip.entry.js +17 -0
- package/dist/esm/ui-combobox.entry.js +3 -3
- package/dist/esm/ui-context-menu.entry.js +1 -1
- package/dist/esm/ui-dialog.entry.js +44 -8
- package/dist/esm/ui-disclosure.entry.js +9 -6
- package/dist/esm/ui-floating-action-button.entry.js +1 -1
- package/dist/esm/ui-form-field.entry.js +59 -4
- package/dist/esm/ui-icon-button.entry.js +1 -1
- package/dist/esm/ui-input.entry.js +1 -1
- package/dist/esm/ui-menu-item.entry.js +2 -2
- package/dist/esm/ui-menu.entry.js +14 -9
- package/dist/esm/ui-popover.entry.js +10 -7
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-radio.entry.js +16 -7
- 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 +19 -10
- package/dist/esm/ui-tabs.entry.js +10 -9
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-toast-region.entry.js +30 -19
- package/dist/esm/ui-tooltip.entry.js +12 -8
- package/dist/esm/ui-top-bar.entry.js +1 -1
- package/dist/esm/ui-tree-item.entry.js +54 -617
- package/dist/esm/ui-tree.entry.js +123 -11
- package/dist/index.cjs +1224 -842
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +12 -2
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-03f44c45.entry.js +1 -0
- package/dist/looma/p-08f80207.entry.js +1 -0
- package/dist/looma/{p-f74e5546.entry.js → p-13f8195a.entry.js} +1 -1
- package/dist/looma/{p-5a87b59d.entry.js → p-25e18ad6.entry.js} +1 -1
- package/dist/looma/p-2c03fa73.entry.js +1 -0
- package/dist/looma/{p-ed368426.entry.js → p-314d5c7c.entry.js} +1 -1
- package/dist/looma/{p-5da09f47.entry.js → p-3ef2a21b.entry.js} +1 -1
- package/dist/looma/{p-f0487ff3.entry.js → p-5a900d89.entry.js} +1 -1
- package/dist/looma/p-5fdcee1d.entry.js +1 -0
- package/dist/looma/{p-13347631.entry.js → p-672e3d16.entry.js} +1 -1
- package/dist/looma/{p-582973b5.entry.js → p-68430534.entry.js} +1 -1
- package/dist/looma/{p-add36e74.entry.js → p-72338f53.entry.js} +1 -1
- package/dist/looma/{p-a90d2821.entry.js → p-7ab661ec.entry.js} +1 -1
- package/dist/looma/p-7c4a225f.entry.js +1 -0
- package/dist/looma/p-82f2fa3d.entry.js +1 -0
- package/dist/looma/p-839faf55.entry.js +1 -0
- package/dist/looma/{p-7e0bb7f6.entry.js → p-8e254bc4.entry.js} +1 -1
- package/dist/looma/p-8e6b1001.entry.js +1 -0
- package/dist/looma/p-920656cf.entry.js +1 -0
- package/dist/looma/{p-40fe7fee.entry.js → p-97e8cb0e.entry.js} +1 -1
- package/dist/looma/p-9d2662ca.entry.js +1 -0
- package/dist/looma/p-9e1c4020.entry.js +1 -0
- package/dist/looma/p-BnGhGgTH.js +1 -0
- package/dist/looma/p-CoFximGM.js +13 -0
- package/dist/looma/{p-8b8840b8.entry.js → p-a63e2561.entry.js} +1 -1
- package/dist/looma/p-add67e4c.entry.js +1 -0
- package/dist/looma/p-b63f6d4f.entry.js +1 -0
- package/dist/looma/p-bd00d4e8.entry.js +1 -0
- package/dist/looma/p-cc915913.entry.js +1 -0
- package/dist/looma/p-cfba8f7c.entry.js +1 -0
- package/dist/looma/p-d56571a2.entry.js +1 -0
- package/dist/looma/{p-69a5557b.entry.js → p-e0f241ab.entry.js} +1 -1
- package/dist/looma/p-f1750fd7.entry.js +1 -0
- package/dist/looma/p-fd1e4d22.entry.js +1 -0
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +1 -2
- package/dist/types/components/ui-callout/ui-callout.d.ts +6 -0
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +2 -1
- package/dist/types/components/ui-chip/ui-chip.d.ts +6 -0
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +7 -1
- package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +2 -1
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +8 -0
- package/dist/types/components/ui-menu/ui-menu.d.ts +2 -1
- package/dist/types/components/ui-popover/ui-popover.d.ts +2 -1
- package/dist/types/components/ui-radio/ui-radio.d.ts +4 -1
- package/dist/types/components/ui-switch/ui-switch.d.ts +2 -1
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +2 -1
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +3 -1
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +2 -1
- package/dist/types/components/ui-tree/ui-tree.d.ts +12 -0
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +11 -7
- package/dist/types/components.d.ts +110 -47
- package/dist/types/icons.d.ts +5 -0
- package/dist/types/utils/controlled-state.d.ts +4 -0
- package/dist/{ui-affordance-scope.entry-VO4C2MZX.js → ui-affordance-scope.entry-3TUZ6GLW.js} +2 -2
- package/dist/ui-avatar-group.entry-XGJKN25W.js +51 -0
- package/dist/{ui-avatar.entry-T6FU6ZYM.js → ui-avatar.entry-SN3G44HW.js} +3 -3
- package/dist/ui-badge.entry-B6WDCWJX.js +22 -0
- package/dist/{ui-button.entry-7UXMUGHN.js → ui-button.entry-AZYUELLV.js} +2 -2
- package/dist/ui-callout.entry-QRPWRMPC.js +32 -0
- package/dist/{ui-checkbox.entry-DMZJB3RE.js → ui-checkbox.entry-OB6GFC4M.js} +17 -8
- package/dist/ui-chip.entry-XSNPJXX3.js +22 -0
- package/dist/{ui-combobox.entry-ZCTPXEES.js → ui-combobox.entry-IIMMUJF7.js} +5 -5
- package/dist/{ui-context-menu.entry-2WMCBGCP.js → ui-context-menu.entry-AIULIE5Y.js} +5 -5
- package/dist/{ui-dialog.entry-WO23XOSW.js → ui-dialog.entry-QSYWYHLY.js} +50 -12
- package/dist/{ui-disclosure.entry-USX7OUEW.js → ui-disclosure.entry-3BJEYU3U.js} +13 -7
- package/dist/{ui-floating-action-button.entry-MXDIN7MV.js → ui-floating-action-button.entry-JEVNV6FI.js} +2 -2
- package/dist/ui-form-field.entry-PKSY7UU4.js +120 -0
- package/dist/{ui-icon-button.entry-MJUNXHBU.js → ui-icon-button.entry-TPX7BE7R.js} +2 -2
- package/dist/{ui-input.entry-AWG63YIG.js → ui-input.entry-6NCLNW4E.js} +2 -2
- package/dist/ui-menu-item.entry-KA2K3PKV.js +22 -0
- package/dist/{ui-menu.entry-IT3GW5TL.js → ui-menu.entry-7GDO5L2T.js} +22 -14
- package/dist/{ui-popover.entry-ZQQB4N6E.js → ui-popover.entry-FR6YRNK6.js} +17 -11
- package/dist/{ui-radio-group.entry-V7PCTS7I.js → ui-radio-group.entry-7QHXQSNO.js} +2 -2
- package/dist/{ui-radio.entry-JYH6TQBI.js → ui-radio.entry-YNMXKLDW.js} +20 -8
- package/dist/{ui-search-result-row.entry-JBNYXXUN.js → ui-search-result-row.entry-AHVVAAIO.js} +2 -2
- package/dist/{ui-search-shell.entry-TEAWE76O.js → ui-search-shell.entry-CNBEAMEZ.js} +2 -2
- package/dist/{ui-select.entry-F3A6TE2U.js → ui-select.entry-TUY6TCTC.js} +2 -2
- package/dist/{ui-switch.entry-MJIICMP2.js → ui-switch.entry-26LFI7B5.js} +23 -11
- package/dist/{ui-tabs.entry-6REFIUHV.js → ui-tabs.entry-LXB62RJJ.js} +14 -10
- package/dist/{ui-textarea.entry-OJTXCED7.js → ui-textarea.entry-JYGMGPX2.js} +2 -2
- package/dist/{ui-toast-region.entry-NOFXLKPS.js → ui-toast-region.entry-TOW4KZLZ.js} +32 -23
- package/dist/{ui-tooltip.entry-COWTWVHX.js → ui-tooltip.entry-SKFNYXPH.js} +19 -12
- package/dist/{ui-top-bar.entry-PIAWXJNV.js → ui-top-bar.entry-S3YP52EA.js} +2 -2
- package/dist/ui-tree-item.entry-LWYIPYLC.js +145 -0
- package/dist/{ui-tree.entry-XYI3ZFAZ.js → ui-tree.entry-LXKUQFRU.js} +114 -12
- package/editor/{chunk-QCOYOVQL.js → chunk-B5WVJOPV.js} +113 -97
- package/editor/extensions/index.d.ts +14 -6
- package/editor/extensions/index.js +1 -1
- package/editor/index.js +1 -1
- package/editor.css +37 -20
- package/package.json +1 -1
- package/styles.css +10 -0
- package/tokens.css +3 -0
- package/vue/{chunk-JLW23USW.js → chunk-D4AJULDE.js} +28 -16
- package/vue/editor/index.d.ts +5 -15
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +325 -115
- package/vue/index.js +5 -1
- package/dist/components/p-CaietZcq.js +0 -1
- package/dist/components/p-DHd18bK7.js +0 -1
- package/dist/looma/p-14c081cf.entry.js +0 -1
- package/dist/looma/p-25366205.entry.js +0 -1
- package/dist/looma/p-2e3aa869.entry.js +0 -1
- package/dist/looma/p-446cda76.entry.js +0 -1
- package/dist/looma/p-4fc1b005.entry.js +0 -13
- package/dist/looma/p-6a8a4736.entry.js +0 -1
- package/dist/looma/p-6bf4038b.entry.js +0 -1
- package/dist/looma/p-8204fee6.entry.js +0 -1
- package/dist/looma/p-8238e0dc.entry.js +0 -1
- package/dist/looma/p-99d88efb.entry.js +0 -1
- package/dist/looma/p-a27669b1.entry.js +0 -1
- package/dist/looma/p-a6ee76b7.entry.js +0 -1
- package/dist/looma/p-b6398a6b.entry.js +0 -1
- package/dist/looma/p-d50faaff.entry.js +0 -1
- package/dist/looma/p-d77278ce.entry.js +0 -1
- package/dist/looma/p-d9ec13b7.entry.js +0 -1
- package/dist/looma/p-ecf8005f.entry.js +0 -1
- package/dist/ui-avatar-group.entry-TAXJRIIU.js +0 -59
- package/dist/ui-badge.entry-MZFYNBMJ.js +0 -22
- package/dist/ui-form-field.entry-7ZCMEHPY.js +0 -67
- package/dist/ui-menu-item.entry-HFTWG62N.js +0 -22
- package/dist/ui-tree-item.entry-BSEWNL2O.js +0 -389
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
controlledOrDefault,
|
|
3
|
+
isControlled
|
|
4
|
+
} from "./chunk-HNFCGIBP.js";
|
|
1
5
|
import {
|
|
2
6
|
dispatchDetail,
|
|
3
7
|
eventToTrigger
|
|
@@ -7,7 +11,7 @@ import {
|
|
|
7
11
|
getElement,
|
|
8
12
|
h,
|
|
9
13
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IMHSPETJ.js";
|
|
11
15
|
|
|
12
16
|
// dist/esm/ui-checkbox.entry.js
|
|
13
17
|
var uiCheckboxCss = () => `: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}`;
|
|
@@ -18,7 +22,8 @@ var UICheckbox = class {
|
|
|
18
22
|
get host() {
|
|
19
23
|
return getElement(this);
|
|
20
24
|
}
|
|
21
|
-
checked
|
|
25
|
+
/** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
|
|
26
|
+
checked;
|
|
22
27
|
defaultChecked = false;
|
|
23
28
|
disabled = false;
|
|
24
29
|
indeterminate = false;
|
|
@@ -27,7 +32,8 @@ var UICheckbox = class {
|
|
|
27
32
|
internalChecked = false;
|
|
28
33
|
slotRef;
|
|
29
34
|
syncFromProp() {
|
|
30
|
-
|
|
35
|
+
if (isControlled(this.checked))
|
|
36
|
+
this.internalChecked = this.checked;
|
|
31
37
|
}
|
|
32
38
|
syncToInput() {
|
|
33
39
|
const input = this.getInput();
|
|
@@ -42,8 +48,7 @@ var UICheckbox = class {
|
|
|
42
48
|
input.value = this.value;
|
|
43
49
|
}
|
|
44
50
|
componentDidLoad() {
|
|
45
|
-
this.
|
|
46
|
-
this.internalChecked = this.internalChecked || this.defaultChecked;
|
|
51
|
+
this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
|
|
47
52
|
this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
|
|
48
53
|
this.syncToInput();
|
|
49
54
|
const input = this.getInput();
|
|
@@ -65,16 +70,20 @@ var UICheckbox = class {
|
|
|
65
70
|
const input = e.target;
|
|
66
71
|
if (!input)
|
|
67
72
|
return;
|
|
68
|
-
|
|
73
|
+
const checked = input.checked;
|
|
74
|
+
if (!isControlled(this.checked))
|
|
75
|
+
this.internalChecked = checked;
|
|
76
|
+
else
|
|
77
|
+
this.syncToInput();
|
|
69
78
|
this.indeterminate = input.indeterminate;
|
|
70
79
|
dispatchDetail(this.host, "change", {
|
|
71
|
-
checked
|
|
80
|
+
checked,
|
|
72
81
|
value: this.value,
|
|
73
82
|
trigger: eventToTrigger(e)
|
|
74
83
|
});
|
|
75
84
|
};
|
|
76
85
|
render() {
|
|
77
|
-
return h(Host, { key: "
|
|
86
|
+
return h(Host, { key: "eb46eb41a5ab871058960bd2aa1163a03144bc0f", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "ce18b1f1b63efebf048cd67b87064641cf4d915c", ref: (el) => this.slotRef = el }));
|
|
78
87
|
}
|
|
79
88
|
static get watchers() {
|
|
80
89
|
return {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Host,
|
|
3
|
+
h,
|
|
4
|
+
registerInstance
|
|
5
|
+
} from "./chunk-IMHSPETJ.js";
|
|
6
|
+
|
|
7
|
+
// dist/esm/ui-chip.entry.js
|
|
8
|
+
var 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;max-width:100%}.chip__surface{display:inline-flex;align-items:center;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;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%)}`;
|
|
9
|
+
var UIChip = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
/** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
|
|
14
|
+
appearance = "tag";
|
|
15
|
+
render() {
|
|
16
|
+
return h(Host, { key: "fe1246a1e698098f0ca9cb04e749d5adf233e50c", "data-appearance": this.appearance }, h("span", { key: "a17237699b9eb20fb0a084adbd900a3aa9bc12b0", class: "chip__surface" }, h("slot", { key: "7f4e5dcc82d360083d4ded2617fa39a9dc1fd3ef" })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
UIChip.style = uiChipCss();
|
|
20
|
+
export {
|
|
21
|
+
UIChip as ui_chip
|
|
22
|
+
};
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getElement,
|
|
12
12
|
h,
|
|
13
13
|
registerInstance
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IMHSPETJ.js";
|
|
15
15
|
|
|
16
16
|
// dist/esm/ui-combobox.entry.js
|
|
17
17
|
function formatEditingValue(raw, selection, format) {
|
|
@@ -512,20 +512,20 @@ var UICombobox = class {
|
|
|
512
512
|
const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
|
|
513
513
|
const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
|
|
514
514
|
const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
|
|
515
|
-
return h(Host, { key: "
|
|
515
|
+
return h(Host, { key: "b485462943bef9e5cb0a4b42f82888024132ab3a", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "99db32d80b0a250ff4ebea8481dda94be53df2eb", htmlFor: "input", part: "label" }, this.label, this.required ? " *" : ""), h("div", { key: "922adddf41c07215d3ec73947e8e3fe801c7ef89", class: "field", part: "field", ref: (element) => this.field = element }, h("input", { key: "557780297c5afee8112a5085984c5dd4ea1a02be", id: "input", ref: (element) => this.input = element, role: "combobox", "aria-autocomplete": "list", "aria-expanded": String(this.expanded), "aria-controls": "listbox", "aria-activedescendant": this.expanded && this.active >= 0 ? `option-${this.active}` : void 0, "aria-describedby": description, "aria-invalid": String(this.validation.status === "error"), "aria-busy": String(this.validation.status === "pending"), value: this.display, placeholder: this.placeholder, name: this.name || void 0, disabled: this.disabled, readOnly: this.readOnly, required: this.required, autoComplete: "off", part: "input", onInput: this.onInput, onKeyDown: this.onKeydown, onCompositionstart: () => this.composing = true, onCompositionend: () => {
|
|
516
516
|
this.composing = false;
|
|
517
517
|
this.onInput(new InputEvent("input"));
|
|
518
|
-
} }), this.clearable && h("button", { key: "
|
|
518
|
+
} }), this.clearable && h("button", { key: "ab180bacc7f5232eb517b7fed9bee0d62a4b1156", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
|
|
519
519
|
this.commit(null, "", null, "clear", "pointer");
|
|
520
520
|
this.close();
|
|
521
521
|
this.input?.focus();
|
|
522
|
-
} }, "\xD7"), this.help && h("button", { key: "
|
|
522
|
+
} }, "\xD7"), this.help && h("button", { key: "b4ea9b44c9e22eb9ac259fb67b86368eede2b13f", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "36222d7a98a4f6abb12f785e9b4f28c2479a4e37", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "1d8757b7c817575b6915d0e8c164e20776df83e5", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
|
|
523
523
|
if (this.expanded)
|
|
524
524
|
this.close();
|
|
525
525
|
else
|
|
526
526
|
this.open("disclosure");
|
|
527
527
|
this.input?.focus();
|
|
528
|
-
} }, h("span", { key: "
|
|
528
|
+
} }, h("span", { key: "cd2dad7694dc24104521a58d4182d6e866f54095", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "5e0eecd828a0e82d94b0be5b5f3233cddca4a87b", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "694902d8c8f58664838a943e0e2c14c856be9a08", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "81b18e296151afde18c47492aa997bdd13d553bc", id: "listbox", role: "listbox", "aria-label": `${this.label} suggestions`, "aria-busy": String(this.loading) }, groups.map((group) => h("div", { role: group ? "group" : "presentation", "aria-label": group || void 0 }, group && h("div", { class: "group", part: "group" }, group), this.rows.map((row, index) => (row.group ?? "") !== group ? null : h("div", { id: `option-${index}`, role: "option", "aria-selected": String(this.selected === row.value), "aria-disabled": String(Boolean(row.disabled)), "data-active": this.active === index ? "" : void 0, part: "option", class: "option", onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(index, "pointer") }, h("slot", { name: `option-${row.id}` }, h("span", { class: "primary", part: "option-primary" }, row.label), row.description && h("span", { class: "secondary", part: "option-secondary" }, row.description)))))), this.canCreate && h("div", { key: "dbf87523b5c6f17aedf15295d9703557f2d31524", id: `option-${this.rows.length}`, role: "option", "aria-selected": "false", class: "option", part: "option", "data-active": this.active === this.rows.length ? "" : void 0, onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(this.rows.length, "pointer") }, h("slot", { key: "bd4bdd2b132de7f72c1e5450fb0c0d16254aeedb", name: "create" }, "Create \u201C", this.raw, "\u201D"))), this.loading ? h("div", { class: "message" }, h("slot", { name: "loading" }, "Loading suggestions\u2026")) : this.lookupError ? h("div", { class: "message" }, h("slot", { name: "error" }, this.lookupError)) : !this.rows.length && !this.canCreate ? h("div", { class: "message" }, h("slot", { name: "empty" }, "No suggestions.")) : null), h("div", { key: "0d39fb1acb6d65307fabc3f502785a19710dc4af", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "a83334d72b90ca0f411e6161a8bf5e2e8c2e33a8", class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" }, status, " ", this.validation.status === "pending" ? "Checking value\u2026" : this.validation.issues.map((issue) => issue.message).join(" ")));
|
|
529
529
|
}
|
|
530
530
|
static get watchers() {
|
|
531
531
|
return {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dispatchDetail
|
|
3
|
-
} from "./chunk-UL7UIUJZ.js";
|
|
4
1
|
import {
|
|
5
2
|
closeOverlay,
|
|
6
3
|
openOverlay,
|
|
@@ -9,12 +6,15 @@ import {
|
|
|
9
6
|
import {
|
|
10
7
|
createAnchoredSurface
|
|
11
8
|
} from "./chunk-YHXJC5M5.js";
|
|
9
|
+
import {
|
|
10
|
+
dispatchDetail
|
|
11
|
+
} from "./chunk-UL7UIUJZ.js";
|
|
12
12
|
import {
|
|
13
13
|
Host,
|
|
14
14
|
getElement,
|
|
15
15
|
h,
|
|
16
16
|
registerInstance
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IMHSPETJ.js";
|
|
18
18
|
|
|
19
19
|
// dist/esm/ui-context-menu.entry.js
|
|
20
20
|
var 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}}`;
|
|
@@ -226,7 +226,7 @@ var UIContextMenu = class {
|
|
|
226
226
|
this.closeMenu("action", "pointer");
|
|
227
227
|
};
|
|
228
228
|
render() {
|
|
229
|
-
return h(Host, { key: "
|
|
229
|
+
return h(Host, { key: "5d927f41a72e680ad6d6d4a3fa0c913360cb8660", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "e5b1ec05d96093671fb839e3b81ddefb730575e1", name: "trigger" }), h("div", { key: "a0c4a8ca50bcca2b7d3ee53b4c26db054af93151", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "ac03b9dc3fa56d0cbb28115060726de4500a668b", open: this.internalOpen }, h("slot", { key: "f2d8484cb9fb3956a3a5979795633a74d423577d" }))));
|
|
230
230
|
}
|
|
231
231
|
static get watchers() {
|
|
232
232
|
return {
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dispatchDetail
|
|
3
|
-
} from "./chunk-UL7UIUJZ.js";
|
|
4
1
|
import {
|
|
5
2
|
closeOverlay,
|
|
6
3
|
openOverlay,
|
|
7
4
|
requestTopOverlayClose
|
|
8
5
|
} from "./chunk-TL4FIE7X.js";
|
|
6
|
+
import {
|
|
7
|
+
controlledOrDefault,
|
|
8
|
+
isControlled
|
|
9
|
+
} from "./chunk-HNFCGIBP.js";
|
|
10
|
+
import {
|
|
11
|
+
dispatchDetail
|
|
12
|
+
} from "./chunk-UL7UIUJZ.js";
|
|
9
13
|
import {
|
|
10
14
|
Host,
|
|
11
15
|
getElement,
|
|
12
16
|
h,
|
|
13
17
|
registerInstance
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IMHSPETJ.js";
|
|
15
19
|
|
|
16
20
|
// dist/esm/ui-dialog.entry.js
|
|
17
21
|
var uiDialogCss = () => `:host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}`;
|
|
@@ -22,17 +26,27 @@ var UIDialog = class {
|
|
|
22
26
|
get host() {
|
|
23
27
|
return getElement(this);
|
|
24
28
|
}
|
|
25
|
-
open
|
|
29
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
30
|
+
open;
|
|
26
31
|
defaultOpen = false;
|
|
27
32
|
modal = true;
|
|
28
33
|
dismissible = true;
|
|
29
34
|
/** Accessible name forwarded to the native dialog surface. */
|
|
30
35
|
label;
|
|
31
36
|
internalOpen = false;
|
|
37
|
+
accessibleLabel = "Dialog";
|
|
32
38
|
overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
|
|
33
39
|
dialogRef;
|
|
40
|
+
contentObserver = null;
|
|
34
41
|
syncFromProp() {
|
|
35
|
-
|
|
42
|
+
if (isControlled(this.open))
|
|
43
|
+
this.internalOpen = this.open;
|
|
44
|
+
}
|
|
45
|
+
syncLabelFromProp() {
|
|
46
|
+
this.syncAccessibleLabel();
|
|
47
|
+
}
|
|
48
|
+
componentWillLoad() {
|
|
49
|
+
this.syncAccessibleLabel();
|
|
36
50
|
}
|
|
37
51
|
syncOpen() {
|
|
38
52
|
if (this.dialogRef) {
|
|
@@ -52,20 +66,29 @@ var UIDialog = class {
|
|
|
52
66
|
}
|
|
53
67
|
}
|
|
54
68
|
componentDidLoad() {
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
69
|
+
this.contentObserver = new MutationObserver(this.syncAccessibleLabel);
|
|
70
|
+
this.contentObserver.observe(this.host, {
|
|
71
|
+
childList: true,
|
|
72
|
+
subtree: true,
|
|
73
|
+
characterData: true
|
|
74
|
+
});
|
|
75
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
57
76
|
this.dialogRef?.addEventListener("close", this.onDialogClose);
|
|
77
|
+
this.syncAccessibleLabel();
|
|
58
78
|
this.syncOpen();
|
|
59
79
|
}
|
|
60
80
|
disconnectedCallback() {
|
|
61
81
|
this.dialogRef?.removeEventListener("close", this.onDialogClose);
|
|
82
|
+
this.contentObserver?.disconnect();
|
|
83
|
+
this.contentObserver = null;
|
|
62
84
|
closeOverlay(this.overlayId);
|
|
63
85
|
}
|
|
64
86
|
componentDidUpdate() {
|
|
65
87
|
this.syncOpen();
|
|
66
88
|
}
|
|
67
89
|
handleRequestClose(reason, trigger) {
|
|
68
|
-
this.
|
|
90
|
+
if (!isControlled(this.open))
|
|
91
|
+
this.internalOpen = false;
|
|
69
92
|
dispatchDetail(this.host, "close", {
|
|
70
93
|
open: false,
|
|
71
94
|
reason,
|
|
@@ -74,8 +97,12 @@ var UIDialog = class {
|
|
|
74
97
|
}
|
|
75
98
|
onDialogClose = () => {
|
|
76
99
|
if (this.internalOpen) {
|
|
77
|
-
this.
|
|
78
|
-
|
|
100
|
+
if (!isControlled(this.open)) {
|
|
101
|
+
this.internalOpen = false;
|
|
102
|
+
closeOverlay(this.overlayId);
|
|
103
|
+
} else {
|
|
104
|
+
requestAnimationFrame(() => this.syncOpen());
|
|
105
|
+
}
|
|
79
106
|
dispatchDetail(this.host, "close", {
|
|
80
107
|
open: false,
|
|
81
108
|
reason: "programmatic",
|
|
@@ -88,14 +115,25 @@ var UIDialog = class {
|
|
|
88
115
|
requestTopOverlayClose("escape", "keyboard");
|
|
89
116
|
}
|
|
90
117
|
};
|
|
118
|
+
syncAccessibleLabel = () => {
|
|
119
|
+
const explicitLabel = this.label?.trim();
|
|
120
|
+
const heading = this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6');
|
|
121
|
+
const headingLabel = heading?.textContent?.trim();
|
|
122
|
+
const nextLabel = explicitLabel || headingLabel || "Dialog";
|
|
123
|
+
if (this.accessibleLabel !== nextLabel)
|
|
124
|
+
this.accessibleLabel = nextLabel;
|
|
125
|
+
};
|
|
91
126
|
render() {
|
|
92
|
-
return h(Host, { key: "
|
|
127
|
+
return h(Host, { key: "b7aa33e24a74527a58718b3fa2218f5a09e9e439", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "f24455edc404581b5040c9c0090bf64141f9e296", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.accessibleLabel }, h("slot", { key: "bad318e44b9c80dc0aae04ea5cdbb7b2ab472c35" })));
|
|
93
128
|
}
|
|
94
129
|
static get watchers() {
|
|
95
130
|
return {
|
|
96
131
|
"open": [{
|
|
97
132
|
"syncFromProp": 0
|
|
98
133
|
}],
|
|
134
|
+
"label": [{
|
|
135
|
+
"syncLabelFromProp": 0
|
|
136
|
+
}],
|
|
99
137
|
"internalOpen": [{
|
|
100
138
|
"syncOpen": 0
|
|
101
139
|
}]
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createId
|
|
3
3
|
} from "./chunk-OF57X5AR.js";
|
|
4
|
+
import {
|
|
5
|
+
controlledOrDefault,
|
|
6
|
+
isControlled
|
|
7
|
+
} from "./chunk-HNFCGIBP.js";
|
|
4
8
|
import {
|
|
5
9
|
dispatchDetail,
|
|
6
10
|
eventToTrigger,
|
|
@@ -11,7 +15,7 @@ import {
|
|
|
11
15
|
getElement,
|
|
12
16
|
h,
|
|
13
17
|
registerInstance
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IMHSPETJ.js";
|
|
15
19
|
|
|
16
20
|
// dist/esm/ui-disclosure.entry.js
|
|
17
21
|
var uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;
|
|
@@ -22,7 +26,8 @@ var UIDisclosure = class {
|
|
|
22
26
|
get host() {
|
|
23
27
|
return getElement(this);
|
|
24
28
|
}
|
|
25
|
-
open
|
|
29
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
30
|
+
open;
|
|
26
31
|
defaultOpen = false;
|
|
27
32
|
disabled = false;
|
|
28
33
|
internalOpen = false;
|
|
@@ -30,7 +35,8 @@ var UIDisclosure = class {
|
|
|
30
35
|
trigger = null;
|
|
31
36
|
content = null;
|
|
32
37
|
syncFromProp() {
|
|
33
|
-
|
|
38
|
+
if (isControlled(this.open))
|
|
39
|
+
this.internalOpen = this.open;
|
|
34
40
|
}
|
|
35
41
|
syncState() {
|
|
36
42
|
if (this.trigger) {
|
|
@@ -42,8 +48,7 @@ var UIDisclosure = class {
|
|
|
42
48
|
}
|
|
43
49
|
componentDidLoad() {
|
|
44
50
|
this.resolveParts();
|
|
45
|
-
this.
|
|
46
|
-
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
51
|
+
this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
|
|
47
52
|
this.syncState();
|
|
48
53
|
this.trigger?.addEventListener("click", this.onTriggerClick);
|
|
49
54
|
this.trigger?.addEventListener("keydown", this.onTriggerKeydown);
|
|
@@ -80,7 +85,8 @@ var UIDisclosure = class {
|
|
|
80
85
|
setOpen(next, action) {
|
|
81
86
|
if (this.internalOpen === next)
|
|
82
87
|
return;
|
|
83
|
-
this.
|
|
88
|
+
if (!isControlled(this.open))
|
|
89
|
+
this.internalOpen = next;
|
|
84
90
|
dispatchDetail(this.host, next ? "open" : "close", {
|
|
85
91
|
open: next,
|
|
86
92
|
reason: action.reason,
|
|
@@ -101,7 +107,7 @@ var UIDisclosure = class {
|
|
|
101
107
|
this.setOpen(!this.internalOpen, { reason: "action", trigger: "keyboard" });
|
|
102
108
|
};
|
|
103
109
|
render() {
|
|
104
|
-
return h(Host, { key: "
|
|
110
|
+
return h(Host, { key: "55a6fd71965104b96b55fd53870becce748a4116" }, h("slot", { key: "542727e10d335ff44fc7cf8250e80f045f89b8f2" }));
|
|
105
111
|
}
|
|
106
112
|
static get watchers() {
|
|
107
113
|
return {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IMHSPETJ.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-floating-action-button.entry.js
|
|
8
8
|
var uiFloatingActionButtonCss = () => `: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}}`;
|
|
@@ -14,7 +14,7 @@ var UIFloatingActionButton = class {
|
|
|
14
14
|
mobileOnly = false;
|
|
15
15
|
label = "";
|
|
16
16
|
render() {
|
|
17
|
-
return h(Host, { key: "
|
|
17
|
+
return h(Host, { key: "b41f0aaabbcd23cb79ac06245e69fd8ecb9c9912", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "36a023bd66d38845f1116874380d7a28bb46b5a2", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "412c41e4732cc230f84e7758bfc7faab7e0802e2" })));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
UIFloatingActionButton.style = uiFloatingActionButtonCss();
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createId
|
|
3
|
+
} from "./chunk-OF57X5AR.js";
|
|
4
|
+
import {
|
|
5
|
+
Host,
|
|
6
|
+
getElement,
|
|
7
|
+
h,
|
|
8
|
+
registerInstance
|
|
9
|
+
} from "./chunk-IMHSPETJ.js";
|
|
10
|
+
|
|
11
|
+
// dist/esm/ui-form-field.entry.js
|
|
12
|
+
var uiFormFieldCss = () => `:host{display:grid;gap:var(--ui-space-2);min-inline-size:0;align-content:start;color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){min-block-size:var(--ui-form-field-help-min-block-size, 0);color:var(--ui-text-muted);font-size:0.875rem;line-height:var(--ui-line-height-md)}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}`;
|
|
13
|
+
var UIFormField = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
registerInstance(this, hostRef);
|
|
16
|
+
}
|
|
17
|
+
get host() {
|
|
18
|
+
return getElement(this);
|
|
19
|
+
}
|
|
20
|
+
invalid = false;
|
|
21
|
+
disabled = false;
|
|
22
|
+
required = false;
|
|
23
|
+
observer = null;
|
|
24
|
+
activeInput = null;
|
|
25
|
+
ownedDescriptionIds = /* @__PURE__ */ new Set();
|
|
26
|
+
wireQueued = false;
|
|
27
|
+
componentDidLoad() {
|
|
28
|
+
this.observer = new MutationObserver(this.scheduleWire);
|
|
29
|
+
this.observer.observe(this.host, {
|
|
30
|
+
childList: true,
|
|
31
|
+
subtree: true,
|
|
32
|
+
attributes: true,
|
|
33
|
+
attributeFilter: ["aria-describedby", "data-slot", "id", "role"]
|
|
34
|
+
});
|
|
35
|
+
this.wire();
|
|
36
|
+
}
|
|
37
|
+
componentDidUpdate() {
|
|
38
|
+
this.scheduleWire();
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
this.observer?.disconnect();
|
|
42
|
+
this.observer = null;
|
|
43
|
+
this.removeOwnedDescriptions(this.activeInput);
|
|
44
|
+
this.activeInput = null;
|
|
45
|
+
this.ownedDescriptionIds.clear();
|
|
46
|
+
}
|
|
47
|
+
descriptionIds(input) {
|
|
48
|
+
return Array.from(new Set((input.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean)));
|
|
49
|
+
}
|
|
50
|
+
removeOwnedDescriptions(input) {
|
|
51
|
+
if (!input || this.ownedDescriptionIds.size === 0)
|
|
52
|
+
return;
|
|
53
|
+
const remaining = this.descriptionIds(input).filter((id) => !this.ownedDescriptionIds.has(id));
|
|
54
|
+
if (remaining.length > 0)
|
|
55
|
+
input.setAttribute("aria-describedby", remaining.join(" "));
|
|
56
|
+
else
|
|
57
|
+
input.removeAttribute("aria-describedby");
|
|
58
|
+
}
|
|
59
|
+
scheduleWire = () => {
|
|
60
|
+
if (this.wireQueued)
|
|
61
|
+
return;
|
|
62
|
+
this.wireQueued = true;
|
|
63
|
+
queueMicrotask(() => {
|
|
64
|
+
this.wireQueued = false;
|
|
65
|
+
this.wire();
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
wire() {
|
|
69
|
+
const label = this.host.querySelector("label");
|
|
70
|
+
const input = this.host.querySelector("input, textarea, select");
|
|
71
|
+
const help = this.host.querySelector('[data-slot="help"]');
|
|
72
|
+
const error = this.host.querySelector('[data-slot="error"], [role="alert"]');
|
|
73
|
+
if (input !== this.activeInput) {
|
|
74
|
+
this.removeOwnedDescriptions(this.activeInput);
|
|
75
|
+
this.activeInput = input;
|
|
76
|
+
this.ownedDescriptionIds.clear();
|
|
77
|
+
}
|
|
78
|
+
if (!input)
|
|
79
|
+
return;
|
|
80
|
+
if (!input.id) {
|
|
81
|
+
input.id = createId("form-field-input");
|
|
82
|
+
}
|
|
83
|
+
if (label && !label.getAttribute("for")) {
|
|
84
|
+
label.setAttribute("for", input.id);
|
|
85
|
+
}
|
|
86
|
+
const previousOwnedIds = this.ownedDescriptionIds;
|
|
87
|
+
const externalIds = this.descriptionIds(input).filter((id) => !previousOwnedIds.has(id));
|
|
88
|
+
const describedIds = [];
|
|
89
|
+
if (help) {
|
|
90
|
+
if (!help.id)
|
|
91
|
+
help.id = createId("form-field-help");
|
|
92
|
+
describedIds.push(help.id);
|
|
93
|
+
}
|
|
94
|
+
if (error) {
|
|
95
|
+
if (!error.id)
|
|
96
|
+
error.id = createId("form-field-error");
|
|
97
|
+
describedIds.push(error.id);
|
|
98
|
+
}
|
|
99
|
+
const nextOwnedIds = describedIds.filter((id) => !externalIds.includes(id));
|
|
100
|
+
const nextDescribedIds = Array.from(/* @__PURE__ */ new Set([...externalIds, ...describedIds]));
|
|
101
|
+
const nextDescribedBy = nextDescribedIds.join(" ");
|
|
102
|
+
if (input.getAttribute("aria-describedby") !== nextDescribedBy) {
|
|
103
|
+
if (nextDescribedBy)
|
|
104
|
+
input.setAttribute("aria-describedby", nextDescribedBy);
|
|
105
|
+
else
|
|
106
|
+
input.removeAttribute("aria-describedby");
|
|
107
|
+
}
|
|
108
|
+
this.ownedDescriptionIds = new Set(nextOwnedIds);
|
|
109
|
+
input.disabled = this.disabled;
|
|
110
|
+
input.required = this.required;
|
|
111
|
+
input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
112
|
+
}
|
|
113
|
+
render() {
|
|
114
|
+
return h(Host, { key: "0b8fd5608631b5f9159fdf99d6eba918cc6587e4", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "4ed78782bcc8b6699a40d8402994b486d71d730a", onSlotchange: this.scheduleWire }));
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
UIFormField.style = uiFormFieldCss();
|
|
118
|
+
export {
|
|
119
|
+
UIFormField as ui_form_field
|
|
120
|
+
};
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IMHSPETJ.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-icon-button.entry.js
|
|
8
8
|
var uiIconButtonCss = () => `: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)}`;
|
|
@@ -17,7 +17,7 @@ var UIIconButton = class {
|
|
|
17
17
|
/** Reveals this control through a surrounding ui-affordance-scope. */
|
|
18
18
|
anticipatory = false;
|
|
19
19
|
render() {
|
|
20
|
-
return h(Host, { key: "
|
|
20
|
+
return h(Host, { key: "fb4534d977b4812f402855f78176b8316ebace61", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "b90d290870ad76ba18de88a6b6947a15040ff12a", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "88ded6ad90a4cfeffcd687990e5ba8b0c7d3bd30" })));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
UIIconButton.style = uiIconButtonCss();
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IMHSPETJ.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-input.entry.js
|
|
13
13
|
var uiInputCss = () => `:host{display:inline-flex;min-inline-size:0;color:var(--ui-text-primary)}::slotted(input){width:100%;appearance:none;min-block-size:var(--ui-control-min-block-size, 2.75rem);border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-radius-2);background:var(--ui-control-surface, 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-control-border-hover, var(--ui-border-strong))}::slotted(input:focus){border-color:var(--ui-control-focus, var(--ui-focus-ring));box-shadow:0 0 0 3px var(--ui-control-focus-halo, 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-control-surface-disabled, 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}`;
|
|
@@ -83,7 +83,7 @@ var UIInput = class {
|
|
|
83
83
|
});
|
|
84
84
|
};
|
|
85
85
|
render() {
|
|
86
|
-
return h(Host, { key: "
|
|
86
|
+
return h(Host, { key: "fe125b4e8ec35e9ac0b0ca0434aa8439f515c51b", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "ec0609f9143435cf0436abb98488b9f30b71530b", ref: (el) => this.slotRef = el }));
|
|
87
87
|
}
|
|
88
88
|
static get watchers() {
|
|
89
89
|
return {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Host,
|
|
3
|
+
h,
|
|
4
|
+
registerInstance
|
|
5
|
+
} from "./chunk-IMHSPETJ.js";
|
|
6
|
+
|
|
7
|
+
// dist/esm/ui-menu-item.entry.js
|
|
8
|
+
var uiMenuItemCss = () => `:host{display:block;width:100%}.menu-item__surface{display:block;box-sizing:border-box;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])) .menu-item__surface{background:var(--ui-surface-subtle)}:host([aria-disabled='true']) .menu-item__surface,:host([disabled]) .menu-item__surface{opacity:0.6;cursor:not-allowed}`;
|
|
9
|
+
var UIMenuItem = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
disabled = false;
|
|
14
|
+
value = "";
|
|
15
|
+
render() {
|
|
16
|
+
return h(Host, { key: "f8a1721f8e516af04f901b53c3a66ce1de932608", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("span", { key: "6483d0b3ce1be06aed214f626b2d6a2963a44ade", class: "menu-item__surface" }, h("slot", { key: "db470b1cbb54d56a14d05c0d7f72c43e37f4263e" })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
UIMenuItem.style = uiMenuItemCss();
|
|
20
|
+
export {
|
|
21
|
+
UIMenuItem as ui_menu_item
|
|
22
|
+
};
|