@nylas/web-elements 1.1.0-canary.19.c → 1.1.0-canary.19.d

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 (876) hide show
  1. package/dist/cjs/add-circle-icon_2.cjs.entry.js +1 -1
  2. package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
  3. package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
  4. package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
  5. package/dist/cjs/button-component_4.cjs.entry.js +203 -0
  6. package/dist/cjs/button-component_4.cjs.entry.js.map +1 -0
  7. package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js +6943 -0
  8. package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js.map +1 -0
  9. package/dist/cjs/chevron-icon_3.cjs.entry.js +11 -3
  10. package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/clock-icon_2.cjs.entry.js +1 -1
  12. package/dist/cjs/{constants-3e962931.js → constants-7cc75333.js} +106 -1
  13. package/dist/cjs/{constants-3e962931.js.map → constants-7cc75333.js.map} +1 -1
  14. package/dist/cjs/copy-icon_4.cjs.entry.js +72 -0
  15. package/dist/cjs/copy-icon_4.cjs.entry.js.map +1 -0
  16. package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
  17. package/dist/cjs/forward-icon_6.cjs.entry.js +7 -7
  18. package/dist/cjs/globe-icon.cjs.entry.js +1 -1
  19. package/dist/cjs/google-logo-icon_4.cjs.entry.js +192 -51
  20. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
  21. package/dist/cjs/index-7af03e3f.js +20 -16
  22. package/dist/cjs/index.cjs.js +1 -1
  23. package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
  24. package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/cjs/loading-icon.cjs.entry.js +1 -1
  27. package/dist/cjs/multi-select-dropdown.cjs.entry.js +144 -0
  28. package/dist/cjs/multi-select-dropdown.cjs.entry.js.map +1 -0
  29. package/dist/cjs/{nylas-api-request-a1751a40.js → nylas-api-request-393b08a0.js} +2 -1
  30. package/dist/cjs/nylas-api-request-393b08a0.js.map +1 -0
  31. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +66 -35
  32. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +1 -1
  34. package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
  35. package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
  36. package/dist/cjs/nylas-list-folders.cjs.entry.js +1 -1
  37. package/dist/cjs/nylas-list-threads.cjs.entry.js +1 -1
  38. package/dist/cjs/nylas-login.cjs.entry.js +1 -1
  39. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +1 -1
  40. package/dist/cjs/nylas-mailbox.cjs.entry.js +1 -1
  41. package/dist/cjs/nylas-provider.cjs.entry.js +3 -3
  42. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +26 -9
  43. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  45. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  46. package/dist/cjs/nylas-threads-refresh.cjs.entry.js +2 -2
  47. package/dist/cjs/nylas-threads-search.cjs.entry.js +1 -1
  48. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
  49. package/dist/cjs/nylas-view-thread.cjs.entry.js +1 -1
  50. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  51. package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
  52. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  53. package/dist/cjs/{scheduler-config-store-9f19c7a9.js → scheduler-config-store-5bfc8cb8.js} +3 -1
  54. package/dist/cjs/scheduler-config-store-5bfc8cb8.js.map +1 -0
  55. package/dist/cjs/{scheduler-store-0f7328f1.js → scheduler-store-b5cf2e82.js} +43 -7
  56. package/dist/cjs/scheduler-store-b5cf2e82.js.map +1 -0
  57. package/dist/cjs/textarea-component.cjs.entry.js +3 -1
  58. package/dist/cjs/textarea-component.cjs.entry.js.map +1 -1
  59. package/dist/cjs/translate-icon.cjs.entry.js +1 -1
  60. package/dist/cjs/warning-icon.cjs.entry.js +1 -1
  61. package/dist/collection/collection-manifest.json +14 -0
  62. package/dist/collection/common/constants.js +102 -0
  63. package/dist/collection/common/constants.js.map +1 -1
  64. package/dist/collection/common/icons/add-circle.js +1 -1
  65. package/dist/collection/common/icons/archive.js +1 -1
  66. package/dist/collection/common/icons/arrow.js +1 -1
  67. package/dist/collection/common/icons/bold.js +1 -1
  68. package/dist/collection/common/icons/calendar-agenda-fill.js +63 -0
  69. package/dist/collection/common/icons/calendar-agenda-fill.js.map +1 -0
  70. package/dist/collection/common/icons/calendar-agenda.js +63 -0
  71. package/dist/collection/common/icons/calendar-agenda.js.map +1 -0
  72. package/dist/collection/common/icons/copy.js +63 -0
  73. package/dist/collection/common/icons/copy.js.map +1 -0
  74. package/dist/collection/common/icons/delete.js +63 -0
  75. package/dist/collection/common/icons/delete.js.map +1 -0
  76. package/dist/collection/common/icons/document-refresh.js +1 -1
  77. package/dist/collection/common/icons/dragable.js +63 -0
  78. package/dist/collection/common/icons/dragable.js.map +1 -0
  79. package/dist/collection/common/icons/edit.js +63 -0
  80. package/dist/collection/common/icons/edit.js.map +1 -0
  81. package/dist/collection/common/icons/eye.js +63 -0
  82. package/dist/collection/common/icons/eye.js.map +1 -0
  83. package/dist/collection/common/icons/flow.js +1 -1
  84. package/dist/collection/common/icons/folder.js +1 -1
  85. package/dist/collection/common/icons/forward.js +1 -1
  86. package/dist/collection/common/icons/globe.js +1 -1
  87. package/dist/collection/common/icons/google-logo.js +1 -1
  88. package/dist/collection/common/icons/google-meet.js +63 -0
  89. package/dist/collection/common/icons/google-meet.js.map +1 -0
  90. package/dist/collection/common/icons/inbox.js +1 -1
  91. package/dist/collection/common/icons/info.js +1 -1
  92. package/dist/collection/common/icons/italic.js +1 -1
  93. package/dist/collection/common/icons/loading.js +1 -1
  94. package/dist/collection/common/icons/location-off.js +1 -1
  95. package/dist/collection/common/icons/location.js +1 -1
  96. package/dist/collection/common/icons/microsof-teams.js +63 -0
  97. package/dist/collection/common/icons/microsof-teams.js.map +1 -0
  98. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  99. package/dist/collection/common/icons/nylas-logo.js +1 -1
  100. package/dist/collection/common/icons/people.js +1 -1
  101. package/dist/collection/common/icons/person.js +1 -1
  102. package/dist/collection/common/icons/play.js +1 -1
  103. package/dist/collection/common/icons/plus.js +63 -0
  104. package/dist/collection/common/icons/plus.js.map +1 -0
  105. package/dist/collection/common/icons/refresh.js +1 -1
  106. package/dist/collection/common/icons/reply-all.js +1 -1
  107. package/dist/collection/common/icons/reply.js +1 -1
  108. package/dist/collection/common/icons/search.js +1 -1
  109. package/dist/collection/common/icons/sent.js +1 -1
  110. package/dist/collection/common/icons/spam.js +1 -1
  111. package/dist/collection/common/icons/star.js +1 -1
  112. package/dist/collection/common/icons/stop.js +1 -1
  113. package/dist/collection/common/icons/translate.js +1 -1
  114. package/dist/collection/common/icons/trash.js +1 -1
  115. package/dist/collection/common/icons/underline.js +1 -1
  116. package/dist/collection/common/icons/warning.js +1 -1
  117. package/dist/collection/common/icons/zoom.js +63 -0
  118. package/dist/collection/common/icons/zoom.js.map +1 -0
  119. package/dist/collection/common/nylas-api-request.js +1 -0
  120. package/dist/collection/common/nylas-api-request.js.map +1 -1
  121. package/dist/collection/common/types.js.map +1 -1
  122. package/dist/collection/components/design-system/button-component/button-component.css +4 -0
  123. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  124. package/dist/collection/components/design-system/checkbox-component/checkbox-component.css +15 -1
  125. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +46 -6
  126. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js.map +1 -1
  127. package/dist/collection/components/design-system/input-component/input-component.css +9 -1
  128. package/dist/collection/components/design-system/input-component/input-component.js +20 -8
  129. package/dist/collection/components/design-system/input-component/input-component.js.map +1 -1
  130. package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
  131. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.css +8 -1
  132. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +21 -2
  133. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js.map +1 -1
  134. package/dist/collection/components/design-system/radio-button-group/radio-button-group.css +57 -1
  135. package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +69 -10
  136. package/dist/collection/components/design-system/radio-button-group/radio-button-group.js.map +1 -1
  137. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +45 -2
  138. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js.map +1 -1
  139. package/dist/collection/components/design-system/textarea-component/textarea-component.js +23 -3
  140. package/dist/collection/components/design-system/textarea-component/textarea-component.js.map +1 -1
  141. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  142. package/dist/collection/components/design-system/toggle-switch/toggle-switch.css +1 -1
  143. package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +5 -5
  144. package/dist/collection/components/design-system/toggle-switch/toggle-switch.js.map +1 -1
  145. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  146. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
  147. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
  148. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
  149. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
  150. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
  151. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
  152. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
  153. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
  154. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
  155. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
  156. package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
  157. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  158. package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
  159. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +23 -4
  160. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  161. package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js +1 -0
  162. package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js.map +1 -1
  163. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +37 -21
  164. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
  165. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +42 -3
  166. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
  167. package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js +11 -0
  168. package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js.map +1 -1
  169. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +2 -2
  170. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +1 -1
  171. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  172. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.css +4 -1
  173. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +3 -3
  174. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  175. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +1 -1
  176. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +2 -2
  177. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +8 -7
  178. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  179. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.css +16 -2
  180. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +31 -12
  181. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  182. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.css +3 -0
  183. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +2 -2
  184. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  185. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.css +3 -0
  186. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +22 -6
  187. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  188. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.css +233 -0
  189. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +388 -0
  190. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -0
  191. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.css +3 -20
  192. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +19 -9
  193. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  194. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +1 -1
  195. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.css +105 -0
  196. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +298 -0
  197. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -0
  198. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
  199. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +5 -5
  200. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
  201. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +3 -0
  202. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +106 -20
  203. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  204. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +7 -7
  205. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  206. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  207. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  208. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -1
  209. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +161 -11
  210. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
  211. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +1 -1
  212. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  213. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  214. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +1 -1
  215. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  216. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +79 -3
  217. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +125 -22
  218. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  219. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +1 -1
  220. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js.map +1 -1
  221. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +1 -1
  222. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  223. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.css +105 -0
  224. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +324 -0
  225. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -0
  226. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +39 -5
  227. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
  228. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +4 -3
  229. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
  230. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +59 -9
  231. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  232. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  233. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +16 -16
  234. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
  235. package/dist/collection/connector/shared/api/scheduler-config.js +4 -2
  236. package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
  237. package/dist/collection/connector/shared/api/scheduler.js +41 -6
  238. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  239. package/dist/collection/stores/scheduler-config-store.js +2 -0
  240. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  241. package/dist/collection/stores/scheduler-store.js +1 -0
  242. package/dist/collection/stores/scheduler-store.js.map +1 -1
  243. package/dist/collection/types/index.js.map +1 -1
  244. package/dist/components/add-circle.js +1 -1
  245. package/dist/components/archive.js +1 -1
  246. package/dist/components/arrow.js +1 -1
  247. package/dist/components/bold.js +1 -1
  248. package/dist/components/button-component2.js +2 -2
  249. package/dist/components/button-component2.js.map +1 -1
  250. package/dist/components/calendar-agenda-fill-icon.d.ts +11 -0
  251. package/dist/components/calendar-agenda-fill-icon.js +8 -0
  252. package/dist/components/calendar-agenda-fill-icon.js.map +1 -0
  253. package/dist/components/calendar-agenda-fill.js +37 -0
  254. package/dist/components/calendar-agenda-fill.js.map +1 -0
  255. package/dist/components/calendar-agenda-icon.d.ts +11 -0
  256. package/dist/components/calendar-agenda-icon.js +8 -0
  257. package/dist/components/calendar-agenda-icon.js.map +1 -0
  258. package/dist/components/calendar-agenda.js +37 -0
  259. package/dist/components/calendar-agenda.js.map +1 -0
  260. package/dist/components/checkbox-component2.js +18 -4
  261. package/dist/components/checkbox-component2.js.map +1 -1
  262. package/dist/components/constants.js +102 -1
  263. package/dist/components/constants.js.map +1 -1
  264. package/dist/components/copy-icon.d.ts +11 -0
  265. package/dist/components/copy-icon.js +8 -0
  266. package/dist/components/copy-icon.js.map +1 -0
  267. package/dist/components/copy.js +37 -0
  268. package/dist/components/copy.js.map +1 -0
  269. package/dist/components/delete-icon.d.ts +11 -0
  270. package/dist/components/delete-icon.js +8 -0
  271. package/dist/components/delete-icon.js.map +1 -0
  272. package/dist/components/delete.js +37 -0
  273. package/dist/components/delete.js.map +1 -0
  274. package/dist/components/document-refresh-icon.js +1 -1
  275. package/dist/components/dragable-icon.d.ts +11 -0
  276. package/dist/components/dragable-icon.js +8 -0
  277. package/dist/components/dragable-icon.js.map +1 -0
  278. package/dist/components/dragable.js +37 -0
  279. package/dist/components/dragable.js.map +1 -0
  280. package/dist/components/edit-icon.d.ts +11 -0
  281. package/dist/components/edit-icon.js +8 -0
  282. package/dist/components/edit-icon.js.map +1 -0
  283. package/dist/components/edit.js +37 -0
  284. package/dist/components/edit.js.map +1 -0
  285. package/dist/components/eye-icon.d.ts +11 -0
  286. package/dist/components/eye-icon.js +8 -0
  287. package/dist/components/eye-icon.js.map +1 -0
  288. package/dist/components/eye.js +37 -0
  289. package/dist/components/eye.js.map +1 -0
  290. package/dist/components/flow.js +1 -1
  291. package/dist/components/folder.js +1 -1
  292. package/dist/components/forward.js +1 -1
  293. package/dist/components/globe.js +1 -1
  294. package/dist/components/google-logo.js +1 -1
  295. package/dist/components/google-meet-icon.d.ts +11 -0
  296. package/dist/components/google-meet-icon.js +8 -0
  297. package/dist/components/google-meet-icon.js.map +1 -0
  298. package/dist/components/google-meet.js +37 -0
  299. package/dist/components/google-meet.js.map +1 -0
  300. package/dist/components/inbox.js +1 -1
  301. package/dist/components/info.js +1 -1
  302. package/dist/components/input-component2.js +17 -6
  303. package/dist/components/input-component2.js.map +1 -1
  304. package/dist/components/input-dropdown2.js +1 -1
  305. package/dist/components/italic.js +1 -1
  306. package/dist/components/loading.js +1 -1
  307. package/dist/components/location-off.js +1 -1
  308. package/dist/components/location.js +1 -1
  309. package/dist/components/microsof-teams.js +37 -0
  310. package/dist/components/microsof-teams.js.map +1 -0
  311. package/dist/components/microsoft-logo.js +1 -1
  312. package/dist/components/microsoft-teams-icon.d.ts +11 -0
  313. package/dist/components/microsoft-teams-icon.js +8 -0
  314. package/dist/components/microsoft-teams-icon.js.map +1 -0
  315. package/dist/components/multi-select-dropdown2.js +5 -3
  316. package/dist/components/multi-select-dropdown2.js.map +1 -1
  317. package/dist/components/nylas-additional-participants2.js +26 -8
  318. package/dist/components/nylas-additional-participants2.js.map +1 -1
  319. package/dist/components/nylas-api-request.js +1 -0
  320. package/dist/components/nylas-api-request.js.map +1 -1
  321. package/dist/components/nylas-availability-picker2.js +2 -2
  322. package/dist/components/nylas-availability-picker2.js.map +1 -1
  323. package/dist/components/nylas-booked-event-card2.js +7 -4
  324. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  325. package/dist/components/nylas-booking-calendar-picker2.js +5 -6
  326. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  327. package/dist/components/nylas-booking-form-config.d.ts +11 -0
  328. package/dist/components/nylas-booking-form-config.js +8 -0
  329. package/dist/components/nylas-booking-form-config.js.map +1 -0
  330. package/dist/components/nylas-booking-form-config2.js +3691 -0
  331. package/dist/components/nylas-booking-form-config2.js.map +1 -0
  332. package/dist/components/nylas-booking-form2.js +78 -32
  333. package/dist/components/nylas-booking-form2.js.map +1 -1
  334. package/dist/components/nylas-calendar-picker2.js +27 -23
  335. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  336. package/dist/components/nylas-cancel-booking-form2.js +21 -2
  337. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  338. package/dist/components/nylas-cancellation-policy2.js +1 -1
  339. package/dist/components/nylas-cancelled-event-card2.js +1 -1
  340. package/dist/components/nylas-composer2.js +1 -1
  341. package/dist/components/nylas-connected-calendars.d.ts +11 -0
  342. package/dist/components/nylas-connected-calendars.js +8 -0
  343. package/dist/components/nylas-connected-calendars.js.map +1 -0
  344. package/dist/components/nylas-connected-calendars2.js +232 -0
  345. package/dist/components/nylas-connected-calendars2.js.map +1 -0
  346. package/dist/components/nylas-custom-booking-flow.js +1 -1
  347. package/dist/components/nylas-customize-booking-settings2.js +4 -4
  348. package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
  349. package/dist/components/nylas-editor-tabs2.js +251 -113
  350. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  351. package/dist/components/nylas-event-info2.js +1 -1
  352. package/dist/components/nylas-event-limits2.js +1 -1
  353. package/dist/components/nylas-event-limits2.js.map +1 -1
  354. package/dist/components/nylas-event-location2.js +138 -25
  355. package/dist/components/nylas-event-location2.js.map +1 -1
  356. package/dist/components/nylas-event-title2.js +1 -1
  357. package/dist/components/nylas-event-title2.js.map +1 -1
  358. package/dist/components/nylas-form-card2.js +1 -1
  359. package/dist/components/nylas-if-state.js +1 -1
  360. package/dist/components/nylas-limit-future-bookings2.js +1 -1
  361. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  362. package/dist/components/nylas-list-configurations2.js +142 -25
  363. package/dist/components/nylas-list-configurations2.js.map +1 -1
  364. package/dist/components/nylas-list-folders.js +1 -1
  365. package/dist/components/nylas-list-threads.js +1 -1
  366. package/dist/components/nylas-login.js +1 -1
  367. package/dist/components/nylas-logo2.js +1 -1
  368. package/dist/components/nylas-mailbox-toolbar-button.js +1 -1
  369. package/dist/components/nylas-mailbox.js +1 -1
  370. package/dist/components/nylas-min-booking-notice2.js +1 -1
  371. package/dist/components/nylas-min-booking-notice2.js.map +1 -1
  372. package/dist/components/nylas-min-cancellation-notice2.js +1 -1
  373. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  374. package/dist/components/nylas-notification2.js +1 -1
  375. package/dist/components/nylas-participant-booking-calendars.d.ts +11 -0
  376. package/dist/components/nylas-participant-booking-calendars.js +8 -0
  377. package/dist/components/nylas-participant-booking-calendars.js.map +1 -0
  378. package/dist/components/nylas-participant-booking-calendars2.js +237 -0
  379. package/dist/components/nylas-participant-booking-calendars2.js.map +1 -0
  380. package/dist/components/nylas-participants-custom-availability2.js +18 -5
  381. package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
  382. package/dist/components/nylas-provider.js +1 -1
  383. package/dist/components/nylas-scheduler-editor.js +210 -101
  384. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  385. package/dist/components/nylas-scheduling.js +70 -52
  386. package/dist/components/nylas-scheduling.js.map +1 -1
  387. package/dist/components/nylas-summarize-message-button2.js +2 -2
  388. package/dist/components/nylas-threads-refresh.js +2 -2
  389. package/dist/components/nylas-threads-search.js +1 -1
  390. package/dist/components/nylas-time-window-picker2.js +1 -1
  391. package/dist/components/nylas-timeslot-interval2.js +11 -11
  392. package/dist/components/nylas-timeslot-interval2.js.map +1 -1
  393. package/dist/components/nylas-timeslot-picker2.js +6 -5
  394. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  395. package/dist/components/nylas-view-email2.js +1 -1
  396. package/dist/components/nylas-view-thread.js +1 -1
  397. package/dist/components/people.js +1 -1
  398. package/dist/components/person.js +1 -1
  399. package/dist/components/play.js +1 -1
  400. package/dist/components/plus-icon.d.ts +11 -0
  401. package/dist/components/plus-icon.js +8 -0
  402. package/dist/components/plus-icon.js.map +1 -0
  403. package/dist/components/plus.js +37 -0
  404. package/dist/components/plus.js.map +1 -0
  405. package/dist/components/radio-button-group2.js +23 -6
  406. package/dist/components/radio-button-group2.js.map +1 -1
  407. package/dist/components/refresh.js +1 -1
  408. package/dist/components/reply-all.js +1 -1
  409. package/dist/components/reply.js +1 -1
  410. package/dist/components/scheduler-config-store.js +2 -0
  411. package/dist/components/scheduler-config-store.js.map +1 -1
  412. package/dist/components/scheduler-store.js +42 -6
  413. package/dist/components/scheduler-store.js.map +1 -1
  414. package/dist/components/search.js +1 -1
  415. package/dist/components/select-dropdown2.js +12 -2
  416. package/dist/components/select-dropdown2.js.map +1 -1
  417. package/dist/components/sent.js +1 -1
  418. package/dist/components/spam.js +1 -1
  419. package/dist/components/star.js +1 -1
  420. package/dist/components/stop.js +1 -1
  421. package/dist/components/textarea-component.js +1 -82
  422. package/dist/components/textarea-component.js.map +1 -1
  423. package/dist/components/textarea-component2.js +89 -0
  424. package/dist/components/textarea-component2.js.map +1 -0
  425. package/dist/components/time-period-selector2.js +1 -1
  426. package/dist/components/toggle-switch2.js +2 -2
  427. package/dist/components/toggle-switch2.js.map +1 -1
  428. package/dist/components/toolitp-component.js +1 -1
  429. package/dist/components/translate.js +1 -1
  430. package/dist/components/trash.js +1 -1
  431. package/dist/components/underline.js +1 -1
  432. package/dist/components/warning.js +1 -1
  433. package/dist/components/zoom-icon.d.ts +11 -0
  434. package/dist/components/zoom-icon.js +8 -0
  435. package/dist/components/zoom-icon.js.map +1 -0
  436. package/dist/components/zoom.js +37 -0
  437. package/dist/components/zoom.js.map +1 -0
  438. package/dist/esm/add-circle-icon_2.entry.js +1 -1
  439. package/dist/esm/archive-icon_7.entry.js +7 -7
  440. package/dist/esm/arrow-icon.entry.js +1 -1
  441. package/dist/esm/bold-icon_3.entry.js +3 -3
  442. package/dist/esm/button-component_4.entry.js +196 -0
  443. package/dist/esm/button-component_4.entry.js.map +1 -0
  444. package/dist/esm/calendar-agenda-fill-icon_35.entry.js +6905 -0
  445. package/dist/esm/calendar-agenda-fill-icon_35.entry.js.map +1 -0
  446. package/dist/esm/chevron-icon_3.entry.js +11 -3
  447. package/dist/esm/chevron-icon_3.entry.js.map +1 -1
  448. package/dist/esm/clock-icon_2.entry.js +1 -1
  449. package/dist/esm/{constants-f34b9c6e.js → constants-7ce66b44.js} +103 -2
  450. package/dist/esm/{constants-f34b9c6e.js.map → constants-7ce66b44.js.map} +1 -1
  451. package/dist/esm/copy-icon_4.entry.js +65 -0
  452. package/dist/esm/copy-icon_4.entry.js.map +1 -0
  453. package/dist/esm/document-refresh-icon.entry.js +1 -1
  454. package/dist/esm/forward-icon_6.entry.js +7 -7
  455. package/dist/esm/globe-icon.entry.js +1 -1
  456. package/dist/esm/google-logo-icon_4.entry.js +192 -51
  457. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  458. package/dist/esm/index-7cb0dd3d.js +20 -16
  459. package/dist/esm/index.js +1 -1
  460. package/dist/esm/info-icon_2.entry.js +2 -2
  461. package/dist/esm/input-dropdown_2.entry.js +2 -2
  462. package/dist/esm/loader.js +1 -1
  463. package/dist/esm/loading-icon.entry.js +1 -1
  464. package/dist/esm/multi-select-dropdown.entry.js +140 -0
  465. package/dist/esm/multi-select-dropdown.entry.js.map +1 -0
  466. package/dist/esm/{nylas-api-request-a67d2997.js → nylas-api-request-4f8edff2.js} +2 -1
  467. package/dist/esm/nylas-api-request-4f8edff2.js.map +1 -0
  468. package/dist/esm/nylas-booked-event-card_10.entry.js +66 -35
  469. package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
  470. package/dist/esm/nylas-custom-booking-flow.entry.js +1 -1
  471. package/dist/esm/nylas-form-card.entry.js +1 -1
  472. package/dist/esm/nylas-if-state.entry.js +1 -1
  473. package/dist/esm/nylas-list-folders.entry.js +1 -1
  474. package/dist/esm/nylas-list-threads.entry.js +1 -1
  475. package/dist/esm/nylas-login.entry.js +1 -1
  476. package/dist/esm/nylas-mailbox-toolbar-button.entry.js +1 -1
  477. package/dist/esm/nylas-mailbox.entry.js +1 -1
  478. package/dist/esm/nylas-provider.entry.js +3 -3
  479. package/dist/esm/nylas-scheduler-editor.entry.js +26 -9
  480. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  481. package/dist/esm/nylas-scheduling.entry.js +3 -3
  482. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  483. package/dist/esm/nylas-threads-refresh.entry.js +2 -2
  484. package/dist/esm/nylas-threads-search.entry.js +1 -1
  485. package/dist/esm/nylas-time-window-picker.entry.js +1 -1
  486. package/dist/esm/nylas-view-thread.entry.js +1 -1
  487. package/dist/esm/nylas-web-elements.js +1 -1
  488. package/dist/esm/play-icon_2.entry.js +2 -2
  489. package/dist/esm/refresh-icon.entry.js +1 -1
  490. package/dist/esm/{scheduler-config-store-4a50a03d.js → scheduler-config-store-9ccfba4d.js} +3 -1
  491. package/dist/esm/scheduler-config-store-9ccfba4d.js.map +1 -0
  492. package/dist/esm/{scheduler-store-f02ce045.js → scheduler-store-8a400448.js} +43 -7
  493. package/dist/esm/scheduler-store-8a400448.js.map +1 -0
  494. package/dist/esm/textarea-component.entry.js +3 -1
  495. package/dist/esm/textarea-component.entry.js.map +1 -1
  496. package/dist/esm/translate-icon.entry.js +1 -1
  497. package/dist/esm/warning-icon.entry.js +1 -1
  498. package/dist/nylas-web-elements/index.esm.js +1 -1
  499. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  500. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  501. package/dist/nylas-web-elements/p-0161429f.entry.js +2 -0
  502. package/dist/nylas-web-elements/{p-33a6a75b.entry.js.map → p-0161429f.entry.js.map} +1 -1
  503. package/dist/nylas-web-elements/p-064c2ae5.entry.js +2 -0
  504. package/dist/nylas-web-elements/{p-de7b0878.entry.js → p-0aa1e433.entry.js} +2 -2
  505. package/dist/nylas-web-elements/{p-3f122804.entry.js → p-0bf6f818.entry.js} +2 -2
  506. package/dist/nylas-web-elements/p-1102df14.entry.js +2 -0
  507. package/dist/nylas-web-elements/{p-f1a54acf.entry.js → p-155e5ce8.entry.js} +2 -2
  508. package/dist/nylas-web-elements/{p-a85408e0.entry.js → p-18d100c8.entry.js} +2 -2
  509. package/dist/nylas-web-elements/{p-5231fc13.entry.js → p-1a7edf86.entry.js} +3 -3
  510. package/dist/nylas-web-elements/p-1d8c468f.entry.js +2 -0
  511. package/dist/nylas-web-elements/p-1d8c468f.entry.js.map +1 -0
  512. package/dist/nylas-web-elements/{p-be38a8eb.entry.js → p-1e1ae8d0.entry.js} +2 -2
  513. package/dist/nylas-web-elements/p-1f290858.entry.js +2 -0
  514. package/dist/nylas-web-elements/p-1f290858.entry.js.map +1 -0
  515. package/dist/nylas-web-elements/{p-eb7e8455.entry.js → p-1fbe50b1.entry.js} +2 -2
  516. package/dist/nylas-web-elements/p-20bbc663.js +2 -0
  517. package/dist/nylas-web-elements/p-20bbc663.js.map +1 -0
  518. package/dist/nylas-web-elements/{p-49f716ed.js → p-2270e6cf.js} +4 -4
  519. package/dist/nylas-web-elements/p-2270e6cf.js.map +1 -0
  520. package/dist/nylas-web-elements/{p-70e5cfb0.entry.js → p-22e05c7d.entry.js} +2 -2
  521. package/dist/nylas-web-elements/{p-554891cd.entry.js → p-26302ad0.entry.js} +2 -2
  522. package/dist/nylas-web-elements/p-27df8f01.entry.js +2 -0
  523. package/dist/nylas-web-elements/p-27df8f01.entry.js.map +1 -0
  524. package/dist/nylas-web-elements/p-2b1d53fa.entry.js +8 -0
  525. package/dist/nylas-web-elements/p-2b1d53fa.entry.js.map +1 -0
  526. package/dist/nylas-web-elements/{p-6ce66add.entry.js → p-2f47205d.entry.js} +2 -2
  527. package/dist/nylas-web-elements/{p-28512ab6.entry.js → p-3277023d.entry.js} +2 -2
  528. package/dist/nylas-web-elements/{p-1a27960b.entry.js → p-3423de64.entry.js} +2 -2
  529. package/dist/nylas-web-elements/p-3423de64.entry.js.map +1 -0
  530. package/dist/nylas-web-elements/{p-b0c8021f.entry.js → p-34c747f9.entry.js} +2 -2
  531. package/dist/nylas-web-elements/{p-d9a91bc9.entry.js → p-359af1e3.entry.js} +2 -2
  532. package/dist/nylas-web-elements/p-359af1e3.entry.js.map +1 -0
  533. package/dist/nylas-web-elements/{p-613c070f.js → p-371b20b2.js} +2 -2
  534. package/dist/nylas-web-elements/p-371b20b2.js.map +1 -0
  535. package/dist/nylas-web-elements/{p-e9ba368f.entry.js → p-3ae38e51.entry.js} +2 -2
  536. package/dist/nylas-web-elements/{p-6ef1024f.entry.js → p-3bc1289e.entry.js} +2 -2
  537. package/dist/nylas-web-elements/{p-7fcecf3f.entry.js → p-3d1e8e4d.entry.js} +2 -2
  538. package/dist/nylas-web-elements/{p-45c37986.entry.js → p-3dae0c71.entry.js} +2 -2
  539. package/dist/nylas-web-elements/{p-acadfabf.entry.js → p-3db7ab8d.entry.js} +3 -3
  540. package/dist/nylas-web-elements/{p-66493463.entry.js → p-3e09b0fb.entry.js} +2 -2
  541. package/dist/nylas-web-elements/{p-5c3c1888.entry.js → p-3eac9f45.entry.js} +2 -2
  542. package/dist/nylas-web-elements/{p-dcc27b67.entry.js → p-4000107d.entry.js} +2 -2
  543. package/dist/nylas-web-elements/p-40cad9a8.entry.js +11 -0
  544. package/dist/nylas-web-elements/p-40cad9a8.entry.js.map +1 -0
  545. package/dist/nylas-web-elements/p-445d8bb4.entry.js +11 -0
  546. package/dist/nylas-web-elements/p-445d8bb4.entry.js.map +1 -0
  547. package/dist/nylas-web-elements/{p-08d75d35.entry.js → p-47392968.entry.js} +2 -2
  548. package/dist/nylas-web-elements/{p-16a3bfb2.entry.js → p-4a594ebe.entry.js} +2 -2
  549. package/dist/nylas-web-elements/{p-d633e735.entry.js → p-4b6995fe.entry.js} +2 -2
  550. package/dist/nylas-web-elements/p-4cdd4107.entry.js +2 -0
  551. package/dist/nylas-web-elements/{p-39fd9c90.entry.js → p-4e8c8939.entry.js} +2 -2
  552. package/dist/nylas-web-elements/{p-9b68568e.entry.js → p-4e9ba325.entry.js} +2 -2
  553. package/dist/nylas-web-elements/p-4f55d0e5.entry.js +2 -0
  554. package/dist/nylas-web-elements/{p-12b83ea9.entry.js.map → p-4f55d0e5.entry.js.map} +1 -1
  555. package/dist/nylas-web-elements/{p-9794f735.entry.js → p-524a6acc.entry.js} +2 -2
  556. package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js → p-533d39ce.entry.js} +2 -2
  557. package/dist/nylas-web-elements/{p-e928898a.entry.js → p-5a379fb5.entry.js} +2 -2
  558. package/dist/nylas-web-elements/{p-c90755ba.entry.js → p-5a68368a.entry.js} +2 -2
  559. package/dist/nylas-web-elements/{p-37f41a90.entry.js → p-5b965d0d.entry.js} +2 -2
  560. package/dist/nylas-web-elements/p-5e1cd3c1.entry.js +2 -0
  561. package/dist/nylas-web-elements/p-5e1cd3c1.entry.js.map +1 -0
  562. package/dist/nylas-web-elements/{p-34f0d1fe.entry.js → p-5ff4e63b.entry.js} +2 -2
  563. package/dist/nylas-web-elements/p-62aeac5f.entry.js +2 -0
  564. package/dist/nylas-web-elements/p-62aeac5f.entry.js.map +1 -0
  565. package/dist/nylas-web-elements/p-64d43339.entry.js +2 -0
  566. package/dist/nylas-web-elements/p-64d43339.entry.js.map +1 -0
  567. package/dist/nylas-web-elements/p-656cf33f.entry.js +2 -0
  568. package/dist/nylas-web-elements/{p-cf589eab.entry.js → p-65b7a2a7.entry.js} +2 -2
  569. package/dist/nylas-web-elements/p-68471dbd.entry.js +8 -0
  570. package/dist/nylas-web-elements/p-68471dbd.entry.js.map +1 -0
  571. package/dist/nylas-web-elements/p-692852d2.entry.js +2 -0
  572. package/dist/nylas-web-elements/p-692852d2.entry.js.map +1 -0
  573. package/dist/nylas-web-elements/{p-60b03f86.entry.js → p-6c8af4fb.entry.js} +2 -2
  574. package/dist/nylas-web-elements/p-6d410f0a.entry.js +2 -0
  575. package/dist/nylas-web-elements/{p-daac96cb.entry.js → p-6e50d2fd.entry.js} +3 -3
  576. package/dist/nylas-web-elements/p-6e8b7ce8.entry.js +2 -0
  577. package/dist/nylas-web-elements/p-7042eb03.entry.js +2 -0
  578. package/dist/nylas-web-elements/{p-958746a1.entry.js.map → p-7042eb03.entry.js.map} +1 -1
  579. package/dist/nylas-web-elements/{p-b9fa6848.entry.js → p-7355937b.entry.js} +2 -2
  580. package/dist/nylas-web-elements/p-749238c6.entry.js +2 -0
  581. package/dist/nylas-web-elements/p-749238c6.entry.js.map +1 -0
  582. package/dist/nylas-web-elements/p-76156a82.entry.js +2 -0
  583. package/dist/nylas-web-elements/p-79c1475e.entry.js +11 -0
  584. package/dist/nylas-web-elements/p-79c1475e.entry.js.map +1 -0
  585. package/dist/nylas-web-elements/p-79c33cf9.entry.js +2 -0
  586. package/dist/nylas-web-elements/p-79c33cf9.entry.js.map +1 -0
  587. package/dist/nylas-web-elements/{p-052bc3b1.entry.js → p-7e08f131.entry.js} +2 -2
  588. package/dist/nylas-web-elements/{p-a12f3223.entry.js → p-7e10aa6d.entry.js} +2 -2
  589. package/dist/nylas-web-elements/{p-a7b19349.entry.js → p-7e53588e.entry.js} +2 -2
  590. package/dist/nylas-web-elements/p-83de54ae.entry.js +2 -0
  591. package/dist/nylas-web-elements/{p-b2d95965.entry.js → p-884b66bd.entry.js} +2 -2
  592. package/dist/nylas-web-elements/p-8aac762b.entry.js +2 -0
  593. package/dist/nylas-web-elements/p-8aac762b.entry.js.map +1 -0
  594. package/dist/nylas-web-elements/p-8d74c874.js +2 -0
  595. package/dist/nylas-web-elements/p-8d74c874.js.map +1 -0
  596. package/dist/nylas-web-elements/{p-a800e7af.entry.js → p-8ddf6518.entry.js} +2 -2
  597. package/dist/nylas-web-elements/p-8ddf6518.entry.js.map +1 -0
  598. package/dist/nylas-web-elements/{p-7a95bc3f.entry.js → p-90294a76.entry.js} +2 -2
  599. package/dist/nylas-web-elements/p-90817d1f.entry.js +2 -0
  600. package/dist/nylas-web-elements/{p-f1b0120b.entry.js → p-90d32fc3.entry.js} +2 -2
  601. package/dist/nylas-web-elements/p-94a93ca9.entry.js +2 -0
  602. package/dist/nylas-web-elements/p-94a93ca9.entry.js.map +1 -0
  603. package/dist/nylas-web-elements/p-95a9d2f1.entry.js +2 -0
  604. package/dist/nylas-web-elements/p-96746b87.entry.js +2 -0
  605. package/dist/nylas-web-elements/p-97026709.entry.js +2 -0
  606. package/dist/nylas-web-elements/{p-65097f45.entry.js → p-987042a1.entry.js} +2 -2
  607. package/dist/nylas-web-elements/{p-7ce048c0.entry.js → p-9f903292.entry.js} +2 -2
  608. package/dist/nylas-web-elements/{p-bd34f97d.entry.js → p-9fdbeba5.entry.js} +2 -2
  609. package/dist/nylas-web-elements/{p-2a92691a.entry.js → p-a22908ba.entry.js} +2 -2
  610. package/dist/nylas-web-elements/{p-091a8f00.entry.js → p-a3c76c06.entry.js} +2 -2
  611. package/dist/nylas-web-elements/{p-520ffe94.entry.js → p-a63d6241.entry.js} +2 -2
  612. package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js → p-aa4e6e5e.entry.js} +2 -2
  613. package/dist/nylas-web-elements/{p-ba5a625c.entry.js → p-ab050d5b.entry.js} +2 -2
  614. package/dist/nylas-web-elements/p-b2b2d351.entry.js +2 -0
  615. package/dist/nylas-web-elements/p-b2b2d351.entry.js.map +1 -0
  616. package/dist/nylas-web-elements/{p-161c9325.entry.js → p-b348aad4.entry.js} +2 -2
  617. package/dist/nylas-web-elements/{p-bfe8e06b.entry.js → p-b547209f.entry.js} +2 -2
  618. package/dist/nylas-web-elements/{p-e8cde784.entry.js → p-b5b051e0.entry.js} +2 -2
  619. package/dist/nylas-web-elements/{p-aae7febd.entry.js → p-b7a53268.entry.js} +2 -2
  620. package/dist/nylas-web-elements/p-b8a9e8f4.entry.js +2 -0
  621. package/dist/nylas-web-elements/p-b8a9e8f4.entry.js.map +1 -0
  622. package/dist/nylas-web-elements/{p-385070ba.entry.js → p-bc6c9256.entry.js} +2 -2
  623. package/dist/nylas-web-elements/{p-cb03e4d4.entry.js → p-be26ce19.entry.js} +2 -2
  624. package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js → p-bed6d217.entry.js} +2 -2
  625. package/dist/nylas-web-elements/p-bf4e0d2a.entry.js +2 -0
  626. package/dist/nylas-web-elements/p-bf4e0d2a.entry.js.map +1 -0
  627. package/dist/nylas-web-elements/{p-8e63b66c.entry.js → p-cb9fd100.entry.js} +2 -2
  628. package/dist/nylas-web-elements/p-ce14a1d5.entry.js +2 -0
  629. package/dist/nylas-web-elements/{p-1fa7b832.entry.js.map → p-ce14a1d5.entry.js.map} +1 -1
  630. package/dist/nylas-web-elements/{p-44507695.entry.js → p-cee0929a.entry.js} +2 -2
  631. package/dist/nylas-web-elements/{p-b334d63b.entry.js → p-cffb3636.entry.js} +2 -2
  632. package/dist/nylas-web-elements/{p-b2aca6c4.entry.js → p-d1ab9d75.entry.js} +2 -2
  633. package/dist/nylas-web-elements/p-d6a19e25.entry.js +2 -0
  634. package/dist/nylas-web-elements/p-d6a19e25.entry.js.map +1 -0
  635. package/dist/nylas-web-elements/{p-f96b12de.entry.js → p-d830e428.entry.js} +2 -2
  636. package/dist/nylas-web-elements/{p-8075a758.entry.js → p-d9b08dd2.entry.js} +2 -2
  637. package/dist/nylas-web-elements/{p-8f843faf.entry.js → p-db73506b.entry.js} +2 -2
  638. package/dist/nylas-web-elements/p-dcf99ddf.entry.js +2 -0
  639. package/dist/nylas-web-elements/p-dcf99ddf.entry.js.map +1 -0
  640. package/dist/nylas-web-elements/{p-d513d2ee.entry.js → p-de2f4643.entry.js} +2 -2
  641. package/dist/nylas-web-elements/{p-f2d1b1a6.entry.js.map → p-de2f4643.entry.js.map} +1 -1
  642. package/dist/nylas-web-elements/{p-25c97a60.entry.js → p-de84d999.entry.js} +2 -2
  643. package/dist/nylas-web-elements/p-debf614f.entry.js +8 -0
  644. package/dist/nylas-web-elements/p-debf614f.entry.js.map +1 -0
  645. package/dist/nylas-web-elements/{p-158fe1e9.entry.js → p-dfe9b5d0.entry.js} +2 -2
  646. package/dist/nylas-web-elements/{p-085950eb.entry.js → p-e5452799.entry.js} +2 -2
  647. package/dist/nylas-web-elements/{p-f8653b9b.entry.js → p-e6e79d76.entry.js} +2 -2
  648. package/dist/nylas-web-elements/{p-b813eb5d.entry.js → p-e944aa75.entry.js} +2 -2
  649. package/dist/nylas-web-elements/p-ec844414.entry.js +2 -0
  650. package/dist/nylas-web-elements/{p-34f0d1fe.entry.js.map → p-ec844414.entry.js.map} +1 -1
  651. package/dist/nylas-web-elements/p-ed64716c.entry.js +2 -0
  652. package/dist/nylas-web-elements/p-ed64716c.entry.js.map +1 -0
  653. package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js → p-eff175d3.entry.js} +2 -2
  654. package/dist/nylas-web-elements/{p-246983ed.entry.js → p-eff774e6.entry.js} +2 -2
  655. package/dist/nylas-web-elements/p-f03b9d40.entry.js +2 -0
  656. package/dist/nylas-web-elements/p-f03b9d40.entry.js.map +1 -0
  657. package/dist/nylas-web-elements/{p-2f148064.entry.js → p-f13b8bd3.entry.js} +2 -2
  658. package/dist/nylas-web-elements/{p-8f3b02cd.entry.js → p-f7465959.entry.js} +2 -2
  659. package/dist/nylas-web-elements/p-f8e8270d.entry.js +2 -0
  660. package/dist/nylas-web-elements/p-f8e8270d.entry.js.map +1 -0
  661. package/dist/types/common/constants.d.ts +17 -0
  662. package/dist/types/common/icons/calendar-agenda-fill.d.ts +5 -0
  663. package/dist/types/common/icons/calendar-agenda.d.ts +5 -0
  664. package/dist/types/common/icons/copy.d.ts +5 -0
  665. package/dist/types/common/icons/delete.d.ts +5 -0
  666. package/dist/types/common/icons/dragable.d.ts +5 -0
  667. package/dist/types/common/icons/edit.d.ts +5 -0
  668. package/dist/types/common/icons/eye.d.ts +5 -0
  669. package/dist/types/common/icons/google-meet.d.ts +5 -0
  670. package/dist/types/common/icons/microsof-teams.d.ts +5 -0
  671. package/dist/types/common/icons/plus.d.ts +5 -0
  672. package/dist/types/common/icons/zoom.d.ts +5 -0
  673. package/dist/types/common/nylas-api-request.d.ts +1 -0
  674. package/dist/types/common/types.d.ts +1 -0
  675. package/dist/types/components/design-system/checkbox-component/checkbox-component.d.ts +3 -0
  676. package/dist/types/components/design-system/input-component/input-component.d.ts +2 -1
  677. package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +1 -0
  678. package/dist/types/components/design-system/radio-button-group/radio-button-group.d.ts +6 -1
  679. package/dist/types/components/design-system/select-dropdown/select-dropdown.d.ts +3 -0
  680. package/dist/types/components/design-system/textarea-component/textarea-component.d.ts +2 -0
  681. package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +1 -0
  682. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +8 -6
  683. package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +3 -2
  684. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +7 -4
  685. package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +1 -0
  686. package/dist/types/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.d.ts +51 -0
  687. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +1 -0
  688. package/dist/types/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.d.ts +41 -0
  689. package/dist/types/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.d.ts +1 -1
  690. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +27 -4
  691. package/dist/types/components/scheduler-editor/nylas-editor-tabs/tab-contents.d.ts +2 -1
  692. package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +7 -1
  693. package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +13 -2
  694. package/dist/types/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.d.ts +43 -0
  695. package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +4 -2
  696. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +11 -2
  697. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +4 -2
  698. package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +2 -2
  699. package/dist/types/components.d.ts +723 -30
  700. package/dist/types/connector/shared/api/scheduler-config.d.ts +1 -1
  701. package/dist/types/stores/scheduler-config-store.d.ts +5 -2
  702. package/dist/types/stores/scheduler-store.d.ts +3 -1
  703. package/dist/types/types/index.d.ts +8 -0
  704. package/package.json +3 -2
  705. package/dist/cjs/button-component.cjs.entry.js +0 -31
  706. package/dist/cjs/button-component.cjs.entry.js.map +0 -1
  707. package/dist/cjs/calendar-info-icon_28.cjs.entry.js +0 -2935
  708. package/dist/cjs/calendar-info-icon_28.cjs.entry.js.map +0 -1
  709. package/dist/cjs/input-component.cjs.entry.js +0 -89
  710. package/dist/cjs/input-component.cjs.entry.js.map +0 -1
  711. package/dist/cjs/nylas-api-request-a1751a40.js.map +0 -1
  712. package/dist/cjs/scheduler-config-store-9f19c7a9.js.map +0 -1
  713. package/dist/cjs/scheduler-store-0f7328f1.js.map +0 -1
  714. package/dist/esm/button-component.entry.js +0 -27
  715. package/dist/esm/button-component.entry.js.map +0 -1
  716. package/dist/esm/calendar-info-icon_28.entry.js +0 -2904
  717. package/dist/esm/calendar-info-icon_28.entry.js.map +0 -1
  718. package/dist/esm/input-component.entry.js +0 -85
  719. package/dist/esm/input-component.entry.js.map +0 -1
  720. package/dist/esm/nylas-api-request-a67d2997.js.map +0 -1
  721. package/dist/esm/scheduler-config-store-4a50a03d.js.map +0 -1
  722. package/dist/esm/scheduler-store-f02ce045.js.map +0 -1
  723. package/dist/nylas-web-elements/p-019be093.entry.js +0 -11
  724. package/dist/nylas-web-elements/p-019be093.entry.js.map +0 -1
  725. package/dist/nylas-web-elements/p-05833164.entry.js +0 -2
  726. package/dist/nylas-web-elements/p-05833164.entry.js.map +0 -1
  727. package/dist/nylas-web-elements/p-061d0ae2.entry.js +0 -2
  728. package/dist/nylas-web-elements/p-061d0ae2.entry.js.map +0 -1
  729. package/dist/nylas-web-elements/p-0c31f7ca.entry.js +0 -2
  730. package/dist/nylas-web-elements/p-0d98c728.entry.js +0 -2
  731. package/dist/nylas-web-elements/p-0d98c728.entry.js.map +0 -1
  732. package/dist/nylas-web-elements/p-12b83ea9.entry.js +0 -2
  733. package/dist/nylas-web-elements/p-16fb6243.entry.js +0 -2
  734. package/dist/nylas-web-elements/p-1970b6ee.entry.js +0 -2
  735. package/dist/nylas-web-elements/p-1a27960b.entry.js.map +0 -1
  736. package/dist/nylas-web-elements/p-1fa7b832.entry.js +0 -2
  737. package/dist/nylas-web-elements/p-26976360.entry.js +0 -2
  738. package/dist/nylas-web-elements/p-26976360.entry.js.map +0 -1
  739. package/dist/nylas-web-elements/p-29938263.js +0 -2
  740. package/dist/nylas-web-elements/p-29938263.js.map +0 -1
  741. package/dist/nylas-web-elements/p-33a6a75b.entry.js +0 -2
  742. package/dist/nylas-web-elements/p-36f4b804.entry.js +0 -2
  743. package/dist/nylas-web-elements/p-36f4b804.entry.js.map +0 -1
  744. package/dist/nylas-web-elements/p-39160c0d.entry.js +0 -11
  745. package/dist/nylas-web-elements/p-39160c0d.entry.js.map +0 -1
  746. package/dist/nylas-web-elements/p-3b6bd448.entry.js +0 -2
  747. package/dist/nylas-web-elements/p-3eeab083.entry.js +0 -2
  748. package/dist/nylas-web-elements/p-49f716ed.js.map +0 -1
  749. package/dist/nylas-web-elements/p-53a1bb82.entry.js +0 -2
  750. package/dist/nylas-web-elements/p-53a1bb82.entry.js.map +0 -1
  751. package/dist/nylas-web-elements/p-5bed86c2.entry.js +0 -2
  752. package/dist/nylas-web-elements/p-5ddd0c37.entry.js +0 -2
  753. package/dist/nylas-web-elements/p-613c070f.js.map +0 -1
  754. package/dist/nylas-web-elements/p-644ff4ee.entry.js +0 -2
  755. package/dist/nylas-web-elements/p-644ff4ee.entry.js.map +0 -1
  756. package/dist/nylas-web-elements/p-64d73008.entry.js +0 -2
  757. package/dist/nylas-web-elements/p-6ddb4b95.entry.js +0 -2
  758. package/dist/nylas-web-elements/p-6ddb4b95.entry.js.map +0 -1
  759. package/dist/nylas-web-elements/p-823c8aa2.js +0 -2
  760. package/dist/nylas-web-elements/p-823c8aa2.js.map +0 -1
  761. package/dist/nylas-web-elements/p-83444c0a.entry.js +0 -2
  762. package/dist/nylas-web-elements/p-83444c0a.entry.js.map +0 -1
  763. package/dist/nylas-web-elements/p-8506a8d4.entry.js +0 -11
  764. package/dist/nylas-web-elements/p-8506a8d4.entry.js.map +0 -1
  765. package/dist/nylas-web-elements/p-926dd201.entry.js +0 -2
  766. package/dist/nylas-web-elements/p-9283504a.entry.js +0 -2
  767. package/dist/nylas-web-elements/p-9283504a.entry.js.map +0 -1
  768. package/dist/nylas-web-elements/p-958746a1.entry.js +0 -2
  769. package/dist/nylas-web-elements/p-9bb41364.entry.js +0 -2
  770. package/dist/nylas-web-elements/p-9bb41364.entry.js.map +0 -1
  771. package/dist/nylas-web-elements/p-a800e7af.entry.js.map +0 -1
  772. package/dist/nylas-web-elements/p-a8678862.entry.js +0 -2
  773. package/dist/nylas-web-elements/p-aac962c7.entry.js +0 -2
  774. package/dist/nylas-web-elements/p-aac962c7.entry.js.map +0 -1
  775. package/dist/nylas-web-elements/p-b4d09fcf.entry.js +0 -2
  776. package/dist/nylas-web-elements/p-b4d09fcf.entry.js.map +0 -1
  777. package/dist/nylas-web-elements/p-b9559f06.entry.js +0 -2
  778. package/dist/nylas-web-elements/p-b9559f06.entry.js.map +0 -1
  779. package/dist/nylas-web-elements/p-bab1d562.entry.js +0 -2
  780. package/dist/nylas-web-elements/p-bab1d562.entry.js.map +0 -1
  781. package/dist/nylas-web-elements/p-c18c15d0.entry.js +0 -2
  782. package/dist/nylas-web-elements/p-c1ff6499.entry.js +0 -2
  783. package/dist/nylas-web-elements/p-c1ff6499.entry.js.map +0 -1
  784. package/dist/nylas-web-elements/p-d5d67115.entry.js +0 -2
  785. package/dist/nylas-web-elements/p-d5d67115.entry.js.map +0 -1
  786. package/dist/nylas-web-elements/p-d9a91bc9.entry.js.map +0 -1
  787. package/dist/nylas-web-elements/p-ea12997b.entry.js +0 -2
  788. package/dist/nylas-web-elements/p-f2d1b1a6.entry.js +0 -2
  789. package/dist/nylas-web-elements/p-f6fafe86.entry.js +0 -2
  790. package/dist/nylas-web-elements/p-f6fafe86.entry.js.map +0 -1
  791. package/dist/nylas-web-elements/p-ffce3a49.entry.js +0 -2
  792. package/dist/nylas-web-elements/p-ffce3a49.entry.js.map +0 -1
  793. /package/dist/nylas-web-elements/{p-08d75d35.entry.js.map → p-064c2ae5.entry.js.map} +0 -0
  794. /package/dist/nylas-web-elements/{p-5bed86c2.entry.js.map → p-0aa1e433.entry.js.map} +0 -0
  795. /package/dist/nylas-web-elements/{p-3f122804.entry.js.map → p-0bf6f818.entry.js.map} +0 -0
  796. /package/dist/nylas-web-elements/{p-926dd201.entry.js.map → p-1102df14.entry.js.map} +0 -0
  797. /package/dist/nylas-web-elements/{p-a7b19349.entry.js.map → p-155e5ce8.entry.js.map} +0 -0
  798. /package/dist/nylas-web-elements/{p-a85408e0.entry.js.map → p-18d100c8.entry.js.map} +0 -0
  799. /package/dist/nylas-web-elements/{p-5231fc13.entry.js.map → p-1a7edf86.entry.js.map} +0 -0
  800. /package/dist/nylas-web-elements/{p-554891cd.entry.js.map → p-1e1ae8d0.entry.js.map} +0 -0
  801. /package/dist/nylas-web-elements/{p-65097f45.entry.js.map → p-1fbe50b1.entry.js.map} +0 -0
  802. /package/dist/nylas-web-elements/{p-70e5cfb0.entry.js.map → p-22e05c7d.entry.js.map} +0 -0
  803. /package/dist/nylas-web-elements/{p-be38a8eb.entry.js.map → p-26302ad0.entry.js.map} +0 -0
  804. /package/dist/nylas-web-elements/{p-2a92691a.entry.js.map → p-2f47205d.entry.js.map} +0 -0
  805. /package/dist/nylas-web-elements/{p-085950eb.entry.js.map → p-3277023d.entry.js.map} +0 -0
  806. /package/dist/nylas-web-elements/{p-64d73008.entry.js.map → p-34c747f9.entry.js.map} +0 -0
  807. /package/dist/nylas-web-elements/{p-45c37986.entry.js.map → p-3ae38e51.entry.js.map} +0 -0
  808. /package/dist/nylas-web-elements/{p-0c31f7ca.entry.js.map → p-3bc1289e.entry.js.map} +0 -0
  809. /package/dist/nylas-web-elements/{p-5ddd0c37.entry.js.map → p-3d1e8e4d.entry.js.map} +0 -0
  810. /package/dist/nylas-web-elements/{p-e9ba368f.entry.js.map → p-3dae0c71.entry.js.map} +0 -0
  811. /package/dist/nylas-web-elements/{p-acadfabf.entry.js.map → p-3db7ab8d.entry.js.map} +0 -0
  812. /package/dist/nylas-web-elements/{p-28512ab6.entry.js.map → p-3e09b0fb.entry.js.map} +0 -0
  813. /package/dist/nylas-web-elements/{p-158fe1e9.entry.js.map → p-3eac9f45.entry.js.map} +0 -0
  814. /package/dist/nylas-web-elements/{p-d513d2ee.entry.js.map → p-4000107d.entry.js.map} +0 -0
  815. /package/dist/nylas-web-elements/{p-3b6bd448.entry.js.map → p-47392968.entry.js.map} +0 -0
  816. /package/dist/nylas-web-elements/{p-16a3bfb2.entry.js.map → p-4a594ebe.entry.js.map} +0 -0
  817. /package/dist/nylas-web-elements/{p-c90755ba.entry.js.map → p-4b6995fe.entry.js.map} +0 -0
  818. /package/dist/nylas-web-elements/{p-b2d95965.entry.js.map → p-4cdd4107.entry.js.map} +0 -0
  819. /package/dist/nylas-web-elements/{p-25c97a60.entry.js.map → p-4e8c8939.entry.js.map} +0 -0
  820. /package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js.map → p-4e9ba325.entry.js.map} +0 -0
  821. /package/dist/nylas-web-elements/{p-6ce66add.entry.js.map → p-524a6acc.entry.js.map} +0 -0
  822. /package/dist/nylas-web-elements/{p-9b68568e.entry.js.map → p-533d39ce.entry.js.map} +0 -0
  823. /package/dist/nylas-web-elements/{p-7a95bc3f.entry.js.map → p-5a379fb5.entry.js.map} +0 -0
  824. /package/dist/nylas-web-elements/{p-cb03e4d4.entry.js.map → p-5a68368a.entry.js.map} +0 -0
  825. /package/dist/nylas-web-elements/{p-1970b6ee.entry.js.map → p-5b965d0d.entry.js.map} +0 -0
  826. /package/dist/nylas-web-elements/{p-091a8f00.entry.js.map → p-5ff4e63b.entry.js.map} +0 -0
  827. /package/dist/nylas-web-elements/{p-37f41a90.entry.js.map → p-656cf33f.entry.js.map} +0 -0
  828. /package/dist/nylas-web-elements/{p-246983ed.entry.js.map → p-65b7a2a7.entry.js.map} +0 -0
  829. /package/dist/nylas-web-elements/{p-60b03f86.entry.js.map → p-6c8af4fb.entry.js.map} +0 -0
  830. /package/dist/nylas-web-elements/{p-8e63b66c.entry.js.map → p-6d410f0a.entry.js.map} +0 -0
  831. /package/dist/nylas-web-elements/{p-daac96cb.entry.js.map → p-6e50d2fd.entry.js.map} +0 -0
  832. /package/dist/nylas-web-elements/{p-c18c15d0.entry.js.map → p-6e8b7ce8.entry.js.map} +0 -0
  833. /package/dist/nylas-web-elements/{p-b9fa6848.entry.js.map → p-7355937b.entry.js.map} +0 -0
  834. /package/dist/nylas-web-elements/{p-a8678862.entry.js.map → p-76156a82.entry.js.map} +0 -0
  835. /package/dist/nylas-web-elements/{p-052bc3b1.entry.js.map → p-7e08f131.entry.js.map} +0 -0
  836. /package/dist/nylas-web-elements/{p-2f148064.entry.js.map → p-7e10aa6d.entry.js.map} +0 -0
  837. /package/dist/nylas-web-elements/{p-b2aca6c4.entry.js.map → p-7e53588e.entry.js.map} +0 -0
  838. /package/dist/nylas-web-elements/{p-aae7febd.entry.js.map → p-83de54ae.entry.js.map} +0 -0
  839. /package/dist/nylas-web-elements/{p-de7b0878.entry.js.map → p-884b66bd.entry.js.map} +0 -0
  840. /package/dist/nylas-web-elements/{p-e928898a.entry.js.map → p-90294a76.entry.js.map} +0 -0
  841. /package/dist/nylas-web-elements/{p-3eeab083.entry.js.map → p-90817d1f.entry.js.map} +0 -0
  842. /package/dist/nylas-web-elements/{p-f1b0120b.entry.js.map → p-90d32fc3.entry.js.map} +0 -0
  843. /package/dist/nylas-web-elements/{p-dcc27b67.entry.js.map → p-95a9d2f1.entry.js.map} +0 -0
  844. /package/dist/nylas-web-elements/{p-6ef1024f.entry.js.map → p-96746b87.entry.js.map} +0 -0
  845. /package/dist/nylas-web-elements/{p-7fcecf3f.entry.js.map → p-97026709.entry.js.map} +0 -0
  846. /package/dist/nylas-web-elements/{p-eb7e8455.entry.js.map → p-987042a1.entry.js.map} +0 -0
  847. /package/dist/nylas-web-elements/{p-44507695.entry.js.map → p-9f903292.entry.js.map} +0 -0
  848. /package/dist/nylas-web-elements/{p-7ce048c0.entry.js.map → p-9fdbeba5.entry.js.map} +0 -0
  849. /package/dist/nylas-web-elements/{p-9794f735.entry.js.map → p-a22908ba.entry.js.map} +0 -0
  850. /package/dist/nylas-web-elements/{p-16fb6243.entry.js.map → p-a3c76c06.entry.js.map} +0 -0
  851. /package/dist/nylas-web-elements/{p-520ffe94.entry.js.map → p-a63d6241.entry.js.map} +0 -0
  852. /package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js.map → p-aa4e6e5e.entry.js.map} +0 -0
  853. /package/dist/nylas-web-elements/{p-ba5a625c.entry.js.map → p-ab050d5b.entry.js.map} +0 -0
  854. /package/dist/nylas-web-elements/{p-161c9325.entry.js.map → p-b348aad4.entry.js.map} +0 -0
  855. /package/dist/nylas-web-elements/{p-5c3c1888.entry.js.map → p-b547209f.entry.js.map} +0 -0
  856. /package/dist/nylas-web-elements/{p-e8cde784.entry.js.map → p-b5b051e0.entry.js.map} +0 -0
  857. /package/dist/nylas-web-elements/{p-b0c8021f.entry.js.map → p-b7a53268.entry.js.map} +0 -0
  858. /package/dist/nylas-web-elements/{p-385070ba.entry.js.map → p-bc6c9256.entry.js.map} +0 -0
  859. /package/dist/nylas-web-elements/{p-d633e735.entry.js.map → p-be26ce19.entry.js.map} +0 -0
  860. /package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js.map → p-bed6d217.entry.js.map} +0 -0
  861. /package/dist/nylas-web-elements/{p-8f3b02cd.entry.js.map → p-cb9fd100.entry.js.map} +0 -0
  862. /package/dist/nylas-web-elements/{p-bd34f97d.entry.js.map → p-cee0929a.entry.js.map} +0 -0
  863. /package/dist/nylas-web-elements/{p-b334d63b.entry.js.map → p-cffb3636.entry.js.map} +0 -0
  864. /package/dist/nylas-web-elements/{p-f1a54acf.entry.js.map → p-d1ab9d75.entry.js.map} +0 -0
  865. /package/dist/nylas-web-elements/{p-f96b12de.entry.js.map → p-d830e428.entry.js.map} +0 -0
  866. /package/dist/nylas-web-elements/{p-8075a758.entry.js.map → p-d9b08dd2.entry.js.map} +0 -0
  867. /package/dist/nylas-web-elements/{p-39fd9c90.entry.js.map → p-db73506b.entry.js.map} +0 -0
  868. /package/dist/nylas-web-elements/{p-8f843faf.entry.js.map → p-de84d999.entry.js.map} +0 -0
  869. /package/dist/nylas-web-elements/{p-bfe8e06b.entry.js.map → p-dfe9b5d0.entry.js.map} +0 -0
  870. /package/dist/nylas-web-elements/{p-66493463.entry.js.map → p-e5452799.entry.js.map} +0 -0
  871. /package/dist/nylas-web-elements/{p-f8653b9b.entry.js.map → p-e6e79d76.entry.js.map} +0 -0
  872. /package/dist/nylas-web-elements/{p-b813eb5d.entry.js.map → p-e944aa75.entry.js.map} +0 -0
  873. /package/dist/nylas-web-elements/{p-a12f3223.entry.js.map → p-eff175d3.entry.js.map} +0 -0
  874. /package/dist/nylas-web-elements/{p-cf589eab.entry.js.map → p-eff774e6.entry.js.map} +0 -0
  875. /package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js.map → p-f13b8bd3.entry.js.map} +0 -0
  876. /package/dist/nylas-web-elements/{p-ea12997b.entry.js.map → p-f7465959.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select-dropdown.js","sourceRoot":"","sources":["../../../../src/components/design-system/multi-select-dropdown/multi-select-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAatG,MAAM,OAAO,mBAAmB;;;;uBAiBM,EAAE;gCAMQ,IAAI,CAAC,OAAO;sBAI/B,KAAK;oCAIQ,EAAE;sCAMC,KAAK;;IAYhD,kBAAkB;QAChB,KAAK,CAAC,uBAAuB,EAAE,oBAAoB,CAAC,CAAC;QACrD,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAE/C,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YAC3D,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAEpB,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;QACtC,CAAC;IACH,CAAC;IAID,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AC,IAAI,EACb,IAAI,EAAC,SAAS,gBACF,IAAI,CAAC,IAAI,0BACC,IAAI,2BACH,IAAI,CAAC,oBAAoB,EAChD,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAE3C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAC5D,CACD,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { debug } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, h } from '@stencil/core';\n\ninterface DropdownOption {\n label: string;\n value: string;\n selected?: boolean; // Add a selected flag to each option\n}\n\n@Component({\n tag: 'multi-select-dropdown',\n styleUrl: 'multi-select-dropdown.scss',\n shadow: true,\n})\nexport class MultiSelectDropdown {\n @Element() el!: HTMLElement;\n\n // Props\n /**\n * The name of the dropdown\n */\n @Prop() name!: string;\n\n /**\n * The label of the dropdown\n */\n @Prop() label?: string;\n\n /**\n * The options to display in the dropdown\n */\n @Prop() options: DropdownOption[] = [];\n\n // States\n /**\n * The copy of the options to display in the dropdown\n */\n @State() availableOptions: DropdownOption[] = this.options;\n /**\n * The open state of the dropdown\n */\n @State() isOpen: boolean = false;\n /**\n * The aria-activedescendant attribute for the listbox element to indicate the currently active\n */\n @State() ariaActivedescendant: string = '';\n\n /**\n * This flag is used to focus the first option when the dropdown is opened\n * and reset after the first option is focused\n */\n @State() shouldFocusFirstOption: boolean = false;\n\n // Events\n /**\n * This event is fired when the selected options are changed\n */\n @Event({ bubbles: true, composed: true }) selectedOptionsChanged!: EventEmitter<{\n value: string[];\n name: string;\n }>;\n\n // Lifecycle methods\n componentDidRender() {\n debug('multi-select-dropdown', 'componentDidRender');\n if (this.isOpen && this.shouldFocusFirstOption) {\n // The dropdown is open and we should focus the first option\n this.ariaActivedescendant = this.availableOptions[0].value;\n this.focusOption(0);\n // Reset the flag\n this.shouldFocusFirstOption = false;\n }\n }\n\n // Event listeners\n @Listen('click', { target: 'document', capture: true })\n handleOutsideClick(event: MouseEvent) {\n // Get the path of the event\n const path = event.composedPath();\n\n // Check if the path includes the host element\n const isClickInside = path.includes(this.el);\n\n if (!isClickInside && this.isOpen) {\n this.isOpen = false;\n }\n }\n\n // Methods\n\n selectOption(option: DropdownOption): void {\n this.availableOptions = this.availableOptions.map(o => {\n if (o.value === option.value) {\n o.selected = option.selected ? false : true;\n }\n return o;\n });\n const selectedOptions = this.availableOptions.filter(o => o.selected).map(o => o.value);\n this.selectedOptionsChanged.emit({\n value: selectedOptions,\n name: this.name,\n });\n }\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n this.shouldFocusFirstOption = true;\n } else {\n this.ariaActivedescendant = '';\n }\n }\n\n handleSelectButtonKeyDown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n case 'Enter':\n event.preventDefault();\n if (!this.isOpen) {\n this.toggleDropdown();\n }\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n handleListboxKeydown(e: KeyboardEvent) {\n const items = this.availableOptions;\n const currentIndex = items.findIndex(item => item.value === this.ariaActivedescendant);\n\n switch (e.key) {\n case 'ArrowDown':\n case 'Tab':\n if (!e.shiftKey) {\n e.preventDefault();\n const nextIndex = currentIndex + 1 < items.length ? currentIndex + 1 : 0;\n this.ariaActivedescendant = items[nextIndex].value;\n this.focusOption(nextIndex);\n } else {\n e.preventDefault();\n const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;\n this.ariaActivedescendant = items[prevIndex].value;\n this.focusOption(prevIndex);\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;\n this.ariaActivedescendant = items[prevIndex].value;\n this.focusOption(prevIndex);\n break;\n case 'Enter':\n e.preventDefault();\n if (this.ariaActivedescendant) {\n this.selectOption(items[currentIndex]);\n }\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n focusOption(index: number) {\n const option = this.availableOptions[index];\n if (!option) return; // Guard clause in case index is out of bounds\n\n const elementId = option.value;\n const element = this.el.shadowRoot?.getElementById(elementId) as HTMLLIElement;\n\n if (element) {\n element.focus(); // Set focus on the element\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n }\n\n getSelectedOptions() {\n return this.availableOptions.filter(option => option.selected);\n }\n\n renderOption(option: DropdownOption) {\n return (\n <li\n key={option.value}\n id={option.value}\n role=\"option\"\n tabindex=\"0\"\n aria-selected={option.selected ? 'true' : 'false'}\n onClick={e => {\n e.stopImmediatePropagation();\n this.selectOption(option);\n }}\n class={{ selected: !!option.selected }}\n >\n <label htmlFor={option.value}>\n <input aria-hidden=\"true\" id={option.value} type=\"checkbox\" checked={option.selected} />\n <span>{option.label}</span>\n </label>\n </li>\n );\n }\n\n render() {\n return (\n <Host>\n <div class=\"dropdown\" part=\"msd_dropdown\">\n <label class=\"dropdown-label\">\n {this.label}\n <slot name=\"label-icon\" aria-hidden=\"true\"></slot>\n </label>\n <button\n part=\"msd_dropdown-button\"\n class={{ dropbtn: true, open: this.isOpen }}\n onClick={() => this.toggleDropdown()}\n aria-haspopup=\"listbox\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-label={this.name}\n onKeyDown={e => this.handleSelectButtonKeyDown(e)}\n >\n <slot name=\"select-icon\" aria-hidden=\"true\"></slot>\n <span class=\"selected-option\" part=\"msd_dropdown-button-selected-label\">\n {this.getSelectedOptions().length > 1\n ? `Multiple ${this.name}s selected`\n : this.availableOptions.filter(o => o.selected)[0]?.label ?? this.availableOptions[0]?.label}\n </span>\n <span class={this.isOpen ? 'open' : 'closed'} aria-hidden=\"true\">\n <chevron-icon width=\"16\" height=\"16\" />\n </span>\n </button>\n {this.isOpen ? null : (\n <div class={'selected-options'}>\n {this.getSelectedOptions().map(option => (\n <span class=\"selected-option\">\n {option.label}\n <button key={option.label} onClick={() => this.selectOption(option)}>\n <close-icon />\n </button>\n </span>\n ))}\n </div>\n )}\n {this.isOpen ? (\n <div class=\"dropdown-content\" part=\"msd_dropdown-content\">\n <ul\n tabindex=\"-1\"\n role=\"listbox\"\n aria-label={this.name}\n aria-multiselectable={true}\n aria-activedescendant={this.ariaActivedescendant}\n onKeyDown={e => this.handleListboxKeydown(e)}\n >\n {this.availableOptions.map(option => this.renderOption(option))}\n </ul>\n </div>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"multi-select-dropdown.js","sourceRoot":"","sources":["../../../../src/components/design-system/multi-select-dropdown/multi-select-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAatG,MAAM,OAAO,mBAAmB;;;;uBAiBM,EAAE;qBAKb,EAAE;gCAMmB,IAAI,CAAC,OAAO;sBAI/B,KAAK;oCAIQ,EAAE;sCAMC,KAAK;;IAYhD,kBAAkB;QAChB,KAAK,CAAC,uBAAuB,EAAE,oBAAoB,CAAC,CAAC;QACrD,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAE/C,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YAC3D,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAEpB,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;Q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AC1B,MAAM,CAAC,KAAK;oBACb,cAAQ,GAAG,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC;wBACjE,qBAAc,CACP,CACJ,CACR,CAAC,CACE,CACP;gBACA,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CACb,WAAK,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAC,sBAAsB;oBACvD,UACE,QAAQ,EAAC,IAAI,EACb,IAAI,EAAC,SAAS,gBACF,IAAI,CAAC,IAAI,0BACC,IAAI,2BACH,IAAI,CAAC,oBAAoB,EAChD,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAE3C,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAC5D,CACD,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { debug } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, h } from '@stencil/core';\n\ninterface DropdownOption {\n label: string;\n value: string;\n selected?: boolean; // Add a selected flag to each option\n}\n\n@Component({\n tag: 'multi-select-dropdown',\n styleUrl: 'multi-select-dropdown.scss',\n shadow: true,\n})\nexport class MultiSelectDropdown {\n @Element() el!: HTMLElement;\n\n // Props\n /**\n * The name of the dropdown\n */\n @Prop() name!: string;\n\n /**\n * The label of the dropdown\n */\n @Prop() label?: string;\n\n /**\n * The options to display in the dropdown\n */\n @Prop() options: DropdownOption[] = [];\n\n /**\n * Error message to display\n */\n @Prop() error?: string = '';\n\n // States\n /**\n * The copy of the options to display in the dropdown\n */\n @State() availableOptions: DropdownOption[] = this.options;\n /**\n * The open state of the dropdown\n */\n @State() isOpen: boolean = false;\n /**\n * The aria-activedescendant attribute for the listbox element to indicate the currently active\n */\n @State() ariaActivedescendant: string = '';\n\n /**\n * This flag is used to focus the first option when the dropdown is opened\n * and reset after the first option is focused\n */\n @State() shouldFocusFirstOption: boolean = false;\n\n // Events\n /**\n * This event is fired when the selected options are changed\n */\n @Event({ bubbles: true, composed: true }) selectedOptionsChanged!: EventEmitter<{\n value: string[];\n name: string;\n }>;\n\n // Lifecycle methods\n componentDidRender() {\n debug('multi-select-dropdown', 'componentDidRender');\n if (this.isOpen && this.shouldFocusFirstOption) {\n // The dropdown is open and we should focus the first option\n this.ariaActivedescendant = this.availableOptions[0].value;\n this.focusOption(0);\n // Reset the flag\n this.shouldFocusFirstOption = false;\n }\n }\n\n // Event listeners\n @Listen('click', { target: 'document', capture: true })\n handleOutsideClick(event: MouseEvent) {\n // Get the path of the event\n const path = event.composedPath();\n\n // Check if the path includes the host element\n const isClickInside = path.includes(this.el);\n\n if (!isClickInside && this.isOpen) {\n this.isOpen = false;\n }\n }\n\n // Methods\n\n selectOption(option: DropdownOption): void {\n this.availableOptions = this.availableOptions.map(o => {\n if (o.value === option.value) {\n o.selected = option.selected ? false : true;\n }\n return o;\n });\n const selectedOptions = this.availableOptions.filter(o => o.selected).map(o => o.value);\n this.selectedOptionsChanged.emit({\n value: selectedOptions,\n name: this.name,\n });\n }\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n this.shouldFocusFirstOption = true;\n } else {\n this.ariaActivedescendant = '';\n }\n }\n\n handleSelectButtonKeyDown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n case 'Enter':\n event.preventDefault();\n if (!this.isOpen) {\n this.toggleDropdown();\n }\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n handleListboxKeydown(e: KeyboardEvent) {\n const items = this.availableOptions;\n const currentIndex = items.findIndex(item => item.value === this.ariaActivedescendant);\n\n switch (e.key) {\n case 'ArrowDown':\n case 'Tab':\n if (!e.shiftKey) {\n e.preventDefault();\n const nextIndex = currentIndex + 1 < items.length ? currentIndex + 1 : 0;\n this.ariaActivedescendant = items[nextIndex].value;\n this.focusOption(nextIndex);\n } else {\n e.preventDefault();\n const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;\n this.ariaActivedescendant = items[prevIndex].value;\n this.focusOption(prevIndex);\n }\n break;\n case 'ArrowUp':\n e.preventDefault();\n const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;\n this.ariaActivedescendant = items[prevIndex].value;\n this.focusOption(prevIndex);\n break;\n case 'Enter':\n e.preventDefault();\n if (this.ariaActivedescendant) {\n this.selectOption(items[currentIndex]);\n }\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n focusOption(index: number) {\n const option = this.availableOptions[index];\n if (!option) return; // Guard clause in case index is out of bounds\n\n const elementId = option.value;\n const element = this.el.shadowRoot?.getElementById(elementId) as HTMLLIElement;\n\n if (element) {\n element.focus(); // Set focus on the element\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n }\n\n getSelectedOptions() {\n return this.availableOptions.filter(option => option.selected);\n }\n\n renderOption(option: DropdownOption) {\n return (\n <li\n key={option.value}\n id={option.value}\n role=\"option\"\n tabindex=\"0\"\n aria-selected={option.selected ? 'true' : 'false'}\n onClick={e => {\n e.stopImmediatePropagation();\n this.selectOption(option);\n }}\n class={{ selected: !!option.selected }}\n >\n <label htmlFor={option.value}>\n <input aria-hidden=\"true\" id={option.value} type=\"checkbox\" checked={option.selected} />\n <span>{option.label}</span>\n </label>\n </li>\n );\n }\n\n render() {\n return (\n <Host>\n <div class=\"dropdown\" part=\"msd_dropdown\">\n <label class=\"dropdown-label\">\n {this.label}\n <slot name=\"label-icon\" aria-hidden=\"true\"></slot>\n </label>\n <button\n name={this.name}\n part={`msd_dropdown-button ${this.error ? 'msd_dropdown-button--error' : ''}`}\n class={{ dropbtn: true, open: this.isOpen, error: !!this.error }}\n onClick={() => this.toggleDropdown()}\n aria-haspopup=\"listbox\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-label={this.name}\n onKeyDown={e => this.handleSelectButtonKeyDown(e)}\n >\n <slot name=\"select-icon\" aria-hidden=\"true\"></slot>\n <span class=\"selected-option\" part=\"msd_dropdown-button-selected-label\">\n {this.getSelectedOptions().length > 1\n ? `Multiple ${this.name}s selected`\n : this.availableOptions.filter(o => o.selected)[0]?.label ?? this.availableOptions[0]?.label}\n </span>\n <span class={this.isOpen ? 'open' : 'closed'} aria-hidden=\"true\">\n <chevron-icon width=\"16\" height=\"16\" />\n </span>\n </button>\n {this.error ? <span class=\"error\">{this.error}</span> : null}\n {this.isOpen ? null : (\n <div class={'selected-options'}>\n {this.getSelectedOptions().map(option => (\n <span class=\"selected-option\">\n {option.label}\n <button key={option.label} onClick={() => this.selectOption(option)}>\n <close-icon />\n </button>\n </span>\n ))}\n </div>\n )}\n {this.isOpen ? (\n <div class=\"dropdown-content\" part=\"msd_dropdown-content\">\n <ul\n tabindex=\"-1\"\n role=\"listbox\"\n aria-label={this.name}\n aria-multiselectable={true}\n aria-activedescendant={this.ariaActivedescendant}\n onKeyDown={e => this.handleListboxKeydown(e)}\n >\n {this.availableOptions.map(option => this.renderOption(option))}\n </ul>\n </div>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1,6 +1,62 @@
1
1
  .radio-group {
2
2
  display: flex;
3
3
  flex-direction: column;
4
+ gap: 0.5rem;
5
+ --nylas-primary: #2563eb;
6
+ --nylas-error: #cc4841;
7
+ --nylas-error-pressed: #992222;
8
+ --nylas-wraning: #f06c00;
9
+ --nylas-success: #16a392;
10
+ --nylas-info: #2b8fc2;
11
+ --nylas-base-0: #ffffff;
12
+ --nylas-base-25: #fcfcfd;
13
+ --nylas-base-50: #f8f9fc;
14
+ --nylas-base-100: #eaecf5;
15
+ --nylas-base-200: #d5d9eb;
16
+ --nylas-base-300: #b3b8d8;
17
+ --nylas-base-400: #717bbc;
18
+ --nylas-base-500: #4e5ba6;
19
+ --nylas-base-600: #3e4784;
20
+ --nylas-base-700: #263f72;
21
+ --nylas-base-800: #293056;
22
+ --nylas-base-900: #101323;
23
+ --nylas-base-950: #0e101b;
24
+ --nylas-border-radius: 0.25rem;
25
+ --nylas-border-radius-2x: 0.5rem;
26
+ --nylas-border-radius-3x: 0.75rem;
27
+ --nylas-font-family: "Inter", sans-serif;
28
+ }
29
+ .radio-group slot[name=label] {
30
+ display: flex;
31
+ color: var(--nylas-base-800, #293056);
32
+ font-size: 14px;
33
+ font-style: normal;
34
+ font-weight: 400;
35
+ line-height: 150%;
36
+ font-size: 16px;
37
+ }
38
+ .radio-group slot[name=label].error {
39
+ color: var(--nylas-error);
40
+ }
41
+ .radio-group slot[name=label] span.required {
42
+ color: var(--nylas-error);
43
+ padding: 0 0.25rem;
44
+ }
45
+ .radio-group slot[name=label] p {
46
+ margin: 0;
47
+ }
48
+ .radio-group slot[name=label] p.error {
49
+ color: var(--nylas-error);
50
+ }
51
+ .radio-group slot[name=label] .error {
52
+ color: var(--nylas-error);
53
+ }
54
+ .radio-group span.error {
55
+ color: var(--nylas-error);
56
+ font-size: 14px;
57
+ font-weight: 400;
58
+ line-height: 20px;
59
+ font-family: var(--nylas-font-family);
4
60
  }
5
61
  .radio-group label {
6
62
  display: flex;
@@ -19,12 +75,12 @@
19
75
  width: 20px;
20
76
  height: 20px;
21
77
  color: var(--nylas-primary);
22
- margin-top: 16px;
23
78
  }
24
79
  .radio-group label .radio-option p {
25
80
  display: flex;
26
81
  flex-direction: column;
27
82
  gap: 0.5rem;
83
+ margin: 0;
28
84
  }
29
85
  .radio-group label .radio-option p .title {
30
86
  font-size: 16px;
@@ -4,17 +4,31 @@ export class RadioButtonGroup {
4
4
  this.name = 'radio-group';
5
5
  this.options = [];
6
6
  this.defaultSelectedValue = '';
7
+ this.label = undefined;
8
+ this.required = false;
7
9
  this.selectedValue = this.defaultSelectedValue;
10
+ this.error = '';
11
+ }
12
+ handleBookingFormSubmitted(event) {
13
+ if (this.required && !this.selectedValue) {
14
+ this.error = `${this.label} is required.`;
15
+ return;
16
+ }
17
+ if (this.error) {
18
+ event.preventDefault();
19
+ }
8
20
  }
9
21
  handleChange(value) {
22
+ this.error = '';
10
23
  this.selectedValue = value;
11
- this.radioSelectionChanged.emit({
24
+ this.nylasFormRadioChanged.emit({
12
25
  value,
13
26
  name: this.name,
27
+ label: this.label,
14
28
  });
15
29
  }
16
30
  render() {
17
- return (h("div", { key: '82c0a38507193f6e941c820c38f9e5c477dc14dc', class: "radio-group" }, this.options.map(option => (h("label", null, h("div", { class: "radio-option" }, h("input", { type: "radio", name: this.name, value: option.value, checked: this.selectedValue === option.value, onChange: () => this.handleChange(option.value) }), h("p", null, h("span", { class: "title" }, option.label), h("span", { class: "description" }, option.description))))))));
31
+ return (h("div", { key: '11cf3c389f44bd4758e4b649e7714c4b43eac706', class: "radio-group" }, h("slot", { key: 'fc49aed7f9f72234f78146c3cb32cafba1f5f8ea', name: "label" }, this.label && (h("p", { class: { error: !!this.error } }, h("span", { class: "label" }, this.label), this.required && h("span", { class: "required" }, "*")))), this.options.map(option => (h("label", null, h("div", { class: "radio-option" }, h("input", { type: "radio", name: this.name, value: option.value, checked: this.selectedValue === option.value, onChange: () => this.handleChange(option.value) }), h("p", null, h("span", { class: "title" }, option.label), h("span", { class: "description" }, option.description)))))), this.error && h("span", { class: "error help-text" }, this.error)));
18
32
  }
19
33
  static get is() { return "radio-button-group"; }
20
34
  static get encapsulation() { return "shadow"; }
@@ -42,7 +56,7 @@ export class RadioButtonGroup {
42
56
  "optional": false,
43
57
  "docs": {
44
58
  "tags": [],
45
- "text": ""
59
+ "text": "The name of the radio group. This is used to identify the radio group when submitting a form."
46
60
  },
47
61
  "attribute": "name",
48
62
  "reflect": false,
@@ -60,7 +74,7 @@ export class RadioButtonGroup {
60
74
  "optional": false,
61
75
  "docs": {
62
76
  "tags": [],
63
- "text": ""
77
+ "text": "The list of options in the radio group.\nEach option has a label and a value and an optional description."
64
78
  },
65
79
  "defaultValue": "[]"
66
80
  },
@@ -76,23 +90,59 @@ export class RadioButtonGroup {
76
90
  "optional": false,
77
91
  "docs": {
78
92
  "tags": [],
79
- "text": ""
93
+ "text": "The default selected value of the radio group."
80
94
  },
81
95
  "attribute": "default-selected-value",
82
96
  "reflect": false,
83
97
  "defaultValue": "''"
98
+ },
99
+ "label": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "string",
104
+ "resolved": "string | undefined",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": true,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "The label of the radio group. This is displayed above the radio group.\nLabel is optional. You can also use the slot 'label' to add a label."
112
+ },
113
+ "attribute": "label",
114
+ "reflect": false
115
+ },
116
+ "required": {
117
+ "type": "boolean",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "boolean",
121
+ "resolved": "boolean",
122
+ "references": {}
123
+ },
124
+ "required": false,
125
+ "optional": false,
126
+ "docs": {
127
+ "tags": [],
128
+ "text": "Whether the radio group is required. If true, the radio group must have a value when submitting a form.\nDefault is false. If the radio group is required and the value is empty, an error message is displayed."
129
+ },
130
+ "attribute": "required",
131
+ "reflect": false,
132
+ "defaultValue": "false"
84
133
  }
85
134
  };
86
135
  }
87
136
  static get states() {
88
137
  return {
89
- "selectedValue": {}
138
+ "selectedValue": {},
139
+ "error": {}
90
140
  };
91
141
  }
92
142
  static get events() {
93
143
  return [{
94
- "method": "radioSelectionChanged",
95
- "name": "radioSelectionChanged",
144
+ "method": "nylasFormRadioChanged",
145
+ "name": "nylasFormRadioChanged",
96
146
  "bubbles": true,
97
147
  "cancelable": true,
98
148
  "composed": true,
@@ -101,11 +151,20 @@ export class RadioButtonGroup {
101
151
  "text": "This event is fired when the selected value changes."
102
152
  },
103
153
  "complexType": {
104
- "original": "{\n value: string;\n name: string;\n }",
105
- "resolved": "{ value: string; name: string; }",
154
+ "original": "{\n value: string;\n name: string;\n label?: string;\n }",
155
+ "resolved": "{ value: string; name: string; label?: string | undefined; }",
106
156
  "references": {}
107
157
  }
108
158
  }];
109
159
  }
160
+ static get listeners() {
161
+ return [{
162
+ "name": "bookingFormSubmitted",
163
+ "method": "handleBookingFormSubmitted",
164
+ "target": "document",
165
+ "capture": false,
166
+ "passive": false
167
+ }];
168
+ }
110
169
  }
