@threadlabs/looma 0.1.22 → 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-NIPNHZ5W.js → chunk-IMHSPETJ.js} +65 -31
- package/dist/chunk-NB6DBRXQ.js +323 -0
- package/dist/{chunk-SZJQ3NPX.js → chunk-TL4FIE7X.js} +4 -8
- package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
- package/dist/cjs/icons-BAdjrnhS.js +680 -0
- package/dist/cjs/{index-D07f6BOw.js → index-BHG9Rpil.js} +33 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/looma.cjs.js +2 -2
- package/dist/cjs/{manager-C9j3HZay.js → manager-Ce25WRtl.js} +6 -7
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +2 -2
- package/dist/cjs/ui-avatar-group.cjs.entry.js +10 -18
- package/dist/cjs/ui-avatar.cjs.entry.js +3 -3
- package/dist/cjs/ui-badge.cjs.entry.js +3 -3
- package/dist/cjs/ui-button.cjs.entry.js +16 -5
- package/dist/cjs/ui-callout.cjs.entry.js +27 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +14 -8
- package/dist/cjs/ui-chip.cjs.entry.js +19 -0
- package/dist/cjs/ui-combobox.cjs.entry.js +541 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +3 -3
- package/dist/cjs/ui-dialog.cjs.entry.js +46 -10
- package/dist/cjs/ui-disclosure.cjs.entry.js +10 -7
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-form-field.cjs.entry.js +61 -6
- package/dist/cjs/ui-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-input.cjs.entry.js +11 -6
- package/dist/cjs/ui-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/ui-menu.cjs.entry.js +16 -11
- package/dist/cjs/ui-popover.cjs.entry.js +12 -9
- package/dist/cjs/ui-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/ui-radio.cjs.entry.js +18 -9
- package/dist/cjs/ui-search-result-row.cjs.entry.js +2 -2
- package/dist/cjs/ui-search-shell.cjs.entry.js +2 -2
- package/dist/cjs/ui-select.cjs.entry.js +15 -7
- package/dist/cjs/ui-switch.cjs.entry.js +20 -11
- package/dist/cjs/ui-tabs.cjs.entry.js +11 -10
- package/dist/cjs/ui-textarea.cjs.entry.js +10 -6
- package/dist/cjs/ui-toast-region.cjs.entry.js +31 -20
- package/dist/cjs/ui-tooltip.cjs.entry.js +63 -23
- package/dist/cjs/ui-top-bar.cjs.entry.js +2 -2
- package/dist/cjs/ui-tree-item.cjs.entry.js +57 -616
- package/dist/cjs/ui-tree.cjs.entry.js +198 -14
- package/dist/collection/collection-manifest.json +3 -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.css +36 -26
- package/dist/collection/components/ui-button/ui-button.js +14 -3
- 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.css +24 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +973 -0
- 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.css +4 -0
- 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.css +8 -6
- package/dist/collection/components/ui-input/ui-input.js +11 -7
- 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 +25 -12
- 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.css +8 -6
- package/dist/collection/components/ui-select/ui-select.js +17 -11
- 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.css +7 -6
- package/dist/collection/components/ui-textarea/ui-textarea.js +10 -7
- 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 +115 -25
- 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 +216 -12
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +84 -25
- package/dist/collection/field/combobox.js +4 -0
- package/dist/collection/field/valibot.js +5 -0
- package/dist/collection/field/validation.js +62 -0
- package/dist/collection/icons.js +6 -1
- package/dist/collection/overlay/manager.js +6 -7
- package/dist/collection/utils/controlled-state.js +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-Bh_1GxOD.js +1 -0
- package/dist/components/p-Bk55QiUK.js +1 -0
- package/dist/components/p-BnGhGgTH.js +1 -0
- package/dist/components/p-C-0syqXZ.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.d.ts +11 -0
- package/dist/components/ui-combobox.js +1 -0
- 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/{index-CEeiinfk.js → index-8BGiMGQ0.js} +33 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/looma.js +3 -3
- package/dist/esm/{manager-PM9a74r7.js → manager-C-0syqXZ.js} +6 -7
- package/dist/esm/ui-affordance-scope.entry.js +2 -2
- package/dist/esm/ui-avatar-group.entry.js +10 -18
- package/dist/esm/ui-avatar.entry.js +3 -3
- package/dist/esm/ui-badge.entry.js +3 -3
- package/dist/esm/ui-button.entry.js +16 -5
- package/dist/esm/ui-callout.entry.js +25 -0
- package/dist/esm/ui-checkbox.entry.js +14 -8
- package/dist/esm/ui-chip.entry.js +17 -0
- package/dist/esm/ui-combobox.entry.js +539 -0
- package/dist/esm/ui-context-menu.entry.js +3 -3
- package/dist/esm/ui-dialog.entry.js +46 -10
- package/dist/esm/ui-disclosure.entry.js +10 -7
- package/dist/esm/ui-floating-action-button.entry.js +2 -2
- package/dist/esm/ui-form-field.entry.js +61 -6
- package/dist/esm/ui-icon-button.entry.js +2 -2
- package/dist/esm/ui-input.entry.js +11 -6
- package/dist/esm/ui-menu-item.entry.js +3 -3
- package/dist/esm/ui-menu.entry.js +16 -11
- package/dist/esm/ui-popover.entry.js +12 -9
- package/dist/esm/ui-radio-group.entry.js +2 -2
- package/dist/esm/ui-radio.entry.js +18 -9
- package/dist/esm/ui-search-result-row.entry.js +2 -2
- package/dist/esm/ui-search-shell.entry.js +2 -2
- package/dist/esm/ui-select.entry.js +15 -7
- package/dist/esm/ui-switch.entry.js +20 -11
- package/dist/esm/ui-tabs.entry.js +11 -10
- package/dist/esm/ui-textarea.entry.js +10 -6
- package/dist/esm/ui-toast-region.entry.js +31 -20
- package/dist/esm/ui-tooltip.entry.js +63 -23
- package/dist/esm/ui-top-bar.entry.js +2 -2
- package/dist/esm/ui-tree-item.entry.js +57 -616
- package/dist/esm/ui-tree.entry.js +198 -14
- package/dist/index.cjs +2012 -870
- package/dist/index.d.cts +109 -1
- package/dist/index.d.ts +109 -1
- package/dist/index.js +72 -8
- 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-13f8195a.entry.js +1 -0
- package/dist/looma/{p-d273b857.entry.js → p-25e18ad6.entry.js} +1 -1
- package/dist/looma/p-2c03fa73.entry.js +1 -0
- package/dist/looma/p-314d5c7c.entry.js +1 -0
- package/dist/looma/{p-2ed7e241.entry.js → p-3ef2a21b.entry.js} +1 -1
- package/dist/looma/{p-063f5a89.entry.js → p-5a900d89.entry.js} +1 -1
- package/dist/looma/p-5fdcee1d.entry.js +1 -0
- package/dist/looma/{p-0198bb21.entry.js → p-672e3d16.entry.js} +1 -1
- package/dist/looma/p-68430534.entry.js +1 -0
- package/dist/looma/{p-2e6f791e.entry.js → p-72338f53.entry.js} +1 -1
- package/dist/looma/p-7ab661ec.entry.js +1 -0
- 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-8BGiMGQ0.js +2 -0
- package/dist/looma/p-8e254bc4.entry.js +1 -0
- package/dist/looma/p-8e6b1001.entry.js +1 -0
- package/dist/looma/p-920656cf.entry.js +1 -0
- package/dist/looma/p-97e8cb0e.entry.js +1 -0
- 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-C-0syqXZ.js +1 -0
- package/dist/looma/p-CoFximGM.js +13 -0
- package/dist/looma/{p-051f578c.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-7e94d90d.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-combobox/ui-combobox.d.ts +93 -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-input/ui-input.d.ts +1 -1
- 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-select/ui-select.d.ts +3 -2
- 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-textarea/ui-textarea.d.ts +1 -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 +20 -2
- package/dist/types/components/ui-tree/ui-tree.d.ts +21 -1
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +13 -5
- package/dist/types/components.d.ts +366 -71
- package/dist/types/field/combobox.d.ts +46 -0
- package/dist/types/field/valibot.d.ts +7 -0
- package/dist/types/field/validation.d.ts +56 -0
- package/dist/types/icons.d.ts +5 -0
- package/dist/types/utils/controlled-state.d.ts +4 -0
- package/dist/{ui-affordance-scope.entry-L533MECG.js → ui-affordance-scope.entry-3TUZ6GLW.js} +2 -2
- package/dist/ui-avatar-group.entry-XGJKN25W.js +51 -0
- package/dist/{ui-avatar.entry-3INAY3XP.js → ui-avatar.entry-SN3G44HW.js} +3 -3
- package/dist/ui-badge.entry-B6WDCWJX.js +22 -0
- package/dist/ui-button.entry-AZYUELLV.js +80 -0
- package/dist/ui-callout.entry-QRPWRMPC.js +32 -0
- package/dist/{ui-checkbox.entry-2PTBHSCQ.js → ui-checkbox.entry-OB6GFC4M.js} +17 -8
- package/dist/ui-chip.entry-XSNPJXX3.js +22 -0
- package/dist/ui-combobox.entry-IIMMUJF7.js +553 -0
- package/dist/{ui-context-menu.entry-AYDDCIZS.js → ui-context-menu.entry-AIULIE5Y.js} +3 -3
- package/dist/{ui-dialog.entry-I2XI3ZTZ.js → ui-dialog.entry-QSYWYHLY.js} +48 -10
- package/dist/{ui-disclosure.entry-5LY2BT7B.js → ui-disclosure.entry-3BJEYU3U.js} +13 -7
- package/dist/{ui-floating-action-button.entry-EJAMR5AM.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-7SD2LVXE.js → ui-icon-button.entry-TPX7BE7R.js} +2 -2
- package/dist/{ui-input.entry-7MM7GEQW.js → ui-input.entry-6NCLNW4E.js} +8 -6
- package/dist/ui-menu-item.entry-KA2K3PKV.js +22 -0
- package/dist/{ui-menu.entry-R4WK5QSX.js → ui-menu.entry-7GDO5L2T.js} +19 -11
- package/dist/{ui-popover.entry-ZRJRTXA7.js → ui-popover.entry-FR6YRNK6.js} +15 -9
- package/dist/{ui-radio-group.entry-S6RXHFSN.js → ui-radio-group.entry-7QHXQSNO.js} +2 -2
- package/dist/{ui-radio.entry-B73QZK2M.js → ui-radio.entry-YNMXKLDW.js} +21 -9
- package/dist/{ui-search-result-row.entry-DR2Y5S7P.js → ui-search-result-row.entry-AHVVAAIO.js} +2 -2
- package/dist/{ui-search-shell.entry-ST5IKJBC.js → ui-search-shell.entry-CNBEAMEZ.js} +2 -2
- package/dist/{ui-select.entry-7GPRFV67.js → ui-select.entry-TUY6TCTC.js} +13 -7
- package/dist/{ui-switch.entry-XQ5IRJRH.js → ui-switch.entry-26LFI7B5.js} +23 -11
- package/dist/{ui-tabs.entry-HPW5L5CY.js → ui-tabs.entry-LXB62RJJ.js} +14 -10
- package/dist/{ui-textarea.entry-W2PSRYVS.js → ui-textarea.entry-JYGMGPX2.js} +8 -6
- package/dist/{ui-toast-region.entry-FJUHFXKZ.js → ui-toast-region.entry-TOW4KZLZ.js} +29 -20
- package/dist/{ui-tooltip.entry-G5WHQW7K.js → ui-tooltip.entry-SKFNYXPH.js} +68 -25
- package/dist/{ui-top-bar.entry-3NCHFC4Y.js → ui-top-bar.entry-S3YP52EA.js} +2 -2
- package/dist/ui-tree-item.entry-LWYIPYLC.js +145 -0
- package/dist/{ui-tree.entry-SZW4Q5PY.js → ui-tree.entry-LXKUQFRU.js} +184 -13
- package/dist/valibot.d.ts +52 -0
- package/dist/valibot.js +7 -0
- 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 +11 -3
- package/styles.css +46 -20
- package/theme-high-contrast.css +12 -0
- package/tokens.css +26 -0
- package/vue/{chunk-5KWCMTXB.js → chunk-D4AJULDE.js} +116 -17
- package/vue/editor/index.d.ts +5 -15
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +447 -115
- package/vue/index.js +7 -1
- package/dist/components/p-CEYIKqYc.js +0 -1
- package/dist/components/p-CIA4RyEp.js +0 -1
- package/dist/components/p-PM9a74r7.js +0 -1
- package/dist/looma/p-0584a051.entry.js +0 -1
- package/dist/looma/p-078f9fb8.entry.js +0 -1
- package/dist/looma/p-0f45c5f0.entry.js +0 -1
- package/dist/looma/p-11083743.entry.js +0 -1
- package/dist/looma/p-1674cda4.entry.js +0 -1
- package/dist/looma/p-1681b218.entry.js +0 -1
- package/dist/looma/p-34417499.entry.js +0 -1
- package/dist/looma/p-4b422d40.entry.js +0 -1
- package/dist/looma/p-54722713.entry.js +0 -13
- package/dist/looma/p-54c41576.entry.js +0 -1
- package/dist/looma/p-5ba9d496.entry.js +0 -1
- package/dist/looma/p-5d4713a6.entry.js +0 -1
- package/dist/looma/p-624ba086.entry.js +0 -1
- package/dist/looma/p-8d5adb17.entry.js +0 -1
- package/dist/looma/p-9194a99d.entry.js +0 -1
- package/dist/looma/p-CEeiinfk.js +0 -2
- package/dist/looma/p-PM9a74r7.js +0 -1
- package/dist/looma/p-a33522a2.entry.js +0 -1
- package/dist/looma/p-a5127c7d.entry.js +0 -1
- package/dist/looma/p-a9f46811.entry.js +0 -1
- package/dist/looma/p-b7aa4488.entry.js +0 -1
- package/dist/looma/p-caa8fc7b.entry.js +0 -1
- package/dist/looma/p-e3f99a24.entry.js +0 -1
- package/dist/looma/p-ed5abf6d.entry.js +0 -1
- package/dist/ui-avatar-group.entry-BWS7E2CM.js +0 -59
- package/dist/ui-badge.entry-2WOBVOYP.js +0 -22
- package/dist/ui-button.entry-VCGSEONK.js +0 -71
- package/dist/ui-form-field.entry-SJ6NNFXB.js +0 -67
- package/dist/ui-menu-item.entry-V3HIMR75.js +0 -22
- package/dist/ui-tree-item.entry-45RR3CMP.js +0 -385
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var manager = require('./manager-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
|
+
var manager = require('./manager-Ce25WRtl.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
|
+
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
6
7
|
|
|
7
8
|
const 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}}`;
|
|
8
9
|
|
|
@@ -11,17 +12,27 @@ const UIDialog = class {
|
|
|
11
12
|
index.registerInstance(this, hostRef);
|
|
12
13
|
}
|
|
13
14
|
get host() { return index.getElement(this); }
|
|
14
|
-
open
|
|
15
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
16
|
+
open;
|
|
15
17
|
defaultOpen = false;
|
|
16
18
|
modal = true;
|
|
17
19
|
dismissible = true;
|
|
18
20
|
/** Accessible name forwarded to the native dialog surface. */
|
|
19
21
|
label;
|
|
20
22
|
internalOpen = false;
|
|
23
|
+
accessibleLabel = 'Dialog';
|
|
21
24
|
overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
|
|
22
25
|
dialogRef;
|
|
26
|
+
contentObserver = null;
|
|
23
27
|
syncFromProp() {
|
|
24
|
-
|
|
28
|
+
if (controlledState.isControlled(this.open))
|
|
29
|
+
this.internalOpen = this.open;
|
|
30
|
+
}
|
|
31
|
+
syncLabelFromProp() {
|
|
32
|
+
this.syncAccessibleLabel();
|
|
33
|
+
}
|
|
34
|
+
componentWillLoad() {
|
|
35
|
+
this.syncAccessibleLabel();
|
|
25
36
|
}
|
|
26
37
|
syncOpen() {
|
|
27
38
|
if (this.dialogRef) {
|
|
@@ -42,20 +53,29 @@ const UIDialog = class {
|
|
|
42
53
|
}
|
|
43
54
|
}
|
|
44
55
|
componentDidLoad() {
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
56
|
+
this.contentObserver = new MutationObserver(this.syncAccessibleLabel);
|
|
57
|
+
this.contentObserver.observe(this.host, {
|
|
58
|
+
childList: true,
|
|
59
|
+
subtree: true,
|
|
60
|
+
characterData: true,
|
|
61
|
+
});
|
|
62
|
+
this.internalOpen = controlledState.controlledOrDefault(this.open, this.defaultOpen);
|
|
47
63
|
this.dialogRef?.addEventListener('close', this.onDialogClose);
|
|
64
|
+
this.syncAccessibleLabel();
|
|
48
65
|
this.syncOpen();
|
|
49
66
|
}
|
|
50
67
|
disconnectedCallback() {
|
|
51
68
|
this.dialogRef?.removeEventListener('close', this.onDialogClose);
|
|
69
|
+
this.contentObserver?.disconnect();
|
|
70
|
+
this.contentObserver = null;
|
|
52
71
|
manager.closeOverlay(this.overlayId);
|
|
53
72
|
}
|
|
54
73
|
componentDidUpdate() {
|
|
55
74
|
this.syncOpen();
|
|
56
75
|
}
|
|
57
76
|
handleRequestClose(reason, trigger) {
|
|
58
|
-
this.
|
|
77
|
+
if (!controlledState.isControlled(this.open))
|
|
78
|
+
this.internalOpen = false;
|
|
59
79
|
events.dispatchDetail(this.host, 'close', {
|
|
60
80
|
open: false,
|
|
61
81
|
reason: reason,
|
|
@@ -64,8 +84,13 @@ const UIDialog = class {
|
|
|
64
84
|
}
|
|
65
85
|
onDialogClose = () => {
|
|
66
86
|
if (this.internalOpen) {
|
|
67
|
-
this.
|
|
68
|
-
|
|
87
|
+
if (!controlledState.isControlled(this.open)) {
|
|
88
|
+
this.internalOpen = false;
|
|
89
|
+
manager.closeOverlay(this.overlayId);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
requestAnimationFrame(() => this.syncOpen());
|
|
93
|
+
}
|
|
69
94
|
events.dispatchDetail(this.host, 'close', {
|
|
70
95
|
open: false,
|
|
71
96
|
reason: 'programmatic',
|
|
@@ -78,13 +103,24 @@ const UIDialog = class {
|
|
|
78
103
|
manager.requestTopOverlayClose('escape', 'keyboard');
|
|
79
104
|
}
|
|
80
105
|
};
|
|
106
|
+
syncAccessibleLabel = () => {
|
|
107
|
+
const explicitLabel = this.label?.trim();
|
|
108
|
+
const heading = this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6');
|
|
109
|
+
const headingLabel = heading?.textContent?.trim();
|
|
110
|
+
const nextLabel = explicitLabel || headingLabel || 'Dialog';
|
|
111
|
+
if (this.accessibleLabel !== nextLabel)
|
|
112
|
+
this.accessibleLabel = nextLabel;
|
|
113
|
+
};
|
|
81
114
|
render() {
|
|
82
|
-
return (index.h(index.Host, { key: '
|
|
115
|
+
return (index.h(index.Host, { key: 'b7aa33e24a74527a58718b3fa2218f5a09e9e439', "data-open": this.internalOpen ? '' : undefined, onKeyDown: this.onKeydown }, index.h("dialog", { key: 'f24455edc404581b5040c9c0090bf64141f9e296', ref: (el) => (this.dialogRef = el), open: this.internalOpen, "aria-label": this.accessibleLabel }, index.h("slot", { key: 'bad318e44b9c80dc0aae04ea5cdbb7b2ab472c35' }))));
|
|
83
116
|
}
|
|
84
117
|
static get watchers() { return {
|
|
85
118
|
"open": [{
|
|
86
119
|
"syncFromProp": 0
|
|
87
120
|
}],
|
|
121
|
+
"label": [{
|
|
122
|
+
"syncLabelFromProp": 0
|
|
123
|
+
}],
|
|
88
124
|
"internalOpen": [{
|
|
89
125
|
"syncOpen": 0
|
|
90
126
|
}]
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var id = require('./id-CYbKpaYr.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
|
+
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
6
7
|
|
|
7
8
|
const uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;
|
|
8
9
|
|
|
@@ -11,7 +12,8 @@ const UIDisclosure = class {
|
|
|
11
12
|
index.registerInstance(this, hostRef);
|
|
12
13
|
}
|
|
13
14
|
get host() { return index.getElement(this); }
|
|
14
|
-
open
|
|
15
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
16
|
+
open;
|
|
15
17
|
defaultOpen = false;
|
|
16
18
|
disabled = false;
|
|
17
19
|
internalOpen = false;
|
|
@@ -19,7 +21,8 @@ const UIDisclosure = class {
|
|
|
19
21
|
trigger = null;
|
|
20
22
|
content = null;
|
|
21
23
|
syncFromProp() {
|
|
22
|
-
|
|
24
|
+
if (controlledState.isControlled(this.open))
|
|
25
|
+
this.internalOpen = this.open;
|
|
23
26
|
}
|
|
24
27
|
syncState() {
|
|
25
28
|
if (this.trigger) {
|
|
@@ -31,8 +34,7 @@ const UIDisclosure = class {
|
|
|
31
34
|
}
|
|
32
35
|
componentDidLoad() {
|
|
33
36
|
this.resolveParts();
|
|
34
|
-
this.
|
|
35
|
-
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
37
|
+
this.internalOpen = controlledState.controlledOrDefault(this.open, this.defaultOpen);
|
|
36
38
|
this.syncState();
|
|
37
39
|
this.trigger?.addEventListener('click', this.onTriggerClick);
|
|
38
40
|
this.trigger?.addEventListener('keydown', this.onTriggerKeydown);
|
|
@@ -72,7 +74,8 @@ const UIDisclosure = class {
|
|
|
72
74
|
setOpen(next, action) {
|
|
73
75
|
if (this.internalOpen === next)
|
|
74
76
|
return;
|
|
75
|
-
this.
|
|
77
|
+
if (!controlledState.isControlled(this.open))
|
|
78
|
+
this.internalOpen = next;
|
|
76
79
|
events.dispatchDetail(this.host, next ? 'open' : 'close', {
|
|
77
80
|
open: next,
|
|
78
81
|
reason: action.reason,
|
|
@@ -93,7 +96,7 @@ const UIDisclosure = class {
|
|
|
93
96
|
this.setOpen(!this.internalOpen, { reason: 'action', trigger: 'keyboard' });
|
|
94
97
|
};
|
|
95
98
|
render() {
|
|
96
|
-
return (index.h(index.Host, { key: '
|
|
99
|
+
return (index.h(index.Host, { key: '55a6fd71965104b96b55fd53870becce748a4116' }, index.h("slot", { key: '542727e10d335ff44fc7cf8250e80f045f89b8f2' })));
|
|
97
100
|
}
|
|
98
101
|
static get watchers() { return {
|
|
99
102
|
"open": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
|
|
5
5
|
const 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}}`;
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ const UIFloatingActionButton = class {
|
|
|
12
12
|
mobileOnly = false;
|
|
13
13
|
label = '';
|
|
14
14
|
render() {
|
|
15
|
-
return (index.h(index.Host, { key: '
|
|
15
|
+
return (index.h(index.Host, { key: 'b41f0aaabbcd23cb79ac06245e69fd8ecb9c9912', "data-disabled": this.disabled ? '' : undefined }, index.h("button", { key: '36a023bd66d38845f1116874380d7a28bb46b5a2', type: "button", "aria-label": this.label || undefined, disabled: this.disabled }, index.h("slot", { key: '412c41e4732cc230f84e7758bfc7faab7e0802e2' }))));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
UIFloatingActionButton.style = uiFloatingActionButtonCss();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var id = require('./id-CYbKpaYr.js');
|
|
5
5
|
|
|
6
|
-
const uiFormFieldCss = () => `:host{display:grid;gap:var(--ui-space-2);color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){color:var(--ui-text-muted);font-size:0.875rem}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}`;
|
|
6
|
+
const 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}`;
|
|
7
7
|
|
|
8
8
|
const UIFormField = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -13,17 +13,62 @@ const UIFormField = class {
|
|
|
13
13
|
invalid = false;
|
|
14
14
|
disabled = false;
|
|
15
15
|
required = false;
|
|
16
|
+
observer = null;
|
|
17
|
+
activeInput = null;
|
|
18
|
+
ownedDescriptionIds = new Set();
|
|
19
|
+
wireQueued = false;
|
|
16
20
|
componentDidLoad() {
|
|
21
|
+
this.observer = new MutationObserver(this.scheduleWire);
|
|
22
|
+
this.observer.observe(this.host, {
|
|
23
|
+
childList: true,
|
|
24
|
+
subtree: true,
|
|
25
|
+
attributes: true,
|
|
26
|
+
attributeFilter: ['aria-describedby', 'data-slot', 'id', 'role'],
|
|
27
|
+
});
|
|
17
28
|
this.wire();
|
|
18
29
|
}
|
|
19
30
|
componentDidUpdate() {
|
|
20
|
-
this.
|
|
31
|
+
this.scheduleWire();
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this.observer?.disconnect();
|
|
35
|
+
this.observer = null;
|
|
36
|
+
this.removeOwnedDescriptions(this.activeInput);
|
|
37
|
+
this.activeInput = null;
|
|
38
|
+
this.ownedDescriptionIds.clear();
|
|
21
39
|
}
|
|
40
|
+
descriptionIds(input) {
|
|
41
|
+
return Array.from(new Set((input.getAttribute('aria-describedby') ?? '').split(/\s+/).filter(Boolean)));
|
|
42
|
+
}
|
|
43
|
+
removeOwnedDescriptions(input) {
|
|
44
|
+
if (!input || this.ownedDescriptionIds.size === 0)
|
|
45
|
+
return;
|
|
46
|
+
const remaining = this.descriptionIds(input)
|
|
47
|
+
.filter(id => !this.ownedDescriptionIds.has(id));
|
|
48
|
+
if (remaining.length > 0)
|
|
49
|
+
input.setAttribute('aria-describedby', remaining.join(' '));
|
|
50
|
+
else
|
|
51
|
+
input.removeAttribute('aria-describedby');
|
|
52
|
+
}
|
|
53
|
+
scheduleWire = () => {
|
|
54
|
+
if (this.wireQueued)
|
|
55
|
+
return;
|
|
56
|
+
this.wireQueued = true;
|
|
57
|
+
queueMicrotask(() => {
|
|
58
|
+
this.wireQueued = false;
|
|
59
|
+
this.wire();
|
|
60
|
+
});
|
|
61
|
+
};
|
|
22
62
|
wire() {
|
|
23
63
|
const label = this.host.querySelector('label');
|
|
24
64
|
const input = this.host.querySelector('input, textarea, select');
|
|
25
65
|
const help = this.host.querySelector('[data-slot="help"]');
|
|
26
66
|
const error = this.host.querySelector('[data-slot="error"], [role="alert"]');
|
|
67
|
+
if (input !== this.activeInput) {
|
|
68
|
+
this.removeOwnedDescriptions(this.activeInput);
|
|
69
|
+
this.activeInput = input;
|
|
70
|
+
this.ownedDescriptionIds.clear();
|
|
71
|
+
}
|
|
27
72
|
if (!input)
|
|
28
73
|
return;
|
|
29
74
|
if (!input.id) {
|
|
@@ -32,6 +77,9 @@ const UIFormField = class {
|
|
|
32
77
|
if (label && !label.getAttribute('for')) {
|
|
33
78
|
label.setAttribute('for', input.id);
|
|
34
79
|
}
|
|
80
|
+
const previousOwnedIds = this.ownedDescriptionIds;
|
|
81
|
+
const externalIds = this.descriptionIds(input)
|
|
82
|
+
.filter(id => !previousOwnedIds.has(id));
|
|
35
83
|
const describedIds = [];
|
|
36
84
|
if (help) {
|
|
37
85
|
if (!help.id)
|
|
@@ -43,15 +91,22 @@ const UIFormField = class {
|
|
|
43
91
|
error.id = id.createId('form-field-error');
|
|
44
92
|
describedIds.push(error.id);
|
|
45
93
|
}
|
|
46
|
-
|
|
47
|
-
|
|
94
|
+
const nextOwnedIds = describedIds.filter(id => !externalIds.includes(id));
|
|
95
|
+
const nextDescribedIds = Array.from(new Set([...externalIds, ...describedIds]));
|
|
96
|
+
const nextDescribedBy = nextDescribedIds.join(' ');
|
|
97
|
+
if (input.getAttribute('aria-describedby') !== nextDescribedBy) {
|
|
98
|
+
if (nextDescribedBy)
|
|
99
|
+
input.setAttribute('aria-describedby', nextDescribedBy);
|
|
100
|
+
else
|
|
101
|
+
input.removeAttribute('aria-describedby');
|
|
48
102
|
}
|
|
103
|
+
this.ownedDescriptionIds = new Set(nextOwnedIds);
|
|
49
104
|
input.disabled = this.disabled;
|
|
50
105
|
input.required = this.required;
|
|
51
106
|
input.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
|
|
52
107
|
}
|
|
53
108
|
render() {
|
|
54
|
-
return (index.h(index.Host, { key: '
|
|
109
|
+
return (index.h(index.Host, { key: '0b8fd5608631b5f9159fdf99d6eba918cc6587e4', "data-invalid": this.invalid ? '' : undefined, "data-disabled": this.disabled ? '' : undefined, "data-required": this.required ? '' : undefined }, index.h("slot", { key: '4ed78782bcc8b6699a40d8402994b486d71d730a', onSlotchange: this.scheduleWire })));
|
|
55
110
|
}
|
|
56
111
|
};
|
|
57
112
|
UIFormField.style = uiFormFieldCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
|
|
5
5
|
const 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)}`;
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ const UIIconButton = class {
|
|
|
15
15
|
/** Reveals this control through a surrounding ui-affordance-scope. */
|
|
16
16
|
anticipatory = false;
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h(index.Host, { key: '
|
|
18
|
+
return (index.h(index.Host, { key: 'fb4534d977b4812f402855f78176b8316ebace61', "data-disabled": this.disabled ? '' : undefined, "data-ui-affordance": this.anticipatory ? 'button' : undefined }, index.h("button", { key: 'b90d290870ad76ba18de88a6b6947a15040ff12a', type: "button", "aria-label": this.label || undefined, disabled: this.disabled }, index.h("slot", { key: '88ded6ad90a4cfeffcd687990e5ba8b0c7d3bd30' }))));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
UIIconButton.style = uiIconButtonCss();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
5
|
|
|
6
|
-
const uiInputCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(input){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(input:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(input:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(input),::slotted(input[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(input:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(input:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
6
|
+
const 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}`;
|
|
7
7
|
|
|
8
8
|
const UIInput = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
}
|
|
12
12
|
get host() { return index.getElement(this); }
|
|
13
|
-
value
|
|
13
|
+
value;
|
|
14
14
|
defaultValue = '';
|
|
15
15
|
disabled = false;
|
|
16
16
|
invalid = false;
|
|
@@ -18,14 +18,19 @@ const UIInput = class {
|
|
|
18
18
|
internalValue = '';
|
|
19
19
|
slotRef;
|
|
20
20
|
syncFromProp() {
|
|
21
|
-
this.
|
|
21
|
+
if (this.value !== undefined)
|
|
22
|
+
this.internalValue = this.value;
|
|
22
23
|
}
|
|
23
24
|
syncToInput() {
|
|
24
25
|
const input = this.getInput();
|
|
25
26
|
if (!input)
|
|
26
27
|
return;
|
|
27
28
|
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
28
|
-
|
|
29
|
+
// When the host has no value prop, the slotted native control is
|
|
30
|
+
// intentionally uncontrolled. Frameworks such as Vue can then own its
|
|
31
|
+
// value without Looma resetting it during hydration or unrelated updates.
|
|
32
|
+
if (this.value !== undefined)
|
|
33
|
+
input.value = this.internalValue;
|
|
29
34
|
input.defaultValue = this.defaultValue;
|
|
30
35
|
input.disabled = this.disabled;
|
|
31
36
|
input.readOnly = this.readOnly;
|
|
@@ -73,7 +78,7 @@ const UIInput = class {
|
|
|
73
78
|
});
|
|
74
79
|
};
|
|
75
80
|
render() {
|
|
76
|
-
return (index.h(index.Host, { key: '
|
|
81
|
+
return (index.h(index.Host, { key: 'fe125b4e8ec35e9ac0b0ca0434aa8439f515c51b', "data-invalid": this.invalid ? '' : undefined }, index.h("slot", { key: 'ec0609f9143435cf0436abb98488b9f30b71530b', ref: (el) => (this.slotRef = el) })));
|
|
77
82
|
}
|
|
78
83
|
static get watchers() { return {
|
|
79
84
|
"value": [{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
|
|
5
|
-
const uiMenuItemCss = () => `:host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
5
|
+
const 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}`;
|
|
6
6
|
|
|
7
7
|
const UIMenuItem = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -11,7 +11,7 @@ const UIMenuItem = class {
|
|
|
11
11
|
disabled = false;
|
|
12
12
|
value = '';
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, { key: '
|
|
14
|
+
return (index.h(index.Host, { key: 'f8a1721f8e516af04f901b53c3a66ce1de932608', role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? 'true' : undefined, "data-value": this.value || undefined }, index.h("span", { key: '6483d0b3ce1be06aed214f626b2d6a2963a44ade', class: "menu-item__surface" }, index.h("slot", { key: 'db470b1cbb54d56a14d05c0d7f72c43e37f4263e' }))));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
UIMenuItem.style = uiMenuItemCss();
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
|
-
var manager = require('./manager-
|
|
5
|
+
var manager = require('./manager-Ce25WRtl.js');
|
|
6
|
+
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
6
7
|
var positioning = require('./positioning-i0WrCAdF.js');
|
|
7
8
|
|
|
8
|
-
const uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)
|
|
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:var(--ui-shadow-lg)}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;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%}`;
|
|
9
10
|
|
|
10
11
|
const UIMenu = class {
|
|
11
12
|
constructor(hostRef) {
|
|
12
13
|
index.registerInstance(this, hostRef);
|
|
13
14
|
}
|
|
14
15
|
get host() { return index.getElement(this); }
|
|
15
|
-
open
|
|
16
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
17
|
+
open;
|
|
16
18
|
defaultOpen = false;
|
|
17
19
|
/** Id of the control that anchors this menu in the top layer. */
|
|
18
20
|
for;
|
|
@@ -23,7 +25,8 @@ const UIMenu = class {
|
|
|
23
25
|
anchor = null;
|
|
24
26
|
surface = null;
|
|
25
27
|
syncFromProp() {
|
|
26
|
-
|
|
28
|
+
if (controlledState.isControlled(this.open))
|
|
29
|
+
this.internalOpen = this.open;
|
|
27
30
|
}
|
|
28
31
|
resetSurface() {
|
|
29
32
|
this.setupSurface();
|
|
@@ -50,8 +53,7 @@ const UIMenu = class {
|
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
componentDidLoad() {
|
|
53
|
-
this.
|
|
54
|
-
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
56
|
+
this.internalOpen = controlledState.controlledOrDefault(this.open, this.defaultOpen);
|
|
55
57
|
this.host.addEventListener('click', this.onItemClick);
|
|
56
58
|
this.host.addEventListener('keydown', this.onKeydown);
|
|
57
59
|
this.setupSurface();
|
|
@@ -84,7 +86,8 @@ const UIMenu = class {
|
|
|
84
86
|
closeMenu(reason, trigger) {
|
|
85
87
|
if (!this.internalOpen)
|
|
86
88
|
return;
|
|
87
|
-
this.
|
|
89
|
+
if (!controlledState.isControlled(this.open))
|
|
90
|
+
this.internalOpen = false;
|
|
88
91
|
events.dispatchDetail(this.host, 'close', {
|
|
89
92
|
open: false,
|
|
90
93
|
reason: reason,
|
|
@@ -115,7 +118,8 @@ const UIMenu = class {
|
|
|
115
118
|
reason: 'action',
|
|
116
119
|
trigger: events.eventToTrigger(e),
|
|
117
120
|
});
|
|
118
|
-
this.
|
|
121
|
+
if (!controlledState.isControlled(this.open))
|
|
122
|
+
this.internalOpen = false;
|
|
119
123
|
};
|
|
120
124
|
onKeydown = (e) => {
|
|
121
125
|
if (e.key === 'Escape') {
|
|
@@ -138,7 +142,8 @@ const UIMenu = class {
|
|
|
138
142
|
reason: 'action',
|
|
139
143
|
trigger: 'keyboard',
|
|
140
144
|
});
|
|
141
|
-
this.
|
|
145
|
+
if (!controlledState.isControlled(this.open))
|
|
146
|
+
this.internalOpen = false;
|
|
142
147
|
}
|
|
143
148
|
return;
|
|
144
149
|
}
|
|
@@ -155,7 +160,7 @@ const UIMenu = class {
|
|
|
155
160
|
}
|
|
156
161
|
};
|
|
157
162
|
render() {
|
|
158
|
-
return (index.h(index.Host, { key: '
|
|
163
|
+
return (index.h(index.Host, { key: 'c5af7acaf41b75165e9f7cf47d65b7a1dcd4d1c0', role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? '' : undefined }, index.h("div", { key: '058fff9a00a1dcba26f6db425096e7a96d889896', class: "menu__surface" }, index.h("slot", { key: 'dbbf9eb4ba2a348b6d85049e229ed0562ee17318' }))));
|
|
159
164
|
}
|
|
160
165
|
static get watchers() { return {
|
|
161
166
|
"open": [{
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var manager = require('./manager-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
|
+
var manager = require('./manager-Ce25WRtl.js');
|
|
5
5
|
var events = require('./events-TcQIzpNv.js');
|
|
6
|
+
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
6
7
|
var positioning = require('./positioning-i0WrCAdF.js');
|
|
7
8
|
|
|
8
|
-
const uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);
|
|
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:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.popover__surface{box-sizing:border-box;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}: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}}`;
|
|
9
10
|
|
|
10
11
|
const UIPopover = class {
|
|
11
12
|
constructor(hostRef) {
|
|
12
13
|
index.registerInstance(this, hostRef);
|
|
13
14
|
}
|
|
14
15
|
get host() { return index.getElement(this); }
|
|
15
|
-
open
|
|
16
|
+
/** Controlled open state. Omit it to use defaultOpen and local interaction state. */
|
|
17
|
+
open;
|
|
16
18
|
defaultOpen = false;
|
|
17
19
|
/** Optional id of the element this popover follows in the top layer. */
|
|
18
20
|
for;
|
|
@@ -22,7 +24,8 @@ const UIPopover = class {
|
|
|
22
24
|
anchor = null;
|
|
23
25
|
surface = null;
|
|
24
26
|
syncFromProp() {
|
|
25
|
-
|
|
27
|
+
if (controlledState.isControlled(this.open))
|
|
28
|
+
this.internalOpen = this.open;
|
|
26
29
|
}
|
|
27
30
|
onOpenChange() {
|
|
28
31
|
this.syncOverlay();
|
|
@@ -81,8 +84,7 @@ const UIPopover = class {
|
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
componentDidLoad() {
|
|
84
|
-
this.
|
|
85
|
-
this.internalOpen = this.internalOpen || this.defaultOpen;
|
|
87
|
+
this.internalOpen = controlledState.controlledOrDefault(this.open, this.defaultOpen);
|
|
86
88
|
this.host.addEventListener('keydown', this.onKeydown);
|
|
87
89
|
this.setupSurface();
|
|
88
90
|
this.syncOverlay();
|
|
@@ -97,7 +99,8 @@ const UIPopover = class {
|
|
|
97
99
|
this.syncOverlay();
|
|
98
100
|
}
|
|
99
101
|
handleRequestClose(reason, trigger) {
|
|
100
|
-
this.
|
|
102
|
+
if (!controlledState.isControlled(this.open))
|
|
103
|
+
this.internalOpen = false;
|
|
101
104
|
events.dispatchDetail(this.host, 'close', {
|
|
102
105
|
open: false,
|
|
103
106
|
reason: reason,
|
|
@@ -110,7 +113,7 @@ const UIPopover = class {
|
|
|
110
113
|
}
|
|
111
114
|
};
|
|
112
115
|
render() {
|
|
113
|
-
return (index.h(index.Host, { key: '
|
|
116
|
+
return (index.h(index.Host, { key: '6a38873f2e4d085f733fa116057b1f55418e23ed', "data-open": this.internalOpen ? '' : undefined, onKeyDown: this.onKeydown }, index.h("div", { key: '6fef6e37921e8c52994617719f1ebb6d9bd54ee2', class: "popover__surface" }, index.h("slot", { key: '5ee4269592219035a3185f8f06fd71ecb12e4e71' }))));
|
|
114
117
|
}
|
|
115
118
|
static get watchers() { return {
|
|
116
119
|
"open": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
5
|
|
|
6
6
|
const uiRadioGroupCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2)}:host([data-orientation='vertical']){display:inline-grid;justify-items:start}`;
|
|
@@ -109,7 +109,7 @@ const UIRadioGroup = class {
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
render() {
|
|
112
|
-
return (index.h(index.Host, { key: '
|
|
112
|
+
return (index.h(index.Host, { key: '28c6eb6cc9520b570f40d2193d0c64a7a6c7db01', role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? '' : undefined }, index.h("slot", { key: '97814378181be78bfac6090ff173459e1f539728' })));
|
|
113
113
|
}
|
|
114
114
|
static get watchers() { return {
|
|
115
115
|
"value": [{
|