@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
package/editor.css
CHANGED
|
@@ -62,7 +62,8 @@
|
|
|
62
62
|
.looma-editor .ProseMirror ul,
|
|
63
63
|
.looma-editor .ProseMirror ol {
|
|
64
64
|
margin: 0 0 var(--ui-space-3);
|
|
65
|
-
|
|
65
|
+
/* Nested lists retain the browser's hierarchy; this is only the root inset. */
|
|
66
|
+
padding-inline-start: var(--ui-editor-list-inset, var(--ui-space-5));
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
.looma-editor .ProseMirror li {
|
|
@@ -77,52 +78,68 @@
|
|
|
77
78
|
font-style: italic;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
.looma-editor .ProseMirror aside[data-looma-callout] {
|
|
81
|
-
--ui-
|
|
81
|
+
.looma-editor .ProseMirror aside[data-looma-callout][data-tone] {
|
|
82
|
+
--ui-callout-padding-block: var(--ui-space-2);
|
|
83
|
+
--ui-callout-padding-inline: var(--ui-space-3);
|
|
84
|
+
--ui-callout-icon-column: 1rem;
|
|
85
|
+
--ui-callout-gap: var(--ui-space-2);
|
|
86
|
+
--ui-callout-icon-size: 1rem;
|
|
87
|
+
--ui-callout-border-width: 1px;
|
|
88
|
+
--ui-callout-leading-border-width: 4px;
|
|
89
|
+
--ui-callout-surface: var(--ui-accent-soft);
|
|
90
|
+
--ui-callout-text: var(--ui-text-primary);
|
|
91
|
+
--ui-callout-border: var(--ui-accent-solid);
|
|
92
|
+
--ui-callout-icon: var(--ui-accent-solid);
|
|
93
|
+
--ui-editor-callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4'/%3E%3Cpath d='M2 6h4'/%3E%3Cpath d='M2 10h4'/%3E%3Cpath d='M2 14h4'/%3E%3Cpath d='M2 18h4'/%3E%3Cpath d='M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z'/%3E%3C/svg%3E");
|
|
82
94
|
|
|
83
95
|
display: grid;
|
|
84
|
-
grid-template-columns:
|
|
96
|
+
grid-template-columns: var(--ui-callout-icon-column) minmax(0, 1fr);
|
|
85
97
|
align-items: start;
|
|
86
|
-
column-gap: var(--ui-
|
|
98
|
+
column-gap: var(--ui-callout-gap);
|
|
87
99
|
margin: var(--ui-space-4) 0;
|
|
88
|
-
padding: var(--ui-
|
|
89
|
-
border
|
|
100
|
+
padding: var(--ui-callout-padding-block) var(--ui-callout-padding-inline);
|
|
101
|
+
border: var(--ui-callout-border-width) solid color-mix(in srgb, var(--ui-callout-border) 35%, transparent);
|
|
102
|
+
border-inline-start: var(--ui-callout-leading-border-width) solid var(--ui-callout-border);
|
|
90
103
|
border-radius: var(--ui-radius-2);
|
|
91
|
-
background: var(--ui-
|
|
104
|
+
background: var(--ui-callout-surface);
|
|
105
|
+
color: var(--ui-callout-text);
|
|
92
106
|
}
|
|
93
107
|
|
|
94
|
-
.looma-editor .ProseMirror aside[data-looma-callout]::before {
|
|
95
|
-
width:
|
|
96
|
-
height:
|
|
108
|
+
.looma-editor .ProseMirror aside[data-looma-callout][data-tone]::before {
|
|
109
|
+
width: var(--ui-callout-icon-size);
|
|
110
|
+
height: var(--ui-callout-icon-size);
|
|
97
111
|
margin-top: 0.2em;
|
|
98
|
-
background: var(--ui-
|
|
112
|
+
background: var(--ui-callout-icon);
|
|
99
113
|
content: "";
|
|
100
114
|
mask: var(--ui-editor-callout-icon) center / contain no-repeat;
|
|
101
115
|
-webkit-mask: var(--ui-editor-callout-icon) center / contain no-repeat;
|
|
102
116
|
}
|
|
103
117
|
|
|
104
|
-
.looma-editor .ProseMirror aside[data-looma-callout] > * {
|
|
118
|
+
.looma-editor .ProseMirror aside[data-looma-callout][data-tone] > * {
|
|
105
119
|
grid-column: 2;
|
|
106
120
|
}
|
|
107
121
|
|
|
108
|
-
.looma-editor .ProseMirror aside[data-looma-callout] > :last-child {
|
|
122
|
+
.looma-editor .ProseMirror aside[data-looma-callout][data-tone] > :last-child {
|
|
109
123
|
margin-bottom: 0;
|
|
110
124
|
}
|
|
111
125
|
|
|
112
126
|
.looma-editor .ProseMirror aside[data-looma-callout][data-tone="info"] {
|
|
113
|
-
--ui-
|
|
114
|
-
--ui-
|
|
127
|
+
--ui-callout-surface: var(--ui-info-soft);
|
|
128
|
+
--ui-callout-border: var(--ui-info-solid);
|
|
129
|
+
--ui-callout-icon: var(--ui-info-solid);
|
|
115
130
|
--ui-editor-callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
|
|
116
131
|
}
|
|
117
132
|
|
|
118
133
|
.looma-editor .ProseMirror aside[data-looma-callout][data-tone="note"] {
|
|
119
|
-
--ui-
|
|
120
|
-
--ui-
|
|
134
|
+
--ui-callout-surface: var(--ui-accent-soft);
|
|
135
|
+
--ui-callout-border: var(--ui-accent-solid);
|
|
136
|
+
--ui-callout-icon: var(--ui-accent-solid);
|
|
121
137
|
}
|
|
122
138
|
|
|
123
139
|
.looma-editor .ProseMirror aside[data-looma-callout][data-tone="warning"] {
|
|
124
|
-
--ui-
|
|
125
|
-
--ui-
|
|
140
|
+
--ui-callout-surface: var(--ui-warning-soft);
|
|
141
|
+
--ui-callout-border: var(--ui-warning-solid);
|
|
142
|
+
--ui-callout-icon: var(--ui-warning-solid);
|
|
126
143
|
--ui-editor-callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
|
|
127
144
|
}
|
|
128
145
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threadlabs/looma",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Looma web components, responsive layout primitives, a complete editor, and supported Vue adapters.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,7 +67,11 @@
|
|
|
67
67
|
"./theme-high-contrast.css": "./theme-high-contrast.css",
|
|
68
68
|
"./layout.css": "./layout.css",
|
|
69
69
|
"./styles.css": "./styles.css",
|
|
70
|
-
"./editor.css": "./editor.css"
|
|
70
|
+
"./editor.css": "./editor.css",
|
|
71
|
+
"./valibot": {
|
|
72
|
+
"types": "./dist/valibot.d.ts",
|
|
73
|
+
"import": "./dist/valibot.js"
|
|
74
|
+
}
|
|
71
75
|
},
|
|
72
76
|
"files": [
|
|
73
77
|
"dist/",
|
|
@@ -101,7 +105,8 @@
|
|
|
101
105
|
"@tiptap/core": ">=2 <3",
|
|
102
106
|
"@tiptap/pm": ">=2 <3",
|
|
103
107
|
"@tiptap/vue-3": ">=2 <3",
|
|
104
|
-
"vue": "^3.5.0"
|
|
108
|
+
"vue": "^3.5.0",
|
|
109
|
+
"valibot": "^1.1.0"
|
|
105
110
|
},
|
|
106
111
|
"peerDependenciesMeta": {
|
|
107
112
|
"@tiptap/core": {
|
|
@@ -115,6 +120,9 @@
|
|
|
115
120
|
},
|
|
116
121
|
"vue": {
|
|
117
122
|
"optional": true
|
|
123
|
+
},
|
|
124
|
+
"valibot": {
|
|
125
|
+
"optional": true
|
|
118
126
|
}
|
|
119
127
|
},
|
|
120
128
|
"engines": {
|
package/styles.css
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
ui-radio-group,
|
|
18
18
|
ui-radio,
|
|
19
19
|
ui-badge,
|
|
20
|
+
ui-chip,
|
|
21
|
+
ui-callout,
|
|
20
22
|
ui-avatar,
|
|
21
23
|
ui-avatar-group,
|
|
22
24
|
ui-tree,
|
|
@@ -40,6 +42,8 @@
|
|
|
40
42
|
ui-radio-group,
|
|
41
43
|
ui-radio,
|
|
42
44
|
ui-badge,
|
|
45
|
+
ui-chip,
|
|
46
|
+
ui-callout,
|
|
43
47
|
ui-avatar,
|
|
44
48
|
ui-avatar-group,
|
|
45
49
|
ui-tree,
|
|
@@ -63,6 +67,8 @@
|
|
|
63
67
|
ui-radio-group,
|
|
64
68
|
ui-radio,
|
|
65
69
|
ui-badge,
|
|
70
|
+
ui-chip,
|
|
71
|
+
ui-callout,
|
|
66
72
|
ui-avatar,
|
|
67
73
|
ui-avatar-group,
|
|
68
74
|
ui-tree,
|
|
@@ -86,6 +92,8 @@
|
|
|
86
92
|
ui-radio-group,
|
|
87
93
|
ui-radio,
|
|
88
94
|
ui-badge,
|
|
95
|
+
ui-chip,
|
|
96
|
+
ui-callout,
|
|
89
97
|
ui-avatar,
|
|
90
98
|
ui-avatar-group,
|
|
91
99
|
ui-tree,
|
|
@@ -112,6 +120,8 @@
|
|
|
112
120
|
ui-radio-group,
|
|
113
121
|
ui-radio,
|
|
114
122
|
ui-badge,
|
|
123
|
+
ui-chip,
|
|
124
|
+
ui-callout,
|
|
115
125
|
ui-avatar,
|
|
116
126
|
ui-avatar-group,
|
|
117
127
|
ui-tree,
|
|
@@ -194,14 +204,19 @@
|
|
|
194
204
|
ui-button {
|
|
195
205
|
display: inline-flex;
|
|
196
206
|
vertical-align: middle;
|
|
197
|
-
color: var(--ui-text-primary);
|
|
207
|
+
color: var(--ui-action-secondary-text, var(--ui-text-primary));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
ui-button[variant="solid"] {
|
|
211
|
+
color: var(--ui-action-primary-text, var(--ui-text-on-accent));
|
|
198
212
|
}
|
|
199
213
|
|
|
200
214
|
ui-button > button {
|
|
201
215
|
appearance: none;
|
|
202
|
-
|
|
216
|
+
min-block-size: var(--ui-button-min-block-size, 2.5rem);
|
|
217
|
+
border: 1px solid var(--ui-control-border, var(--ui-border-default));
|
|
203
218
|
border-radius: var(--ui-button-radius, var(--ui-radius-2));
|
|
204
|
-
background: var(--ui-surface-default);
|
|
219
|
+
background: var(--ui-action-secondary-surface, var(--ui-surface-default));
|
|
205
220
|
color: inherit;
|
|
206
221
|
font: inherit;
|
|
207
222
|
font-weight: var(--ui-font-medium, 500);
|
|
@@ -223,13 +238,14 @@
|
|
|
223
238
|
}
|
|
224
239
|
|
|
225
240
|
ui-button[data-size="lg"] > button {
|
|
241
|
+
min-block-size: var(--ui-control-min-block-size, 2.75rem);
|
|
226
242
|
padding: var(--ui-space-3) var(--ui-space-4);
|
|
227
243
|
font-size: 1rem;
|
|
228
244
|
}
|
|
229
245
|
|
|
230
246
|
ui-button > button:hover:enabled {
|
|
231
|
-
background: var(--ui-surface-muted);
|
|
232
|
-
border-color: var(--ui-border-strong);
|
|
247
|
+
background: var(--ui-action-secondary-surface-hover, var(--ui-surface-muted));
|
|
248
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
233
249
|
}
|
|
234
250
|
|
|
235
251
|
ui-button > button:active:enabled {
|
|
@@ -237,22 +253,22 @@
|
|
|
237
253
|
}
|
|
238
254
|
|
|
239
255
|
ui-button[variant="solid"] > button {
|
|
240
|
-
border-color: var(--ui-accent-solid);
|
|
241
|
-
background: var(--ui-accent-solid);
|
|
242
|
-
color: var(--ui-text-on-accent);
|
|
256
|
+
border-color: var(--ui-action-primary-surface, var(--ui-accent-solid));
|
|
257
|
+
background: var(--ui-action-primary-surface, var(--ui-accent-solid));
|
|
258
|
+
color: var(--ui-action-primary-text, var(--ui-text-on-accent));
|
|
243
259
|
box-shadow: var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs));
|
|
244
260
|
}
|
|
245
261
|
|
|
246
262
|
ui-button[variant="solid"] > button:hover:enabled {
|
|
247
|
-
background: var(--ui-accent-hover);
|
|
248
|
-
border-color: var(--ui-accent-hover);
|
|
263
|
+
background: var(--ui-action-primary-surface-hover, var(--ui-accent-hover));
|
|
264
|
+
border-color: var(--ui-action-primary-surface-hover, var(--ui-accent-hover));
|
|
249
265
|
box-shadow: var(--ui-shadow-sm);
|
|
250
266
|
transform: translateY(-1px);
|
|
251
267
|
}
|
|
252
268
|
|
|
253
269
|
ui-button[variant="solid"] > button:active:enabled {
|
|
254
|
-
background: var(--ui-accent-active);
|
|
255
|
-
border-color: var(--ui-accent-active);
|
|
270
|
+
background: var(--ui-action-primary-surface-active, var(--ui-accent-active));
|
|
271
|
+
border-color: var(--ui-action-primary-surface-active, var(--ui-accent-active));
|
|
256
272
|
box-shadow: none;
|
|
257
273
|
transform: translateY(0);
|
|
258
274
|
}
|
|
@@ -299,23 +315,29 @@
|
|
|
299
315
|
outline-offset: 2px;
|
|
300
316
|
}
|
|
301
317
|
|
|
302
|
-
ui-button
|
|
303
|
-
ui-button[
|
|
318
|
+
ui-button[data-disabled="true"],
|
|
319
|
+
ui-button[disabled] {
|
|
304
320
|
opacity: 0.6;
|
|
305
321
|
cursor: not-allowed;
|
|
306
322
|
}
|
|
307
323
|
|
|
324
|
+
ui-button > button:disabled {
|
|
325
|
+
cursor: not-allowed;
|
|
326
|
+
}
|
|
327
|
+
|
|
308
328
|
ui-input {
|
|
309
329
|
display: inline-flex;
|
|
330
|
+
min-inline-size: 0;
|
|
310
331
|
color: var(--ui-text-primary);
|
|
311
332
|
}
|
|
312
333
|
|
|
313
334
|
ui-input > input {
|
|
314
335
|
width: 100%;
|
|
315
336
|
appearance: none;
|
|
316
|
-
|
|
337
|
+
min-block-size: var(--ui-control-min-block-size, 2.75rem);
|
|
338
|
+
border: 1px solid var(--ui-control-border, var(--ui-border-default));
|
|
317
339
|
border-radius: var(--ui-radius-2);
|
|
318
|
-
background: var(--ui-surface-default);
|
|
340
|
+
background: var(--ui-control-surface, var(--ui-surface-default));
|
|
319
341
|
color: inherit;
|
|
320
342
|
font: inherit;
|
|
321
343
|
line-height: var(--ui-line-height-md);
|
|
@@ -328,12 +350,12 @@
|
|
|
328
350
|
}
|
|
329
351
|
|
|
330
352
|
ui-input > input:hover:not(:focus):not(:disabled) {
|
|
331
|
-
border-color: var(--ui-border-strong);
|
|
353
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
332
354
|
}
|
|
333
355
|
|
|
334
356
|
ui-input > input:focus {
|
|
335
|
-
border-color: var(--ui-focus-ring);
|
|
336
|
-
box-shadow: 0 0 0 3px var(--ui-accent-soft);
|
|
357
|
+
border-color: var(--ui-control-focus, var(--ui-focus-ring));
|
|
358
|
+
box-shadow: 0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft));
|
|
337
359
|
}
|
|
338
360
|
|
|
339
361
|
ui-input[invalid] > input,
|
|
@@ -344,7 +366,7 @@
|
|
|
344
366
|
}
|
|
345
367
|
|
|
346
368
|
ui-input > input:disabled {
|
|
347
|
-
background: var(--ui-surface-muted);
|
|
369
|
+
background: var(--ui-control-surface-disabled, var(--ui-surface-muted));
|
|
348
370
|
color: var(--ui-text-muted);
|
|
349
371
|
cursor: not-allowed;
|
|
350
372
|
}
|
|
@@ -352,6 +374,8 @@
|
|
|
352
374
|
ui-form-field {
|
|
353
375
|
display: grid;
|
|
354
376
|
gap: var(--ui-space-2);
|
|
377
|
+
min-inline-size: 0;
|
|
378
|
+
align-content: start;
|
|
355
379
|
color: var(--ui-text-primary);
|
|
356
380
|
}
|
|
357
381
|
|
|
@@ -361,8 +385,10 @@
|
|
|
361
385
|
}
|
|
362
386
|
|
|
363
387
|
ui-form-field [data-slot="help"] {
|
|
388
|
+
min-block-size: var(--ui-form-field-help-min-block-size, 0);
|
|
364
389
|
color: var(--ui-text-muted);
|
|
365
390
|
font-size: 0.875rem;
|
|
391
|
+
line-height: var(--ui-line-height-md);
|
|
366
392
|
}
|
|
367
393
|
|
|
368
394
|
ui-form-field [data-slot="error"],
|
package/theme-high-contrast.css
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
@layer base {
|
|
2
2
|
@media (prefers-contrast: more) {
|
|
3
3
|
:root:not([data-contrast]) {
|
|
4
|
+
color-scheme: light;
|
|
5
|
+
--ui-surface-canvas: #ffffff;
|
|
6
|
+
--ui-surface-default: #ffffff;
|
|
7
|
+
--ui-surface-muted: #f8f8f6;
|
|
8
|
+
--ui-surface-subtle: #f0f0ec;
|
|
9
|
+
--ui-surface-elevated: #ffffff;
|
|
4
10
|
--ui-text-primary: #000000;
|
|
5
11
|
--ui-text-secondary: #111111;
|
|
6
12
|
--ui-text-muted: #222222;
|
|
@@ -11,6 +17,12 @@
|
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
[data-contrast="high"] {
|
|
20
|
+
color-scheme: light;
|
|
21
|
+
--ui-surface-canvas: #ffffff;
|
|
22
|
+
--ui-surface-default: #ffffff;
|
|
23
|
+
--ui-surface-muted: #f8f8f6;
|
|
24
|
+
--ui-surface-subtle: #f0f0ec;
|
|
25
|
+
--ui-surface-elevated: #ffffff;
|
|
14
26
|
--ui-text-primary: #000000;
|
|
15
27
|
--ui-text-secondary: #111111;
|
|
16
28
|
--ui-text-muted: #222222;
|
package/tokens.css
CHANGED
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
source-sans-pro,
|
|
40
40
|
sans-serif;
|
|
41
41
|
--ui-font-family-sans: var(--ui-font-stack-system);
|
|
42
|
+
/* Quiet metadata scale for compact, non-interactive component labels. */
|
|
43
|
+
--ui-font-size-2xs: 0.6875rem;
|
|
42
44
|
--ui-font-size-xs: 0.75rem;
|
|
43
45
|
--ui-font-size-sm: 0.875rem;
|
|
44
46
|
/* Dense interactive text: legible at 15px without body-copy spacing. */
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
--ui-font-semibold: 600;
|
|
57
59
|
--ui-font-bold: 700;
|
|
58
60
|
|
|
61
|
+
--ui-space-0-5: 0.125rem;
|
|
59
62
|
--ui-space-1: 0.25rem;
|
|
60
63
|
--ui-space-2: 0.5rem;
|
|
61
64
|
--ui-space-3: 0.75rem;
|
|
@@ -124,6 +127,8 @@
|
|
|
124
127
|
--ui-info-solid: #0066cc;
|
|
125
128
|
--ui-info-soft: #e8f0fb;
|
|
126
129
|
|
|
130
|
+
--ui-control-min-block-size: 2.75rem;
|
|
131
|
+
|
|
127
132
|
/* Compatibility aliases used by the editor's public styling surface.
|
|
128
133
|
Each alias resolves through the canonical semantic token so an app only
|
|
129
134
|
needs to override the canonical Looma theme contract. */
|
|
@@ -142,6 +147,27 @@
|
|
|
142
147
|
--ui-text-sm: var(--ui-font-size-sm);
|
|
143
148
|
}
|
|
144
149
|
|
|
150
|
+
/* Custom-property references resolve where declared, before inheritance.
|
|
151
|
+
Rebind semantic roles at theme boundaries to use the local palette. */
|
|
152
|
+
:root,
|
|
153
|
+
:where([data-theme], [data-contrast]) {
|
|
154
|
+
/* Semantic interaction roles. Products can theme intent without coupling
|
|
155
|
+
every component to a single brand accent. */
|
|
156
|
+
--ui-action-primary-surface: var(--ui-accent-solid);
|
|
157
|
+
--ui-action-primary-surface-hover: var(--ui-accent-hover);
|
|
158
|
+
--ui-action-primary-surface-active: var(--ui-accent-active);
|
|
159
|
+
--ui-action-primary-text: var(--ui-text-on-accent);
|
|
160
|
+
--ui-action-secondary-surface: var(--ui-surface-default);
|
|
161
|
+
--ui-action-secondary-surface-hover: var(--ui-surface-muted);
|
|
162
|
+
--ui-action-secondary-text: var(--ui-text-primary);
|
|
163
|
+
--ui-control-surface: var(--ui-surface-default);
|
|
164
|
+
--ui-control-surface-disabled: var(--ui-surface-muted);
|
|
165
|
+
--ui-control-border: var(--ui-border-default);
|
|
166
|
+
--ui-control-border-hover: var(--ui-border-strong);
|
|
167
|
+
--ui-control-focus: var(--ui-focus-ring);
|
|
168
|
+
--ui-control-focus-halo: var(--ui-accent-soft);
|
|
169
|
+
}
|
|
170
|
+
|
|
145
171
|
@supports (color: oklch(0.5 0.1 240)) {
|
|
146
172
|
:root {
|
|
147
173
|
--ui-surface-canvas: oklch(0.99 0.01 250);
|
|
@@ -94,7 +94,89 @@ function createAdapterComponent(tagName, displayName, additionalEventBindings =
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
// src/Combobox.ts
|
|
98
|
+
import { defineComponent as defineComponent2, h as h2, shallowRef as shallowRef2, watchEffect as watchEffect2 } from "vue";
|
|
99
|
+
var Combobox = defineComponent2({
|
|
100
|
+
name: "Combobox",
|
|
101
|
+
inheritAttrs: false,
|
|
102
|
+
props: {
|
|
103
|
+
label: { type: String, required: true },
|
|
104
|
+
modelValue: { type: String, default: void 0 },
|
|
105
|
+
query: { type: String, default: void 0 },
|
|
106
|
+
defaultValue: String,
|
|
107
|
+
defaultQuery: String,
|
|
108
|
+
config: { type: Object, default: () => ({}) },
|
|
109
|
+
placeholder: String,
|
|
110
|
+
name: String,
|
|
111
|
+
size: { type: String, default: "md" },
|
|
112
|
+
disabled: Boolean,
|
|
113
|
+
readOnly: Boolean,
|
|
114
|
+
required: Boolean,
|
|
115
|
+
disclosure: Boolean,
|
|
116
|
+
clearable: Boolean,
|
|
117
|
+
help: String
|
|
118
|
+
},
|
|
119
|
+
emits: {
|
|
120
|
+
"update:modelValue": (_value) => true,
|
|
121
|
+
"update:query": (_query) => true,
|
|
122
|
+
queryChange: (_detail) => true,
|
|
123
|
+
valueChange: (_detail) => true,
|
|
124
|
+
freeEntry: (_detail) => true,
|
|
125
|
+
createEntry: (_detail) => true,
|
|
126
|
+
dependencyInvalidate: (_detail) => true,
|
|
127
|
+
validationChange: (_detail) => true
|
|
128
|
+
},
|
|
129
|
+
slots: Object,
|
|
130
|
+
setup(props, { attrs, slots, emit, expose }) {
|
|
131
|
+
const element = shallowRef2();
|
|
132
|
+
const rows = shallowRef2(props.config.options ?? []);
|
|
133
|
+
watchEffect2(() => {
|
|
134
|
+
if (!element.value) return;
|
|
135
|
+
element.value.config = props.config;
|
|
136
|
+
element.value.value = props.modelValue;
|
|
137
|
+
element.value.query = props.query;
|
|
138
|
+
});
|
|
139
|
+
expose({ validate: () => element.value.validate() });
|
|
140
|
+
return () => h2("ui-combobox", {
|
|
141
|
+
...attrs,
|
|
142
|
+
...Object.fromEntries(Object.entries(props).filter(([key]) => !["modelValue", "config", "query"].includes(key))),
|
|
143
|
+
// Property binding is explicit for non-serializable config; strings remain
|
|
144
|
+
// SSR-compatible attributes until the element upgrades.
|
|
145
|
+
value: props.modelValue,
|
|
146
|
+
query: props.query,
|
|
147
|
+
"data-allow-mismatch": "class",
|
|
148
|
+
ref: element,
|
|
149
|
+
class: [attrs.class, element.value?.shadowRoot && "hydrated"],
|
|
150
|
+
"onOptions-change": (event) => {
|
|
151
|
+
rows.value = event.detail;
|
|
152
|
+
},
|
|
153
|
+
"onQuery-change": (event) => {
|
|
154
|
+
emit("update:query", event.detail.query);
|
|
155
|
+
emit("queryChange", event.detail);
|
|
156
|
+
},
|
|
157
|
+
"onValue-change": (event) => {
|
|
158
|
+
emit("update:modelValue", event.detail.value);
|
|
159
|
+
emit("valueChange", event.detail);
|
|
160
|
+
},
|
|
161
|
+
"onFree-entry": (event) => emit("freeEntry", event.detail),
|
|
162
|
+
"onCreate-entry": (event) => emit("createEntry", event.detail),
|
|
163
|
+
"onDependency-invalidate": (event) => emit("dependencyInvalidate", event.detail),
|
|
164
|
+
"onValidation-change": (event) => emit("validationChange", event.detail)
|
|
165
|
+
}, [
|
|
166
|
+
h2("label", { slot: "fallback" }, [props.label, h2("input", {
|
|
167
|
+
value: props.query ?? props.defaultQuery ?? "",
|
|
168
|
+
disabled: props.disabled,
|
|
169
|
+
readonly: props.readOnly,
|
|
170
|
+
required: props.required
|
|
171
|
+
})]),
|
|
172
|
+
...slots.option ? rows.value.map((option) => h2("div", { slot: `option-${option.id}`, key: option.id }, slots.option({ option }))) : [],
|
|
173
|
+
...["loading", "empty", "error", "create"].flatMap((name) => slots[name] ? [h2("div", { slot: name }, slots[name]({}))] : [])
|
|
174
|
+
]);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
97
178
|
// src/index.ts
|
|
179
|
+
var Combobox2 = Combobox;
|
|
98
180
|
var Stack = createAdapterComponent("ui-stack", "Stack");
|
|
99
181
|
var Inline = createAdapterComponent("ui-inline", "Inline");
|
|
100
182
|
var Cluster = createAdapterComponent("ui-cluster", "Cluster");
|
|
@@ -104,27 +186,29 @@ var Switcher = createAdapterComponent("ui-switcher", "Switcher");
|
|
|
104
186
|
var Sidebar = createAdapterComponent("ui-sidebar", "Sidebar", [], "");
|
|
105
187
|
var Reel = createAdapterComponent("ui-reel", "Reel");
|
|
106
188
|
var Separator = createAdapterComponent("ui-separator", "Separator");
|
|
107
|
-
var Disclosure = createAdapterComponent("ui-disclosure", "Disclosure");
|
|
108
|
-
var Tabs = createAdapterComponent("ui-tabs", "Tabs");
|
|
109
|
-
var Dialog = createAdapterComponent("ui-dialog", "Dialog");
|
|
110
|
-
var Popover = createAdapterComponent("ui-popover", "Popover");
|
|
111
|
-
var Menu = createAdapterComponent("ui-menu", "Menu");
|
|
189
|
+
var Disclosure = createAdapterComponent("ui-disclosure", "Disclosure", [], "class", ["open"]);
|
|
190
|
+
var Tabs = createAdapterComponent("ui-tabs", "Tabs", [], "class", ["value"]);
|
|
191
|
+
var Dialog = createAdapterComponent("ui-dialog", "Dialog", [], "class", ["open"]);
|
|
192
|
+
var Popover = createAdapterComponent("ui-popover", "Popover", [], "class", ["open"]);
|
|
193
|
+
var Menu = createAdapterComponent("ui-menu", "Menu", [], "class", ["open"]);
|
|
112
194
|
var MenuItem = createAdapterComponent("ui-menu-item", "MenuItem");
|
|
113
|
-
var ContextMenu = createAdapterComponent("ui-context-menu", "ContextMenu");
|
|
195
|
+
var ContextMenu = createAdapterComponent("ui-context-menu", "ContextMenu", [], "class", ["open"]);
|
|
114
196
|
var AffordanceScope = createAdapterComponent("ui-affordance-scope", "AffordanceScope");
|
|
115
197
|
var Button = createAdapterComponent("ui-button", "Button");
|
|
116
198
|
var IconButton = createAdapterComponent("ui-icon-button", "IconButton");
|
|
117
|
-
var Input = createAdapterComponent("ui-input", "Input");
|
|
118
|
-
var Select = createAdapterComponent("ui-select", "Select");
|
|
119
|
-
var Textarea = createAdapterComponent("ui-textarea", "Textarea");
|
|
199
|
+
var Input = createAdapterComponent("ui-input", "Input", [], "class", ["value"]);
|
|
200
|
+
var Select = createAdapterComponent("ui-select", "Select", [], "class", ["value"]);
|
|
201
|
+
var Textarea = createAdapterComponent("ui-textarea", "Textarea", [], "class", ["value"]);
|
|
120
202
|
var FormField = createAdapterComponent("ui-form-field", "FormField");
|
|
121
|
-
var Tooltip = createAdapterComponent("ui-tooltip", "Tooltip");
|
|
122
|
-
var ToastRegion = createAdapterComponent("ui-toast-region", "ToastRegion");
|
|
123
|
-
var Checkbox = createAdapterComponent("ui-checkbox", "Checkbox");
|
|
124
|
-
var Switch = createAdapterComponent("ui-switch", "Switch");
|
|
125
|
-
var RadioGroup = createAdapterComponent("ui-radio-group", "RadioGroup");
|
|
126
|
-
var Radio = createAdapterComponent("ui-radio", "Radio");
|
|
203
|
+
var Tooltip = createAdapterComponent("ui-tooltip", "Tooltip", [], "class", ["open"]);
|
|
204
|
+
var ToastRegion = createAdapterComponent("ui-toast-region", "ToastRegion", [], "class", ["open"]);
|
|
205
|
+
var Checkbox = createAdapterComponent("ui-checkbox", "Checkbox", [], "class", ["checked"]);
|
|
206
|
+
var Switch = createAdapterComponent("ui-switch", "Switch", [], "class", ["checked"]);
|
|
207
|
+
var RadioGroup = createAdapterComponent("ui-radio-group", "RadioGroup", [], "class", ["value"]);
|
|
208
|
+
var Radio = createAdapterComponent("ui-radio", "Radio", [], "class", ["checked"]);
|
|
127
209
|
var Badge = createAdapterComponent("ui-badge", "Badge");
|
|
210
|
+
var Chip = createAdapterComponent("ui-chip", "Chip");
|
|
211
|
+
var Callout = createAdapterComponent("ui-callout", "Callout");
|
|
128
212
|
var Avatar = createAdapterComponent("ui-avatar", "Avatar");
|
|
129
213
|
var AvatarGroup = createAdapterComponent("ui-avatar-group", "AvatarGroup");
|
|
130
214
|
var FloatingActionButton = createAdapterComponent(
|
|
@@ -134,9 +218,19 @@ var FloatingActionButton = createAdapterComponent(
|
|
|
134
218
|
var SearchShell = createAdapterComponent("ui-search-shell", "SearchShell");
|
|
135
219
|
var SearchResultRow = createAdapterComponent("ui-search-result-row", "SearchResultRow");
|
|
136
220
|
var TopBar = createAdapterComponent("ui-top-bar", "TopBar");
|
|
137
|
-
var Tree = createAdapterComponent("ui-tree", "Tree", [
|
|
138
|
-
|
|
221
|
+
var Tree = createAdapterComponent("ui-tree", "Tree", [
|
|
222
|
+
["reorder", "onReorder"],
|
|
223
|
+
["reorder-rejected", "onReorderRejected"]
|
|
224
|
+
]);
|
|
225
|
+
var TreeItem = createAdapterComponent(
|
|
226
|
+
"ui-tree-item",
|
|
227
|
+
"TreeItem",
|
|
228
|
+
[["expand", "onExpand"]],
|
|
229
|
+
"class",
|
|
230
|
+
["expanded"]
|
|
231
|
+
);
|
|
139
232
|
var ADAPTER_COMPONENT_TAG_MAP = {
|
|
233
|
+
Combobox: "ui-combobox",
|
|
140
234
|
Stack: "ui-stack",
|
|
141
235
|
Inline: "ui-inline",
|
|
142
236
|
Cluster: "ui-cluster",
|
|
@@ -167,6 +261,8 @@ var ADAPTER_COMPONENT_TAG_MAP = {
|
|
|
167
261
|
RadioGroup: "ui-radio-group",
|
|
168
262
|
Radio: "ui-radio",
|
|
169
263
|
Badge: "ui-badge",
|
|
264
|
+
Chip: "ui-chip",
|
|
265
|
+
Callout: "ui-callout",
|
|
170
266
|
Avatar: "ui-avatar",
|
|
171
267
|
AvatarGroup: "ui-avatar-group",
|
|
172
268
|
FloatingActionButton: "ui-floating-action-button",
|
|
@@ -181,6 +277,7 @@ var VUE_ADAPTER_NOTE = "Thin adapter only: attrs and slots pass through to custo
|
|
|
181
277
|
export {
|
|
182
278
|
toHTMLElement,
|
|
183
279
|
createAdapterComponent,
|
|
280
|
+
Combobox2 as Combobox,
|
|
184
281
|
Stack,
|
|
185
282
|
Inline,
|
|
186
283
|
Cluster,
|
|
@@ -211,6 +308,8 @@ export {
|
|
|
211
308
|
RadioGroup,
|
|
212
309
|
Radio,
|
|
213
310
|
Badge,
|
|
311
|
+
Chip,
|
|
312
|
+
Callout,
|
|
214
313
|
Avatar,
|
|
215
314
|
AvatarGroup,
|
|
216
315
|
FloatingActionButton,
|
package/vue/editor/index.d.ts
CHANGED
|
@@ -135,21 +135,11 @@ declare const EditorMentionMenu: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
135
135
|
anchorRect: SlashMenuAnchorRect | null;
|
|
136
136
|
loading: boolean;
|
|
137
137
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
138
|
-
declare const EditorToolbar: vue.DefineComponent<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
declare const
|
|
142
|
-
|
|
143
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
144
|
-
declare const EditorTableToolbar: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
145
|
-
[key: string]: any;
|
|
146
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
147
|
-
declare const EditorInsertTableGrid: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
148
|
-
[key: string]: any;
|
|
149
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
150
|
-
declare const EditorTableOverlay: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
151
|
-
[key: string]: any;
|
|
152
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
138
|
+
declare const EditorToolbar: vue.DefineComponent<Record<string, never>>;
|
|
139
|
+
declare const EditorTableContextMenu: vue.DefineComponent<Record<string, never>>;
|
|
140
|
+
declare const EditorTableToolbar: vue.DefineComponent<Record<string, never>>;
|
|
141
|
+
declare const EditorInsertTableGrid: vue.DefineComponent<Record<string, never>>;
|
|
142
|
+
declare const EditorTableOverlay: vue.DefineComponent<Record<string, never>>;
|
|
153
143
|
declare const EDITOR_ADAPTER_COMPONENT_TAG_MAP: {
|
|
154
144
|
readonly EditorToolbar: "ui-editor-toolbar";
|
|
155
145
|
readonly EditorSlashMenu: "ui-editor-slash-menu";
|