111
170
  //# sourceMappingURL=radio-button-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-button-group.js","sourceRoot":"","sources":["../../../../src/components/design-system/radio-button-group/radio-button-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAO/E,MAAM,OAAO,gBAAgB;;oBACJ,aAAa;uBACwC,EAAE;oCACvC,EAAE;6BACR,IAAI,CAAC,oBAAoB;;IAU1D,YAAY,CAAC,KAAa;QACxB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC;YAC9B,KAAK;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,aAAa,IACrB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAC1B;YACE,WAAK,KAAK,EAAC,cAAc;gBACvB,aAAO,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,GAAI;gBAC3J;oBACE,YAAM,KAAK,EAAC,OAAO,IAAE,MAAM,CAAC,KAAK,CAAQ;oBACzC,YAAM,KAAK,EAAC,aAAa,IAAE,MAAM,CAAC,WAAW,CAAQ,CACnD,CACA,CACA,CACT,CAAC,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["// src/components/radio-group/radio-group.tsx\nimport { Component, h, Prop, State, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'radio-button-group',\n styleUrl: 'radio-button-group.scss',\n shadow: true,\n})\nexport class RadioButtonGroup {\n @Prop() name: string = 'radio-group';\n @Prop() options: { label: string; value: string; description?: string }[] = [];\n @Prop() defaultSelectedValue: string = '';\n @State() selectedValue: string = this.defaultSelectedValue;\n\n /**\n * This event is fired when the selected value changes.\n */\n @Event() radioSelectionChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n handleChange(value: string) {\n this.selectedValue = value;\n this.radioSelectionChanged.emit({\n value,\n name: this.name,\n });\n }\n\n render() {\n return (\n <div class=\"radio-group\">\n {this.options.map(option => (\n <label>\n <div class=\"radio-option\">\n <input type=\"radio\" name={this.name} value={option.value} checked={this.selectedValue === option.value} onChange={() => this.handleChange(option.value)} />\n <p>\n <span class=\"title\">{option.label}</span>\n <span class=\"description\">{option.description}</span>\n </p>\n </div>\n </label>\n ))}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"radio-button-group.js","sourceRoot":"","sources":["../../../../src/components/design-system/radio-button-group/radio-button-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAWvF,MAAM,OAAO,gBAAgB;;oBAIJ,aAAa;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AAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,GAAI;oBAC3J;wBACE,YAAM,KAAK,EAAC,OAAO,IAAE,MAAM,CAAC,KAAK,CAAQ;wBACzC,YAAM,KAAK,EAAC,aAAa,IAAE,MAAM,CAAC,WAAW,CAAQ,CACnD,CACA,CACA,CACT,CAAC;YACD,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,KAAK,CAAQ,CAC5D,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["// src/components/radio-group/radio-group.tsx\nimport { Component, h, Prop, State, Event, EventEmitter, Listen } from '@stencil/core';\n\n/**\n * The `radio-button-group` component is a UI component that allows users to select a single option from a list of options.\n * This component is used in the scheduling form to input radio button type inputs.\n */\n@Component({\n tag: 'radio-button-group',\n styleUrl: 'radio-button-group.scss',\n shadow: true,\n})\nexport class RadioButtonGroup {\n /**\n * The name of the radio group. This is used to identify the radio group when submitting a form.\n */\n @Prop() name: string = 'radio-group';\n /**\n * The list of options in the radio group.\n * Each option has a label and a value and an optional description.\n */\n @Prop() options: { label: string; value: string; description?: string }[] = [];\n /**\n * The default selected value of the radio group.\n */\n @Prop() defaultSelectedValue: string = '';\n /**\n * The label of the radio group. This is displayed above the radio group.\n * Label is optional. You can also use the slot 'label' to add a label.\n */\n @Prop() label?: string;\n /**\n * Whether the radio group is required. If true, the radio group must have a value when submitting a form.\n * Default is false. If the radio group is required and the value is empty, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * The selected value of the radio group.\n */\n @State() selectedValue: string = this.defaultSelectedValue;\n /**\n * The error message state.\n */\n @State() error: string = '';\n /**\n * This event is fired when the selected value changes.\n */\n @Event() nylasFormRadioChanged!: EventEmitter<{\n value: string;\n name: string;\n label?: string;\n }>;\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n if (this.required && !this.selectedValue) {\n this.error = `${this.label} is required.`;\n return;\n }\n if (this.error) {\n event.preventDefault();\n }\n }\n\n handleChange(value: string) {\n this.error = '';\n this.selectedValue = value;\n this.nylasFormRadioChanged.emit({\n value,\n name: this.name,\n label: this.label,\n });\n }\n\n render() {\n return (\n <div class=\"radio-group\">\n <slot name=\"label\">\n {this.label && (\n <p class={{ error: !!this.error }}>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n )}\n </slot>\n {this.options.map(option => (\n <label>\n <div class=\"radio-option\">\n <input type=\"radio\" name={this.name} value={option.value} checked={this.selectedValue === option.value} onChange={() => this.handleChange(option.value)} />\n <p>\n <span class=\"title\">{option.label}</span>\n <span class=\"description\">{option.description}</span>\n </p>\n </div>\n </label>\n ))}\n {this.error && <span class=\"error help-text\">{this.error}</span>}\n </div>\n );\n }\n}\n"]}
