@nylas/react 2.0.0 → 2.0.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.
Files changed (169) hide show
  1. package/dist/abstract-provider-efe136bd-2041bdce.js +187 -0
  2. package/dist/abstract-provider-efe136bd-b4663c02.cjs +1 -0
  3. package/dist/add-circle-icon_2.entry-5204c48a.cjs +1 -0
  4. package/dist/add-circle-icon_2.entry-ea1692a4.js +26 -0
  5. package/dist/archive-icon.entry-0b585dff.js +16 -0
  6. package/dist/archive-icon.entry-c2c66bca.cjs +1 -0
  7. package/dist/{arrow-icon.entry-9414299f.js → arrow-icon.entry-2e61394e.js} +5 -5
  8. package/dist/arrow-icon.entry-9d471162.cjs +1 -0
  9. package/dist/{bold-icon.entry-c781e9c1.cjs → bold-icon.entry-5c37622f.cjs} +1 -1
  10. package/dist/{bold-icon.entry-b72aed9f.js → bold-icon.entry-8ef1b653.js} +2 -2
  11. package/dist/{button-component_2.entry-73f76545.cjs → button-component_2.entry-8335ee1e.cjs} +1 -1
  12. package/dist/{button-component_2.entry-36e49459.js → button-component_2.entry-c906230f.js} +9 -9
  13. package/dist/calendar-agenda-fill-icon_36.entry-59c0a997.cjs +6 -0
  14. package/dist/{calendar-agenda-fill-icon_36.entry-efa7ad26.js → calendar-agenda-fill-icon_36.entry-5f184433.js} +900 -881
  15. package/dist/{calendar-cancel-icon.entry-01c388eb.cjs → calendar-cancel-icon.entry-65a4a34e.cjs} +1 -1
  16. package/dist/{calendar-cancel-icon.entry-0f739a8a.js → calendar-cancel-icon.entry-dd6ac4db.js} +5 -5
  17. package/dist/{calendar-check-icon_2.entry-5febbadf.cjs → calendar-check-icon_2.entry-ded15038.cjs} +1 -1
  18. package/dist/{calendar-check-icon_2.entry-dfb0036d.js → calendar-check-icon_2.entry-f9b50bb8.js} +3 -3
  19. package/dist/{calendar-icon.entry-f197396d.js → calendar-icon.entry-a2a1ddbc.js} +2 -2
  20. package/dist/{calendar-icon.entry-9743e0b7.cjs → calendar-icon.entry-ca512dd6.cjs} +1 -1
  21. package/dist/checkbox-component_2.entry-d6128246.js +115 -0
  22. package/dist/checkbox-component_2.entry-d79b5d1d.cjs +1 -0
  23. package/dist/checkbox-group_4.entry-2946c7ef.cjs +28 -0
  24. package/dist/{nylas-event-calendar_3.entry-9abd46c2.js → checkbox-group_4.entry-e5145451.js} +1038 -923
  25. package/dist/{checkmark-icon_15.entry-5c09cff5.js → checkmark-icon_15.entry-6e92e93e.js} +19 -19
  26. package/dist/{checkmark-icon_15.entry-35dd97b7.cjs → checkmark-icon_15.entry-a75a1825.cjs} +2 -2
  27. package/dist/{chevron-icon_3.entry-4a72f211.js → chevron-icon_3.entry-6eaa3513.js} +16 -16
  28. package/dist/{chevron-icon_3.entry-e0608b7c.cjs → chevron-icon_3.entry-9193a885.cjs} +1 -1
  29. package/dist/{clock-icon_4.entry-0afe79c2.js → clock-icon_4.entry-2c93270e.js} +8 -8
  30. package/dist/{clock-icon_4.entry-202ce025.cjs → clock-icon_4.entry-ae2272f4.cjs} +1 -1
  31. package/dist/{customParseFormat-d1de5ed0-c0ef002d.js → customParseFormat-edc38d83-b3722499.js} +1 -1
  32. package/dist/{customParseFormat-d1de5ed0-65a0bba3.cjs → customParseFormat-edc38d83-fa9c77d9.cjs} +1 -1
  33. package/dist/{delete-icon.entry-580bfcc9.js → delete-icon.entry-6684eba6.js} +2 -2
  34. package/dist/{delete-icon.entry-762ac892.cjs → delete-icon.entry-b9e4f2c7.cjs} +1 -1
  35. package/dist/{document-refresh-icon.entry-4e0f0c61.cjs → document-refresh-icon.entry-7afe6163.cjs} +1 -1
  36. package/dist/document-refresh-icon.entry-fba9f60b.js +16 -0
  37. package/dist/{feedbackSync-172f942c-42124493.js → feedbackSync-e4378c0b-23289195.js} +811 -798
  38. package/dist/{feedbackSync-172f942c-62f72bd2.cjs → feedbackSync-e4378c0b-7876d067.cjs} +26 -26
  39. package/dist/{folder-icon.entry-54c3cc66.js → folder-icon.entry-430c6b47.js} +4 -4
  40. package/dist/{folder-icon.entry-2694e253.cjs → folder-icon.entry-b1632bf3.cjs} +1 -1
  41. package/dist/{forward-icon.entry-5e540f05.js → forward-icon.entry-5e53da76.js} +2 -2
  42. package/dist/{forward-icon.entry-f07102d8.cjs → forward-icon.entry-7626dcca.cjs} +1 -1
  43. package/dist/{globe-icon_2.entry-aaceb196.js → globe-icon_2.entry-646eae41.js} +20 -20
  44. package/dist/{globe-icon_2.entry-14a4c168.cjs → globe-icon_2.entry-bbb0a6ce.cjs} +1 -1
  45. package/dist/{google-logo-icon_6.entry-00d40db2.js → google-logo-icon_6.entry-5951a546.js} +682 -488
  46. package/dist/google-logo-icon_6.entry-e39dd9cb.cjs +2 -0
  47. package/dist/{google-meet-icon_5.entry-f1f05903.js → google-meet-icon_5.entry-a54c83da.js} +14 -14
  48. package/dist/{google-meet-icon_5.entry-6c20e149.cjs → google-meet-icon_5.entry-c13e0738.cjs} +1 -1
  49. package/dist/inbox-icon.entry-7bee82b3.js +16 -0
  50. package/dist/inbox-icon.entry-911b047a.cjs +1 -0
  51. package/dist/index-71f61ea9.js +24544 -0
  52. package/dist/index-f769bc2a.cjs +118 -0
  53. package/dist/index.d.ts +1 -4
  54. package/dist/index.es-6a9d55cf-122c27e0.js +2724 -0
  55. package/dist/index.es-6a9d55cf-458ba0e0.cjs +7 -0
  56. package/dist/{info-icon_2.entry-bbcefb9a.cjs → info-icon_2.entry-471b836b.cjs} +1 -1
  57. package/dist/{info-icon_2.entry-b3b313ab.js → info-icon_2.entry-6ff2f004.js} +3 -3
  58. package/dist/{input-component.entry-401b9ba5.js → input-component.entry-781b584c.js} +12 -12
  59. package/dist/{input-component.entry-ec8e8e7c.cjs → input-component.entry-b6a9b4cb.cjs} +1 -1
  60. package/dist/{input-dropdown_2.entry-c37f392c.js → input-dropdown_2.entry-1feebcba.js} +3 -3
  61. package/dist/{input-dropdown_2.entry-8cb11601.cjs → input-dropdown_2.entry-c71d14ff.cjs} +1 -1
  62. package/dist/{italic-icon.entry-6675558a.cjs → italic-icon.entry-16debde5.cjs} +1 -1
  63. package/dist/italic-icon.entry-9ef7f4a2.js +16 -0
  64. package/dist/{elements → lib/elements}/index.d.ts +1 -1
  65. package/dist/lib/index.d.ts +5 -0
  66. package/dist/lib/main.d.ts +0 -0
  67. package/dist/lib/notetaker/CalendarSync/CalendarSync.d.ts +37 -0
  68. package/dist/lib/notetaker/CalendarSync/CalendarSync.spec.d.ts +0 -0
  69. package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +31 -0
  70. package/dist/lib/notetaker/SendNotetaker/SendNotetaker.spec.d.ts +1 -0
  71. package/dist/lib/notetaker/Transcript/Transcript.d.ts +23 -0
  72. package/dist/lib/notetaker/Transcript/Transcript.spec.d.ts +0 -0
  73. package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +22 -0
  74. package/dist/lib/notetaker/VideoPlayer/VideoPlayer.spec.d.ts +1 -0
  75. package/dist/lib/notetaker/index.d.ts +9 -0
  76. package/dist/lib/notetaker/lib/constants.d.ts +12 -0
  77. package/dist/lib/notetaker/lib/http-client.d.ts +2 -0
  78. package/dist/lib/notetaker/lib/primitives.d.ts +66 -0
  79. package/dist/lib/notetaker/lib/store.d.ts +7 -0
  80. package/dist/lib/notetaker/types.d.ts +42 -0
  81. package/dist/multi-select-dropdown.entry-0a6f9417.cjs +1 -0
  82. package/dist/multi-select-dropdown.entry-1b27c746.js +121 -0
  83. package/dist/nylas-booked-event-card_11.entry-74fba802.cjs +1 -0
  84. package/dist/{nylas-booked-event-card_12.entry-e7464ae7.js → nylas-booked-event-card_11.entry-802671ee.js} +469 -534
  85. package/dist/{nylas-form-card.entry-cbb00fba.cjs → nylas-form-card.entry-59a837c9.cjs} +1 -1
  86. package/dist/{nylas-form-card.entry-a3186807.js → nylas-form-card.entry-7da9a312.js} +3 -3
  87. package/dist/nylas-notification_2.entry-8f8bad34.cjs +1 -0
  88. package/dist/nylas-notification_2.entry-b16bb805.js +85 -0
  89. package/dist/{nylas-scheduler-editor.entry-7b188a38.js → nylas-scheduler-editor.entry-cbe3e1e3.js} +160 -136
  90. package/dist/nylas-scheduler-editor.entry-e33e11fb.cjs +2 -0
  91. package/dist/nylas-scheduling.entry-4223e50b.cjs +1 -0
  92. package/dist/{nylas-scheduling.entry-e9929b03.js → nylas-scheduling.entry-6fb094a8.js} +295 -295
  93. package/dist/{person-icon.entry-d2856f08.js → person-icon.entry-6232e6fd.js} +7 -7
  94. package/dist/{person-icon.entry-8998fdb8.cjs → person-icon.entry-beb26b48.cjs} +1 -1
  95. package/dist/play-icon.entry-16a1c1ac.js +16 -0
  96. package/dist/{play-icon.entry-99eb969b.cjs → play-icon.entry-9060d0d8.cjs} +1 -1
  97. package/dist/{radio-button-group.entry-bc3b12fd.js → radio-button-group.entry-5a3728cd.js} +2 -2
  98. package/dist/{radio-button-group.entry-d66edd04.cjs → radio-button-group.entry-6935c39d.cjs} +1 -1
  99. package/dist/react.cjs +1 -1
  100. package/dist/react.js +135 -126
  101. package/dist/{refresh-icon.entry-99d1982d.cjs → refresh-icon.entry-2411b2e1.cjs} +1 -1
  102. package/dist/{refresh-icon.entry-d6df8b1c.js → refresh-icon.entry-4f56e72b.js} +2 -2
  103. package/dist/{register-component-62d792d4-448b6a43.js → register-component-a1c3d7b4-774feacc.js} +1 -1
  104. package/dist/{register-component-62d792d4-c6e7d129.cjs → register-component-a1c3d7b4-97d7a6f5.cjs} +1 -1
  105. package/dist/{reply-all-icon.entry-d7c44139.cjs → reply-all-icon.entry-b4b6926b.cjs} +1 -1
  106. package/dist/{reply-all-icon.entry-7ebf01a0.js → reply-all-icon.entry-b4b917ec.js} +2 -2
  107. package/dist/{reply-icon.entry-d1622d85.js → reply-icon.entry-24f6f4c6.js} +5 -5
  108. package/dist/{reply-icon.entry-058c00e8.cjs → reply-icon.entry-454545ed.cjs} +1 -1
  109. package/dist/sent-icon.entry-d9a79336.cjs +1 -0
  110. package/dist/sent-icon.entry-fa59ce85.js +16 -0
  111. package/dist/spam-icon.entry-da39987e.cjs +1 -0
  112. package/dist/spam-icon.entry-fb18a08b.js +16 -0
  113. package/dist/{star-icon.entry-98b80645.js → star-icon.entry-406472c1.js} +4 -4
  114. package/dist/{star-icon.entry-4db13fdb.cjs → star-icon.entry-833f35a7.cjs} +1 -1
  115. package/dist/{stop-icon.entry-0290fd30.js → stop-icon.entry-1b6ae838.js} +2 -2
  116. package/dist/{stop-icon.entry-9d7b53fd.cjs → stop-icon.entry-3258db59.cjs} +1 -1
  117. package/dist/style.css +1 -0
  118. package/dist/test/vitest.setup.d.ts +0 -0
  119. package/dist/{textarea-component.entry-9b474ab5.cjs → textarea-component.entry-0ae18897.cjs} +1 -1
  120. package/dist/{textarea-component.entry-a62c257b.js → textarea-component.entry-569a281e.js} +2 -2
  121. package/dist/{toggle-switch.entry-5dbfcd48.cjs → toggle-switch.entry-60d75f16.cjs} +1 -1
  122. package/dist/{toggle-switch.entry-e423b793.js → toggle-switch.entry-dc3f796b.js} +4 -4
  123. package/dist/{translate-icon.entry-60c55a2e.js → translate-icon.entry-297cf20f.js} +4 -4
  124. package/dist/{translate-icon.entry-f82fa6fc.cjs → translate-icon.entry-c183ecb5.cjs} +1 -1
  125. package/dist/trash-fill-icon.entry-3d8a2e5e.js +16 -0
  126. package/dist/trash-fill-icon.entry-94d4f66c.cjs +1 -0
  127. package/dist/{underline-icon.entry-40028bc6.js → underline-icon.entry-4a9105c7.js} +2 -2
  128. package/dist/{underline-icon.entry-0807a43d.cjs → underline-icon.entry-50d1e766.cjs} +1 -1
  129. package/package.json +41 -17
  130. package/dist/add-circle-icon_2.entry-8a1c55bc.cjs +0 -1
  131. package/dist/add-circle-icon_2.entry-b4bbcfee.js +0 -26
  132. package/dist/archive-icon.entry-a2492cf3.js +0 -16
  133. package/dist/archive-icon.entry-e48d2356.cjs +0 -1
  134. package/dist/arrow-icon.entry-b1ecb2aa.cjs +0 -1
  135. package/dist/calendar-agenda-fill-icon_36.entry-e9b92e0e.cjs +0 -6
  136. package/dist/checkbox-component.entry-1aa5782f.cjs +0 -1
  137. package/dist/checkbox-component.entry-72a6aa72.js +0 -43
  138. package/dist/document-refresh-icon.entry-e500b4e3.js +0 -16
  139. package/dist/google-logo-icon_6.entry-fa76ffe3.cjs +0 -2
  140. package/dist/inbox-icon.entry-9a4628f2.cjs +0 -1
  141. package/dist/inbox-icon.entry-aa78ba8c.js +0 -16
  142. package/dist/index-1e75512f.cjs +0 -57
  143. package/dist/index-e8380973.js +0 -18492
  144. package/dist/index.es-fc8588de-034ead51.cjs +0 -7
  145. package/dist/index.es-fc8588de-c943eef6.js +0 -2908
  146. package/dist/italic-icon.entry-0e85d0d9.js +0 -16
  147. package/dist/multi-select-dropdown_2.entry-3eecf18a.js +0 -193
  148. package/dist/multi-select-dropdown_2.entry-e37c501d.cjs +0 -1
  149. package/dist/nylas-booked-event-card_12.entry-fddc9ab8.cjs +0 -1
  150. package/dist/nylas-event-calendar_3.entry-e6669bbf.cjs +0 -11
  151. package/dist/nylas-scheduler-editor.entry-5c92901a.cjs +0 -2
  152. package/dist/nylas-scheduling.entry-970240f6.cjs +0 -1
  153. package/dist/play-icon.entry-f949a80f.js +0 -16
  154. package/dist/sent-icon.entry-6c604512.cjs +0 -1
  155. package/dist/sent-icon.entry-fe12bc2f.js +0 -16
  156. package/dist/spam-icon.entry-45e5292e.cjs +0 -1
  157. package/dist/spam-icon.entry-b97c7709.js +0 -16
  158. package/dist/trash-fill-icon.entry-095caae3.cjs +0 -1
  159. package/dist/trash-fill-icon.entry-825055fd.js +0 -16
  160. package/dist/warning-icon.entry-24e37759.js +0 -16
  161. package/dist/warning-icon.entry-fce7c14f.cjs +0 -1
  162. /package/dist/{elements → lib/elements}/react-component-lib/createComponent.d.ts +0 -0
  163. /package/dist/{elements → lib/elements}/react-component-lib/createOverlayComponent.d.ts +0 -0
  164. /package/dist/{elements → lib/elements}/react-component-lib/index.d.ts +0 -0
  165. /package/dist/{elements → lib/elements}/react-component-lib/interfaces.d.ts +0 -0
  166. /package/dist/{elements → lib/elements}/react-component-lib/utils/attachProps.d.ts +0 -0
  167. /package/dist/{elements → lib/elements}/react-component-lib/utils/case.d.ts +0 -0
  168. /package/dist/{elements → lib/elements}/react-component-lib/utils/dev.d.ts +0 -0
  169. /package/dist/{elements → lib/elements}/react-component-lib/utils/index.d.ts +0 -0
