@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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { FieldFormatter, FieldIssue, FieldValidation } from './validation';
|
|
2
|
+
export interface ComboboxOption<Metadata = unknown> {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
metadata?: Metadata;
|
|
8
|
+
group?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface ComboboxRequest<Context = unknown> {
|
|
12
|
+
query: string;
|
|
13
|
+
context: Context;
|
|
14
|
+
signal: AbortSignal;
|
|
15
|
+
reason: 'input' | 'disclosure' | 'context';
|
|
16
|
+
}
|
|
17
|
+
export type ComboboxProvider = (request: ComboboxRequest) => readonly ComboboxOption[] | Promise<readonly ComboboxOption[]>;
|
|
18
|
+
/** Map domain records at the boundary, preserving typed metadata for rich rows. */
|
|
19
|
+
export declare function mapComboboxOptions<T>(rows: readonly T[], map: (row: T) => Omit<ComboboxOption<T>, 'metadata'>): ComboboxOption<T>[];
|
|
20
|
+
export interface ComboboxConfig extends FieldValidation {
|
|
21
|
+
options?: readonly ComboboxOption[];
|
|
22
|
+
provider?: ComboboxProvider;
|
|
23
|
+
filter?: (option: ComboboxOption, query: string, context: unknown) => boolean;
|
|
24
|
+
context?: unknown;
|
|
25
|
+
invalidation?: 'clear' | 'retain-query' | 'retain';
|
|
26
|
+
debounce?: number;
|
|
27
|
+
allowFreeText?: boolean;
|
|
28
|
+
allowCreate?: boolean;
|
|
29
|
+
format?: FieldFormatter;
|
|
30
|
+
formatOn?: 'input' | 'blur';
|
|
31
|
+
validateOn?: 'input' | 'blur' | 'submit';
|
|
32
|
+
}
|
|
33
|
+
export interface ComboboxChange {
|
|
34
|
+
value: string | null;
|
|
35
|
+
query: string;
|
|
36
|
+
option: ComboboxOption | null;
|
|
37
|
+
kind: 'selection' | 'clear' | 'free-entry' | 'create' | 'invalidation';
|
|
38
|
+
trigger: 'keyboard' | 'pointer' | 'programmatic';
|
|
39
|
+
}
|
|
40
|
+
export interface ComboboxValidationState {
|
|
41
|
+
status: 'pristine' | 'pending' | 'valid' | 'warning' | 'error';
|
|
42
|
+
touched: boolean;
|
|
43
|
+
dirty: boolean;
|
|
44
|
+
issues: readonly FieldIssue[];
|
|
45
|
+
output?: unknown;
|
|
46
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GenericSchema, GenericSchemaAsync, InferOutput } from 'valibot';
|
|
2
|
+
import type { FieldSchema, FieldValidation } from './validation';
|
|
3
|
+
/** Valibot's Standard Schema implementation preserves async transforms and issue paths.
|
|
4
|
+
* Type-only Valibot imports keep the adapter free of a schema-library runtime. */
|
|
5
|
+
export declare function valibotField<T extends GenericSchema | GenericSchemaAsync>(schema: T, options?: Omit<FieldValidation, 'schema'>): FieldValidation & {
|
|
6
|
+
schema: FieldSchema<InferOutput<T>>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** Structural Standard Schema v1 boundary; no schema-library runtime dependency. */
|
|
2
|
+
export interface FieldSchema<Output = unknown> {
|
|
3
|
+
readonly '~standard': {
|
|
4
|
+
readonly version: 1;
|
|
5
|
+
readonly vendor: string;
|
|
6
|
+
readonly validate: (value: unknown) => FieldSchemaResult<Output> | Promise<FieldSchemaResult<Output>>;
|
|
7
|
+
readonly types?: {
|
|
8
|
+
readonly input: unknown;
|
|
9
|
+
readonly output: Output;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface FieldIssue {
|
|
14
|
+
readonly message: string;
|
|
15
|
+
readonly path?: ReadonlyArray<PropertyKey | {
|
|
16
|
+
readonly key: PropertyKey;
|
|
17
|
+
}>;
|
|
18
|
+
readonly severity?: 'error' | 'warning';
|
|
19
|
+
}
|
|
20
|
+
export type FieldSchemaResult<T = unknown> = {
|
|
21
|
+
readonly value: T;
|
|
22
|
+
readonly issues?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
readonly issues: readonly FieldIssue[];
|
|
25
|
+
};
|
|
26
|
+
export interface FieldRequest<Context = unknown> {
|
|
27
|
+
raw: string;
|
|
28
|
+
value: string | null;
|
|
29
|
+
context: Context;
|
|
30
|
+
signal: AbortSignal;
|
|
31
|
+
}
|
|
32
|
+
export interface FieldResult<Output = unknown> {
|
|
33
|
+
output?: Output;
|
|
34
|
+
issues: readonly FieldIssue[];
|
|
35
|
+
}
|
|
36
|
+
export interface FieldValidation {
|
|
37
|
+
schema?: FieldSchema;
|
|
38
|
+
parse?: (raw: string, request: FieldRequest) => unknown | Promise<unknown>;
|
|
39
|
+
normalize?: (value: unknown, request: FieldRequest) => unknown | Promise<unknown>;
|
|
40
|
+
validator?: (value: unknown, request: FieldRequest) => Partial<FieldResult> | Promise<Partial<FieldResult>>;
|
|
41
|
+
issues?: readonly FieldIssue[];
|
|
42
|
+
}
|
|
43
|
+
export interface FieldSelection {
|
|
44
|
+
start: number;
|
|
45
|
+
end: number;
|
|
46
|
+
direction?: 'forward' | 'backward' | 'none';
|
|
47
|
+
}
|
|
48
|
+
export interface FieldFormat {
|
|
49
|
+
display: string;
|
|
50
|
+
selection: FieldSelection;
|
|
51
|
+
}
|
|
52
|
+
export type FieldFormatter = (raw: string, selection: FieldSelection) => FieldFormat | undefined;
|
|
53
|
+
/** Formatting is additive: every original character must survive in order.
|
|
54
|
+
* Normalization belongs to submitted output, never the visible editing buffer. */
|
|
55
|
+
export declare function formatEditingValue(raw: string, selection: FieldSelection, format?: FieldFormatter): FieldFormat;
|
|
56
|
+
export declare function validateField(request: FieldRequest, config: FieldValidation): Promise<FieldResult>;
|
package/dist/types/icons.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const LOOMA_ICONS: {
|
|
|
6
6
|
'align-right': IconNode;
|
|
7
7
|
bold: IconNode;
|
|
8
8
|
braces: IconNode;
|
|
9
|
+
'circle-check': IconNode;
|
|
10
|
+
'circle-x': IconNode;
|
|
9
11
|
'chevron-down': IconNode;
|
|
10
12
|
'chevron-left': IconNode;
|
|
11
13
|
'code-xml': IconNode;
|
|
@@ -19,11 +21,13 @@ export declare const LOOMA_ICONS: {
|
|
|
19
21
|
'heading-3': IconNode;
|
|
20
22
|
highlighter: IconNode;
|
|
21
23
|
image: IconNode;
|
|
24
|
+
info: IconNode;
|
|
22
25
|
italic: IconNode;
|
|
23
26
|
list: IconNode;
|
|
24
27
|
'list-ordered': IconNode;
|
|
25
28
|
'list-todo': IconNode;
|
|
26
29
|
merge: IconNode;
|
|
30
|
+
'notebook-pen': IconNode;
|
|
27
31
|
minus: IconNode;
|
|
28
32
|
'paint-bucket': IconNode;
|
|
29
33
|
'panel-bottom': IconNode;
|
|
@@ -39,6 +43,7 @@ export declare const LOOMA_ICONS: {
|
|
|
39
43
|
strikethrough: IconNode;
|
|
40
44
|
table: IconNode;
|
|
41
45
|
trash: IconNode;
|
|
46
|
+
'triangle-alert': IconNode;
|
|
42
47
|
underline: IconNode;
|
|
43
48
|
undo: IconNode;
|
|
44
49
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** A state prop is controlled only when the consumer supplies a value. */
|
|
2
|
+
export declare const isControlled: <T>(value: T | undefined) => value is T;
|
|
3
|
+
/** Defaults apply only when a corresponding controlled prop is omitted. */
|
|
4
|
+
export declare const controlledOrDefault: <T>(value: T | undefined, defaultValue: T) => T;
|
package/dist/{ui-affordance-scope.entry-L533MECG.js → ui-affordance-scope.entry-3TUZ6GLW.js}
RENAMED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getElement,
|
|
8
8
|
h,
|
|
9
9
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IMHSPETJ.js";
|
|
11
11
|
|
|
12
12
|
// dist/esm/ui-affordance-scope.entry.js
|
|
13
13
|
var uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
|
|
@@ -38,7 +38,7 @@ var UIAffordanceScope = class {
|
|
|
38
38
|
this.coordinator?.refresh();
|
|
39
39
|
};
|
|
40
40
|
render() {
|
|
41
|
-
return h(Host, { key: "
|
|
41
|
+
return h(Host, { key: "f500fa48554ed6224efd2dbe9632880bf0a15a19" }, h("slot", { key: "37c5c5b7925b260ff8f9edd411ee6c90a12a4909", onSlotchange: this.onSlotChange }));
|
|
42
42
|
}
|
|
43
43
|
static get watchers() {
|
|
44
44
|
return {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Host,
|
|
3
|
+
getElement,
|
|
4
|
+
h,
|
|
5
|
+
registerInstance
|
|
6
|
+
} from "./chunk-IMHSPETJ.js";
|
|
7
|
+
|
|
8
|
+
// dist/esm/ui-avatar-group.entry.js
|
|
9
|
+
var uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
|
|
10
|
+
var UIAvatarGroup = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
registerInstance(this, hostRef);
|
|
13
|
+
}
|
|
14
|
+
get host() {
|
|
15
|
+
return getElement(this);
|
|
16
|
+
}
|
|
17
|
+
max = 5;
|
|
18
|
+
label = "People";
|
|
19
|
+
overflowCount = 0;
|
|
20
|
+
syncOverflow() {
|
|
21
|
+
this.updateOverflow();
|
|
22
|
+
}
|
|
23
|
+
componentDidLoad() {
|
|
24
|
+
this.updateOverflow();
|
|
25
|
+
}
|
|
26
|
+
visibleLimit() {
|
|
27
|
+
return Number.isFinite(this.max) ? Math.max(0, Math.floor(this.max)) : 0;
|
|
28
|
+
}
|
|
29
|
+
updateOverflow() {
|
|
30
|
+
const children = Array.from(this.host.children);
|
|
31
|
+
const total = children.length;
|
|
32
|
+
const visibleLimit = this.visibleLimit();
|
|
33
|
+
const overflowCount = total > visibleLimit ? total - visibleLimit : 0;
|
|
34
|
+
if (this.overflowCount !== overflowCount)
|
|
35
|
+
this.overflowCount = overflowCount;
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return h(Host, { key: "9ba6693cabc379bbbe6f5698160481f27fe02f31", role: "group", "aria-label": this.label || void 0 }, h("style", { key: "ed231fe96c16a3cdd5a66d4828664c75c6959a9e" }, `::slotted(:nth-child(n + ${this.visibleLimit() + 1})) { display: none !important; }`), h("slot", { key: "463005a7f3c498c80c768151ab32c873ff1abf86", onSlotchange: () => this.updateOverflow() }), this.overflowCount > 0 && h("span", { key: "dc1ba88fd97ca461e6518d223f00a93416e6d0f0", class: "overflow", role: "img", "aria-label": `${this.overflowCount} more ${this.overflowCount === 1 ? "person" : "people"}`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
|
|
39
|
+
}
|
|
40
|
+
static get watchers() {
|
|
41
|
+
return {
|
|
42
|
+
"max": [{
|
|
43
|
+
"syncOverflow": 0
|
|
44
|
+
}]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
UIAvatarGroup.style = uiAvatarGroupCss();
|
|
49
|
+
export {
|
|
50
|
+
UIAvatarGroup as ui_avatar_group
|
|
51
|
+
};
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Host,
|
|
3
3
|
h,
|
|
4
4
|
registerInstance
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IMHSPETJ.js";
|
|
6
6
|
|
|
7
7
|
// dist/esm/ui-avatar.entry.js
|
|
8
8
|
function toInitials(value) {
|
|
@@ -13,7 +13,7 @@ function toInitials(value) {
|
|
|
13
13
|
return tokens[0].slice(0, 2).toUpperCase();
|
|
14
14
|
return `${tokens[0][0] ?? ""}${tokens[1][0] ?? ""}`.toUpperCase();
|
|
15
15
|
}
|
|
16
|
-
var uiAvatarCss = () => `:host{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar
|
|
16
|
+
var uiAvatarCss = () => `:host{display:inline-flex}.avatar{display:inline-grid;place-items:center;overflow:hidden;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.875rem;font-weight:600;text-transform:uppercase}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}`;
|
|
17
17
|
var UIAvatar = class {
|
|
18
18
|
constructor(hostRef) {
|
|
19
19
|
registerInstance(this, hostRef);
|
|
@@ -35,7 +35,7 @@ var UIAvatar = class {
|
|
|
35
35
|
render() {
|
|
36
36
|
const fallbackText = this.fallback || toInitials(this.name || this.alt);
|
|
37
37
|
const label = this.alt || this.name || "Avatar";
|
|
38
|
-
return h(Host, { key: "
|
|
38
|
+
return h(Host, { key: "bbe6c3a775702022a19d819a6cc9d81d798cb3e1", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "63402327ba5bde122bf5deaea09baf965ee9b047", class: "avatar" }, h("img", { key: "e52b86773684b80d76efa459cb03ae40881f959b", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "82a6d8f0d0c69ca52f81d092a2292fc80238265b", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
|
|
39
39
|
}
|
|
40
40
|
static get watchers() {
|
|
41
41
|
return {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Host,
|
|
3
|
+
h,
|
|
4
|
+
registerInstance
|
|
5
|
+
} from "./chunk-IMHSPETJ.js";
|
|
6
|
+
|
|
7
|
+
// dist/esm/ui-badge.entry.js
|
|
8
|
+
var uiBadgeCss = () => `:host{--ui-badge-surface:var(--ui-surface-muted);--ui-badge-text:var(--ui-text-secondary);--ui-badge-border:var(--ui-border-default);--ui-badge-font-size:var(--ui-font-size-xs);--ui-badge-font-weight:var(--ui-font-normal);--ui-badge-line-height:var(--ui-line-height-tight);--ui-badge-padding-block:var(--ui-space-0-5);--ui-badge-padding-inline:var(--ui-space-2);display:inline-flex;max-width:100%}.badge__surface{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:var(--ui-badge-padding-block) var(--ui-badge-padding-inline);border:1px solid var(--ui-badge-border);border-radius:var(--ui-radius-round);background:var(--ui-badge-surface);color:var(--ui-badge-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-badge-font-size);font-weight:var(--ui-badge-font-weight);line-height:var(--ui-badge-line-height);white-space:nowrap}:host([data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-solid);--ui-badge-border:var(--ui-accent-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-solid);--ui-badge-border:var(--ui-danger-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-solid);--ui-badge-border:var(--ui-success-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-solid);--ui-badge-border:var(--ui-warning-solid);--ui-badge-text:var(--ui-text-primary)}:host([data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-solid);--ui-badge-border:var(--ui-info-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-soft);--ui-badge-border:var(--ui-accent-soft);--ui-badge-text:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-soft);--ui-badge-border:var(--ui-danger-soft);--ui-badge-text:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-soft);--ui-badge-border:var(--ui-success-soft);--ui-badge-text:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-soft);--ui-badge-border:var(--ui-warning-soft);--ui-badge-text:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-soft);--ui-badge-border:var(--ui-info-soft);--ui-badge-text:var(--ui-info-solid)}`;
|
|
9
|
+
var UIBadge = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
variant;
|
|
14
|
+
tone;
|
|
15
|
+
render() {
|
|
16
|
+
return h(Host, { key: "ba96ade6d037a7ed9958e7eed540e62782f846f0", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("span", { key: "a1e9587f59de479c19b9ea7aec8c8e932b998369", class: "badge__surface" }, h("slot", { key: "5835ddcea5cda472e700557528fd3cbc9d572616" })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
UIBadge.style = uiBadgeCss();
|
|
20
|
+
export {
|
|
21
|
+
UIBadge as ui_badge
|
|
22
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isActivationKey
|
|
3
|
+
} from "./chunk-UL7UIUJZ.js";
|
|
4
|
+
import {
|
|
5
|
+
Host,
|
|
6
|
+
getElement,
|
|
7
|
+
h,
|
|
8
|
+
registerInstance
|
|
9
|
+
} from "./chunk-IMHSPETJ.js";
|
|
10
|
+
|
|
11
|
+
// dist/esm/ui-button.entry.js
|
|
12
|
+
var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-action-secondary-text, var(--ui-text-primary))}:host([data-variant='solid']){color:var(--ui-action-primary-text, var(--ui-text-on-accent))}:host([data-variant='outline']) ::slotted(button),::slotted(button){appearance:none;min-block-size:var(--ui-button-min-block-size, 2.5rem);border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-action-secondary-surface, var(--ui-surface-default));color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm']) ::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg']) ::slotted(button){min-block-size:var(--ui-control-min-block-size, 2.75rem);padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-action-secondary-surface-hover, var(--ui-surface-muted));border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([data-variant='solid']) ::slotted(button){border-color:var(--ui-action-primary-surface, var(--ui-accent-solid));background:var(--ui-action-primary-surface, var(--ui-accent-solid));color:var(--ui-action-primary-text, var(--ui-text-on-accent));box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([data-variant='solid']) ::slotted(button:hover:enabled){background:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));border-color:var(--ui-action-primary-surface-hover, var(--ui-accent-hover));box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([data-variant='solid']) ::slotted(button:active:enabled){background:var(--ui-action-primary-surface-active, var(--ui-accent-active));border-color:var(--ui-action-primary-surface-active, var(--ui-accent-active));box-shadow:none;transform:translateY(0)}:host([data-variant='destructive']) ::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([data-variant='destructive']) ::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([data-variant='destructive']) ::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([data-variant='ghost']) ::slotted(button){border-color:transparent;background:transparent}:host([data-variant='ghost']) ::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([data-variant='ghost']) ::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}:host([data-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}::slotted(button:disabled){cursor:not-allowed}`;
|
|
13
|
+
var UIButton = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
registerInstance(this, hostRef);
|
|
16
|
+
}
|
|
17
|
+
get host() {
|
|
18
|
+
return getElement(this);
|
|
19
|
+
}
|
|
20
|
+
variant = "outline";
|
|
21
|
+
size;
|
|
22
|
+
disabled = false;
|
|
23
|
+
slotRef;
|
|
24
|
+
syncToButton() {
|
|
25
|
+
const btn = this.getButton();
|
|
26
|
+
if (!btn)
|
|
27
|
+
return;
|
|
28
|
+
if (this.size) {
|
|
29
|
+
this.host.dataset.size = this.size;
|
|
30
|
+
} else {
|
|
31
|
+
delete this.host.dataset.size;
|
|
32
|
+
}
|
|
33
|
+
if (this.disabled) {
|
|
34
|
+
this.host.dataset.disabled = "true";
|
|
35
|
+
} else {
|
|
36
|
+
delete this.host.dataset.disabled;
|
|
37
|
+
}
|
|
38
|
+
this.host.dataset.variant = this.variant;
|
|
39
|
+
btn.disabled = this.disabled;
|
|
40
|
+
}
|
|
41
|
+
componentDidLoad() {
|
|
42
|
+
this.slotRef?.addEventListener("slotchange", () => this.syncToButton());
|
|
43
|
+
this.syncToButton();
|
|
44
|
+
}
|
|
45
|
+
componentDidUpdate() {
|
|
46
|
+
this.syncToButton();
|
|
47
|
+
}
|
|
48
|
+
getButton() {
|
|
49
|
+
const slot = this.host.shadowRoot?.querySelector("slot");
|
|
50
|
+
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
51
|
+
return nodes.find((el) => el.tagName === "BUTTON") ?? null;
|
|
52
|
+
}
|
|
53
|
+
onKeydown = (e) => {
|
|
54
|
+
const btn = this.getButton();
|
|
55
|
+
if (btn || this.disabled || !isActivationKey(e))
|
|
56
|
+
return;
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
this.host.click();
|
|
59
|
+
};
|
|
60
|
+
render() {
|
|
61
|
+
return h(Host, { key: "58a90293e2ac169c8bc3c6cb3d15428cc73629b7", "data-size": this.size || void 0, "data-variant": this.variant, "data-disabled": this.disabled ? "true" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "05439bdc2af81bcabe9da11b4baf13f880e0a75f", ref: (el) => this.slotRef = el }));
|
|
62
|
+
}
|
|
63
|
+
static get watchers() {
|
|
64
|
+
return {
|
|
65
|
+
"variant": [{
|
|
66
|
+
"syncToButton": 0
|
|
67
|
+
}],
|
|
68
|
+
"size": [{
|
|
69
|
+
"syncToButton": 0
|
|
70
|
+
}],
|
|
71
|
+
"disabled": [{
|
|
72
|
+
"syncToButton": 0
|
|
73
|
+
}]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
UIButton.style = uiButtonCss();
|
|
78
|
+
export {
|
|
79
|
+
UIButton as ui_button
|
|
80
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loomaIconMarkup
|
|
3
|
+
} from "./chunk-NB6DBRXQ.js";
|
|
4
|
+
import {
|
|
5
|
+
Host,
|
|
6
|
+
h,
|
|
7
|
+
registerInstance
|
|
8
|
+
} from "./chunk-IMHSPETJ.js";
|
|
9
|
+
|
|
10
|
+
// dist/esm/ui-callout.entry.js
|
|
11
|
+
var uiCalloutCss = () => `:host{--ui-callout-surface:var(--ui-info-soft);--ui-callout-text:var(--ui-text-primary);--ui-callout-border:var(--ui-info-solid);--ui-callout-icon:var(--ui-info-solid);--ui-callout-padding-block:var(--ui-space-2);--ui-callout-padding-inline:var(--ui-space-3);--ui-callout-icon-column:1rem;--ui-callout-gap:var(--ui-space-2);--ui-callout-icon-size:1rem;--ui-callout-border-width:1px;--ui-callout-leading-border-width:4px;display:block;max-width:100%}.callout__surface{display:grid;grid-template-columns:var(--ui-callout-icon-column) minmax(0, 1fr);gap:var(--ui-callout-gap);align-items:start;padding:var(--ui-callout-padding-block) var(--ui-callout-padding-inline);border:var(--ui-callout-border-width) solid color-mix(in srgb, var(--ui-callout-border) 35%, transparent);border-inline-start:var(--ui-callout-leading-border-width) solid var(--ui-callout-border);border-radius:var(--ui-radius-2);background:var(--ui-callout-surface);color:var(--ui-callout-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-normal);line-height:var(--ui-line-height-md)}.icon{display:grid;place-items:center;inline-size:var(--ui-callout-icon-column);block-size:var(--ui-callout-icon-column);color:var(--ui-callout-icon)}.icon svg{inline-size:var(--ui-callout-icon-size);block-size:var(--ui-callout-icon-size)}.content{min-inline-size:0}:host([data-tone='note']){--ui-callout-surface:var(--ui-surface-muted);--ui-callout-border:var(--ui-border-strong);--ui-callout-icon:var(--ui-text-secondary)}:host([data-tone='warning']){--ui-callout-surface:var(--ui-warning-soft);--ui-callout-border:var(--ui-warning-solid);--ui-callout-icon:var(--ui-warning-solid)}:host([data-tone='success']){--ui-callout-surface:var(--ui-success-soft);--ui-callout-border:var(--ui-success-solid);--ui-callout-icon:var(--ui-success-solid)}:host([data-tone='error']){--ui-callout-surface:var(--ui-danger-soft);--ui-callout-border:var(--ui-danger-solid);--ui-callout-icon:var(--ui-danger-solid)}`;
|
|
12
|
+
var toneIcons = {
|
|
13
|
+
info: "info",
|
|
14
|
+
note: "notebook-pen",
|
|
15
|
+
warning: "triangle-alert",
|
|
16
|
+
success: "circle-check",
|
|
17
|
+
error: "circle-x"
|
|
18
|
+
};
|
|
19
|
+
var UICallout = class {
|
|
20
|
+
constructor(hostRef) {
|
|
21
|
+
registerInstance(this, hostRef);
|
|
22
|
+
}
|
|
23
|
+
tone = "info";
|
|
24
|
+
render() {
|
|
25
|
+
const icon = toneIcons[this.tone] ?? toneIcons.info;
|
|
26
|
+
return h(Host, { key: "94bae6fbb688e5c8da979a3bebc12c51b8689c8a", role: "note", "data-tone": this.tone }, h("div", { key: "8fe1a3dae5b7cd3679d187cef018fa0cd810fb76", class: "callout__surface" }, h("span", { key: "ed62ad8e29c30489e075631d83f1732d7a53a378", class: "icon", "aria-hidden": "true", innerHTML: loomaIconMarkup(icon) }), h("div", { key: "97638d28e3979f71913c17b2501a90e3a9251f0f", class: "content" }, h("slot", { key: "6a91a0d3f189eae28aabbe278924ba7f89015f34" }))));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
UICallout.style = uiCalloutCss();
|
|
30
|
+
export {
|
|
31
|
+
UICallout as ui_callout
|
|
32
|
+
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
controlledOrDefault,
|
|
3
|
+
isControlled
|
|
4
|
+
} from "./chunk-HNFCGIBP.js";
|
|
1
5
|
import {
|
|
2
6
|
dispatchDetail,
|
|
3
7
|
eventToTrigger
|
|
@@ -7,7 +11,7 @@ import {
|
|
|
7
11
|
getElement,
|
|
8
12
|
h,
|
|
9
13
|
registerInstance
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IMHSPETJ.js";
|
|
11
15
|
|
|
12
16
|
// dist/esm/ui-checkbox.entry.js
|
|
13
17
|
var uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
@@ -18,7 +22,8 @@ var UICheckbox = class {
|
|
|
18
22
|
get host() {
|
|
19
23
|
return getElement(this);
|
|
20
24
|
}
|
|
21
|
-
checked
|
|
25
|
+
/** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
|
|
26
|
+
checked;
|
|
22
27
|
defaultChecked = false;
|
|
23
28
|
disabled = false;
|
|
24
29
|
indeterminate = false;
|
|
@@ -27,7 +32,8 @@ var UICheckbox = class {
|
|
|
27
32
|
internalChecked = false;
|
|
28
33
|
slotRef;
|
|
29
34
|
syncFromProp() {
|
|
30
|
-
|
|
35
|
+
if (isControlled(this.checked))
|
|
36
|
+
this.internalChecked = this.checked;
|
|
31
37
|
}
|
|
32
38
|
syncToInput() {
|
|
33
39
|
const input = this.getInput();
|
|
@@ -42,8 +48,7 @@ var UICheckbox = class {
|
|
|
42
48
|
input.value = this.value;
|
|
43
49
|
}
|
|
44
50
|
componentDidLoad() {
|
|
45
|
-
this.
|
|
46
|
-
this.internalChecked = this.internalChecked || this.defaultChecked;
|
|
51
|
+
this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
|
|
47
52
|
this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
|
|
48
53
|
this.syncToInput();
|
|
49
54
|
const input = this.getInput();
|
|
@@ -65,16 +70,20 @@ var UICheckbox = class {
|
|
|
65
70
|
const input = e.target;
|
|
66
71
|
if (!input)
|
|
67
72
|
return;
|
|
68
|
-
|
|
73
|
+
const checked = input.checked;
|
|
74
|
+
if (!isControlled(this.checked))
|
|
75
|
+
this.internalChecked = checked;
|
|
76
|
+
else
|
|
77
|
+
this.syncToInput();
|
|
69
78
|
this.indeterminate = input.indeterminate;
|
|
70
79
|
dispatchDetail(this.host, "change", {
|
|
71
|
-
checked
|
|
80
|
+
checked,
|
|
72
81
|
value: this.value,
|
|
73
82
|
trigger: eventToTrigger(e)
|
|
74
83
|
});
|
|
75
84
|
};
|
|
76
85
|
render() {
|
|
77
|
-
return h(Host, { key: "
|
|
86
|
+
return h(Host, { key: "eb46eb41a5ab871058960bd2aa1163a03144bc0f", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "ce18b1f1b63efebf048cd67b87064641cf4d915c", ref: (el) => this.slotRef = el }));
|
|
78
87
|
}
|
|
79
88
|
static get watchers() {
|
|
80
89
|
return {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Host,
|
|
3
|
+
h,
|
|
4
|
+
registerInstance
|
|
5
|
+
} from "./chunk-IMHSPETJ.js";
|
|
6
|
+
|
|
7
|
+
// dist/esm/ui-chip.entry.js
|
|
8
|
+
var uiChipCss = () => `:host{--ui-chip-surface:var(--ui-surface-subtle);--ui-chip-text:var(--ui-text-secondary);--ui-chip-border:var(--ui-border-default);--ui-chip-font-size:var(--ui-font-size-xs);--ui-chip-font-weight:var(--ui-font-normal);--ui-chip-line-height:var(--ui-line-height-tight);--ui-chip-padding-block:var(--ui-space-0-5);--ui-chip-padding-inline:var(--ui-space-2);--ui-chip-notch:var(--ui-space-1);display:inline-flex;max-width:100%}.chip__surface{display:inline-flex;align-items:center;max-width:100%;padding:var(--ui-chip-padding-block) var(--ui-chip-padding-inline);border:1px solid var(--ui-chip-border);background:var(--ui-chip-surface);color:var(--ui-chip-text) !important;font-family:var(--ui-font-family-sans) !important;font-size:var(--ui-chip-font-size) !important;font-weight:var(--ui-chip-font-weight) !important;line-height:var(--ui-chip-line-height) !important;white-space:nowrap}:host([data-appearance='pill']) .chip__surface{border-radius:var(--ui-radius-round)}:host([data-appearance='tag']) .chip__surface{border:0;padding-inline-end:calc(var(--ui-chip-padding-inline) + var(--ui-chip-notch));clip-path:polygon(0 0, calc(100% - var(--ui-chip-notch)) 0, 100% 50%, calc(100% - var(--ui-chip-notch)) 100%, 0 100%)}`;
|
|
9
|
+
var UIChip = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
/** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
|
|
14
|
+
appearance = "tag";
|
|
15
|
+
render() {
|
|
16
|
+
return h(Host, { key: "fe1246a1e698098f0ca9cb04e749d5adf233e50c", "data-appearance": this.appearance }, h("span", { key: "a17237699b9eb20fb0a084adbd900a3aa9bc12b0", class: "chip__surface" }, h("slot", { key: "7f4e5dcc82d360083d4ded2617fa39a9dc1fd3ef" })));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
UIChip.style = uiChipCss();
|
|
20
|
+
export {
|
|
21
|
+
UIChip as ui_chip
|
|
22
|
+
};
|