@@ -8,6 +8,8 @@ export class SelectDropdown {
8
8
  this.label = undefined;
9
9
  this.required = false;
10
10
  this.pluralizedLabel = '';
11
+ this.dropdownButtonText = undefined;
12
+ this.withChevron = true;
11
13
  this.selectedOption = this.defaultSelectedOption || null;
12
14
  this.isOpen = false;
13
15
  this.searchValue = '';
@@ -145,6 +147,12 @@ export class SelectDropdown {
145
147
  this.isOpen = false;
146
148
  }
147
149
  }
150
+ generateButtonText() {
151
+ if (this.dropdownButtonText) {
152
+ return this.dropdownButtonText;
153
+ }
154
+ return this.selectedOption?.label ? `${this.selectedOption?.label + this.pluralizedLabel}` : '';
155
+ }
148
156
  handleOutsideClick(event) {
149
157
  const path = event.composedPath();
150
158
  const isClickInside = path.includes(this.el);
@@ -153,11 +161,11 @@ export class SelectDropdown {
153
161
  }
154
162
  }
155
163
  render() {
156
- return (h("div", { key: '8c4d201f5fa71b9707a1cb50adc62399f32e5aba', class: "dropdown", part: "sd_dropdown" }, h("label", { key: 'b2e4851e2925d7e44c36a538a28001a838124cba', part: "sd_dropdown_label", class: { error: !!this.errorMessage } }, this.label && (h("p", null, h("span", { class: "label" }, this.label), this.required && h("span", { class: "required" }, "*"))), h("button", { key: '66559916660643e8ed8ed67bf821fa2eb122ea6c', part: "sd_dropdown-button", class: { dropbtn: true, open: this.isOpen, error: !!this.errorMessage }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-label": this.name, onKeyDown: e => this.handleSelectButtonKeyDown(e) }, h("slot", { key: '2916f44530f59d218171c54dfe7a6949b3f773c4', name: "select-icon", "aria-hidden": "true" }), h("span", { key: '21653fb2f1225a0f9d64b6939da10b66eeeb8fcc', class: "selected-option", part: "sd_dropdown-button-selected-label" }, this.selectedOption?.label ? `${this.selectedOption?.label + this.pluralizedLabel}` : ''), h("span", { key: '900f31e8a1ca22a3be2f4ca965bdaa9099ef3fca', class: {
164
+ return (h("div", { key: 'f643753d922b05b52ab0b8fe0dbc15733a9c699b', class: "dropdown", part: "sd_dropdown" }, h("label", { key: '14478d5755183604ee9aa617ab9540be7c57604e', part: "sd_dropdown_label", class: { error: !!this.errorMessage } }, this.label && (h("p", null, h("span", { class: "label" }, this.label), this.required && h("span", { class: "required" }, "*"))), h("button", { key: '0a053de6ef29c2c8ca232f52d1a3e787f54e69cc', part: "sd_dropdown-button", class: { dropbtn: true, open: this.isOpen, error: !!this.errorMessage }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-label": this.name, onKeyDown: e => this.handleSelectButtonKeyDown(e) }, h("slot", { key: '857627db765aafdcf8c5241c97959cab5e323c39', name: "select-icon", "aria-hidden": "true" }), h("span", { key: '18d16c1a7edc6fed463de8c9739782dbd0839b7c', class: "selected-option", part: "sd_dropdown-button-selected-label" }, this.generateButtonText()), this.withChevron && (h("span", { class: {
157
165
  open: this.isOpen,
158
166
  closed: !this.isOpen,
159
167
  chevron: true,
160
- }, "aria-hidden": "true" }, h("chevron-icon", { key: 'd0a08c205df0a9258b699618cad25eff5085fe84', width: "16", height: "16" }))), this.errorMessage && h("span", { class: "error help-text" }, this.errorMessage)), this.isOpen ? (h("div", { class: "dropdown-content", part: "sd_dropdown-content" }, this.withSearch && (h("div", { class: { 'search-box': true, 'open': this.isOpen } }, h("search-icon", { width: "15", height: "15", class: 'icon' }), h("input", { type: "text", role: "combobox", placeholder: "Search", value: this.searchValue, ref: el => (this.inputRef = el), onInput: event => this.filterOptions(event), onKeyDown: e => this.handleComboboxKeyDown(e) }))), h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: e => this.handleListboxKeydown(e) }, this.filteredOptions.map(option => option.value && (h("li", { tabindex: "0", key: option.value, id: option.value, onClick: () => this.selectOption(option), role: "option" }, option.labelHTML ? option.labelHTML : option.label)))))) : null));
168
+ }, "aria-hidden": "true" }, h("chevron-icon", { width: "16", height: "16" })))), this.errorMessage && h("span", { class: "error help-text" }, this.errorMessage)), this.isOpen ? (h("div", { class: "dropdown-content", part: "sd_dropdown-content" }, this.withSearch && (h("div", { class: { 'search-box': true, 'open': this.isOpen } }, h("search-icon", { width: "15", height: "15", class: 'icon' }), h("input", { type: "text", role: "combobox", placeholder: "Search", value: this.searchValue, ref: el => (this.inputRef = el), onInput: event => this.filterOptions(event), onKeyDown: e => this.handleComboboxKeyDown(e) }))), h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: e => this.handleListboxKeydown(e) }, this.filteredOptions.map(option => option.value && (h("li", { tabindex: "0", key: option.value, id: option.value, onClick: () => this.selectOption(option), role: "option" }, option.labelHTML ? h("div", { part: "sd_dropdown-labelhtml" }, option.labelHTML) : option.label)))))) : null));
161
169
  }
