@nylas/react 2.0.4 → 2.0.6
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/{abstract-provider-97cdbfea-5837e17f.cjs → abstract-provider-45ada3b4-31e3ed72.cjs} +1 -1
- package/dist/{abstract-provider-97cdbfea-6b0e3547.js → abstract-provider-45ada3b4-abd3105d.js} +1 -1
- package/dist/{add-circle-icon_2.entry-96ef4ded.cjs → add-circle-icon_2.entry-48953f9c.cjs} +1 -1
- package/dist/{add-circle-icon_2.entry-e59a5b4d.js → add-circle-icon_2.entry-f6f8b5e5.js} +1 -1
- package/dist/{archive-icon.entry-ea5667df.js → archive-icon.entry-b3a76711.js} +1 -1
- package/dist/{archive-icon.entry-49b4e0fd.cjs → archive-icon.entry-e2880dc7.cjs} +1 -1
- package/dist/{arrow-icon.entry-5aefd7de.cjs → arrow-icon.entry-84d1e26c.cjs} +1 -1
- package/dist/{arrow-icon.entry-1f766862.js → arrow-icon.entry-9b3441aa.js} +1 -1
- package/dist/{bold-icon.entry-240950a6.js → bold-icon.entry-0749a116.js} +1 -1
- package/dist/{bold-icon.entry-1a4955df.cjs → bold-icon.entry-e1d8ab5e.cjs} +1 -1
- package/dist/{button-component_2.entry-357fa02a.cjs → button-component_2.entry-1a817230.cjs} +1 -1
- package/dist/{button-component_2.entry-96785a34.js → button-component_2.entry-6eb55e97.js} +1 -1
- package/dist/calendar-agenda-fill-icon_37.entry-0ca8b9f4.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_37.entry-e732ee2e.js → calendar-agenda-fill-icon_37.entry-4adf73a2.js} +1434 -1169
- package/dist/{calendar-cancel-icon.entry-7543c684.js → calendar-cancel-icon.entry-2a29cb3f.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-55d746cf.cjs → calendar-cancel-icon.entry-e0dee585.cjs} +1 -1
- package/dist/{calendar-check-icon.entry-63d33f23.cjs → calendar-check-icon.entry-7f96d456.cjs} +1 -1
- package/dist/{calendar-check-icon.entry-aba54652.js → calendar-check-icon.entry-c12b63ea.js} +1 -1
- package/dist/{calendar-icon.entry-e13add9b.cjs → calendar-icon.entry-a2d19ff2.cjs} +1 -1
- package/dist/{calendar-icon.entry-2cb3b7d1.js → calendar-icon.entry-e82a5169.js} +1 -1
- package/dist/checkbox-component.entry-59612a67.js +52 -0
- package/dist/checkbox-component.entry-ddce70bc.cjs +1 -0
- package/dist/checkbox-group_4.entry-3311da64.cjs +28 -0
- package/dist/{checkbox-group_4.entry-04561314.js → checkbox-group_4.entry-7df47ad4.js} +286 -245
- package/dist/{checkmark-circle-icon.entry-1f788efc.js → checkmark-circle-icon.entry-677b0def.js} +1 -1
- package/dist/{checkmark-circle-icon.entry-e637e20e.cjs → checkmark-circle-icon.entry-67df713b.cjs} +1 -1
- package/dist/checkmark-icon_15.entry-2121e1b7.cjs +5 -0
- package/dist/{checkmark-icon_15.entry-146c1cb0.js → checkmark-icon_15.entry-9fd0ec58.js} +403 -330
- package/dist/chevron-icon_3.entry-1a42235c.cjs +1 -0
- package/dist/{chevron-icon_3.entry-637338b5.js → chevron-icon_3.entry-f0ad71d9.js} +19 -10
- package/dist/{clock-icon_4.entry-aa4117dc.cjs → clock-icon_4.entry-88822a84.cjs} +1 -1
- package/dist/{clock-icon_4.entry-e69395a2.js → clock-icon_4.entry-e7472d5f.js} +1 -1
- package/dist/{customParseFormat-8be9be1b-2464f2ba.js → customParseFormat-eeec04f5-3ad26beb.js} +1 -1
- package/dist/{customParseFormat-8be9be1b-7ad95d87.cjs → customParseFormat-eeec04f5-d5957784.cjs} +1 -1
- package/dist/{delete-icon.entry-af0cc45b.cjs → delete-icon.entry-3cb58910.cjs} +1 -1
- package/dist/{delete-icon.entry-8a956edd.js → delete-icon.entry-813429d7.js} +1 -1
- package/dist/{document-refresh-icon.entry-45931416.cjs → document-refresh-icon.entry-ae361b0b.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-5f58f367.js → document-refresh-icon.entry-c224c778.js} +1 -1
- package/dist/{feedbackSync-3db3713c-aadf336b.js → feedbackSync-0ebd0eda-803c3ebe.js} +1 -1
- package/dist/{feedbackSync-3db3713c-701d2eb9.cjs → feedbackSync-0ebd0eda-e12b00d5.cjs} +1 -1
- package/dist/{folder-icon.entry-cb80c172.cjs → folder-icon.entry-107841af.cjs} +1 -1
- package/dist/{folder-icon.entry-e5d7a651.js → folder-icon.entry-9c1f7c41.js} +1 -1
- package/dist/{forward-icon.entry-59be8165.js → forward-icon.entry-4ac22c16.js} +1 -1
- package/dist/{forward-icon.entry-c792734b.cjs → forward-icon.entry-6cec1f94.cjs} +1 -1
- package/dist/{globe-icon.entry-0fe4a4bb.js → globe-icon.entry-7798c93b.js} +1 -1
- package/dist/{globe-icon.entry-9ecf0255.cjs → globe-icon.entry-909c1382.cjs} +1 -1
- package/dist/google-logo-icon_6.entry-1f4ad364.cjs +2 -0
- package/dist/{google-logo-icon_6.entry-799511df.js → google-logo-icon_6.entry-b198c90a.js} +132 -89
- package/dist/{google-meet-icon_5.entry-3841313d.cjs → google-meet-icon_5.entry-82d87e77.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-e753ba28.js → google-meet-icon_5.entry-fa6dc1dc.js} +1 -1
- package/dist/{inbox-icon.entry-61132337.js → inbox-icon.entry-1b123e64.js} +1 -1
- package/dist/{inbox-icon.entry-2b450378.cjs → inbox-icon.entry-84f96d31.cjs} +1 -1
- package/dist/{index-2084ffd9.js → index-140eb219.js} +6439 -6370
- package/dist/index-d8a42c15.cjs +118 -0
- package/dist/{index.es-9e756df7-42d8a4cf.js → index.es-57d4a08f-184cbc01.js} +1 -1
- package/dist/{index.es-9e756df7-fa75b01e.cjs → index.es-57d4a08f-b0a2ca19.cjs} +1 -1
- package/dist/{info-icon_2.entry-c547775c.cjs → info-icon_2.entry-f09e7dae.cjs} +1 -1
- package/dist/{info-icon_2.entry-8d2750ce.js → info-icon_2.entry-f8b72d08.js} +1 -1
- package/dist/{input-component.entry-2e134e2a.js → input-component.entry-44607977.js} +26 -17
- package/dist/{input-component.entry-b1086460.cjs → input-component.entry-fd38953d.cjs} +1 -1
- package/dist/input-dropdown_2.entry-4c2e5e1a.cjs +1 -0
- package/dist/{input-dropdown_2.entry-1a02e672.js → input-dropdown_2.entry-6898b420.js} +30 -9
- package/dist/{italic-icon.entry-0ec2793b.js → italic-icon.entry-16aa1ada.js} +1 -1
- package/dist/{italic-icon.entry-6a3a5464.cjs → italic-icon.entry-beef2254.cjs} +1 -1
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +3 -2
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +2 -0
- package/dist/{multi-select-dropdown.entry-15e887be.js → multi-select-dropdown.entry-50133d29.js} +39 -30
- package/dist/multi-select-dropdown.entry-c82cd6d4.cjs +1 -0
- package/dist/{nylas-booked-event-card_11.entry-98bcc904.js → nylas-booked-event-card_11.entry-56768a09.js} +60 -60
- package/dist/nylas-booked-event-card_11.entry-eb4b3c5c.cjs +1 -0
- package/dist/nylas-date-component_2.entry-93f2f352.cjs +1 -0
- package/dist/{nylas-date-component_2.entry-6a98a5bf.js → nylas-date-component_2.entry-df957150.js} +85 -67
- package/dist/nylas-form-card.entry-4d95a4ad.cjs +1 -0
- package/dist/nylas-form-card.entry-7724e61f.js +72 -0
- package/dist/{nylas-notification_2.entry-4638126b.cjs → nylas-notification_2.entry-448c2cb8.cjs} +1 -1
- package/dist/{nylas-notification_2.entry-320a5a65.js → nylas-notification_2.entry-af763b6c.js} +1 -1
- package/dist/{nylas-scheduler-editor.entry-aa62c689.js → nylas-scheduler-editor.entry-0e4ba46d.js} +45 -34
- package/dist/{nylas-scheduler-editor.entry-82e0f79e.cjs → nylas-scheduler-editor.entry-e36cdd9d.cjs} +2 -2
- package/dist/{nylas-scheduling.entry-aec79de5.js → nylas-scheduling.entry-1b207e91.js} +194 -184
- package/dist/nylas-scheduling.entry-904dd10e.cjs +1 -0
- package/dist/{person-icon.entry-01a6a976.cjs → person-icon.entry-70d46ca6.cjs} +1 -1
- package/dist/{person-icon.entry-23cbe5dd.js → person-icon.entry-f2979577.js} +1 -1
- package/dist/{play-icon.entry-33443687.cjs → play-icon.entry-c2cf0b12.cjs} +1 -1
- package/dist/{play-icon.entry-4a529bd2.js → play-icon.entry-d387df5d.js} +1 -1
- package/dist/{radio-button-group.entry-04b7ff59.js → radio-button-group.entry-45dbd2df.js} +19 -10
- package/dist/{radio-button-group.entry-65155787.cjs → radio-button-group.entry-94e06176.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-e4ea4811.cjs → refresh-icon.entry-5ab20f26.cjs} +1 -1
- package/dist/{refresh-icon.entry-61ced881.js → refresh-icon.entry-777cff27.js} +1 -1
- package/dist/{register-component-8bbd6492-0d8737fd.js → register-component-0aad9e3d-b395364a.js} +1 -1
- package/dist/{register-component-8bbd6492-d9a23f3c.cjs → register-component-0aad9e3d-d2f2e543.cjs} +1 -1
- package/dist/{reply-all-icon.entry-c64d923b.cjs → reply-all-icon.entry-3c90510e.cjs} +1 -1
- package/dist/{reply-all-icon.entry-83509aaf.js → reply-all-icon.entry-e2dd6da9.js} +1 -1
- package/dist/{reply-icon.entry-131ade31.js → reply-icon.entry-00a97d9f.js} +1 -1
- package/dist/{reply-icon.entry-4edfbb70.cjs → reply-icon.entry-d96478be.cjs} +1 -1
- package/dist/{sent-icon.entry-e4f6a3ef.cjs → sent-icon.entry-2d16da4e.cjs} +1 -1
- package/dist/{sent-icon.entry-72fd8f16.js → sent-icon.entry-949cf214.js} +1 -1
- package/dist/{spam-icon.entry-7594c792.js → spam-icon.entry-3baf9e79.js} +1 -1
- package/dist/{spam-icon.entry-c531c188.cjs → spam-icon.entry-7ee61730.cjs} +1 -1
- package/dist/{star-icon.entry-adbe1bb3.js → star-icon.entry-9fdb278b.js} +1 -1
- package/dist/{star-icon.entry-a75255ff.cjs → star-icon.entry-dc702d73.cjs} +1 -1
- package/dist/{stop-icon.entry-079b28c6.cjs → stop-icon.entry-b5ae7e55.cjs} +1 -1
- package/dist/{stop-icon.entry-e95993f2.js → stop-icon.entry-efa1ea66.js} +1 -1
- package/dist/{textarea-component.entry-920a81ac.cjs → textarea-component.entry-247aca42.cjs} +1 -1
- package/dist/{textarea-component.entry-f5d74fb8.js → textarea-component.entry-7c6fc4d8.js} +26 -10
- package/dist/toggle-switch.entry-a0295d17.js +49 -0
- package/dist/toggle-switch.entry-d52b0338.cjs +1 -0
- package/dist/{translate-icon.entry-01cbe664.js → translate-icon.entry-219cab17.js} +1 -1
- package/dist/{translate-icon.entry-f33632d6.cjs → translate-icon.entry-985b3b29.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-b39ff771.js → trash-fill-icon.entry-03c90559.js} +1 -1
- package/dist/{trash-fill-icon.entry-298eece8.cjs → trash-fill-icon.entry-4dfd7d24.cjs} +1 -1
- package/dist/{underline-icon.entry-39179a2e.js → underline-icon.entry-58fa18b5.js} +1 -1
- package/dist/{underline-icon.entry-3704187c.cjs → underline-icon.entry-c60b77a6.cjs} +1 -1
- package/package.json +3 -3
- package/dist/calendar-agenda-fill-icon_37.entry-5e405c00.cjs +0 -6
- package/dist/checkbox-component.entry-8341a8d6.cjs +0 -1
- package/dist/checkbox-component.entry-da122544.js +0 -43
- package/dist/checkbox-group_4.entry-8854d522.cjs +0 -28
- package/dist/checkmark-icon_15.entry-a265f687.cjs +0 -5
- package/dist/chevron-icon_3.entry-6c38b5e5.cjs +0 -1
- package/dist/google-logo-icon_6.entry-60924f34.cjs +0 -2
- package/dist/index-e9dc7971.cjs +0 -118
- package/dist/input-dropdown_2.entry-cb163dc3.cjs +0 -1
- package/dist/multi-select-dropdown.entry-daccefd5.cjs +0 -1
- package/dist/nylas-booked-event-card_11.entry-3cdf8015.cjs +0 -1
- package/dist/nylas-date-component_2.entry-5d4f54fa.cjs +0 -1
- package/dist/nylas-form-card.entry-22851b77.cjs +0 -1
- package/dist/nylas-form-card.entry-a997084f.js +0 -58
- package/dist/nylas-scheduling.entry-9cef581a.cjs +0 -1
- package/dist/toggle-switch.entry-33273409.js +0 -34
- package/dist/toggle-switch.entry-ba6b4f33.cjs +0 -1
package/dist/{nylas-date-component_2.entry-6a98a5bf.js → nylas-date-component_2.entry-df957150.js}
RENAMED
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import { r as g, a as o, y as
|
|
2
|
-
import { L as
|
|
3
|
-
import { c as k } from "./customParseFormat-
|
|
1
|
+
import { r as g, a as o, y as d, h as n, g as v, d as l, i as c, W as h, X as m, L as x, Y as u, Z as p, M as b, H as w } from "./index-140eb219.js";
|
|
2
|
+
import { L as f } from "./constants-f51538ef-e0a5f026.js";
|
|
3
|
+
import { c as k } from "./customParseFormat-eeec04f5-3ad26beb.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "react-dom";
|
|
7
|
-
const T = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0}label .error{color:var(--nylas-error);border-color:var(--nylas-error)}.input_wrapper{display:flex;align-items:center;gap:1rem}input[type=date]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:100%;width:-moz-available;width:-webkit-fill-available;font-family:var(--nylas-font-family);padding:0 8px;cursor:pointer}input[type=date]:focus{outline-color:var(--nylas-primary)}input[type=date].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=date].error::placeholder{font-weight:400}input[type=date]::placeholder{color:var(--nylas-base-300)}input:read-only{background-color:var(--nylas-base-100);cursor:not-allowed}',
|
|
7
|
+
const T = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0}label .error{color:var(--nylas-error);border-color:var(--nylas-error)}.input_wrapper{display:flex;align-items:center;gap:1rem}input[type=date]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:100%;width:-moz-available;width:-webkit-fill-available;font-family:var(--nylas-font-family);padding:0 8px;cursor:pointer}input[type=date]:focus{outline-color:var(--nylas-primary)}input[type=date].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=date].error::placeholder{font-weight:400}input[type=date]::placeholder{color:var(--nylas-base-300)}input[type=date]::-webkit-calendar-picker-indicator{filter:invert(37%) sepia(51%) saturate(6324%) hue-rotate(215deg) brightness(94%) contrast(95%);cursor:pointer}input:read-only{background-color:var(--nylas-base-100);cursor:not-allowed}', C = T, I = {
|
|
8
8
|
date: "YYYY-MM-DD"
|
|
9
|
-
},
|
|
9
|
+
}, F = class {
|
|
10
10
|
constructor(t) {
|
|
11
|
-
g(this, t), this.nylasFormInputChanged = o(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = o(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = o(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder =
|
|
11
|
+
g(this, t), this.nylasFormInputChanged = o(this, "nylasFormInputChanged", 7), this.nylasFormInputFocused = o(this, "nylasFormInputFocused", 7), this.nylasFormInputBlurred = o(this, "nylasFormInputBlurred", 7), this.name = "input", this.defaultValue = void 0, this.label = "", this.placeholder = I.date, this.required = !1, this.readOnly = !1, this.autoFocus = !1, this.pattern = void 0, this.maxLength = 255, this.patternError = "", this.requiredError = "", this.errorMessage = "", this.minDate = void 0, this.hasError = !1, this.themeConfig = void 0, this.value = void 0, this.error = "", this.isDateValid = !0;
|
|
12
12
|
}
|
|
13
13
|
handleDefaultValueChange(t) {
|
|
14
|
-
this.value =
|
|
14
|
+
this.value = d(t), this.value && this.validatePattern(this.value, !0);
|
|
15
|
+
}
|
|
16
|
+
themeConfigChangedHandler(t, e) {
|
|
17
|
+
t !== e && this.applyThemeConfig(t);
|
|
18
|
+
}
|
|
19
|
+
applyThemeConfig(t) {
|
|
20
|
+
if (t)
|
|
21
|
+
for (const [e, i] of Object.entries(t))
|
|
22
|
+
this.el.style.setProperty(`${e}`, i);
|
|
15
23
|
}
|
|
16
24
|
componentDidLoad() {
|
|
17
|
-
this.value =
|
|
25
|
+
this.value = d(this.defaultValue || ""), this.value && this.validatePattern(this.value, !0), this.applyThemeConfig(this.themeConfig);
|
|
18
26
|
}
|
|
19
27
|
handleBookingFormSubmitted(t) {
|
|
20
28
|
this.validatePattern(this.value), this.error && t.preventDefault();
|
|
@@ -25,7 +33,7 @@ const T = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error
|
|
|
25
33
|
handleInput(t) {
|
|
26
34
|
this.error = "";
|
|
27
35
|
const e = t.target;
|
|
28
|
-
this.value =
|
|
36
|
+
this.value = d(e.value), this.isDateValid = e.validity.valid, this.nylasFormInputChanged.emit({
|
|
29
37
|
value: this.value,
|
|
30
38
|
name: this.name,
|
|
31
39
|
label: this.label,
|
|
@@ -47,7 +55,7 @@ const T = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error
|
|
|
47
55
|
}
|
|
48
56
|
validatePattern(t, e = !1) {
|
|
49
57
|
if (this.error = "", !e && (this.required && !this.isDateValid || this.minDate && new Date(this.minDate) > new Date(t))) {
|
|
50
|
-
this.error = "Please enter a valid date", this.nylasFormInputChanged.emit({
|
|
58
|
+
this.error = this.errorMessage || "Please enter a valid date", this.nylasFormInputChanged.emit({
|
|
51
59
|
value: this.value,
|
|
52
60
|
name: this.name,
|
|
53
61
|
label: this.label,
|
|
@@ -63,23 +71,24 @@ const T = ':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error
|
|
|
63
71
|
!this.pattern || !t && !this.required || (this.pattern.test(t) ? this.error = "" : this.error = this.patternError || "Invalid format.");
|
|
64
72
|
}
|
|
65
73
|
render() {
|
|
66
|
-
return n("label", { key: "
|
|
74
|
+
return n("label", { key: "19e91d1f34df671a8c3fb97ca4cb9361baccaeb3", part: "ic__label", class: { error: !!this.error || this.hasError } }, this.label && n("p", null, n("span", { class: "label" }, this.label), this.required && n("span", { class: "required" }, "*")), n("div", { key: "fd3f370a7469135b82c876938a5c1df1faedfd31", part: "ic__input_wrapper", class: "input_wrapper" }, n("input", { key: "a27ac166f7512464ed9e2caf10539ae60e0df92a", type: "date", name: this.name, part: "ic__date", title: this.readOnly ? "read-only field" : void 0, readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, min: this.minDate, maxLength: this.maxLength, placeholder: this.placeholder, class: { error: !!this.error || this.hasError }, onInput: (t) => this.handleInput(t), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), n("slot", { key: "2d3806006d35fecaa9b48a878eb4216249cdc80f", name: "additional-input" })), this.error && n("span", { class: "error help-text" }, this.error));
|
|
67
75
|
}
|
|
68
76
|
get el() {
|
|
69
77
|
return v(this);
|
|
70
78
|
}
|
|
71
79
|
static get watchers() {
|
|
72
80
|
return {
|
|
73
|
-
defaultValue: ["handleDefaultValueChange"]
|
|
81
|
+
defaultValue: ["handleDefaultValueChange"],
|
|
82
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
74
83
|
};
|
|
75
84
|
}
|
|
76
85
|
};
|
|
77
|
-
|
|
78
|
-
const
|
|
86
|
+
F.style = C;
|
|
87
|
+
const A = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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;color:var(--nylas-base-900);cursor:pointer;background:var(--nylas-base-0);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:var(--nylas-base-0)}.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}', D = A;
|
|
79
88
|
l.extend(k);
|
|
80
89
|
const S = class {
|
|
81
90
|
constructor(t) {
|
|
82
|
-
g(this, t), this.timeChange = o(this, "timeChange", 7), this.timeWindowFormError = o(this, "timeWindowFormError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.language =
|
|
91
|
+
g(this, t), this.timeChange = o(this, "timeChange", 7), this.timeWindowFormError = o(this, "timeWindowFormError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.language = f.en, this.themeConfig = void 0, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
|
|
83
92
|
}
|
|
84
93
|
handleOutsideClick(t) {
|
|
85
94
|
!t.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
|
|
@@ -90,14 +99,22 @@ const S = class {
|
|
|
90
99
|
minimumStartTimeChangedHandler() {
|
|
91
100
|
this.validateTimeAgainstMinimum();
|
|
92
101
|
}
|
|
102
|
+
themeConfigChangedHandler(t, e) {
|
|
103
|
+
this.applyThemeConfig(t);
|
|
104
|
+
}
|
|
105
|
+
applyThemeConfig(t) {
|
|
106
|
+
if (t)
|
|
107
|
+
for (const [e, i] of Object.entries(t))
|
|
108
|
+
this.el.style.setProperty(`${e}`, i);
|
|
109
|
+
}
|
|
93
110
|
validateTimeAgainstMinimum() {
|
|
94
111
|
if (this.minimumStartTime) {
|
|
95
112
|
const t = l(this.minimumStartTime, "hh:mma"), e = l(this.time, "hh:mma");
|
|
96
113
|
this.times = this.generateTimes();
|
|
97
|
-
const
|
|
98
|
-
e.isBefore(t) ? (this.err =
|
|
114
|
+
const i = c.t("nylasTimeWindowPicker.errors.invalid");
|
|
115
|
+
e.isBefore(t) ? (this.err = i, this.timeWindowFormError.emit({
|
|
99
116
|
key: this.el.id,
|
|
100
|
-
message:
|
|
117
|
+
message: i
|
|
101
118
|
})) : (this.err = "", this.timeWindowFormError.emit({
|
|
102
119
|
key: this.el.id,
|
|
103
120
|
message: ""
|
|
@@ -109,34 +126,34 @@ const S = class {
|
|
|
109
126
|
});
|
|
110
127
|
}
|
|
111
128
|
componentDidLoad() {
|
|
112
|
-
this.validateTimeAgainstMinimum();
|
|
129
|
+
this.validateTimeAgainstMinimum(), this.applyThemeConfig(this.themeConfig);
|
|
113
130
|
}
|
|
114
131
|
componentDidRender() {
|
|
115
132
|
if (this.showTimes && this.shouldAutoScroll) {
|
|
116
|
-
const t =
|
|
133
|
+
const t = h(this.time), e = this.times.findIndex((i) => i.value === t);
|
|
117
134
|
e > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(e));
|
|
118
135
|
return;
|
|
119
136
|
}
|
|
120
137
|
}
|
|
121
138
|
handleTimeChange(t, e) {
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
const
|
|
125
|
-
this.err =
|
|
139
|
+
const i = e.split(":");
|
|
140
|
+
if (i[0] === "00" && i[1].slice(-2) == "pm") {
|
|
141
|
+
const s = c.t("nylasTimeWindowPicker.errors.invalid");
|
|
142
|
+
this.err = s, this.timeWindowFormError.emit({
|
|
126
143
|
key: this.el.id,
|
|
127
|
-
message:
|
|
144
|
+
message: s
|
|
128
145
|
});
|
|
129
146
|
}
|
|
130
|
-
if (
|
|
147
|
+
if (m(e))
|
|
131
148
|
this.err = "", this.timeWindowFormError.emit({
|
|
132
149
|
key: this.el.id,
|
|
133
150
|
message: ""
|
|
134
151
|
});
|
|
135
152
|
else {
|
|
136
|
-
const
|
|
137
|
-
this.err =
|
|
153
|
+
const s = c.t("nylasTimeWindowPicker.errors.invalid");
|
|
154
|
+
this.err = s, this.timeWindowFormError.emit({
|
|
138
155
|
key: this.el.id,
|
|
139
|
-
message:
|
|
156
|
+
message: s
|
|
140
157
|
});
|
|
141
158
|
}
|
|
142
159
|
this.err || this.timeChange.emit({
|
|
@@ -146,15 +163,15 @@ const S = class {
|
|
|
146
163
|
}
|
|
147
164
|
handleTimeAutocomplete(t) {
|
|
148
165
|
var a;
|
|
149
|
-
const e = (a = t.target) == null ? void 0 : a.value,
|
|
150
|
-
if (!
|
|
151
|
-
this.err =
|
|
166
|
+
const e = (a = t.target) == null ? void 0 : a.value, i = this.language !== f.en ? x(e) : e, s = c.t("nylasTimeWindowPicker.errors.invalid");
|
|
167
|
+
if (!m(i)) {
|
|
168
|
+
this.err = s, this.timeWindowFormError.emit({
|
|
152
169
|
key: this.el.id,
|
|
153
|
-
message:
|
|
170
|
+
message: s
|
|
154
171
|
});
|
|
155
172
|
return;
|
|
156
173
|
}
|
|
157
|
-
if (
|
|
174
|
+
if (i === "") {
|
|
158
175
|
const r = u().format("hh:mma");
|
|
159
176
|
this.timeChange.emit({
|
|
160
177
|
key: this.el.id,
|
|
@@ -162,8 +179,8 @@ const S = class {
|
|
|
162
179
|
});
|
|
163
180
|
return;
|
|
164
181
|
}
|
|
165
|
-
if (!p(
|
|
166
|
-
const r =
|
|
182
|
+
if (!p(i)) {
|
|
183
|
+
const r = h(i);
|
|
167
184
|
this.timeChange.emit({
|
|
168
185
|
key: this.el.id,
|
|
169
186
|
value: r
|
|
@@ -172,20 +189,20 @@ const S = class {
|
|
|
172
189
|
}
|
|
173
190
|
this.timeChange.emit({
|
|
174
191
|
key: this.el.id,
|
|
175
|
-
value:
|
|
192
|
+
value: i
|
|
176
193
|
});
|
|
177
194
|
}
|
|
178
195
|
handleOnInput(t) {
|
|
179
|
-
var
|
|
180
|
-
const e = (
|
|
181
|
-
if (
|
|
196
|
+
var i;
|
|
197
|
+
const e = (i = t.target) == null ? void 0 : i.value;
|
|
198
|
+
if (m(e)) {
|
|
182
199
|
if (e === "") {
|
|
183
|
-
const
|
|
200
|
+
const s = u().format("hh:mma"), a = this.times.findIndex((r) => r.value === s);
|
|
184
201
|
a > -1 && this.scrollToViewWithinParent(a);
|
|
185
202
|
return;
|
|
186
203
|
}
|
|
187
204
|
if (!p(e)) {
|
|
188
|
-
const
|
|
205
|
+
const s = h(e), a = this.times.findIndex((r) => r.value === s);
|
|
189
206
|
a > -1 && this.scrollToViewWithinParent(a);
|
|
190
207
|
return;
|
|
191
208
|
}
|
|
@@ -195,10 +212,10 @@ const S = class {
|
|
|
195
212
|
const t = [];
|
|
196
213
|
let e = l().set("hour", 0).set("minute", 0).set("second", 0);
|
|
197
214
|
this.minimumStartTime && (e = l(this.minimumStartTime, "hh:mma"));
|
|
198
|
-
const
|
|
199
|
-
for (let a = 0; a <
|
|
215
|
+
const i = e.endOf("day").diff(e, "minutes"), s = Math.round(i / 15);
|
|
216
|
+
for (let a = 0; a < s + 1; a++) {
|
|
200
217
|
const r = e.add(a * 15, "minute");
|
|
201
|
-
if (a ==
|
|
218
|
+
if (a == s && r.format("hh:mma").includes("am"))
|
|
202
219
|
break;
|
|
203
220
|
t.push({ id: a, value: r.format("hh:mma") });
|
|
204
221
|
}
|
|
@@ -213,63 +230,63 @@ const S = class {
|
|
|
213
230
|
if (this.ariaActivedescendant === "")
|
|
214
231
|
this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
|
|
215
232
|
else {
|
|
216
|
-
const e = this.times.findIndex((
|
|
217
|
-
this.ariaActivedescendant = this.times[
|
|
233
|
+
const e = this.times.findIndex((s) => s.id.toString() === this.ariaActivedescendant), i = e + 1 < this.times.length ? e + 1 : 0;
|
|
234
|
+
this.ariaActivedescendant = this.times[i].id.toString(), this.focusOption(i);
|
|
218
235
|
}
|
|
219
236
|
} else if (t.key === "ArrowUp")
|
|
220
237
|
if (t.preventDefault(), this.ariaActivedescendant === "")
|
|
221
238
|
this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
|
|
222
239
|
else {
|
|
223
|
-
const e = this.times.findIndex((
|
|
224
|
-
this.ariaActivedescendant = this.times[
|
|
240
|
+
const e = this.times.findIndex((s) => s.id.toString() === this.ariaActivedescendant), i = e - 1 >= 0 ? e - 1 : this.times.length - 1;
|
|
241
|
+
this.ariaActivedescendant = this.times[i].id.toString(), this.focusOption(i);
|
|
225
242
|
}
|
|
226
243
|
else
|
|
227
244
|
t.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
228
245
|
}
|
|
229
246
|
handleListboxKeydown(t) {
|
|
230
|
-
const e = this.times,
|
|
247
|
+
const e = this.times, i = e.findIndex((s) => s.id.toString() === this.ariaActivedescendant);
|
|
231
248
|
if (t.key === "ArrowDown" || t.key === "Tab" && !t.shiftKey) {
|
|
232
249
|
t.preventDefault();
|
|
233
|
-
const
|
|
234
|
-
this.ariaActivedescendant = e[
|
|
250
|
+
const s = i + 1 < e.length ? i + 1 : 0;
|
|
251
|
+
this.ariaActivedescendant = e[s].id.toString(), this.focusOption(s);
|
|
235
252
|
} else if (t.key === "ArrowUp" || t.key === "Tab" && t.shiftKey) {
|
|
236
253
|
t.preventDefault();
|
|
237
|
-
const
|
|
238
|
-
this.ariaActivedescendant = e[
|
|
254
|
+
const s = i - 1 >= 0 ? i - 1 : e.length - 1;
|
|
255
|
+
this.ariaActivedescendant = e[s].id.toString(), this.focusOption(s);
|
|
239
256
|
} else if (t.key === "Enter") {
|
|
240
257
|
if (t.preventDefault(), this.ariaActivedescendant) {
|
|
241
|
-
const
|
|
242
|
-
this.handleTimeChange(t,
|
|
258
|
+
const s = e[i];
|
|
259
|
+
this.handleTimeChange(t, s.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
|
|
243
260
|
}
|
|
244
261
|
} else
|
|
245
262
|
t.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
246
263
|
}
|
|
247
264
|
scrollToViewWithinParent(t) {
|
|
248
265
|
var y;
|
|
249
|
-
const e = this.times[t],
|
|
266
|
+
const e = this.times[t], i = (y = this.el.shadowRoot) == null ? void 0 : y.getElementById(e.id.toString()), s = this.timeMenu;
|
|
250
267
|
this.ariaActivedescendant = e.id.toString();
|
|
251
|
-
const a =
|
|
252
|
-
a.top < r.top ?
|
|
268
|
+
const a = i.getBoundingClientRect(), r = s.getBoundingClientRect();
|
|
269
|
+
a.top < r.top ? s.scrollTop -= r.top - a.top : a.bottom > r.bottom && (s.scrollTop += a.bottom - r.bottom), a.left < r.left ? s.scrollLeft -= r.left - a.left : a.right > r.right && (s.scrollLeft += a.right - r.right);
|
|
253
270
|
}
|
|
254
271
|
focusOption(t) {
|
|
255
272
|
var a;
|
|
256
273
|
const e = this.times[t];
|
|
257
274
|
if (!e)
|
|
258
275
|
return;
|
|
259
|
-
const
|
|
260
|
-
|
|
276
|
+
const i = e.id.toString(), s = (a = this.el.shadowRoot) == null ? void 0 : a.getElementById(i);
|
|
277
|
+
s && (s.focus(), s.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
261
278
|
}
|
|
262
279
|
render() {
|
|
263
|
-
const t = this.language !==
|
|
264
|
-
return n(w, { key: "
|
|
280
|
+
const t = this.language !== f.en;
|
|
281
|
+
return n(w, { key: "748ab1dcf12c2e1284ca11883dcaade689d3150f" }, n("div", { key: "77369574660ea9e48f8ed77c4b4cc51cf328690a", class: "time-picker", part: "time-picker" }, n("input", { key: "09fd3119ae7763a492068860d9a20ed06e1bf0ac", type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
265
282
|
"time-input": !0,
|
|
266
283
|
error: !!this.err || this.hasError
|
|
267
284
|
}, ref: (e) => this.timeInput = e, value: t ? b(this.time) : this.time, onClick: () => {
|
|
268
285
|
this.showTimes = !this.showTimes, this.shouldAutoScroll = !0;
|
|
269
286
|
}, "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 && n("div", { class: "invalid-time-icon" }), this.showTimes && n("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, n("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => n("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
|
|
270
287
|
focused: this.ariaActivedescendant === e.id.toString()
|
|
271
|
-
}, onClick: (
|
|
272
|
-
this.handleTimeChange(
|
|
288
|
+
}, onClick: (i) => {
|
|
289
|
+
this.handleTimeChange(i, e.value), this.showTimes = !1, this.timeInput.focus();
|
|
273
290
|
}, role: "option" }, `${t ? b(e.value) : e.value}`)))), !this.showTimes && this.err && n("p", { class: "error", id: "email-error" }, this.err)));
|
|
274
291
|
}
|
|
275
292
|
get el() {
|
|
@@ -278,12 +295,13 @@ const S = class {
|
|
|
278
295
|
static get watchers() {
|
|
279
296
|
return {
|
|
280
297
|
time: ["timeChangedHandler"],
|
|
281
|
-
minimumStartTime: ["minimumStartTimeChangedHandler"]
|
|
298
|
+
minimumStartTime: ["minimumStartTimeChangedHandler"],
|
|
299
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
282
300
|
};
|
|
283
301
|
}
|
|
284
302
|
};
|
|
285
303
|
S.style = D;
|
|
286
304
|
export {
|
|
287
|
-
|
|
305
|
+
F as nylas_date_component,
|
|
288
306
|
S as nylas_time_window_picker
|
|
289
307
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-d8a42c15.cjs"),d=require("./register-component-0aad9e3d-d2f2e543.cjs");require("react");require("react/jsx-runtime");require("react-dom");const b='.sc-nylas-form-card-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}.nylas-form-card.sc-nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header.sc-nylas-form-card{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}',i=b;var u=function(e,l,n,o){var s=arguments.length,r=s<3?l:o===null?o=Object.getOwnPropertyDescriptor(l,n):o,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,l,n,o);else for(var t=e.length-1;t>=0;t--)(c=e[t])&&(r=(s<3?c(r):s>3?c(l,n,r):c(l,n))||r);return s>3&&r&&Object.defineProperty(l,n,r),r},y=function(e,l){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,l)};const f=class{constructor(e){a.registerInstance(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.themeConfig=void 0}themeConfigChangedHandler(e,l){e!==l&&this.applyThemeConfig(e)}connectedCallback(){a.debug("nylas-event-card","connectedCallback")}componentWillLoad(){a.debug("nylas-event-card","componentWillLoad")}componentDidLoad(){a.debug("nylas-event-card","componentDidLoad")}disconnectedCallback(){a.debug("nylas-event-card","disconnectedCallback");const e=["header-title","header-subtitle","content"];a.checkForMissingSlots(e,this.host)}applyThemeConfig(e){if(e)for(const[l,n]of Object.entries(e))this.host.style.setProperty(`${l}`,n)}render(){return a.h(a.Host,{key:"0d0f6136744aedaf66d3bfe00f9bf66d96f5336d"},a.h("div",{key:"eb5d1170925c2dd6655e65c5d3786e58e20a1730",class:"nylas-form-card",part:"nfc"},a.h("div",{key:"61ae5c7304c8fe85e1b80857847adf264dc15f86",class:"nylas-form-card__header",part:"nfc__header"},a.h("slot",{key:"e032d408b48ba463b2418df8ea6ec74c9751e6cd",name:"header-title"}),a.h("slot",{key:"b4c80b7aeee06feeb7feb61ec34e475de0bd89c5",name:"header-subtitle"})),a.h("div",{key:"37ab63f782ee8ceea9cb6d2673facb7a479ff528",class:"nylas-form-card__content"},a.h("slot",{key:"8a9b455a4f6b12ddd2df6144186feea96a11199c",name:"content"}))))}static get formAssociated(){return!0}get host(){return a.getElement(this)}static get watchers(){return{themeConfig:["themeConfigChangedHandler"]}}};u([d.RegisterComponent({name:"nylas-form-card",stateToProps:new Map([["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{},fireRegisterEvent:!0}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],f.prototype,"render",null);f.style=i;exports.nylas_form_card=f;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { r as b, b as t, P as i, h as o, H as m, g as p } from "./index-140eb219.js";
|
|
2
|
+
import { R as u } from "./register-component-0aad9e3d-b395364a.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react/jsx-runtime";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
const g = '.sc-nylas-form-card-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}.nylas-form-card.sc-nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header.sc-nylas-form-card{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}', h = g;
|
|
7
|
+
var C = function(e, a, r, s) {
|
|
8
|
+
var n = arguments.length, l = n < 3 ? a : s === null ? s = Object.getOwnPropertyDescriptor(a, r) : s, c;
|
|
9
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
10
|
+
l = Reflect.decorate(e, a, r, s);
|
|
11
|
+
else
|
|
12
|
+
for (var f = e.length - 1; f >= 0; f--)
|
|
13
|
+
(c = e[f]) && (l = (n < 3 ? c(l) : n > 3 ? c(a, r, l) : c(a, r)) || l);
|
|
14
|
+
return n > 3 && l && Object.defineProperty(a, r, l), l;
|
|
15
|
+
}, y = function(e, a) {
|
|
16
|
+
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
17
|
+
return Reflect.metadata(e, a);
|
|
18
|
+
};
|
|
19
|
+
const d = class {
|
|
20
|
+
constructor(e) {
|
|
21
|
+
b(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals), this.themeConfig = void 0;
|
|
22
|
+
}
|
|
23
|
+
themeConfigChangedHandler(e, a) {
|
|
24
|
+
e !== a && this.applyThemeConfig(e);
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
t("nylas-event-card", "connectedCallback");
|
|
28
|
+
}
|
|
29
|
+
componentWillLoad() {
|
|
30
|
+
t("nylas-event-card", "componentWillLoad");
|
|
31
|
+
}
|
|
32
|
+
componentDidLoad() {
|
|
33
|
+
t("nylas-event-card", "componentDidLoad");
|
|
34
|
+
}
|
|
35
|
+
disconnectedCallback() {
|
|
36
|
+
t("nylas-event-card", "disconnectedCallback"), i(["header-title", "header-subtitle", "content"], this.host);
|
|
37
|
+
}
|
|
38
|
+
applyThemeConfig(e) {
|
|
39
|
+
if (e)
|
|
40
|
+
for (const [a, r] of Object.entries(e))
|
|
41
|
+
this.host.style.setProperty(`${a}`, r);
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return o(m, { key: "0d0f6136744aedaf66d3bfe00f9bf66d96f5336d" }, o("div", { key: "eb5d1170925c2dd6655e65c5d3786e58e20a1730", class: "nylas-form-card", part: "nfc" }, o("div", { key: "61ae5c7304c8fe85e1b80857847adf264dc15f86", class: "nylas-form-card__header", part: "nfc__header" }, o("slot", { key: "e032d408b48ba463b2418df8ea6ec74c9751e6cd", name: "header-title" }), o("slot", { key: "b4c80b7aeee06feeb7feb61ec34e475de0bd89c5", name: "header-subtitle" })), o("div", { key: "37ab63f782ee8ceea9cb6d2673facb7a479ff528", class: "nylas-form-card__content" }, o("slot", { key: "8a9b455a4f6b12ddd2df6144186feea96a11199c", name: "content" }))));
|
|
45
|
+
}
|
|
46
|
+
static get formAssociated() {
|
|
47
|
+
return !0;
|
|
48
|
+
}
|
|
49
|
+
get host() {
|
|
50
|
+
return p(this);
|
|
51
|
+
}
|
|
52
|
+
static get watchers() {
|
|
53
|
+
return {
|
|
54
|
+
themeConfig: ["themeConfigChangedHandler"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
C([
|
|
59
|
+
u({
|
|
60
|
+
name: "nylas-form-card",
|
|
61
|
+
stateToProps: /* @__PURE__ */ new Map([["schedulerConfig.themeConfig", "themeConfig"]]),
|
|
62
|
+
eventToProps: {},
|
|
63
|
+
fireRegisterEvent: !0
|
|
64
|
+
}),
|
|
65
|
+
y("design:type", Function),
|
|
66
|
+
y("design:paramtypes", []),
|
|
67
|
+
y("design:returntype", void 0)
|
|
68
|
+
], d.prototype, "render", null);
|
|
69
|
+
d.style = h;
|
|
70
|
+
export {
|
|
71
|
+
d as nylas_form_card
|
|
72
|
+
};
|
package/dist/{nylas-notification_2.entry-4638126b.cjs → nylas-notification_2.entry-448c2cb8.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-d8a42c15.cjs");require("react");require("react/jsx-runtime");require("react-dom");const l=':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block;word-break:break-word}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}',r=l,e=class{constructor(o){n.registerInstance(this,o),this.ttl=5e3,this.allowedCategories=["component","api","validation","invalid_session"],this.notifications=[]}onError(o){n.debug(`[nylas-notification] Error: ${o.detail.notification.title}`),this.handleNotification(o)}onWarning(o){n.debug(`[nylas-notification] Warning: ${o.detail.notification.title}`),this.handleNotification(o)}onInfo(o){n.debug(`[nylas-notification] Info: ${o.detail.notification.title}`),this.handleNotification(o)}onSuccess(o){n.debug(`[nylas-notification] Success: ${o.detail.notification.title}`),this.handleNotification(o)}onDismissNotification(o){this.dismissNotification(o.detail.id)}isChildOf(o){let i=this.host.parentNode;for(;i;){if(i===o)return!0;i instanceof ShadowRoot?i=i.host:i=i.parentNode}return!1}handleNotification(o){const i=o.detail.host;if(o.defaultPrevented){n.debug("[nylas-notification] Event default prevented");return}if(i&&!this.isChildOf(i)){n.debug("[nylas-notification] Host not a parent");return}if(this.ttl===0){n.debug("[nylas-notification] TTL is 0");return}if(this.allowedCategories.length>0&&!this.allowedCategories.includes(o.detail.notification.category)){n.debug("[nylas-notification] Category not allowed");return}if(this.notifications.find(a=>a.id===o.detail.notification.id)){n.debug("[nylas-notification] Notification already exists");return}if(this.notifications=[...this.notifications,{...o.detail.notification}],o.detail.notification.ttl!=="none"){const a=o.detail.notification.ttl?o.detail.notification.ttl:this.ttl;window.setTimeout(()=>{this.notifications=this.notifications.filter(t=>t.id!==o.detail.notification.id)},a)}}dismissNotification(o){this.notifications=this.notifications.filter(i=>i.id!==o)}render(){return n.h(n.Host,{key:"f0e6fb311ba12bebf3970afb5850a7995c5bcd83"},n.h(n.Fragment,{key:"2f9bd098337a72908c4c292e03d1ddafa54f7c61"},this.notifications.map(o=>n.h("div",{class:`notif ${o.type}`,key:o.id},n.h("div",{class:"content"},n.h("span",{class:`icon ${o.type}`},(o.type==="error"||o.type==="warning")&&n.h("warning-icon",null)),n.h("span",{class:"message"},n.h("span",{class:"title"},o.title),o.description&&n.h("span",{class:"description"},o.description))),n.h("button",{class:"dismiss-btn",onClick:()=>this.dismissNotification(o.id)},n.h("close-icon",null)))),n.h("slot",{key:"575b3ecb1b22b23c84c75a6900215795a5695fff"})))}get host(){return n.getElement(this)}};e.style=r;const c=".sc-warning-icon-h{display:flex}",f=c,s=class{constructor(o){n.registerInstance(this,o),this.width="16",this.height="16"}render(){return n.h("svg",{key:"7934b2980705106a978e817555c1065704e626c7",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.h("path",{key:"3942fd2b948a46bd0fb8c7322b6b0c7db439b66e",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};s.style=f;exports.nylas_notification=e;exports.warning_icon=s;
|