@threadlabs/looma 0.1.23 → 0.1.25
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-NB6DBRXQ.js +323 -0
- package/dist/{chunk-GDMQKT5F.js → chunk-UY423IKN.js} +33 -30
- package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
- package/dist/cjs/icons-BAdjrnhS.js +680 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/looma.cjs.js +1 -1
- package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar-group.cjs.entry.js +9 -17
- package/dist/cjs/ui-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ui-badge.cjs.entry.js +2 -2
- package/dist/cjs/ui-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-callout.cjs.entry.js +27 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +13 -7
- package/dist/cjs/{ui-combobox.cjs.entry.js → ui-chip_2.cjs.entry.js} +29 -4
- package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-dialog.cjs.entry.js +44 -8
- package/dist/cjs/ui-disclosure.cjs.entry.js +9 -6
- package/dist/cjs/ui-editable.cjs.entry.js +100 -0
- package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-form-field.cjs.entry.js +59 -4
- package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-input.cjs.entry.js +1 -1
- package/dist/cjs/ui-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/ui-menu.cjs.entry.js +14 -9
- package/dist/cjs/ui-multi-combobox.cjs.entry.js +158 -0
- package/dist/cjs/ui-popover.cjs.entry.js +10 -7
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio.cjs.entry.js +16 -7
- package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
- package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-switch.cjs.entry.js +19 -10
- package/dist/cjs/ui-tabs.cjs.entry.js +10 -9
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast-region.cjs.entry.js +30 -19
- package/dist/cjs/ui-tooltip.cjs.entry.js +12 -8
- package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
- package/dist/cjs/ui-tree-item.cjs.entry.js +54 -617
- package/dist/cjs/ui-tree.cjs.entry.js +123 -11
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +1 -1
- package/dist/collection/components/ui-avatar/ui-avatar.css +4 -4
- package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +2 -2
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +8 -16
- package/dist/collection/components/ui-badge/ui-badge.css +64 -48
- package/dist/collection/components/ui-badge/ui-badge.js +1 -1
- package/dist/collection/components/ui-button/ui-button.js +1 -1
- package/dist/collection/components/ui-callout/ui-callout.css +74 -0
- package/dist/collection/components/ui-callout/ui-callout.js +59 -0
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +16 -11
- package/dist/collection/components/ui-chip/ui-chip.css +47 -0
- package/dist/collection/components/ui-chip/ui-chip.js +67 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +49 -4
- 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-editable/ui-editable.css +2 -0
- package/dist/collection/components/ui-editable/ui-editable.js +196 -0
- package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
- package/dist/collection/components/ui-form-field/ui-form-field.js +59 -4
- package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
- package/dist/collection/components/ui-input/ui-input.js +1 -1
- package/dist/collection/components/ui-menu/ui-menu.css +12 -23
- package/dist/collection/components/ui-menu/ui-menu.js +16 -12
- package/dist/collection/components/ui-menu-item/ui-menu-item.css +9 -3
- package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
- package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.css +29 -0
- package/dist/collection/components/ui-multi-combobox/ui-multi-combobox.js +503 -0
- package/dist/collection/components/ui-popover/ui-popover.css +14 -5
- package/dist/collection/components/ui-popover/ui-popover.js +12 -10
- package/dist/collection/components/ui-radio/ui-radio.js +24 -11
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
- package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-switch/ui-switch.js +22 -14
- package/dist/collection/components/ui-tabs/ui-tabs.js +13 -13
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-toast-region/ui-toast-region.js +30 -19
- package/dist/collection/components/ui-tooltip/ui-tooltip.css +16 -7
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +14 -11
- package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
- package/dist/collection/components/ui-tree/ui-tree.css +2 -1
- package/dist/collection/components/ui-tree/ui-tree.js +122 -10
- package/dist/collection/components/ui-tree-item/ui-tree-item.js +61 -44
- package/dist/collection/field/editable.js +1 -0
- package/dist/collection/field/multi-combobox.js +1 -0
- package/dist/collection/icons.js +6 -1
- package/dist/collection/utils/controlled-state.js +4 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-B9CzOHvE.js +1 -0
- package/dist/components/p-BMgIcOh-.js +1 -0
- package/dist/components/p-BVteuP_d.js +1 -0
- package/dist/components/p-BnGhGgTH.js +1 -0
- package/dist/components/p-C6p-ygxq.js +1 -0
- package/dist/components/p-CoFximGM.js +13 -0
- package/dist/components/ui-affordance-scope.js +1 -1
- package/dist/components/ui-avatar-group.js +1 -1
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-callout.d.ts +11 -0
- package/dist/components/ui-callout.js +1 -0
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-chip.d.ts +11 -0
- package/dist/components/ui-chip.js +1 -0
- package/dist/components/ui-combobox.js +1 -1
- package/dist/components/ui-context-menu.js +1 -1
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-disclosure.js +1 -1
- package/dist/components/ui-editable.d.ts +11 -0
- package/dist/components/ui-editable.js +1 -0
- 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-multi-combobox.d.ts +11 -0
- package/dist/components/ui-multi-combobox.js +1 -0
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-radio.js +1 -1
- package/dist/components/ui-search-result-row.js +1 -1
- package/dist/components/ui-search-shell.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-toast-region.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/components/ui-tree-item.js +1 -13
- package/dist/components/ui-tree.js +1 -1
- package/dist/esm/controlled-state-BnGhGgTH.js +6 -0
- package/dist/esm/icons-CoFximGM.js +678 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/looma.js +1 -1
- package/dist/esm/ui-affordance-scope.entry.js +1 -1
- package/dist/esm/ui-avatar-group.entry.js +9 -17
- package/dist/esm/ui-avatar.entry.js +2 -2
- package/dist/esm/ui-badge.entry.js +2 -2
- package/dist/esm/ui-button.entry.js +1 -1
- package/dist/esm/ui-callout.entry.js +25 -0
- package/dist/esm/ui-checkbox.entry.js +13 -7
- package/dist/esm/{ui-combobox.entry.js → ui-chip_2.entry.js} +30 -6
- package/dist/esm/ui-context-menu.entry.js +1 -1
- package/dist/esm/ui-dialog.entry.js +44 -8
- package/dist/esm/ui-disclosure.entry.js +9 -6
- package/dist/esm/ui-editable.entry.js +98 -0
- package/dist/esm/ui-floating-action-button.entry.js +1 -1
- package/dist/esm/ui-form-field.entry.js +59 -4
- package/dist/esm/ui-icon-button.entry.js +1 -1
- package/dist/esm/ui-input.entry.js +1 -1
- package/dist/esm/ui-menu-item.entry.js +2 -2
- package/dist/esm/ui-menu.entry.js +14 -9
- package/dist/esm/ui-multi-combobox.entry.js +156 -0
- package/dist/esm/ui-popover.entry.js +10 -7
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-radio.entry.js +16 -7
- package/dist/esm/ui-search-result-row.entry.js +1 -1
- package/dist/esm/ui-search-shell.entry.js +1 -1
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-switch.entry.js +19 -10
- package/dist/esm/ui-tabs.entry.js +10 -9
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-toast-region.entry.js +30 -19
- package/dist/esm/ui-tooltip.entry.js +12 -8
- package/dist/esm/ui-top-bar.entry.js +1 -1
- package/dist/esm/ui-tree-item.entry.js +54 -617
- package/dist/esm/ui-tree.entry.js +123 -11
- package/dist/index.cjs +1552 -894
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +12 -2
- package/dist/looma/looma.esm.js +1 -1
- package/dist/looma/p-08f80207.entry.js +1 -0
- package/dist/looma/{p-ed368426.entry.js → p-0e1741cb.entry.js} +1 -1
- package/dist/looma/p-0ef4bf13.entry.js +1 -0
- package/dist/looma/{p-7e0bb7f6.entry.js → p-166f8593.entry.js} +1 -1
- package/dist/looma/p-262a542c.entry.js +1 -0
- package/dist/looma/{p-13347631.entry.js → p-26d357ae.entry.js} +1 -1
- package/dist/looma/p-30f01909.entry.js +1 -0
- package/dist/looma/p-393e3e02.entry.js +1 -0
- package/dist/looma/p-3a44b9f9.entry.js +1 -0
- package/dist/looma/p-558d4f5b.entry.js +1 -0
- package/dist/looma/{p-5a87b59d.entry.js → p-5780cefa.entry.js} +1 -1
- package/dist/looma/p-5a7261e1.entry.js +1 -0
- package/dist/looma/p-5fdcee1d.entry.js +1 -0
- package/dist/looma/{p-add36e74.entry.js → p-72338f53.entry.js} +1 -1
- package/dist/looma/p-7319c147.entry.js +1 -0
- package/dist/looma/p-78b7e466.entry.js +1 -0
- package/dist/looma/{p-a90d2821.entry.js → p-7ab661ec.entry.js} +1 -1
- package/dist/looma/p-7eb04f09.entry.js +1 -0
- package/dist/looma/{p-69a5557b.entry.js → p-81c533f5.entry.js} +1 -1
- package/dist/looma/p-87f501cf.entry.js +1 -0
- package/dist/looma/p-89e71bbb.entry.js +1 -0
- package/dist/looma/{p-8b8840b8.entry.js → p-92cd1841.entry.js} +1 -1
- package/dist/looma/{p-f0487ff3.entry.js → p-95eb3b58.entry.js} +1 -1
- package/dist/looma/p-96ec4d7a.entry.js +1 -0
- package/dist/looma/p-9d2662ca.entry.js +1 -0
- package/dist/looma/p-BnGhGgTH.js +1 -0
- package/dist/looma/p-CoFximGM.js +13 -0
- package/dist/looma/p-add67e4c.entry.js +1 -0
- package/dist/looma/p-b6c776fb.entry.js +1 -0
- package/dist/looma/p-bcb1b47b.entry.js +1 -0
- package/dist/looma/p-d56571a2.entry.js +1 -0
- package/dist/looma/{p-582973b5.entry.js → p-d62da01d.entry.js} +1 -1
- package/dist/looma/{p-f74e5546.entry.js → p-dbcb479c.entry.js} +1 -1
- package/dist/looma/p-e14024bf.entry.js +1 -0
- package/dist/looma/{p-5da09f47.entry.js → p-fc180770.entry.js} +1 -1
- 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 +8 -0
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +4 -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-editable/ui-editable.d.ts +24 -0
- package/dist/types/components/ui-form-field/ui-form-field.d.ts +8 -0
- package/dist/types/components/ui-menu/ui-menu.d.ts +2 -1
- package/dist/types/components/ui-multi-combobox/ui-multi-combobox.d.ts +47 -0
- package/dist/types/components/ui-popover/ui-popover.d.ts +2 -1
- package/dist/types/components/ui-radio/ui-radio.d.ts +4 -1
- package/dist/types/components/ui-switch/ui-switch.d.ts +2 -1
- package/dist/types/components/ui-tabs/ui-tabs.d.ts +2 -1
- package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +3 -1
- package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +2 -1
- package/dist/types/components/ui-tree/ui-tree.d.ts +12 -0
- package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +11 -7
- package/dist/types/components.d.ts +343 -46
- package/dist/types/field/editable.d.ts +5 -0
- package/dist/types/field/multi-combobox.d.ts +11 -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-VO4C2MZX.js → ui-affordance-scope.entry-VSSP52ZP.js} +2 -2
- package/dist/ui-avatar-group.entry-JMCLL6FW.js +51 -0
- package/dist/{ui-avatar.entry-T6FU6ZYM.js → ui-avatar.entry-X2YQ3QPG.js} +3 -3
- package/dist/ui-badge.entry-OJ6FJJKL.js +22 -0
- package/dist/{ui-button.entry-7UXMUGHN.js → ui-button.entry-ZN6JLND7.js} +2 -2
- package/dist/ui-callout.entry-7K6NXQ7U.js +32 -0
- package/dist/{ui-checkbox.entry-DMZJB3RE.js → ui-checkbox.entry-GUYRVU6O.js} +17 -8
- package/dist/{ui-combobox.entry-ZCTPXEES.js → ui-chip_2.entry-M2DOTIGY.js} +32 -7
- package/dist/{ui-context-menu.entry-2WMCBGCP.js → ui-context-menu.entry-BM7FHOUJ.js} +5 -5
- package/dist/{ui-dialog.entry-WO23XOSW.js → ui-dialog.entry-AZAD37CG.js} +50 -12
- package/dist/{ui-disclosure.entry-USX7OUEW.js → ui-disclosure.entry-XDPGKMBK.js} +13 -7
- package/dist/ui-editable.entry-S3TE6KFT.js +110 -0
- package/dist/{ui-floating-action-button.entry-MXDIN7MV.js → ui-floating-action-button.entry-U7HGA3CS.js} +2 -2
- package/dist/ui-form-field.entry-C2ZSP3TM.js +120 -0
- package/dist/{ui-icon-button.entry-MJUNXHBU.js → ui-icon-button.entry-P6H2LY7D.js} +2 -2
- package/dist/{ui-input.entry-AWG63YIG.js → ui-input.entry-GTNQJCQ2.js} +2 -2
- package/dist/ui-menu-item.entry-2HWOGUO5.js +22 -0
- package/dist/{ui-menu.entry-IT3GW5TL.js → ui-menu.entry-NZ7ER54K.js} +22 -14
- package/dist/ui-multi-combobox.entry-DZ5LLSVQ.js +167 -0
- package/dist/{ui-popover.entry-ZQQB4N6E.js → ui-popover.entry-ZOEQMUWG.js} +17 -11
- package/dist/{ui-radio-group.entry-V7PCTS7I.js → ui-radio-group.entry-QCQ46EK5.js} +2 -2
- package/dist/{ui-radio.entry-JYH6TQBI.js → ui-radio.entry-QAATWUYT.js} +20 -8
- package/dist/{ui-search-result-row.entry-JBNYXXUN.js → ui-search-result-row.entry-2I3DH2OT.js} +2 -2
- package/dist/{ui-search-shell.entry-TEAWE76O.js → ui-search-shell.entry-7RS55ORF.js} +2 -2
- package/dist/{ui-select.entry-F3A6TE2U.js → ui-select.entry-6O4KD4G7.js} +2 -2
- package/dist/{ui-switch.entry-MJIICMP2.js → ui-switch.entry-DY5PSHCQ.js} +23 -11
- package/dist/{ui-tabs.entry-6REFIUHV.js → ui-tabs.entry-6X56UOUE.js} +14 -10
- package/dist/{ui-textarea.entry-OJTXCED7.js → ui-textarea.entry-RDYP6O77.js} +2 -2
- package/dist/{ui-toast-region.entry-NOFXLKPS.js → ui-toast-region.entry-EBY42KS5.js} +32 -23
- package/dist/{ui-tooltip.entry-COWTWVHX.js → ui-tooltip.entry-PLXMPOKV.js} +19 -12
- package/dist/{ui-top-bar.entry-PIAWXJNV.js → ui-top-bar.entry-QKE2DLVD.js} +2 -2
- package/dist/ui-tree-item.entry-TC6YWIC6.js +145 -0
- package/dist/{ui-tree.entry-XYI3ZFAZ.js → ui-tree.entry-UL6UHCUT.js} +114 -12
- package/editor/{chunk-QCOYOVQL.js → chunk-B5WVJOPV.js} +113 -97
- package/editor/extensions/index.d.ts +14 -6
- package/editor/extensions/index.js +1 -1
- package/editor/index.js +1 -1
- package/editor.css +37 -20
- package/package.json +1 -1
- package/styles.css +10 -0
- package/tokens.css +3 -0
- package/vue/{chunk-JLW23USW.js → chunk-GXQY27K2.js} +112 -17
- package/vue/editor/index.d.ts +5 -15
- package/vue/editor/index.js +1 -1
- package/vue/index.d.ts +442 -116
- package/vue/index.js +9 -1
- package/dist/components/p-CaietZcq.js +0 -1
- package/dist/components/p-DHd18bK7.js +0 -1
- package/dist/looma/p-14c081cf.entry.js +0 -1
- package/dist/looma/p-25366205.entry.js +0 -1
- package/dist/looma/p-2e3aa869.entry.js +0 -1
- package/dist/looma/p-40fe7fee.entry.js +0 -1
- package/dist/looma/p-446cda76.entry.js +0 -1
- package/dist/looma/p-4fc1b005.entry.js +0 -13
- package/dist/looma/p-6a8a4736.entry.js +0 -1
- package/dist/looma/p-6bf4038b.entry.js +0 -1
- package/dist/looma/p-8204fee6.entry.js +0 -1
- package/dist/looma/p-8238e0dc.entry.js +0 -1
- package/dist/looma/p-99d88efb.entry.js +0 -1
- package/dist/looma/p-a27669b1.entry.js +0 -1
- package/dist/looma/p-a6ee76b7.entry.js +0 -1
- package/dist/looma/p-b6398a6b.entry.js +0 -1
- package/dist/looma/p-d50faaff.entry.js +0 -1
- package/dist/looma/p-d77278ce.entry.js +0 -1
- package/dist/looma/p-d9ec13b7.entry.js +0 -1
- package/dist/looma/p-ecf8005f.entry.js +0 -1
- package/dist/ui-avatar-group.entry-TAXJRIIU.js +0 -59
- package/dist/ui-badge.entry-MZFYNBMJ.js +0 -22
- package/dist/ui-form-field.entry-7ZCMEHPY.js +0 -67
- package/dist/ui-menu-item.entry-HFTWG62N.js +0 -22
- package/dist/ui-tree-item.entry-BSEWNL2O.js +0 -389
package/vue/index.js
CHANGED
|
@@ -5,13 +5,16 @@ import {
|
|
|
5
5
|
AvatarGroup,
|
|
6
6
|
Badge,
|
|
7
7
|
Button,
|
|
8
|
+
Callout,
|
|
8
9
|
Center,
|
|
9
10
|
Checkbox,
|
|
11
|
+
Chip,
|
|
10
12
|
Cluster,
|
|
11
13
|
Combobox,
|
|
12
14
|
ContextMenu,
|
|
13
15
|
Dialog,
|
|
14
16
|
Disclosure,
|
|
17
|
+
Editable,
|
|
15
18
|
FloatingActionButton,
|
|
16
19
|
FormField,
|
|
17
20
|
Grid,
|
|
@@ -20,6 +23,7 @@ import {
|
|
|
20
23
|
Input,
|
|
21
24
|
Menu,
|
|
22
25
|
MenuItem,
|
|
26
|
+
MultiCombobox,
|
|
23
27
|
Popover,
|
|
24
28
|
Radio,
|
|
25
29
|
RadioGroup,
|
|
@@ -40,7 +44,7 @@ import {
|
|
|
40
44
|
Tree,
|
|
41
45
|
TreeItem,
|
|
42
46
|
VUE_ADAPTER_NOTE
|
|
43
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-GXQY27K2.js";
|
|
44
48
|
export {
|
|
45
49
|
ADAPTER_COMPONENT_TAG_MAP,
|
|
46
50
|
AffordanceScope,
|
|
@@ -48,13 +52,16 @@ export {
|
|
|
48
52
|
AvatarGroup,
|
|
49
53
|
Badge,
|
|
50
54
|
Button,
|
|
55
|
+
Callout,
|
|
51
56
|
Center,
|
|
52
57
|
Checkbox,
|
|
58
|
+
Chip,
|
|
53
59
|
Cluster,
|
|
54
60
|
Combobox,
|
|
55
61
|
ContextMenu,
|
|
56
62
|
Dialog,
|
|
57
63
|
Disclosure,
|
|
64
|
+
Editable,
|
|
58
65
|
FloatingActionButton,
|
|
59
66
|
FormField,
|
|
60
67
|
Grid,
|
|
@@ -63,6 +70,7 @@ export {
|
|
|
63
70
|
Input,
|
|
64
71
|
Menu,
|
|
65
72
|
MenuItem,
|
|
73
|
+
MultiCombobox,
|
|
66
74
|
Popover,
|
|
67
75
|
Radio,
|
|
68
76
|
RadioGroup,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as i,d as s,h as e,c as o,t as r}from"./p-Bh_1GxOD.js";import{o as h,c as n}from"./p-C-0syqXZ.js";import{d as a}from"./p-JwSoedEO.js";import{c as l}from"./p-DOulVJT7.js";const c=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.opened=s(this,"open"),this.closed=s(this,"close")}get host(){return this}for="";open=!1;defaultOpen=!1;placement="top-start";showDelay=500;hideDelay=100;toggleOnClick=!1;pinned=!1;focused=!1;opened;closed;internalOpen=!1;overlayId=`ui-tooltip-${Math.random().toString(36).slice(2,11)}`;trigger=null;surface=null;showTimer=null;hideTimer=null;syncFromProp(){this.clearTimers(),this.internalOpen=this.open}resetSurface(){this.syncTrigger(),this.setupSurface(),this.syncOverlay()}syncOverlay(){this.internalOpen?(this.surface?.show(),h({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.trigger?[this.trigger]:void 0,dismissible:!0,requestClose:(t,i)=>this.handleRequestClose(t,i)})):(this.surface?.hide(),n(this.overlayId))}componentDidLoad(){this.host.id||(this.host.id=this.overlayId),this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.syncTrigger(),this.setupSurface(),this.host.addEventListener("pointerenter",this.onSurfaceEnter),this.host.addEventListener("pointerleave",this.onTriggerLeave),this.syncOverlay()}componentDidUpdate(){this.syncTrigger()}disconnectedCallback(){this.clearTimers(),this.detachTriggerListeners(),this.surface?.destroy(),this.surface=null,this.host.removeEventListener("pointerenter",this.onSurfaceEnter),this.host.removeEventListener("pointerleave",this.onTriggerLeave),n(this.overlayId)}syncTrigger(){const t=this.for?this.host.getRootNode().getElementById(this.for):this.host.previousElementSibling;t!==this.trigger&&(this.detachTriggerListeners(),this.trigger=t,this.attachTriggerListeners(),this.surface?.setAnchor(t))}setupSurface(){this.surface?.destroy(),this.surface=l(this.host,{anchor:this.trigger,placement:this.placement})}attachTriggerListeners(){if(this.detachTriggerListeners(),!this.trigger)return;const t=new Set((this.trigger.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));t.add(this.host.id),this.trigger.setAttribute("aria-describedby",[...t].join(" ")),this.trigger.addEventListener("click",this.onTriggerClick),this.trigger.addEventListener("keydown",this.onTriggerKeydown),this.trigger.addEventListener("pointerenter",this.onTriggerEnter),this.trigger.addEventListener("pointerleave",this.onTriggerLeave),this.trigger.addEventListener("focusin",this.onTriggerFocusIn),this.trigger.addEventListener("focusout",this.onTriggerFocusOut)}detachTriggerListeners(){if(!this.trigger)return;const t=(this.trigger.getAttribute("aria-describedby")||"").split(/\s+/).filter((t=>t&&t!==this.host.id));t.length?this.trigger.setAttribute("aria-describedby",t.join(" ")):this.trigger.removeAttribute("aria-describedby"),this.trigger.removeEventListener("click",this.onTriggerClick),this.trigger.removeEventListener("keydown",this.onTriggerKeydown),this.trigger.removeEventListener("pointerenter",this.onTriggerEnter),this.trigger.removeEventListener("pointerleave",this.onTriggerLeave),this.trigger.removeEventListener("focusin",this.onTriggerFocusIn),this.trigger.removeEventListener("focusout",this.onTriggerFocusOut)}clearShowTimer(){null!==this.showTimer&&(clearTimeout(this.showTimer),this.showTimer=null)}clearHideTimer(){null!==this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null)}clearTimers(){this.clearShowTimer(),this.clearHideTimer()}setInteractionOpen(t,i){this.internalOpen!==t&&(this.internalOpen=t,a(this.host,t?"open":"close",{open:t,reason:"action",trigger:i}))}onSurfaceEnter=()=>this.clearHideTimer();onTriggerClick=t=>{this.toggleOnClick&&(this.clearTimers(),this.pinned=!this.pinned,this.setInteractionOpen(this.pinned,0===t.detail?"keyboard":"pointer"))};onTriggerKeydown=t=>{"Escape"===t.key&&this.clearTimers()};onTriggerEnter=t=>{"touch"!==t.pointerType&&(this.clearHideTimer(),this.internalOpen||null!==this.showTimer||(this.showTimer=setTimeout((()=>{this.showTimer=null,this.setInteractionOpen(!0,"pointer")}),Math.max(0,this.showDelay))))};onTriggerLeave=()=>{this.clearShowTimer(),this.focused||this.pinned||!this.internalOpen||null!==this.hideTimer||(this.hideTimer=setTimeout((()=>{this.hideTimer=null,this.setInteractionOpen(!1,"pointer")}),Math.max(0,this.hideDelay)))};onTriggerFocusIn=()=>{this.focused=!0,this.clearTimers(),this.setInteractionOpen(!0,"keyboard")};onTriggerFocusOut=t=>{const i=t.relatedTarget;i&&this.host.contains(i)||(this.focused=!1,this.pinned=!1,this.clearTimers(),this.setInteractionOpen(!1,"keyboard"))};handleRequestClose(t,i){("escape"===t||"light-dismiss"===t&&this.toggleOnClick)&&(this.pinned=!1,this.clearTimers(),this.internalOpen=!1,a(this.host,"close",{open:!1,reason:t,trigger:i}))}render(){return e(o,{key:"b0199c23316a707ae3e1e7c361f2838872f62221",role:"tooltip",hidden:!this.internalOpen,"data-open":this.internalOpen?"":void 0},e("slot",{key:"d0c7822f2f47848a509bf8e310806edbdb320f02"}))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncOverlay:0}]}}static get style(){return":host{position:fixed;inset:auto;margin:0;display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md);opacity:0;transform:translateY(4px);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}"}},[769,"ui-tooltip",{for:[1],open:[4],defaultOpen:[4,"default-open"],placement:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],toggleOnClick:[4,"toggle-on-click"],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncOverlay:0}]}]);function d(){"undefined"!=typeof customElements&&["ui-tooltip"].forEach((t=>{"ui-tooltip"===t&&(customElements.get(r(t))||customElements.define(r(t),c))}))}export{c as U,d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,H as t,h as i,c as s,t as a}from"./p-Bh_1GxOD.js";import{d as r,e as o}from"./p-JwSoedEO.js";import{o as n,c as u,r as l}from"./p-C-0syqXZ.js";import{c}from"./p-DOulVJT7.js";const d=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}get host(){return this}open=!1;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId=`ui-menu-${Math.random().toString(36).slice(2,11)}`;anchor=null;surface=null;syncFromProp(){this.internalOpen=this.open}resetSurface(){this.setupSurface(),this.syncSurface()}syncSurface(){this.syncAnchorState(),this.surface&&(this.internalOpen?(this.surface.show(),n({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(e,t)=>this.closeMenu(e,t)})):(this.surface.hide(),u(this.overlayId)))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncSurface()}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,u(this.overlayId)}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=c(this.host,{anchor:this.anchor,placement:this.placement}))}syncAnchorState(){this.anchor&&(this.anchor.setAttribute("aria-haspopup","menu"),this.anchor.setAttribute("aria-expanded",this.internalOpen?"true":"false"))}closeMenu(e,t){this.internalOpen&&(this.internalOpen=!1,r(this.host,"close",{open:!1,reason:e,trigger:t}),"escape"===e&&this.anchor?.focus())}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";r(this.host,"select",{value:i,trigger:o(e)}),r(this.host,"close",{open:!1,reason:"action",trigger:o(e)}),this.internalOpen=!1};onKeydown=e=>{if("Escape"===e.key)return e.preventDefault(),void l("escape","keyboard");const i=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===i.length)return;const s=e.target.closest?.("ui-menu-item"),a=s&&s instanceof t?i.indexOf(s):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i["ArrowDown"===e.key?a<0?0:Math.min(a+1,i.length-1):a<=0?i.length-1:a-1].focus());else if(e.preventDefault(),s&&a>=0){const e=s.getAttribute("value")??s.getAttribute("data-value")??"";r(this.host,"select",{value:e,trigger:"keyboard"}),r(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return i(s,{key:"25ae79e914820dfc470fa03d8c843646c3c060d9",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("slot",{key:"b3a8b130e55610d948bc3e4603dede59dd560d05"}))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}}static get style(){return":host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}"}},[769,"ui-menu",{open:[4],defaultOpen:[4,"default-open"],for:[1],placement:[1],internalOpen:[32]},void 0,{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}]);function p(){"undefined"!=typeof customElements&&["ui-menu"].forEach((e=>{"ui-menu"===e&&(customElements.get(a(e))||customElements.define(a(e),d))}))}export{d as U,p as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,g as t,h as i,H as r}from"./p-8BGiMGQ0.js";import{c as a}from"./p-hgBUJRDa.js";const o=class{constructor(t){e(this,t)}get host(){return t(this)}invalid=!1;disabled=!1;required=!1;componentDidLoad(){this.wire()}componentDidUpdate(){this.wire()}wire(){const e=this.host.querySelector("label"),t=this.host.querySelector("input, textarea, select"),i=this.host.querySelector('[data-slot="help"]'),r=this.host.querySelector('[data-slot="error"], [role="alert"]');if(!t)return;t.id||(t.id=a("form-field-input")),e&&!e.getAttribute("for")&&e.setAttribute("for",t.id);const o=[];i&&(i.id||(i.id=a("form-field-help")),o.push(i.id)),r&&(r.id||(r.id=a("form-field-error")),o.push(r.id)),o.length&&t.setAttribute("aria-describedby",o.join(" ")),t.disabled=this.disabled,t.required=this.required,t.setAttribute("aria-invalid",this.invalid?"true":"false")}render(){return i(r,{key:"cdd06c6b16ac56f3547e64e7888d8766243392db","data-invalid":this.invalid?"":void 0,"data-disabled":this.disabled?"":void 0,"data-required":this.required?"":void 0},i("slot",{key:"7d545673a3485f8beee01b13ab56185b98ba8856"}))}};o.style=":host{display:grid;gap:var(--ui-space-2);min-inline-size:0;align-content:start;color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){min-block-size:var(--ui-form-field-help-min-block-size, 0);color:var(--ui-text-muted);font-size:0.875rem;line-height:var(--ui-line-height-md)}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}";export{o as ui_form_field}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as e,h as i,H as s}from"./p-8BGiMGQ0.js";import{d as c,e as n}from"./p-JwSoedEO.js";const o=class{constructor(e){t(this,e)}get host(){return e(this)}checked=!1;defaultChecked=!1;disabled=!1;indeterminate=!1;required=!1;value="on";internalChecked=!1;slotRef;syncFromProp(){this.internalChecked=this.checked}syncToInput(){const t=this.getInput();t&&(this.host.dataset.disabled=this.disabled?"true":"",this.host.setAttribute("aria-disabled",String(this.disabled)),t.checked=this.internalChecked,t.indeterminate=this.indeterminate,t.disabled=this.disabled,t.required=this.required,t.value=this.value)}componentDidLoad(){this.syncFromProp(),this.internalChecked=this.internalChecked||this.defaultChecked,this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const t=this.getInput();t?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const t=this.getInput();t?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>t instanceof HTMLInputElement&&"checkbox"===t.type))??null}onInputChange=t=>{const e=t.target;e&&(this.internalChecked=e.checked,this.indeterminate=e.indeterminate,c(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:n(t)}))};render(){return i(s,{key:"66b6708ae71c9eca6c03c63891b590bd050c2506",role:"checkbox","aria-checked":this.indeterminate?"mixed":String(this.internalChecked),"aria-disabled":String(this.disabled),"data-disabled":this.disabled?"":void 0},i("slot",{key:"b5e168a9ff0c6e5e747fff6c6264c59744f10a56",ref:t=>this.slotRef=t}))}static get watchers(){return{checked:[{syncFromProp:0}],internalChecked:[{syncToInput:0}],indeterminate:[{syncToInput:0}],disabled:[{syncToInput:0}],required:[{syncToInput:0}]}}};o.style=":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}";export{o as ui_checkbox}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as s,h as i,H as e}from"./p-8BGiMGQ0.js";import{c as n}from"./p-hgBUJRDa.js";import{d as o,e as r,i as h}from"./p-JwSoedEO.js";const a=class{constructor(s){t(this,s)}get host(){return s(this)}open=!1;defaultOpen=!1;disabled=!1;internalOpen=!1;contentId="";trigger=null;content=null;syncFromProp(){this.internalOpen=this.open}syncState(){this.trigger&&this.trigger.setAttribute("aria-expanded",String(this.internalOpen)),this.content&&(this.content.hidden=!this.internalOpen)}componentDidLoad(){this.resolveParts(),this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.syncState(),this.trigger?.addEventListener("click",this.onTriggerClick),this.trigger?.addEventListener("keydown",this.onTriggerKeydown)}disconnectedCallback(){this.trigger?.removeEventListener("click",this.onTriggerClick),this.trigger?.removeEventListener("keydown",this.onTriggerKeydown)}componentDidUpdate(){this.syncState()}resolveParts(){this.trigger=this.host.querySelector("[data-ui-disclosure-trigger], button, [aria-controls]");const t=this.trigger?.getAttribute("aria-controls")??"";if(t)this.content=document.getElementById(t);else{const t=Array.from(this.host.children);this.content=t.find((t=>t!==this.trigger))??null}this.trigger&&this.content&&(this.content.id||(this.content.id=n("disclosure-content")),this.trigger.setAttribute("aria-controls",this.content.id),this.contentId=this.content.id),this.trigger instanceof HTMLButtonElement?this.trigger.disabled=this.disabled:this.trigger&&this.trigger.setAttribute("aria-disabled",String(this.disabled))}setOpen(t,s){this.internalOpen!==t&&(this.internalOpen=t,o(this.host,t?"open":"close",{open:t,reason:s.reason,trigger:s.trigger}))}onTriggerClick=t=>{this.disabled?t.preventDefault():this.setOpen(!this.internalOpen,{reason:"action",trigger:r(t)})};onTriggerKeydown=t=>{!this.disabled&&h(t)&&(t.preventDefault(),this.setOpen(!this.internalOpen,{reason:"action",trigger:"keyboard"}))};render(){return i(e,{key:"3905d2d78a2d3d4ef36b582ba0f426be8e5e0f5e"},i("slot",{key:"18547ff56457b73319264bba981f994fb947dffb"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncState:0}]}}};a.style=":host{display:block}::slotted([hidden]){display:none !important}";export{a as ui_disclosure}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,g as s,h as e,H as a}from"./p-8BGiMGQ0.js";import{a as o}from"./p-Bu0dmLBE.js";import{c as r,o as h}from"./p-C-0syqXZ.js";const n=class{constructor(s){i(this,s),this.queryChange=t(this,"query-change"),this.valueChange=t(this,"value-change"),this.freeEntry=t(this,"free-entry"),this.createEntry=t(this,"create-entry"),this.dependencyInvalidate=t(this,"dependency-invalidate"),this.validationChange=t(this,"validation-change"),this.optionsChange=t(this,"options-change")}get host(){return s(this)}label="";placeholder="";name="";value;defaultValue;query;defaultQuery="";config={};disabled=!1;readOnly=!1;required=!1;size="md";disclosure=!1;clearable=!1;help="";queryChange;valueChange;freeEntry;createEntry;dependencyInvalidate;validationChange;optionsChange;raw="";display="";selected=null;expanded=!1;rows=[];active=-1;loading=!1;helpOpen=!1;lookupError="";validation={status:"pristine",touched:!1,dirty:!1,issues:[]};input;popup;field;surface;lookup;validationRun;lookupTimer;composing=!1;initialRaw="";overlayId=`ui-combobox-${Math.random().toString(36).slice(2)}`;alive=!1;fullSet=!1;knownOptions=new Map;awaitingLabel=null;proposedChange;formattedRaw;formattedWith;componentWillLoad(){this.selected=void 0!==this.value?this.value:this.defaultValue??null,this.raw=this.query??this.defaultQuery,void 0!==this.query||this.raw||null===this.selected||(this.raw=this.config.options?.find((i=>i.value===this.selected))?.label??this.selected),void 0===this.query&&null!==this.selected&&this.raw===this.selected&&(this.awaitingLabel=this.selected),this.display=this.raw,this.initialRaw=this.raw,this.applyServerIssues()}connectedCallback(){this.alive=!0,this.setupSurface()}componentDidLoad(){this.setupSurface()}componentDidUpdate(){this.input&&!this.composing&&this.input.value!==this.display&&(this.input.value=this.display),this.expanded&&this.surface?.refresh()}disconnectedCallback(){this.alive=!1,this.close(),this.validationRun?.abort(),this.surface?.destroy(),this.surface=void 0}setupSurface(){!this.surface&&this.popup&&this.field&&(this.surface=o(this.popup,{anchor:this.field,placement:"bottom-start"}))}syncValue(){if(void 0!==this.value){if(this.selected=this.value,void 0===this.query){const i=this.proposedChange,t=this.config.options?.find((i=>i.value===this.selected))??(null===this.selected?void 0:this.knownOptions.get(this.selected)),s=i?.value===this.selected?i.query:t?.label??this.selected??"";i?.value===this.selected&&s===this.raw||(this.raw=s,this.display=this.raw,this.formattedRaw=void 0),this.awaitingLabel=t||null===this.selected?null:this.selected}this.resetValidation()}}syncQuery(){void 0!==this.query&&this.query!==this.raw&&(void 0===this.value&&this.proposedChange?.query!==this.query&&(this.selected=null),this.awaitingLabel=null,this.formattedRaw=void 0,this.raw=this.query,this.display=this.raw,this.resetValidation(),this.expanded&&this.search("input"))}syncDisabled(){(this.disabled||this.readOnly)&&(this.close(),this.resetValidation())}syncConfig(i,t){if(this.validationRun?.abort(),i.provider===t?.provider&&i.context===t?.context||this.knownOptions.clear(),i.context!==t?.context){this.close();const t=i.invalidation??"retain-query";this.commit("retain"===t?this.selected:null,"clear"===t?"":this.raw,null,"invalidation","programmatic"),this.validation={status:"pristine",touched:!1,dirty:this.raw!==this.initialRaw,issues:[]}}this.applyServerIssues(),this.expanded&&this.search("context")}applyServerIssues(){const i=this.config.issues??[];i.length?this.setValidation({issues:i},this.validation.touched):this.resetValidation()}resetValidation(){this.validationRun?.abort(),this.validation={status:"pristine",touched:this.validation.touched,dirty:this.raw!==this.initialRaw,issues:[]},this.validationChange?.emit(this.validation)}cancelLookup(){clearTimeout(this.lookupTimer),this.lookup?.abort(),this.lookup=void 0,this.loading=!1}close(){this.expanded=!1,this.active=-1,this.cancelLookup(),this.surface?.hide(),r(this.overlayId)}open(i="input"){this.disabled||this.readOnly||(this.expanded=!0,this.popup&&this.field&&(this.popup.style.minWidth=`${this.field.getBoundingClientRect().width}px`),this.surface?.show(),h({id:this.overlayId,element:this.popup,relatedElements:[this.host],modal:!1,requestClose:()=>this.close()}),this.search(i))}search(i){this.cancelLookup(),this.fullSet="disclosure"===i,this.active=-1,this.lookupError="";const t=this.config,s=this.fullSet?"":this.raw,e=new AbortController;this.lookup=e;const a=i=>{if(e.signal.aborted||!this.alive)return;for(const t of i)this.knownOptions.set(t.value,t);const a=null===this.selected?void 0:this.knownOptions.get(this.selected);void 0===this.query&&this.awaitingLabel===this.selected&&a&&(this.raw=a.label,this.display=this.raw,this.awaitingLabel=null,this.formattedRaw=void 0,this.resetValidation());const o=new Set;this.rows=i.filter((i=>!o.has(i.id)&&(o.add(i.id),this.fullSet||(t.filter?t.filter(i,s,t.context):!!t.provider||i.label.toLocaleLowerCase().includes(s.toLocaleLowerCase())))));const r=new Map;for(const i of this.rows){const t=i.group??"";r.has(t)||r.set(t,[]),r.get(t).push(i)}this.rows=[...r.values()].flat(),this.loading=!1,this.optionsChange.emit(this.rows)};t.provider?(this.rows=[],this.loading=!0,this.lookupTimer=setTimeout((async()=>{try{a(await t.provider({query:s,context:t.context,signal:e.signal,reason:i}))}catch(i){if(e.signal.aborted||!this.alive)return;this.loading=!1,this.lookupError=i instanceof Error?i.message:"Unable to load suggestions."}}),"disclosure"===i?0:Math.max(0,t.debounce??200))):a(t.options??[])}get canCreate(){return Boolean(this.config.allowCreate&&this.raw.trim()&&!this.loading&&!this.lookupError&&!this.rows.some((i=>i.label.toLocaleLowerCase()===this.raw.toLocaleLowerCase())))}format(i){if((this.config.formatOn??"blur")!==i||!this.input)return;if(this.formattedRaw===this.raw&&this.formattedWith===this.config.format)return;const t=function(i,t,s){const e={display:i,selection:t};if(!s)return e;let a;try{a=s(i,t)}catch{return e}if(!a)return e;const o=Array.from(i);let r=0;for(const i of a.display)i===o[r]&&(r+=1);return!Number.isInteger(a.selection.start)||!Number.isInteger(a.selection.end)||r!==o.length||a.selection.start<0||a.selection.end<a.selection.start||a.selection.end>a.display.length?e:a}(this.raw,{start:this.input.selectionStart??this.raw.length,end:this.input.selectionEnd??this.raw.length,direction:this.input.selectionDirection??"none"},this.config.format);this.formattedRaw=this.raw,this.formattedWith=this.config.format,this.display=t.display,this.input.value!==t.display&&(this.input.value=t.display,this.input.setSelectionRange(t.selection.start,t.selection.end,t.selection.direction))}onInput=i=>{this.composing||i.isComposing||(this.awaitingLabel=null,this.formattedRaw=void 0,this.raw=this.input.value,this.display=this.raw,this.resetValidation(),this.format("input"),this.queryChange.emit({query:this.raw,display:this.display,trigger:"keyboard"}),null!==this.selected&&this.commit(null,this.raw,null,"clear","keyboard"),this.open(),"input"===this.config.validateOn&&this.validate(),queueMicrotask((()=>{void 0!==this.query&&this.query!==this.raw&&this.syncQuery()})))};commit(i,t,s,e,a){this.awaitingLabel=null;const o=t!==this.raw;void 0===this.value&&(this.selected=i),void 0===this.query&&o&&(this.raw=t,this.display=t,this.formattedRaw=void 0),this.resetValidation();const r={value:i,query:t,option:s,kind:e,trigger:a},h={value:i,query:t};this.proposedChange=h,this.valueChange.emit(r),o&&this.queryChange.emit({query:t,display:t,trigger:a}),"create"===e&&this.createEntry.emit(r),"free-entry"===e&&this.freeEntry.emit(r),"invalidation"===e&&this.dependencyInvalidate.emit(r),queueMicrotask((()=>{this.proposedChange===h&&(void 0!==this.value&&this.value!==h.value&&this.syncValue(),void 0!==this.query&&this.query!==h.query&&(void 0===this.value&&(this.selected=null,this.resetValidation()),this.syncQuery()),this.proposedChange=void 0)}))}choose(i,t){const s=this.rows[i];if(!s?.disabled){if(s)this.commit(s.value,s.label,s,"selection",t);else{if(!this.canCreate||i!==this.rows.length)return;this.commit(null,this.raw,null,"create",t)}this.close(),this.input?.focus(),"submit"!==this.config.validateOn&&queueMicrotask((()=>{this.validate()}))}}move(i){const t=this.rows.flatMap(((i,t)=>i.disabled?[]:[t]));if(this.canCreate&&t.push(this.rows.length),!t.length)return;const s=t.indexOf(this.active),e="Home"===i?0:"End"===i?t.length-1:"ArrowDown"===i?Math.min(s+1,t.length-1):s<0?t.length-1:Math.max(0,s-1);this.active=t[e],requestAnimationFrame((()=>this.host.shadowRoot?.getElementById(`option-${this.active}`)?.scrollIntoView({block:"nearest"})))}onKeydown=i=>{if(!(this.composing||i.isComposing||this.disabled||this.readOnly))return"Escape"===i.key&&this.expanded?(i.preventDefault(),i.stopPropagation(),void this.close()):void("Tab"!==i.key?i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||("ArrowDown"===i.key||"ArrowUp"===i.key?(i.preventDefault(),this.expanded||this.open("disclosure"),this.move(i.key)):("Home"===i.key||"End"===i.key)&&this.expanded&&this.active>=0?(i.preventDefault(),this.move(i.key)):"Enter"===i.key&&this.expanded&&(this.active>=0?(i.preventDefault(),this.choose(this.active,"keyboard")):this.config.allowFreeText&&(i.preventDefault(),this.commit(null,this.raw,null,"free-entry","keyboard"),this.close()))):this.close())};onFocusOut=i=>{i.relatedTarget instanceof Node&&this.host.shadowRoot?.contains(i.relatedTarget)||(this.close(),this.format("blur"),this.validation={...this.validation,touched:!0},this.config.allowFreeText&&null===this.selected&&this.commit(null,this.raw,null,"free-entry","keyboard"),"blur"===(this.config.validateOn??"blur")&&this.validate())};setValidation(i,t=this.validation.touched){const s=i.issues.some((i=>"warning"!==i.severity));this.validation={status:s?"error":i.issues.length?"warning":"valid",touched:t,dirty:this.raw!==this.initialRaw,...i},this.validationChange?.emit(this.validation)}async validate(){this.validationRun?.abort();const i=new AbortController;this.validationRun=i,this.validation={...this.validation,status:"pending",output:void 0},this.validationChange.emit(this.validation);try{const t=await async function(i,t){let s=i.raw,e=[];const a=()=>i.signal.throwIfAborted();try{if(a(),t.parse&&(s=await t.parse(i.raw,i)),a(),t.schema){const i=await t.schema["~standard"].validate(s);a(),i.issues?e=i.issues:"value"in i&&(s=i.value)}if(!e.some((i=>"warning"!==i.severity))&&(t.normalize&&(s=await t.normalize(s,i)),a(),t.validator)){const o=await t.validator(s,i);a(),e=[...e,...o.issues??[]],"output"in o&&(s=o.output)}}catch(i){a(),e=[{message:i instanceof Error?i.message:"Unable to validate this value."}]}return e=[...e,...t.issues??[]],{output:e.some((i=>"warning"!==i.severity))?void 0:s,issues:e}}({raw:this.raw,value:this.selected,context:this.config.context,signal:i.signal},this.config);this.required&&!this.raw.trim()?t.issues=[...t.issues,{message:"A value is required."}]:!this.raw||null!==this.selected||this.config.allowFreeText||this.config.allowCreate||(t.issues=[...t.issues,{message:"Choose a suggestion."}]),t.issues.some((i=>"warning"!==i.severity))&&(t.output=void 0),!i.signal.aborted&&this.alive&&this.setValidation(t)}catch{}return this.validation}render(){const i=[this.helpOpen?"help-text":"",this.validation.issues.length?"validation":""].filter(Boolean).join(" ")||void 0,t=this.loading?"Loading suggestions…":this.lookupError||(this.expanded?`${this.rows.length} suggestions available.`:""),s=[...new Set(this.rows.map((i=>i.group??"")))];return e(a,{key:"2378bfd8473852642fef21898f4a756eb3b092ba","data-size":this.size,"data-validation":this.validation.status,onFocusout:this.onFocusOut},e("label",{key:"7aba65aeb336d490ddeaf5db9bba9db8ab8b9dbb",htmlFor:"input",part:"label"},this.label,this.required?" *":""),e("div",{key:"ee87156259d0fe1e2e56c4b36667e8daf5e1e2c1",class:"field",part:"field",ref:i=>this.field=i},e("input",{key:"35c5b85ff9a4bcba9bddaf85ff1f118a94aa077b",id:"input",ref:i=>this.input=i,role:"combobox","aria-autocomplete":"list","aria-expanded":String(this.expanded),"aria-controls":"listbox","aria-activedescendant":this.expanded&&this.active>=0?`option-${this.active}`:void 0,"aria-describedby":i,"aria-invalid":String("error"===this.validation.status),"aria-busy":String("pending"===this.validation.status),value:this.display,placeholder:this.placeholder,name:this.name||void 0,disabled:this.disabled,readOnly:this.readOnly,required:this.required,autoComplete:"off",part:"input",onInput:this.onInput,onKeyDown:this.onKeydown,onCompositionstart:()=>this.composing=!0,onCompositionend:()=>{this.composing=!1,this.onInput(new InputEvent("input"))}}),this.clearable&&e("button",{key:"74e4f44836b751ab5e9f794a39b480602e0c106d",type:"button",part:"affordance","aria-label":`Clear ${this.label}`,disabled:this.disabled||this.readOnly,onClick:()=>{this.commit(null,"",null,"clear","pointer"),this.close(),this.input?.focus()}},"×"),this.help&&e("button",{key:"c870ced139fb22baa50a1795ab78f14c38647d34",id:"help",type:"button",part:"affordance","aria-label":`Help for ${this.label}`,disabled:this.disabled},e("span",{key:"ba3dc5128c1941b21b53a5ba78a27017b3df5ec8","aria-hidden":"true"},"?")),this.disclosure&&e("button",{key:"eced588e3fa7958dd6185173faaef01219c30243",type:"button",part:"affordance","aria-label":`Suggestions for ${this.label}`,"aria-controls":"listbox","aria-expanded":String(this.expanded),disabled:this.disabled||this.readOnly,onClick:()=>{this.expanded?this.close():this.open("disclosure"),this.input?.focus()}},e("span",{key:"7cb9f7f2bb15246dcdd2348ea0ca656d1d0c8c33","aria-hidden":"true"},"⌄"))),this.help&&e("ui-tooltip",{key:"b1b5d42ca457f9b951758bb5e816c8dbbcd1087d",id:"help-text",for:"help",toggleOnClick:!0,onOpen:()=>this.helpOpen=!0,onClose:()=>this.helpOpen=!1},this.help),e("div",{key:"9eca2df66c72917e6bfda21205c2a4ef97dd91d5",class:"popup",part:"popup",hidden:!this.expanded,ref:i=>this.popup=i},e("div",{key:"641e1f137c9cfef5d08ec99f6178e59487a20bf1",id:"listbox",role:"listbox","aria-label":`${this.label} suggestions`,"aria-busy":String(this.loading)},s.map((i=>e("div",{role:i?"group":"presentation","aria-label":i||void 0},i&&e("div",{class:"group",part:"group"},i),this.rows.map(((t,s)=>(t.group??"")!==i?null:e("div",{id:`option-${s}`,role:"option","aria-selected":String(this.selected===t.value),"aria-disabled":String(Boolean(t.disabled)),"data-active":this.active===s?"":void 0,part:"option",class:"option",onPointerDown:i=>i.preventDefault(),onClick:()=>this.choose(s,"pointer")},e("slot",{name:`option-${t.id}`},e("span",{class:"primary",part:"option-primary"},t.label),t.description&&e("span",{class:"secondary",part:"option-secondary"},t.description)))))))),this.canCreate&&e("div",{key:"38a3aa6b2ffae30e6f81e1f89d10c9966dd31b10",id:`option-${this.rows.length}`,role:"option","aria-selected":"false",class:"option",part:"option","data-active":this.active===this.rows.length?"":void 0,onPointerDown:i=>i.preventDefault(),onClick:()=>this.choose(this.rows.length,"pointer")},e("slot",{key:"dd3e895ef363f6d30a0c25e4b5092a8feacc63e5",name:"create"},"Create “",this.raw,"”"))),this.loading?e("div",{class:"message"},e("slot",{name:"loading"},"Loading suggestions…")):this.lookupError?e("div",{class:"message"},e("slot",{name:"error"},this.lookupError)):this.rows.length||this.canCreate?null:e("div",{class:"message"},e("slot",{name:"empty"},"No suggestions."))),e("div",{key:"9cf12a8fde7d9cfb9e2d2a77669ac4708c7fded6",id:"validation",class:"message",part:"validation",hidden:!this.validation.issues.length},this.validation.issues.map((i=>e("div",null,i.message)))),e("div",{key:"1c7b1d3f658e500cbf5f5004a76a39511cc79c49",class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true"},t," ","pending"===this.validation.status?"Checking value…":this.validation.issues.map((i=>i.message)).join(" ")))}static get watchers(){return{value:[{syncValue:0}],query:[{syncQuery:0}],disabled:[{syncDisabled:0}],readOnly:[{syncDisabled:0}],config:[{syncConfig:0}]}}};n.style=":host{display:grid;gap:var(--ui-space-1);min-inline-size:0;color:var(--ui-text-primary);font:inherit}label{color:var(--ui-field-label-color, var(--ui-text-primary));font-size:var(--ui-field-label-size, 0.875rem);font-weight:var(--ui-field-label-weight, 500)}.field{display:flex;min-inline-size:0;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))}.field:focus-within{border-color:var(--ui-control-focus, var(--ui-focus-ring));outline:2px solid var(--ui-control-focus, var(--ui-focus-ring));outline-offset:1px}input{appearance:none;width:100%;min-inline-size:0;min-block-size:var(--ui-control-min-block-size, 2.75rem);box-sizing:border-box;border:0;border-radius:inherit;background:transparent;color:inherit;font:inherit;line-height:var(--ui-line-height-md);padding:var(--ui-space-2) var(--ui-space-3);margin:0;outline:none}:host([data-size='sm']) input{min-block-size:var(--ui-field-compact-size, 2rem);padding:var(--ui-space-1) var(--ui-space-2)}button{appearance:none;border:0;border-radius:var(--ui-radius-2);background:transparent;color:var(--ui-field-affordance-color, var(--ui-text-secondary));font:inherit;font-weight:var(--ui-field-affordance-weight, 400);min-inline-size:2rem;padding:var(--ui-space-1);cursor:pointer}button:hover:enabled{background:var(--ui-surface-muted);color:var(--ui-text-primary)}button:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:-3px}input:disabled,button:disabled{color:var(--ui-text-muted);cursor:not-allowed}.field:has(input:disabled){background:var(--ui-control-surface-disabled, var(--ui-surface-muted))}:host([data-validation='error']) .field{border-color:var(--ui-danger-solid, var(--ui-accent-active))}.popup{box-sizing:border-box;min-inline-size:12rem;max-inline-size:calc(100vw - 1rem);max-block-size:var(--ui-combobox-max-block-size, 18rem);overflow:auto;margin:0;padding:var(--ui-space-1);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-md)}[hidden]{display:none !important}.option{padding:var(--ui-space-2) var(--ui-space-3);border-radius:var(--ui-radius-1);cursor:pointer;overflow-wrap:anywhere}.option:hover,.option[data-active]{background:var(--ui-surface-muted);outline:1px solid var(--ui-focus-ring);outline-offset:-1px}.option[aria-disabled='true']{color:var(--ui-text-muted);cursor:not-allowed}.primary{display:block;color:var(--ui-option-primary-color, var(--ui-text-primary));font-weight:var(--ui-option-primary-weight, 500)}.secondary{display:block;color:var(--ui-option-secondary-color, var(--ui-text-secondary));font-weight:var(--ui-option-secondary-weight, 400);font-size:var(--ui-font-size-sm)}.message,.group{color:var(--ui-field-message-color, var(--ui-text-secondary));font-weight:var(--ui-field-message-weight, 400);font-size:var(--ui-font-size-sm);line-height:var(--ui-line-height-md);overflow-wrap:anywhere}.group,.popup .message{padding:var(--ui-space-2) var(--ui-space-3)}.sr-only{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media (pointer: coarse){button{min-inline-size:2.75rem;min-block-size:2.75rem}}@media (forced-colors: active){.field,.popup{border-color:CanvasText}.option[data-active]{outline-color:Highlight}}";export{n as ui_combobox}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,g as s,h as e,H as r}from"./p-8BGiMGQ0.js";import{o as h,c as o}from"./p-C-0syqXZ.js";import{d as a}from"./p-JwSoedEO.js";import{a as n}from"./p-Bu0dmLBE.js";const l=class{constructor(s){t(this,s),this.opened=i(this,"open"),this.closed=i(this,"close")}get host(){return s(this)}for="";open=!1;defaultOpen=!1;placement="top-start";showDelay=500;hideDelay=100;toggleOnClick=!1;pinned=!1;focused=!1;opened;closed;internalOpen=!1;overlayId=`ui-tooltip-${Math.random().toString(36).slice(2,11)}`;trigger=null;surface=null;showTimer=null;hideTimer=null;syncFromProp(){this.clearTimers(),this.internalOpen=this.open}resetSurface(){this.syncTrigger(),this.setupSurface(),this.syncOverlay()}syncOverlay(){this.internalOpen?(this.surface?.show(),h({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.trigger?[this.trigger]:void 0,dismissible:!0,requestClose:(t,i)=>this.handleRequestClose(t,i)})):(this.surface?.hide(),o(this.overlayId))}componentDidLoad(){this.host.id||(this.host.id=this.overlayId),this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.syncTrigger(),this.setupSurface(),this.host.addEventListener("pointerenter",this.onSurfaceEnter),this.host.addEventListener("pointerleave",this.onTriggerLeave),this.syncOverlay()}componentDidUpdate(){this.syncTrigger()}disconnectedCallback(){this.clearTimers(),this.detachTriggerListeners(),this.surface?.destroy(),this.surface=null,this.host.removeEventListener("pointerenter",this.onSurfaceEnter),this.host.removeEventListener("pointerleave",this.onTriggerLeave),o(this.overlayId)}syncTrigger(){const t=this.for?this.host.getRootNode().getElementById(this.for):this.host.previousElementSibling;t!==this.trigger&&(this.detachTriggerListeners(),this.trigger=t,this.attachTriggerListeners(),this.surface?.setAnchor(t))}setupSurface(){this.surface?.destroy(),this.surface=n(this.host,{anchor:this.trigger,placement:this.placement})}attachTriggerListeners(){if(this.detachTriggerListeners(),!this.trigger)return;const t=new Set((this.trigger.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));t.add(this.host.id),this.trigger.setAttribute("aria-describedby",[...t].join(" ")),this.trigger.addEventListener("click",this.onTriggerClick),this.trigger.addEventListener("keydown",this.onTriggerKeydown),this.trigger.addEventListener("pointerenter",this.onTriggerEnter),this.trigger.addEventListener("pointerleave",this.onTriggerLeave),this.trigger.addEventListener("focusin",this.onTriggerFocusIn),this.trigger.addEventListener("focusout",this.onTriggerFocusOut)}detachTriggerListeners(){if(!this.trigger)return;const t=(this.trigger.getAttribute("aria-describedby")||"").split(/\s+/).filter((t=>t&&t!==this.host.id));t.length?this.trigger.setAttribute("aria-describedby",t.join(" ")):this.trigger.removeAttribute("aria-describedby"),this.trigger.removeEventListener("click",this.onTriggerClick),this.trigger.removeEventListener("keydown",this.onTriggerKeydown),this.trigger.removeEventListener("pointerenter",this.onTriggerEnter),this.trigger.removeEventListener("pointerleave",this.onTriggerLeave),this.trigger.removeEventListener("focusin",this.onTriggerFocusIn),this.trigger.removeEventListener("focusout",this.onTriggerFocusOut)}clearShowTimer(){null!==this.showTimer&&(clearTimeout(this.showTimer),this.showTimer=null)}clearHideTimer(){null!==this.hideTimer&&(clearTimeout(this.hideTimer),this.hideTimer=null)}clearTimers(){this.clearShowTimer(),this.clearHideTimer()}setInteractionOpen(t,i){this.internalOpen!==t&&(this.internalOpen=t,a(this.host,t?"open":"close",{open:t,reason:"action",trigger:i}))}onSurfaceEnter=()=>this.clearHideTimer();onTriggerClick=t=>{this.toggleOnClick&&(this.clearTimers(),this.pinned=!this.pinned,this.setInteractionOpen(this.pinned,0===t.detail?"keyboard":"pointer"))};onTriggerKeydown=t=>{"Escape"===t.key&&this.clearTimers()};onTriggerEnter=t=>{"touch"!==t.pointerType&&(this.clearHideTimer(),this.internalOpen||null!==this.showTimer||(this.showTimer=setTimeout((()=>{this.showTimer=null,this.setInteractionOpen(!0,"pointer")}),Math.max(0,this.showDelay))))};onTriggerLeave=()=>{this.clearShowTimer(),this.focused||this.pinned||!this.internalOpen||null!==this.hideTimer||(this.hideTimer=setTimeout((()=>{this.hideTimer=null,this.setInteractionOpen(!1,"pointer")}),Math.max(0,this.hideDelay)))};onTriggerFocusIn=()=>{this.focused=!0,this.clearTimers(),this.setInteractionOpen(!0,"keyboard")};onTriggerFocusOut=t=>{const i=t.relatedTarget;i&&this.host.contains(i)||(this.focused=!1,this.pinned=!1,this.clearTimers(),this.setInteractionOpen(!1,"keyboard"))};handleRequestClose(t,i){("escape"===t||"light-dismiss"===t&&this.toggleOnClick)&&(this.pinned=!1,this.clearTimers(),this.internalOpen=!1,a(this.host,"close",{open:!1,reason:t,trigger:i}))}render(){return e(r,{key:"b0199c23316a707ae3e1e7c361f2838872f62221",role:"tooltip",hidden:!this.internalOpen,"data-open":this.internalOpen?"":void 0},e("slot",{key:"d0c7822f2f47848a509bf8e310806edbdb320f02"}))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncOverlay:0}]}}};l.style=":host{position:fixed;inset:auto;margin:0;display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md);opacity:0;transform:translateY(4px);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}";export{l as ui_tooltip}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{r as a,g as t,h as e,H as i}from"./p-8BGiMGQ0.js";import{d as r,e as d}from"./p-JwSoedEO.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide v0.554.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/const o={"align-center":[["path",{d:"M21 5H3"}],["path",{d:"M17 12H7"}],["path",{d:"M19 19H5"}]],"align-left":[["path",{d:"M21 5H3"}],["path",{d:"M15 12H3"}],["path",{d:"M17 19H3"}]],"align-right":[["path",{d:"M21 5H3"}],["path",{d:"M21 12H9"}],["path",{d:"M21 19H7"}]],bold:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8"}]],braces:[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]],"chevron-down":[["path",{d:"m6 9 6 6 6-6"}]],"chevron-left":[["path",{d:"m15 18-6-6 6-6"}]],"code-xml":[["path",{d:"m18 16 4-4-4-4"}],["path",{d:"m6 8-4 4 4 4"}],["path",{d:"m14.5 4-5 16"}]],columns:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}],["path",{d:"M15 3v18"}]],ellipsis:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],eraser:[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"}],["path",{d:"m5.082 11.09 8.828 8.828"}]],"grip-horizontal":[["circle",{cx:"12",cy:"9",r:"1"}],["circle",{cx:"19",cy:"9",r:"1"}],["circle",{cx:"5",cy:"9",r:"1"}],["circle",{cx:"12",cy:"15",r:"1"}],["circle",{cx:"19",cy:"15",r:"1"}],["circle",{cx:"5",cy:"15",r:"1"}]],"grip-vertical":[["circle",{cx:"9",cy:"12",r:"1"}],["circle",{cx:"9",cy:"5",r:"1"}],["circle",{cx:"9",cy:"19",r:"1"}],["circle",{cx:"15",cy:"12",r:"1"}],["circle",{cx:"15",cy:"5",r:"1"}],["circle",{cx:"15",cy:"19",r:"1"}]],"heading-1":[["path",{d:"M4 12h8"}],["path",{d:"M4 18V6"}],["path",{d:"M12 18V6"}],["path",{d:"m17 12 3-2v8"}]],"heading-2":[["path",{d:"M4 12h8"}],["path",{d:"M4 18V6"}],["path",{d:"M12 18V6"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"}]],"heading-3":[["path",{d:"M4 12h8"}],["path",{d:"M4 18V6"}],["path",{d:"M12 18V6"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"}]],highlighter:[["path",{d:"m9 11-6 6v3h9l3-3"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"}]],image:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]],italic:[["line",{x1:"19",x2:"10",y1:"4",y2:"4"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20"}]],list:[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]],"list-ordered":[["path",{d:"M11 5h10"}],["path",{d:"M11 12h10"}],["path",{d:"M11 19h10"}],["path",{d:"M4 4h1v5"}],["path",{d:"M4 9h2"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"}]],"list-todo":[["path",{d:"M13 5h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 19h8"}],["path",{d:"m3 17 2 2 4-4"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1"}]],merge:[["path",{d:"m8 6 4-4 4 4"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22"}],["path",{d:"m20 22-5-5"}]],minus:[["path",{d:"M5 12h14"}]],"paint-bucket":[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"}],["path",{d:"m5 2 5 5"}],["path",{d:"M2 13h15"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"}]],"panel-bottom":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 15h18"}]],"panel-left":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],"panel-right":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M15 3v18"}]],"panel-top":[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}]],pilcrow:[["path",{d:"M13 4v16"}],["path",{d:"M17 4v16"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13"}]],plus:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],quote:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"}]],redo:[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]],rows:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M21 9H3"}],["path",{d:"M21 15H3"}]],split:[["path",{d:"M16 3h5v5"}],["path",{d:"M8 3H3v5"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3"}],["path",{d:"m15 9 6-6"}]],strikethrough:[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12"}]],table:[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"}]],trash:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],underline:[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20"}]],undo:[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]]};
|
|
8
|
-
/**
|
|
9
|
-
* @license lucide v0.554.0 - ISC
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the ISC license.
|
|
12
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/function n(a){return String(a).replaceAll("&","&").replaceAll('"',""")}function s(a){const[t,e]=a;return`<${t}${function(a){return Object.entries(a).map((([a,t])=>` ${a}="${n(t)}"`)).join("")}(e)}></${t}>`}function c(a,t="looma-icon"){return[`<svg class="${n(t)}" data-looma-icon="${a}" aria-hidden="true" focusable="false"`,' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',' stroke-linecap="round" stroke-linejoin="round">',o[a].map(s).join(""),"</svg>"].join("")}const h=class{constructor(t){a(this,t)}get host(){return t(this)}itemId="";label="";depth=1;dropDepth;subtreeDepth;container=!1;sortable=!1;dragType="item";dropScope="";accepts="";expanded=!1;defaultExpanded=!1;selected=!1;disabled=!1;internalExpanded=!1;syncExpandedFromProp(){this.internalExpanded=this.expanded}componentWillLoad(){this.internalExpanded=this.expanded||this.defaultExpanded}componentDidLoad(){this.host.addEventListener("ui-tree-auto-expand",this.onAutoExpand)}disconnectedCallback(){this.host.removeEventListener("ui-tree-auto-expand",this.onAutoExpand)}setExpanded(a,t){this.container&&!this.disabled&&this.internalExpanded!==a&&(this.internalExpanded=a,r(this.host,"expand",{id:this.itemId,expanded:a,trigger:t}))}onAutoExpand=()=>{this.setExpanded(!0,"pointer")};onDisclosureClick=a=>{a.stopPropagation(),this.setExpanded(!this.internalExpanded,d(a))};onDisclosureKeydown=a=>{"ArrowRight"!==a.key&&"ArrowLeft"!==a.key||(a.preventDefault(),a.stopPropagation(),this.setExpanded("ArrowRight"===a.key,"keyboard"))};onRowClick=a=>{this.container&&!this.disabled&&(a.composedPath().some((a=>a instanceof HTMLElement&&(a.matches('a, button, input, select, textarea, [role="button"], [role="link"]')||"actions"===a.getAttribute("slot"))))||this.setExpanded(!this.internalExpanded,d(a)))};render(){const a=Math.max(1,Math.floor(this.depth)),t=`${this.internalExpanded?"Collapse":"Expand"} ${this.label||"item"}`,r=`Drag ${this.label||"item"} to reorder`;return e(i,{key:"606f5fdac8a95489d0c62cd7d4918c6d5d0c759e",role:"treeitem","aria-level":String(a),"aria-expanded":this.container?String(this.internalExpanded):void 0,"aria-selected":String(this.selected),"aria-disabled":this.disabled?"true":void 0,"data-container":this.container?"":void 0,"data-selected":this.selected?"":void 0,"data-disabled":this.disabled?"":void 0,"data-drag-type":this.dragType||"item","data-drop-scope":this.dropScope||void 0,"data-accepts":this.accepts||void 0,tabIndex:this.disabled?-1:0,style:{"--ui-tree-item-depth":String(a-1),"margin-inline-start":a>1?"var(--ui-tree-indent, 16px)":"0px"}},e("div",{key:"2b4bb03d4b24ef668f22b08e803f7f43c2d63ae5",class:"row",part:"row",onClick:this.onRowClick},this.sortable&&!this.disabled?e("button",{class:"drag-handle",part:"drag-handle",type:"button",draggable:!0,"aria-label":r,title:r},e("span",{innerHTML:c("grip-vertical")})):null,this.container?e("button",{class:"disclosure",part:"disclosure",type:"button","aria-label":t,"aria-expanded":String(this.internalExpanded),disabled:this.disabled,onClick:this.onDisclosureClick,onKeyDown:this.onDisclosureKeydown},e("span",{class:{"disclosure-icon":!0,"disclosure-icon--expanded":this.internalExpanded},innerHTML:c("chevron-down")})):e("span",{class:"disclosure-spacer","aria-hidden":"true"}),e("span",{key:"e7b935158e35cdc6518bdd73d54c42dcfa211aee",class:"leading",part:"leading"},e("slot",{key:"8448462349fd23b8be0fb673fc6e101bf94beaa7",name:"leading"})),e("span",{key:"e0b6338e1ec9ec043446e42c5f03724adf7e1862",class:"label",part:"label"},e("slot",{key:"ed44e6f2ce3466c28d2b87fc7511399ecc339255"})),e("span",{key:"2aea78227904fe23cfc4b8e14852a4601e3cc34b",class:"actions",part:"actions"},e("slot",{key:"7c6549008c2a54c3ea6fcdf9e0fdbe445d379922",name:"actions"})),e("span",{key:"05166ba04765bc518d6b95ca7ae5a67c4394d1bf",class:"drop-indicator row-drop-indicator",part:"drop-indicator","aria-hidden":"true"})),this.container?e("div",{class:"children",part:"children",role:"group",hidden:!this.internalExpanded},e("slot",{name:"children"})):null,e("span",{key:"7381d6e9e2a8f94695f29e73194b1603d79cefb9",class:"drop-indicator subtree-drop-indicator",part:"drop-indicator","aria-hidden":"true"}))}static get watchers(){return{expanded:[{syncExpandedFromProp:0}]}}};h.style=":host{--ui-tree-indent:16px;--ui-tree-row-min-height:32px;--ui-tree-drop-color:var(--ui-accent-solid);position:relative;display:block;min-inline-size:0;margin-inline-start:calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent))}.row{position:relative;display:grid;grid-template-columns:20px auto minmax(0, 1fr) auto;align-items:center;min-block-size:var(--ui-tree-row-min-height);min-inline-size:0;font-size:var(--ui-tree-font-size, var(--ui-font-size-ui, 0.9375rem));border-radius:var(--ui-radius-md);color:var(--ui-text-secondary);transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), opacity var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), min-block-size var(--ui-motion-base) var(--ui-motion-ease)}.row:hover,:host([data-selected]) .row,.row:focus-within{color:var(--ui-text-primary);background:var(--ui-surface-muted)}:host([data-disabled]) .row{opacity:0.55}:host([data-dragging]) .row{opacity:0.42}:host(:focus){outline:none}:host(:focus-visible) .row{box-shadow:0 0 0 2px var(--ui-focus-ring)}:host([data-drop-position='inside']) .row{background:var(--ui-accent-subtle);box-shadow:inset 0 0 0 1px var(--ui-tree-drop-color)}.disclosure,.disclosure-spacer{grid-column:1;grid-row:1;inline-size:20px;block-size:28px}.disclosure{display:grid;place-items:center;padding:0;color:var(--ui-text-muted);background:transparent;border:0;border-radius:var(--ui-radius-sm);cursor:pointer}.disclosure:hover{color:var(--ui-text-primary);background:var(--ui-surface-elevated)}.disclosure-icon{display:block;inline-size:14px;block-size:14px;transform:rotate(-90deg);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}.disclosure-icon--expanded{transform:rotate(0deg)}.disclosure-icon :is(svg),.drag-handle :is(svg){display:block;inline-size:100%;block-size:100%}.leading{display:none}.leading:has(*){display:inline-grid;place-items:center;grid-column:2;grid-row:1;inline-size:16px;block-size:16px;margin-inline-start:var(--ui-space-1)}.label{grid-column:3;grid-row:1;min-inline-size:0;padding:var(--ui-space-1) var(--ui-space-2)}.actions{grid-column:4;grid-row:1;display:inline-flex;align-items:center;min-inline-size:0}.drag-handle{position:absolute;z-index:2;inset-block-start:50%;inset-inline-start:-22px;inline-size:20px;block-size:32px;display:grid;place-items:center;padding:7px 3px;color:var(--ui-text-muted);background:var(--ui-surface-elevated);border:1px solid transparent;border-radius:var(--ui-radius-sm);cursor:grab;opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover .drag-handle,.drag-handle:focus-visible,:host([data-dragging]) .drag-handle{opacity:1;pointer-events:auto}.drag-handle:active{cursor:grabbing}.drop-indicator{position:absolute;z-index:3;inset-inline:1px;display:none;block-size:2px;border-radius:999px;background:var(--ui-tree-drop-color);pointer-events:none}.drop-indicator::before,.drop-indicator::after{content:'';position:absolute;inset-block-start:50%;inline-size:7px;block-size:7px;border:2px solid var(--ui-tree-drop-color);border-radius:999px;background:var(--ui-surface-elevated);transform:translateY(-50%)}.drop-indicator::before{inset-inline-start:-1px}.drop-indicator::after{inset-inline-end:-1px}:host([data-drop-position='before']) .row-drop-indicator{display:block;inset-block-start:-1px}:host([data-drop-position='after']) .subtree-drop-indicator{display:block;inset-block-end:-1px}.children[hidden]{display:none}:host-context(html[data-ui-input-modality='touch']){--ui-tree-row-min-height:44px}:host-context(html[data-ui-input-modality='touch']) .drag-handle{display:none}@media (prefers-reduced-motion: reduce){.row,.disclosure-icon,.drag-handle{transition:none}}";export{h as ui_tree_item}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as i,h as e,H as s}from"./p-8BGiMGQ0.js";import{d as r}from"./p-JwSoedEO.js";function n(t,i,e){const s=t.height>0?Math.min(1,Math.max(0,(i-t.top)/t.height)):.5;return e?s<.25?"before":s>.75?"after":"inside":s<.5?"before":"after"}const h=class{constructor(i){t(this,i)}get host(){return i(this)}label="Tree";hoverExpandDelay=700;maxDepth=0;source=null;target=null;position=null;rejectedTarget=null;rejectedPosition=null;rejection=null;hoverIntent=null;componentDidLoad(){this.hoverIntent=function(t,i){let e,s;function r(){e&&clearTimeout(e),e=void 0,s=void 0}return{schedule(n){s===n&&e||(r(),s=n,e=setTimeout((()=>{e=void 0;const t=s;s=void 0,t&&i(t)}),Math.max(0,t)))},cancel:r,destroy:r}}(this.hoverExpandDelay,this.expandTarget),this.host.addEventListener("dragstart",this.onDragStart),this.host.addEventListener("drag",this.onDrag),this.host.addEventListener("dragenter",this.onDragOver),this.host.addEventListener("dragover",this.onDragOver),this.host.addEventListener("dragleave",this.onDragLeave),this.host.addEventListener("drop",this.onDrop),this.host.addEventListener("dragend",this.onDragEnd),this.host.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){this.hoverIntent?.destroy(),this.host.removeEventListener("dragstart",this.onDragStart),this.host.removeEventListener("drag",this.onDrag),this.host.removeEventListener("dragenter",this.onDragOver),this.host.removeEventListener("dragover",this.onDragOver),this.host.removeEventListener("dragleave",this.onDragLeave),this.host.removeEventListener("drop",this.onDrop),this.host.removeEventListener("dragend",this.onDragEnd),this.host.removeEventListener("keydown",this.onKeyDown)}itemFromEvent(t){return t.composedPath().find((t=>t instanceof HTMLElement&&"ui-tree-item"===t.localName))??null}itemId(t){return t.itemId||t.getAttribute("item-id")||""}rowFor(t){return t.shadowRoot?.querySelector('[part="row"]')??null}itemAtPoint(t,i){let e=this.host.ownerDocument.elementFromPoint(t,i);for(;e;){if("ui-tree-item"===e.localName&&this.host.contains(e))return e;const t=e.getRootNode();e=t instanceof ShadowRoot?t.host:e.parentElement}return null}isWithinTree(t){let i=t instanceof HTMLElement?t:null;for(;i;){if(i===this.host||this.host.contains(i))return!0;const t=i.getRootNode();i=t instanceof ShadowRoot?t.host:i.parentElement}return!1}acceptsChildren(t){return Boolean(t.container??t.hasAttribute("container"))&&!Boolean(t.disabled??t.hasAttribute("disabled"))}itemMetadata(t){return{type:t.getAttribute("data-drag-type")||t.getAttribute("drag-type")||"item",scope:t.getAttribute("data-drop-scope")||t.getAttribute("drop-scope")||"",accepts:(t.getAttribute("data-accepts")||t.getAttribute("accepts")||"").split(",").map((t=>t.trim())).filter(Boolean)}}constraintDepth(t){if(void 0!==t.dropDepth)return t.dropDepth;const i=t.getAttribute("drop-depth");return null!==i?Number(i):void 0!==t.depth?t.depth:Number(t.getAttribute("depth"))||1}dropRejection(t,i,e){if(t.contains(i))return{reason:"descendant"};const s=this.itemMetadata(t),r=this.itemMetadata(i);if("inside"===e){if(!this.acceptsChildren(i)||r.accepts.length>0&&!r.accepts.includes(s.type))return{reason:"incompatible"}}else if(s.type!==r.type)return{reason:"incompatible"};const n=Math.max(0,Math.floor(this.maxDepth));if(n>0&&void 0!==t.subtreeDepth){const s=Math.max(0,Math.floor(this.constraintDepth(i)))+("inside"===e?1:0)+Math.max(0,Math.floor(t.subtreeDepth));if(s>n)return{reason:"max-depth",maxDepth:n,resultingDepth:s}}return null}clearTarget(){this.target?.removeAttribute("data-drop-position"),this.target=null,this.position=null,this.hoverIntent?.cancel()}clearRejection(){this.rejectedTarget=null,this.rejectedPosition=null,this.rejection=null}finishDrag(){this.source?.removeAttribute("data-dragging"),this.source=null,this.clearTarget(),this.clearRejection()}expandTarget=t=>{const i=Array.from(this.host.querySelectorAll("ui-tree-item")).find((i=>this.itemId(i)===t));i&&"false"===i.getAttribute("aria-expanded")&&i.dispatchEvent(new CustomEvent("ui-tree-auto-expand"))};onDragStart=t=>{const i=this.itemFromEvent(t);if(!i||!Boolean(i.sortable??i.hasAttribute("sortable"))||Boolean(i.disabled??i.hasAttribute("disabled")))return;if(!t.composedPath().some((t=>t instanceof HTMLElement&&"drag-handle"===t.getAttribute("part"))))return void t.preventDefault();const e=this.itemId(i),s=this.rowFor(i);e&&s?(this.source=i,i.setAttribute("data-dragging","true"),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e)),function(t,i){if(!t||"function"!=typeof t.setDragImage)return;const{height:e}=i.getBoundingClientRect();t.setDragImage(i,16,Math.max(0,e/2))}(t.dataTransfer,s)):t.preventDefault()};updateTarget(t,i,e){if(!this.source)return!1;if(!t||t===this.source)return this.clearTarget(),this.clearRejection(),!1;const s=this.rowFor(t);if(!s)return!1;const r=n(s.getBoundingClientRect(),i,this.acceptsChildren(t)),h=this.dropRejection(this.source,t,r);return h?(e&&(e.dropEffect="none"),this.clearTarget(),"max-depth"===h.reason?(this.rejectedTarget=t,this.rejectedPosition=r,this.rejection=h):this.clearRejection(),!1):(this.clearRejection(),e&&(e.dropEffect="move"),this.target===t&&this.position===r||(this.clearTarget(),this.target=t,this.position=r,t.setAttribute("data-drop-position",r)),"inside"===r&&"false"===t.getAttribute("aria-expanded")?this.hoverIntent?.schedule(this.itemId(t)):this.hoverIntent?.cancel(),!0)}onDrag=t=>{if(!this.source||0===t.clientX&&0===t.clientY)return;const i=this.itemAtPoint(t.clientX,t.clientY);i&&this.updateTarget(i,t.clientY,t.dataTransfer)};onDragOver=t=>{if(!this.source)return;const i=this.itemFromEvent(t);this.updateTarget(i,t.clientY,t.dataTransfer)&&t.preventDefault()};onDragLeave=t=>{this.isWithinTree(t.relatedTarget)||this.itemAtPoint(t.clientX,t.clientY)||(this.clearTarget(),this.clearRejection())};dispatchReorder(t,i,e){const s=this.itemId(t),n=this.itemId(i);if(!s||!n)return;"inside"===e&&this.expandTarget(n);const h=this.itemMetadata(t),o=this.itemMetadata(i);r(this.host,"reorder",{sourceId:s,targetId:n,position:e,sourceType:h.type,targetType:o.type,sourceScope:h.scope,targetScope:o.scope,trigger:"pointer"})}dispatchReorderRejected(t,i,e,s){const n=this.itemId(t),h=this.itemId(i);n&&h&&r(this.host,"reorder-rejected",{sourceId:n,targetId:h,position:e,reason:"max-depth",maxDepth:s.maxDepth,resultingDepth:s.resultingDepth,trigger:"pointer"})}onDrop=t=>{this.source&&this.target&&this.position&&(t.preventDefault(),this.dispatchReorder(this.source,this.target,this.position),this.finishDrag())};onDragEnd=t=>{if(this.source){if(this.rejectedTarget&&this.rejectedPosition&&this.rejection)return this.dispatchReorderRejected(this.source,this.rejectedTarget,this.rejectedPosition,this.rejection),void this.finishDrag();const i=this.itemAtPoint(t.clientX,t.clientY);if(i&&i!==this.source){const e=this.rowFor(i);if(e){const s=n(e.getBoundingClientRect(),t.clientY,this.acceptsChildren(i)),r=this.dropRejection(this.source,i,s);r?"max-depth"===r.reason&&this.dispatchReorderRejected(this.source,i,s,r):this.dispatchReorder(this.source,i,s)}}}this.finishDrag()};visibleItems(){return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((t=>t.getClientRects().length>0&&!t.hasAttribute("disabled")))}onKeyDown=t=>{const i=this.itemFromEvent(t);if(!i)return;const e=this.visibleItems(),s=e.indexOf(i);if(s<0)return;const r="ArrowDown"===t.key?e[s+1]:"ArrowUp"===t.key?e[s-1]:null;r&&(t.preventDefault(),r.focus())};render(){return e(s,{key:"474c2154d2abe3c76eee9c36bf552390089df6e8",role:"tree","aria-label":this.label||"Tree"},e("slot",{key:"93aedd02f984dd33b5efc811fef417d1199917bd"}))}};h.style=":host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter, 22px)}::slotted(ui-tree-item){--ui-tree-indent:inherit}";export{h as ui_tree}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as e,h as o,H as s}from"./p-8BGiMGQ0.js";import{o as a,c as i,r}from"./p-C-0syqXZ.js";import{d as n}from"./p-JwSoedEO.js";import{a as p}from"./p-Bu0dmLBE.js";const h=class{constructor(e){t(this,e)}get host(){return e(this)}open=!1;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId=`ui-popover-${Math.random().toString(36).slice(2,11)}`;anchor=null;surface=null;syncFromProp(){this.internalOpen=this.open}onOpenChange(){this.syncOverlay(),this.internalOpen?n(this.host,"open",{open:!0,reason:"programmatic",trigger:"programmatic"}):n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"})}resetSurface(){this.setupSurface(),this.syncSurface()}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=p(this.host,{anchor:this.anchor,placement:this.placement}))}syncSurface(){this.surface&&(this.internalOpen?this.surface.show():this.surface.hide())}syncOverlay(){this.syncSurface(),this.internalOpen?a({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(t,e)=>this.handleRequestClose(t,e)}):i(this.overlayId)}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncOverlay()}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,i(this.overlayId)}componentDidUpdate(){this.syncOverlay()}handleRequestClose(t,e){this.internalOpen=!1,n(this.host,"close",{open:!1,reason:t,trigger:e})}onKeydown=t=>{"Escape"===t.key&&r("escape","keyboard")};render(){return o(s,{key:"cd957cb9fd5d1c05da7729a16d4cb229bc1deffa","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("slot",{key:"d14960a1471948120f7173e18adae8d86e4fabb7"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{onOpenChange:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}]}}};h.style=":host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}";export{h as ui_popover}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e,H as i}from"./p-8BGiMGQ0.js";const o=class{constructor(e){a(this,e)}disabled=!1;value="";render(){return e(i,{key:"ebd7c5aa5c8fdce2d2349aef7f1a4505b9190852",role:"menuitem",tabIndex:this.disabled?-1:0,"aria-disabled":this.disabled?"true":void 0,"data-value":this.value||void 0},e("slot",{key:"7b55a8545034b055f8cbd047a0f16ea729af097e"}))}};o.style=":host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}";export{o as ui_menu_item}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,g as t,h as r,H as a}from"./p-8BGiMGQ0.js";const i=class{constructor(t){e(this,t)}get host(){return t(this)}max=5;label="People";overflowCount=0;slotRef;syncOverflow(){this.updateOverflow()}componentDidLoad(){this.slotRef?.addEventListener("slotchange",(()=>this.updateOverflow())),this.updateOverflow()}componentDidUpdate(){this.updateOverflow()}updateOverflow(){const e=this.host.shadowRoot?.querySelector("slot"),t=(e?.assignedElements()??Array.from(this.host.children)).filter((e=>!e.hasAttribute("data-ui-avatar-group-overflow"))),r=t.length,a=Math.min(this.max,r),i=r>this.max?r-this.max:0;t.forEach(((e,t)=>{e.hidden=t>=a,e.setAttribute("aria-hidden",String(t>=a))})),this.overflowCount=i}render(){return r(a,{key:"bef6efd3c80d29e47742412a497893789ea8790b",role:"list","aria-label":this.label||void 0},r("slot",{key:"21585b11dcde36868c3e3bc7fbd0c216be6f011b"}),this.overflowCount>0&&r("span",{key:"ede3b71945d379fe78d522a3346aa29c02d74b15",class:"overflow",role:"listitem","aria-label":`${this.overflowCount} more`,"data-ui-avatar-group-overflow":!0},"+",this.overflowCount))}static get watchers(){return{max:[{syncOverflow:0}]}}};i.style=":host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){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}";export{i as ui_avatar_group}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,g as t,h as i,H as s}from"./p-8BGiMGQ0.js";import{d as a,e as r}from"./p-JwSoedEO.js";import{o,c as n,r as u}from"./p-C-0syqXZ.js";import{a as l}from"./p-Bu0dmLBE.js";const d=class{constructor(t){e(this,t)}get host(){return t(this)}open=!1;defaultOpen=!1;for;placement="bottom-start";internalOpen=!1;overlayId=`ui-menu-${Math.random().toString(36).slice(2,11)}`;anchor=null;surface=null;syncFromProp(){this.internalOpen=this.open}resetSurface(){this.setupSurface(),this.syncSurface()}syncSurface(){this.syncAnchorState(),this.surface&&(this.internalOpen?(this.surface.show(),o({id:this.overlayId,modal:!1,element:this.host,relatedElements:this.anchor?[this.anchor]:void 0,dismissible:!0,requestClose:(e,t)=>this.closeMenu(e,t)})):(this.surface.hide(),n(this.overlayId)))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.host.addEventListener("click",this.onItemClick),this.host.addEventListener("keydown",this.onKeydown),this.setupSurface(),this.syncSurface()}disconnectedCallback(){this.host.removeEventListener("click",this.onItemClick),this.host.removeEventListener("keydown",this.onKeydown),this.surface?.destroy(),this.surface=null,n(this.overlayId)}setupSurface(){this.surface?.destroy(),this.surface=null,this.anchor=this.for?this.host.ownerDocument.getElementById(this.for):null,this.anchor&&(this.surface=l(this.host,{anchor:this.anchor,placement:this.placement}))}syncAnchorState(){this.anchor&&(this.anchor.setAttribute("aria-haspopup","menu"),this.anchor.setAttribute("aria-expanded",this.internalOpen?"true":"false"))}closeMenu(e,t){this.internalOpen&&(this.internalOpen=!1,a(this.host,"close",{open:!1,reason:e,trigger:t}),"escape"===e&&this.anchor?.focus())}getItems(){return Array.from(this.host.querySelectorAll("ui-menu-item"))}isItemDisabled(e){return"true"===e.getAttribute("aria-disabled")||e.hasAttribute("disabled")||"true"===e.getAttribute("disabled")||!0===e.disabled}onItemClick=e=>{const t=e.target.closest?.("ui-menu-item");if(!t||t.getRootNode()!==this.host.getRootNode())return;if(this.isItemDisabled(t))return;const i=t.getAttribute("value")??t.getAttribute("data-value")??"";a(this.host,"select",{value:i,trigger:r(e)}),a(this.host,"close",{open:!1,reason:"action",trigger:r(e)}),this.internalOpen=!1};onKeydown=e=>{if("Escape"===e.key)return e.preventDefault(),void u("escape","keyboard");const t=this.getItems().filter((e=>!this.isItemDisabled(e)));if(0===t.length)return;const i=e.target.closest?.("ui-menu-item"),s=i&&i instanceof HTMLElement?t.indexOf(i):-1;if("Enter"!==e.key&&" "!==e.key)"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),t["ArrowDown"===e.key?s<0?0:Math.min(s+1,t.length-1):s<=0?t.length-1:s-1].focus());else if(e.preventDefault(),i&&s>=0){const e=i.getAttribute("value")??i.getAttribute("data-value")??"";a(this.host,"select",{value:e,trigger:"keyboard"}),a(this.host,"close",{open:!1,reason:"action",trigger:"keyboard"}),this.internalOpen=!1}};render(){return i(s,{key:"25ae79e914820dfc470fa03d8c843646c3c060d9",role:"menu","aria-orientation":"vertical","data-open":this.internalOpen?"":void 0},i("slot",{key:"b3a8b130e55610d948bc3e4603dede59dd560d05"}))}static get watchers(){return{open:[{syncFromProp:0}],for:[{resetSurface:0}],placement:[{resetSurface:0}],internalOpen:[{syncSurface:0}]}}};d.style=":host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}";export{d as ui_menu}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as a,h as s,H as i}from"./p-8BGiMGQ0.js";import{d as r,e}from"./p-JwSoedEO.js";import{b as o}from"./p-Bu0dmLBE.js";const n=class{constructor(a){t(this,a)}get host(){return a(this)}open=!0;internalOpen=!0;surface=null;syncFromProp(){this.internalOpen=this.open}syncSurface(){this.internalOpen?this.surface?.show():this.surface?.hide()}componentDidLoad(){this.surface=o(this.host),this.syncFromProp(),this.syncSurface(),this.host.addEventListener("click",this.onClick)}disconnectedCallback(){this.host.removeEventListener("click",this.onClick),this.surface?.destroy(),this.surface=null}getToasts(){return Array.from(this.host.querySelectorAll("[data-ui-toast]"))}updateOpenState(){const t=this.getToasts();this.internalOpen=t.length>0}onClick=t=>{const a=t.target.closest?.("[data-ui-toast-dismiss]");if(!a)return;const s=a.closest?.("[data-ui-toast]");if(!s)return;const i=s.id??"";s.setAttribute("aria-hidden","true"),s.remove(),r(this.host,"dismiss",{id:i,reason:"action",trigger:e(t)}),this.updateOpenState(),0===this.getToasts().length&&r(this.host,"close",{open:!1,reason:"action",trigger:e(t)})};render(){return s(i,{key:"9ec1cc51ecc4e7a256be5d89a09a10788e46db53",role:"region","aria-label":"Notifications","data-open":this.internalOpen?"":void 0},s("slot",{key:"7b08656f3745a02f8e9f0935e47d6f2cffd88f9b"}))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncSurface:0}]}}};n.style=":host{position:fixed;top:calc(var(--ui-space-4) + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;display:grid;gap:var(--ui-space-2);inline-size:min(24rem, calc(100vw - (var(--ui-space-4) * 2)));max-inline-size:100%;pointer-events:none}:host([popover]){right:auto;bottom:auto;margin:0}:host>*{pointer-events:auto}::slotted([data-ui-toast]){display:grid;grid-template-columns:1fr auto;gap:var(--ui-space-2);align-items:start;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);padding:var(--ui-space-3) var(--ui-space-4);background:var(--ui-surface-elevated);color:var(--ui-text-primary);box-shadow:var(--ui-shadow-lg);animation:ui-toast-enter 0.25s var(--ui-motion-ease) forwards}@keyframes ui-toast-enter{from{opacity:0;transform:translateY(-0.5rem)}to{opacity:1;transform:translateY(0)}}::slotted([data-ui-toast][aria-hidden='true']){display:none}::slotted([data-ui-toast-dismiss]){border:0;background:transparent;color:var(--ui-text-secondary);cursor:pointer;font:inherit}";export{n as ui_toast_region}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,g as a,h as o,H as e}from"./p-8BGiMGQ0.js";import{o as r,c as t,r as s}from"./p-C-0syqXZ.js";import{d as n}from"./p-JwSoedEO.js";const d=class{constructor(a){i(this,a)}get host(){return a(this)}open=!1;defaultOpen=!1;modal=!0;dismissible=!0;label;internalOpen=!1;overlayId=`ui-dialog-${Math.random().toString(36).slice(2,11)}`;dialogRef;syncFromProp(){this.internalOpen=this.open}syncOpen(){this.dialogRef&&(this.internalOpen?(this.dialogRef.showModal(),r({id:this.overlayId,modal:this.modal,element:this.host,dismissible:this.dismissible,requestClose:(i,a)=>this.handleRequestClose(i,a)})):(this.dialogRef.close(),t(this.overlayId)))}componentDidLoad(){this.syncFromProp(),this.internalOpen=this.internalOpen||this.defaultOpen,this.dialogRef?.addEventListener("close",this.onDialogClose),this.syncOpen()}disconnectedCallback(){this.dialogRef?.removeEventListener("close",this.onDialogClose),t(this.overlayId)}componentDidUpdate(){this.syncOpen()}handleRequestClose(i,a){this.internalOpen=!1,n(this.host,"close",{open:!1,reason:i,trigger:a})}onDialogClose=()=>{this.internalOpen&&(this.internalOpen=!1,t(this.overlayId),n(this.host,"close",{open:!1,reason:"programmatic",trigger:"programmatic"}))};onKeydown=i=>{"Escape"===i.key&&s("escape","keyboard")};render(){return o(e,{key:"6e88afd3a595ab0eed3d82a046ffb15e1e167cdb","data-open":this.internalOpen?"":void 0,onKeyDown:this.onKeydown},o("dialog",{key:"420e4d8de66245a5818a1284adb23a536ebcd907",ref:i=>this.dialogRef=i,open:this.internalOpen,"aria-label":this.label},o("slot",{key:"10604688504f013f79b7a6ed5f9ed36bc9c6b48b"})))}static get watchers(){return{open:[{syncFromProp:0}],internalOpen:[{syncOpen:0}]}}};d.style=":host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}";export{d as ui_dialog}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as a,H as r}from"./p-8BGiMGQ0.js";const t=class{constructor(a){o(this,a)}variant;tone;render(){return a(r,{key:"8766c0331ac7fbd6409b604578e159ae093c844b","data-variant":this.variant||void 0,"data-tone":this.tone||void 0},a("slot",{key:"65016ab530b850c82261e2da718622ff72567634"}))}};t.style=":host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}";export{t as ui_badge}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as o,h as e,H as r}from"./p-8BGiMGQ0.js";import{d as i,e as a}from"./p-JwSoedEO.js";const n=class{constructor(o){t(this,o)}get host(){return o(this)}value="";defaultValue="";orientation="horizontal";internalValue="";syncFromProp(){this.internalValue=this.value}syncState(){const t=this.getTabs();0!==t.length&&t.forEach((t=>{const o=(t.id??t.getAttribute("aria-controls")??"")===this.internalValue;t.setAttribute("aria-selected",String(o)),t.tabIndex=o?0:-1;const e=t.getAttribute("aria-controls");if(e){const t=this.host.querySelector(`#${CSS.escape(e)}`)??document.getElementById(e);t&&(t.hidden=!o)}}))}componentDidLoad(){if(this.syncFromProp(),!this.internalValue&&this.defaultValue&&(this.internalValue=this.defaultValue),!this.internalValue){const t=this.getTabs();t.length>0&&(this.internalValue=t[0]?.id??t[0]?.getAttribute("aria-controls")??"")}this.syncState(),this.host.addEventListener("keydown",this.onKeydown),this.host.addEventListener("click",this.onClick)}disconnectedCallback(){this.host.removeEventListener("keydown",this.onKeydown),this.host.removeEventListener("click",this.onClick)}componentDidUpdate(){this.syncState()}getTabs(){return Array.from(this.host.querySelectorAll('[role="tab"]'))}setValueFromTab(t,o){const e=t.id??t.getAttribute("aria-controls")??"";if(!e)return;const r=this.internalValue;this.internalValue=e,this.syncState(),i(this.host,"select",{value:e,previousValue:r||void 0,trigger:o})}onClick=t=>{const o=t.target.closest?.('[role="tab"]');o&&this.host.contains(o)&&this.setValueFromTab(o,a(t))};onKeydown=t=>{const o=t.target.closest?.('[role="tab"]');if(!o||!this.host.contains(o))return;const e=this.getTabs();if(0===e.length)return;const r=e.indexOf(o),i="vertical"===this.orientation,a=i?"ArrowDown":"ArrowRight";if(t.key===a||t.key===(i?"ArrowUp":"ArrowLeft")){t.preventDefault();const o=t.key===a?Math.min(r+1,e.length-1):r<=0?e.length-1:r-1;this.setValueFromTab(e[o],"keyboard"),e[o].focus()}};render(){return e(r,{key:"ca8671f06914de2bd6b412caf11e385d67ae722b",orientation:this.orientation,"data-orientation":this.orientation},e("slot",{key:"49beb3783c8f6a330d25164c82933c2bf6345b1e"}))}static get watchers(){return{value:[{syncFromProp:0}],internalValue:[{syncState:0}],orientation:[{syncState:0}]}}};n.style=":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)}";export{n as ui_tabs}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,g as t,h as i,H as r}from"./p-8BGiMGQ0.js";import{d as o}from"./p-JwSoedEO.js";const a=class{constructor(t){e(this,t)}get host(){return t(this)}checked=!1;defaultChecked=!1;disabled=!1;required=!1;value="on";internalChecked=!1;syncFromProp(){this.internalChecked=this.checked}componentDidLoad(){this.syncFromProp(),this.internalChecked=this.internalChecked||this.defaultChecked}toggle=e=>{this.disabled||(this.internalChecked=!this.internalChecked,o(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:e}))};onKeydown=e=>{" "!==e.key||this.disabled||(e.preventDefault(),this.toggle("keyboard"))};onClick=e=>{e.target!==this.host?.shadowRoot?.querySelector("input")&&this.toggle("pointer")};render(){return i(r,{key:"14205d2856f8fb49b72d69d40f10ac1473a80c04",role:"switch","aria-checked":String(this.internalChecked),"aria-disabled":String(this.disabled),"data-disabled":this.disabled?"":void 0,tabIndex:this.disabled?-1:0,onKeyDown:this.onKeydown,onClick:this.onClick},i("input",{key:"974f8e487c8bf9196c05420e1817139dd6b4138c",type:"checkbox",checked:this.internalChecked,disabled:this.disabled,required:this.required,value:this.value,"aria-hidden":"true",tabIndex:-1,onChange:e=>{this.internalChecked=e.target.checked,o(this.host,"change",{checked:this.internalChecked,value:this.value,trigger:"pointer"})}}),i("slot",{key:"d1cd89aa2d5312cff8845364cdee64821977cb44"}))}static get watchers(){return{checked:[{syncFromProp:0}]}}};a.style=":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}";export{a as ui_switch}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,g as e,h as s,H as i}from"./p-8BGiMGQ0.js";import{d as a,e as o}from"./p-JwSoedEO.js";const n=class{constructor(e){t(this,e)}get host(){return e(this)}checked=!1;defaultChecked=!1;disabled=!1;name="";required=!1;value="on";slotRef;syncToInput(){const t=this.getInput();t&&(this.host.toggleAttribute("data-disabled",this.disabled),t.checked=this.checked,t.disabled=this.disabled,t.name=this.name,t.required=this.required,t.value=this.value)}componentDidLoad(){!this.checked&&this.defaultChecked&&(this.checked=!0),this.slotRef?.addEventListener("slotchange",(()=>this.syncToInput())),this.syncToInput();const t=this.getInput();t?.addEventListener("change",this.onInputChange)}disconnectedCallback(){const t=this.getInput();t?.removeEventListener("change",this.onInputChange)}componentDidUpdate(){this.syncToInput()}getInput(){const t=this.host.shadowRoot?.querySelector("slot");return(t?.assignedElements()??Array.from(this.host.children)).find((t=>t instanceof HTMLInputElement&&"radio"===t.type))??null}onInputChange=t=>{const e=t.target;e&&e.checked&&a(this.host,"change",{checked:!0,value:this.value,trigger:o(t)})};render(){return s(i,{key:"898869b84429366e43c075723e884f34da6fc6df",role:"radio","aria-checked":String(this.checked),"aria-disabled":String(this.disabled),"data-disabled":this.disabled?"":void 0},s("slot",{key:"3f3b881175f25d439807ec9f8f0dd59a1acd6a90",ref:t=>this.slotRef=t}))}static get watchers(){return{checked:[{syncToInput:0}],disabled:[{syncToInput:0}],name:[{syncToInput:0}],required:[{syncToInput:0}],value:[{syncToInput:0}]}}};n.style=":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}";export{n as ui_radio}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,h as e,H as i}from"./p-8BGiMGQ0.js";const t=class{constructor(e){a(this,e)}src="";alt="";name="";fallback="";hasImage=!1;watchSrc(){this.hasImage=!1}onImageLoad=()=>{this.hasImage=!0};onImageError=()=>{this.hasImage=!1};render(){const a=this.fallback||function(a){const e=a.trim().split(/\s+/).filter((a=>a.length>0));return 0===e.length?"?":1===e.length?e[0].slice(0,2).toUpperCase():`${e[0][0]??""}${e[1][0]??""}`.toUpperCase()}(this.name||this.alt),t=this.alt||this.name||"Avatar";return e(i,{key:"18214960ad2f1a0370907c0281102af924739de9",role:"img","aria-label":t,"data-has-image":this.hasImage?"":void 0},e("div",{key:"c6d0a00de56b756f0e24fdc4b306d89cdae2a44f",class:"avatar"},e("img",{key:"c5bfecb9d18797bc934ff087ce7ed8a4616ab347",src:this.src,alt:t,onLoad:this.onImageLoad,onError:this.onImageError,hidden:!this.hasImage,"aria-hidden":this.hasImage?"false":"true"}),e("span",{key:"1875a45a9c21de3e3a52924ef25b3f8429a788c4",class:"fallback",hidden:this.hasImage,"aria-hidden":this.hasImage?"true":"false"},a)))}static get watchers(){return{src:[{watchSrc:0}]}}};t.style=":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{display:contents}.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%}";export{t as ui_avatar}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Host,
|
|
3
|
-
getElement,
|
|
4
|
-
h,
|
|
5
|
-
registerInstance
|
|
6
|
-
} from "./chunk-GDMQKT5F.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(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){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 OVERFLOW_ATTR = "data-ui-avatar-group-overflow";
|
|
11
|
-
var UIAvatarGroup = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
registerInstance(this, hostRef);
|
|
14
|
-
}
|
|
15
|
-
get host() {
|
|
16
|
-
return getElement(this);
|
|
17
|
-
}
|
|
18
|
-
max = 5;
|
|
19
|
-
label = "People";
|
|
20
|
-
overflowCount = 0;
|
|
21
|
-
slotRef;
|
|
22
|
-
syncOverflow() {
|
|
23
|
-
this.updateOverflow();
|
|
24
|
-
}
|
|
25
|
-
componentDidLoad() {
|
|
26
|
-
this.slotRef?.addEventListener("slotchange", () => this.updateOverflow());
|
|
27
|
-
this.updateOverflow();
|
|
28
|
-
}
|
|
29
|
-
componentDidUpdate() {
|
|
30
|
-
this.updateOverflow();
|
|
31
|
-
}
|
|
32
|
-
updateOverflow() {
|
|
33
|
-
const slot = this.host.shadowRoot?.querySelector("slot");
|
|
34
|
-
const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
|
|
35
|
-
const children = nodes.filter((el) => !el.hasAttribute(OVERFLOW_ATTR));
|
|
36
|
-
const total = children.length;
|
|
37
|
-
const visibleCount = Math.min(this.max, total);
|
|
38
|
-
const overflowCount = total > this.max ? total - this.max : 0;
|
|
39
|
-
children.forEach((el, i) => {
|
|
40
|
-
el.hidden = i >= visibleCount;
|
|
41
|
-
el.setAttribute("aria-hidden", String(i >= visibleCount));
|
|
42
|
-
});
|
|
43
|
-
this.overflowCount = overflowCount;
|
|
44
|
-
}
|
|
45
|
-
render() {
|
|
46
|
-
return h(Host, { key: "bef6efd3c80d29e47742412a497893789ea8790b", role: "list", "aria-label": this.label || void 0 }, h("slot", { key: "21585b11dcde36868c3e3bc7fbd0c216be6f011b" }), this.overflowCount > 0 && h("span", { key: "ede3b71945d379fe78d522a3346aa29c02d74b15", class: "overflow", role: "listitem", "aria-label": `${this.overflowCount} more`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
|
|
47
|
-
}
|
|
48
|
-
static get watchers() {
|
|
49
|
-
return {
|
|
50
|
-
"max": [{
|
|
51
|
-
"syncOverflow": 0
|
|
52
|
-
}]
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
UIAvatarGroup.style = uiAvatarGroupCss();
|
|
57
|
-
export {
|
|
58
|
-
UIAvatarGroup as ui_avatar_group
|
|
59
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Host,
|
|
3
|
-
h,
|
|
4
|
-
registerInstance
|
|
5
|
-
} from "./chunk-GDMQKT5F.js";
|
|
6
|
-
|
|
7
|
-
// dist/esm/ui-badge.entry.js
|
|
8
|
-
var uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color: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: "8766c0331ac7fbd6409b604578e159ae093c844b", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("slot", { key: "65016ab530b850c82261e2da718622ff72567634" }));
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
UIBadge.style = uiBadgeCss();
|
|
20
|
-
export {
|
|
21
|
-
UIBadge as ui_badge
|
|
22
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createId
|
|
3
|
-
} from "./chunk-OF57X5AR.js";
|
|
4
|
-
import {
|
|
5
|
-
Host,
|
|
6
|
-
getElement,
|
|
7
|
-
h,
|
|
8
|
-
registerInstance
|
|
9
|
-
} from "./chunk-GDMQKT5F.js";
|
|
10
|
-
|
|
11
|
-
// dist/esm/ui-form-field.entry.js
|
|
12
|
-
var uiFormFieldCss = () => `:host{display:grid;gap:var(--ui-space-2);min-inline-size:0;align-content:start;color:var(--ui-text-primary)}::slotted(label){color:var(--ui-text-secondary);font-size:0.95rem}::slotted([data-slot='help']){min-block-size:var(--ui-form-field-help-min-block-size, 0);color:var(--ui-text-muted);font-size:0.875rem;line-height:var(--ui-line-height-md)}::slotted([data-slot='error']),::slotted([role='alert']){color:var(--ui-accent-active);font-size:0.875rem}`;
|
|
13
|
-
var UIFormField = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
registerInstance(this, hostRef);
|
|
16
|
-
}
|
|
17
|
-
get host() {
|
|
18
|
-
return getElement(this);
|
|
19
|
-
}
|
|
20
|
-
invalid = false;
|
|
21
|
-
disabled = false;
|
|
22
|
-
required = false;
|
|
23
|
-
componentDidLoad() {
|
|
24
|
-
this.wire();
|
|
25
|
-
}
|
|
26
|
-
componentDidUpdate() {
|
|
27
|
-
this.wire();
|
|
28
|
-
}
|
|
29
|
-
wire() {
|
|
30
|
-
const label = this.host.querySelector("label");
|
|
31
|
-
const input = this.host.querySelector("input, textarea, select");
|
|
32
|
-
const help = this.host.querySelector('[data-slot="help"]');
|
|
33
|
-
const error = this.host.querySelector('[data-slot="error"], [role="alert"]');
|
|
34
|
-
if (!input)
|
|
35
|
-
return;
|
|
36
|
-
if (!input.id) {
|
|
37
|
-
input.id = createId("form-field-input");
|
|
38
|
-
}
|
|
39
|
-
if (label && !label.getAttribute("for")) {
|
|
40
|
-
label.setAttribute("for", input.id);
|
|
41
|
-
}
|
|
42
|
-
const describedIds = [];
|
|
43
|
-
if (help) {
|
|
44
|
-
if (!help.id)
|
|
45
|
-
help.id = createId("form-field-help");
|
|
46
|
-
describedIds.push(help.id);
|
|
47
|
-
}
|
|
48
|
-
if (error) {
|
|
49
|
-
if (!error.id)
|
|
50
|
-
error.id = createId("form-field-error");
|
|
51
|
-
describedIds.push(error.id);
|
|
52
|
-
}
|
|
53
|
-
if (describedIds.length) {
|
|
54
|
-
input.setAttribute("aria-describedby", describedIds.join(" "));
|
|
55
|
-
}
|
|
56
|
-
input.disabled = this.disabled;
|
|
57
|
-
input.required = this.required;
|
|
58
|
-
input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
return h(Host, { key: "cdd06c6b16ac56f3547e64e7888d8766243392db", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "7d545673a3485f8beee01b13ab56185b98ba8856" }));
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
UIFormField.style = uiFormFieldCss();
|
|
65
|
-
export {
|
|
66
|
-
UIFormField as ui_form_field
|
|
67
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Host,
|
|
3
|
-
h,
|
|
4
|
-
registerInstance
|
|
5
|
-
} from "./chunk-GDMQKT5F.js";
|
|
6
|
-
|
|
7
|
-
// dist/esm/ui-menu-item.entry.js
|
|
8
|
-
var uiMenuItemCss = () => `:host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}`;
|
|
9
|
-
var UIMenuItem = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
}
|
|
13
|
-
disabled = false;
|
|
14
|
-
value = "";
|
|
15
|
-
render() {
|
|
16
|
-
return h(Host, { key: "ebd7c5aa5c8fdce2d2349aef7f1a4505b9190852", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("slot", { key: "7b55a8545034b055f8cbd047a0f16ea729af097e" }));
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
UIMenuItem.style = uiMenuItemCss();
|
|
20
|
-
export {
|
|
21
|
-
UIMenuItem as ui_menu_item
|
|
22
|
-
};
|