@threadlabs/looma 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-HNFCGIBP.js +8 -0
- package/dist/{chunk-NIPNHZ5W.js → chunk-IMHSPETJ.js} +65 -31
- package/dist/chunk-NB6DBRXQ.js +323 -0
- package/dist/{chunk-SZJQ3NPX.js → chunk-TL4FIE7X.js} +4 -8
- package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
- package/dist/cjs/icons-BAdjrnhS.js +680 -0
- package/dist/cjs/{index-D07f6BOw.js → index-BHG9Rpil.js} +33 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/looma.cjs.js +2 -2
- package/dist/cjs/{manager-C9j3HZay.js → manager-Ce25WRtl.js} +6 -7
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +2 -2
- package/dist/cjs/ui-avatar-group.cjs.entry.js +10 -18
- package/dist/cjs/ui-avatar.cjs.entry.js +3 -3
- package/dist/cjs/ui-badge.cjs.entry.js +3 -3
- package/dist/cjs/ui-button.cjs.entry.js +16 -5
- package/dist/cjs/ui-callout.cjs.entry.js +27 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +14 -8
- package/dist/cjs/ui-chip.cjs.entry.js +19 -0
- package/dist/cjs/ui-combobox.cjs.entry.js +541 -0
- package/dist/cjs/ui-context-menu.cjs.entry.js +3 -3
- package/dist/cjs/ui-dialog.cjs.entry.js +46 -10
- package/dist/cjs/ui-disclosure.cjs.entry.js +10 -7
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-form-field.cjs.entry.js +61 -6
- package/dist/cjs/ui-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/ui-input.cjs.entry.js +11 -6
- package/dist/cjs/ui-menu-item.cjs.entry.js +3 -3
- package/dist/cjs/ui-menu.cjs.entry.js +16 -11
- package/dist/cjs/ui-popover.cjs.entry.js +12 -9
- package/dist/cjs/ui-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/ui-radio.cjs.entry.js +18 -9
- package/dist/cjs/ui-search-result-row.cjs.entry.js +2 -2
- package/dist/cjs/ui-search-shell.cjs.entry.js +2 -2
- package/dist/cjs/ui-select.cjs.entry.js +15 -7
- package/dist/cjs/ui-switch.cjs.entry.js +20 -11
- package/dist/cjs/ui-tabs.cjs.entry.js +11 -10
- package/dist/cjs/ui-textarea.cjs.entry.js +10 -6
- package/dist/cjs/ui-toast-region.cjs.entry.js +31 -20
- package/dist/cjs/ui-tooltip.cjs.entry.js +63 -23
- package/dist/cjs/ui-top-bar.cjs.entry.js +2 -2
- package/dist/cjs/ui-tree-item.cjs.entry.js +57 -616
- package/dist/cjs/ui-tree.cjs.entry.js +198 -14
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +1 -1
- package/dist/collection/components/ui-avatar/ui-avatar.css +4 -4
- package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +2 -2
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +8 -16
- package/dist/collection/components/ui-badge/ui-badge.css +64 -48
- package/dist/collection/components/ui-badge/ui-badge.js +1 -1
- package/dist/collection/components/ui-button/ui-button.css +36 -26
- package/dist/collection/components/ui-button/ui-button.js +14 -3
- package/dist/collection/components/ui-callout/ui-callout.css +74 -0
- package/dist/collection/components/ui-callout/ui-callout.js +59 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +16 -11
- package/dist/collection/components/ui-chip/ui-chip.css +43 -0
- package/dist/collection/components/ui-chip/ui-chip.js +45 -0
- package/dist/collection/components/ui-combobox/ui-combobox.css +24 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +973 -0
- package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
- package/dist/collection/components/ui-dialog/ui-dialog.js +49 -13
- package/dist/collection/components/ui-disclosure/ui-disclosure.js +12 -10
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.css +4 -0
- package/dist/collection/components/ui-form-field/ui-form-field.js +59 -4
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
- package/dist/collection/components/ui-input/ui-input.css +8 -6
- package/dist/collection/components/ui-input/ui-input.js +11 -7
- package/dist/collection/components/ui-menu/ui-menu.css +12 -23
- package/dist/collection/components/ui-menu/ui-menu.js +16 -12
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +9 -3
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-popover/ui-popover.css +14 -5
- package/dist/collection/components/ui-popover/ui-popover.js +12 -10
- package/dist/collection/components/ui-radio/ui-radio.js +25 -12
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
- package/dist/collection/components/ui-select/ui-select.css +8 -6
- package/dist/collection/components/ui-select/ui-select.js +17 -11
- package/dist/collection/components/ui-switch/ui-switch.js +22 -14
- package/dist/collection/components/ui-tabs/ui-tabs.js +13 -13
- package/dist/collection/components/ui-textarea/ui-textarea.css +7 -6
- package/dist/collection/components/ui-textarea/ui-textarea.js +10 -7
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +30 -19
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +16 -7
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +115 -25
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.css +2 -1
- package/dist/collection/components/ui-tree/ui-tree.js +216 -12
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +84 -25
- package/dist/collection/field/combobox.js +4 -0
- package/dist/collection/field/valibot.js +5 -0
- package/dist/collection/field/validation.js +62 -0
- package/dist/collection/icons.js +6 -1
- package/dist/collection/overlay/manager.js +6 -7
- package/dist/collection/utils/controlled-state.js +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-Bh_1GxOD.js +1 -0
- package/dist/components/p-Bk55QiUK.js +1 -0
- package/dist/components/p-BnGhGgTH.js +1 -0
- package/dist/components/p-C-0syqXZ.js +1 -0
- package/dist/components/p-CoFximGM.js +13 -0
- package/dist/components/p-DIGcRYAW.js +1 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-avatar-group.js +1 -1
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-callout.d.ts +11 -0
- package/dist/components/ui-callout.js +1 -0
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-chip.d.ts +11 -0
- package/dist/components/ui-chip.js +1 -0
- package/dist/components/ui-combobox.d.ts +11 -0
- package/dist/components/ui-combobox.js +1 -0
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-disclosure.js +1 -1
- package/dist/components/ui-floating-action-button.js +1 -1
- package/dist/components/ui-form-field.js +1 -1
- package/dist/components/ui-icon-button.js +1 -1
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-menu-item.js +1 -1
- package/dist/components/ui-menu.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-radio.js +1 -1
- package/dist/components/ui-search-result-row.js +1 -1
- package/dist/components/ui-search-shell.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/components/ui-tree-item.js +1 -13
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/controlled-state-BnGhGgTH.js +6 -0
- package/dist/esm/icons-CoFximGM.js +678 -0
- package/dist/esm/{index-CEeiinfk.js → index-8BGiMGQ0.js} +33 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/looma.js +3 -3
- package/dist/esm/{manager-PM9a74r7.js → manager-C-0syqXZ.js} +6 -7
- package/dist/esm/ui-affordance-scope.entry.js +2 -2
- package/dist/esm/ui-avatar-group.entry.js +10 -18
- package/dist/esm/ui-avatar.entry.js +3 -3
- package/dist/esm/ui-badge.entry.js +3 -3
- package/dist/esm/ui-button.entry.js +16 -5
- package/dist/esm/ui-callout.entry.js +25 -0
- package/dist/esm/ui-checkbox.entry.js +14 -8
- package/dist/esm/ui-chip.entry.js +17 -0
- package/dist/esm/ui-combobox.entry.js +539 -0
- package/dist/esm/ui-context-menu.entry.js +3 -3
- package/dist/esm/ui-dialog.entry.js +46 -10
- package/dist/esm/ui-disclosure.entry.js +10 -7
- package/dist/esm/ui-floating-action-button.entry.js +2 -2
- package/dist/esm/ui-form-field.entry.js +61 -6
- package/dist/esm/ui-icon-button.entry.js +2 -2
- package/dist/esm/ui-input.entry.js +11 -6
- package/dist/esm/ui-menu-item.entry.js +3 -3
- package/dist/esm/ui-menu.entry.js +16 -11
- package/dist/esm/ui-popover.entry.js +12 -9
- package/dist/esm/ui-radio-group.entry.js +2 -2
- package/dist/esm/ui-radio.entry.js +18 -9
- package/dist/esm/ui-search-result-row.entry.js +2 -2
- package/dist/esm/ui-search-shell.entry.js +2 -2
- package/dist/esm/ui-select.entry.js +15 -7
- package/dist/esm/ui-switch.entry.js +20 -11
- package/dist/esm/ui-tabs.entry.js +11 -10
- package/dist/esm/ui-textarea.entry.js +10 -6
- package/dist/esm/ui-toast-region.entry.js +31 -20
- package/dist/esm/ui-tooltip.entry.js +63 -23
- package/dist/esm/ui-top-bar.entry.js +2 -2
- package/dist/esm/ui-tree-item.entry.js +57 -616
- package/dist/esm/ui-tree.entry.js +198 -14
- package/dist/index.cjs +2012 -870
- package/dist/index.d.cts +109 -1
- package/dist/index.d.ts +109 -1
- package/dist/index.js +72 -8
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-03f44c45.entry.js +1 -0
- package/dist/looma/p-08f80207.entry.js +1 -0
- package/dist/looma/p-13f8195a.entry.js +1 -0
- package/dist/looma/{p-d273b857.entry.js → p-25e18ad6.entry.js} +1 -1
- package/dist/looma/p-2c03fa73.entry.js +1 -0
- package/dist/looma/p-314d5c7c.entry.js +1 -0
- package/dist/looma/{p-2ed7e241.entry.js → p-3ef2a21b.entry.js} +1 -1
- package/dist/looma/{p-063f5a89.entry.js → p-5a900d89.entry.js} +1 -1
- package/dist/looma/p-5fdcee1d.entry.js +1 -0
- package/dist/looma/{p-0198bb21.entry.js → p-672e3d16.entry.js} +1 -1
- package/dist/looma/p-68430534.entry.js +1 -0
- package/dist/looma/{p-2e6f791e.entry.js → p-72338f53.entry.js} +1 -1
- package/dist/looma/p-7ab661ec.entry.js +1 -0
- package/dist/looma/p-7c4a225f.entry.js +1 -0
- package/dist/looma/p-82f2fa3d.entry.js +1 -0
- package/dist/looma/p-839faf55.entry.js +1 -0
- package/dist/looma/p-8BGiMGQ0.js +2 -0
- package/dist/looma/p-8e254bc4.entry.js +1 -0
- package/dist/looma/p-8e6b1001.entry.js +1 -0
- package/dist/looma/p-920656cf.entry.js +1 -0
- package/dist/looma/p-97e8cb0e.entry.js +1 -0
- package/dist/looma/p-9d2662ca.entry.js +1 -0
- package/dist/looma/p-9e1c4020.entry.js +1 -0
- package/dist/looma/p-BnGhGgTH.js +1 -0
- package/dist/looma/p-C-0syqXZ.js +1 -0
- package/dist/looma/p-CoFximGM.js +13 -0
- package/dist/looma/{p-051f578c.entry.js → p-a63e2561.entry.js} +1 -1
- package/dist/looma/p-add67e4c.entry.js +1 -0
- package/dist/looma/p-b63f6d4f.entry.js +1 -0
- package/dist/looma/p-bd00d4e8.entry.js +1 -0
- package/dist/looma/p-cc915913.entry.js +1 -0
- package/dist/looma/p-cfba8f7c.entry.js +1 -0
- package/dist/looma/p-d56571a2.entry.js +1 -0
- package/dist/looma/{p-7e94d90d.entry.js → p-e0f241ab.entry.js} +1 -1
- package/dist/looma/p-f1750fd7.entry.js +1 -0
- package/dist/looma/p-fd1e4d22.entry.js +1 -0
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +1 -2
- package/dist/types/components/ui-callout/ui-callout.d.ts +6 -0
- package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +2 -1
- package/dist/types/components/ui-chip/ui-chip.d.ts +6 -0
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +93 -0
- package/dist/types/components/ui-dialog/ui-dialog.d.ts +7 -1
- package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +2 -1
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +8 -0
- package/dist/types/components/ui-input/ui-input.d.ts +1 -1
- package/dist/types/components/ui-menu/ui-menu.d.ts +2 -1
- package/dist/types/components/ui-popover/ui-popover.d.ts +2 -1
- package/dist/types/components/ui-radio/ui-radio.d.ts +4 -1
- package/dist/types/components/ui-select/ui-select.d.ts +3 -2
- package/dist/types/components/ui-switch/ui-switch.d.ts +2 -1
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +2 -1
- package/dist/types/components/ui-textarea/ui-textarea.d.ts +1 -1
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +3 -1
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +20 -2
- package/dist/types/components/ui-tree/ui-tree.d.ts +21 -1
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +13 -5
- package/dist/types/components.d.ts +366 -71
- package/dist/types/field/combobox.d.ts +46 -0
- package/dist/types/field/valibot.d.ts +7 -0
- package/dist/types/field/validation.d.ts +56 -0
- package/dist/types/icons.d.ts +5 -0
- package/dist/types/utils/controlled-state.d.ts +4 -0
- package/dist/{ui-affordance-scope.entry-L533MECG.js → ui-affordance-scope.entry-3TUZ6GLW.js} +2 -2
- package/dist/ui-avatar-group.entry-XGJKN25W.js +51 -0
- package/dist/{ui-avatar.entry-3INAY3XP.js → ui-avatar.entry-SN3G44HW.js} +3 -3
- package/dist/ui-badge.entry-B6WDCWJX.js +22 -0
- package/dist/ui-button.entry-AZYUELLV.js +80 -0
- package/dist/ui-callout.entry-QRPWRMPC.js +32 -0
- package/dist/{ui-checkbox.entry-2PTBHSCQ.js → ui-checkbox.entry-OB6GFC4M.js} +17 -8
- package/dist/ui-chip.entry-XSNPJXX3.js +22 -0
- package/dist/ui-combobox.entry-IIMMUJF7.js +553 -0
- package/dist/{ui-context-menu.entry-AYDDCIZS.js → ui-context-menu.entry-AIULIE5Y.js} +3 -3
- package/dist/{ui-dialog.entry-I2XI3ZTZ.js → ui-dialog.entry-QSYWYHLY.js} +48 -10
- package/dist/{ui-disclosure.entry-5LY2BT7B.js → ui-disclosure.entry-3BJEYU3U.js} +13 -7
- package/dist/{ui-floating-action-button.entry-EJAMR5AM.js → ui-floating-action-button.entry-JEVNV6FI.js} +2 -2
- package/dist/ui-form-field.entry-PKSY7UU4.js +120 -0
- package/dist/{ui-icon-button.entry-7SD2LVXE.js → ui-icon-button.entry-TPX7BE7R.js} +2 -2
- package/dist/{ui-input.entry-7MM7GEQW.js → ui-input.entry-6NCLNW4E.js} +8 -6
- package/dist/ui-menu-item.entry-KA2K3PKV.js +22 -0
- package/dist/{ui-menu.entry-R4WK5QSX.js → ui-menu.entry-7GDO5L2T.js} +19 -11
- package/dist/{ui-popover.entry-ZRJRTXA7.js → ui-popover.entry-FR6YRNK6.js} +15 -9
- package/dist/{ui-radio-group.entry-S6RXHFSN.js → ui-radio-group.entry-7QHXQSNO.js} +2 -2
- package/dist/{ui-radio.entry-B73QZK2M.js → ui-radio.entry-YNMXKLDW.js} +21 -9
- package/dist/{ui-search-result-row.entry-DR2Y5S7P.js → ui-search-result-row.entry-AHVVAAIO.js} +2 -2
- package/dist/{ui-search-shell.entry-ST5IKJBC.js → ui-search-shell.entry-CNBEAMEZ.js} +2 -2
- package/dist/{ui-select.entry-7GPRFV67.js → ui-select.entry-TUY6TCTC.js} +13 -7
- package/dist/{ui-switch.entry-XQ5IRJRH.js → ui-switch.entry-26LFI7B5.js} +23 -11
- package/dist/{ui-tabs.entry-HPW5L5CY.js → ui-tabs.entry-LXB62RJJ.js} +14 -10
- package/dist/{ui-textarea.entry-W2PSRYVS.js → ui-textarea.entry-JYGMGPX2.js} +8 -6
- package/dist/{ui-toast-region.entry-FJUHFXKZ.js → ui-toast-region.entry-TOW4KZLZ.js} +29 -20
- package/dist/{ui-tooltip.entry-G5WHQW7K.js → ui-tooltip.entry-SKFNYXPH.js} +68 -25
- package/dist/{ui-top-bar.entry-3NCHFC4Y.js → ui-top-bar.entry-S3YP52EA.js} +2 -2
- package/dist/ui-tree-item.entry-LWYIPYLC.js +145 -0
- package/dist/{ui-tree.entry-SZW4Q5PY.js → ui-tree.entry-LXKUQFRU.js} +184 -13
- package/dist/valibot.d.ts +52 -0
- package/dist/valibot.js +7 -0
- package/editor/{chunk-QCOYOVQL.js → chunk-B5WVJOPV.js} +113 -97
- package/editor/extensions/index.d.ts +14 -6
- package/editor/extensions/index.js +1 -1
- package/editor/index.js +1 -1
- package/editor.css +37 -20
- package/package.json +11 -3
- package/styles.css +46 -20
- package/theme-high-contrast.css +12 -0
- package/tokens.css +26 -0
- package/vue/{chunk-5KWCMTXB.js → chunk-D4AJULDE.js} +116 -17
- package/vue/editor/index.d.ts +5 -15
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +447 -115
- package/vue/index.js +7 -1
- package/dist/components/p-CEYIKqYc.js +0 -1
- package/dist/components/p-CIA4RyEp.js +0 -1
- package/dist/components/p-PM9a74r7.js +0 -1
- package/dist/looma/p-0584a051.entry.js +0 -1
- package/dist/looma/p-078f9fb8.entry.js +0 -1
- package/dist/looma/p-0f45c5f0.entry.js +0 -1
- package/dist/looma/p-11083743.entry.js +0 -1
- package/dist/looma/p-1674cda4.entry.js +0 -1
- package/dist/looma/p-1681b218.entry.js +0 -1
- package/dist/looma/p-34417499.entry.js +0 -1
- package/dist/looma/p-4b422d40.entry.js +0 -1
- package/dist/looma/p-54722713.entry.js +0 -13
- package/dist/looma/p-54c41576.entry.js +0 -1
- package/dist/looma/p-5ba9d496.entry.js +0 -1
- package/dist/looma/p-5d4713a6.entry.js +0 -1
- package/dist/looma/p-624ba086.entry.js +0 -1
- package/dist/looma/p-8d5adb17.entry.js +0 -1
- package/dist/looma/p-9194a99d.entry.js +0 -1
- package/dist/looma/p-CEeiinfk.js +0 -2
- package/dist/looma/p-PM9a74r7.js +0 -1
- package/dist/looma/p-a33522a2.entry.js +0 -1
- package/dist/looma/p-a5127c7d.entry.js +0 -1
- package/dist/looma/p-a9f46811.entry.js +0 -1
- package/dist/looma/p-b7aa4488.entry.js +0 -1
- package/dist/looma/p-caa8fc7b.entry.js +0 -1
- package/dist/looma/p-e3f99a24.entry.js +0 -1
- package/dist/looma/p-ed5abf6d.entry.js +0 -1
- package/dist/ui-avatar-group.entry-BWS7E2CM.js +0 -59
- package/dist/ui-badge.entry-2WOBVOYP.js +0 -22
- package/dist/ui-button.entry-VCGSEONK.js +0 -71
- package/dist/ui-form-field.entry-SJ6NNFXB.js +0 -67
- package/dist/ui-menu-item.entry-V3HIMR75.js +0 -22
- package/dist/ui-tree-item.entry-45RR3CMP.js +0 -385
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
|
+
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
5
6
|
|
|
6
7
|
const uiRadioCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([data-disabled='true']),:host([aria-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='radio']){accent-color:var(--ui-accent-solid);cursor:pointer}::slotted(input[type='radio']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
7
8
|
|
|
@@ -10,28 +11,32 @@ const UIRadio = class {
|
|
|
10
11
|
index.registerInstance(this, hostRef);
|
|
11
12
|
}
|
|
12
13
|
get host() { return index.getElement(this); }
|
|
13
|
-
checked
|
|
14
|
+
/** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
|
|
15
|
+
checked;
|
|
14
16
|
defaultChecked = false;
|
|
15
17
|
disabled = false;
|
|
16
18
|
name = '';
|
|
17
19
|
required = false;
|
|
18
20
|
value = 'on';
|
|
21
|
+
internalChecked = false;
|
|
19
22
|
slotRef;
|
|
23
|
+
syncFromProp() {
|
|
24
|
+
if (controlledState.isControlled(this.checked))
|
|
25
|
+
this.internalChecked = this.checked;
|
|
26
|
+
}
|
|
20
27
|
syncToInput() {
|
|
21
28
|
const input = this.getInput();
|
|
22
29
|
if (!input)
|
|
23
30
|
return;
|
|
24
|
-
this.host.
|
|
25
|
-
input.checked = this.
|
|
31
|
+
this.host.toggleAttribute('data-disabled', this.disabled);
|
|
32
|
+
input.checked = this.internalChecked;
|
|
26
33
|
input.disabled = this.disabled;
|
|
27
34
|
input.name = this.name;
|
|
28
35
|
input.required = this.required;
|
|
29
36
|
input.value = this.value;
|
|
30
37
|
}
|
|
31
38
|
componentDidLoad() {
|
|
32
|
-
|
|
33
|
-
this.checked = true;
|
|
34
|
-
}
|
|
39
|
+
this.internalChecked = controlledState.controlledOrDefault(this.checked, this.defaultChecked);
|
|
35
40
|
this.slotRef?.addEventListener('slotchange', () => this.syncToInput());
|
|
36
41
|
this.syncToInput();
|
|
37
42
|
const input = this.getInput();
|
|
@@ -53,6 +58,10 @@ const UIRadio = class {
|
|
|
53
58
|
const input = e.target;
|
|
54
59
|
if (!input || !input.checked)
|
|
55
60
|
return;
|
|
61
|
+
if (!controlledState.isControlled(this.checked))
|
|
62
|
+
this.internalChecked = true;
|
|
63
|
+
else
|
|
64
|
+
this.syncToInput();
|
|
56
65
|
events.dispatchDetail(this.host, 'change', {
|
|
57
66
|
checked: true,
|
|
58
67
|
value: this.value,
|
|
@@ -60,11 +69,11 @@ const UIRadio = class {
|
|
|
60
69
|
});
|
|
61
70
|
};
|
|
62
71
|
render() {
|
|
63
|
-
return (index.h(index.Host, { key: '
|
|
72
|
+
return (index.h(index.Host, { key: 'a5220e72dbf1b55ca73a3e6234f31c99d806433a', role: "radio", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? '' : undefined }, index.h("slot", { key: '687e94b2036107c807e0319c3620bca7c06cbb26', ref: (el) => (this.slotRef = el) })));
|
|
64
73
|
}
|
|
65
74
|
static get watchers() { return {
|
|
66
75
|
"checked": [{
|
|
67
|
-
"
|
|
76
|
+
"syncFromProp": 0
|
|
68
77
|
}],
|
|
69
78
|
"disabled": [{
|
|
70
79
|
"syncToInput": 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
|
|
5
5
|
const uiSearchResultRowCss = () => `:host{display:block}.search-result-row{appearance:none;inline-size:100%;min-block-size:var(--ui-search-result-row-min-height, 56px);margin:0;padding-block:var(--ui-search-result-row-padding-block, var(--ui-space-3, 0.75rem));padding-inline:var(--ui-search-result-row-padding-inline, var(--ui-space-4, 1rem));display:flex;align-items:flex-start;gap:var(--ui-search-result-row-gap, var(--ui-space-3, 0.75rem));background:var(--ui-search-result-row-bg, transparent);border:none;border-block-end:1px solid var(--ui-search-result-row-border, var(--ui-border, #e5e7eb));color:inherit;cursor:pointer;text-align:left;transition:background-color var(--ui-motion-fast, 160ms) var(--ui-motion-ease, ease)}:host(:last-child) .search-result-row{border-block-end:none}.search-result-row:hover:enabled{background:var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%))}:host([selected]) .search-result-row{background:var( --ui-search-result-row-selected-bg, var(--ui-search-result-row-hover-bg, color-mix(in srgb, var(--ui-surface, #ffffff) 85%, black 3%)) )}.search-result-row:focus-visible{outline:2px solid var(--ui-focus-ring, #2563eb);outline-offset:-2px}.search-result-row:disabled,:host([disabled]) .search-result-row{opacity:0.6;cursor:not-allowed}.search-result-row__leading,.search-result-row__trailing{display:inline-flex;align-items:flex-start;flex-shrink:0}.search-result-row__content{min-inline-size:0;flex:1;display:flex;flex-direction:column}.search-result-row__title,.search-result-row__meta,.search-result-row__excerpt{display:block;min-inline-size:0}[hidden]{display:none}::slotted([slot='title']),::slotted([slot='meta']),::slotted([slot='excerpt']){display:block;margin:0}`;
|
|
6
6
|
|
|
@@ -39,7 +39,7 @@ const UISearchResultRow = class {
|
|
|
39
39
|
this.hasTrailing = slotHasContent(this.trailingSlot);
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (index.h(index.Host, { key: '
|
|
42
|
+
return (index.h(index.Host, { key: '01e795d1c723c4e56f5648c429b40fc7841ff9b5' }, index.h("button", { key: '7bdde5075c5a3112d14741aa87937e69a8f5fea9', class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, index.h("span", { key: '39ba47af68a23875eebdbdf8f87ca7d94d42ec43', class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, index.h("slot", { key: 'f108b1c5d284057d5979bf4897f056543a1ff092', name: "leading", ref: (el) => (this.leadingSlot = el), onSlotchange: this.syncSlots })), index.h("span", { key: '0daeb171b7010f37d959c91f2a87c1ae7e96a56f', class: "search-result-row__content", part: "content" }, index.h("span", { key: 'd7ec1b67a15fa9c79ea0fd23db73bd7bca40a8ce', class: "search-result-row__title", part: "title" }, index.h("slot", { key: '8c4a45511580a655e0593c8c57fd98838f2cb896', name: "title" })), index.h("span", { key: '0d30a58a7079ea0c8992c9b0b02b516a65350425', class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, index.h("slot", { key: '8de66e3b6adf89ed765ccc1c341ccac1b5513a6f', name: "meta", ref: (el) => (this.metaSlot = el), onSlotchange: this.syncSlots })), index.h("span", { key: '7c24542b9bb634a55530952c329242a351e813c3', class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, index.h("slot", { key: 'a5bfc4fd17b8535aa996e792498b33f25dd30ecd', name: "excerpt", ref: (el) => (this.excerptSlot = el), onSlotchange: this.syncSlots }))), index.h("span", { key: '25c74d8508a0b3b527ef5529a02e54e407cae5ae', class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, index.h("slot", { key: 'cba6f957de902b9ed3dc05c8b20794c9b69c85c6', name: "trailing", ref: (el) => (this.trailingSlot = el), onSlotchange: this.syncSlots })))));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
UISearchResultRow.style = uiSearchResultRowCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
|
|
5
5
|
const uiSearchShellCss = () => `:host{position:fixed;inset:0;z-index:var(--ui-search-shell-z-index, 400);display:block}.search-shell{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-block-start:var(--ui-search-shell-padding-top, 10vh)}.search-shell__panel{position:relative;inline-size:min( calc(100% - (var(--ui-search-shell-margin-inline, var(--ui-space-4, 1rem)) * 2)), var(--ui-search-shell-max-width, 640px) );max-block-size:var(--ui-search-shell-max-height, 80vh);display:flex;flex-direction:column;overflow:hidden;background:var(--ui-search-shell-bg, var(--ui-surface, #ffffff));border:1px solid var(--ui-search-shell-border, var(--ui-border, #e5e7eb));border-radius:var(--ui-search-shell-radius, var(--ui-radius-xl, 1rem));box-shadow:var(--ui-search-shell-shadow, var(--ui-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12)))}.search-shell__search,.search-shell__status,.search-shell__footer{flex-shrink:0}.search-shell__body{flex:1;min-block-size:0}[hidden]{display:none}@media (max-width: 767px){.search-shell{padding-block-start:0;align-items:stretch}.search-shell__panel{inline-size:100%;block-size:100vh;block-size:100dvh;max-block-size:none;border-radius:0;border-inline:none;border-block-start:none}}`;
|
|
6
6
|
|
|
@@ -31,7 +31,7 @@ const UISearchShell = class {
|
|
|
31
31
|
this.hasFooter = slotHasContent(this.footerSlot);
|
|
32
32
|
};
|
|
33
33
|
render() {
|
|
34
|
-
return (index.h("div", { key: '
|
|
34
|
+
return (index.h("div", { key: 'c3a4366e1f22b249233e42fdc83f1620613cce52', class: "search-shell", part: "base" }, index.h("slot", { key: '4f22e4a44fe7ae190a80a6e5cd695c15eb4f029d', name: "backdrop" }), index.h("div", { key: 'bf452dae29f0ab31266d848a4dd4b794997b34a7', class: "search-shell__panel", part: "panel" }, index.h("div", { key: 'c0ef7d1d8ea95853404d39ddac1bff566d38d18e', class: "search-shell__search", part: "search" }, index.h("slot", { key: '462532250d8ba36aad1d31fe10da642d79e59faf', name: "search" })), index.h("div", { key: '4f7d91272d15f6e37df6fba4ae563efae5701b93', class: "search-shell__status", part: "status", hidden: !this.hasStatus }, index.h("slot", { key: 'd761691c1dd2c3012075163bb7eb9ce7e5bf3ef4', name: "status", ref: (el) => (this.statusSlot = el), onSlotchange: this.syncSlots })), index.h("div", { key: '1427a10b3f43ea31c2a482beb17f78d70b5fb2cf', class: "search-shell__body", part: "body" }, index.h("slot", { key: '6d6e8c2b4ee4833b5476795d4c7e184dda07f81e', name: "body" })), index.h("div", { key: '8f7d36040f7d21489c703b53581e392a2616963b', class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, index.h("slot", { key: '08b84f01091d95895ee8693e9b322511bf614342', name: "footer", ref: (el) => (this.footerSlot = el), onSlotchange: this.syncSlots })))));
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
UISearchShell.style = uiSearchShellCss();
|
|
@@ -1,31 +1,39 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
5
|
|
|
6
|
-
const uiSelectCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background-color:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(select:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}`;
|
|
6
|
+
const uiSelectCss = () => `:host{display:inline-flex;min-inline-size:0;color:var(--ui-text-primary)}::slotted(select){width:100%;appearance:none;min-block-size:var(--ui-control-min-block-size, 2.75rem);border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-radius-2);background-color:var(--ui-control-surface, var(--ui-surface-default));color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding-block:var(--ui-select-padding-block, var(--ui-space-2));padding-inline-start:var(--ui-select-padding-inline-start, var(--ui-space-3));padding-inline-end:var(--ui-select-padding-inline-end, calc(var(--ui-space-6) + var(--ui-space-3)));margin:0;background-image:linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);background-position:calc(100% - 1rem) calc(50% - 2px), calc(100% - 0.7rem) calc(50% - 2px);background-size:0.35rem 0.35rem, 0.35rem 0.35rem;background-repeat:no-repeat;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(select:hover:not(:focus):not(:disabled)){border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(select:focus){border-color:var(--ui-control-focus, var(--ui-focus-ring));box-shadow:0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft))}:host([data-invalid='true'])::slotted(select),::slotted(select[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(select:disabled){background-color:var(--ui-control-surface-disabled, var(--ui-surface-muted));color:var(--ui-text-muted);cursor:not-allowed}::slotted(select:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(select[multiple]),::slotted(select[size]:not([size='1'])){background-image:none;padding-inline-end:var(--ui-select-padding-inline-start, var(--ui-space-3))}`;
|
|
7
7
|
|
|
8
8
|
const UISelect = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
}
|
|
12
12
|
get host() { return index.getElement(this); }
|
|
13
|
-
value
|
|
14
|
-
defaultValue
|
|
13
|
+
value;
|
|
14
|
+
defaultValue;
|
|
15
15
|
disabled = false;
|
|
16
16
|
invalid = false;
|
|
17
17
|
required = false;
|
|
18
18
|
internalValue = '';
|
|
19
19
|
slotRef;
|
|
20
|
+
initialized = false;
|
|
20
21
|
syncFromProp() {
|
|
21
|
-
this.
|
|
22
|
+
if (this.value !== undefined)
|
|
23
|
+
this.internalValue = this.value;
|
|
22
24
|
}
|
|
23
25
|
syncToSelect() {
|
|
24
26
|
const select = this.getSelect();
|
|
25
27
|
if (!select)
|
|
26
28
|
return;
|
|
27
29
|
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
28
|
-
select
|
|
30
|
+
// A native select automatically selects its first option. Apply the host
|
|
31
|
+
// default once regardless, then leave subsequent native/framework edits alone.
|
|
32
|
+
if (this.value !== undefined)
|
|
33
|
+
select.value = this.internalValue;
|
|
34
|
+
else if (!this.initialized && this.defaultValue !== undefined)
|
|
35
|
+
select.value = this.defaultValue;
|
|
36
|
+
this.initialized = true;
|
|
29
37
|
select.disabled = this.disabled;
|
|
30
38
|
select.required = this.required;
|
|
31
39
|
select.setAttribute('aria-invalid', this.invalid ? 'true' : 'false');
|
|
@@ -72,7 +80,7 @@ const UISelect = class {
|
|
|
72
80
|
});
|
|
73
81
|
};
|
|
74
82
|
render() {
|
|
75
|
-
return (index.h(index.Host, { key: '
|
|
83
|
+
return (index.h(index.Host, { key: '9a83a040bbad98355999c8099a78c6eba3ffc995', "data-invalid": this.invalid ? '' : undefined }, index.h("slot", { key: '4a70aa44651132899e283e45c32213cf3f00be24', ref: (el) => (this.slotRef = el) })));
|
|
76
84
|
}
|
|
77
85
|
static get watchers() { return {
|
|
78
86
|
"value": [{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
|
+
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
5
6
|
|
|
6
7
|
const uiSwitchCss = () => `: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}:host([role='switch']){cursor:pointer}:host input[type='checkbox']{appearance:none;-webkit-appearance:none;display:block;position:relative;width:2.25rem;height:1.25rem;padding:0;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host input[type='checkbox']::after{content:'';position:absolute;top:2px;left:2px;width:0.875rem;height:0.875rem;border-radius:999px;background:var(--ui-surface-default);border:1px solid var(--ui-border-default);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}:host input[type='checkbox']:checked{background:var(--ui-accent-solid);border-color:var(--ui-accent-solid)}:host input[type='checkbox']:checked::after{transform:translateX(calc(2.25rem - 0.875rem - 4px));background:var(--ui-text-on-accent);border-color:var(--ui-text-on-accent)}:host input[type='checkbox']:focus-visible{outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
|
|
7
8
|
|
|
@@ -10,25 +11,28 @@ const UISwitch = class {
|
|
|
10
11
|
index.registerInstance(this, hostRef);
|
|
11
12
|
}
|
|
12
13
|
get host() { return index.getElement(this); }
|
|
13
|
-
checked
|
|
14
|
+
/** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
|
|
15
|
+
checked;
|
|
14
16
|
defaultChecked = false;
|
|
15
17
|
disabled = false;
|
|
16
18
|
required = false;
|
|
17
19
|
value = 'on';
|
|
18
20
|
internalChecked = false;
|
|
19
21
|
syncFromProp() {
|
|
20
|
-
|
|
22
|
+
if (controlledState.isControlled(this.checked))
|
|
23
|
+
this.internalChecked = this.checked;
|
|
21
24
|
}
|
|
22
25
|
componentDidLoad() {
|
|
23
|
-
this.
|
|
24
|
-
this.internalChecked = this.internalChecked || this.defaultChecked;
|
|
26
|
+
this.internalChecked = controlledState.controlledOrDefault(this.checked, this.defaultChecked);
|
|
25
27
|
}
|
|
26
28
|
toggle = (trigger) => {
|
|
27
29
|
if (this.disabled)
|
|
28
30
|
return;
|
|
29
|
-
|
|
31
|
+
const checked = !this.internalChecked;
|
|
32
|
+
if (!controlledState.isControlled(this.checked))
|
|
33
|
+
this.internalChecked = checked;
|
|
30
34
|
events.dispatchDetail(this.host, 'change', {
|
|
31
|
-
checked
|
|
35
|
+
checked,
|
|
32
36
|
value: this.value,
|
|
33
37
|
trigger,
|
|
34
38
|
});
|
|
@@ -45,14 +49,19 @@ const UISwitch = class {
|
|
|
45
49
|
this.toggle('pointer');
|
|
46
50
|
};
|
|
47
51
|
render() {
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
49
|
-
|
|
52
|
+
return (index.h(index.Host, { key: 'e11500e37da6a52c0cb4e143254363f85911aac1', role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? '' : undefined, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, index.h("input", { key: '777310a90b66f67e6a8eb0f77da5274e32f10db0', type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
|
|
53
|
+
const input = e.target;
|
|
54
|
+
const checked = input.checked;
|
|
55
|
+
if (!controlledState.isControlled(this.checked))
|
|
56
|
+
this.internalChecked = checked;
|
|
50
57
|
events.dispatchDetail(this.host, 'change', {
|
|
51
|
-
checked
|
|
58
|
+
checked,
|
|
52
59
|
value: this.value,
|
|
53
60
|
trigger: 'pointer',
|
|
54
61
|
});
|
|
55
|
-
|
|
62
|
+
if (controlledState.isControlled(this.checked))
|
|
63
|
+
input.checked = this.internalChecked;
|
|
64
|
+
} }), index.h("slot", { key: '7d72db5b720c0af0c4561b485ca558de61e1ce6e' })));
|
|
56
65
|
}
|
|
57
66
|
static get watchers() { return {
|
|
58
67
|
"checked": [{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
|
+
var controlledState = require('./controlled-state-BFya8rAX.js');
|
|
5
6
|
|
|
6
7
|
const uiTabsCss = () => `:host{display:flex;flex-direction:column;gap:0}:host([data-orientation='vertical']){flex-direction:row}::slotted([role='tablist']){display:flex;gap:0;max-inline-size:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-bottom:1px solid var(--ui-border-default)}:host([data-orientation='vertical']) ::slotted([role='tablist']){flex-direction:column;border-bottom:none;border-inline-end:1px solid var(--ui-border-default)}::slotted(button[role='tab']),::slotted([role='tab']),::slotted(ui-button) button[role='tab']{padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-medium, 500);color:var(--ui-text-secondary);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color var(--ui-motion-fast) var(--ui-motion-ease);box-shadow:none}::slotted(button[role='tab']:hover),::slotted([role='tab']:hover){color:var(--ui-text-primary)}::slotted(button[role='tab'][aria-selected='true']),::slotted([role='tab'][aria-selected='true']){color:var(--ui-accent-solid);border-bottom-color:var(--ui-accent-solid)}:host([data-orientation='vertical']) ::slotted(button[role='tab']),:host([data-orientation='vertical']) ::slotted([role='tab']){border-bottom:none;border-inline-end:2px solid transparent;margin-bottom:0;margin-inline-end:-1px}:host([data-orientation='vertical']) ::slotted(button[role='tab'][aria-selected='true']),:host([data-orientation='vertical']) ::slotted([role='tab'][aria-selected='true']){border-inline-end-color:var(--ui-accent-solid)}::slotted([role='tabpanel']){padding:var(--ui-space-4)}`;
|
|
7
8
|
|
|
@@ -10,12 +11,14 @@ const UITabs = class {
|
|
|
10
11
|
index.registerInstance(this, hostRef);
|
|
11
12
|
}
|
|
12
13
|
get host() { return index.getElement(this); }
|
|
13
|
-
value
|
|
14
|
+
/** Controlled selected tab value. Omit it to use defaultValue and local interaction state. */
|
|
15
|
+
value;
|
|
14
16
|
defaultValue = '';
|
|
15
17
|
orientation = 'horizontal';
|
|
16
18
|
internalValue = '';
|
|
17
19
|
syncFromProp() {
|
|
18
|
-
|
|
20
|
+
if (controlledState.isControlled(this.value))
|
|
21
|
+
this.internalValue = this.value;
|
|
19
22
|
}
|
|
20
23
|
syncState() {
|
|
21
24
|
const tabs = this.getTabs();
|
|
@@ -36,11 +39,8 @@ const UITabs = class {
|
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
componentDidLoad() {
|
|
39
|
-
this.
|
|
40
|
-
if (!this.
|
|
41
|
-
this.internalValue = this.defaultValue;
|
|
42
|
-
}
|
|
43
|
-
if (!this.internalValue) {
|
|
42
|
+
this.internalValue = controlledState.controlledOrDefault(this.value, this.defaultValue);
|
|
43
|
+
if (!controlledState.isControlled(this.value) && !this.internalValue) {
|
|
44
44
|
const tabs = this.getTabs();
|
|
45
45
|
if (tabs.length > 0) {
|
|
46
46
|
this.internalValue = tabs[0]?.id ?? tabs[0]?.getAttribute('aria-controls') ?? '';
|
|
@@ -65,7 +65,8 @@ const UITabs = class {
|
|
|
65
65
|
if (!newValue)
|
|
66
66
|
return;
|
|
67
67
|
const prev = this.internalValue;
|
|
68
|
-
this.
|
|
68
|
+
if (!controlledState.isControlled(this.value))
|
|
69
|
+
this.internalValue = newValue;
|
|
69
70
|
this.syncState();
|
|
70
71
|
events.dispatchDetail(this.host, 'select', { value: newValue, previousValue: prev || undefined, trigger });
|
|
71
72
|
}
|
|
@@ -98,7 +99,7 @@ const UITabs = class {
|
|
|
98
99
|
}
|
|
99
100
|
};
|
|
100
101
|
render() {
|
|
101
|
-
return (index.h(index.Host, { key: '
|
|
102
|
+
return (index.h(index.Host, { key: '8681e699c6afdbafd59ed986b8bf3c815b32cd1c', orientation: this.orientation, "data-orientation": this.orientation }, index.h("slot", { key: '673f4db2ae0aded3bd40934c1fff518cf6f83837' })));
|
|
102
103
|
}
|
|
103
104
|
static get watchers() { return {
|
|
104
105
|
"value": [{
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
5
|
|
|
6
|
-
const uiTextareaCss = () => `:host{display:inline-flex;color:var(--ui-text-primary)}::slotted(textarea){width:100%;appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-default);color:inherit;font:inherit;line-height:var(--ui-line-height-md);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-border-strong)}::slotted(textarea:focus){border-color:var(--ui-focus-ring);box-shadow:0 0 0 3px var(--ui-accent-soft)}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-surface-muted);color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
6
|
+
const uiTextareaCss = () => `:host{display:inline-flex;min-inline-size:0;color:var(--ui-text-primary)}::slotted(textarea){width:100%;appearance:none;border:1px solid var(--ui-control-border, var(--ui-border-default));border-radius:var(--ui-radius-2);background:var(--ui-control-surface, var(--ui-surface-default));color:inherit;font:inherit;line-height:var(--ui-line-height-md);min-block-size:calc(var(--ui-space-12, 3rem) * 2);padding:var(--ui-space-2) var(--ui-space-3);margin:0;resize:vertical;transition:border-color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), background-color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(textarea:hover:not(:focus):not(:disabled)){border-color:var(--ui-control-border-hover, var(--ui-border-strong))}::slotted(textarea:focus){border-color:var(--ui-control-focus, var(--ui-focus-ring));box-shadow:0 0 0 3px var(--ui-control-focus-halo, var(--ui-accent-soft))}:host([data-invalid='true'])::slotted(textarea),::slotted(textarea[aria-invalid='true']){border-color:var(--ui-accent-active)}::slotted(textarea:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted));color:var(--ui-text-muted);cursor:not-allowed}::slotted(textarea:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}`;
|
|
7
7
|
|
|
8
8
|
const UITextarea = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
index.registerInstance(this, hostRef);
|
|
11
11
|
}
|
|
12
12
|
get host() { return index.getElement(this); }
|
|
13
|
-
value
|
|
13
|
+
value;
|
|
14
14
|
defaultValue = '';
|
|
15
15
|
disabled = false;
|
|
16
16
|
invalid = false;
|
|
@@ -19,14 +19,18 @@ const UITextarea = class {
|
|
|
19
19
|
internalValue = '';
|
|
20
20
|
slotRef;
|
|
21
21
|
syncFromProp() {
|
|
22
|
-
this.
|
|
22
|
+
if (this.value !== undefined)
|
|
23
|
+
this.internalValue = this.value;
|
|
23
24
|
}
|
|
24
25
|
syncToTextarea() {
|
|
25
26
|
const textarea = this.getTextarea();
|
|
26
27
|
if (!textarea)
|
|
27
28
|
return;
|
|
28
29
|
this.host.dataset.invalid = this.invalid ? 'true' : '';
|
|
29
|
-
|
|
30
|
+
// An omitted host value leaves the slotted textarea under framework or
|
|
31
|
+
// native-form control instead of resetting it during component updates.
|
|
32
|
+
if (this.value !== undefined)
|
|
33
|
+
textarea.value = this.internalValue;
|
|
30
34
|
textarea.defaultValue = this.defaultValue;
|
|
31
35
|
textarea.disabled = this.disabled;
|
|
32
36
|
textarea.readOnly = this.readOnly;
|
|
@@ -75,7 +79,7 @@ const UITextarea = class {
|
|
|
75
79
|
});
|
|
76
80
|
};
|
|
77
81
|
render() {
|
|
78
|
-
return (index.h(index.Host, { key: '
|
|
82
|
+
return (index.h(index.Host, { key: '6ce80349ca316f7a44d08e83862125f6b4d736a6', "data-invalid": this.invalid ? '' : undefined }, index.h("slot", { key: '2c1ce87c9019d8346673ae5e7dd8a543d1bcb91c', ref: (el) => (this.slotRef = el) })));
|
|
79
83
|
}
|
|
80
84
|
static get watchers() { return {
|
|
81
85
|
"value": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BHG9Rpil.js');
|
|
4
4
|
var events = require('./events-TcQIzpNv.js');
|
|
5
5
|
var positioning = require('./positioning-i0WrCAdF.js');
|
|
6
6
|
|
|
@@ -12,10 +12,12 @@ const UIToastRegion = class {
|
|
|
12
12
|
}
|
|
13
13
|
get host() { return index.getElement(this); }
|
|
14
14
|
open = true;
|
|
15
|
-
internalOpen =
|
|
15
|
+
internalOpen = false;
|
|
16
16
|
surface = null;
|
|
17
|
+
contentObserver = null;
|
|
18
|
+
pendingDismiss = null;
|
|
17
19
|
syncFromProp() {
|
|
18
|
-
this.
|
|
20
|
+
this.syncContents();
|
|
19
21
|
}
|
|
20
22
|
syncSurface() {
|
|
21
23
|
if (this.internalOpen)
|
|
@@ -25,22 +27,39 @@ const UIToastRegion = class {
|
|
|
25
27
|
}
|
|
26
28
|
componentDidLoad() {
|
|
27
29
|
this.surface = positioning.createViewportSurface(this.host);
|
|
28
|
-
this.
|
|
30
|
+
this.contentObserver = new MutationObserver(this.syncContents);
|
|
31
|
+
this.contentObserver.observe(this.host, { childList: true, subtree: true });
|
|
32
|
+
this.syncContents();
|
|
29
33
|
this.syncSurface();
|
|
30
34
|
this.host.addEventListener('click', this.onClick);
|
|
31
35
|
}
|
|
32
36
|
disconnectedCallback() {
|
|
33
37
|
this.host.removeEventListener('click', this.onClick);
|
|
38
|
+
this.contentObserver?.disconnect();
|
|
39
|
+
this.contentObserver = null;
|
|
34
40
|
this.surface?.destroy();
|
|
35
41
|
this.surface = null;
|
|
36
42
|
}
|
|
37
43
|
getToasts() {
|
|
38
44
|
return Array.from(this.host.querySelectorAll('[data-ui-toast]'));
|
|
39
45
|
}
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
syncContents = () => {
|
|
47
|
+
const nextOpen = this.open && this.getToasts().length > 0;
|
|
48
|
+
const wasOpen = this.internalOpen;
|
|
49
|
+
const completedDismiss = this.pendingDismiss && !this.host.contains(this.pendingDismiss.toast)
|
|
50
|
+
? this.pendingDismiss
|
|
51
|
+
: null;
|
|
52
|
+
this.internalOpen = nextOpen;
|
|
53
|
+
if (wasOpen && !nextOpen && completedDismiss) {
|
|
54
|
+
events.dispatchDetail(this.host, 'close', {
|
|
55
|
+
open: false,
|
|
56
|
+
reason: 'action',
|
|
57
|
+
trigger: completedDismiss.trigger,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (completedDismiss || !this.open)
|
|
61
|
+
this.pendingDismiss = null;
|
|
62
|
+
};
|
|
44
63
|
onClick = (e) => {
|
|
45
64
|
const dismissBtn = e.target.closest?.('[data-ui-toast-dismiss]');
|
|
46
65
|
if (!dismissBtn)
|
|
@@ -49,24 +68,16 @@ const UIToastRegion = class {
|
|
|
49
68
|
if (!toast)
|
|
50
69
|
return;
|
|
51
70
|
const id = toast.id ?? '';
|
|
52
|
-
|
|
53
|
-
toast
|
|
71
|
+
const trigger = events.eventToTrigger(e);
|
|
72
|
+
this.pendingDismiss = { toast: toast, trigger };
|
|
54
73
|
events.dispatchDetail(this.host, 'dismiss', {
|
|
55
74
|
id,
|
|
56
75
|
reason: 'action',
|
|
57
|
-
trigger
|
|
76
|
+
trigger,
|
|
58
77
|
});
|
|
59
|
-
this.updateOpenState();
|
|
60
|
-
if (this.getToasts().length === 0) {
|
|
61
|
-
events.dispatchDetail(this.host, 'close', {
|
|
62
|
-
open: false,
|
|
63
|
-
reason: 'action',
|
|
64
|
-
trigger: events.eventToTrigger(e),
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
78
|
};
|
|
68
79
|
render() {
|
|
69
|
-
return (index.h(index.Host, { key: '
|
|
80
|
+
return (index.h(index.Host, { key: 'b4430aceacb7a66202c6a43ad7b0bbe31c51eb94', role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-open": this.internalOpen ? '' : undefined }, index.h("slot", { key: '8bfb02d38366fab29a1668a53b7834ccd1a9aa65' })));
|
|
70
81
|
}
|
|
71
82
|
static get watchers() { return {
|
|
72
83
|
"open": [{
|