162
170
  static get is() { return "select-dropdown"; }
163
171
  static get encapsulation() { return "shadow"; }
@@ -301,6 +309,41 @@ export class SelectDropdown {
301
309
  "attribute": "pluralized-label",
302
310
  "reflect": false,
303
311
  "defaultValue": "''"
312
+ },
313
+ "dropdownButtonText": {
314
+ "type": "string",
315
+ "mutable": false,
316
+ "complexType": {
317
+ "original": "string",
318
+ "resolved": "string | undefined",
319
+ "references": {}
320
+ },
321
+ "required": false,
322
+ "optional": true,
323
+ "docs": {
324
+ "tags": [],
325
+ "text": "Overrides the select dropdown to be used as a button with dropdownButtonText representing actions & dropdownText name on the dropdown intead of selected value"
326
+ },
327
+ "attribute": "dropdown-button-text",
328
+ "reflect": false
329
+ },
330
+ "withChevron": {
331
+ "type": "boolean",
332
+ "mutable": false,
333
+ "complexType": {
334
+ "original": "boolean",
335
+ "resolved": "boolean",
336
+ "references": {}
337
+ },
338
+ "required": false,
339
+ "optional": false,
340
+ "docs": {
341
+ "tags": [],
342
+ "text": "Should show chevron on button"
343
+ },
344
+ "attribute": "with-chevron",
345
+ "reflect": false,
346
+ "defaultValue": "true"
304
347
  }
