@nylas/react 1.3.5 → 1.4.0
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-6e8e4e1e.cjs +1 -0
- package/dist/add-circle-icon_2.entry-dbad9a3b.js +26 -0
- package/dist/archive-icon.entry-21f532af.cjs +1 -0
- package/dist/archive-icon.entry-802f7877.js +16 -0
- package/dist/{arrow-icon.entry-fa9584cf.js → arrow-icon.entry-e3dec626.js} +3 -2
- package/dist/arrow-icon.entry-e9af732a.cjs +1 -0
- package/dist/{bold-icon.entry-ac6a4956.js → bold-icon.entry-0492ff02.js} +3 -2
- package/dist/bold-icon.entry-1a2be28a.cjs +1 -0
- package/dist/button-component_2.entry-f0c7f894.cjs +1 -0
- package/dist/{button-component_2.entry-caf33abf.js → button-component_2.entry-fea9bd3d.js} +10 -9
- package/dist/calendar-agenda-fill-icon_36.entry-70681da2.cjs +6 -0
- package/dist/calendar-agenda-fill-icon_36.entry-c85d6a79.js +4642 -0
- package/dist/calendar-cancel-icon.entry-237b8c9e.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-02015d74.js → calendar-cancel-icon.entry-e7dd5b8f.js} +6 -5
- package/dist/calendar-check-icon_2.entry-a868e0bc.cjs +1 -0
- package/dist/{calendar-check-icon_2.entry-2f7dc236.js → calendar-check-icon_2.entry-c7f47fc8.js} +10 -9
- package/dist/calendar-icon.entry-071eb30d.cjs +1 -0
- package/dist/{calendar-icon.entry-70ac9bd6.js → calendar-icon.entry-324de624.js} +6 -5
- package/dist/checkbox-component.entry-0f9970cc.js +43 -0
- package/dist/checkbox-component.entry-5bcf4b08.cjs +1 -0
- package/dist/checkmark-icon_15.entry-7776e533.cjs +5 -0
- package/dist/checkmark-icon_15.entry-98377585.js +1337 -0
- package/dist/chevron-icon_3.entry-526b4b85.cjs +1 -0
- package/dist/chevron-icon_3.entry-ec66260c.js +148 -0
- package/dist/{clock-icon_4.entry-af5301d7.js → clock-icon_4.entry-4fa47996.js} +19 -18
- package/dist/clock-icon_4.entry-66d15f7c.cjs +1 -0
- package/dist/{constants-f6e79ab7-24392f9e.js → constants-f5ba52b9-40ab2ded.js} +121 -30
- package/dist/constants-f5ba52b9-a0866d2f.cjs +1 -0
- package/dist/customParseFormat-39eacb44-45ade322.cjs +1 -0
- package/dist/customParseFormat-39eacb44-eeffe2bb.js +135 -0
- package/dist/delete-icon.entry-540aa2bb.cjs +1 -0
- package/dist/{delete-icon.entry-00cb3ee8.js → delete-icon.entry-95d01eb8.js} +7 -6
- package/dist/document-refresh-icon.entry-b82d5da8.js +16 -0
- package/dist/document-refresh-icon.entry-c467f082.cjs +1 -0
- package/dist/elements/index.d.ts +11 -0
- package/dist/{feedbackSync-547e51ee-bcaf691c.js → feedbackSync-47d13bb0-5608d680.js} +1 -1
- package/dist/{feedbackSync-547e51ee-9b572309.cjs → feedbackSync-47d13bb0-9f249f33.cjs} +1 -1
- package/dist/folder-icon.entry-4d48c2ee.cjs +1 -0
- package/dist/{folder-icon.entry-60b3eda5.js → folder-icon.entry-cb0dc63d.js} +5 -4
- package/dist/forward-icon.entry-5aa01f53.js +16 -0
- package/dist/forward-icon.entry-d04aaf6d.cjs +1 -0
- package/dist/globe-icon_2.entry-87e29cdf.cjs +1 -0
- package/dist/globe-icon_2.entry-c7ae78cc.js +200 -0
- package/dist/google-logo-icon_6.entry-80a6bfa3.js +1457 -0
- package/dist/google-logo-icon_6.entry-a8b6efc0.cjs +2 -0
- package/dist/google-meet-icon_5.entry-26d667b6.cjs +1 -0
- package/dist/google-meet-icon_5.entry-4e71c83b.js +56 -0
- package/dist/inbox-icon.entry-60a82bfc.cjs +1 -0
- package/dist/inbox-icon.entry-77e4e17b.js +16 -0
- package/dist/index-04630615.js +17580 -0
- package/dist/index-3d1f13d6.cjs +57 -0
- package/dist/index.d.ts +1 -3
- package/dist/{index.es-2d849a15-2d84f7a5.cjs → index.es-1fdb1e36-830a422f.cjs} +6 -6
- package/dist/{index.es-2d849a15-4eb8e180.js → index.es-1fdb1e36-fbdb04fa.js} +818 -804
- package/dist/info-icon_2.entry-34800b66.cjs +1 -0
- package/dist/info-icon_2.entry-3c483f61.js +35 -0
- package/dist/input-component.entry-ea4016fe.js +84 -0
- package/dist/input-component.entry-f7ccf3d6.cjs +1 -0
- package/dist/input-dropdown_2.entry-c7730cf8.js +231 -0
- package/dist/input-dropdown_2.entry-d4024d2f.cjs +1 -0
- package/dist/italic-icon.entry-6e0805ab.js +16 -0
- package/dist/italic-icon.entry-8127c2ee.cjs +1 -0
- package/dist/multi-select-dropdown_2.entry-49d6f0e7.cjs +1 -0
- package/dist/multi-select-dropdown_2.entry-d749999d.js +187 -0
- package/dist/notebook-store-b61693cd-7a5576e7.js +14 -0
- package/dist/notebook-store-b61693cd-84de36d2.cjs +5 -0
- package/dist/nylas-booked-event-card_12.entry-29337b10.cjs +1 -0
- package/dist/nylas-booked-event-card_12.entry-3fcfd6f9.js +1418 -0
- package/dist/nylas-call-summary.entry-38aed89a.js +16 -0
- package/dist/nylas-call-summary.entry-e9adcb93.cjs +1 -0
- package/dist/nylas-event-calendar_3.entry-48f656e5.cjs +6 -0
- package/dist/nylas-event-calendar_3.entry-62d1f1f5.js +9693 -0
- package/dist/nylas-form-card.entry-3828ccb1.js +58 -0
- package/dist/nylas-form-card.entry-b900b46e.cjs +1 -0
- package/dist/{nylas-if-state.entry-beef8af6.js → nylas-if-state.entry-2810dcf5.js} +4 -3
- package/dist/nylas-if-state.entry-92af0a51.cjs +1 -0
- package/dist/nylas-key-points.entry-977a6fae.js +29 -0
- package/dist/nylas-key-points.entry-de658637.cjs +1 -0
- package/dist/nylas-login.entry-4a6c11e6.cjs +1 -0
- package/dist/{nylas-login.entry-1661cbd4.js → nylas-login.entry-8101d3d0.js} +4 -3
- package/dist/nylas-provider.entry-b7ac25f5.cjs +1 -0
- package/dist/{nylas-provider.entry-1f140378.js → nylas-provider.entry-c054d68a.js} +6 -5
- package/dist/nylas-scheduler-editor.entry-1538950d.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-f184f72e.js → nylas-scheduler-editor.entry-e35fad5c.js} +530 -272
- package/dist/nylas-scheduling.entry-360b978c.js +439 -0
- package/dist/nylas-scheduling.entry-92351cd2.cjs +1 -0
- package/dist/nylas-transcript.entry-4d973027.cjs +6 -0
- package/dist/nylas-transcript.entry-81e2c821.js +128 -0
- package/dist/nylas-video-player.entry-60268c07.js +39 -0
- package/dist/nylas-video-player.entry-f3c2b073.cjs +1 -0
- package/dist/nylas-video-preview.entry-12e05e4d.cjs +1 -0
- package/dist/nylas-video-preview.entry-320421b6.js +16 -0
- package/dist/{person-icon.entry-f9ca9147.js → person-icon.entry-8533209c.js} +8 -7
- package/dist/person-icon.entry-967ad730.cjs +1 -0
- package/dist/play-icon.entry-15ee8568.js +16 -0
- package/dist/play-icon.entry-7b1fd79d.cjs +1 -0
- package/dist/radio-button-group.entry-24cb342f.cjs +1 -0
- package/dist/radio-button-group.entry-53dcf16c.js +47 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +133 -123
- package/dist/refresh-icon.entry-0486ae54.cjs +1 -0
- package/dist/{refresh-icon.entry-7886041f.js → refresh-icon.entry-f3320971.js} +7 -6
- package/dist/{register-component-677d8d2b-0113766e.js → register-component-504a1cbb-5f986d7f.js} +1 -1
- package/dist/{register-component-677d8d2b-4738af1d.cjs → register-component-504a1cbb-89124fd8.cjs} +1 -1
- package/dist/{reply-all-icon.entry-fdd0058e.js → reply-all-icon.entry-006fd1fb.js} +6 -5
- package/dist/reply-all-icon.entry-2cea1a40.cjs +1 -0
- package/dist/reply-icon.entry-bd252aed.cjs +1 -0
- package/dist/reply-icon.entry-d27166a1.js +16 -0
- package/dist/scheduler-config-store-d6729d8d-4a2defea.cjs +1 -0
- package/dist/{scheduler-config-store-ed4a8dfd-012dcf85.js → scheduler-config-store-d6729d8d-63e34849.js} +4 -1
- package/dist/scheduler-store-baf100ed-5c5d3aa5.cjs +1 -0
- package/dist/scheduler-store-baf100ed-81b183dc.js +533 -0
- package/dist/sent-icon.entry-bf101068.js +16 -0
- package/dist/sent-icon.entry-ee434395.cjs +1 -0
- package/dist/spam-icon.entry-11016b63.cjs +1 -0
- package/dist/spam-icon.entry-5193f9c6.js +16 -0
- package/dist/star-icon.entry-0e269252.cjs +1 -0
- package/dist/{star-icon.entry-501083c1.js → star-icon.entry-9c7449f3.js} +6 -5
- package/dist/stop-icon.entry-2ac11166.js +16 -0
- package/dist/stop-icon.entry-86412c9f.cjs +1 -0
- package/dist/textarea-component.entry-27717409.cjs +1 -0
- package/dist/textarea-component.entry-9df3fa96.js +39 -0
- package/dist/toggle-switch.entry-9623e2b2.cjs +1 -0
- package/dist/toggle-switch.entry-a5ddfad9.js +34 -0
- package/dist/translate-icon.entry-e0617680.cjs +1 -0
- package/dist/{translate-icon.entry-676a4150.js → translate-icon.entry-f22293e6.js} +5 -4
- package/dist/trash-fill-icon.entry-0275f657.cjs +1 -0
- package/dist/trash-fill-icon.entry-2616c5df.js +16 -0
- package/dist/{underline-icon.entry-3513c5ef.js → underline-icon.entry-1110dcb1.js} +5 -4
- package/dist/underline-icon.entry-d54b06ab.cjs +1 -0
- package/dist/warning-icon.entry-6d390ab7.cjs +1 -0
- package/dist/{warning-icon.entry-6e723597.js → warning-icon.entry-9a6e7913.js} +8 -7
- package/package.json +11 -3
- package/dist/add-circle-icon.entry-00c87903.js +0 -15
- package/dist/add-circle-icon.entry-640d2b46.cjs +0 -1
- package/dist/archive-icon.entry-5b209336.cjs +0 -1
- package/dist/archive-icon.entry-e8a39eda.js +0 -15
- package/dist/arrow-icon.entry-a25b7b7e.cjs +0 -1
- package/dist/bold-icon.entry-d837c73d.cjs +0 -1
- package/dist/button-component_2.entry-1471422a.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_53.entry-094bd4b9.cjs +0 -6
- package/dist/calendar-agenda-fill-icon_53.entry-6d7f9c79.js +0 -5757
- package/dist/calendar-cancel-icon.entry-42d3d226.cjs +0 -1
- package/dist/calendar-check-icon_2.entry-45aacd91.cjs +0 -1
- package/dist/calendar-icon.entry-90d67b03.cjs +0 -1
- package/dist/checkbox-component_3.entry-231b2254.cjs +0 -1
- package/dist/checkbox-component_3.entry-7270533c.js +0 -153
- package/dist/chevron-icon_3.entry-3c95cc88.js +0 -147
- package/dist/chevron-icon_3.entry-ead3d4c8.cjs +0 -1
- package/dist/clock-icon_4.entry-b50cce70.cjs +0 -1
- package/dist/close-icon.entry-04008446.cjs +0 -1
- package/dist/close-icon.entry-0a4105c9.js +0 -15
- package/dist/constants-f6e79ab7-23d7236b.cjs +0 -1
- package/dist/copy-icon.entry-312ff230.js +0 -15
- package/dist/copy-icon.entry-74f8ebcd.cjs +0 -1
- package/dist/core-js-38e53e34.cjs +0 -4
- package/dist/core-js-a9d3b6e1.js +0 -3297
- package/dist/delete-icon.entry-b61a6706.cjs +0 -1
- package/dist/document-refresh-icon.entry-1c985b1e.js +0 -15
- package/dist/document-refresh-icon.entry-27ff5cb2.cjs +0 -1
- package/dist/dom-68f08be9.cjs +0 -15
- package/dist/dom-86e17616.js +0 -664
- package/dist/folder-icon.entry-c32a6e15.cjs +0 -1
- package/dist/forward-icon.entry-5f9a7639.js +0 -15
- package/dist/forward-icon.entry-8cd805dc.cjs +0 -1
- package/dist/globe-icon.entry-21a80591.cjs +0 -1
- package/dist/globe-icon.entry-397727e1.js +0 -15
- package/dist/google-logo-icon_4.entry-42e87368.cjs +0 -1
- package/dist/google-logo-icon_4.entry-6ccf8379.js +0 -778
- package/dist/inbox-icon.entry-1e448b4b.js +0 -15
- package/dist/inbox-icon.entry-50605b1d.cjs +0 -1
- package/dist/index-594c8e7b.js +0 -16763
- package/dist/index-cfb93df6.cjs +0 -81
- package/dist/info-icon_2.entry-65e0023f.js +0 -34
- package/dist/info-icon_2.entry-e7b86847.cjs +0 -1
- package/dist/input-color-picker.entry-37d2fb66.js +0 -48
- package/dist/input-color-picker.entry-aabfe638.cjs +0 -1
- package/dist/input-component.entry-51f6da14.cjs +0 -1
- package/dist/input-component.entry-c07d92b1.js +0 -70
- package/dist/input-dropdown_2.entry-20fb0552.cjs +0 -1
- package/dist/input-dropdown_2.entry-90c08f10.js +0 -228
- package/dist/italic-icon.entry-8e5599ff.js +0 -15
- package/dist/italic-icon.entry-ee10a040.cjs +0 -1
- package/dist/multi-select-dropdown.entry-656d2791.cjs +0 -1
- package/dist/multi-select-dropdown.entry-c143becc.js +0 -116
- package/dist/nylas-booked-event-card_12.entry-4974ffe6.js +0 -1332
- package/dist/nylas-booked-event-card_12.entry-669bb872.cjs +0 -1
- package/dist/nylas-form-card.entry-42e718e2.js +0 -57
- package/dist/nylas-form-card.entry-55d3909c.cjs +0 -1
- package/dist/nylas-if-state.entry-4de782b7.cjs +0 -1
- package/dist/nylas-login.entry-d6b80abe.cjs +0 -1
- package/dist/nylas-provider.entry-d5495e1a.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-bebe4e7d.cjs +0 -2
- package/dist/nylas-scheduling.entry-21c04831.cjs +0 -1
- package/dist/nylas-scheduling.entry-c335ad21.js +0 -415
- package/dist/nylas-time-window-picker_2.entry-9e0dd470.js +0 -336
- package/dist/nylas-time-window-picker_2.entry-a2651ee7.cjs +0 -1
- package/dist/person-icon.entry-21946944.cjs +0 -1
- package/dist/play-icon.entry-b27fcb18.cjs +0 -1
- package/dist/play-icon.entry-dbfed5e8.js +0 -15
- package/dist/refresh-icon.entry-9d94a60b.cjs +0 -1
- package/dist/reply-all-icon.entry-f0e0a5c4.cjs +0 -1
- package/dist/reply-icon.entry-0a42fb2c.cjs +0 -1
- package/dist/reply-icon.entry-a8d2b0f8.js +0 -15
- package/dist/scheduler-config-store-ed4a8dfd-a16d5c62.cjs +0 -1
- package/dist/scheduler-store-92eb8804-bc68a43a.js +0 -487
- package/dist/scheduler-store-92eb8804-c3deee73.cjs +0 -1
- package/dist/sent-icon.entry-c3f84a59.cjs +0 -1
- package/dist/sent-icon.entry-e047f087.js +0 -15
- package/dist/spam-icon.entry-55d01416.js +0 -15
- package/dist/spam-icon.entry-671eb165.cjs +0 -1
- package/dist/star-icon.entry-4dcae472.cjs +0 -1
- package/dist/stop-icon.entry-130a28b2.js +0 -15
- package/dist/stop-icon.entry-ed949255.cjs +0 -1
- package/dist/textarea-component.entry-65dd740a.cjs +0 -1
- package/dist/textarea-component.entry-efae9031.js +0 -37
- package/dist/translate-icon.entry-2591baf8.cjs +0 -1
- package/dist/trash-fill-icon.entry-5b373be7.js +0 -15
- package/dist/trash-fill-icon.entry-c411d0e0.cjs +0 -1
- package/dist/underline-icon.entry-6bf14476.cjs +0 -1
- package/dist/warning-icon.entry-719a094d.cjs +0 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { r as y, h as r, b as o, c as h, W as c, X as m, L as g, Y as f, Z as u, M as p, H as b, g as x } from "./index-04630615.js";
|
|
2
|
+
import { L as l } from "./constants-f5ba52b9-40ab2ded.js";
|
|
3
|
+
import { c as w } from "./customParseFormat-39eacb44-eeffe2bb.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "react/jsx-runtime";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
const v = ".sc-globe-icon-h{display:flex}", k = v, T = class {
|
|
8
|
+
constructor(t) {
|
|
9
|
+
y(this, t), this.width = "16", this.height = "16";
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return r("svg", { key: "e49a7c6af179ae7509e706ac54dab240917fa5ad", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, r("path", { key: "20930ecebcee8b313e00f572da95d60cd6437945", d: "M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z", fill: "currentColor" }));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
T.style = k;
|
|
16
|
+
const C = ':host{display:block;position:relative;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:var(--nylas-base-900);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:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', I = C;
|
|
17
|
+
o.extend(w);
|
|
18
|
+
const S = class {
|
|
19
|
+
constructor(t) {
|
|
20
|
+
y(this, t), this.timeChange = h(this, "timeChange", 7), this.timeWindowFormError = h(this, "timeWindowFormError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.language = l.en, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
|
|
21
|
+
}
|
|
22
|
+
handleOutsideClick(t) {
|
|
23
|
+
!t.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
|
|
24
|
+
}
|
|
25
|
+
minimumStartTimeChangedHandler() {
|
|
26
|
+
if (this.minimumStartTime) {
|
|
27
|
+
let t = o().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
|
|
28
|
+
this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? t = t.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (t = t.subtract(12, "hour")), this.times = this.generateTimes();
|
|
29
|
+
const e = o(this.times[0].value, "hh:mma");
|
|
30
|
+
o(this.time, "hh:mma").isBefore(e) && (this.err = "Invalid", this.timeWindowFormError.emit({
|
|
31
|
+
key: this.el.id,
|
|
32
|
+
message: "Invalid"
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
componentDidRender() {
|
|
37
|
+
if (this.showTimes && this.shouldAutoScroll) {
|
|
38
|
+
const t = c(this.time), e = this.times.findIndex((i) => i.value === t);
|
|
39
|
+
e > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(e));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
handleTimeChange(t, e) {
|
|
44
|
+
const i = e.split(":");
|
|
45
|
+
i[0] === "00" && i[1].slice(-2) == "pm" && (this.err = "Invalid", this.timeWindowFormError.emit({
|
|
46
|
+
key: this.el.id,
|
|
47
|
+
message: "Invalid"
|
|
48
|
+
})), m(e) ? (this.err = "", this.timeWindowFormError.emit({
|
|
49
|
+
key: this.el.id,
|
|
50
|
+
message: ""
|
|
51
|
+
})) : (this.err = "Invalid", this.timeWindowFormError.emit({
|
|
52
|
+
key: this.el.id,
|
|
53
|
+
message: "Invalid"
|
|
54
|
+
})), !this.err && this.timeChange.emit({
|
|
55
|
+
key: this.el.id,
|
|
56
|
+
value: e
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
handleTimeAutocomplete(t) {
|
|
60
|
+
var s;
|
|
61
|
+
const e = (s = t.target) == null ? void 0 : s.value, i = this.language === l.de || this.language === l.fr ? g(e) : e;
|
|
62
|
+
if (!m(i)) {
|
|
63
|
+
this.err = "Invalid", this.timeWindowFormError.emit({
|
|
64
|
+
key: this.el.id,
|
|
65
|
+
message: "Invalid"
|
|
66
|
+
});
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (i === "") {
|
|
70
|
+
const a = f().format("hh:mma");
|
|
71
|
+
this.timeChange.emit({
|
|
72
|
+
key: this.el.id,
|
|
73
|
+
value: a
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (!u(i)) {
|
|
78
|
+
const a = c(i);
|
|
79
|
+
this.timeChange.emit({
|
|
80
|
+
key: this.el.id,
|
|
81
|
+
value: a
|
|
82
|
+
});
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.timeChange.emit({
|
|
86
|
+
key: this.el.id,
|
|
87
|
+
value: i
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
handleOnInput(t) {
|
|
91
|
+
var i;
|
|
92
|
+
const e = (i = t.target) == null ? void 0 : i.value;
|
|
93
|
+
if (m(e)) {
|
|
94
|
+
if (e === "") {
|
|
95
|
+
const s = f().format("hh:mma"), a = this.times.findIndex((n) => n.value === s);
|
|
96
|
+
a > -1 && this.scrollToViewWithinParent(a);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (!u(e)) {
|
|
100
|
+
const s = c(e), a = this.times.findIndex((n) => n.value === s);
|
|
101
|
+
a > -1 && this.scrollToViewWithinParent(a);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
generateTimes() {
|
|
107
|
+
const t = [];
|
|
108
|
+
let e = o().set("hour", 0).set("minute", 0).set("second", 0);
|
|
109
|
+
this.minimumStartTime && (e = o(this.minimumStartTime, "hh:mma"));
|
|
110
|
+
const i = e.endOf("day").diff(e, "minutes"), s = Math.round(i / 15);
|
|
111
|
+
for (let a = 0; a < s + 1; a++) {
|
|
112
|
+
const n = e.add(a * 15, "minute");
|
|
113
|
+
if (a == s && n.format("hh:mma").includes("am"))
|
|
114
|
+
break;
|
|
115
|
+
t.push({ id: a, value: n.format("hh:mma") });
|
|
116
|
+
}
|
|
117
|
+
return t;
|
|
118
|
+
}
|
|
119
|
+
handleComboboxKeyDown(t) {
|
|
120
|
+
if (t.key === "ArrowDown") {
|
|
121
|
+
if (t.preventDefault(), !this.showTimes) {
|
|
122
|
+
this.showTimes = !0, this.shouldAutoScroll = !0;
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (this.ariaActivedescendant === "")
|
|
126
|
+
this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
|
|
127
|
+
else {
|
|
128
|
+
const e = this.times.findIndex((s) => s.id.toString() === this.ariaActivedescendant), i = e + 1 < this.times.length ? e + 1 : 0;
|
|
129
|
+
this.ariaActivedescendant = this.times[i].id.toString(), this.focusOption(i);
|
|
130
|
+
}
|
|
131
|
+
} else if (t.key === "ArrowUp")
|
|
132
|
+
if (t.preventDefault(), this.ariaActivedescendant === "")
|
|
133
|
+
this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
|
|
134
|
+
else {
|
|
135
|
+
const e = this.times.findIndex((s) => s.id.toString() === this.ariaActivedescendant), i = e - 1 >= 0 ? e - 1 : this.times.length - 1;
|
|
136
|
+
this.ariaActivedescendant = this.times[i].id.toString(), this.focusOption(i);
|
|
137
|
+
}
|
|
138
|
+
else
|
|
139
|
+
t.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
140
|
+
}
|
|
141
|
+
handleListboxKeydown(t) {
|
|
142
|
+
const e = this.times, i = e.findIndex((s) => s.id.toString() === this.ariaActivedescendant);
|
|
143
|
+
if (t.key === "ArrowDown" || t.key === "Tab" && !t.shiftKey) {
|
|
144
|
+
t.preventDefault();
|
|
145
|
+
const s = i + 1 < e.length ? i + 1 : 0;
|
|
146
|
+
this.ariaActivedescendant = e[s].id.toString(), this.focusOption(s);
|
|
147
|
+
} else if (t.key === "ArrowUp" || t.key === "Tab" && t.shiftKey) {
|
|
148
|
+
t.preventDefault();
|
|
149
|
+
const s = i - 1 >= 0 ? i - 1 : e.length - 1;
|
|
150
|
+
this.ariaActivedescendant = e[s].id.toString(), this.focusOption(s);
|
|
151
|
+
} else if (t.key === "Enter") {
|
|
152
|
+
if (t.preventDefault(), this.ariaActivedescendant) {
|
|
153
|
+
const s = e[i];
|
|
154
|
+
this.handleTimeChange(t, s.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
|
|
155
|
+
}
|
|
156
|
+
} else
|
|
157
|
+
t.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
158
|
+
}
|
|
159
|
+
scrollToViewWithinParent(t) {
|
|
160
|
+
var d;
|
|
161
|
+
const e = this.times[t], i = (d = this.el.shadowRoot) == null ? void 0 : d.getElementById(e.id.toString()), s = this.timeMenu;
|
|
162
|
+
this.ariaActivedescendant = e.id.toString();
|
|
163
|
+
const a = i.getBoundingClientRect(), n = s.getBoundingClientRect();
|
|
164
|
+
a.top < n.top ? s.scrollTop -= n.top - a.top : a.bottom > n.bottom && (s.scrollTop += a.bottom - n.bottom), a.left < n.left ? s.scrollLeft -= n.left - a.left : a.right > n.right && (s.scrollLeft += a.right - n.right);
|
|
165
|
+
}
|
|
166
|
+
focusOption(t) {
|
|
167
|
+
var a;
|
|
168
|
+
const e = this.times[t];
|
|
169
|
+
if (!e)
|
|
170
|
+
return;
|
|
171
|
+
const i = e.id.toString(), s = (a = this.el.shadowRoot) == null ? void 0 : a.getElementById(i);
|
|
172
|
+
s && (s.focus(), s.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
173
|
+
}
|
|
174
|
+
render() {
|
|
175
|
+
const t = this.language !== l.en;
|
|
176
|
+
return r(b, { key: "fe213a09bb8bd924e66b19ae885a4ecea11e7919" }, r("div", { key: "75068ee86601003889d1d5047ca72f94cfce4354", class: "time-picker", part: "time-picker" }, r("input", { key: "204175ad394c1a67f5464c04c20ba07dcde5863a", type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
177
|
+
"time-input": !0,
|
|
178
|
+
error: !!this.err || this.hasError
|
|
179
|
+
}, ref: (e) => this.timeInput = e, value: t ? p(this.time) : this.time, onClick: () => {
|
|
180
|
+
this.showTimes = !this.showTimes, this.shouldAutoScroll = !0;
|
|
181
|
+
}, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && r("div", { class: "invalid-time-icon" }), this.showTimes && r("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, r("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => r("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
|
|
182
|
+
focused: this.ariaActivedescendant === e.id.toString()
|
|
183
|
+
}, onClick: (i) => {
|
|
184
|
+
this.handleTimeChange(i, e.value), this.showTimes = !1, this.timeInput.focus();
|
|
185
|
+
}, role: "option" }, `${t ? p(e.value) : e.value}`)))), !this.showTimes && this.err && r("p", { class: "error", id: "email-error" }, this.err)));
|
|
186
|
+
}
|
|
187
|
+
get el() {
|
|
188
|
+
return x(this);
|
|
189
|
+
}
|
|
190
|
+
static get watchers() {
|
|
191
|
+
return {
|
|
192
|
+
minimumStartTime: ["minimumStartTimeChangedHandler"]
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
S.style = I;
|
|
197
|
+
export {
|
|
198
|
+
T as globe_icon,
|
|
199
|
+
S as nylas_time_window_picker
|
|
200
|
+
};
|