@nylas/react 1.3.6 → 1.4.1
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-04909861.cjs +1 -0
- package/dist/add-circle-icon_2.entry-0d9ba871.js +26 -0
- package/dist/archive-icon.entry-3d6d9d3f.js +16 -0
- package/dist/archive-icon.entry-88459432.cjs +1 -0
- package/dist/{arrow-icon.entry-9cfd86a1.js → arrow-icon.entry-789ee889.js} +3 -2
- package/dist/arrow-icon.entry-c35e1933.cjs +1 -0
- package/dist/bold-icon.entry-827e95bf.cjs +1 -0
- package/dist/{bold-icon.entry-eab3420d.js → bold-icon.entry-fbb382d2.js} +7 -6
- package/dist/{button-component_2.entry-7cd5f9c0.js → button-component_2.entry-6c012ee4.js} +10 -9
- package/dist/button-component_2.entry-acd13f45.cjs +1 -0
- package/dist/calendar-agenda-fill-icon_36.entry-1bb3b1a8.js +4689 -0
- package/dist/calendar-agenda-fill-icon_36.entry-fa8121df.cjs +6 -0
- package/dist/calendar-cancel-icon.entry-2e97f7d8.cjs +1 -0
- package/dist/{calendar-cancel-icon.entry-299d6fba.js → calendar-cancel-icon.entry-a4d040db.js} +6 -5
- package/dist/{calendar-check-icon_2.entry-08ef8d2f.js → calendar-check-icon_2.entry-a48a358d.js} +12 -11
- package/dist/calendar-check-icon_2.entry-bca4821d.cjs +1 -0
- package/dist/{calendar-icon.entry-53b54115.js → calendar-icon.entry-57727659.js} +6 -5
- package/dist/calendar-icon.entry-a289313a.cjs +1 -0
- package/dist/checkbox-component.entry-af3e7005.cjs +1 -0
- package/dist/checkbox-component.entry-f4f98226.js +43 -0
- package/dist/checkmark-icon_15.entry-dace1b62.cjs +5 -0
- package/dist/checkmark-icon_15.entry-f43549b3.js +1337 -0
- package/dist/chevron-icon_3.entry-219b42e6.cjs +1 -0
- package/dist/chevron-icon_3.entry-25533d13.js +148 -0
- package/dist/clock-icon_4.entry-3917c667.cjs +1 -0
- package/dist/{clock-icon_4.entry-0e809dcb.js → clock-icon_4.entry-76f29f7e.js} +9 -8
- package/dist/{constants-6da0ede7-49c32ba7.js → constants-3d8016e3-3c080f00.js} +110 -41
- package/dist/constants-3d8016e3-fd6c3848.cjs +1 -0
- package/dist/customParseFormat-6c652dbb-8a42d5b0.js +135 -0
- package/dist/customParseFormat-6c652dbb-ba81ab97.cjs +1 -0
- package/dist/{delete-icon.entry-802084f6.js → delete-icon.entry-3b61864e.js} +8 -7
- package/dist/delete-icon.entry-96420b21.cjs +1 -0
- package/dist/{document-refresh-icon.entry-d1604f53.js → document-refresh-icon.entry-7333b7c9.js} +6 -5
- package/dist/document-refresh-icon.entry-8b5c6b9b.cjs +1 -0
- package/dist/elements/index.d.ts +10 -0
- package/dist/{feedbackSync-c040f483-2b6476c4.js → feedbackSync-352aaf4a-b2b83cfa.js} +1 -1
- package/dist/{feedbackSync-c040f483-d6dd0560.cjs → feedbackSync-352aaf4a-ba1bf452.cjs} +1 -1
- package/dist/{folder-icon.entry-6c0c09ed.js → folder-icon.entry-bb5e2452.js} +5 -4
- package/dist/folder-icon.entry-d2e46d3a.cjs +1 -0
- package/dist/forward-icon.entry-1fcf5a6b.cjs +1 -0
- package/dist/forward-icon.entry-af8d2147.js +16 -0
- package/dist/globe-icon_2.entry-b4b55760.cjs +1 -0
- package/dist/globe-icon_2.entry-cc6d9d67.js +200 -0
- package/dist/google-logo-icon_6.entry-aa7b5b42.js +1484 -0
- package/dist/google-logo-icon_6.entry-eefdec63.cjs +2 -0
- package/dist/google-meet-icon_5.entry-9758e527.js +56 -0
- package/dist/google-meet-icon_5.entry-c545537a.cjs +1 -0
- package/dist/inbox-icon.entry-b9640d5a.cjs +1 -0
- package/dist/inbox-icon.entry-c005ebc5.js +16 -0
- package/dist/index-05630f15.cjs +57 -0
- package/dist/index-78390f2e.js +17607 -0
- package/dist/index.d.ts +1 -3
- package/dist/{index.es-2b014ec7-72557487.js → index.es-4a203e8e-cf485db5.js} +818 -804
- package/dist/{index.es-2b014ec7-0589e68a.cjs → index.es-4a203e8e-f668b8c2.cjs} +6 -6
- package/dist/info-icon_2.entry-b17298b6.js +35 -0
- package/dist/info-icon_2.entry-ecbc6605.cjs +1 -0
- package/dist/input-component.entry-24366ab8.cjs +1 -0
- package/dist/input-component.entry-9da5da6c.js +84 -0
- package/dist/input-dropdown_2.entry-0109b06c.cjs +1 -0
- package/dist/input-dropdown_2.entry-d65f7152.js +231 -0
- package/dist/italic-icon.entry-afa4332a.cjs +1 -0
- package/dist/{italic-icon.entry-d610e66f.js → italic-icon.entry-d0a536f2.js} +3 -2
- package/dist/multi-select-dropdown_2.entry-2c7a1a06.cjs +1 -0
- package/dist/multi-select-dropdown_2.entry-c56b5fd2.js +187 -0
- package/dist/notebook-store-b61693cd-0877e7a2.js +14 -0
- package/dist/notebook-store-b61693cd-a7b8ae37.cjs +5 -0
- package/dist/nylas-booked-event-card_12.entry-827c7fb4.cjs +1 -0
- package/dist/nylas-booked-event-card_12.entry-960fdfe2.js +1422 -0
- package/dist/nylas-call-summary.entry-1cce1446.js +16 -0
- package/dist/nylas-call-summary.entry-f10f3c54.cjs +1 -0
- package/dist/nylas-event-calendar_3.entry-8bb08ed3.js +9705 -0
- package/dist/nylas-event-calendar_3.entry-b656237b.cjs +6 -0
- package/dist/nylas-form-card.entry-62578338.cjs +1 -0
- package/dist/nylas-form-card.entry-7455b8f1.js +58 -0
- package/dist/nylas-if-state.entry-0897dc70.cjs +1 -0
- package/dist/{nylas-if-state.entry-ee7d92b0.js → nylas-if-state.entry-7fa6d392.js} +4 -3
- package/dist/nylas-key-points.entry-449e1be0.js +29 -0
- package/dist/nylas-key-points.entry-693f33a1.cjs +1 -0
- package/dist/nylas-login.entry-36544dc8.cjs +1 -0
- package/dist/{nylas-login.entry-265f9d0f.js → nylas-login.entry-d7082306.js} +4 -3
- package/dist/{nylas-provider.entry-5605a3e0.js → nylas-provider.entry-a0e7ce4d.js} +6 -5
- package/dist/nylas-provider.entry-b93d2a62.cjs +1 -0
- package/dist/nylas-scheduler-editor.entry-332d27e0.cjs +2 -0
- package/dist/{nylas-scheduler-editor.entry-b3e085b3.js → nylas-scheduler-editor.entry-78fe5abf.js} +524 -266
- package/dist/nylas-scheduling.entry-1d80c349.cjs +1 -0
- package/dist/nylas-scheduling.entry-fa9ff55b.js +439 -0
- package/dist/nylas-transcript.entry-570d3abe.cjs +6 -0
- package/dist/nylas-transcript.entry-b129565c.js +128 -0
- package/dist/nylas-video-player.entry-9c7c9792.cjs +1 -0
- package/dist/nylas-video-player.entry-e208d443.js +39 -0
- package/dist/nylas-video-preview.entry-a3f542ad.js +16 -0
- package/dist/nylas-video-preview.entry-bd9bdda7.cjs +1 -0
- package/dist/{person-icon.entry-85660f98.js → person-icon.entry-82fbc43e.js} +8 -7
- package/dist/person-icon.entry-e4d11400.cjs +1 -0
- package/dist/play-icon.entry-68bc660a.js +16 -0
- package/dist/play-icon.entry-9cab598b.cjs +1 -0
- package/dist/radio-button-group.entry-6a2adf11.cjs +1 -0
- package/dist/radio-button-group.entry-f7679911.js +47 -0
- package/dist/react.cjs +1 -1
- package/dist/react.js +134 -125
- package/dist/refresh-icon.entry-0f1e5f20.cjs +1 -0
- package/dist/{refresh-icon.entry-d8644f5d.js → refresh-icon.entry-394b0814.js} +6 -5
- package/dist/{register-component-e9c10e19-80bbc4dd.cjs → register-component-1027b769-62812558.cjs} +1 -1
- package/dist/{register-component-e9c10e19-099fb50f.js → register-component-1027b769-dd21b16d.js} +1 -1
- package/dist/{reply-all-icon.entry-f209daeb.js → reply-all-icon.entry-0fad8f2f.js} +5 -4
- package/dist/reply-all-icon.entry-1680f1e5.cjs +1 -0
- package/dist/{reply-icon.entry-d37a129b.js → reply-icon.entry-5f4b7837.js} +5 -4
- package/dist/reply-icon.entry-77342442.cjs +1 -0
- package/dist/scheduler-config-store-d6729d8d-06a3a314.cjs +1 -0
- package/dist/{scheduler-config-store-ed4a8dfd-35ec90c6.js → scheduler-config-store-d6729d8d-854b5da8.js} +4 -1
- package/dist/scheduler-store-f3e2a26f-7cee436f.cjs +1 -0
- package/dist/scheduler-store-f3e2a26f-85df53f7.js +533 -0
- package/dist/sent-icon.entry-20a8945d.cjs +1 -0
- package/dist/sent-icon.entry-2d122865.js +16 -0
- package/dist/spam-icon.entry-86178cc5.cjs +1 -0
- package/dist/spam-icon.entry-9e374d44.js +16 -0
- package/dist/star-icon.entry-1b94c861.cjs +1 -0
- package/dist/{star-icon.entry-9b22bb32.js → star-icon.entry-bb1b517d.js} +7 -6
- package/dist/stop-icon.entry-7b21833b.cjs +1 -0
- package/dist/{stop-icon.entry-1f7918b2.js → stop-icon.entry-e4d3526d.js} +3 -2
- package/dist/textarea-component.entry-ba3c9311.js +39 -0
- package/dist/textarea-component.entry-fdba933d.cjs +1 -0
- package/dist/toggle-switch.entry-4a980d1d.js +34 -0
- package/dist/toggle-switch.entry-9142a3d3.cjs +1 -0
- package/dist/{translate-icon.entry-8cffa646.js → translate-icon.entry-1657aa04.js} +5 -4
- package/dist/translate-icon.entry-b4908cf3.cjs +1 -0
- package/dist/trash-fill-icon.entry-a6791185.cjs +1 -0
- package/dist/trash-fill-icon.entry-c9e1769e.js +16 -0
- package/dist/{underline-icon.entry-afd9c78b.js → underline-icon.entry-1ba4d923.js} +5 -4
- package/dist/underline-icon.entry-d1f91e63.cjs +1 -0
- package/dist/warning-icon.entry-b1480f57.cjs +1 -0
- package/dist/{warning-icon.entry-53441175.js → warning-icon.entry-fe155c15.js} +5 -4
- package/package.json +12 -4
- package/dist/add-circle-icon.entry-25aecb13.js +0 -15
- package/dist/add-circle-icon.entry-5c49ba96.cjs +0 -1
- package/dist/archive-icon.entry-0a9e8ec3.cjs +0 -1
- package/dist/archive-icon.entry-89e31121.js +0 -15
- package/dist/arrow-icon.entry-19e5237c.cjs +0 -1
- package/dist/bold-icon.entry-d591e701.cjs +0 -1
- package/dist/button-component_2.entry-ce4314bf.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_54.entry-7099138a.js +0 -5865
- package/dist/calendar-agenda-fill-icon_54.entry-9228dbe7.cjs +0 -8
- package/dist/calendar-cancel-icon.entry-6e3d20f1.cjs +0 -1
- package/dist/calendar-check-icon_2.entry-087dd913.cjs +0 -1
- package/dist/calendar-icon.entry-73f9d05b.cjs +0 -1
- package/dist/checkbox-component_3.entry-bc9768dd.cjs +0 -1
- package/dist/checkbox-component_3.entry-d828eb1d.js +0 -149
- package/dist/chevron-icon_3.entry-783588a9.js +0 -147
- package/dist/chevron-icon_3.entry-e956d78c.cjs +0 -1
- package/dist/clock-icon_4.entry-60d41dfd.cjs +0 -1
- package/dist/close-icon.entry-1b5d25c5.cjs +0 -1
- package/dist/close-icon.entry-fef4f624.js +0 -15
- package/dist/constants-6da0ede7-151395ad.cjs +0 -1
- package/dist/copy-icon.entry-25699ab8.js +0 -15
- package/dist/copy-icon.entry-ab6530e0.cjs +0 -1
- package/dist/core-js-38e53e34.cjs +0 -4
- package/dist/core-js-a9d3b6e1.js +0 -3297
- package/dist/delete-icon.entry-e99e1f82.cjs +0 -1
- package/dist/document-refresh-icon.entry-065a59f5.cjs +0 -1
- package/dist/dom-68f08be9.cjs +0 -15
- package/dist/dom-86e17616.js +0 -664
- package/dist/folder-icon.entry-351e61fc.cjs +0 -1
- package/dist/forward-icon.entry-0ccfb600.js +0 -15
- package/dist/forward-icon.entry-6b7af9cd.cjs +0 -1
- package/dist/globe-icon.entry-2b75b66b.cjs +0 -1
- package/dist/globe-icon.entry-5ddcd2cb.js +0 -15
- package/dist/google-logo-icon_4.entry-04174684.js +0 -790
- package/dist/google-logo-icon_4.entry-a685ff91.cjs +0 -1
- package/dist/inbox-icon.entry-0ad18b3f.js +0 -15
- package/dist/inbox-icon.entry-425d1ded.cjs +0 -1
- package/dist/index-7e7c24f1.js +0 -16837
- package/dist/index-81719cc6.cjs +0 -81
- package/dist/info-icon_2.entry-7ec02802.cjs +0 -1
- package/dist/info-icon_2.entry-a6d0e842.js +0 -34
- package/dist/input-color-picker.entry-d98d06ca.js +0 -48
- package/dist/input-color-picker.entry-ed9a1c07.cjs +0 -1
- package/dist/input-component.entry-2e57b00e.cjs +0 -1
- package/dist/input-component.entry-f3aa3419.js +0 -70
- package/dist/input-dropdown_2.entry-0d9c8475.js +0 -228
- package/dist/input-dropdown_2.entry-6fc7df16.cjs +0 -1
- package/dist/italic-icon.entry-7a8712f2.cjs +0 -1
- package/dist/multi-select-dropdown.entry-b31d9f11.js +0 -116
- package/dist/multi-select-dropdown.entry-eaa268b4.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-45514813.js +0 -1378
- package/dist/nylas-booked-event-card_12.entry-498de30a.cjs +0 -1
- package/dist/nylas-form-card.entry-67aec298.js +0 -57
- package/dist/nylas-form-card.entry-fdb3c114.cjs +0 -1
- package/dist/nylas-if-state.entry-76b38c9c.cjs +0 -1
- package/dist/nylas-login.entry-589e45d0.cjs +0 -1
- package/dist/nylas-provider.entry-cfb9627c.cjs +0 -1
- package/dist/nylas-scheduler-editor.entry-6fdfb9b5.cjs +0 -2
- package/dist/nylas-scheduling.entry-8cc5c353.cjs +0 -1
- package/dist/nylas-scheduling.entry-bc00beba.js +0 -424
- package/dist/nylas-time-window-picker.entry-a77c1d67.cjs +0 -1
- package/dist/nylas-time-window-picker.entry-c421303e.js +0 -316
- package/dist/person-icon.entry-36b21e95.cjs +0 -1
- package/dist/play-icon.entry-953b1bc8.js +0 -15
- package/dist/play-icon.entry-c35ade8a.cjs +0 -1
- package/dist/refresh-icon.entry-038501ca.cjs +0 -1
- package/dist/reply-all-icon.entry-ead9d0ba.cjs +0 -1
- package/dist/reply-icon.entry-b7f35ecd.cjs +0 -1
- package/dist/scheduler-config-store-ed4a8dfd-0d4408cf.cjs +0 -1
- package/dist/scheduler-store-dc3a7958-7c73f5e2.js +0 -487
- package/dist/scheduler-store-dc3a7958-99c6bdf6.cjs +0 -1
- package/dist/sent-icon.entry-b662ef5b.cjs +0 -1
- package/dist/sent-icon.entry-ec433cec.js +0 -15
- package/dist/spam-icon.entry-3a553ae4.js +0 -15
- package/dist/spam-icon.entry-a79819fd.cjs +0 -1
- package/dist/star-icon.entry-47ea44e7.cjs +0 -1
- package/dist/stop-icon.entry-26e2e633.cjs +0 -1
- package/dist/textarea-component.entry-6939d0fc.js +0 -38
- package/dist/textarea-component.entry-da0a861e.cjs +0 -1
- package/dist/toggle-switch.entry-5ae5ba46.js +0 -33
- package/dist/toggle-switch.entry-c5fd3e33.cjs +0 -1
- package/dist/translate-icon.entry-72e0369e.cjs +0 -1
- package/dist/trash-fill-icon.entry-815859c6.js +0 -15
- package/dist/trash-fill-icon.entry-8620c28f.cjs +0 -1
- package/dist/underline-icon.entry-ba1a9e87.cjs +0 -1
- package/dist/warning-icon.entry-7cbede6b.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-78390f2e.js";
|
|
2
|
+
import { L as l } from "./constants-3d8016e3-3c080f00.js";
|
|
3
|
+
import { c as w } from "./customParseFormat-6c652dbb-8a42d5b0.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
|
+
};
|