305
348
  };
306
349
  }
@@ -1 +1 @@
1
- {"version":3,"file":"select-dropdown.js","sourceRoot":"","sources":["../../../../src/components/design-system/select-dropdown/select-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAqBvG,MAAM,OAAO,cAAc;;;uBAaW,EAAE;;0BAQR,IAAI;;wBAUN,KAAK;+BAKC,EAAE;8BAMa,IAAI,CAAC,qBAAqB,IAAI,IAAI;sBAIxD,KAAK;2BAID,EAAE;+BAIY,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;oCAMtB,EAAE;4BAKV,EAAE;;IAclC,qBAAqB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Prop, State, Watch } from '@stencil/core';\n\ninterface DropdownOption {\n labelHTML?: HTMLElement;\n label: string;\n value: string;\n}\n\n/**\n * The `select-dropdown` component is a dropdown that allows users to select an option from a list of options.\n * @part sd_dropdown - The dropdown container\n * @part sd_dropdown-button - The dropdown button\n * @part sd_dropdown-button-selected-label - The selected option label\n * @part sd_dropdown-content - The dropdown content\n * @part sd_dropdown_label - The dropdown label\n */\n@Component({\n tag: 'select-dropdown',\n styleUrl: 'select-dropdown.scss',\n shadow: true,\n})\nexport class SelectDropdown {\n @Element() el!: HTMLElement;\n\n private inputRef?: HTMLInputElement;\n\n // Props\n /**\n * The name of the dropdown\n */\n @Prop() name!: string;\n /**\n * The options to display in the dropdown\n */\n @Prop() options: DropdownOption[] = [];\n /**\n * The default selected option\n */\n @Prop() defaultSelectedOption?: DropdownOption;\n /**\n * Should show search input\n */\n @Prop() withSearch: boolean = true;\n\n /**\n * The label for the dropdown, skipped if no label is provided\n */\n @Prop() label?: string;\n\n /**\n * If true, the dropdown is required for form submission\n */\n @Prop() required: boolean = false;\n\n /**\n * Show pluralized label for the selected option. This is s tring that is appended to the selected option label as a suffix.\n */\n @Prop() pluralizedLabel: string = '';\n\n // States\n /**\n * The selected option\n */\n @State() selectedOption: DropdownOption | null = this.defaultSelectedOption || null;\n /**\n * The open state of the dropdown\n */\n @State() isOpen: boolean = false;\n /**\n * The search value for the dropdown\n */\n @State() searchValue: string = '';\n /**\n * The filtered options based on the search value\n */\n @State() filteredOptions: DropdownOption[] = [...this.options];\n /**\n * The aria-activedescendant attribute for the listbox element to indicate the currently active\n * option in the list box to screen readers. The value of aria-activedescendant is the ID of\n * the active option.\n */\n @State() ariaActivedescendant: string = '';\n\n /**\n * The error message to display when the value is empty or null and the dropdown is required\n */\n @State() errorMessage: string = '';\n\n // Events\n /**\n * This event is fired when the selected option is changed\n */\n @Event({ bubbles: true, composed: true }) nylasFormDropdownChanged!: EventEmitter<{\n value: DropdownOption['value'];\n name: string;\n error?: string;\n label?: string;\n }>;\n\n @Watch('options')\n optionsChangedHandler(newValue: DropdownOption[], oldValue: DropdownOption[]) {\n if (newValue === oldValue) {\n return;\n }\n this.filteredOptions = newValue;\n }\n\n @Watch('defaultSelectedOption')\n defaultSelectedOptionChangedHandler(newValue: DropdownOption, oldValue: DropdownOption) {\n if (typeof newValue === 'undefined' || newValue?.label === oldValue?.label) {\n return;\n }\n this.selectedOption = newValue;\n }\n\n // Lifecycle methods\n componentWillLoad() {\n this.filteredOptions = this.options;\n // Set the selected option to the first option if no option is selected\n if (!this.selectedOption && !!this.defaultSelectedOption) {\n this.selectedOption = this.defaultSelectedOption;\n }\n if (!this.selectedOption && this.options.length > 0) {\n this.selectedOption = this.options[0];\n }\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n this.validate(this.selectedOption?.value || '');\n if (this.errorMessage) {\n event.preventDefault();\n }\n }\n\n // Methods\n validate(value: string) {\n if (this.required && !value) {\n this.errorMessage = `${this.label} is required.`;\n } else {\n this.errorMessage = '';\n }\n }\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n filterOptions(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.searchValue = value;\n this.filteredOptions = this.options.filter(option => option.label.toLowerCase().includes(value.toLowerCase()));\n }\n\n selectOption(option: DropdownOption): void {\n this.errorMessage = '';\n this.selectedOption = option;\n this.toggleDropdown();\n this.nylasFormDropdownChanged.emit({\n value: option.value,\n name: this.name,\n error: this.errorMessage,\n label: this.label,\n });\n }\n\n handleSelectButtonKeyDown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n case 'Enter':\n event.preventDefault();\n if (!this.isOpen) {\n this.toggleDropdown();\n }\n this.inputRef?.focus();\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n handleListboxKeydown(e) {\n const items = this.filteredOptions; // Assuming this is the array of your current filtered options\n const currentIndex = items.findIndex(item => item.value === this.ariaActivedescendant);\n if (e.key === 'ArrowDown' || (e.key === 'Tab' && !e.shiftKey)) {\n e.preventDefault();\n if (currentIndex === items.length - 1) {\n this.ariaActivedescendant = '';\n this.inputRef?.focus();\n return;\n }\n const nextIndex = currentIndex + 1 < items.length ? currentIndex + 1 : 0;\n this.ariaActivedescendant = items[nextIndex].value;\n this.focusOption(nextIndex);\n } else if (e.key === 'ArrowUp' || (e.key === 'Tab' && e.shiftKey)) {\n e.preventDefault();\n if (currentIndex === 0) {\n this.ariaActivedescendant = '';\n this.inputRef?.focus();\n return;\n }\n const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;\n this.ariaActivedescendant = items[prevIndex].value;\n this.focusOption(prevIndex);\n } else if (e.key === 'Enter') {\n e.preventDefault();\n if (this.ariaActivedescendant) {\n this.selectOption(items[currentIndex]);\n }\n } else if (e.key === 'Escape') {\n this.isOpen = false;\n }\n }\n\n focusOption(index) {\n const option = this.filteredOptions[index];\n if (!option) return; // Guard clause in case index is out of bounds\n\n const elementId = option.value;\n const element = this.el.shadowRoot?.getElementById(elementId) as HTMLLIElement;\n\n if (element) {\n element.focus(); // Set focus on the element\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n }\n\n handleComboboxKeyDown(event: KeyboardEvent): void {\n if (event.key === 'ArrowDown' || (event.key == 'Tab' && !event.shiftKey)) {\n event.preventDefault();\n this.ariaActivedescendant = this.filteredOptions[0].value;\n this.focusOption(0);\n } else if (event.key === 'ArrowUp' || (event.key === 'Tab' && event.shiftKey)) {\n event.preventDefault();\n this.ariaActivedescendant = this.filteredOptions[this.filteredOptions.length - 1].value;\n this.focusOption(this.filteredOptions.length - 1);\n } else if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n\n // Event listeners\n @Listen('click', { target: 'document', capture: true })\n handleOutsideClick(event: MouseEvent) {\n // Get the path of the event\n const path = event.composedPath();\n\n // Check if the path includes the host element\n const isClickInside = path.includes(this.el);\n\n if (!isClickInside && this.isOpen) {\n this.isOpen = false;\n }\n }\n\n render() {\n return (\n <div class=\"dropdown\" part=\"sd_dropdown\">\n <label part=\"sd_dropdown_label\" class={{ error: !!this.errorMessage }}>\n {this.label && (\n <p>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n )}\n <button\n part=\"sd_dropdown-button\"\n class={{ dropbtn: true, open: this.isOpen, error: !!this.errorMessage }}\n onClick={() => this.toggleDropdown()}\n aria-haspopup=\"listbox\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-label={this.name}\n onKeyDown={e => this.handleSelectButtonKeyDown(e)}\n >\n <slot name=\"select-icon\" aria-hidden=\"true\"></slot>\n <span class=\"selected-option\" part=\"sd_dropdown-button-selected-label\">\n {this.selectedOption?.label ? `${this.selectedOption?.label + this.pluralizedLabel}` : ''}\n </span>\n <span\n class={{\n open: this.isOpen,\n closed: !this.isOpen,\n chevron: true,\n }}\n aria-hidden=\"true\"\n >\n <chevron-icon width=\"16\" height=\"16\" />\n </span>\n </button>\n {this.errorMessage && <span class=\"error help-text\">{this.errorMessage}</span>}\n </label>\n\n {this.isOpen ? (\n <div class=\"dropdown-content\" part=\"sd_dropdown-content\">\n {this.withSearch && (\n <div class={{ 'search-box': true, 'open': this.isOpen }}>\n <search-icon width=\"15\" height=\"15\" class={'icon'} />\n <input\n type=\"text\"\n role=\"combobox\"\n placeholder=\"Search\"\n value={this.searchValue}\n ref={el => (this.inputRef = el)}\n onInput={event => this.filterOptions(event)}\n onKeyDown={e => this.handleComboboxKeyDown(e)}\n />\n </div>\n )}\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant} onKeyDown={e => this.handleListboxKeydown(e)}>\n {this.filteredOptions.map(\n option =>\n option.value && (\n <li tabindex=\"0\" key={option.value} id={option.value} onClick={() => this.selectOption(option)} role=\"option\">\n {option.labelHTML ? option.labelHTML : option.label}\n </li>\n ),\n )}\n </ul>\n </div>\n ) : null}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"select-dropdown.js","sourceRoot":"","sources":["../../../../src/components/design-system/select-dropdown/select-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAsBvG,MAAM,OAAO,cAAc;;;uBAaW,EAAE;;0BAQR,IAAI;;wBAUN,KAAK;+BAKC,EAAE;;2BAQL,IAAI;8BAKc,IAAI,CAAC,qBAAqB,IAAI,IAAI;sBAIxD,KAAK;2BAID,EAAE;+BAIY,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;oCAMtB,EAAE;4BAKV,EAAE;;IAclC,qBAAqB,CAAC,QAA0B,EAAE,QAA0B;QAC1E,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC1B,OAAO;QACT,CAAC;QACD,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;IAClC,CAAC;IAGD,mCAAmC,CAAC,QAAwB,EAAE,QAAwB;QACpF,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,EAAE,KAAK,KAAK,QAAQ,EAAE,KAAK,EAAE,CAAC;YAC3E,OAAO;QACT,CAAC;QACD,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;IACjC,CAAC;IAGD,iBAAiB;QACf,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC;QAEpC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACzD,IAAI,CAAC,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3C,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAC7C,CACE,CACP;gBACD,UAAI,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,gBAAa,IAAI,CAAC,IAAI,2BAAyB,IAAI,CAAC,oBAAoB,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IACnJ,IAAI,CAAC,eAAe,CAAC,GAAG,CACvB,MAAM,CAAC,EAAE,CACP,MAAM,CAAC,KAAK,IAAI,CACd,UAAI,QAAQ,EAAC,GAAG,EAAC,GAAG,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,IAAI,EAAC,QAAQ,IAC1G,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,WAAK,IAAI,EAAC,uBAAuB,IAAE,MAAM,CAAC,SAAS,CAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAC1F,CACN,CACJ,CACE,CACD,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Prop, State, Watch } from '@stencil/core';\n\ninterface DropdownOption {\n labelHTML?: HTMLElement;\n label: string;\n value: string;\n}\n\n/**\n * The `select-dropdown` component is a dropdown that allows users to select an option from a list of options.\n * This component is used in the scheduling form to input dropdown type inputs.\n * @part sd_dropdown - The dropdown container\n * @part sd_dropdown-button - The dropdown button\n * @part sd_dropdown-button-selected-label - The selected option label\n * @part sd_dropdown-content - The dropdown content\n * @part sd_dropdown_label - The dropdown label\n */\n@Component({\n tag: 'select-dropdown',\n styleUrl: 'select-dropdown.scss',\n shadow: true,\n})\nexport class SelectDropdown {\n @Element() el!: HTMLElement;\n\n private inputRef?: HTMLInputElement;\n\n // Props\n /**\n * The name of the dropdown\n */\n @Prop() name!: string;\n /**\n * The options to display in the dropdown\n */\n @Prop() options: DropdownOption[] = [];\n /**\n * The default selected option\n */\n @Prop() defaultSelectedOption?: DropdownOption;\n /**\n * Should show search input\n */\n @Prop() withSearch: boolean = true;\n\n /**\n * The label for the dropdown, skipped if no label is provided\n */\n @Prop() label?: string;\n\n /**\n * If true, the dropdown is required for form submission\n */\n @Prop() required: boolean = false;\n\n /**\n * Show pluralized label for the selected option. This is s tring that is appended to the selected option label as a suffix.\n */\n @Prop() pluralizedLabel: string = '';\n /**\n * Overrides the select dropdown to be used as a button with dropdownButtonText representing actions & dropdownText name on the dropdown intead of selected value\n */\n @Prop() dropdownButtonText?: string;\n /**\n * Should show chevron on button\n */\n @Prop() withChevron: boolean = true;\n // States\n /**\n * The selected option\n */\n @State() selectedOption: DropdownOption | null = this.defaultSelectedOption || null;\n /**\n * The open state of the dropdown\n */\n @State() isOpen: boolean = false;\n /**\n * The search value for the dropdown\n */\n @State() searchValue: string = '';\n /**\n * The filtered options based on the search value\n */\n @State() filteredOptions: DropdownOption[] = [...this.options];\n /**\n * The aria-activedescendant attribute for the listbox element to indicate the currently active\n * option in the list box to screen readers. The value of aria-activedescendant is the ID of\n * the active option.\n */\n @State() ariaActivedescendant: string = '';\n\n /**\n * The error message to display when the value is empty or null and the dropdown is required\n */\n @State() errorMessage: string = '';\n\n // Events\n /**\n * This event is fired when the selected option is changed\n */\n @Event({ bubbles: true, composed: true }) nylasFormDropdownChanged!: EventEmitter<{\n value: DropdownOption['value'];\n name: string;\n error?: string;\n label?: string;\n }>;\n\n @Watch('options')\n optionsChangedHandler(newValue: DropdownOption[], oldValue: DropdownOption[]) {\n if (newValue === oldValue) {\n return;\n }\n this.filteredOptions = newValue;\n }\n\n @Watch('defaultSelectedOption')\n defaultSelectedOptionChangedHandler(newValue: DropdownOption, oldValue: DropdownOption) {\n if (typeof newValue === 'undefined' || newValue?.label === oldValue?.label) {\n return;\n }\n this.selectedOption = newValue;\n }\n\n // Lifecycle methods\n componentWillLoad() {\n this.filteredOptions = this.options;\n // Set the selected option to the first option if no option is selected\n if (!this.selectedOption && !!this.defaultSelectedOption) {\n this.selectedOption = this.defaultSelectedOption;\n }\n if (!this.selectedOption && this.options.length > 0) {\n this.selectedOption = this.options[0];\n }\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n this.validate(this.selectedOption?.value || '');\n if (this.errorMessage) {\n event.preventDefault();\n }\n }\n\n // Methods\n validate(value: string) {\n if (this.required && !value) {\n this.errorMessage = `${this.label} is required.`;\n } else {\n this.errorMessage = '';\n }\n }\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n filterOptions(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.searchValue = value;\n this.filteredOptions = this.options.filter(option => option.label.toLowerCase().includes(value.toLowerCase()));\n }\n\n selectOption(option: DropdownOption): void {\n this.errorMessage = '';\n this.selectedOption = option;\n this.toggleDropdown();\n this.nylasFormDropdownChanged.emit({\n value: option.value,\n name: this.name,\n error: this.errorMessage,\n label: this.label,\n });\n }\n\n handleSelectButtonKeyDown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n case 'Enter':\n event.preventDefault();\n if (!this.isOpen) {\n this.toggleDropdown();\n }\n this.inputRef?.focus();\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n handleListboxKeydown(e) {\n const items = this.filteredOptions; // Assuming this is the array of your current filtered options\n const currentIndex = items.findIndex(item => item.value === this.ariaActivedescendant);\n if (e.key === 'ArrowDown' || (e.key === 'Tab' && !e.shiftKey)) {\n e.preventDefault();\n if (currentIndex === items.length - 1) {\n this.ariaActivedescendant = '';\n this.inputRef?.focus();\n return;\n }\n const nextIndex = currentIndex + 1 < items.length ? currentIndex + 1 : 0;\n this.ariaActivedescendant = items[nextIndex].value;\n this.focusOption(nextIndex);\n } else if (e.key === 'ArrowUp' || (e.key === 'Tab' && e.shiftKey)) {\n e.preventDefault();\n if (currentIndex === 0) {\n this.ariaActivedescendant = '';\n this.inputRef?.focus();\n return;\n }\n const prevIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : items.length - 1;\n this.ariaActivedescendant = items[prevIndex].value;\n this.focusOption(prevIndex);\n } else if (e.key === 'Enter') {\n e.preventDefault();\n if (this.ariaActivedescendant) {\n this.selectOption(items[currentIndex]);\n }\n } else if (e.key === 'Escape') {\n this.isOpen = false;\n }\n }\n\n focusOption(index) {\n const option = this.filteredOptions[index];\n if (!option) return; // Guard clause in case index is out of bounds\n\n const elementId = option.value;\n const element = this.el.shadowRoot?.getElementById(elementId) as HTMLLIElement;\n\n if (element) {\n element.focus(); // Set focus on the element\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n }\n }\n\n handleComboboxKeyDown(event: KeyboardEvent): void {\n if (event.key === 'ArrowDown' || (event.key == 'Tab' && !event.shiftKey)) {\n event.preventDefault();\n this.ariaActivedescendant = this.filteredOptions[0].value;\n this.focusOption(0);\n } else if (event.key === 'ArrowUp' || (event.key === 'Tab' && event.shiftKey)) {\n event.preventDefault();\n this.ariaActivedescendant = this.filteredOptions[this.filteredOptions.length - 1].value;\n this.focusOption(this.filteredOptions.length - 1);\n } else if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n\n generateButtonText(): string {\n if (this.dropdownButtonText) {\n return this.dropdownButtonText;\n }\n return this.selectedOption?.label ? `${this.selectedOption?.label + this.pluralizedLabel}` : '';\n }\n\n // Event listeners\n @Listen('click', { target: 'document', capture: true })\n handleOutsideClick(event: MouseEvent) {\n // Get the path of the event\n const path = event.composedPath();\n\n // Check if the path includes the host element\n const isClickInside = path.includes(this.el);\n\n if (!isClickInside && this.isOpen) {\n this.isOpen = false;\n }\n }\n\n render() {\n return (\n <div class=\"dropdown\" part=\"sd_dropdown\">\n <label part=\"sd_dropdown_label\" class={{ error: !!this.errorMessage }}>\n {this.label && (\n <p>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n )}\n <button\n part=\"sd_dropdown-button\"\n class={{ dropbtn: true, open: this.isOpen, error: !!this.errorMessage }}\n onClick={() => this.toggleDropdown()}\n aria-haspopup=\"listbox\"\n aria-expanded={this.isOpen ? 'true' : 'false'}\n aria-label={this.name}\n onKeyDown={e => this.handleSelectButtonKeyDown(e)}\n >\n <slot name=\"select-icon\" aria-hidden=\"true\"></slot>\n <span class=\"selected-option\" part=\"sd_dropdown-button-selected-label\">\n {this.generateButtonText()}\n </span>\n {this.withChevron && (\n <span\n class={{\n open: this.isOpen,\n closed: !this.isOpen,\n chevron: true,\n }}\n aria-hidden=\"true\"\n >\n <chevron-icon width=\"16\" height=\"16\" />\n </span>\n )}\n </button>\n {this.errorMessage && <span class=\"error help-text\">{this.errorMessage}</span>}\n </label>\n\n {this.isOpen ? (\n <div class=\"dropdown-content\" part=\"sd_dropdown-content\">\n {this.withSearch && (\n <div class={{ 'search-box': true, 'open': this.isOpen }}>\n <search-icon width=\"15\" height=\"15\" class={'icon'} />\n <input\n type=\"text\"\n role=\"combobox\"\n placeholder=\"Search\"\n value={this.searchValue}\n ref={el => (this.inputRef = el)}\n onInput={event => this.filterOptions(event)}\n onKeyDown={e => this.handleComboboxKeyDown(e)}\n />\n </div>\n )}\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant} onKeyDown={e => this.handleListboxKeydown(e)}>\n {this.filteredOptions.map(\n option =>\n option.value && (\n <li tabindex=\"0\" key={option.value} id={option.value} onClick={() => this.selectOption(option)} role=\"option\">\n {option.labelHTML ? <div part=\"sd_dropdown-labelhtml\">{option.labelHTML}</div> : option.label}\n </li>\n ),\n )}\n </ul>\n </div>\n ) : null}\n </div>\n );\n }\n}\n"]}
@@ -10,6 +10,7 @@ export class TextareaComponent {
10
10
  this.readOnly = false;
11
11
  this.autoFocus = false;
12
12
  this.maxLength = 255;
13
+ this.type = 'multi_line_text';
13
14
  this.value = '';
14
15
  this.error = '';
15
16
  }
@@ -30,6 +31,7 @@ export class TextareaComponent {
30
31
  name: this.name,
31
32
  error: this.error,
32
33
  label: this.label,
34
+ type: this.type,
33
35
  });
34
36
  }
