@nylas/react 1.1.6 → 1.1.7
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/{add-circle-icon_2.entry-c9aa21bb.cjs → add-circle-icon_2.entry-5814b516.cjs} +1 -1
- package/dist/{add-circle-icon_2.entry-40ff1ddc.js → add-circle-icon_2.entry-5db67b5b.js} +1 -1
- package/dist/add-circle-icon_2.entry-95b23b9d.js +25 -0
- package/dist/add-circle-icon_2.entry-ae11c837.cjs +1 -0
- package/dist/{archive-icon.entry-f27eb10c.cjs → archive-icon.entry-10ebbf9a.cjs} +1 -1
- package/dist/archive-icon.entry-2ead8ef0.cjs +1 -0
- package/dist/{archive-icon.entry-253f4253.js → archive-icon.entry-769e863b.js} +1 -1
- package/dist/archive-icon.entry-b28d195c.js +15 -0
- package/dist/{arrow-icon.entry-b1ca875a.cjs → arrow-icon.entry-024d613a.cjs} +1 -1
- package/dist/{arrow-icon.entry-ac939154.js → arrow-icon.entry-1ebd553a.js} +1 -1
- package/dist/arrow-icon.entry-8de38831.cjs +1 -0
- package/dist/arrow-icon.entry-e29d7a6c.js +15 -0
- package/dist/{bold-icon.entry-3594774b.js → bold-icon.entry-17c78a12.js} +1 -1
- package/dist/bold-icon.entry-316f5e61.js +15 -0
- package/dist/{bold-icon.entry-e815017f.cjs → bold-icon.entry-8bc27b72.cjs} +1 -1
- package/dist/bold-icon.entry-caf96585.cjs +1 -0
- package/dist/{button-component_2.entry-fdca89a8.js → button-component_2.entry-1095ad9f.js} +1 -1
- package/dist/button-component_2.entry-531a725d.js +26 -0
- package/dist/{button-component_2.entry-a2d998c4.cjs → button-component_2.entry-5cd0adf0.cjs} +1 -1
- package/dist/button-component_2.entry-64a41161.cjs +1 -0
- package/dist/{calendar-agenda-fill-icon_54.entry-40b74a1d.js → calendar-agenda-fill-icon_54.entry-6b2114d5.js} +311 -302
- package/dist/calendar-agenda-fill-icon_54.entry-84e72636.js +5656 -0
- package/dist/{calendar-agenda-fill-icon_54.entry-d47f77af.cjs → calendar-agenda-fill-icon_54.entry-abb96e20.cjs} +4 -4
- package/dist/calendar-agenda-fill-icon_54.entry-f5577fdb.cjs +10 -0
- package/dist/{calendar-cancel-icon.entry-98e56632.cjs → calendar-cancel-icon.entry-4c58ea10.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-90a529f9.js → calendar-cancel-icon.entry-d27593a5.js} +1 -1
- package/dist/calendar-cancel-icon.entry-f11e5aaa.cjs +1 -0
- package/dist/calendar-cancel-icon.entry-f1a6f9bc.js +15 -0
- package/dist/{calendar-check-icon_2.entry-09e247b0.js → calendar-check-icon_2.entry-38e1140b.js} +1 -1
- package/dist/{calendar-check-icon_2.entry-305d0f9f.cjs → calendar-check-icon_2.entry-4a35f416.cjs} +1 -1
- package/dist/calendar-check-icon_2.entry-52187599.cjs +1 -0
- package/dist/calendar-check-icon_2.entry-7f17a3a6.js +25 -0
- package/dist/{calendar-icon.entry-7570a82f.cjs → calendar-icon.entry-002ee369.cjs} +1 -1
- package/dist/calendar-icon.entry-3c5c97d4.cjs +1 -0
- package/dist/{calendar-icon.entry-ff7dfc9b.js → calendar-icon.entry-4543de86.js} +1 -1
- package/dist/calendar-icon.entry-b76e26e6.js +15 -0
- package/dist/{checkbox-component_2.entry-2b5a2721.cjs → checkbox-component_2.entry-ad4ab088.cjs} +1 -1
- package/dist/checkbox-component_2.entry-b24885e9.cjs +1 -0
- package/dist/{checkbox-component_2.entry-2d8bf66e.js → checkbox-component_2.entry-cf15106d.js} +1 -1
- package/dist/checkbox-component_2.entry-e4a3dd2d.js +79 -0
- package/dist/{chevron-icon_3.entry-35130198.cjs → chevron-icon_3.entry-582df6f7.cjs} +1 -1
- package/dist/chevron-icon_3.entry-59d8b408.cjs +1 -0
- package/dist/{chevron-icon_3.entry-e6539933.js → chevron-icon_3.entry-5e60a853.js} +1 -1
- package/dist/chevron-icon_3.entry-cab72db3.js +143 -0
- package/dist/{clock-icon_4.entry-623c482d.cjs → clock-icon_4.entry-8348282a.cjs} +1 -1
- package/dist/{clock-icon_4.entry-797aa1f7.js → clock-icon_4.entry-d03310ae.js} +1 -1
- package/dist/clock-icon_4.entry-f6b9f85d.js +45 -0
- package/dist/clock-icon_4.entry-fcbc39b0.cjs +1 -0
- package/dist/{copy-icon.entry-9b8eb24d.js → copy-icon.entry-3ea78e28.js} +1 -1
- package/dist/copy-icon.entry-430beab4.js +15 -0
- package/dist/{copy-icon.entry-7dd1cd70.cjs → copy-icon.entry-5337f980.cjs} +1 -1
- package/dist/copy-icon.entry-74a59fc5.cjs +1 -0
- package/dist/{delete-icon.entry-3d05884f.js → delete-icon.entry-480ac215.js} +1 -1
- package/dist/{delete-icon.entry-506ee04f.cjs → delete-icon.entry-87b2daaa.cjs} +1 -1
- package/dist/delete-icon.entry-9c1af040.js +15 -0
- package/dist/delete-icon.entry-e320cde1.cjs +1 -0
- package/dist/{document-refresh-icon.entry-09b959f4.js → document-refresh-icon.entry-665a7947.js} +1 -1
- package/dist/{document-refresh-icon.entry-1ff1f7ca.cjs → document-refresh-icon.entry-6be2b468.cjs} +1 -1
- package/dist/document-refresh-icon.entry-930ee2b7.js +15 -0
- package/dist/document-refresh-icon.entry-fcde4ff6.cjs +1 -0
- package/dist/{feedbackSync-b56b29ed-6a2388f3.js → feedbackSync-b56b29ed-36483932.js} +1 -1
- package/dist/{feedbackSync-b56b29ed-cf8c7876.cjs → feedbackSync-b56b29ed-599103b9.cjs} +1 -1
- package/dist/feedbackSync-b56b29ed-7a7c650e.cjs +448 -0
- package/dist/feedbackSync-b56b29ed-9e38fdb6.js +6035 -0
- package/dist/{folder-icon.entry-2788257d.cjs → folder-icon.entry-89f0974f.cjs} +1 -1
- package/dist/folder-icon.entry-977e50eb.cjs +1 -0
- package/dist/{folder-icon.entry-6f9875f7.js → folder-icon.entry-9bf864d7.js} +1 -1
- package/dist/folder-icon.entry-b80d8fd7.js +15 -0
- package/dist/{forward-icon.entry-a0de0be0.js → forward-icon.entry-2b0167a7.js} +1 -1
- package/dist/{forward-icon.entry-49f6a480.cjs → forward-icon.entry-699c55d9.cjs} +1 -1
- package/dist/forward-icon.entry-c4c20f31.cjs +1 -0
- package/dist/forward-icon.entry-eb64aa16.js +15 -0
- package/dist/{globe-icon.entry-04c890dd.cjs → globe-icon.entry-3d08a9c4.cjs} +1 -1
- package/dist/{globe-icon.entry-b7f1e5b8.js → globe-icon.entry-5d962e7a.js} +1 -1
- package/dist/globe-icon.entry-5ef1dc42.cjs +1 -0
- package/dist/globe-icon.entry-667987bd.js +15 -0
- package/dist/{google-logo-icon_4.entry-66d8a50d.cjs → google-logo-icon_4.entry-12f1492f.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-bd4d2237.cjs +1 -0
- package/dist/{google-logo-icon_4.entry-b2463218.js → google-logo-icon_4.entry-ec724f2e.js} +3 -3
- package/dist/google-logo-icon_4.entry-fc38681e.js +729 -0
- package/dist/{inbox-icon.entry-c5cb64d8.js → inbox-icon.entry-2020fa96.js} +1 -1
- package/dist/{inbox-icon.entry-11813535.cjs → inbox-icon.entry-45414f66.cjs} +1 -1
- package/dist/inbox-icon.entry-49353988.js +15 -0
- package/dist/inbox-icon.entry-b556231f.cjs +1 -0
- package/dist/{index-8755dd64.cjs → index-290b2932.cjs} +2 -2
- package/dist/{index-600718a1.js → index-2b208d5d.js} +50 -50
- package/dist/index-bf124f70.cjs +81 -0
- package/dist/index-fb096a02.js +13011 -0
- package/dist/{index.es-c7ca1bad-1c8a9213.cjs → index.es-c7ca1bad-67a99f41.cjs} +1 -1
- package/dist/{index.es-c7ca1bad-73894e2f.js → index.es-c7ca1bad-70899f2a.js} +1 -1
- package/dist/index.es-c7ca1bad-b7a3e6bd.cjs +7 -0
- package/dist/index.es-c7ca1bad-cb3a99a7.js +3129 -0
- package/dist/{info-icon_2.entry-08125285.cjs → info-icon_2.entry-237205a0.cjs} +1 -1
- package/dist/{info-icon_2.entry-e48e3cda.js → info-icon_2.entry-b98a2882.js} +1 -1
- package/dist/info-icon_2.entry-caf64c28.cjs +1 -0
- package/dist/info-icon_2.entry-d935e5c2.js +34 -0
- package/dist/{input-color-picker.entry-54e61165.js → input-color-picker.entry-684413c1.js} +1 -1
- package/dist/input-color-picker.entry-752534de.js +48 -0
- package/dist/{input-color-picker.entry-acfa5da8.cjs → input-color-picker.entry-8fe3482d.cjs} +1 -1
- package/dist/input-color-picker.entry-f856fce3.cjs +1 -0
- package/dist/{input-component.entry-54df3f66.js → input-component.entry-00b97287.js} +1 -1
- package/dist/input-component.entry-4400f98e.js +70 -0
- package/dist/{input-component.entry-e2fbcde0.cjs → input-component.entry-bcd13373.cjs} +1 -1
- package/dist/input-component.entry-d486907a.cjs +1 -0
- package/dist/{input-dropdown.entry-8dec00e3.js → input-dropdown.entry-3c39e23a.js} +1 -1
- package/dist/{input-dropdown.entry-1509d5c4.cjs → input-dropdown.entry-b26475c4.cjs} +1 -1
- package/dist/input-dropdown.entry-bea3c690.js +134 -0
- package/dist/input-dropdown.entry-d3d4e50e.cjs +1 -0
- package/dist/{italic-icon.entry-79eafb05.cjs → italic-icon.entry-14081a02.cjs} +1 -1
- package/dist/{italic-icon.entry-c9028583.js → italic-icon.entry-2199bb17.js} +1 -1
- package/dist/italic-icon.entry-63726952.cjs +1 -0
- package/dist/italic-icon.entry-a3c87e5e.js +15 -0
- package/dist/{multi-select-dropdown.entry-2ed02a88.js → multi-select-dropdown.entry-2141b848.js} +1 -1
- package/dist/{multi-select-dropdown.entry-221212e3.cjs → multi-select-dropdown.entry-7b66d2ae.cjs} +1 -1
- package/dist/multi-select-dropdown.entry-8a2c4b42.cjs +1 -0
- package/dist/multi-select-dropdown.entry-cdd97d65.js +95 -0
- package/dist/{nylas-booked-event-card_12.entry-5125b535.cjs → nylas-booked-event-card_12.entry-20c254bb.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-fa2b2630.js → nylas-booked-event-card_12.entry-2d88375a.js} +2 -2
- package/dist/nylas-booked-event-card_12.entry-90a0b6c7.cjs +1 -0
- package/dist/nylas-booked-event-card_12.entry-bbd7cfb0.js +1237 -0
- package/dist/{nylas-form-card.entry-2019c383.cjs → nylas-form-card.entry-1e9225b0.cjs} +1 -1
- package/dist/{nylas-form-card.entry-a114052f.js → nylas-form-card.entry-a8a44a3b.js} +2 -2
- package/dist/nylas-form-card.entry-d6287d76.cjs +1 -0
- package/dist/nylas-form-card.entry-fadd7718.js +57 -0
- package/dist/{nylas-if-state.entry-de891ced.js → nylas-if-state.entry-32b11afa.js} +2 -2
- package/dist/{nylas-if-state.entry-480c45d1.cjs → nylas-if-state.entry-473230a6.cjs} +1 -1
- package/dist/nylas-if-state.entry-8be8107e.js +94 -0
- package/dist/nylas-if-state.entry-9c341f13.cjs +1 -0
- package/dist/{nylas-login.entry-c99a7b37.cjs → nylas-login.entry-995b6f99.cjs} +1 -1
- package/dist/nylas-login.entry-b9c2fb27.cjs +1 -0
- package/dist/{nylas-login.entry-9ad74f40.js → nylas-login.entry-d663205c.js} +2 -2
- package/dist/nylas-login.entry-e3a9c5c1.js +73 -0
- package/dist/{nylas-provider.entry-d9c4e3d2.cjs → nylas-provider.entry-050f20bd.cjs} +1 -1
- package/dist/nylas-provider.entry-5b54f2cc.cjs +1 -0
- package/dist/{nylas-provider.entry-faf7ef23.js → nylas-provider.entry-c24474c3.js} +4 -4
- package/dist/nylas-provider.entry-ca3e06ce.js +264 -0
- package/dist/{nylas-scheduler-editor.entry-8c5543bd.cjs → nylas-scheduler-editor.entry-3b834bb1.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-9af09bc2.js → nylas-scheduler-editor.entry-5c0a5fb4.js} +3 -3
- package/dist/nylas-scheduler-editor.entry-b86f49a1.js +1447 -0
- package/dist/nylas-scheduler-editor.entry-d52db29e.cjs +2 -0
- package/dist/{nylas-scheduling.entry-8f5718ac.js → nylas-scheduling.entry-04c3951e.js} +4 -4
- package/dist/nylas-scheduling.entry-a5c4b050.js +412 -0
- package/dist/{nylas-scheduling.entry-e778f5f6.cjs → nylas-scheduling.entry-d549c5c3.cjs} +1 -1
- package/dist/nylas-scheduling.entry-ed12a4f6.cjs +1 -0
- package/dist/{nylas-time-window-picker.entry-0f396304.cjs → nylas-time-window-picker.entry-337d03c1.cjs} +1 -1
- package/dist/nylas-time-window-picker.entry-4aefade8.cjs +1 -0
- package/dist/{nylas-time-window-picker.entry-690e753e.js → nylas-time-window-picker.entry-678a7dbf.js} +1 -1
- package/dist/nylas-time-window-picker.entry-ecc3ee10.js +316 -0
- package/dist/{person-icon.entry-049ebaaa.cjs → person-icon.entry-3fee5bc4.cjs} +1 -1
- package/dist/{person-icon.entry-9c82640f.js → person-icon.entry-902b2c0d.js} +1 -1
- package/dist/person-icon.entry-9680bc2b.js +15 -0
- package/dist/person-icon.entry-dede7140.cjs +1 -0
- package/dist/{play-icon.entry-5e77c87c.js → play-icon.entry-1078da37.js} +1 -1
- package/dist/{play-icon.entry-4b931766.cjs → play-icon.entry-a7f648f7.cjs} +1 -1
- package/dist/play-icon.entry-c8f3a5d8.cjs +1 -0
- package/dist/play-icon.entry-dacc3aa6.js +15 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-1c42e8df.cjs → refresh-icon.entry-06f9d181.cjs} +1 -1
- package/dist/{refresh-icon.entry-f9d37dda.js → refresh-icon.entry-5399f64b.js} +1 -1
- package/dist/refresh-icon.entry-555a38ec.cjs +1 -0
- package/dist/refresh-icon.entry-d4dcfc3a.js +15 -0
- package/dist/{register-component-3444af44-a9df7506.js → register-component-3444af44-3d6e535a.js} +1 -1
- package/dist/register-component-3444af44-4a273c0a.js +109 -0
- package/dist/{register-component-3444af44-38748cf2.cjs → register-component-3444af44-6d269634.cjs} +1 -1
- package/dist/register-component-3444af44-d3e7252a.cjs +1 -0
- package/dist/{reply-all-icon.entry-d090c34a.cjs → reply-all-icon.entry-70ffe5be.cjs} +1 -1
- package/dist/{reply-all-icon.entry-c4c94341.js → reply-all-icon.entry-a3a20f76.js} +1 -1
- package/dist/reply-all-icon.entry-bb2a88ad.js +15 -0
- package/dist/reply-all-icon.entry-f8a32be1.cjs +1 -0
- package/dist/{reply-icon.entry-69438565.js → reply-icon.entry-302ed745.js} +1 -1
- package/dist/reply-icon.entry-423fb307.js +15 -0
- package/dist/{reply-icon.entry-6a5377ae.cjs → reply-icon.entry-a08c0e57.cjs} +1 -1
- package/dist/reply-icon.entry-d2da8972.cjs +1 -0
- package/dist/{scheduler-config-store-ed4a8dfd-82b439de.cjs → scheduler-config-store-ed4a8dfd-34c4c119.cjs} +1 -1
- package/dist/scheduler-config-store-ed4a8dfd-474f6252.cjs +1 -0
- package/dist/{scheduler-config-store-ed4a8dfd-9126610f.js → scheduler-config-store-ed4a8dfd-81687f55.js} +1 -1
- package/dist/scheduler-config-store-ed4a8dfd-fe2b9d18.js +26 -0
- package/dist/{scheduler-store-d4784b24-4558c7eb.js → scheduler-store-2e7db190-c648278f.js} +27 -25
- package/dist/scheduler-store-2e7db190-fb6a20a1.cjs +1 -0
- package/dist/scheduler-store-5fbba021-09da63cf.cjs +1 -0
- package/dist/scheduler-store-5fbba021-6298edf3.js +484 -0
- package/dist/{sent-icon.entry-eae2a5f1.js → sent-icon.entry-4d7b65ba.js} +1 -1
- package/dist/{sent-icon.entry-36964458.cjs → sent-icon.entry-6396b793.cjs} +1 -1
- package/dist/sent-icon.entry-6ed4170a.js +15 -0
- package/dist/sent-icon.entry-db89fd38.cjs +1 -0
- package/dist/{spam-icon.entry-1f47e1cf.js → spam-icon.entry-45e7b83b.js} +1 -1
- package/dist/spam-icon.entry-81073952.js +15 -0
- package/dist/{spam-icon.entry-ec0b7f17.cjs → spam-icon.entry-8648a315.cjs} +1 -1
- package/dist/spam-icon.entry-cf05a2a7.cjs +1 -0
- package/dist/{star-icon.entry-5fb1fdfe.cjs → star-icon.entry-1c416cef.cjs} +1 -1
- package/dist/{star-icon.entry-f2ba5cf7.js → star-icon.entry-61c36332.js} +1 -1
- package/dist/star-icon.entry-8279e6a9.cjs +1 -0
- package/dist/star-icon.entry-bb26cc4e.js +15 -0
- package/dist/{stop-icon.entry-e9c53f8f.js → stop-icon.entry-089ac3ba.js} +1 -1
- package/dist/{stop-icon.entry-c9b1f0a1.cjs → stop-icon.entry-d68aa652.cjs} +1 -1
- package/dist/stop-icon.entry-f62d063b.js +15 -0
- package/dist/stop-icon.entry-f88a5a2a.cjs +1 -0
- package/dist/{textarea-component.entry-f7a089d4.cjs → textarea-component.entry-502c8659.cjs} +1 -1
- package/dist/{textarea-component.entry-43938bc5.js → textarea-component.entry-8f5d835f.js} +1 -1
- package/dist/textarea-component.entry-d4a682fa.js +37 -0
- package/dist/textarea-component.entry-e06ee834.cjs +1 -0
- package/dist/{time-period-selector.entry-9151a673.cjs → time-period-selector.entry-001a1c59.cjs} +1 -1
- package/dist/{time-period-selector.entry-dcef9d6a.js → time-period-selector.entry-7da7d316.js} +1 -1
- package/dist/time-period-selector.entry-837b9be3.js +80 -0
- package/dist/time-period-selector.entry-c5b6d0c9.cjs +1 -0
- package/dist/{translate-icon.entry-d563b357.cjs → translate-icon.entry-4ee80d22.cjs} +1 -1
- package/dist/{translate-icon.entry-5b47ef85.js → translate-icon.entry-5166d376.js} +1 -1
- package/dist/translate-icon.entry-c1a623d8.cjs +1 -0
- package/dist/translate-icon.entry-e5cfae44.js +15 -0
- package/dist/{trash-fill-icon.entry-7d201791.cjs → trash-fill-icon.entry-2f814465.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-e316b456.js → trash-fill-icon.entry-49844a82.js} +1 -1
- package/dist/trash-fill-icon.entry-85e0e841.js +15 -0
- package/dist/trash-fill-icon.entry-def90241.cjs +1 -0
- package/dist/{underline-icon.entry-03cae3b3.js → underline-icon.entry-181f1d7e.js} +1 -1
- package/dist/{underline-icon.entry-a6751a31.cjs → underline-icon.entry-4ba93e7b.cjs} +1 -1
- package/dist/underline-icon.entry-72dadbdf.cjs +1 -0
- package/dist/underline-icon.entry-f7a75755.js +15 -0
- package/dist/{warning-icon.entry-b3c9b687.js → warning-icon.entry-2406b765.js} +1 -1
- package/dist/{warning-icon.entry-f4936405.cjs → warning-icon.entry-44ac5566.cjs} +1 -1
- package/dist/warning-icon.entry-5b6aeb2b.cjs +1 -0
- package/dist/warning-icon.entry-ef601856.js +15 -0
- package/package.json +2 -2
- package/dist/scheduler-store-d4784b24-32e6da1e.cjs +0 -1
package/dist/{multi-select-dropdown.entry-221212e3.cjs → multi-select-dropdown.entry-7b66d2ae.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-290b2932.cjs");require("react");require("react-dom");const r=':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropdown span.error{color:var(--nylas-error);font-size:14px}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn.error{border:1px solid var(--nylas-error)}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:72px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}',l=r,o=class{constructor(e){s.registerInstance(this,e),this.selectedOptionsChanged=s.createEvent(this,"selectedOptionsChanged",7),this.name=void 0,this.label=void 0,this.options=[],this.error="",this.availableOptions=this.options,this.isOpen=!1,this.ariaActivedescendant="",this.shouldFocusFirstOption=!1}componentDidLoad(){s.debug("multi-select-dropdown","componentDidLoad"),this.options&&(this.availableOptions=this.options)}componentDidRender(){var e;s.debug("multi-select-dropdown","componentDidRender"),this.isOpen&&this.shouldFocusFirstOption&&(this.ariaActivedescendant=(e=this.availableOptions[0])==null?void 0:e.value,this.focusOption(0),this.shouldFocusFirstOption=!1)}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.isOpen&&(this.isOpen=!1)}selectOption(e){this.availableOptions=this.availableOptions.map(t=>(t.value===e.value&&(t.selected=!e.selected),t));const a=this.availableOptions.filter(t=>t.selected).map(t=>t.value);this.selectedOptionsChanged.emit({value:a,name:this.name})}toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen?this.shouldFocusFirstOption=!0:this.ariaActivedescendant=""}handleSelectButtonKeyDown(e){switch(e.key){case"ArrowDown":case"Enter":e.preventDefault(),this.isOpen||this.toggleDropdown();break;case"Escape":this.isOpen=!1;break}}handleListboxKeydown(e){const a=this.availableOptions,t=a.findIndex(n=>n.value===this.ariaActivedescendant);switch(e.key){case"ArrowDown":case"Tab":if(e.shiftKey){e.preventDefault();const i=t-1>=0?t-1:a.length-1;this.ariaActivedescendant=a[i].value,this.focusOption(i)}else{e.preventDefault();const i=t+1<a.length?t+1:0;this.ariaActivedescendant=a[i].value,this.focusOption(i)}break;case"ArrowUp":e.preventDefault();const n=t-1>=0?t-1:a.length-1;this.ariaActivedescendant=a[n].value,this.focusOption(n);break;case"Enter":e.preventDefault(),this.ariaActivedescendant&&this.selectOption(a[t]);break;case"Escape":this.isOpen=!1;break}}focusOption(e){var i;const a=this.availableOptions[e];if(!a)return;const t=a.value,n=(i=this.el.shadowRoot)==null?void 0:i.getElementById(t);n&&(n.focus(),n.scrollIntoView({behavior:"smooth",block:"nearest"}))}getSelectedOptions(){return this.availableOptions.filter(e=>e.selected)}renderOption(e){return s.h("li",{key:e.value,id:e.value,role:"option",tabindex:"0","aria-selected":e.selected?"true":"false",onClick:a=>{a.stopImmediatePropagation(),this.selectOption(e)},class:{selected:!!e.selected}},s.h("label",{htmlFor:e.value},s.h("input",{"aria-hidden":"true",id:e.value,type:"checkbox",checked:e.selected}),s.h("span",null,e.label)))}render(){var e,a;return s.h(s.Host,{key:"e1d4d14ecbb535efa9c01bbd472648b0a11f80f0"},s.h("div",{key:"4fa54bb57eea3f45d49d0864e11ca20bb6b9b16c",class:"dropdown",part:"msd_dropdown"},s.h("label",{key:"dd418efe1b38427042f1f88b9fd615ee89c9f5d9",class:"dropdown-label"},this.label,s.h("slot",{key:"a8cd3f9fd40a3b77683c636b3b835e0cbd738981",name:"label-icon","aria-hidden":"true"})),s.h("button",{key:"d39f657c45ecd246018f4c5db904ad37d475634b",name:this.name,part:`msd_dropdown-button ${this.error?"msd_dropdown-button--error":""}`,class:{dropbtn:!0,open:this.isOpen,error:!!this.error},onClick:()=>this.toggleDropdown(),"aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false","aria-label":this.name,onKeyDown:t=>this.handleSelectButtonKeyDown(t)},s.h("slot",{key:"45f912fd627eb75e06446a782d91b27bf138677c",name:"select-icon","aria-hidden":"true"}),s.h("span",{key:"8271bafba127888d6646b31749292b049e190589",class:"selected-option",part:"msd_dropdown-button-selected-label"},this.getSelectedOptions().length>1?"Multiple options selected":((e=this.availableOptions.filter(t=>t.selected)[0])==null?void 0:e.label)??((a=this.availableOptions[0])==null?void 0:a.label)),s.h("span",{key:"75caecf1bffad204acab61b8d8809b03a9dbeb73",class:this.isOpen?"open":"closed","aria-hidden":"true"},s.h("chevron-icon",{key:"cc9faf08225b9c73481d27a9b3f6e7a43b379c25",width:"16",height:"16"}))),this.error?s.h("span",{class:"error"},this.error):null,this.isOpen?null:s.h("div",{class:"selected-options"},this.getSelectedOptions().map(t=>s.h("span",{class:"selected-option"},t.label,s.h("button",{key:t.label,onClick:()=>this.selectOption(t)},s.h("close-icon",null))))),this.isOpen?s.h("div",{class:"dropdown-content",part:"msd_dropdown-content"},s.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-multiselectable":!0,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:t=>this.handleListboxKeydown(t)},this.availableOptions.map(t=>this.renderOption(t)))):null))}get el(){return s.getElement(this)}};o.style=l;exports.multi_select_dropdown=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-bf124f70.cjs");require("react");require("react-dom");const r=':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropdown span.error{color:var(--nylas-error);font-size:14px}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn.error{border:1px solid var(--nylas-error)}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:72px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}',l=r,o=class{constructor(e){s.registerInstance(this,e),this.selectedOptionsChanged=s.createEvent(this,"selectedOptionsChanged",7),this.name=void 0,this.label=void 0,this.options=[],this.error="",this.availableOptions=this.options,this.isOpen=!1,this.ariaActivedescendant="",this.shouldFocusFirstOption=!1}componentDidLoad(){s.debug("multi-select-dropdown","componentDidLoad"),this.options&&(this.availableOptions=this.options)}componentDidRender(){var e;s.debug("multi-select-dropdown","componentDidRender"),this.isOpen&&this.shouldFocusFirstOption&&(this.ariaActivedescendant=(e=this.availableOptions[0])==null?void 0:e.value,this.focusOption(0),this.shouldFocusFirstOption=!1)}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.isOpen&&(this.isOpen=!1)}selectOption(e){this.availableOptions=this.availableOptions.map(t=>(t.value===e.value&&(t.selected=!e.selected),t));const a=this.availableOptions.filter(t=>t.selected).map(t=>t.value);this.selectedOptionsChanged.emit({value:a,name:this.name})}toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen?this.shouldFocusFirstOption=!0:this.ariaActivedescendant=""}handleSelectButtonKeyDown(e){switch(e.key){case"ArrowDown":case"Enter":e.preventDefault(),this.isOpen||this.toggleDropdown();break;case"Escape":this.isOpen=!1;break}}handleListboxKeydown(e){const a=this.availableOptions,t=a.findIndex(n=>n.value===this.ariaActivedescendant);switch(e.key){case"ArrowDown":case"Tab":if(e.shiftKey){e.preventDefault();const i=t-1>=0?t-1:a.length-1;this.ariaActivedescendant=a[i].value,this.focusOption(i)}else{e.preventDefault();const i=t+1<a.length?t+1:0;this.ariaActivedescendant=a[i].value,this.focusOption(i)}break;case"ArrowUp":e.preventDefault();const n=t-1>=0?t-1:a.length-1;this.ariaActivedescendant=a[n].value,this.focusOption(n);break;case"Enter":e.preventDefault(),this.ariaActivedescendant&&this.selectOption(a[t]);break;case"Escape":this.isOpen=!1;break}}focusOption(e){var i;const a=this.availableOptions[e];if(!a)return;const t=a.value,n=(i=this.el.shadowRoot)==null?void 0:i.getElementById(t);n&&(n.focus(),n.scrollIntoView({behavior:"smooth",block:"nearest"}))}getSelectedOptions(){return this.availableOptions.filter(e=>e.selected)}renderOption(e){return s.h("li",{key:e.value,id:e.value,role:"option",tabindex:"0","aria-selected":e.selected?"true":"false",onClick:a=>{a.stopImmediatePropagation(),this.selectOption(e)},class:{selected:!!e.selected}},s.h("label",{htmlFor:e.value},s.h("input",{"aria-hidden":"true",id:e.value,type:"checkbox",checked:e.selected}),s.h("span",null,e.label)))}render(){var e,a;return s.h(s.Host,{key:"e1d4d14ecbb535efa9c01bbd472648b0a11f80f0"},s.h("div",{key:"4fa54bb57eea3f45d49d0864e11ca20bb6b9b16c",class:"dropdown",part:"msd_dropdown"},s.h("label",{key:"dd418efe1b38427042f1f88b9fd615ee89c9f5d9",class:"dropdown-label"},this.label,s.h("slot",{key:"a8cd3f9fd40a3b77683c636b3b835e0cbd738981",name:"label-icon","aria-hidden":"true"})),s.h("button",{key:"d39f657c45ecd246018f4c5db904ad37d475634b",name:this.name,part:`msd_dropdown-button ${this.error?"msd_dropdown-button--error":""}`,class:{dropbtn:!0,open:this.isOpen,error:!!this.error},onClick:()=>this.toggleDropdown(),"aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false","aria-label":this.name,onKeyDown:t=>this.handleSelectButtonKeyDown(t)},s.h("slot",{key:"45f912fd627eb75e06446a782d91b27bf138677c",name:"select-icon","aria-hidden":"true"}),s.h("span",{key:"8271bafba127888d6646b31749292b049e190589",class:"selected-option",part:"msd_dropdown-button-selected-label"},this.getSelectedOptions().length>1?"Multiple options selected":((e=this.availableOptions.filter(t=>t.selected)[0])==null?void 0:e.label)??((a=this.availableOptions[0])==null?void 0:a.label)),s.h("span",{key:"75caecf1bffad204acab61b8d8809b03a9dbeb73",class:this.isOpen?"open":"closed","aria-hidden":"true"},s.h("chevron-icon",{key:"cc9faf08225b9c73481d27a9b3f6e7a43b379c25",width:"16",height:"16"}))),this.error?s.h("span",{class:"error"},this.error):null,this.isOpen?null:s.h("div",{class:"selected-options"},this.getSelectedOptions().map(t=>s.h("span",{class:"selected-option"},t.label,s.h("button",{key:t.label,onClick:()=>this.selectOption(t)},s.h("close-icon",null))))),this.isOpen?s.h("div",{class:"dropdown-content",part:"msd_dropdown-content"},s.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-multiselectable":!0,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:t=>this.handleListboxKeydown(t)},this.availableOptions.map(t=>this.renderOption(t)))):null))}get el(){return s.getElement(this)}};o.style=l;exports.multi_select_dropdown=o;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { r as l, c as r, d as o, h as s, H as d, g as c } from "./index-fb096a02.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react-dom";
|
|
4
|
+
const p = ':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropdown span.error{color:var(--nylas-error);font-size:14px}.dropbtn{width:inherit;height:48px;color:black;padding:0.5rem;font-size:1rem;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:transparent}.dropbtn.error{border:1px solid var(--nylas-error)}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:72px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem;background:var(--nylas-base-0)}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}', b = p, h = class {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
l(this, e), this.selectedOptionsChanged = r(this, "selectedOptionsChanged", 7), this.name = void 0, this.label = void 0, this.options = [], this.error = "", this.availableOptions = this.options, this.isOpen = !1, this.ariaActivedescendant = "", this.shouldFocusFirstOption = !1;
|
|
7
|
+
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
o("multi-select-dropdown", "componentDidLoad"), this.options && (this.availableOptions = this.options);
|
|
10
|
+
}
|
|
11
|
+
componentDidRender() {
|
|
12
|
+
var e;
|
|
13
|
+
o("multi-select-dropdown", "componentDidRender"), this.isOpen && this.shouldFocusFirstOption && (this.ariaActivedescendant = (e = this.availableOptions[0]) == null ? void 0 : e.value, this.focusOption(0), this.shouldFocusFirstOption = !1);
|
|
14
|
+
}
|
|
15
|
+
handleOutsideClick(e) {
|
|
16
|
+
!e.composedPath().includes(this.el) && this.isOpen && (this.isOpen = !1);
|
|
17
|
+
}
|
|
18
|
+
selectOption(e) {
|
|
19
|
+
this.availableOptions = this.availableOptions.map((t) => (t.value === e.value && (t.selected = !e.selected), t));
|
|
20
|
+
const a = this.availableOptions.filter((t) => t.selected).map((t) => t.value);
|
|
21
|
+
this.selectedOptionsChanged.emit({
|
|
22
|
+
value: a,
|
|
23
|
+
name: this.name
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
toggleDropdown() {
|
|
27
|
+
this.isOpen = !this.isOpen, this.isOpen ? this.shouldFocusFirstOption = !0 : this.ariaActivedescendant = "";
|
|
28
|
+
}
|
|
29
|
+
handleSelectButtonKeyDown(e) {
|
|
30
|
+
switch (e.key) {
|
|
31
|
+
case "ArrowDown":
|
|
32
|
+
case "Enter":
|
|
33
|
+
e.preventDefault(), this.isOpen || this.toggleDropdown();
|
|
34
|
+
break;
|
|
35
|
+
case "Escape":
|
|
36
|
+
this.isOpen = !1;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
handleListboxKeydown(e) {
|
|
41
|
+
const a = this.availableOptions, t = a.findIndex((n) => n.value === this.ariaActivedescendant);
|
|
42
|
+
switch (e.key) {
|
|
43
|
+
case "ArrowDown":
|
|
44
|
+
case "Tab":
|
|
45
|
+
if (e.shiftKey) {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
const i = t - 1 >= 0 ? t - 1 : a.length - 1;
|
|
48
|
+
this.ariaActivedescendant = a[i].value, this.focusOption(i);
|
|
49
|
+
} else {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
const i = t + 1 < a.length ? t + 1 : 0;
|
|
52
|
+
this.ariaActivedescendant = a[i].value, this.focusOption(i);
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
case "ArrowUp":
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
const n = t - 1 >= 0 ? t - 1 : a.length - 1;
|
|
58
|
+
this.ariaActivedescendant = a[n].value, this.focusOption(n);
|
|
59
|
+
break;
|
|
60
|
+
case "Enter":
|
|
61
|
+
e.preventDefault(), this.ariaActivedescendant && this.selectOption(a[t]);
|
|
62
|
+
break;
|
|
63
|
+
case "Escape":
|
|
64
|
+
this.isOpen = !1;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
focusOption(e) {
|
|
69
|
+
var i;
|
|
70
|
+
const a = this.availableOptions[e];
|
|
71
|
+
if (!a)
|
|
72
|
+
return;
|
|
73
|
+
const t = a.value, n = (i = this.el.shadowRoot) == null ? void 0 : i.getElementById(t);
|
|
74
|
+
n && (n.focus(), n.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
75
|
+
}
|
|
76
|
+
getSelectedOptions() {
|
|
77
|
+
return this.availableOptions.filter((e) => e.selected);
|
|
78
|
+
}
|
|
79
|
+
renderOption(e) {
|
|
80
|
+
return s("li", { key: e.value, id: e.value, role: "option", tabindex: "0", "aria-selected": e.selected ? "true" : "false", onClick: (a) => {
|
|
81
|
+
a.stopImmediatePropagation(), this.selectOption(e);
|
|
82
|
+
}, class: { selected: !!e.selected } }, s("label", { htmlFor: e.value }, s("input", { "aria-hidden": "true", id: e.value, type: "checkbox", checked: e.selected }), s("span", null, e.label)));
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
var e, a;
|
|
86
|
+
return s(d, { key: "e1d4d14ecbb535efa9c01bbd472648b0a11f80f0" }, s("div", { key: "4fa54bb57eea3f45d49d0864e11ca20bb6b9b16c", class: "dropdown", part: "msd_dropdown" }, s("label", { key: "dd418efe1b38427042f1f88b9fd615ee89c9f5d9", class: "dropdown-label" }, this.label, s("slot", { key: "a8cd3f9fd40a3b77683c636b3b835e0cbd738981", name: "label-icon", "aria-hidden": "true" })), s("button", { key: "d39f657c45ecd246018f4c5db904ad37d475634b", name: this.name, part: `msd_dropdown-button ${this.error ? "msd_dropdown-button--error" : ""}`, class: { dropbtn: !0, open: this.isOpen, error: !!this.error }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? "true" : "false", "aria-label": this.name, onKeyDown: (t) => this.handleSelectButtonKeyDown(t) }, s("slot", { key: "45f912fd627eb75e06446a782d91b27bf138677c", name: "select-icon", "aria-hidden": "true" }), s("span", { key: "8271bafba127888d6646b31749292b049e190589", class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1 ? "Multiple options selected" : ((e = this.availableOptions.filter((t) => t.selected)[0]) == null ? void 0 : e.label) ?? ((a = this.availableOptions[0]) == null ? void 0 : a.label)), s("span", { key: "75caecf1bffad204acab61b8d8809b03a9dbeb73", class: this.isOpen ? "open" : "closed", "aria-hidden": "true" }, s("chevron-icon", { key: "cc9faf08225b9c73481d27a9b3f6e7a43b379c25", width: "16", height: "16" }))), this.error ? s("span", { class: "error" }, this.error) : null, this.isOpen ? null : s("div", { class: "selected-options" }, this.getSelectedOptions().map((t) => s("span", { class: "selected-option" }, t.label, s("button", { key: t.label, onClick: () => this.selectOption(t) }, s("close-icon", null))))), this.isOpen ? s("div", { class: "dropdown-content", part: "msd_dropdown-content" }, s("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": !0, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (t) => this.handleListboxKeydown(t) }, this.availableOptions.map((t) => this.renderOption(t)))) : null));
|
|
87
|
+
}
|
|
88
|
+
get el() {
|
|
89
|
+
return c(this);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
h.style = b;
|
|
93
|
+
export {
|
|
94
|
+
h as multi_select_dropdown
|
|
95
|
+
};
|