@@ -1,13 +1,13 @@
1
- import { r as e, h as t } from "./index-e8380973.js";
1
+ import { r as o, h as t } from "./index-71f61ea9.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "react-dom";
5
5
  const s = ".sc-folder-icon-h{display:flex}", i = s, r = class {
6
- constructor(o) {
7
- e(this, o), this.width = "15", this.height = "15";
6
+ constructor(e) {
7
+ o(this, e), this.width = "15", this.height = "15";
8
8
  }
9
9
  render() {
10
- return t("svg", { key: "ce969ff284482ca25508e2740184443a7a0dfa5c", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "f6f64b1ada3ad9d1bd58db00d9e5b80a3a022e3b", d: "M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z", stroke: "auto", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }));
10
+ return t("svg", { key: "deefae918ad34ee0e41d6fd63c0711f716a33635", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "7371c35e2969e293b7b68ab0d0d3b80563053820", d: "M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z", stroke: "auto", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }));
11
11
  }
12
12
  };
13
13
  r.style = i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-1e75512f.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-folder-icon-h{display:flex}",o=i,t=class{constructor(r){e.registerInstance(this,r),this.width="15",this.height="15"}render(){return e.h("svg",{key:"ce969ff284482ca25508e2740184443a7a0dfa5c",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f6f64b1ada3ad9d1bd58db00d9e5b80a3a022e3b",d:"M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z",stroke:"auto","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.folder_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-f769bc2a.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-folder-icon-h{display:flex}",o=i,t=class{constructor(r){e.registerInstance(this,r),this.width="15",this.height="15"}render(){return e.h("svg",{key:"deefae918ad34ee0e41d6fd63c0711f716a33635",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"7371c35e2969e293b7b68ab0d0d3b80563053820",d:"M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z",stroke:"auto","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.folder_icon=t;
@@ -1,4 +1,4 @@
1
- import { r as o, h as t } from "./index-e8380973.js";
1
+ import { r as o, h as t } from "./index-71f61ea9.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "react-dom";
@@ -7,7 +7,7 @@ const e = ".sc-forward-icon-h{display:flex}", i = e, s = class {
7
7
  o(this, r), this.width = "15", this.height = "15";
8
8
  }
9
9
  render() {
10
- return t("svg", { key: "f093412278453f9ea9dc6cf345d6171c134a5398", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "f90de705f64444d7a2ad7fe7835a3e9af196a902", d: "m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z", "fill-rule": "evenodd" }));
10
+ return t("svg", { key: "3afe5502c4af5a72e73c7303c3637de6f85ca005", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "a20424bd623791321c5d46e0377cb8823cc16d6f", d: "m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z", "fill-rule": "evenodd" }));
11
11
  }
12
12
  };
13
13
  s.style = i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-1e75512f.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-forward-icon-h{display:flex}",s=i,t=class{constructor(r){e.registerInstance(this,r),this.width="15",this.height="15"}render(){return e.h("svg",{key:"f093412278453f9ea9dc6cf345d6171c134a5398",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f90de705f64444d7a2ad7fe7835a3e9af196a902",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};t.style=s;exports.forward_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-f769bc2a.cjs");require("react");require("react/jsx-runtime");require("react-dom");const i=".sc-forward-icon-h{display:flex}",c=i,t=class{constructor(r){e.registerInstance(this,r),this.width="15",this.height="15"}render(){return e.h("svg",{key:"3afe5502c4af5a72e73c7303c3637de6f85ca005",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"a20424bd623791321c5d46e0377cb8823cc16d6f",d:"m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z","fill-rule":"evenodd"}))}};t.style=c;exports.forward_icon=t;