35
37
  validate(value) {
@@ -44,7 +46,7 @@ export class TextareaComponent {
44
46
  }
45
47
  }
46
48
  render() {
47
- return (h("label", { key: 'c50781bd0a20ae976d5a8991f62a4491ad92cf26', part: "tc__label", class: { error: !!this.error } }, h("p", { key: '379135af9453a717675b92dd2a2bd9a7dcf0a201' }, h("span", { key: '03f6acdb661f443ada626d83a2d3bce76ce3b451', class: "label" }, this.label), this.required && h("span", { class: "required" }, "*")), h("textarea", { key: '93ad5be33536e6464021d594c3a30a8c251a9977', name: this.name, placeholder: this.placeholder, readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, maxLength: this.maxLength, onInput: e => this.handleInput(e), class: { error: !!this.error }, part: "tc__textarea" }), this.error && h("span", { class: "error help-text" }, this.error)));
49
+ return (h("label", { key: 'd3b47fecea63bd4674d4d9e67e7f74697004b03e', part: "tc__label", class: { error: !!this.error } }, h("p", { key: '81b682db7ded02d9111661e2ffe1cc0650546bfc' }, h("span", { key: '2e2120f1d32af6b5fffff7ee913f01c6d73155eb', class: "label" }, this.label), this.required && h("span", { class: "required" }, "*")), h("textarea", { key: 'bc7426f389b42a25a251a3b8b878e3b2ee8fd5a0', name: this.name, placeholder: this.placeholder, readOnly: this.readOnly, autoFocus: this.autoFocus, value: this.value, maxLength: this.maxLength, onInput: e => this.handleInput(e), class: { error: !!this.error }, part: "tc__textarea" }), this.error && h("span", { class: "error help-text" }, this.error)));
48
50
  }
