solid-ui 3.1.3-12 → 3.1.3-13
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/README.md +9 -0
- package/dist/chunks/{DialogProvider-ge2aA77F.js → DialogProvider-B7wEBrVN.js} +11 -13
- package/dist/chunks/{DialogProvider-ge2aA77F.js.map → DialogProvider-B7wEBrVN.js.map} +1 -1
- package/dist/chunks/{account-Bb818bGF.js → account-DeNlj01m.js} +24 -26
- package/dist/chunks/{account-Bb818bGF.js.map → account-DeNlj01m.js.map} +1 -1
- package/dist/chunks/{auth-ClVI18ss.js → auth-Knq99zZ9.js} +75 -103
- package/dist/chunks/auth-Knq99zZ9.js.map +1 -0
- package/dist/chunks/{avatar-DGu_PX5y.js → avatar-DgO_p94F.js} +8 -9
- package/dist/chunks/{avatar-DGu_PX5y.js.map → avatar-DgO_p94F.js.map} +1 -1
- package/dist/chunks/{button-B9-nlEpz.js → button-Dvkek1tx.js} +10 -11
- package/dist/chunks/{button-B9-nlEpz.js.map → button-Dvkek1tx.js.map} +1 -1
- package/dist/chunks/{chunk.7MPIABXH-CEYdxYyt.js → chunk.7MPIABXH-DNcYOuE8.js} +22 -22
- package/dist/chunks/{chunk.7MPIABXH-CEYdxYyt.js.map → chunk.7MPIABXH-DNcYOuE8.js.map} +1 -1
- package/dist/chunks/{combobox-DrT0Nb-A.js → combobox-B5j4LoHY.js} +108 -179
- package/dist/chunks/combobox-B5j4LoHY.js.map +1 -0
- package/dist/chunks/{combobox-option-DxJvAZ_Q.js → combobox-option-C5lKAumO.js} +7 -8
- package/dist/chunks/{combobox-option-DxJvAZ_Q.js.map → combobox-option-C5lKAumO.js.map} +1 -1
- package/dist/chunks/components-BD458q30.js +758 -0
- package/dist/chunks/components-BD458q30.js.map +1 -0
- package/dist/chunks/{dialog-kyHgc-uy.js → dialog-DZgm_Tph.js} +57 -114
- package/dist/chunks/dialog-DZgm_Tph.js.map +1 -0
- package/dist/chunks/{dialog-content-CEITrC59.js → dialog-content-DY-ROHyi.js} +4 -4
- package/dist/chunks/{dialog-content-CEITrC59.js.map → dialog-content-DY-ROHyi.js.map} +1 -1
- package/dist/chunks/{dialog-footer-DVLEK5bU.js → dialog-footer-BAZTjZ8J.js} +4 -4
- package/dist/chunks/{dialog-footer-DVLEK5bU.js.map → dialog-footer-BAZTjZ8J.js.map} +1 -1
- package/dist/chunks/{dialog-header-kEWl21oD.js → dialog-header-COzPcK8F.js} +4 -4
- package/dist/chunks/{dialog-header-kEWl21oD.js.map → dialog-header-COzPcK8F.js.map} +1 -1
- package/dist/chunks/dialogs-DEuwXC46.js +26 -0
- package/dist/chunks/dialogs-DEuwXC46.js.map +1 -0
- package/dist/chunks/{dialogs-root-dPGfuzSZ.js → dialogs-root-BYp6fIUE.js} +12 -17
- package/dist/chunks/dialogs-root-BYp6fIUE.js.map +1 -0
- package/dist/chunks/{guard-DEqOFEs4.js → guard-DI4k0FkM.js} +8 -9
- package/dist/chunks/{guard-DEqOFEs4.js.map → guard-DI4k0FkM.js.map} +1 -1
- package/dist/chunks/{input-BjCX2bFe.js → input-CCpEhtqA.js} +57 -131
- package/dist/chunks/input-CCpEhtqA.js.map +1 -0
- package/dist/chunks/{login-button-Czm-E9Na.js → login-button-BafqiKef.js} +9 -10
- package/dist/chunks/{login-button-Czm-E9Na.js.map → login-button-BafqiKef.js.map} +1 -1
- package/dist/chunks/{logout-button-BrR_jOhK.js → logout-button-D54NF9EW.js} +9 -10
- package/dist/chunks/{logout-button-BrR_jOhK.js.map → logout-button-D54NF9EW.js.map} +1 -1
- package/dist/chunks/{menu-1PG19fCC.js → menu-DKxtACGA.js} +45 -46
- package/dist/chunks/{menu-1PG19fCC.js.map → menu-DKxtACGA.js.map} +1 -1
- package/dist/chunks/{menu-item-C9uErV38.js → menu-item-D9BqJtKZ.js} +10 -11
- package/dist/chunks/{menu-item-C9uErV38.js.map → menu-item-D9BqJtKZ.js.map} +1 -1
- package/dist/chunks/photo-capture-BoZF621r.js +403 -0
- package/dist/chunks/photo-capture-BoZF621r.js.map +1 -0
- package/dist/chunks/photo-capture-modal-BLZtHDj1.js +560 -0
- package/dist/chunks/photo-capture-modal-BLZtHDj1.js.map +1 -0
- package/dist/chunks/{provider-qd_4VaKB.js → provider-Btl6Lnki.js} +13 -14
- package/dist/chunks/{provider-qd_4VaKB.js.map → provider-Btl6Lnki.js.map} +1 -1
- package/dist/chunks/{select-OM-SgY4K.js → select-XkieYvDm.js} +53 -110
- package/dist/chunks/select-XkieYvDm.js.map +1 -0
- package/dist/chunks/{select-option-pVhYlXrt.js → select-option-DUg4AWzw.js} +7 -8
- package/dist/chunks/{select-option-pVhYlXrt.js.map → select-option-DUg4AWzw.js.map} +1 -1
- package/dist/chunks/{signup-button-BnA5p-uJ.js → signup-button-D5wS8_gB.js} +9 -10
- package/dist/chunks/{signup-button-BnA5p-uJ.js.map → signup-button-D5wS8_gB.js.map} +1 -1
- package/dist/chunks/{solid-emblem-D2clBuKZ.js → solid-emblem-XHk-oomv.js} +5 -5
- package/dist/chunks/{solid-emblem-D2clBuKZ.js.map → solid-emblem-XHk-oomv.js.map} +1 -1
- package/dist/chunks/{src-DJOb1wMf.js → src-CJICzMIV.js} +4 -3
- package/dist/chunks/{src-DJOb1wMf.js.map → src-CJICzMIV.js.map} +1 -1
- package/dist/components/account/Account.stories.d.ts +3 -13
- package/dist/components/account/Account.stories.d.ts.map +1 -1
- package/dist/components/account.js +1 -1
- package/dist/components/all.cjs.js +1 -1
- package/dist/components/all.esm.js +1 -0
- package/dist/components/avatar/Avatar.stories.d.ts +3 -21
- package/dist/components/avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/button/Button.stories.d.ts +15 -154
- package/dist/components/button/Button.stories.d.ts.map +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/combobox/Combobox.cjs.js +11 -11
- package/dist/components/combobox/Combobox.cjs.js.map +1 -1
- package/dist/components/combobox/Combobox.d.ts +4 -11
- package/dist/components/combobox/Combobox.d.ts.map +1 -1
- package/dist/components/combobox/Combobox.esm.js +101 -172
- package/dist/components/combobox/Combobox.esm.js.map +1 -1
- package/dist/components/combobox/Combobox.stories.d.ts +9 -46
- package/dist/components/combobox/Combobox.stories.d.ts.map +1 -1
- package/dist/components/combobox-option.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/dialog/Dialog.cjs.js +3 -3
- package/dist/components/dialog/Dialog.cjs.js.map +1 -1
- package/dist/components/dialog/Dialog.esm.js +6 -6
- package/dist/components/dialog/Dialog.esm.js.map +1 -1
- package/dist/components/dialog/Dialog.stories.d.ts +22 -0
- package/dist/components/dialog/Dialog.stories.d.ts.map +1 -0
- package/dist/components/dialog/docs/sample-modal/SampleModal.d.ts +6 -0
- package/dist/components/dialog/docs/sample-modal/SampleModal.d.ts.map +1 -0
- package/dist/components/dialog/docs/sample-modal/index.d.ts +4 -0
- package/dist/components/dialog/docs/sample-modal/index.d.ts.map +1 -0
- package/dist/components/dialog-content.js +1 -1
- package/dist/components/dialog-footer.js +1 -1
- package/dist/components/dialog-header.js +1 -1
- package/dist/components/dialog-provider.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialogs-root/DialogsRoot.cjs.js +4 -7
- package/dist/components/dialogs-root/DialogsRoot.cjs.js.map +1 -1
- package/dist/components/dialogs-root/DialogsRoot.d.ts.map +1 -1
- package/dist/components/dialogs-root/DialogsRoot.esm.js +7 -10
- package/dist/components/dialogs-root/DialogsRoot.esm.js.map +1 -1
- package/dist/components/dialogs-root.js +1 -1
- package/dist/components/guard/Guard.stories.d.ts +3 -21
- package/dist/components/guard/Guard.stories.d.ts.map +1 -1
- package/dist/components/guard.js +1 -1
- package/dist/components/input/Input.cjs.js +2 -2
- package/dist/components/input/Input.cjs.js.map +1 -1
- package/dist/components/input/Input.d.ts +3 -11
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.esm.js +61 -135
- package/dist/components/input/Input.esm.js.map +1 -1
- package/dist/components/input/Input.stories.d.ts +13 -22
- package/dist/components/input/Input.stories.d.ts.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/login-button/LoginButton.stories.d.ts +4 -4
- package/dist/components/login-button/LoginButton.stories.d.ts.map +1 -1
- package/dist/components/login-button.js +1 -1
- package/dist/components/login-modal/LoginModal.cjs.js +1 -1
- package/dist/components/login-modal/LoginModal.cjs.js.map +1 -1
- package/dist/components/login-modal/LoginModal.esm.js +1 -1
- package/dist/components/login-modal/LoginModal.esm.js.map +1 -1
- package/dist/components/login-modal/LoginModal.stories.d.ts +13 -5
- package/dist/components/login-modal/LoginModal.stories.d.ts.map +1 -1
- package/dist/components/login-modal.js +1 -1
- package/dist/components/logout-button/LogoutButton.stories.d.ts +4 -4
- package/dist/components/logout-button/LogoutButton.stories.d.ts.map +1 -1
- package/dist/components/logout-button.js +1 -1
- package/dist/components/menu/Menu.stories.d.ts +3 -4
- package/dist/components/menu/Menu.stories.d.ts.map +1 -1
- package/dist/components/menu-item.js +1 -1
- package/dist/components/menu.js +1 -1
- package/dist/components/photo-capture/PhotoCapture.cjs.js +6 -0
- package/dist/components/photo-capture/PhotoCapture.cjs.js.map +1 -0
- package/dist/components/photo-capture/PhotoCapture.d.ts +20 -0
- package/dist/components/photo-capture/PhotoCapture.d.ts.map +1 -0
- package/dist/components/photo-capture/PhotoCapture.esm.js +404 -0
- package/dist/components/photo-capture/PhotoCapture.esm.js.map +1 -0
- package/dist/components/photo-capture/PhotoCapture.stories.d.ts +16 -0
- package/dist/components/photo-capture/PhotoCapture.stories.d.ts.map +1 -0
- package/dist/components/photo-capture/docs/photo-capture-sandbox/PhotoCaptureSandbox.d.ts +9 -0
- package/dist/components/photo-capture/docs/photo-capture-sandbox/PhotoCaptureSandbox.d.ts.map +1 -0
- package/dist/components/photo-capture/docs/photo-capture-sandbox/index.d.ts +4 -0
- package/dist/components/photo-capture/docs/photo-capture-sandbox/index.d.ts.map +1 -0
- package/dist/components/photo-capture/index.cjs.js +2 -1
- package/dist/components/photo-capture/index.cjs.js.map +1 -0
- package/dist/components/photo-capture/index.d.ts +4 -1
- package/dist/components/photo-capture/index.d.ts.map +1 -1
- package/dist/components/photo-capture/index.esm.js +7 -3
- package/dist/components/photo-capture/index.esm.js.map +1 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.cjs.js +24 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.cjs.js.map +1 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.d.ts +42 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.d.ts.map +1 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.esm.js +561 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.esm.js.map +1 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.styles.cjs.js +2 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.styles.cjs.js.map +1 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.styles.esm.js +7 -0
- package/dist/components/photo-capture-modal/PhotoCaptureModal.styles.esm.js.map +1 -0
- package/dist/components/photo-capture-modal/index.cjs.js +2 -0
- package/dist/components/photo-capture-modal/index.cjs.js.map +1 -0
- package/dist/components/photo-capture-modal/index.d.ts +4 -0
- package/dist/components/photo-capture-modal/index.d.ts.map +1 -0
- package/dist/components/photo-capture-modal/index.esm.js +7 -0
- package/dist/components/photo-capture-modal/index.esm.js.map +1 -0
- package/dist/components/photo-capture-modal.js +2 -0
- package/dist/components/photo-capture.js +2 -2
- package/dist/components/provider.js +1 -1
- package/dist/components/select/Select.cjs.js +3 -3
- package/dist/components/select/Select.cjs.js.map +1 -1
- package/dist/components/select/Select.d.ts +3 -10
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.esm.js +52 -109
- package/dist/components/select/Select.esm.js.map +1 -1
- package/dist/components/select/Select.stories.d.ts +9 -13
- package/dist/components/select/Select.stories.d.ts.map +1 -1
- package/dist/components/select-option.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/signup-button/SignupButton.stories.d.ts +4 -4
- package/dist/components/signup-button/SignupButton.stories.d.ts.map +1 -1
- package/dist/components/signup-button.js +1 -1
- package/dist/components/solid-emblem.js +1 -1
- package/dist/components.js +24 -23
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -8
- package/dist/lib/auth/SolidAuth.cjs.js +1 -1
- package/dist/lib/auth/SolidAuth.cjs.js.map +1 -1
- package/dist/lib/auth/SolidAuth.d.ts.map +1 -1
- package/dist/lib/auth/SolidAuth.esm.js +15 -16
- package/dist/lib/auth/SolidAuth.esm.js.map +1 -1
- package/dist/lib/components/decorators.cjs.js.map +1 -1
- package/dist/lib/components/decorators.esm.js.map +1 -1
- package/dist/lib/components/dialog-component/DialogComponent.cjs.js +2 -0
- package/dist/lib/components/dialog-component/DialogComponent.cjs.js.map +1 -0
- package/dist/lib/components/dialog-component/DialogComponent.d.ts +10 -0
- package/dist/lib/components/dialog-component/DialogComponent.d.ts.map +1 -0
- package/dist/lib/components/dialog-component/DialogComponent.esm.js +203 -0
- package/dist/lib/components/dialog-component/DialogComponent.esm.js.map +1 -0
- package/dist/lib/components/dialog-component/index.cjs.js +1 -0
- package/dist/lib/components/dialog-component/index.d.ts +4 -0
- package/dist/lib/components/dialog-component/index.d.ts.map +1 -0
- package/dist/lib/components/dialog-component/index.esm.js +2 -0
- package/dist/lib/components/form-control-component/FormControlComponent.cjs.js +2 -0
- package/dist/lib/components/form-control-component/FormControlComponent.cjs.js.map +1 -0
- package/dist/lib/components/form-control-component/FormControlComponent.d.ts +15 -0
- package/dist/lib/components/form-control-component/FormControlComponent.d.ts.map +1 -0
- package/dist/lib/components/form-control-component/FormControlComponent.esm.js +271 -0
- package/dist/lib/components/form-control-component/FormControlComponent.esm.js.map +1 -0
- package/dist/lib/components/form-control-component/index.cjs.js +1 -0
- package/dist/lib/components/form-control-component/index.d.ts +4 -0
- package/dist/lib/components/form-control-component/index.d.ts.map +1 -0
- package/dist/lib/components/form-control-component/index.esm.js +2 -0
- package/dist/lib/components/ids.cjs.js.map +1 -1
- package/dist/lib/components/ids.esm.js.map +1 -1
- package/dist/lib/components/index.cjs.js +1 -1
- package/dist/lib/components/index.d.ts +3 -1
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/components/index.esm.js +8 -4
- package/dist/lib/components/traits/DialogTrait.cjs.js +1 -1
- package/dist/lib/components/traits/DialogTrait.cjs.js.map +1 -1
- package/dist/lib/components/traits/DialogTrait.d.ts +2 -1
- package/dist/lib/components/traits/DialogTrait.d.ts.map +1 -1
- package/dist/lib/components/traits/DialogTrait.esm.js +26 -6
- package/dist/lib/components/traits/DialogTrait.esm.js.map +1 -1
- package/dist/lib/components/traits/FormControlTrait.cjs.js +1 -1
- package/dist/lib/components/traits/FormControlTrait.cjs.js.map +1 -1
- package/dist/lib/components/traits/FormControlTrait.d.ts +4 -2
- package/dist/lib/components/traits/FormControlTrait.d.ts.map +1 -1
- package/dist/lib/components/traits/FormControlTrait.esm.js +28 -10
- package/dist/lib/components/traits/FormControlTrait.esm.js.map +1 -1
- package/dist/lib/components/web-component/WebComponent.cjs.js +1 -1
- package/dist/lib/components/web-component/WebComponent.cjs.js.map +1 -1
- package/dist/lib/components/web-component/WebComponent.d.ts +12 -1
- package/dist/lib/components/web-component/WebComponent.d.ts.map +1 -1
- package/dist/lib/components/web-component/WebComponent.esm.js +28 -6
- package/dist/lib/components/web-component/WebComponent.esm.js.map +1 -1
- package/dist/lib/components/web-component/WebComponent.styles.cjs.js +1 -1
- package/dist/lib/components/web-component/WebComponent.styles.esm.js +1 -1
- package/dist/lib/dialogs/Dialog.cjs.js +1 -1
- package/dist/lib/dialogs/Dialog.cjs.js.map +1 -1
- package/dist/lib/dialogs/Dialog.d.ts +4 -8
- package/dist/lib/dialogs/Dialog.d.ts.map +1 -1
- package/dist/lib/dialogs/Dialog.esm.js +1 -8
- package/dist/lib/dialogs/Dialog.esm.js.map +1 -1
- package/dist/lib/dialogs/helpers.cjs.js +1 -1
- package/dist/lib/dialogs/helpers.cjs.js.map +1 -1
- package/dist/lib/dialogs/helpers.d.ts +7 -2
- package/dist/lib/dialogs/helpers.d.ts.map +1 -1
- package/dist/lib/dialogs/helpers.esm.js +5 -3
- package/dist/lib/dialogs/helpers.esm.js.map +1 -1
- package/dist/loader.js +6 -8
- package/dist/solid-ui.js +130 -386
- package/dist/solid-ui.min.js +130 -386
- package/dist/solid-ui.min.js.map +1 -1
- package/dist/storybook/helpers.d.ts +2 -6
- package/dist/storybook/helpers.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/chunks/auth-ClVI18ss.js.map +0 -1
- package/dist/chunks/close-dialog-DfAh83bX.js +0 -14
- package/dist/chunks/close-dialog-DfAh83bX.js.map +0 -1
- package/dist/chunks/combobox-DrT0Nb-A.js.map +0 -1
- package/dist/chunks/components-PQfnwrHI.js +0 -107
- package/dist/chunks/components-PQfnwrHI.js.map +0 -1
- package/dist/chunks/context-B_xwK-Y_.js +0 -22
- package/dist/chunks/context-B_xwK-Y_.js.map +0 -1
- package/dist/chunks/decorators-BqWyWiL9.js +0 -50
- package/dist/chunks/decorators-BqWyWiL9.js.map +0 -1
- package/dist/chunks/dialog-kyHgc-uy.js.map +0 -1
- package/dist/chunks/dialogs-root-dPGfuzSZ.js.map +0 -1
- package/dist/chunks/input-BjCX2bFe.js.map +0 -1
- package/dist/chunks/photo-capture-DzK6wZF4.js +0 -624
- package/dist/chunks/photo-capture-DzK6wZF4.js.map +0 -1
- package/dist/chunks/select-OM-SgY4K.js.map +0 -1
- package/dist/v2/components/media/photoCapture/PhotoCapture.cjs.js +0 -281
- package/dist/v2/components/media/photoCapture/PhotoCapture.cjs.js.map +0 -1
- package/dist/v2/components/media/photoCapture/PhotoCapture.d.ts +0 -200
- package/dist/v2/components/media/photoCapture/PhotoCapture.d.ts.map +0 -1
- package/dist/v2/components/media/photoCapture/PhotoCapture.esm.js +0 -623
- package/dist/v2/components/media/photoCapture/PhotoCapture.esm.js.map +0 -1
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.d.ts +0 -1
- package/dist/v2/components/media/photoCapture/PhotoCapture.test.d.ts.map +0 -1
- package/dist/v2/components/media/photoCapture/index.cjs.js +0 -2
- package/dist/v2/components/media/photoCapture/index.cjs.js.map +0 -1
- package/dist/v2/components/media/photoCapture/index.d.ts +0 -3
- package/dist/v2/components/media/photoCapture/index.d.ts.map +0 -1
- package/dist/v2/components/media/photoCapture/index.esm.js +0 -8
- package/dist/v2/components/media/photoCapture/index.esm.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { USER_OPTIONS } from '../../storybook';
|
|
2
1
|
declare const meta: {
|
|
3
|
-
readonly title: "Account";
|
|
2
|
+
readonly title: "Solid/Account";
|
|
4
3
|
readonly args: {
|
|
5
4
|
readonly user: "Alice";
|
|
6
5
|
};
|
|
@@ -10,24 +9,15 @@ declare const meta: {
|
|
|
10
9
|
options: ("Alice" | "Bob" | "Guest" | "Initializing")[];
|
|
11
10
|
};
|
|
12
11
|
};
|
|
12
|
+
readonly render: () => import('lit-html').TemplateResult<1>;
|
|
13
13
|
};
|
|
14
|
-
export declare const Primary: {
|
|
15
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
16
|
-
user: typeof USER_OPTIONS.control;
|
|
17
|
-
}>) => HTMLDivElement;
|
|
18
|
-
};
|
|
14
|
+
export declare const Primary: {};
|
|
19
15
|
export declare const Guest: {
|
|
20
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
21
|
-
user: typeof USER_OPTIONS.control;
|
|
22
|
-
}>) => HTMLDivElement;
|
|
23
16
|
args: {
|
|
24
17
|
user: string;
|
|
25
18
|
};
|
|
26
19
|
};
|
|
27
20
|
export declare const Initializing: {
|
|
28
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
29
|
-
user: typeof USER_OPTIONS.control;
|
|
30
|
-
}>) => HTMLDivElement;
|
|
31
21
|
args: {
|
|
32
22
|
user: string;
|
|
33
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.stories.d.ts","sourceRoot":"","sources":["../../../src/components/account/Account.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Account.stories.d.ts","sourceRoot":"","sources":["../../../src/components/account/Account.stories.ts"],"names":[],"mappings":"AAGA,OAAO,WAAW,CAAA;AAElB,QAAA,MAAM,IAAI;;;;;;;;;;;;CASA,CAAA;AAEV,eAAO,MAAM,OAAO,IAAK,CAAA;AACzB,eAAO,MAAM,KAAK;;;;CAA8B,CAAA;AAChD,eAAO,MAAM,YAAY;;;;CAAqC,CAAA;AAE9D,eAAe,IAAI,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/account-
|
|
1
|
+
import { n as e, t } from "../chunks/account-DeNlj01m.js";
|
|
2
2
|
export { e as Account, t as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("./dialog-header/index.cjs.js"),require("./button/index.cjs.js"),require("./dialog/index.cjs.js"),require("./dialog-content/index.cjs.js"),require("./dialog-footer/index.cjs.js"),require("./combobox/index.cjs.js"),require("./combobox-option/index.cjs.js"),require("./login-modal/index.cjs.js"),require("./dialogs-root/index.cjs.js"),require("./avatar/index.cjs.js"),require("./login-button/index.cjs.js"),require("./logout-button/index.cjs.js"),require("./menu-item/index.cjs.js"),require("./menu/index.cjs.js"),require("./signup-button/index.cjs.js"),require("./account/index.cjs.js"),require("./dialog-provider/index.cjs.js"),require("./footer/index.cjs.js"),require("./guard/index.cjs.js"),require("./input/index.cjs.js"),require("./photo-capture/index.cjs.js"),require("./select/index.cjs.js"),require("./select-option/index.cjs.js"),require("./solid-emblem/index.cjs.js");
|
|
1
|
+
require("./dialog-header/index.cjs.js"),require("./button/index.cjs.js"),require("./dialog/index.cjs.js"),require("./dialog-content/index.cjs.js"),require("./dialog-footer/index.cjs.js"),require("./combobox/index.cjs.js"),require("./combobox-option/index.cjs.js"),require("./login-modal/index.cjs.js"),require("./dialogs-root/index.cjs.js"),require("./avatar/index.cjs.js"),require("./login-button/index.cjs.js"),require("./logout-button/index.cjs.js"),require("./menu-item/index.cjs.js"),require("./menu/index.cjs.js"),require("./signup-button/index.cjs.js"),require("./account/index.cjs.js"),require("./dialog-provider/index.cjs.js"),require("./footer/index.cjs.js"),require("./guard/index.cjs.js"),require("./input/index.cjs.js"),require("./photo-capture-modal/index.cjs.js"),require("./photo-capture/index.cjs.js"),require("./select/index.cjs.js"),require("./select-option/index.cjs.js"),require("./solid-emblem/index.cjs.js");
|
|
@@ -18,6 +18,7 @@ import "./dialog-provider/index.esm.js";
|
|
|
18
18
|
import "./footer/index.esm.js";
|
|
19
19
|
import "./guard/index.esm.js";
|
|
20
20
|
import "./input/index.esm.js";
|
|
21
|
+
import "./photo-capture-modal/index.esm.js";
|
|
21
22
|
import "./photo-capture/index.esm.js";
|
|
22
23
|
import "./select/index.esm.js";
|
|
23
24
|
import "./select-option/index.esm.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const meta: {
|
|
2
|
-
readonly title: "Avatar";
|
|
2
|
+
readonly title: "Solid/Avatar";
|
|
3
3
|
readonly args: {
|
|
4
4
|
readonly user: "Alice";
|
|
5
5
|
};
|
|
@@ -9,33 +9,15 @@ declare const meta: {
|
|
|
9
9
|
options: ("Alice" | "Bob" | "Guest" | "Initializing")[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
+
readonly render: () => import('lit-html').TemplateResult<1>;
|
|
12
13
|
};
|
|
13
|
-
export declare const Primary: {
|
|
14
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
15
|
-
readonly user: {
|
|
16
|
-
type: string;
|
|
17
|
-
options: ("Alice" | "Bob" | "Guest" | "Initializing")[];
|
|
18
|
-
};
|
|
19
|
-
}>) => HTMLDivElement;
|
|
20
|
-
};
|
|
14
|
+
export declare const Primary: {};
|
|
21
15
|
export declare const Fallback: {
|
|
22
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
23
|
-
readonly user: {
|
|
24
|
-
type: string;
|
|
25
|
-
options: ("Alice" | "Bob" | "Guest" | "Initializing")[];
|
|
26
|
-
};
|
|
27
|
-
}>) => HTMLDivElement;
|
|
28
16
|
args: {
|
|
29
17
|
user: string;
|
|
30
18
|
};
|
|
31
19
|
};
|
|
32
20
|
export declare const Guest: {
|
|
33
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
34
|
-
readonly user: {
|
|
35
|
-
type: string;
|
|
36
|
-
options: ("Alice" | "Bob" | "Guest" | "Initializing")[];
|
|
37
|
-
};
|
|
38
|
-
}>) => HTMLDivElement;
|
|
39
21
|
args: {
|
|
40
22
|
user: string;
|
|
41
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.stories.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,CAAA;AAEjB,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.stories.ts"],"names":[],"mappings":"AAGA,OAAO,UAAU,CAAA;AAEjB,QAAA,MAAM,IAAI;;;;;;;;;;;;CASA,CAAA;AAEV,eAAO,MAAM,OAAO,IAAK,CAAA;AACzB,eAAO,MAAM,QAAQ;;;;CAA4B,CAAA;AACjD,eAAO,MAAM,KAAK;;;;CAA8B,CAAA;AAEhD,eAAe,IAAI,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/avatar-
|
|
1
|
+
import { n as e, t } from "../chunks/avatar-DgO_p94F.js";
|
|
2
2
|
export { e as Avatar, t as default };
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
+
declare const args: {
|
|
2
|
+
readonly text: "Save Changes";
|
|
3
|
+
readonly title: "";
|
|
4
|
+
readonly variant: "primary";
|
|
5
|
+
readonly icon: "None";
|
|
6
|
+
readonly leftIcon: "None";
|
|
7
|
+
readonly rightIcon: "None";
|
|
8
|
+
readonly disabled: false;
|
|
9
|
+
readonly loading: false;
|
|
10
|
+
};
|
|
1
11
|
declare const meta: {
|
|
2
|
-
readonly title: "Button";
|
|
12
|
+
readonly title: "Basic UI/Button";
|
|
3
13
|
readonly args: {
|
|
4
14
|
readonly text: "Save Changes";
|
|
5
15
|
readonly title: "";
|
|
6
16
|
readonly variant: "primary";
|
|
17
|
+
readonly icon: "None";
|
|
7
18
|
readonly leftIcon: "None";
|
|
8
19
|
readonly rightIcon: "None";
|
|
9
20
|
readonly disabled: false;
|
|
@@ -39,107 +50,16 @@ declare const meta: {
|
|
|
39
50
|
readonly control: "boolean";
|
|
40
51
|
};
|
|
41
52
|
};
|
|
53
|
+
readonly render: ({ icon, leftIcon, rightIcon, variant, disabled, loading, title, text }: typeof args) => import('lit-html').TemplateResult<1>;
|
|
42
54
|
};
|
|
43
|
-
export
|
|
44
|
-
export declare const Primary: {
|
|
45
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
46
|
-
readonly variant: {
|
|
47
|
-
readonly control: "select";
|
|
48
|
-
readonly options: readonly ["primary", "secondary", "tertiary", "outline", "ghost"];
|
|
49
|
-
};
|
|
50
|
-
readonly title: {
|
|
51
|
-
readonly control: "text";
|
|
52
|
-
};
|
|
53
|
-
readonly icon: {
|
|
54
|
-
type: string;
|
|
55
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
56
|
-
};
|
|
57
|
-
readonly leftIcon: {
|
|
58
|
-
type: string;
|
|
59
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
60
|
-
};
|
|
61
|
-
readonly rightIcon: {
|
|
62
|
-
type: string;
|
|
63
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
64
|
-
};
|
|
65
|
-
readonly text: {
|
|
66
|
-
readonly control: "text";
|
|
67
|
-
};
|
|
68
|
-
readonly disabled: {
|
|
69
|
-
readonly control: "boolean";
|
|
70
|
-
};
|
|
71
|
-
readonly loading: {
|
|
72
|
-
readonly control: "boolean";
|
|
73
|
-
};
|
|
74
|
-
}>) => HTMLDivElement;
|
|
75
|
-
};
|
|
55
|
+
export declare const Primary: {};
|
|
76
56
|
export declare const Secondary: {
|
|
77
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
78
|
-
readonly variant: {
|
|
79
|
-
readonly control: "select";
|
|
80
|
-
readonly options: readonly ["primary", "secondary", "tertiary", "outline", "ghost"];
|
|
81
|
-
};
|
|
82
|
-
readonly title: {
|
|
83
|
-
readonly control: "text";
|
|
84
|
-
};
|
|
85
|
-
readonly icon: {
|
|
86
|
-
type: string;
|
|
87
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
88
|
-
};
|
|
89
|
-
readonly leftIcon: {
|
|
90
|
-
type: string;
|
|
91
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
92
|
-
};
|
|
93
|
-
readonly rightIcon: {
|
|
94
|
-
type: string;
|
|
95
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
96
|
-
};
|
|
97
|
-
readonly text: {
|
|
98
|
-
readonly control: "text";
|
|
99
|
-
};
|
|
100
|
-
readonly disabled: {
|
|
101
|
-
readonly control: "boolean";
|
|
102
|
-
};
|
|
103
|
-
readonly loading: {
|
|
104
|
-
readonly control: "boolean";
|
|
105
|
-
};
|
|
106
|
-
}>) => HTMLDivElement;
|
|
107
57
|
args: {
|
|
108
58
|
text: string;
|
|
109
59
|
variant: string;
|
|
110
60
|
};
|
|
111
61
|
};
|
|
112
62
|
export declare const Tertiary: {
|
|
113
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
114
|
-
readonly variant: {
|
|
115
|
-
readonly control: "select";
|
|
116
|
-
readonly options: readonly ["primary", "secondary", "tertiary", "outline", "ghost"];
|
|
117
|
-
};
|
|
118
|
-
readonly title: {
|
|
119
|
-
readonly control: "text";
|
|
120
|
-
};
|
|
121
|
-
readonly icon: {
|
|
122
|
-
type: string;
|
|
123
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
124
|
-
};
|
|
125
|
-
readonly leftIcon: {
|
|
126
|
-
type: string;
|
|
127
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
128
|
-
};
|
|
129
|
-
readonly rightIcon: {
|
|
130
|
-
type: string;
|
|
131
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
132
|
-
};
|
|
133
|
-
readonly text: {
|
|
134
|
-
readonly control: "text";
|
|
135
|
-
};
|
|
136
|
-
readonly disabled: {
|
|
137
|
-
readonly control: "boolean";
|
|
138
|
-
};
|
|
139
|
-
readonly loading: {
|
|
140
|
-
readonly control: "boolean";
|
|
141
|
-
};
|
|
142
|
-
}>) => HTMLDivElement;
|
|
143
63
|
args: {
|
|
144
64
|
text: string;
|
|
145
65
|
variant: string;
|
|
@@ -147,36 +67,6 @@ export declare const Tertiary: {
|
|
|
147
67
|
};
|
|
148
68
|
};
|
|
149
69
|
export declare const Outline: {
|
|
150
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
151
|
-
readonly variant: {
|
|
152
|
-
readonly control: "select";
|
|
153
|
-
readonly options: readonly ["primary", "secondary", "tertiary", "outline", "ghost"];
|
|
154
|
-
};
|
|
155
|
-
readonly title: {
|
|
156
|
-
readonly control: "text";
|
|
157
|
-
};
|
|
158
|
-
readonly icon: {
|
|
159
|
-
type: string;
|
|
160
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
161
|
-
};
|
|
162
|
-
readonly leftIcon: {
|
|
163
|
-
type: string;
|
|
164
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
165
|
-
};
|
|
166
|
-
readonly rightIcon: {
|
|
167
|
-
type: string;
|
|
168
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
169
|
-
};
|
|
170
|
-
readonly text: {
|
|
171
|
-
readonly control: "text";
|
|
172
|
-
};
|
|
173
|
-
readonly disabled: {
|
|
174
|
-
readonly control: "boolean";
|
|
175
|
-
};
|
|
176
|
-
readonly loading: {
|
|
177
|
-
readonly control: "boolean";
|
|
178
|
-
};
|
|
179
|
-
}>) => HTMLDivElement;
|
|
180
70
|
args: {
|
|
181
71
|
text: string;
|
|
182
72
|
variant: string;
|
|
@@ -184,36 +74,6 @@ export declare const Outline: {
|
|
|
184
74
|
};
|
|
185
75
|
};
|
|
186
76
|
export declare const Ghost: {
|
|
187
|
-
render: (args: import('../../storybook').GetStoryArgs<{
|
|
188
|
-
readonly variant: {
|
|
189
|
-
readonly control: "select";
|
|
190
|
-
readonly options: readonly ["primary", "secondary", "tertiary", "outline", "ghost"];
|
|
191
|
-
};
|
|
192
|
-
readonly title: {
|
|
193
|
-
readonly control: "text";
|
|
194
|
-
};
|
|
195
|
-
readonly icon: {
|
|
196
|
-
type: string;
|
|
197
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
198
|
-
};
|
|
199
|
-
readonly leftIcon: {
|
|
200
|
-
type: string;
|
|
201
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
202
|
-
};
|
|
203
|
-
readonly rightIcon: {
|
|
204
|
-
type: string;
|
|
205
|
-
options: ("Check" | "Plus" | "Log In" | "Help" | "None")[];
|
|
206
|
-
};
|
|
207
|
-
readonly text: {
|
|
208
|
-
readonly control: "text";
|
|
209
|
-
};
|
|
210
|
-
readonly disabled: {
|
|
211
|
-
readonly control: "boolean";
|
|
212
|
-
};
|
|
213
|
-
readonly loading: {
|
|
214
|
-
readonly control: "boolean";
|
|
215
|
-
};
|
|
216
|
-
}>) => HTMLDivElement;
|
|
217
77
|
args: {
|
|
218
78
|
text: string;
|
|
219
79
|
variant: string;
|
|
@@ -221,4 +81,5 @@ export declare const Ghost: {
|
|
|
221
81
|
title: string;
|
|
222
82
|
};
|
|
223
83
|
};
|
|
84
|
+
export default meta;
|
|
224
85
|
//# sourceMappingURL=Button.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.stories.ts"],"names":[],"mappings":"AAIA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,2BAA2B,CAAA;AAYlC,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.stories.ts"],"names":[],"mappings":"AAIA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,oBAAoB,CAAA;AAC3B,OAAO,sBAAsB,CAAA;AAC7B,OAAO,2BAA2B,CAAA;AAYlC,QAAA,MAAM,IAAI;;;;;;;;;CASA,CAAA;AAEV,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8FAgBwE,OAAO,IAAI;CAcnF,CAAA;AAEV,eAAO,MAAM,OAAO,IAAK,CAAA;AAEzB,eAAO,MAAM,SAAS;;;;;CAKrB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;;;CAMpB,CAAA;AAED,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;CAOjB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../chunks/button-
|
|
1
|
+
import { n as e, r as t, t as n } from "../chunks/button-Dvkek1tx.js";
|
|
2
2
|
export { e as BUTTON_VARIANTS, t as Button, n as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("../../lib/components/decorators.cjs.js"),t=require("../../lib/components/
|
|
1
|
+
const e=require("../../lib/components/decorators.cjs.js"),t=require("../../lib/components/form-control-component/FormControlComponent.cjs.js");require("../../lib/components/index.cjs.js"),require("../../_virtual/~icons/lucide/chevron-down.cjs.js");const n=require("../../lib/timing.cjs.js");require("../../_virtual/~icons/svg-spinners/3-dots-fade.cjs.js");const r=require("./Combobox.styles.cjs.js");let i=require("lit"),a=require("lit/decorators.js"),o=require("@lit/task");require("@awesome.me/webawesome/dist/components/popup/popup.js");var s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,ee,M,N,P,F,te,ne,I,L,R,z,B,V,H,U,W,G,K;function q(e,t,n){re(e,t),t.set(e,n)}function re(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function J(e,t,n){return e.set(X(e,t),n),n}function Y(e,t){return e.get(X(e,t))}function X(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function Z(e,t,n){return(t=ae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ie(e,t,n,r,i,a){function o(e,t,n){return function(r,i){return n&&n(r),e[t].call(r,i)}}function s(e,t){for(var n=0;n<e.length;n++)e[n].call(t);return t}function c(e,t,n,r){if(typeof e!=`function`&&(r||e!==void 0))throw TypeError(t+` must `+(n||`be`)+` a function`+(r?``:` or undefined`));return e}function l(e,t,n,r,i,a,s,l,u,d,f,p,m){function h(e){if(!m(e))throw TypeError(`Attempted to access private element on non-instance`)}var g,_=t[0],v=t[3],y=!l;if(!y){n||Array.isArray(_)||(_=[_]);var b={},x=[],S=i===3?`get`:i===4||p?`set`:`value`;d?(f||p?b={get:se(function(){return v(this)},r,`get`),set:function(e){t[4](this,e)}}:b[S]=v,f||se(b[S],r,i===2?``:S)):f||(b=Object.getOwnPropertyDescriptor(e,r))}for(var C=e,w=_.length-1;w>=0;w-=n?2:1){var T=_[w],E=n?_[w-1]:void 0,D={},O={kind:[`field`,`accessor`,`method`,`getter`,`setter`,`class`][i],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw Error(`attempted to call addInitializer after decoration was finished`);c(t,`An initializer`,`be`,!0),s.push(t)}.bind(null,D)};try{if(y)(g=c(T.call(E,C,O),`class decorators`,`return`))&&(C=g);else{var k,A;O.static=u,O.private=d,d?i===2?k=function(e){return h(e),b.value}:(i<4&&(k=o(b,`get`,h)),i!==3&&(A=o(b,`set`,h))):(k=function(e){return e[r]},(i<2||i===4)&&(A=function(e,t){e[r]=t}));var j=O.access={has:d?m.bind():function(e){return r in e}};if(k&&(j.get=k),A&&(j.set=A),C=T.call(E,p?{get:b.get,set:b.set}:b[S],O),p){if(typeof C==`object`&&C)(g=c(C.get,`accessor.get`))&&(b.get=g),(g=c(C.set,`accessor.set`))&&(b.set=g),(g=c(C.init,`accessor.init`))&&x.push(g);else if(C!==void 0)throw TypeError(`accessor decorators must return an object with get, set, or init properties or void 0`)}else c(C,(f?`field`:`method`)+` decorators`,`return`)&&(f?x.push(C):b[S]=C)}}finally{D.v=!0}}return(f||p)&&l.push(function(e,t){for(var n=x.length-1;n>=0;n--)t=x[n].call(e,t);return t}),f||y||(d?p?l.push(o(b,`get`),o(b,`set`)):l.push(i===2?b[S]:o.call.bind(b[S])):Object.defineProperty(e,r,b)),C}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for(`Symbol.metadata`),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var d=a[Symbol.metadata||Symbol.for(`Symbol.metadata`)];var f=Object.create(d??null),p=function(e,t,n,r){var i,a,o=[],c=function(t){return ce(t)===e},u=new Map;function d(e){e&&o.push(s.bind(null,e))}for(var f=0;f<t.length;f++){var p=t[f];if(Array.isArray(p)){var m=p[1],h=p[2],g=p.length>3,_=16&m,v=!!(8&m),y=(m&=7)==0,b=h+`/`+v;if(!y&&!g){var x=u.get(b);if(!0===x||x===3&&m!==4||x===4&&m!==3)throw Error(`Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: `+h);u.set(b,!(m>2)||m)}l(v?e:e.prototype,p,_,g?`#`+h:ae(h),m,r,v?a||=[]:i||=[],o,v,g,y,m===1,v&&g?c:n)}}return d(i),d(a),o}(e,t,i,f);return n.length||u(e,f),{e:p,get c(){var t=[];return n.length&&[u(l(e,[n],r,e.name,5,f,t),f),s.bind(null,t,e)]}}}function ae(e){var t=oe(e,`string`);return typeof t==`symbol`?t:t+``}function oe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function se(e,t,n){typeof t==`symbol`&&(t=(t=t.description)?`[`+t+`]`:``);try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+` `+t:t})}catch{}return e}function ce(e){if(Object(e)!==e)throw TypeError(`right-hand side of 'in' should be an object, got `+(e===null?`null`:typeof e));return e}function le(e){return e}var Q=class extends Error{};function ue(e){return e}C=[e.customElement(`solid-ui-combobox`)];var $;new(G=(l=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,h=new WeakMap,g=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,K=(w=(0,a.property)({type:Boolean,reflect:!0,attribute:`select-only`}),E=(0,a.property)({type:String,attribute:`async-options-url`}),O=(0,a.property)({type:String,attribute:`async-options-results-field`}),A=(0,a.property)({type:String,attribute:`async-options-label-field`}),ee=(0,a.property)({type:String,attribute:`async-options-value-field`}),N=(0,a.property)({type:Function}),F=(0,a.property)({type:Array}),ne=(0,a.query)(`input`),L=(0,a.state)(),z=(0,a.state)(),V=(0,a.state)(),U=(0,a.state)(),`selectOnly`),c=class extends t.default{get[K](){return Y(l,this)}set selectOnly(e){J(l,this,e)}get asyncOptionsUrl(){return Y(u,this)}set asyncOptionsUrl(e){J(u,this,e)}get asyncOptionsResultsField(){return Y(d,this)}set asyncOptionsResultsField(e){J(d,this,e)}get asyncOptionsLabelField(){return Y(f,this)}set asyncOptionsLabelField(e){J(f,this,e)}get asyncOptionsValueField(){return Y(p,this)}set asyncOptionsValueField(e){J(p,this,e)}get asyncOptionsProvider(){return Y(m,this)}set asyncOptionsProvider(e){J(m,this,e)}get optionsFallback(){return Y(h,this)}set optionsFallback(e){J(h,this,e)}get controlElement(){return Y(g,this)}set controlElement(e){J(g,this,e)}get filter(){return Y(_,this)}set filter(e){J(_,this,e)}get displayValue(){return Y(v,this)}set displayValue(e){J(v,this,e)}get open(){return Y(y,this)}set open(e){J(y,this,e)}get activeIndex(){return Y(b,this)}set activeIndex(e){J(b,this,e)}constructor(){super(),q(this,l,(x(this),T(this,!1))),q(this,u,D(this,``)),q(this,d,k(this,``)),q(this,f,j(this,``)),q(this,p,M(this,``)),q(this,m,P(this,null)),q(this,h,te(this,null)),q(this,g,I(this,null)),q(this,_,R(this,``)),q(this,v,B(this,``)),q(this,y,H(this,!1)),q(this,b,W(this,-1)),Z(this,`openListenersAttached`,!1),Z(this,`updateDebouncedFilter`,n.debounce(300,e=>this.filter=e)),Z(this,`asyncOptionsTask`,void 0),Z(this,`_selectedOption`,void 0),Z(this,`listboxId`,void 0),Z(this,`handleDocumentFocusIn`,e=>{e.composedPath().includes(this)||this.hide()}),Z(this,`handleDocumentMouseDown`,e=>{e.composedPath().includes(this)||this.hide()}),this.listboxId=`listbox-${this.controlTrait.controlId}`}get selectedOption(){return this._selectedOption}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners()}willUpdate(e){if(super.willUpdate(e),(e.has(`asyncOptionsUrl`)||e.has(`asyncOptionsProvider`))&&this.updateAsyncOptionsTask(),e.has(`value`)){let e=this.getFilteredOptions(),t=e.find(e=>e.selectable!==!1&&e.value===this.value)??this.optionsFallback?.find(e=>e.value===this.value),n=t?.selectable!==!1&&t?.label;this.updateDisplayValue(n||this.value),this.open&&(this.activeIndex=this.getInitialActiveIndex(e)),this._selectedOption&&this._selectedOption.value!==this.value&&(this._selectedOption=void 0)}}render(){let e=this.getFilteredOptions(),t=(this.open&&this.activeIndex>=0?e[this.activeIndex]:void 0)===void 0?void 0:this.getOptionId(this.activeIndex),n=this.placeholder||`Combobox`;return i.html`
|
|
2
2
|
${this.controlTrait.renderLabel()}
|
|
3
3
|
<wa-popup
|
|
4
4
|
placement="bottom"
|
|
@@ -20,17 +20,17 @@ const e=require("../../lib/components/decorators.cjs.js"),t=require("../../lib/c
|
|
|
20
20
|
aria-haspopup="listbox"
|
|
21
21
|
aria-expanded=${this.open?`true`:`false`}
|
|
22
22
|
aria-controls=${this.listboxId}
|
|
23
|
-
aria-activedescendant=${t??
|
|
24
|
-
aria-labelledby=${this.label?this.controlTrait.labelId:
|
|
25
|
-
aria-label=${this.label?
|
|
26
|
-
aria-required=${this.required?`true`:
|
|
23
|
+
aria-activedescendant=${t??i.nothing}
|
|
24
|
+
aria-labelledby=${this.label?this.controlTrait.labelId:i.nothing}
|
|
25
|
+
aria-label=${this.label?i.nothing:n}
|
|
26
|
+
aria-required=${this.required?`true`:i.nothing}
|
|
27
27
|
autocomplete="off"
|
|
28
28
|
spellcheck="false"
|
|
29
29
|
?required=${this.required}
|
|
30
30
|
.value=${this.displayValue}
|
|
31
31
|
@keydown=${this.onInputKeyDown}
|
|
32
32
|
@focus=${this.onInputFocus}
|
|
33
|
-
@input=${()=>this.selectOnly?this.updateDisplayValue(this.
|
|
33
|
+
@input=${()=>this.selectOnly?this.updateDisplayValue(this.controlElement?.value??``):this.controlTrait.onInput()}
|
|
34
34
|
/>
|
|
35
35
|
<icon-lucide-chevron-down></icon-lucide-chevron-down>
|
|
36
36
|
</div>
|
|
@@ -39,21 +39,21 @@ const e=require("../../lib/components/decorators.cjs.js"),t=require("../../lib/c
|
|
|
39
39
|
class="listbox"
|
|
40
40
|
role="listbox"
|
|
41
41
|
aria-orientation="vertical"
|
|
42
|
-
aria-labelledby=${this.label?this.controlTrait.labelId:
|
|
43
|
-
aria-label=${this.label?
|
|
42
|
+
aria-labelledby=${this.label?this.controlTrait.labelId:i.nothing}
|
|
43
|
+
aria-label=${this.label?i.nothing:n}
|
|
44
44
|
?hidden=${!this.open}
|
|
45
45
|
@mousedown=${this.onListboxMouseDown}
|
|
46
46
|
>
|
|
47
|
-
${e.map((e,t)=>e.selectable===!1?
|
|
47
|
+
${e.map((e,t)=>e.selectable===!1?i.html`<div class="non-selectable-option">${e.template??e.label}</div>`:i.html`<div
|
|
48
48
|
id=${this.getOptionId(t)}
|
|
49
49
|
role="option"
|
|
50
50
|
aria-selected=${e.value===this.value?`true`:`false`}
|
|
51
|
-
data-active=${t===this.activeIndex||
|
|
51
|
+
data-active=${t===this.activeIndex||i.nothing}
|
|
52
52
|
@mousemove=${()=>this.setActiveIndex(t)}
|
|
53
53
|
>
|
|
54
54
|
${e.template??e.label}
|
|
55
55
|
</div>`)}
|
|
56
56
|
</div>
|
|
57
57
|
</wa-popup>
|
|
58
|
-
`}getFilteredOptions(){return this.asyncOptionsTask?this.asyncOptionsTask.render({initial:()=>this.optionsFallback??[],complete:e=>e,pending:()=>[{value:``,label:`Loading...`,template:
|
|
58
|
+
`}getFilteredOptions(){return this.asyncOptionsTask?this.asyncOptionsTask.render({initial:()=>this.optionsFallback??[],complete:e=>e,pending:()=>[{value:``,label:`Loading...`,template:i.html`<icon-svg-spinners-3-dots-fade></icon-svg-spinners-3-dots-fade>`,selectable:!1}],error:e=>{let t=!(e instanceof Q),n=Object(e).message??`Something went wrong`;return[{value:``,label:n,template:i.html`<span class="message message--${t?`error`:`info`}">${n}</span>`,selectable:!1}]}}):this.getOptionsFromDOM().filter(e=>String(e.label).toLowerCase().includes(this.filter))}getOptionsFromDOM(){let e=this.querySelectorAll(`solid-ui-combobox-option`);return Array.from(e).map(e=>({value:e.value,label:e.textContent??``}))}getOptionId(e){return`${this.listboxId}-option-${e}`}getInitialActiveIndex(e){let t=e.findIndex(e=>e.value===this.value);return t>=0?t:e.length>0?0:-1}getNextIndex(e,t,n){return t.length===0?-1:(e+n+t.length)%t.length}setActiveIndex(e){this.activeIndex=e}updateDisplayValue(e){if(this.displayValue=e?String(e):``,this.open){let e=this.displayValue.toLowerCase();this.asyncOptionsTask?this.updateDebouncedFilter(e):this.filter=e}}updateAsyncOptionsTask(){if(!this.asyncOptionsUrl&&!this.asyncOptionsProvider){this.asyncOptionsTask=void 0;return}this.asyncOptionsTask??=new o.Task(this,async([e])=>{if(this.asyncOptionsProvider){let t=await this.asyncOptionsProvider(e);if(t.length===0)throw new Q(`No results found`);return t}let t=await(await fetch(this.asyncOptionsUrl.replace(`%search%`,encodeURIComponent(e)))).json(),n=Array.from(this.asyncOptionsResultsField?t[this.asyncOptionsResultsField]:t);if(n.length===0)throw new Q(`No results found`);let r=this.asyncOptionsLabelField||`label`,i=this.asyncOptionsValueField||`value`;return n.map(e=>({label:String(Object(e)[r]),value:Object(e)[i]}))},()=>[this.filter])}show(e){if(this.open)return;let t=this.getFilteredOptions();t.length!==0&&(this.open=!0,this.activeIndex=e?.focusLast?t.length-1:this.getInitialActiveIndex(t),this.addOpenListeners(),requestAnimationFrame(()=>this.scrollActiveOptionIntoView()))}hide(){this.open&&(this.filter=``,this.open=!1,this.activeIndex=-1,this.removeOpenListeners(),this.updateDebouncedFilter.cancel())}selectOption(e){let t=this.value;this._selectedOption=e,this.hide(),this.controlTrait.setValue(e.value),this.controlElement?.focus({preventScroll:!0}),this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,composed:!0,detail:{option:e}})),t===this.value&&this.updateDisplayValue(e.label)}scrollActiveOptionIntoView(){this.activeIndex<0||this.shadowRoot?.querySelector(`#${this.getOptionId(this.activeIndex)}`)?.scrollIntoView({block:`nearest`})}addOpenListeners(){if(this.openListenersAttached)return;document.addEventListener(`focusin`,this.handleDocumentFocusIn),document.addEventListener(`mousedown`,this.handleDocumentMouseDown);let e=this.getRootNode();e!==document&&e.addEventListener(`focusin`,this.handleDocumentFocusIn),this.openListenersAttached=!0}removeOpenListeners(){if(!this.openListenersAttached)return;document.removeEventListener(`focusin`,this.handleDocumentFocusIn),document.removeEventListener(`mousedown`,this.handleDocumentMouseDown);let e=this.getRootNode();e!==document&&e.removeEventListener(`focusin`,this.handleDocumentFocusIn),this.openListenersAttached=!1}onAnchorMouseDown(e){e.target!==this.controlElement&&(e.preventDefault(),this.controlElement?.focus({preventScroll:!0}))}onInputFocus(){this.show()}openPopupFromKey(e){this.open||this.show({focusLast:e})}onInputKeyDown(e){let t=this.getFilteredOptions();switch(e.key){case`ArrowDown`:e.preventDefault(),this.open?(this.activeIndex=this.getNextIndex(this.activeIndex,t,1),this.scrollActiveOptionIntoView()):this.openPopupFromKey(!1);break;case`ArrowUp`:e.preventDefault(),this.open?(this.activeIndex=this.getNextIndex(this.activeIndex,t,-1),this.scrollActiveOptionIntoView()):this.openPopupFromKey(!0);break;case`Enter`:this.open&&this.activeIndex>=0&&t[this.activeIndex]?(e.preventDefault(),this.selectOption(t[this.activeIndex])):this.open||(e.preventDefault(),this.controlTrait.onSubmit());break;case`Escape`:this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.controlElement?.focus({preventScroll:!0}));break;case`Tab`:this.hide();break;default:this.open||this.show()}}onListboxMouseDown(e){if(e.preventDefault(),!(e.target instanceof HTMLElement))return;let t=e.target.closest(`[role="option"]`);if(!t)return;let n=t.id,r=Number.parseInt(n.replace(`${this.listboxId}-option-`,``),10),i=this.getFilteredOptions()[r];i&&this.selectOption(i)}},{e:[T,D,k,j,M,P,te,I,R,B,H,W,x],c:[$,S]}=ie(c,[[w,1,`selectOnly`],[E,1,`asyncOptionsUrl`],[O,1,`asyncOptionsResultsField`],[A,1,`asyncOptionsLabelField`],[ee,1,`asyncOptionsValueField`],[N,1,`asyncOptionsProvider`],[F,1,`optionsFallback`],[ne,1,`controlElement`],[L,1,`filter`],[z,1,`displayValue`],[V,1,`open`],[U,1,`activeIndex`]],C,0,void 0,t.default),c),s=class extends le{constructor(){super($),Z(this,`styles`,r.default),S()}},Z(s,G,void 0),s),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return $}}),exports.defineAsyncComboboxOptionsProvider=ue;
|
|
59
59
|
//# sourceMappingURL=Combobox.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.cjs.js","names":["customElement","WebComponent","Task","html","nothing","property","query","state","debounce","FormControlTrait","styles","AsyncOptionsInfo","Error","defineAsyncComboboxOptionsProvider","provider","_classDecs","_Combobox","_Combobox2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_M","_N","_O","_P","_Q","_ref","_labelDecs","type","String","reflect","_nameDecs","_valueDecs","_placeholderDecs","_requiredDecs","Boolean","_selectOnlyDecs","attribute","_asyncOptionsUrlDecs","_asyncOptionsResultsFieldDecs","_asyncOptionsLabelFieldDecs","_asyncOptionsValueFieldDecs","_asyncOptionsProviderDecs","Function","_optionsFallbackDecs","Array","_inputElementDecs","_filterDecs","_displayValueDecs","_openDecs","_activeIndexDecs","_Combobox3","Combobox","_classPrivateFieldGet","label","v","_classPrivateFieldSet","name","value","placeholder","required","selectOnly","asyncOptionsUrl","asyncOptionsResultsField","asyncOptionsLabelField","asyncOptionsValueField","asyncOptionsProvider","optionsFallback","inputElement","filter","displayValue","open","activeIndex","constructor","_classPrivateFieldInitSpec","_initProto","_init_label","_init_name","_init_value","_init_placeholder","_init_required","_init_selectOnly","_init_asyncOptionsUrl","_init_asyncOptionsResultsField","_init_asyncOptionsLabelField","_init_asyncOptionsValueField","_init_asyncOptionsProvider","_init_optionsFallback","_init_inputElement","_init_filter","_init_displayValue","_init_open","_init_activeIndex","_defineProperty","event","path","composedPath","includes","hide","controlTrait","addTrait","getControlElement","getInternals","listboxId","controlId","selectedOption","_selectedOption","disconnectedCallback","removeOpenListeners","willUpdate","changedProperties","has","updateAsyncOptionsTask","options","getFilteredOptions","option","find","selectable","optionLabel","updateDisplayValue","getInitialActiveIndex","undefined","render","activeOption","activeDescendant","getOptionId","accessibleName","renderLabel","onAnchorMouseDown","labelId","onInputKeyDown","onInputFocus","onInput","onListboxMouseDown","map","index","setActiveIndex","template","asyncOptionsTask","initial","complete","pending","error","isError","message","Object","getOptionsFromDOM","toLowerCase","querySelectorAll","from","textContent","selectedIndex","findIndex","length","getNextIndex","currentIndex","direction","updateDebouncedFilter","results","response","fetch","replace","encodeURIComponent","data","json","labelField","valueField","result","show","filteredOptions","focusLast","addOpenListeners","requestAnimationFrame","scrollActiveOptionIntoView","cancel","selectOption","previousValue","setValue","focus","preventScroll","dispatchEvent","CustomEvent","bubbles","composed","detail","shadowRoot","querySelector","scrollIntoView","block","openListenersAttached","document","addEventListener","handleDocumentFocusIn","handleDocumentMouseDown","root","getRootNode","removeEventListener","target","preventDefault","openPopupFromKey","key","onSubmit","stopPropagation","HTMLElement","optionElement","closest","optionId","id","Number","parseInt","e","c","_initClass","_applyDecs","_Class","_identity","default"],"sources":["../../../src/components/combobox/Combobox.ts"],"sourcesContent":["import { customElement, WebComponent } from '@/lib/components'\nimport { Task } from '@lit/task'\nimport { html, nothing, TemplateResult, type PropertyValues } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { debounce } from '@/lib/timing'\nimport FormControlTrait from '@/lib/components/traits/FormControlTrait'\nimport type ComboboxOption from '@/components/combobox-option/ComboboxOption'\n\nimport '~icons/lucide/chevron-down'\nimport '~icons/svg-spinners/3-dots-fade'\nimport '@awesome.me/webawesome/dist/components/popup/popup.js'\n\nimport styles from './Combobox.styles.css'\n\nclass AsyncOptionsInfo extends Error {}\n\nexport type ComboboxOptionData = {\n value: unknown;\n label: string;\n template?: TemplateResult;\n selectable?: boolean;\n}\n\nexport type ComboboxChangeEvent = CustomEvent<{ option: ComboboxOptionData }>\n\nexport type AsyncComboboxOptionsProvider = (query: string) => Promise<ComboboxOptionData[]>\n\nexport function defineAsyncComboboxOptionsProvider<T extends AsyncComboboxOptionsProvider> (provider: T): T {\n return provider\n}\n\n@customElement('solid-ui-combobox')\nexport default class Combobox extends WebComponent {\n static styles = styles\n static formAssociated = true\n\n @property({ type: String, reflect: true })\n accessor label = ''\n\n @property({ type: String, reflect: true })\n accessor name = ''\n\n @property()\n accessor value = ''\n\n @property({ type: String, reflect: true })\n accessor placeholder = ''\n\n @property({ type: Boolean, reflect: true })\n accessor required = false\n\n @property({ type: Boolean, reflect: true, attribute: 'select-only' })\n accessor selectOnly = false\n\n @property({ type: String, attribute: 'async-options-url' })\n accessor asyncOptionsUrl = ''\n\n @property({ type: String, attribute: 'async-options-results-field' })\n accessor asyncOptionsResultsField = ''\n\n @property({ type: String, attribute: 'async-options-label-field' })\n accessor asyncOptionsLabelField = ''\n\n @property({ type: String, attribute: 'async-options-value-field' })\n accessor asyncOptionsValueField = ''\n\n @property({ type: Function })\n accessor asyncOptionsProvider: AsyncComboboxOptionsProvider | null = null\n\n @property({ type: Array })\n accessor optionsFallback: ComboboxOptionData[] | null = null\n\n @query('input')\n private accessor inputElement: HTMLInputElement | null = null\n\n @state()\n private accessor filter = ''\n\n @state()\n private accessor displayValue = ''\n\n @state()\n private accessor open = false\n\n @state()\n private accessor activeIndex = -1\n\n private controlTrait: FormControlTrait\n private openListenersAttached = false\n private updateDebouncedFilter = debounce(300, (value) => (this.filter = value))\n private asyncOptionsTask?: Task<readonly [string], ComboboxOptionData[]>\n private _selectedOption: ComboboxOptionData | undefined\n private readonly listboxId: string\n\n constructor () {\n super()\n\n this.controlTrait = this.addTrait(\n new FormControlTrait(this, {\n getControlElement: () => this.inputElement,\n getInternals: () => this.getInternals(),\n })\n )\n\n this.listboxId = `listbox-${this.controlTrait.controlId}`\n }\n\n get selectedOption (): ComboboxOptionData | undefined {\n return this._selectedOption\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.removeOpenListeners()\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n\n if (changedProperties.has('asyncOptionsUrl') || changedProperties.has('asyncOptionsProvider')) {\n this.updateAsyncOptionsTask()\n }\n\n if (changedProperties.has('value')) {\n const options = this.getFilteredOptions()\n const option = options.find((option) => option.selectable !== false && option.value === this.value) ??\n this.optionsFallback?.find((option) => option.value === this.value)\n const optionLabel = option?.selectable !== false && option?.label\n\n this.updateDisplayValue(optionLabel || this.value)\n\n if (this.open) {\n this.activeIndex = this.getInitialActiveIndex(options)\n }\n\n if (this._selectedOption && this._selectedOption.value !== this.value) {\n this._selectedOption = undefined\n }\n }\n }\n\n protected render () {\n const options = this.getFilteredOptions()\n const activeOption =\n this.open && this.activeIndex >= 0 ? options[this.activeIndex] : undefined\n const activeDescendant =\n activeOption !== undefined ? this.getOptionId(this.activeIndex) : undefined\n const accessibleName = this.placeholder || 'Combobox'\n\n return html`\n ${this.controlTrait.renderLabel()}\n <wa-popup\n placement=\"bottom\"\n flip\n shift\n sync=\"width\"\n auto-size=\"vertical\"\n auto-size-padding=\"10\"\n ?active=${this.open}\n >\n <div class=\"input-wrapper\" slot=\"anchor\" @mousedown=${this.onAnchorMouseDown}>\n <input\n id=\"${this.controlTrait.controlId}\"\n type=\"text\"\n name=${this.name}\n placeholder=${this.placeholder}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=${this.listboxId}\n aria-activedescendant=${activeDescendant ?? nothing}\n aria-labelledby=${this.label ? this.controlTrait.labelId : nothing}\n aria-label=${this.label ? nothing : accessibleName}\n aria-required=${this.required ? 'true' : nothing}\n autocomplete=\"off\"\n spellcheck=\"false\"\n ?required=${this.required}\n .value=${this.displayValue}\n @keydown=${this.onInputKeyDown}\n @focus=${this.onInputFocus}\n @input=${() => this.selectOnly ? this.updateDisplayValue(this.inputElement?.value ?? '') : this.controlTrait.onInput()}\n />\n <icon-lucide-chevron-down></icon-lucide-chevron-down>\n </div>\n <div\n id=${this.listboxId}\n class=\"listbox\"\n role=\"listbox\"\n aria-orientation=\"vertical\"\n aria-labelledby=${this.label ? this.controlTrait.labelId : nothing}\n aria-label=${this.label ? nothing : accessibleName}\n ?hidden=${!this.open}\n @mousedown=${this.onListboxMouseDown}\n >\n ${options.map((option, index) => {\n return option.selectable !== false\n ? html`<div\n id=${this.getOptionId(index)}\n role=\"option\"\n aria-selected=${option.value === this.value ? 'true' : 'false'}\n data-active=${index === this.activeIndex || nothing}\n @mousemove=${() => this.setActiveIndex(index)}\n >\n ${option.template ?? option.label}\n </div>`\n : html`<div class=\"non-selectable-option\">${option.template ?? option.label}</div>`\n })}\n </div>\n </wa-popup>\n `\n }\n\n private getFilteredOptions (): ComboboxOptionData[] {\n if (this.asyncOptionsTask) {\n return this.asyncOptionsTask.render({\n initial: () => this.optionsFallback ?? [],\n complete: (options) => options,\n pending: () => [\n {\n value: '',\n label: 'Loading...',\n template: html`<icon-svg-spinners-3-dots-fade></icon-svg-spinners-3-dots-fade>`,\n selectable: false\n } as const,\n ],\n error: (error) => {\n const isError = !(error instanceof AsyncOptionsInfo)\n const message = Object(error).message ?? 'Something went wrong'\n\n return [\n {\n value: '',\n label: message,\n template: html`<span class=\"message message--${isError ? 'error' : 'info'}\">${message}</span>`,\n selectable: false\n } as const,\n ]\n },\n })\n }\n\n return this.getOptionsFromDOM().filter((option) =>\n String(option.label).toLowerCase().includes(this.filter)\n )\n }\n\n private getOptionsFromDOM (): ComboboxOptionData[] {\n const options = this.querySelectorAll<ComboboxOption>(\n 'solid-ui-combobox-option'\n )\n\n return Array.from(options).map((option) => ({\n value: option.value,\n label: option.textContent ?? '',\n }))\n }\n\n private getOptionId (index: number): string {\n return `${this.listboxId}-option-${index}`\n }\n\n private getInitialActiveIndex (options: ComboboxOptionData[]): number {\n const selectedIndex = options.findIndex((option) => option.value === this.value)\n\n if (selectedIndex >= 0) {\n return selectedIndex\n }\n\n return options.length > 0 ? 0 : -1\n }\n\n private getNextIndex (\n currentIndex: number,\n options: ComboboxOptionData[],\n direction: 1 | -1\n ): number {\n if (options.length === 0) {\n return -1\n }\n\n return (currentIndex + direction + options.length) % options.length\n }\n\n private setActiveIndex (index: number) {\n this.activeIndex = index\n }\n\n private updateDisplayValue (value: unknown) {\n this.displayValue = String(value)\n\n if (this.open) {\n const filter = this.displayValue.toLowerCase()\n\n if (this.asyncOptionsTask) {\n this.updateDebouncedFilter(filter)\n } else {\n this.filter = filter\n }\n }\n }\n\n private updateAsyncOptionsTask () {\n if (!this.asyncOptionsUrl && !this.asyncOptionsProvider) {\n this.asyncOptionsTask = undefined\n\n return\n }\n\n this.asyncOptionsTask ??= new Task(\n this,\n async ([filter]) => {\n if (this.asyncOptionsProvider) {\n const results = await this.asyncOptionsProvider(filter)\n\n if (results.length === 0) {\n throw new AsyncOptionsInfo('No results found')\n }\n\n return results\n }\n\n const response = await fetch(\n this.asyncOptionsUrl.replace('%search%', encodeURIComponent(filter))\n )\n const data = await response.json()\n const results = Array.from(\n this.asyncOptionsResultsField\n ? data[this.asyncOptionsResultsField]\n : data\n )\n\n if (results.length === 0) {\n throw new AsyncOptionsInfo('No results found')\n }\n\n const labelField = this.asyncOptionsLabelField || 'label'\n const valueField = this.asyncOptionsValueField || 'value'\n\n return results.map((result) => ({\n label: String(Object(result)[labelField]),\n value: Object(result)[valueField],\n }))\n },\n () => [this.filter]\n )\n }\n\n private show (options?: { focusLast?: boolean }) {\n if (this.open) {\n return\n }\n\n const filteredOptions = this.getFilteredOptions()\n\n if (filteredOptions.length === 0) {\n return\n }\n\n this.open = true\n this.activeIndex = options?.focusLast\n ? filteredOptions.length - 1\n : this.getInitialActiveIndex(filteredOptions)\n this.addOpenListeners()\n\n requestAnimationFrame(() => this.scrollActiveOptionIntoView())\n }\n\n private hide () {\n if (!this.open) {\n return\n }\n\n this.filter = ''\n this.open = false\n this.activeIndex = -1\n this.removeOpenListeners()\n this.updateDebouncedFilter.cancel()\n }\n\n private selectOption (option: ComboboxOptionData) {\n const previousValue = this.value\n\n this._selectedOption = option\n\n this.hide()\n this.controlTrait.setValue(option.value)\n this.inputElement?.focus({ preventScroll: true })\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: { option } }))\n\n if (previousValue === this.value) {\n this.updateDisplayValue(option.label)\n }\n }\n\n private scrollActiveOptionIntoView () {\n if (this.activeIndex < 0) {\n return\n }\n\n this.shadowRoot\n ?.querySelector(`#${this.getOptionId(this.activeIndex)}`)\n ?.scrollIntoView({ block: 'nearest' })\n }\n\n private addOpenListeners () {\n if (this.openListenersAttached) {\n return\n }\n\n document.addEventListener('focusin', this.handleDocumentFocusIn)\n document.addEventListener('mousedown', this.handleDocumentMouseDown)\n\n const root = this.getRootNode()\n\n if (root !== document) {\n root.addEventListener('focusin', this.handleDocumentFocusIn)\n }\n\n this.openListenersAttached = true\n }\n\n private removeOpenListeners () {\n if (!this.openListenersAttached) {\n return\n }\n\n document.removeEventListener('focusin', this.handleDocumentFocusIn)\n document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n\n const root = this.getRootNode()\n\n if (root !== document) {\n root.removeEventListener('focusin', this.handleDocumentFocusIn)\n }\n\n this.openListenersAttached = false\n }\n\n private handleDocumentFocusIn = (event: Event) => {\n const path = event.composedPath()\n\n if (!path.includes(this)) {\n this.hide()\n }\n }\n\n private handleDocumentMouseDown = (event: MouseEvent) => {\n const path = event.composedPath()\n\n if (!path.includes(this)) {\n this.hide()\n }\n }\n\n private onAnchorMouseDown (event: MouseEvent) {\n if (event.target === this.inputElement) {\n return\n }\n\n event.preventDefault()\n this.inputElement?.focus({ preventScroll: true })\n }\n\n private onInputFocus () {\n this.show()\n }\n\n private openPopupFromKey (focusLast: boolean) {\n if (!this.open) {\n this.show({ focusLast })\n }\n }\n\n private onInputKeyDown (event: KeyboardEvent) {\n const options = this.getFilteredOptions()\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n\n if (!this.open) {\n this.openPopupFromKey(false)\n } else {\n this.activeIndex = this.getNextIndex(this.activeIndex, options, 1)\n this.scrollActiveOptionIntoView()\n }\n break\n case 'ArrowUp':\n event.preventDefault()\n\n if (!this.open) {\n this.openPopupFromKey(true)\n } else {\n this.activeIndex = this.getNextIndex(this.activeIndex, options, -1)\n this.scrollActiveOptionIntoView()\n }\n break\n case 'Enter':\n if (this.open && this.activeIndex >= 0 && options[this.activeIndex]) {\n event.preventDefault()\n this.selectOption(options[this.activeIndex])\n } else if (!this.open) {\n event.preventDefault()\n this.controlTrait.onSubmit()\n }\n break\n case 'Escape':\n if (this.open) {\n event.preventDefault()\n event.stopPropagation()\n this.hide()\n this.inputElement?.focus({ preventScroll: true })\n }\n break\n case 'Tab':\n this.hide()\n break\n default:\n if (!this.open) {\n this.show()\n }\n }\n }\n\n private onListboxMouseDown (event: MouseEvent) {\n event.preventDefault()\n\n if (!(event.target instanceof HTMLElement)) {\n return\n }\n\n const optionElement = event.target.closest('[role=\"option\"]')\n\n if (!optionElement) {\n return\n }\n\n const optionId = optionElement.id\n const index = Number.parseInt(optionId.replace(`${this.listboxId}-option-`, ''), 10)\n const option = this.getFilteredOptions()[index]\n\n if (option) {\n this.selectOption(option)\n }\n }\n}\n"],"mappings":"2xJAcA,IAAMW,EAAN,cAA+BC,KAAM,CAAA,EAarC,SAAgBC,GAA4EC,EAAgB,CAC1G,OAAOA,CACT,CAACC,EAAA,CAEAf,EAAAA,cAAc,mBAAmB,CAAC,EAAA,IAAAgB,EAAA,IAAAC,IAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,EAAA,IAAAN,QAAAO,EAAA,IAAAP,QAAAQ,EAAA,IAAAR,QAAAS,EAAA,IAAAT,QAAAU,EAAA,IAAAV,QAAAW,EAAA,IAAAX,QAAAY,EAAA,IAAAZ,QAAAa,EAAA,IAAAb,QAAAc,EAAA,IAAAd,QAAAe,EAAA,IAAAf,QAAAgB,EAAA,IAAAhB,QAAAiB,IAAAC,GAAAA,EAAAA,EAAA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/M,GAAA,IAAA,EAAA,EAAA+M"}
|
|
1
|
+
{"version":3,"file":"Combobox.cjs.js","names":["customElement","FormControlComponent","Task","html","nothing","property","query","state","debounce","styles","AsyncOptionsInfo","Error","defineAsyncComboboxOptionsProvider","provider","_classDecs","_Combobox","_Combobox2","_A","WeakMap","_B","_C","_D","_E","_F","_G","_H","_I","_J","_K","_L","_ref","_selectOnlyDecs","type","Boolean","reflect","attribute","_asyncOptionsUrlDecs","String","_asyncOptionsResultsFieldDecs","_asyncOptionsLabelFieldDecs","_asyncOptionsValueFieldDecs","_asyncOptionsProviderDecs","Function","_optionsFallbackDecs","Array","_controlElementDecs","_filterDecs","_displayValueDecs","_openDecs","_activeIndexDecs","_Combobox3","Combobox","_classPrivateFieldGet","selectOnly","v","_classPrivateFieldSet","asyncOptionsUrl","asyncOptionsResultsField","asyncOptionsLabelField","asyncOptionsValueField","asyncOptionsProvider","optionsFallback","controlElement","filter","displayValue","open","activeIndex","constructor","_classPrivateFieldInitSpec","_initProto","_init_selectOnly","_init_asyncOptionsUrl","_init_asyncOptionsResultsField","_init_asyncOptionsLabelField","_init_asyncOptionsValueField","_init_asyncOptionsProvider","_init_optionsFallback","_init_controlElement","_init_filter","_init_displayValue","_init_open","_init_activeIndex","_defineProperty","value","event","path","composedPath","includes","hide","listboxId","controlTrait","controlId","selectedOption","_selectedOption","disconnectedCallback","removeOpenListeners","willUpdate","changedProperties","has","updateAsyncOptionsTask","options","getFilteredOptions","option","find","selectable","optionLabel","label","updateDisplayValue","getInitialActiveIndex","undefined","render","activeOption","activeDescendant","getOptionId","accessibleName","placeholder","renderLabel","onAnchorMouseDown","name","labelId","required","onInputKeyDown","onInputFocus","onInput","onListboxMouseDown","map","index","setActiveIndex","template","asyncOptionsTask","initial","complete","pending","error","isError","message","Object","getOptionsFromDOM","toLowerCase","querySelectorAll","from","textContent","selectedIndex","findIndex","length","getNextIndex","currentIndex","direction","updateDebouncedFilter","results","response","fetch","replace","encodeURIComponent","data","json","labelField","valueField","result","show","filteredOptions","focusLast","addOpenListeners","requestAnimationFrame","scrollActiveOptionIntoView","cancel","selectOption","previousValue","setValue","focus","preventScroll","dispatchEvent","CustomEvent","bubbles","composed","detail","shadowRoot","querySelector","scrollIntoView","block","openListenersAttached","document","addEventListener","handleDocumentFocusIn","handleDocumentMouseDown","root","getRootNode","removeEventListener","target","preventDefault","openPopupFromKey","key","onSubmit","stopPropagation","HTMLElement","optionElement","closest","optionId","id","Number","parseInt","e","c","_initClass","_applyDecs","_Class","_identity","default"],"sources":["../../../src/components/combobox/Combobox.ts"],"sourcesContent":["import { customElement, FormControlComponent, FormControlValue } from '@/lib/components'\nimport { Task } from '@lit/task'\nimport { html, nothing, TemplateResult, type PropertyValues } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { debounce } from '@/lib/timing'\nimport type ComboboxOption from '@/components/combobox-option/ComboboxOption'\n\nimport '~icons/lucide/chevron-down'\nimport '~icons/svg-spinners/3-dots-fade'\nimport '@awesome.me/webawesome/dist/components/popup/popup.js'\n\nimport styles from './Combobox.styles.css'\n\nclass AsyncOptionsInfo extends Error {}\n\nexport type ComboboxOptionData = {\n value: FormControlValue;\n label: string;\n template?: TemplateResult;\n selectable?: boolean;\n}\n\nexport type ComboboxChangeEvent = CustomEvent<{ option: ComboboxOptionData }>\n\nexport type AsyncComboboxOptionsProvider = (query: string) => Promise<ComboboxOptionData[]>\n\nexport function defineAsyncComboboxOptionsProvider<T extends AsyncComboboxOptionsProvider> (provider: T): T {\n return provider\n}\n\n@customElement('solid-ui-combobox')\nexport default class Combobox extends FormControlComponent {\n static styles = styles\n\n @property({ type: Boolean, reflect: true, attribute: 'select-only' })\n accessor selectOnly = false\n\n @property({ type: String, attribute: 'async-options-url' })\n accessor asyncOptionsUrl = ''\n\n @property({ type: String, attribute: 'async-options-results-field' })\n accessor asyncOptionsResultsField = ''\n\n @property({ type: String, attribute: 'async-options-label-field' })\n accessor asyncOptionsLabelField = ''\n\n @property({ type: String, attribute: 'async-options-value-field' })\n accessor asyncOptionsValueField = ''\n\n @property({ type: Function })\n accessor asyncOptionsProvider: AsyncComboboxOptionsProvider | null = null\n\n @property({ type: Array })\n accessor optionsFallback: ComboboxOptionData[] | null = null\n\n @query('input')\n protected accessor controlElement: HTMLInputElement | null = null\n\n @state()\n private accessor filter = ''\n\n @state()\n private accessor displayValue = ''\n\n @state()\n private accessor open = false\n\n @state()\n private accessor activeIndex = -1\n\n private openListenersAttached = false\n private updateDebouncedFilter = debounce(300, (value) => (this.filter = value))\n private asyncOptionsTask?: Task<readonly [string], ComboboxOptionData[]>\n private _selectedOption: ComboboxOptionData | undefined\n private readonly listboxId: string\n\n constructor () {\n super()\n\n this.listboxId = `listbox-${this.controlTrait.controlId}`\n }\n\n get selectedOption (): ComboboxOptionData | undefined {\n return this._selectedOption\n }\n\n disconnectedCallback () {\n super.disconnectedCallback()\n\n this.removeOpenListeners()\n }\n\n protected willUpdate (changedProperties: PropertyValues<this>) {\n super.willUpdate(changedProperties)\n\n if (changedProperties.has('asyncOptionsUrl') || changedProperties.has('asyncOptionsProvider')) {\n this.updateAsyncOptionsTask()\n }\n\n if (changedProperties.has('value')) {\n const options = this.getFilteredOptions()\n const option = options.find((option) => option.selectable !== false && option.value === this.value) ??\n this.optionsFallback?.find((option) => option.value === this.value)\n const optionLabel = option?.selectable !== false && option?.label\n\n this.updateDisplayValue(optionLabel || this.value)\n\n if (this.open) {\n this.activeIndex = this.getInitialActiveIndex(options)\n }\n\n if (this._selectedOption && this._selectedOption.value !== this.value) {\n this._selectedOption = undefined\n }\n }\n }\n\n protected render () {\n const options = this.getFilteredOptions()\n const activeOption =\n this.open && this.activeIndex >= 0 ? options[this.activeIndex] : undefined\n const activeDescendant =\n activeOption !== undefined ? this.getOptionId(this.activeIndex) : undefined\n const accessibleName = this.placeholder || 'Combobox'\n\n return html`\n ${this.controlTrait.renderLabel()}\n <wa-popup\n placement=\"bottom\"\n flip\n shift\n sync=\"width\"\n auto-size=\"vertical\"\n auto-size-padding=\"10\"\n ?active=${this.open}\n >\n <div class=\"input-wrapper\" slot=\"anchor\" @mousedown=${this.onAnchorMouseDown}>\n <input\n id=\"${this.controlTrait.controlId}\"\n type=\"text\"\n name=${this.name}\n placeholder=${this.placeholder}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=${this.listboxId}\n aria-activedescendant=${activeDescendant ?? nothing}\n aria-labelledby=${this.label ? this.controlTrait.labelId : nothing}\n aria-label=${this.label ? nothing : accessibleName}\n aria-required=${this.required ? 'true' : nothing}\n autocomplete=\"off\"\n spellcheck=\"false\"\n ?required=${this.required}\n .value=${this.displayValue}\n @keydown=${this.onInputKeyDown}\n @focus=${this.onInputFocus}\n @input=${() => this.selectOnly ? this.updateDisplayValue(this.controlElement?.value ?? '') : this.controlTrait.onInput()}\n />\n <icon-lucide-chevron-down></icon-lucide-chevron-down>\n </div>\n <div\n id=${this.listboxId}\n class=\"listbox\"\n role=\"listbox\"\n aria-orientation=\"vertical\"\n aria-labelledby=${this.label ? this.controlTrait.labelId : nothing}\n aria-label=${this.label ? nothing : accessibleName}\n ?hidden=${!this.open}\n @mousedown=${this.onListboxMouseDown}\n >\n ${options.map((option, index) => {\n return option.selectable !== false\n ? html`<div\n id=${this.getOptionId(index)}\n role=\"option\"\n aria-selected=${option.value === this.value ? 'true' : 'false'}\n data-active=${index === this.activeIndex || nothing}\n @mousemove=${() => this.setActiveIndex(index)}\n >\n ${option.template ?? option.label}\n </div>`\n : html`<div class=\"non-selectable-option\">${option.template ?? option.label}</div>`\n })}\n </div>\n </wa-popup>\n `\n }\n\n private getFilteredOptions (): ComboboxOptionData[] {\n if (this.asyncOptionsTask) {\n return this.asyncOptionsTask.render({\n initial: () => this.optionsFallback ?? [],\n complete: (options) => options,\n pending: () => [\n {\n value: '',\n label: 'Loading...',\n template: html`<icon-svg-spinners-3-dots-fade></icon-svg-spinners-3-dots-fade>`,\n selectable: false\n } as const,\n ],\n error: (error) => {\n const isError = !(error instanceof AsyncOptionsInfo)\n const message = Object(error).message ?? 'Something went wrong'\n\n return [\n {\n value: '',\n label: message,\n template: html`<span class=\"message message--${isError ? 'error' : 'info'}\">${message}</span>`,\n selectable: false\n } as const,\n ]\n },\n })\n }\n\n return this.getOptionsFromDOM().filter((option) =>\n String(option.label).toLowerCase().includes(this.filter)\n )\n }\n\n private getOptionsFromDOM (): ComboboxOptionData[] {\n const options = this.querySelectorAll<ComboboxOption>(\n 'solid-ui-combobox-option'\n )\n\n return Array.from(options).map((option) => ({\n value: option.value,\n label: option.textContent ?? '',\n }))\n }\n\n private getOptionId (index: number): string {\n return `${this.listboxId}-option-${index}`\n }\n\n private getInitialActiveIndex (options: ComboboxOptionData[]): number {\n const selectedIndex = options.findIndex((option) => option.value === this.value)\n\n if (selectedIndex >= 0) {\n return selectedIndex\n }\n\n return options.length > 0 ? 0 : -1\n }\n\n private getNextIndex (\n currentIndex: number,\n options: ComboboxOptionData[],\n direction: 1 | -1\n ): number {\n if (options.length === 0) {\n return -1\n }\n\n return (currentIndex + direction + options.length) % options.length\n }\n\n private setActiveIndex (index: number) {\n this.activeIndex = index\n }\n\n private updateDisplayValue (value: unknown) {\n this.displayValue = value ? String(value) : ''\n\n if (this.open) {\n const filter = this.displayValue.toLowerCase()\n\n if (this.asyncOptionsTask) {\n this.updateDebouncedFilter(filter)\n } else {\n this.filter = filter\n }\n }\n }\n\n private updateAsyncOptionsTask () {\n if (!this.asyncOptionsUrl && !this.asyncOptionsProvider) {\n this.asyncOptionsTask = undefined\n\n return\n }\n\n this.asyncOptionsTask ??= new Task(\n this,\n async ([filter]) => {\n if (this.asyncOptionsProvider) {\n const results = await this.asyncOptionsProvider(filter)\n\n if (results.length === 0) {\n throw new AsyncOptionsInfo('No results found')\n }\n\n return results\n }\n\n const response = await fetch(\n this.asyncOptionsUrl.replace('%search%', encodeURIComponent(filter))\n )\n const data = await response.json()\n const results = Array.from(\n this.asyncOptionsResultsField\n ? data[this.asyncOptionsResultsField]\n : data\n )\n\n if (results.length === 0) {\n throw new AsyncOptionsInfo('No results found')\n }\n\n const labelField = this.asyncOptionsLabelField || 'label'\n const valueField = this.asyncOptionsValueField || 'value'\n\n return results.map((result) => ({\n label: String(Object(result)[labelField]),\n value: Object(result)[valueField],\n }))\n },\n () => [this.filter]\n )\n }\n\n private show (options?: { focusLast?: boolean }) {\n if (this.open) {\n return\n }\n\n const filteredOptions = this.getFilteredOptions()\n\n if (filteredOptions.length === 0) {\n return\n }\n\n this.open = true\n this.activeIndex = options?.focusLast\n ? filteredOptions.length - 1\n : this.getInitialActiveIndex(filteredOptions)\n this.addOpenListeners()\n\n requestAnimationFrame(() => this.scrollActiveOptionIntoView())\n }\n\n private hide () {\n if (!this.open) {\n return\n }\n\n this.filter = ''\n this.open = false\n this.activeIndex = -1\n this.removeOpenListeners()\n this.updateDebouncedFilter.cancel()\n }\n\n private selectOption (option: ComboboxOptionData) {\n const previousValue = this.value\n\n this._selectedOption = option\n\n this.hide()\n this.controlTrait.setValue(option.value)\n this.controlElement?.focus({ preventScroll: true })\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: { option } }))\n\n if (previousValue === this.value) {\n this.updateDisplayValue(option.label)\n }\n }\n\n private scrollActiveOptionIntoView () {\n if (this.activeIndex < 0) {\n return\n }\n\n this.shadowRoot\n ?.querySelector(`#${this.getOptionId(this.activeIndex)}`)\n ?.scrollIntoView({ block: 'nearest' })\n }\n\n private addOpenListeners () {\n if (this.openListenersAttached) {\n return\n }\n\n document.addEventListener('focusin', this.handleDocumentFocusIn)\n document.addEventListener('mousedown', this.handleDocumentMouseDown)\n\n const root = this.getRootNode()\n\n if (root !== document) {\n root.addEventListener('focusin', this.handleDocumentFocusIn)\n }\n\n this.openListenersAttached = true\n }\n\n private removeOpenListeners () {\n if (!this.openListenersAttached) {\n return\n }\n\n document.removeEventListener('focusin', this.handleDocumentFocusIn)\n document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n\n const root = this.getRootNode()\n\n if (root !== document) {\n root.removeEventListener('focusin', this.handleDocumentFocusIn)\n }\n\n this.openListenersAttached = false\n }\n\n private handleDocumentFocusIn = (event: Event) => {\n const path = event.composedPath()\n\n if (!path.includes(this)) {\n this.hide()\n }\n }\n\n private handleDocumentMouseDown = (event: MouseEvent) => {\n const path = event.composedPath()\n\n if (!path.includes(this)) {\n this.hide()\n }\n }\n\n private onAnchorMouseDown (event: MouseEvent) {\n if (event.target === this.controlElement) {\n return\n }\n\n event.preventDefault()\n this.controlElement?.focus({ preventScroll: true })\n }\n\n private onInputFocus () {\n this.show()\n }\n\n private openPopupFromKey (focusLast: boolean) {\n if (!this.open) {\n this.show({ focusLast })\n }\n }\n\n private onInputKeyDown (event: KeyboardEvent) {\n const options = this.getFilteredOptions()\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault()\n\n if (!this.open) {\n this.openPopupFromKey(false)\n } else {\n this.activeIndex = this.getNextIndex(this.activeIndex, options, 1)\n this.scrollActiveOptionIntoView()\n }\n break\n case 'ArrowUp':\n event.preventDefault()\n\n if (!this.open) {\n this.openPopupFromKey(true)\n } else {\n this.activeIndex = this.getNextIndex(this.activeIndex, options, -1)\n this.scrollActiveOptionIntoView()\n }\n break\n case 'Enter':\n if (this.open && this.activeIndex >= 0 && options[this.activeIndex]) {\n event.preventDefault()\n this.selectOption(options[this.activeIndex])\n } else if (!this.open) {\n event.preventDefault()\n this.controlTrait.onSubmit()\n }\n break\n case 'Escape':\n if (this.open) {\n event.preventDefault()\n event.stopPropagation()\n this.hide()\n this.controlElement?.focus({ preventScroll: true })\n }\n break\n case 'Tab':\n this.hide()\n break\n default:\n if (!this.open) {\n this.show()\n }\n }\n }\n\n private onListboxMouseDown (event: MouseEvent) {\n event.preventDefault()\n\n if (!(event.target instanceof HTMLElement)) {\n return\n }\n\n const optionElement = event.target.closest('[role=\"option\"]')\n\n if (!optionElement) {\n return\n }\n\n const optionId = optionElement.id\n const index = Number.parseInt(optionId.replace(`${this.listboxId}-option-`, ''), 10)\n const option = this.getFilteredOptions()[index]\n\n if (option) {\n this.selectOption(option)\n }\n }\n}\n"],"mappings":"2rJAaA,IAAMU,EAAN,cAA+BC,KAAM,CAAA,EAarC,SAAgBC,GAA4EC,EAAgB,CAC1G,OAAOA,CACT,CAACC,EAAA,CAEAd,EAAAA,cAAc,mBAAmB,CAAC,EAAA,IAAAe,EAAA,IAAAC,GAAAC,EAAA,IAAAC,QAAAC,EAAA,IAAAD,QAAAE,EAAA,IAAAF,QAAAG,EAAA,IAAAH,QAAAI,EAAA,IAAAJ,QAAAK,EAAA,IAAAL,QAAAM,EAAA,IAAAN,QAAAO,EAAA,IAAAP,QAAAQ,EAAA,IAAAR,QAAAS,EAAA,IAAAT,QAAAU,EAAA,IAAAV,QAAAW,EAAA,IAAAX,QAAAY,GAAAC,GAAAA,EAAAA,EAAAA,SAAAA,CAIvB,CAAEC,KAAMC,QAASC,QAAS,GAAMC,UAAW,aAAc,CAAC,EAACC,GAAAA,EAAAA,EAAAA,SAAAA,CAG3D,CAAEJ,KAAMK,OAAQF,UAAW,mBAAoB,CAAC,EAACG,GAAAA,EAAAA,EAAAA,SAAAA,CAGjD,CAAEN,KAAMK,OAAQF,UAAW,6BAA8B,CAAC,EAACI,GAAAA,EAAAA,EAAAA,SAAAA,CAG3D,CAAEP,KAAMK,OAAQF,UAAW,2BAA4B,CAAC,EAACK,IAAAA,EAAAA,EAAAA,SAAAA,CAGzD,CAAER,KAAMK,OAAQF,UAAW,2BAA4B,CAAC,EAACM,GAAAA,EAAAA,EAAAA,SAAAA,CAGzD,CAAET,KAAMU,QAAS,CAAC,EAACC,GAAAA,EAAAA,EAAAA,SAAAA,CAGnB,CAAEX,KAAMY,KAAM,CAAC,EAACC,IAAAA,EAAAA,EAAAA,MAAAA,CAGnB,OAAO,EAACC,GAAAA,EAAAA,EAAAA,MAAAA,CAGR,EAACC,GAAAA,EAAAA,EAAAA,MAAAA,CAG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