@@ -1,15 +1,15 @@
1
- import { r as b, h as a, d as o, a as f, i as l, W as m, X as d, L as g, Y as u, Z as p, M as y, H as x, g as w } from "./index-e8380973.js";
1
+ import { r as g, h as n, d as o, a as f, i as l, W as m, X as d, L as b, Y as u, Z as p, M as y, H as x, g as w } from "./index-71f61ea9.js";
2
2
  import { L as c } from "./constants-f51538ef-e0a5f026.js";
3
- import { c as v } from "./customParseFormat-d1de5ed0-c0ef002d.js";
3
+ import { c as v } from "./customParseFormat-edc38d83-b3722499.js";
4
4
  import "react";
5
5
  import "react/jsx-runtime";
6
6
  import "react-dom";
7
7
  const k = ".sc-globe-icon-h{display:flex}", T = k, C = class {
8
8
  constructor(t) {
9
- b(this, t), this.width = "16", this.height = "16";
9
+ g(this, t), this.width = "16", this.height = "16";
10
10
  }
11
11
  render() {
12
- return a("svg", { key: "339d4881ddf352d7950647b1458a861deab9b496", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, a("path", { key: "fb6ab15c0dacfec98834a4980380a40a4fa9d636", 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" }));
12
+ return n("svg", { key: "ccad86c558abea19fa48bd42e9b3375a7b3567c5", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 16 16", fill: "none" }, n("path", { key: "5b69892e01ba177bc47fe2a78a7dc25a6374dfa7", 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
13
  }
14
14
  };
15
15
  C.style = T;
@@ -17,7 +17,7 @@ const I = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas
17
17
  o.extend(v);
18
18
  const A = class {
19
19
  constructor(t) {
20
- b(this, t), this.timeChange = f(this, "timeChange", 7), this.timeWindowFormError = f(this, "timeWindowFormError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.language = c.en, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
20
+ g(this, t), this.timeChange = f(this, "timeChange", 7), this.timeWindowFormError = f(this, "timeWindowFormError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.language = c.en, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
21
21
  }
22
22
  handleOutsideClick(t) {
23
23
  !t.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
@@ -68,7 +68,7 @@ const A = class {
68
68
  }
69
69
  handleTimeAutocomplete(t) {
70
70
  var r;
71
- const e = (r = t.target) == null ? void 0 : r.value, s = this.language === c.de || this.language === c.fr ? g(e) : e, i = l.t("nylasTimeWindowPicker.errors.invalid");
71
+ const e = (r = t.target) == null ? void 0 : r.value, s = this.language === c.de || this.language === c.fr ? b(e) : e, i = l.t("nylasTimeWindowPicker.errors.invalid");
72
72
  if (!d(s)) {
73
73
  this.err = i, this.timeWindowFormError.emit({
74
74
  key: this.el.id,
@@ -77,18 +77,18 @@ const A = class {
77
77
  return;
78
78
  }
79
79
  if (s === "") {
80
- const n = u().format("hh:mma");
80
+ const a = u().format("hh:mma");
81
81
  this.timeChange.emit({
82
82
  key: this.el.id,
83
- value: n
83
+ value: a
84
84
  });
85
85
  return;
86
86
  }
87
87
  if (!p(s)) {
88
- const n = m(s);
88
+ const a = m(s);
89
89
  this.timeChange.emit({
90
90
  key: this.el.id,
91
- value: n
91
+ value: a
92
92
  });
93
93
  return;
94
94
  }
@@ -102,12 +102,12 @@ const A = class {
102
102
  const e = (s = t.target) == null ? void 0 : s.value;
103
103
  if (d(e)) {
104
104
  if (e === "") {
105
- const i = u().format("hh:mma"), r = this.times.findIndex((n) => n.value === i);
105
+ const i = u().format("hh:mma"), r = this.times.findIndex((a) => a.value === i);
106
106
  r > -1 && this.scrollToViewWithinParent(r);
107
107
  return;
108
108
  }
109
109
  if (!p(e)) {
110
- const i = m(e), r = this.times.findIndex((n) => n.value === i);
110
+ const i = m(e), r = this.times.findIndex((a) => a.value === i);
111
111
  r > -1 && this.scrollToViewWithinParent(r);
112
112
  return;
113
113
  }
@@ -119,10 +119,10 @@ const A = class {
119
119
  this.minimumStartTime && (e = o(this.minimumStartTime, "hh:mma"));
120
120
  const s = e.endOf("day").diff(e, "minutes"), i = Math.round(s / 15);
121
121
  for (let r = 0; r < i + 1; r++) {
122
- const n = e.add(r * 15, "minute");
123
- if (r == i && n.format("hh:mma").includes("am"))
122
+ const a = e.add(r * 15, "minute");
123
+ if (r == i && a.format("hh:mma").includes("am"))
124
124
  break;
125
- t.push({ id: r, value: n.format("hh:mma") });
125
+ t.push({ id: r, value: a.format("hh:mma") });
126
126
  }
127
127
  return t;
128
128
  }
@@ -170,8 +170,8 @@ const A = class {
170
170
  var h;
171
171
  const e = this.times[t], s = (h = this.el.shadowRoot) == null ? void 0 : h.getElementById(e.id.toString()), i = this.timeMenu;
172
172
  this.ariaActivedescendant = e.id.toString();
173
- const r = s.getBoundingClientRect(), n = i.getBoundingClientRect();
174
- r.top < n.top ? i.scrollTop -= n.top - r.top : r.bottom > n.bottom && (i.scrollTop += r.bottom - n.bottom), r.left < n.left ? i.scrollLeft -= n.left - r.left : r.right > n.right && (i.scrollLeft += r.right - n.right);
173
+ const r = s.getBoundingClientRect(), a = i.getBoundingClientRect();
174
+ r.top < a.top ? i.scrollTop -= a.top - r.top : r.bottom > a.bottom && (i.scrollTop += r.bottom - a.bottom), r.left < a.left ? i.scrollLeft -= a.left - r.left : r.right > a.right && (i.scrollLeft += r.right - a.right);
175
175
  }
176
176
  focusOption(t) {
177
177
  var r;
@@ -183,16 +183,16 @@ const A = class {
183
183
  }
184
184
  render() {
185
185
  const t = this.language !== c.en;
186
- return a(x, { key: "895a0c2b4482e42b4bd52ad305cc0e41ea366d47" }, a("div", { key: "969128eb7d4177ecb879bf3b76d96eb004036b47", class: "time-picker", part: "time-picker" }, a("input", { key: "ff7b75f3cda42bdb0e27268b886913887f685c66", type: "text", name: this.name, id: this.name, part: "time-input", class: {
186
+ return n(x, { key: "6ea6b78a73331635750d905f9279907f7599e8c9" }, n("div", { key: "24c41e629fa49378938c3ed7be3875714963a0b2", class: "time-picker", part: "time-picker" }, n("input", { key: "3e05a515acf6472d094bdd75737f7553cd2525db", type: "text", name: this.name, id: this.name, part: "time-input", class: {
187
187
  "time-input": !0,
188
188
  error: !!this.err || this.hasError
189
189
  }, ref: (e) => this.timeInput = e, value: t ? y(this.time) : this.time, onClick: () => {
190
190
  this.showTimes = !this.showTimes, this.shouldAutoScroll = !0;
191
- }, "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 && a("div", { class: "invalid-time-icon" }), this.showTimes && a("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, a("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => a("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
191
+ }, "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: {
192
192
  focused: this.ariaActivedescendant === e.id.toString()
193
193
  }, onClick: (s) => {
194
194
  this.handleTimeChange(s, e.value), this.showTimes = !1, this.timeInput.focus();
195
- }, role: "option" }, `${t ? y(e.value) : e.value}`)))), !this.showTimes && this.err && a("p", { class: "error", id: "email-error" }, this.err)));
195
+ }, role: "option" }, `${t ? y(e.value) : e.value}`)))), !this.showTimes && this.err && n("p", { class: "error", id: "email-error" }, this.err)));
196
196
  }
197
197
  get el() {
198
198
  return w(this);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-1e75512f.cjs"),o=require("./constants-f51538ef-cd2a67c4.cjs"),m=require("./customParseFormat-d1de5ed0-65a0bba3.cjs");require("react");require("react/jsx-runtime");require("react-dom");const h=".sc-globe-icon-h{display:flex}",u=h,c=class{constructor(t){s.registerInstance(this,t),this.width="16",this.height="16"}render(){return s.h("svg",{key:"339d4881ddf352d7950647b1458a861deab9b496",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},s.h("path",{key:"fb6ab15c0dacfec98834a4980380a40a4fa9d636",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"}))}};c.style=u;const f=':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}',p=f;s.dayjs.extend(m.customParseFormat);const d=class{constructor(t){s.registerInstance(this,t),this.timeChange=s.createEvent(this,"timeChange",7),this.timeWindowFormError=s.createEvent(this,"timeWindowFormError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.language=o.LANGUAGE_CODE.en,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(t){!t.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let t=s.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));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();const e=s.dayjs(this.times[0].value,"hh:mma"),r=s.dayjs(this.time,"hh:mma"),i=s.instance.t("nylasTimeWindowPicker.errors.invalid");r.isBefore(e)&&(this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const t=s.autocompleteTimeFormat(this.time),e=this.times.findIndex(r=>r.value===t);e>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(e));return}}handleTimeChange(t,e){const r=e.split(":");if(r[0]==="00"&&r[1].slice(-2)=="pm"){const i=s.instance.t("nylasTimeWindowPicker.errors.invalid");this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i})}if(s.validateTimeFormatInput(e))this.err="",this.timeWindowFormError.emit({key:this.el.id,message:""});else{const i=s.instance.t("nylasTimeWindowPicker.errors.invalid");this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i})}this.err||this.timeChange.emit({key:this.el.id,value:e})}handleTimeAutocomplete(t){var n;const e=(n=t.target)==null?void 0:n.value,r=this.language===o.LANGUAGE_CODE.de||this.language===o.LANGUAGE_CODE.fr?s.convertTo12HourFormat(e):e,i=s.instance.t("nylasTimeWindowPicker.errors.invalid");if(!s.validateTimeFormatInput(r)){this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i});return}if(r===""){const a=s.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:a});return}if(!s.validateExactTimeFormat(r)){const a=s.autocompleteTimeFormat(r);this.timeChange.emit({key:this.el.id,value:a});return}this.timeChange.emit({key:this.el.id,value:r})}handleOnInput(t){var r;const e=(r=t.target)==null?void 0:r.value;if(s.validateTimeFormatInput(e)){if(e===""){const i=s.roundToNearest15Minutes().format("hh:mma"),n=this.times.findIndex(a=>a.value===i);n>-1&&this.scrollToViewWithinParent(n);return}if(!s.validateExactTimeFormat(e)){const i=s.autocompleteTimeFormat(e),n=this.times.findIndex(a=>a.value===i);n>-1&&this.scrollToViewWithinParent(n);return}}}generateTimes(){const t=[];let e=s.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(e=s.dayjs(this.minimumStartTime,"hh:mma"));const r=e.endOf("day").diff(e,"minutes"),i=Math.round(r/15);for(let n=0;n<i+1;n++){const a=e.add(n*15,"minute");if(n==i&&a.format("hh:mma").includes("am"))break;t.push({id:n,value:a.format("hh:mma")})}return t}handleComboboxKeyDown(t){if(t.key==="ArrowDown"){if(t.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const e=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),r=e+1<this.times.length?e+1:0;this.ariaActivedescendant=this.times[r].id.toString(),this.focusOption(r)}}else if(t.key==="ArrowUp")if(t.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const e=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),r=e-1>=0?e-1:this.times.length-1;this.ariaActivedescendant=this.times[r].id.toString(),this.focusOption(r)}else t.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(t){const e=this.times,r=e.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(t.key==="ArrowDown"||t.key==="Tab"&&!t.shiftKey){t.preventDefault();const i=r+1<e.length?r+1:0;this.ariaActivedescendant=e[i].id.toString(),this.focusOption(i)}else if(t.key==="ArrowUp"||t.key==="Tab"&&t.shiftKey){t.preventDefault();const i=r-1>=0?r-1:e.length-1;this.ariaActivedescendant=e[i].id.toString(),this.focusOption(i)}else if(t.key==="Enter"){if(t.preventDefault(),this.ariaActivedescendant){const i=e[r];this.handleTimeChange(t,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else t.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(t){var l;const e=this.times[t],r=(l=this.el.shadowRoot)==null?void 0:l.getElementById(e.id.toString()),i=this.timeMenu;this.ariaActivedescendant=e.id.toString();const n=r.getBoundingClientRect(),a=i.getBoundingClientRect();n.top<a.top?i.scrollTop-=a.top-n.top:n.bottom>a.bottom&&(i.scrollTop+=n.bottom-a.bottom),n.left<a.left?i.scrollLeft-=a.left-n.left:n.right>a.right&&(i.scrollLeft+=n.right-a.right)}focusOption(t){var n;const e=this.times[t];if(!e)return;const r=e.id.toString(),i=(n=this.el.shadowRoot)==null?void 0:n.getElementById(r);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){const t=this.language!==o.LANGUAGE_CODE.en;return s.h(s.Host,{key:"895a0c2b4482e42b4bd52ad305cc0e41ea366d47"},s.h("div",{key:"969128eb7d4177ecb879bf3b76d96eb004036b47",class:"time-picker",part:"time-picker"},s.h("input",{key:"ff7b75f3cda42bdb0e27268b886913887f685c66",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:t?s.convertTo24HourFormat(this.time):this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"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&&s.h("div",{class:"invalid-time-icon"}),this.showTimes&&s.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},s.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>s.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:r=>{this.handleTimeChange(r,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${t?s.convertTo24HourFormat(e.value):e.value}`)))),!this.showTimes&&this.err&&s.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return s.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};d.style=p;exports.globe_icon=c;exports.nylas_time_window_picker=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-f769bc2a.cjs"),o=require("./constants-f51538ef-cd2a67c4.cjs"),d=require("./customParseFormat-edc38d83-fa9c77d9.cjs");require("react");require("react/jsx-runtime");require("react-dom");const h=".sc-globe-icon-h{display:flex}",u=h,c=class{constructor(t){s.registerInstance(this,t),this.width="16",this.height="16"}render(){return s.h("svg",{key:"ccad86c558abea19fa48bd42e9b3375a7b3567c5",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},s.h("path",{key:"5b69892e01ba177bc47fe2a78a7dc25a6374dfa7",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"}))}};c.style=u;const f=':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}',p=f;s.dayjs.extend(d.customParseFormat);const m=class{constructor(t){s.registerInstance(this,t),this.timeChange=s.createEvent(this,"timeChange",7),this.timeWindowFormError=s.createEvent(this,"timeWindowFormError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.language=o.LANGUAGE_CODE.en,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(t){!t.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let t=s.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));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();const e=s.dayjs(this.times[0].value,"hh:mma"),r=s.dayjs(this.time,"hh:mma"),i=s.instance.t("nylasTimeWindowPicker.errors.invalid");r.isBefore(e)&&(this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const t=s.autocompleteTimeFormat(this.time),e=this.times.findIndex(r=>r.value===t);e>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(e));return}}handleTimeChange(t,e){const r=e.split(":");if(r[0]==="00"&&r[1].slice(-2)=="pm"){const i=s.instance.t("nylasTimeWindowPicker.errors.invalid");this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i})}if(s.validateTimeFormatInput(e))this.err="",this.timeWindowFormError.emit({key:this.el.id,message:""});else{const i=s.instance.t("nylasTimeWindowPicker.errors.invalid");this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i})}this.err||this.timeChange.emit({key:this.el.id,value:e})}handleTimeAutocomplete(t){var n;const e=(n=t.target)==null?void 0:n.value,r=this.language===o.LANGUAGE_CODE.de||this.language===o.LANGUAGE_CODE.fr?s.convertTo12HourFormat(e):e,i=s.instance.t("nylasTimeWindowPicker.errors.invalid");if(!s.validateTimeFormatInput(r)){this.err=i,this.timeWindowFormError.emit({key:this.el.id,message:i});return}if(r===""){const a=s.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:a});return}if(!s.validateExactTimeFormat(r)){const a=s.autocompleteTimeFormat(r);this.timeChange.emit({key:this.el.id,value:a});return}this.timeChange.emit({key:this.el.id,value:r})}handleOnInput(t){var r;const e=(r=t.target)==null?void 0:r.value;if(s.validateTimeFormatInput(e)){if(e===""){const i=s.roundToNearest15Minutes().format("hh:mma"),n=this.times.findIndex(a=>a.value===i);n>-1&&this.scrollToViewWithinParent(n);return}if(!s.validateExactTimeFormat(e)){const i=s.autocompleteTimeFormat(e),n=this.times.findIndex(a=>a.value===i);n>-1&&this.scrollToViewWithinParent(n);return}}}generateTimes(){const t=[];let e=s.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(e=s.dayjs(this.minimumStartTime,"hh:mma"));const r=e.endOf("day").diff(e,"minutes"),i=Math.round(r/15);for(let n=0;n<i+1;n++){const a=e.add(n*15,"minute");if(n==i&&a.format("hh:mma").includes("am"))break;t.push({id:n,value:a.format("hh:mma")})}return t}handleComboboxKeyDown(t){if(t.key==="ArrowDown"){if(t.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const e=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),r=e+1<this.times.length?e+1:0;this.ariaActivedescendant=this.times[r].id.toString(),this.focusOption(r)}}else if(t.key==="ArrowUp")if(t.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const e=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),r=e-1>=0?e-1:this.times.length-1;this.ariaActivedescendant=this.times[r].id.toString(),this.focusOption(r)}else t.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(t){const e=this.times,r=e.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(t.key==="ArrowDown"||t.key==="Tab"&&!t.shiftKey){t.preventDefault();const i=r+1<e.length?r+1:0;this.ariaActivedescendant=e[i].id.toString(),this.focusOption(i)}else if(t.key==="ArrowUp"||t.key==="Tab"&&t.shiftKey){t.preventDefault();const i=r-1>=0?r-1:e.length-1;this.ariaActivedescendant=e[i].id.toString(),this.focusOption(i)}else if(t.key==="Enter"){if(t.preventDefault(),this.ariaActivedescendant){const i=e[r];this.handleTimeChange(t,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else t.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(t){var l;const e=this.times[t],r=(l=this.el.shadowRoot)==null?void 0:l.getElementById(e.id.toString()),i=this.timeMenu;this.ariaActivedescendant=e.id.toString();const n=r.getBoundingClientRect(),a=i.getBoundingClientRect();n.top<a.top?i.scrollTop-=a.top-n.top:n.bottom>a.bottom&&(i.scrollTop+=n.bottom-a.bottom),n.left<a.left?i.scrollLeft-=a.left-n.left:n.right>a.right&&(i.scrollLeft+=n.right-a.right)}focusOption(t){var n;const e=this.times[t];if(!e)return;const r=e.id.toString(),i=(n=this.el.shadowRoot)==null?void 0:n.getElementById(r);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){const t=this.language!==o.LANGUAGE_CODE.en;return s.h(s.Host,{key:"6ea6b78a73331635750d905f9279907f7599e8c9"},s.h("div",{key:"24c41e629fa49378938c3ed7be3875714963a0b2",class:"time-picker",part:"time-picker"},s.h("input",{key:"3e05a515acf6472d094bdd75737f7553cd2525db",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:t?s.convertTo24HourFormat(this.time):this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"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&&s.h("div",{class:"invalid-time-icon"}),this.showTimes&&s.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},s.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>s.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:r=>{this.handleTimeChange(r,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${t?s.convertTo24HourFormat(e.value):e.value}`)))),!this.showTimes&&this.err&&s.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return s.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};m.style=p;exports.globe_icon=c;exports.nylas_time_window_picker=m;