49
51
  static get is() { return "textarea-component"; }
50
52
  static get encapsulation() { return "shadow"; }
@@ -203,6 +205,24 @@ export class TextareaComponent {
203
205
  "attribute": "max-length",
204
206
  "reflect": false,
205
207
  "defaultValue": "255"
208
+ },
209
+ "type": {
210
+ "type": "string",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "string",
214
+ "resolved": "string",
215
+ "references": {}
216
+ },
217
+ "required": false,
218
+ "optional": false,
219
+ "docs": {
220
+ "tags": [],
221
+ "text": "The type"
222
+ },
223
+ "attribute": "type",
224
+ "reflect": false,
225
+ "defaultValue": "'multi_line_text'"
206
226
  }
207
227
  };
208
228
  }
@@ -224,8 +244,8 @@ export class TextareaComponent {
224
244
  "text": "Event emitted when the value of the textarea changes.\nUseful for parent components to capture user input."
225
245
  },
226
246
  "complexType": {
227
- "original": "{ value: string; name: string; error: string; label: string }",
228
- "resolved": "{ value: string; name: string; error: string; label: string; }",
247
+ "original": "{ value: string; name: string; error: string; label: string; type: string }",
248
+ "resolved": "{ value: string; name: string; error: string; label: string; type: string; }",
229
249
  "references": {}
230
250
  }
231
251
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"textarea-component.js","sourceRoot":"","sources":["../../../../src/components/design-system/textarea-component/textarea-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,YAAY,MAAM,eAAe,CAAC;AAczC,MAAM,OAAO,iBAAiB;;oBAIL,UAAU;4BAKF,EAAE;qBAKT,EAAE;2BAKI,EAAE;wBAMJ,KAAK;wBAKL,KAAK;yBAKJ,KAAK;yBAKN,GAAG;qBAKN,EAAE;qBAKF,E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AC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ;gBACtC,IAAI,CAAC,QAAQ,IAAI,YAAM,KAAK,EAAC,UAAU,QAAS,CAC/C;YACJ,iEACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAC9B,IAAI,EAAC,cAAc,GACnB;YACD,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,KAAK,CAAQ,CAC1D,CACT,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Event, EventEmitter, Listen } from '@stencil/core';\nimport sanitizeHtml from 'sanitize-html'; // Importing sanitize-html to clean inputs and prevent XSS attacks.\n\n/**\n * `textarea-component` allows users to enter multiline text.\n * It is ideal for larger inputs like comments or messages in a form.\n *\n * @part tc__label - The label for the textarea.\n * @part tc__textarea - The textarea element.\n */\n@Component({\n tag: 'textarea-component',\n styleUrl: 'textarea-component.scss',\n shadow: true,\n})\nexport class TextareaComponent {\n /**\n * The name of the textarea, important for form submissions.\n */\n @Prop() name: string = 'textarea';\n\n /**\n * The default value of the textarea, appearing when the component first renders.\n */\n @Prop() defaultValue: string = '';\n\n /**\n * The label for the textarea, displayed above it.\n */\n @Prop() label: string = '';\n\n /**\n * Placeholder text shown in the textarea when it is empty.\n */\n @Prop() placeholder: string = '';\n\n /**\n * Specifies if the textarea is required for form submission.\n * If true, an error message shows if left empty.\n */\n @Prop() required: boolean = false;\n\n /**\n * If true, the textarea cannot be edited by the user.\n */\n @Prop() readOnly: boolean = false;\n\n /**\n * Automatically focus the textarea when the component loads.\n */\n @Prop() autoFocus: boolean = false;\n\n /**\n * The maximum number of characters allowed in the textarea.\n */\n @Prop() maxLength: number = 255;\n\n /**\n * State for the current value of the textarea.\n */\n @State() value: string = '';\n\n /**\n * State for managing the display of any error messages.\n */\n @State() error: string = '';\n\n /**\n * Event emitted when the value of the textarea changes.\n * Useful for parent components to capture user input.\n */\n @Event() nylasFormInputChanged!: EventEmitter<{ value: string; name: string; error: string; label: string }>;\n\n /**\n * Lifecycle method that runs before the component loads.\n * It sets the initial value and cleans it using sanitize-html.\n */\n componentWillLoad() {\n this.value = sanitizeHtml(this.defaultValue);\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n this.validate(this.value);\n if (this.error) {\n event.preventDefault();\n }\n }\n\n /**\n * Handles user input in the textarea, updating the value and emitting an event.\n */\n handleInput(e: Event) {\n const inputElement = e.target as HTMLTextAreaElement;\n this.value = sanitizeHtml(inputElement.value);\n this.nylasFormInputChanged.emit({\n value: this.value,\n name: this.name,\n error: this.error,\n label: this.label,\n });\n }\n\n /**\n * Validates the textarea value based on the required prop and maxLength.\n * If the value is invalid, an error message is displayed.\n */\n validate(value: string) {\n if (this.required && !value) {\n this.error = `${this.label} is required.`;\n } else if (value.length > this.maxLength) {\n this.error = `${this.label} cannot exceed ${this.maxLength} characters.`;\n } else {\n this.error = '';\n }\n }\n\n /**\n * Renders the component UI including the label, textarea, and any error messages.\n */\n render() {\n return (\n <label part=\"tc__label\" class={{ error: !!this.error }}>\n <p>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n <textarea\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readOnly}\n autoFocus={this.autoFocus}\n value={this.value}\n maxLength={this.maxLength}\n onInput={e => this.handleInput(e)}\n class={{ error: !!this.error }}\n part=\"tc__textarea\"\n />\n {this.error && <span class=\"error help-text\">{this.error}</span>}\n </label>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"textarea-component.js","sourceRoot":"","sources":["../../../../src/components/design-system/textarea-component/textarea-component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,YAAY,MAAM,eAAe,CAAC;AAezC,MAAM,OAAO,iBAAiB;;oBAIL,UAAU;4BAKF,EAAE;qBAKT,EAAE;2BAKI,EAAE;wBAMJ,KAAK;wBAKL,KAAK;yBAKJ,KAAK;yBAKN,GAAG;oBAKR,iBAAiB;qBAKf,EAAE;qBAKF,EAAE;;IAY3B,iBAAiB;QACf,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC/C,CAAC;IAOD,0BAA0B,CAAC,KAAkB;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,CAAC;IACH,CAAC;IAKD,WAAW,CAAC,CAAQ;QAClB,MAAM,YAAY,GAAG,CAAC,CAAC,MAA6B,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC;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C,CAAC,IAAI,CAAC,KAAK,EAAE,EAC9B,IAAI,EAAC,cAAc,GACnB;YACD,IAAI,CAAC,KAAK,IAAI,YAAM,KAAK,EAAC,iBAAiB,IAAE,IAAI,CAAC,KAAK,CAAQ,CAC1D,CACT,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Event, EventEmitter, Listen } from '@stencil/core';\nimport sanitizeHtml from 'sanitize-html'; // Importing sanitize-html to clean inputs and prevent XSS attacks.\n\n/**\n * `textarea-component` allows users to enter multiline text.\n * It is ideal for larger inputs like comments or messages in a form.\n * This component is used in the scheduling form to input multiline text.\n *\n * @part tc__label - The label for the textarea.\n * @part tc__textarea - The textarea element.\n */\n@Component({\n tag: 'textarea-component',\n styleUrl: 'textarea-component.scss',\n shadow: true,\n})\nexport class TextareaComponent {\n /**\n * The name of the textarea, important for form submissions.\n */\n @Prop() name: string = 'textarea';\n\n /**\n * The default value of the textarea, appearing when the component first renders.\n */\n @Prop() defaultValue: string = '';\n\n /**\n * The label for the textarea, displayed above it.\n */\n @Prop() label: string = '';\n\n /**\n * Placeholder text shown in the textarea when it is empty.\n */\n @Prop() placeholder: string = '';\n\n /**\n * Specifies if the textarea is required for form submission.\n * If true, an error message shows if left empty.\n */\n @Prop() required: boolean = false;\n\n /**\n * If true, the textarea cannot be edited by the user.\n */\n @Prop() readOnly: boolean = false;\n\n /**\n * Automatically focus the textarea when the component loads.\n */\n @Prop() autoFocus: boolean = false;\n\n /**\n * The maximum number of characters allowed in the textarea.\n */\n @Prop() maxLength: number = 255;\n\n /**\n * The type\n */\n @Prop() type: string = 'multi_line_text';\n\n /**\n * State for the current value of the textarea.\n */\n @State() value: string = '';\n\n /**\n * State for managing the display of any error messages.\n */\n @State() error: string = '';\n\n /**\n * Event emitted when the value of the textarea changes.\n * Useful for parent components to capture user input.\n */\n @Event() nylasFormInputChanged!: EventEmitter<{ value: string; name: string; error: string; label: string; type: string }>;\n\n /**\n * Lifecycle method that runs before the component loads.\n * It sets the initial value and cleans it using sanitize-html.\n */\n componentWillLoad() {\n this.value = sanitizeHtml(this.defaultValue);\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n this.validate(this.value);\n if (this.error) {\n event.preventDefault();\n }\n }\n\n /**\n * Handles user input in the textarea, updating the value and emitting an event.\n */\n handleInput(e: Event) {\n const inputElement = e.target as HTMLTextAreaElement;\n this.value = sanitizeHtml(inputElement.value);\n this.nylasFormInputChanged.emit({\n value: this.value,\n name: this.name,\n error: this.error,\n label: this.label,\n type: this.type,\n });\n }\n\n /**\n * Validates the textarea value based on the required prop and maxLength.\n * If the value is invalid, an error message is displayed.\n */\n validate(value: string) {\n if (this.required && !value) {\n this.error = `${this.label} is required.`;\n } else if (value.length > this.maxLength) {\n this.error = `${this.label} cannot exceed ${this.maxLength} characters.`;\n } else {\n this.error = '';\n }\n }\n\n /**\n * Renders the component UI including the label, textarea, and any error messages.\n */\n render() {\n return (\n <label part=\"tc__label\" class={{ error: !!this.error }}>\n <p>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n <textarea\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readOnly}\n autoFocus={this.autoFocus}\n value={this.value}\n maxLength={this.maxLength}\n onInput={e => this.handleInput(e)}\n class={{ error: !!this.error }}\n part=\"tc__textarea\"\n />\n {this.error && <span class=\"error help-text\">{this.error}</span>}\n </label>\n );\n }\n}\n"]}
@@ -97,7 +97,7 @@ export class TimePeriodSelector {
97
97
  this.selectedNumber = parseInt(this.numberOptions[0].value);
98
98
  }
99
99
  render() {
100
- return (h("div", { key: 'a4b421b31d77e41c8ef3c2a7533699a6cfaeb60c', class: "time-period-selector" }, h("input-dropdown", { key: 'b5f99b1d27195ad8fdc3617cf04e3fba3cfd49dd', id: "time-number", name: 'time-number', inputValue: this.selectedNumber.toString(), exportparts: "sd_dropdown: tps__number-dropdown, sd_dropdown-button: tps__number-dropdown-button, sd_dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultInputOption: this.numberOptions.find(i => i.value == this.selectedNumber.toString()) ?? this.numberOptions[0] }), h("select-dropdown", { key: 'c06e213131979c07431ed1a6964bd0e0e2338b97', id: "time-period", name: 'time-period', options: this.timePeriodOptions, exportparts: "sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content", pluralizedLabel: this.selectedNumber > 1 ? 's' : '', defaultSelectedOption: this.timePeriodOptions.find(i => i.value == this.selectedPeriod) ?? this.timePeriodOptions[0], withSearch: false })));
100
+ return (h("div", { key: '00e1115959b6f838c0ec39a27edbfa0b2e24ac01', class: "time-period-selector" }, h("input-dropdown", { key: '1b669cbacab8c5d385c6a7edfe4a25044a6dddbe', id: "time-number", name: 'time-number', inputValue: this.selectedNumber.toString(), exportparts: "sd_dropdown: tps__number-dropdown, sd_dropdown-button: tps__number-dropdown-button, sd_dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultInputOption: this.numberOptions.find(i => i.value == this.selectedNumber.toString()) ?? this.numberOptions[0] }), h("select-dropdown", { key: 'c68685b0d8e4ef284c09d40bf78e9c2d94f82fff', id: "time-period", name: 'time-period', options: this.timePeriodOptions, exportparts: "sd_dropdown: tps__period-dropdown, sd_dropdown-button: tps__period-dropdown-button, sd_dropdown-content: tps__period-dropdown-content", pluralizedLabel: this.selectedNumber > 1 ? 's' : '', defaultSelectedOption: this.timePeriodOptions.find(i => i.value == this.selectedPeriod) ?? this.timePeriodOptions[0], withSearch: false })));
101
101
  }
102
102
  static get is() { return "time-period-selector"; }
103
103
  static get encapsulation() { return "scoped"; }
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  .slider {
36
- background-color: var(--nylas-base-400);
36
+ background-color: var(--nylas-base-300);
37
37
  bottom: 0;
38
38
  cursor: pointer;
39
39
  left: 0;