@nylas/react 1.1.0-canary.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +110 -2
  2. package/dist/add-circle-icon_2.entry-7165bd0e.js +25 -0
  3. package/dist/add-circle-icon_2.entry-f1ddca18.cjs +1 -0
  4. package/dist/archive-icon_7.entry-7411c224.js +75 -0
  5. package/dist/archive-icon_7.entry-e3df60ed.cjs +1 -0
  6. package/dist/arrow-icon.entry-280e18b0.cjs +1 -0
  7. package/dist/arrow-icon.entry-38949317.js +15 -0
  8. package/dist/bold-icon_3.entry-5963945c.js +35 -0
  9. package/dist/bold-icon_3.entry-5dffbedd.cjs +1 -0
  10. package/dist/button-component_2.entry-237733b4.js +26 -0
  11. package/dist/button-component_2.entry-b29d2873.cjs +1 -0
  12. package/dist/calendar-agenda-fill-icon_48.entry-9afba869.js +5105 -0
  13. package/dist/calendar-agenda-fill-icon_48.entry-d3830dbb.cjs +7 -0
  14. package/dist/calendar-cancel-icon.entry-77ccf227.cjs +1 -0
  15. package/dist/calendar-cancel-icon.entry-780723a6.js +15 -0
  16. package/dist/calendar-check-icon_2.entry-2c89c230.js +25 -0
  17. package/dist/calendar-check-icon_2.entry-b37ac7f0.cjs +1 -0
  18. package/dist/calendar-icon.entry-02dd3990.js +15 -0
  19. package/dist/calendar-icon.entry-ffc93569.cjs +1 -0
  20. package/dist/checkbox-component_2.entry-00b6a1e9.cjs +1 -0
  21. package/dist/checkbox-component_2.entry-ee9d0e6c.js +56 -0
  22. package/dist/chevron-icon_3.entry-468abc26.cjs +1 -0
  23. package/dist/chevron-icon_3.entry-f62e9ef1.js +129 -0
  24. package/dist/clock-icon_4.entry-766a1b23.js +45 -0
  25. package/dist/clock-icon_4.entry-7dc2cc4a.cjs +1 -0
  26. package/dist/constants-50c3e067-8a40a5fe.js +3883 -0
  27. package/dist/constants-50c3e067-9f2a6372.cjs +15 -0
  28. package/dist/copy-icon.entry-2a841508.js +15 -0
  29. package/dist/copy-icon.entry-e5251410.cjs +1 -0
  30. package/dist/core-js-38e53e34.cjs +4 -0
  31. package/dist/core-js-a9d3b6e1.js +3297 -0
  32. package/dist/delete-icon_2.entry-1a5c39dc.cjs +1 -0
  33. package/dist/delete-icon_2.entry-64555a2f.js +25 -0
  34. package/dist/document-refresh-icon.entry-4bf6398b.js +15 -0
  35. package/dist/document-refresh-icon.entry-fdc7ddda.cjs +1 -0
  36. package/dist/dom-68f08be9.cjs +15 -0
  37. package/dist/dom-86e17616.js +664 -0
  38. package/dist/{types/elements → elements}/index.d.ts +47 -1
  39. package/dist/elements-dc5b338e-2da1fe61.js +28031 -0
  40. package/dist/elements-dc5b338e-c8016c3d.cjs +16516 -0
  41. package/dist/flow-40ff9cea-6f8c30e2.cjs +9 -0
  42. package/dist/flow-40ff9cea-ee70fdf5.js +505 -0
  43. package/dist/focus-visible-e8093c16-0a38a184.cjs +1 -0
  44. package/dist/focus-visible-e8093c16-9d0c98c0.js +84 -0
  45. package/dist/forward-icon_6.entry-390ef70a.js +953 -0
  46. package/dist/forward-icon_6.entry-7238ef38.cjs +3 -0
  47. package/dist/globe-icon.entry-81f42f89.cjs +1 -0
  48. package/dist/globe-icon.entry-8d106260.js +15 -0
  49. package/dist/google-logo-icon_4.entry-aabd3886.js +680 -0
  50. package/dist/google-logo-icon_4.entry-fa2b8999.cjs +1 -0
  51. package/dist/index-53420959-5fc8ad2b.js +5 -0
  52. package/dist/index-53420959-fcf45780.cjs +1 -0
  53. package/dist/index-5ccfd9df.js +7859 -0
  54. package/dist/index-6d9eeb53-58c8980a.js +4971 -0
  55. package/dist/index-6d9eeb53-b2a6d09f.cjs +41 -0
  56. package/dist/index-eb33703c.cjs +42 -0
  57. package/dist/index.es-c9454237-00ccd1e6.js +3135 -0
  58. package/dist/index.es-c9454237-b64161d1.cjs +7 -0
  59. package/dist/info-icon_2.entry-b2e11336.cjs +1 -0
  60. package/dist/info-icon_2.entry-bb8ed71c.js +34 -0
  61. package/dist/input-component.entry-378b1ccc.cjs +1 -0
  62. package/dist/input-component.entry-cb86170f.js +65 -0
  63. package/dist/input-dropdown.entry-98954c93.cjs +1 -0
  64. package/dist/input-dropdown.entry-a76c339e.js +134 -0
  65. package/dist/mailbox-store-edc386fc-156b7236.cjs +1 -0
  66. package/dist/mailbox-store-edc386fc-8bc7558b.js +380 -0
  67. package/dist/multi-select-dropdown.entry-40b855e1.cjs +1 -0
  68. package/dist/multi-select-dropdown.entry-6b686695.js +91 -0
  69. package/dist/nylas-booked-event-card_12.entry-9d693125.cjs +1 -0
  70. package/dist/nylas-booked-event-card_12.entry-e861bb16.js +1134 -0
  71. package/dist/nylas-form-card.entry-b158d789.js +57 -0
  72. package/dist/nylas-form-card.entry-ca4a8746.cjs +1 -0
  73. package/dist/nylas-if-state.entry-8e4d922c.js +94 -0
  74. package/dist/nylas-if-state.entry-95fac42d.cjs +1 -0
  75. package/dist/nylas-list-folders.entry-83c39684.js +120 -0
  76. package/dist/nylas-list-folders.entry-8a22e0c8.cjs +1 -0
  77. package/dist/nylas-list-threads.entry-54c582af.cjs +1 -0
  78. package/dist/nylas-list-threads.entry-7ea370e1.js +70 -0
  79. package/dist/nylas-login.entry-9115fd81.js +73 -0
  80. package/dist/nylas-login.entry-fb627e40.cjs +1 -0
  81. package/dist/nylas-mailbox-pagination.entry-04626d27.cjs +1 -0
  82. package/dist/nylas-mailbox-pagination.entry-3ff02cf9.js +101 -0
  83. package/dist/nylas-mailbox-toolbar-button.entry-8d00c789.cjs +1 -0
  84. package/dist/nylas-mailbox-toolbar-button.entry-f752e925.js +82 -0
  85. package/dist/nylas-mailbox.entry-99c27b6c.js +134 -0
  86. package/dist/nylas-mailbox.entry-b3974f4e.cjs +1 -0
  87. package/dist/nylas-provider.entry-a3ad02a5.cjs +1 -0
  88. package/dist/nylas-provider.entry-c206aa32.js +145 -0
  89. package/dist/nylas-reminder-emails.entry-414ce6fe.js +129 -0
  90. package/dist/nylas-reminder-emails.entry-59c07bfe.cjs +4 -0
  91. package/dist/nylas-reminder-time_2.entry-197d83a0.js +105 -0
  92. package/dist/nylas-reminder-time_2.entry-d79dcd85.cjs +1 -0
  93. package/dist/nylas-scheduler-editor.entry-7f389982.js +1447 -0
  94. package/dist/nylas-scheduler-editor.entry-f1c6964a.cjs +2 -0
  95. package/dist/nylas-scheduling.entry-1a8bd6fc.cjs +1 -0
  96. package/dist/nylas-scheduling.entry-4fa5381d.js +345 -0
  97. package/dist/nylas-threads-refresh.entry-20602e7b.js +74 -0
  98. package/dist/nylas-threads-refresh.entry-56b53449.cjs +1 -0
  99. package/dist/nylas-threads-search.entry-8872473c.js +69 -0
  100. package/dist/nylas-threads-search.entry-8e0ec3ae.cjs +1 -0
  101. package/dist/nylas-time-window-picker.entry-9ac542b7.js +316 -0
  102. package/dist/nylas-time-window-picker.entry-ca47f721.cjs +1 -0
  103. package/dist/nylas-view-thread.entry-1f758e43.cjs +1 -0
  104. package/dist/nylas-view-thread.entry-dcd3d5be.js +203 -0
  105. package/dist/person-icon.entry-63b28ace.cjs +1 -0
  106. package/dist/person-icon.entry-93130c05.js +15 -0
  107. package/dist/play-icon_2.entry-6a99c32d.js +25 -0
  108. package/dist/play-icon_2.entry-b67fb649.cjs +1 -0
  109. package/dist/react.cjs +1 -0
  110. package/dist/react.js +144 -0
  111. package/dist/refresh-icon.entry-84783c91.js +15 -0
  112. package/dist/refresh-icon.entry-b49792fc.cjs +1 -0
  113. package/dist/register-component-887199a9-003f96c5.cjs +1 -0
  114. package/dist/register-component-887199a9-b41dfa7a.js +109 -0
  115. package/dist/scheduler-config-store-2a3b403d-73610089.js +27 -0
  116. package/dist/scheduler-config-store-2a3b403d-a5e3433a.cjs +1 -0
  117. package/dist/scheduler-store-fe281404-bddb1b6a.js +469 -0
  118. package/dist/scheduler-store-fe281404-c3e477f6.cjs +1 -0
  119. package/dist/textarea-component.entry-28c4bc05.cjs +1 -0
  120. package/dist/textarea-component.entry-40e959e5.js +36 -0
  121. package/dist/time-period-selector.entry-af71523a.cjs +1 -0
  122. package/dist/time-period-selector.entry-da5d8652.js +93 -0
  123. package/dist/translate-icon.entry-92b83635.js +15 -0
  124. package/dist/translate-icon.entry-a2ed4f76.cjs +1 -0
  125. package/dist/warning-icon.entry-19f721c3.js +15 -0
  126. package/dist/warning-icon.entry-3ab9a59e.cjs +1 -0
  127. package/package.json +12 -8
  128. package/dist/elements/index.js +0 -92
  129. package/dist/elements/index.js.map +0 -1
  130. package/dist/elements/react-component-lib/createComponent.js +0 -65
  131. package/dist/elements/react-component-lib/createComponent.js.map +0 -1
  132. package/dist/elements/react-component-lib/createOverlayComponent.js +0 -98
  133. package/dist/elements/react-component-lib/createOverlayComponent.js.map +0 -1
  134. package/dist/elements/react-component-lib/index.js +0 -3
  135. package/dist/elements/react-component-lib/index.js.map +0 -1
  136. package/dist/elements/react-component-lib/interfaces.js +0 -2
  137. package/dist/elements/react-component-lib/interfaces.js.map +0 -1
  138. package/dist/elements/react-component-lib/utils/attachProps.js +0 -92
  139. package/dist/elements/react-component-lib/utils/attachProps.js.map +0 -1
  140. package/dist/elements/react-component-lib/utils/case.js +0 -7
  141. package/dist/elements/react-component-lib/utils/case.js.map +0 -1
  142. package/dist/elements/react-component-lib/utils/dev.js +0 -13
  143. package/dist/elements/react-component-lib/utils/dev.js.map +0 -1
  144. package/dist/elements/react-component-lib/utils/index.js +0 -31
  145. package/dist/elements/react-component-lib/utils/index.js.map +0 -1
  146. package/dist/index.js +0 -29
  147. package/dist/index.js.map +0 -1
  148. /package/dist/{types/elements → elements}/react-component-lib/createComponent.d.ts +0 -0
  149. /package/dist/{types/elements → elements}/react-component-lib/createOverlayComponent.d.ts +0 -0
  150. /package/dist/{types/elements → elements}/react-component-lib/index.d.ts +0 -0
  151. /package/dist/{types/elements → elements}/react-component-lib/interfaces.d.ts +0 -0
  152. /package/dist/{types/elements → elements}/react-component-lib/utils/attachProps.d.ts +0 -0
  153. /package/dist/{types/elements → elements}/react-component-lib/utils/case.d.ts +0 -0
  154. /package/dist/{types/elements → elements}/react-component-lib/utils/dev.d.ts +0 -0
  155. /package/dist/{types/elements → elements}/react-component-lib/utils/index.d.ts +0 -0
  156. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
@@ -0,0 +1,93 @@
1
+ import { r as s, c as n, d as o, h as d, g as p } from "./index-5ccfd9df.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const l = ".time-period-selector.sc-time-period-selector{display:grid;gap:0.5rem;grid-template-columns:auto 1fr}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector,.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector{width:116px}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector{width:84px;display:flex;align-items:center}.time-period-selector.sc-time-period-selector select-dropdown#time-period.sc-time-period-selector::part(sd_dropdown-button){width:100%}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown){width:inherit;height:100%}.time-period-selector.sc-time-period-selector input-dropdown#time-number.sc-time-period-selector::part(id_dropdown-input){border:none;border-radius:var(--nylas-border-radius-2x)}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-input){padding:17px;gap:1rem}.time-period-selector.sc-time-period-selector input-dropdown.sc-time-period-selector::part(id_dropdown-content){width:100%;max-height:200px}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown){width:inherit}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-button){padding:1rem;gap:1rem;justify-content:space-between}.time-period-selector.sc-time-period-selector select-dropdown.sc-time-period-selector::part(sd_dropdown-content){width:100%;max-height:200px}", c = l, a = {
5
+ hours: "hour",
6
+ days: "day",
7
+ weeks: "week",
8
+ months: "month"
9
+ }, m = class {
10
+ constructor(t) {
11
+ s(this, t), this.timePeriodChanged = n(this, "timePeriodChanged", 7), this.timePeriods = ["hour", "day", "week", "month"], this.defaultSelectedPeriod = "hour", this.defaultSelectedNumber = 1, this.selectedPeriod = this.defaultSelectedPeriod, this.selectedNumber = this.defaultSelectedNumber, this.numberOptions = this.calculateOptions(this.defaultSelectedPeriod || "hour").map((e) => ({
12
+ label: e.toString(),
13
+ value: e.toString()
14
+ })), this.timePeriodOptions = this.timePeriods.map((e) => ({
15
+ label: e,
16
+ value: e
17
+ }));
18
+ }
19
+ defaultSelectedPeriodChangedHandler(t) {
20
+ this.selectedPeriod = t;
21
+ const e = a[t] ?? t;
22
+ this.updateNumberOptionsAndSelectedNumber(e);
23
+ }
24
+ defaultSelectedNumberChangedHandler(t) {
25
+ this.selectedNumber = t;
26
+ }
27
+ timePeriodsChangedHandler(t) {
28
+ this.timePeriodOptions = t.map((e) => ({
29
+ label: e,
30
+ value: e
31
+ }));
32
+ }
33
+ calculateOptions(t) {
34
+ switch (t) {
35
+ case "hour":
36
+ return Array.from({ length: 23 }, (e, r) => r + 1);
37
+ case "minute":
38
+ return Array.from({ length: 13 }, (e, r) => r * 5);
39
+ case "day":
40
+ return Array.from({ length: 30 }, (e, r) => r + 1);
41
+ case "week":
42
+ return Array.from({ length: 4 }, (e, r) => r + 1);
43
+ case "month":
44
+ return Array.from({ length: 12 }, (e, r) => r + 1);
45
+ default:
46
+ return [];
47
+ }
48
+ }
49
+ inputOptionChangedHandler(t) {
50
+ o("time-period-selector", "inputOptionChangedHandler", t.detail);
51
+ const { value: e, name: r } = t.detail;
52
+ r === "time-number" && (this.selectedNumber = e ? parseInt(e) : this.defaultSelectedNumber);
53
+ const i = {
54
+ number: this.selectedNumber,
55
+ period: this.selectedPeriod
56
+ };
57
+ this.timePeriodChanged.emit(i);
58
+ }
59
+ nylasFormDropdownChangedHandler(t) {
60
+ o("time-period-selector", "nylasFormDropdownChangedHandler", t.detail);
61
+ const { value: e, name: r } = t.detail;
62
+ r === "time-period" ? (this.selectedPeriod = e, this.updateNumberOptionsAndSelectedNumber(e)) : r === "time-number" && (this.selectedNumber = parseInt(e));
63
+ const i = {
64
+ number: this.selectedNumber,
65
+ period: this.selectedPeriod
66
+ };
67
+ this.timePeriodChanged.emit(i);
68
+ }
69
+ updateNumberOptionsAndSelectedNumber(t) {
70
+ const e = this.calculateOptions(t);
71
+ this.numberOptions = e.map((r) => ({
72
+ label: r.toString(),
73
+ value: r.toString()
74
+ })), this.selectedNumber = parseInt(this.numberOptions[0].value);
75
+ }
76
+ render() {
77
+ return d("div", { key: "2e02e602c84d10f1c2ed8dc8e6a989f7ec4c22f8", class: "time-period-selector" }, d("input-dropdown", { key: "aaf9b85eb568c308385d41127c91c4e51261cb2f", id: "time-number", name: "time-number", inputValue: this.selectedNumber.toString(), exportparts: "id_dropdown: tps__number-dropdown, id_dropdown-input: tps__number-dropdown-button, id_dropdown-content: tps__number-dropdown-content", options: this.numberOptions, defaultInputOption: this.numberOptions.find((t) => t.value == this.selectedNumber.toString()) ?? this.numberOptions[0] }), d("select-dropdown", { key: "5537a3e02a876cbf49f5ace4c8f3bb153ed6b3ce", 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((t) => t.value == this.selectedPeriod) ?? this.timePeriodOptions[0], withSearch: !1 }));
78
+ }
79
+ get host() {
80
+ return p(this);
81
+ }
82
+ static get watchers() {
83
+ return {
84
+ defaultSelectedPeriod: ["defaultSelectedPeriodChangedHandler"],
85
+ defaultSelectedNumber: ["defaultSelectedNumberChangedHandler"],
86
+ timePeriods: ["timePeriodsChangedHandler"]
87
+ };
88
+ }
89
+ };
90
+ m.style = c;
91
+ export {
92
+ m as time_period_selector
93
+ };
@@ -0,0 +1,15 @@
1
+ import { r as e, h as C } from "./index-5ccfd9df.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const s = ".sc-translate-icon-h{display:flex}", i = s, o = class {
5
+ constructor(t) {
6
+ e(this, t), this.width = "16", this.height = "16";
7
+ }
8
+ render() {
9
+ return C("svg", { key: "a2bd704c3c4f78e899218617216781dbbdd0c209", xmlns: "http://www.w3.org/2000/svg", width: this.width, height: this.height, viewBox: "0 0 20 20", fill: "none" }, C("path", { key: "354a0cf676e7e509c3de9cbd89b01f2413565bf0", fill: "currentColor", d: "M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z" }));
10
+ }
11
+ };
12
+ o.style = i;
13
+ export {
14
+ o as translate_icon
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./index-eb33703c.cjs");require("react");require("react-dom");const s=".sc-translate-icon-h{display:flex}",i=s,e=class{constructor(t){C.registerInstance(this,t),this.width="16",this.height="16"}render(){return C.h("svg",{key:"a2bd704c3c4f78e899218617216781dbbdd0c209",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 20 20",fill:"none"},C.h("path",{key:"354a0cf676e7e509c3de9cbd89b01f2413565bf0",fill:"currentColor",d:"M14.1663 4.02867C14.4267 4.12081 14.563 4.40654 14.4709 4.66685C14.3501 5.00788 14.2182 5.4771 14.1178 5.86047C14.6877 5.77587 15.2665 5.65653 15.8867 5.51288C16.1557 5.45058 16.4243 5.61815 16.4866 5.88717C16.5489 6.15619 16.3814 6.42479 16.1123 6.4871C15.339 6.66621 14.6101 6.81289 13.8717 6.90283C13.7759 7.35654 13.7014 7.77084 13.6451 8.15021C14.1202 8.04599 14.5738 8.00553 14.9996 8.02075L14.9996 8C14.9996 7.72386 15.2235 7.5 15.4996 7.5C15.7758 7.5 15.9996 7.72386 15.9996 8C15.9996 8.05657 15.9991 8.11281 15.9979 8.16871C17.1392 8.47838 17.9781 9.23987 18.3435 10.2263C18.9579 11.8853 18.1287 13.8787 15.7027 14.9569C15.4504 15.069 15.1549 14.9554 15.0427 14.7031C14.9306 14.4507 15.0442 14.1552 15.2966 14.0431C17.3705 13.1213 17.7913 11.6147 17.4057 10.5737C17.1874 9.984 16.6776 9.44916 15.9129 9.18633C15.6829 10.7237 15.021 11.9466 14.229 12.7925C14.3126 12.9656 14.3958 13.1436 14.4641 13.3151C14.5662 13.5717 14.441 13.8625 14.1844 13.9646C13.9278 14.0667 13.637 13.9415 13.5349 13.6849C13.5066 13.6137 13.4777 13.5463 13.448 13.4802C13.028 13.7794 12.5905 13.9869 12.1705 14.0835C11.5942 14.2161 10.963 14.1517 10.534 13.6942C9.88917 13.0053 9.84361 11.8611 10.2855 10.8412C10.6652 9.96479 11.4186 9.11781 12.5848 8.54034C12.6387 8.07338 12.7199 7.55894 12.8332 6.98891C12.3926 7.00755 11.9403 7.00326 11.4659 6.97127C11.1904 6.95269 10.9821 6.71428 11.0007 6.43876C11.0192 6.16325 11.2577 5.95496 11.5332 5.97353C12.0633 6.00928 12.5641 6.00772 13.0566 5.97553C13.1605 5.55444 13.3512 4.8331 13.5282 4.33317C13.6203 4.07286 13.906 3.93653 14.1663 4.02867ZM12.501 9.74109C11.8436 10.1821 11.427 10.7219 11.2031 11.2387C10.8542 12.0439 10.9881 12.716 11.2638 13.0105C11.2637 13.0104 11.2639 13.0106 11.2638 13.0105C11.3573 13.11 11.5624 13.1973 11.9463 13.109C12.2578 13.0373 12.6311 12.8571 13.0121 12.5576C12.8658 12.22 12.7272 11.8324 12.6313 11.353C12.5405 10.8996 12.4899 10.3743 12.501 9.74109ZM13.7808 11.7797C14.316 11.0956 14.759 10.1665 14.9271 9.01632C14.539 9.00681 14.1111 9.05601 13.6457 9.17854C13.605 9.19274 13.5647 9.20726 13.525 9.22209C13.4663 10.0545 13.5146 10.671 13.6118 11.1568C13.6578 11.3868 13.7156 11.5913 13.7808 11.7797ZM6.92028 5.2159C5.77942 4.88398 4.78409 5.00841 4.07616 5.21575C3.72264 5.3193 3.439 5.44393 3.24121 5.5443C3.14215 5.59457 3.0641 5.63901 3.00903 5.67212C2.98147 5.68868 2.95962 5.70244 2.9437 5.71271L2.92429 5.72542L2.91797 5.72966L2.91566 5.73123L2.91393 5.73241C2.91384 5.73249 2.91436 5.73325 2.94925 5.78397C3.23698 6.20225 3.1703 6.10548 2.91393 5.73241C2.68634 5.88881 2.62863 6.20009 2.78502 6.42767C2.94134 6.65514 3.25207 6.71313 3.47963 6.55703L3.4788 6.5576L3.48576 6.55305C3.49318 6.54826 3.50608 6.5401 3.52423 6.52919C3.56057 6.50735 3.6177 6.47463 3.69373 6.43605C3.84612 6.35872 4.07228 6.2589 4.35724 6.17544C4.92619 6.0088 5.72242 5.90898 6.64043 6.17595C7.35305 6.38517 7.66747 6.76919 7.82692 7.16112C7.98173 7.54163 8.0026 7.95751 8.00531 8.33243C7.46199 8.18407 6.79336 8.03682 6.08385 8.00744C5.04808 7.96456 3.8874 8.17096 2.87738 9.01102C1.98877 9.75011 1.78345 10.8818 2.07014 11.853C2.35713 12.8252 3.14925 13.692 4.31803 13.9348C5.22351 14.123 6.18016 13.8639 6.9599 13.5212C7.3403 13.354 7.69572 13.1594 8.0057 12.9665V13.5C8.0057 13.7761 8.22956 14 8.5057 14C8.78184 14 9.0057 13.7754 9.0057 13.4993L9.0057 8.44586C9.0058 8.05404 9.00595 7.40554 8.7532 6.78428C8.48142 6.11625 7.93342 5.51313 6.92136 5.21622L6.92028 5.2159ZM6.04249 9.00659C6.76366 9.03645 7.44769 9.209 8.0057 9.37205V11.757C7.65814 12.0182 7.13927 12.35 6.55757 12.6057C5.85264 12.9155 5.12729 13.0816 4.52148 12.9557C3.75127 12.7957 3.22322 12.2271 3.02922 11.5699C2.83491 10.9116 2.98777 10.2199 3.51683 9.77985C4.27958 9.14545 5.16917 8.97043 6.04249 9.00659Z"}))}};e.style=i;exports.translate_icon=e;
@@ -0,0 +1,15 @@
1
+ import { r as n, h as t } from "./index-5ccfd9df.js";
2
+ import "react";
3
+ import "react-dom";
4
+ const s = ".sc-warning-icon-h{display:flex}", c = s, e = class {
5
+ constructor(i) {
6
+ n(this, i), this.width = "16", this.height = "16";
7
+ }
8
+ render() {
9
+ return t("svg", { key: "1bc19d8fcabaac096d9112be34a01a89ac0875c9", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "3522ec2a65e42e08d90a248a641f3594c91ce4f3", d: "M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z", fill: "currentColor" }));
10
+ }
11
+ };
12
+ e.style = c;
13
+ export {
14
+ e as warning_icon
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-eb33703c.cjs");require("react");require("react-dom");const n=".sc-warning-icon-h{display:flex}",r=n,t=class{constructor(i){e.registerInstance(this,i),this.width="16",this.height="16"}render(){return e.h("svg",{key:"1bc19d8fcabaac096d9112be34a01a89ac0875c9",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"3522ec2a65e42e08d90a248a641f3594c91ce4f3",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};t.style=r;exports.warning_icon=t;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylas/react",
3
- "version": "1.1.0-canary.9",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,14 +12,18 @@
12
12
  "files": [
13
13
  "dist"
14
14
  ],
15
- "main": "dist/index.js",
16
- "module": "dist/index.js",
17
- "types": "dist/types/index.d.ts",
15
+ ".": {
16
+ "import": "dist/react.js",
17
+ "require": "dist/react.cjs"
18
+ },
19
+ "main": "dist/react.cjs",
20
+ "module": "dist/react.js",
21
+ "types": "dist/index.d.ts",
18
22
  "dependencies": {
19
23
  "react": "^18.2.0",
20
24
  "react-dom": "^18.2.0",
21
- "@nylas/web-elements": "^1.1.0-canary.9",
22
- "@nylas/core": "^1.1.0-canary.3"
25
+ "@nylas/web-elements": "^1.1.0",
26
+ "@nylas/core": "^1.1.0"
23
27
  },
24
28
  "devDependencies": {
25
29
  "@types/node": "^20.8.10",
@@ -37,9 +41,9 @@
37
41
  "vite-plugin-dts": "^3.6.3"
38
42
  },
39
43
  "scripts": {
40
- "dev": "tsc -p . --outDir ./dist --watch",
44
+ "dev": "vite build --watch --emptyOutDir=false",
41
45
  "lint": "eslint --ext .ts,.tsx lib/",
42
- "build": "tsc -p . --outDir ./dist",
46
+ "build": "vite build",
43
47
  "preview": "vite preview",
44
48
  "test": "echo 'No tests configured'"
45
49
  }
@@ -1,92 +0,0 @@
1
- import { createReactComponent } from './react-component-lib';
2
- import { defineCustomElements } from '@nylas/web-elements/loader';
3
- defineCustomElements();
4
- export const AddCircleIcon = createReactComponent('add-circle-icon');
5
- export const ArchiveIcon = createReactComponent('archive-icon');
6
- export const ArrowIcon = createReactComponent('arrow-icon');
7
- export const BoldIcon = createReactComponent('bold-icon');
8
- export const ButtonComponent = createReactComponent('button-component');
9
- export const CalendarCancelIcon = createReactComponent('calendar-cancel-icon');
10
- export const CalendarCheckIcon = createReactComponent('calendar-check-icon');
11
- export const CalendarIcon = createReactComponent('calendar-icon');
12
- export const CalendarInfoIcon = createReactComponent('calendar-info-icon');
13
- export const CalendarPatternsIcon = createReactComponent('calendar-patterns-icon');
14
- export const CheckmarkCircleIcon = createReactComponent('checkmark-circle-icon');
15
- export const ChevronIcon = createReactComponent('chevron-icon');
16
- export const CloseIcon = createReactComponent('close-icon');
17
- export const DocumentRefreshIcon = createReactComponent('document-refresh-icon');
18
- export const FlowIcon = createReactComponent('flow-icon');
19
- export const FolderIcon = createReactComponent('folder-icon');
20
- export const ForwardIcon = createReactComponent('forward-icon');
21
- export const GlobeIcon = createReactComponent('globe-icon');
22
- export const GoogleLogoIcon = createReactComponent('google-logo-icon');
23
- export const InboxIcon = createReactComponent('inbox-icon');
24
- export const InfoIcon = createReactComponent('info-icon');
25
- export const ItalicIcon = createReactComponent('italic-icon');
26
- export const LoadingIcon = createReactComponent('loading-icon');
27
- export const LocationIcon = createReactComponent('location-icon');
28
- export const LocationOffIcon = createReactComponent('location-off-icon');
29
- export const MicrosoftLogoIcon = createReactComponent('microsoft-logo-icon');
30
- export const MultiSelectDropdown = createReactComponent('multi-select-dropdown');
31
- export const NylasAdditionalParticipants = createReactComponent('nylas-additional-participants');
32
- export const NylasAvailabilityPicker = createReactComponent('nylas-availability-picker');
33
- export const NylasBookedEventCard = createReactComponent('nylas-booked-event-card');
34
- export const NylasBookingCalendarPicker = createReactComponent('nylas-booking-calendar-picker');
35
- export const NylasBookingForm = createReactComponent('nylas-booking-form');
36
- export const NylasBufferTime = createReactComponent('nylas-buffer-time');
37
- export const NylasCalendarPicker = createReactComponent('nylas-calendar-picker');
38
- export const NylasCancelBookingForm = createReactComponent('nylas-cancel-booking-form');
39
- export const NylasCancelledEventCard = createReactComponent('nylas-cancelled-event-card');
40
- export const NylasComposer = createReactComponent('nylas-composer');
41
- export const NylasCustomBookingFlow = createReactComponent('nylas-custom-booking-flow');
42
- export const NylasDatePicker = createReactComponent('nylas-date-picker');
43
- export const NylasEditorTabs = createReactComponent('nylas-editor-tabs');
44
- export const NylasEventDescription = createReactComponent('nylas-event-description');
45
- export const NylasEventDuration = createReactComponent('nylas-event-duration');
46
- export const NylasEventInfo = createReactComponent('nylas-event-info');
47
- export const NylasEventLimits = createReactComponent('nylas-event-limits');
48
- export const NylasEventTitle = createReactComponent('nylas-event-title');
49
- export const NylasFormCard = createReactComponent('nylas-form-card');
50
- export const NylasIfState = createReactComponent('nylas-if-state');
51
- export const NylasLimitFutureBookings = createReactComponent('nylas-limit-future-bookings');
52
- export const NylasListConfigurations = createReactComponent('nylas-list-configurations');
53
- export const NylasListFolders = createReactComponent('nylas-list-folders');
54
- export const NylasListThreads = createReactComponent('nylas-list-threads');
55
- export const NylasLocaleSwitch = createReactComponent('nylas-locale-switch');
56
- export const NylasLocationComponent = createReactComponent('nylas-location-component');
57
- export const NylasLogin = createReactComponent('nylas-login');
58
- export const NylasLogo = createReactComponent('nylas-logo');
59
- export const NylasMailbox = createReactComponent('nylas-mailbox');
60
- export const NylasMailboxPagination = createReactComponent('nylas-mailbox-pagination');
61
- export const NylasMailboxToolbarButton = createReactComponent('nylas-mailbox-toolbar-button');
62
- export const NylasMinCancellationNotice = createReactComponent('nylas-min-cancellation-notice');
63
- export const NylasNotification = createReactComponent('nylas-notification');
64
- export const NylasProvider = createReactComponent('nylas-provider');
65
- export const NylasSchedulerEditor = createReactComponent('nylas-scheduler-editor');
66
- export const NylasScheduling = createReactComponent('nylas-scheduling');
67
- export const NylasSelectedEventCard = createReactComponent('nylas-selected-event-card');
68
- export const NylasSummarizeMessageButton = createReactComponent('nylas-summarize-message-button');
69
- export const NylasThreadsRefresh = createReactComponent('nylas-threads-refresh');
70
- export const NylasThreadsSearch = createReactComponent('nylas-threads-search');
71
- export const NylasTimeWindowPicker = createReactComponent('nylas-time-window-picker');
72
- export const NylasTimeslotPicker = createReactComponent('nylas-timeslot-picker');
73
- export const NylasViewEmail = createReactComponent('nylas-view-email');
74
- export const NylasViewThread = createReactComponent('nylas-view-thread');
75
- export const PeopleIcon = createReactComponent('people-icon');
76
- export const PlayIcon = createReactComponent('play-icon');
77
- export const RefreshIcon = createReactComponent('refresh-icon');
78
- export const ReplyAllIcon = createReactComponent('reply-all-icon');
79
- export const ReplyIcon = createReactComponent('reply-icon');
80
- export const SearchIcon = createReactComponent('search-icon');
81
- export const SelectDropdown = createReactComponent('select-dropdown');
82
- export const SentIcon = createReactComponent('sent-icon');
83
- export const SpamIcon = createReactComponent('spam-icon');
84
- export const StarIcon = createReactComponent('star-icon');
85
- export const StopIcon = createReactComponent('stop-icon');
86
- export const TimePeriodSelector = createReactComponent('time-period-selector');
87
- export const TooltipComponent = createReactComponent('tooltip-component');
88
- export const TranslateIcon = createReactComponent('translate-icon');
89
- export const TrashIcon = createReactComponent('trash-icon');
90
- export const UnderlineIcon = createReactComponent('underline-icon');
91
- export const WarningIcon = createReactComponent('warning-icon');
92
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/elements/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAI7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,oBAAoB,EAAE,CAAC;AACvB,MAAM,CAAC,MAAM,aAAa,GAAgB,oBAAoB,CAA8C,iBAAiB,CAAC,CAAC;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAgB,oBAAoB,CAA0C,cAAc,CAAC,CAAC;AACtH,MAAM,CAAC,MAAM,SAAS,GAAgB,oBAAoB,CAAsC,YAAY,CAAC,CAAC;AAC9G,MAAM,CAAC,MAAM,QAAQ,GAAgB,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,eAAe,GAAgB,oBAAoB,CAAkD,kBAAkB,CAAC,CAAC;AACtI,MAAM,CAAC,MAAM,kBAAkB,GAAgB,oBAAoB,CAAwD,sBAAsB,CAAC,CAAC;AACnJ,MAAM,CAAC,MAAM,iBAAiB,GAAgB,oBAAoB,CAAsD,qBAAqB,CAAC,CAAC;AAC/I,MAAM,CAAC,MAAM,YAAY,GAAgB,oBAAoB,CAA4C,eAAe,CAAC,CAAC;AAC1H,MAAM,CAAC,MAAM,gBAAgB,GAAgB,oBAAoB,CAAoD,oBAAoB,CAAC,CAAC;AAC3I,MAAM,CAAC,MAAM,oBAAoB,GAAgB,oBAAoB,CAA4D,wBAAwB,CAAC,CAAC;AAC3J,MAAM,CAAC,MAAM,mBAAmB,GAAgB,oBAAoB,CAA0D,uBAAuB,CAAC,CAAC;AACvJ,MAAM,CAAC,MAAM,WAAW,GAAgB,oBAAoB,CAA0C,cAAc,CAAC,CAAC;AACtH,MAAM,CAAC,MAAM,SAAS,GAAgB,oBAAoB,CAAsC,YAAY,CAA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C;AAC1G,MAAM,CAAC,MAAM,QAAQ,GAAgB,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,QAAQ,GAAgB,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,QAAQ,GAAgB,oBAAoB,CAAoC,WAAW,CAAC,CAAC;AAC1G,MAAM,CAAC,MAAM,kBAAkB,GAAgB,oBAAoB,CAAwD,sBAAsB,CAAC,CAAC;AACnJ,MAAM,CAAC,MAAM,gBAAgB,GAAgB,oBAAoB,CAAoD,mBAAmB,CAAC,CAAC;AAC1I,MAAM,CAAC,MAAM,aAAa,GAAgB,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC;AAC9H,MAAM,CAAC,MAAM,SAAS,GAAgB,oBAAoB,CAAsC,YAAY,CAAC,CAAC;AAC9G,MAAM,CAAC,MAAM,aAAa,GAAgB,oBAAoB,CAA8C,gBAAgB,CAAC,CAAC;AAC9H,MAAM,CAAC,MAAM,WAAW,GAAgB,oBAAoB,CAA0C,cAAc,CAAC,CAAC"}
@@ -1,65 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React, { createElement } from 'react';
13
- import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
14
- export const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) => {
15
- if (defineCustomElement !== undefined) {
16
- defineCustomElement();
17
- }
18
- const displayName = dashToPascalCase(tagName);
19
- const ReactComponent = class extends React.Component {
20
- constructor(props) {
21
- super(props);
22
- this.setComponentElRef = (element) => {
23
- this.componentEl = element;
24
- };
25
- }
26
- componentDidMount() {
27
- this.componentDidUpdate(this.props);
28
- }
29
- componentDidUpdate(prevProps) {
30
- attachProps(this.componentEl, this.props, prevProps);
31
- }
32
- render() {
33
- const _a = this.props, { children, forwardedRef, style, className, ref } = _a, cProps = __rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
34
- let propsToPass = Object.keys(cProps).reduce((acc, name) => {
35
- const value = cProps[name];
36
- if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
37
- const eventName = name.substring(2).toLowerCase();
38
- if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
39
- acc[name] = value;
40
- }
41
- }
42
- else {
43
- const type = typeof value;
44
- if (type === 'string' || type === 'boolean' || type === 'number') {
45
- acc[camelToDashCase(name)] = value;
46
- }
47
- }
48
- return acc;
49
- }, {});
50
- if (manipulatePropsFunction) {
51
- propsToPass = manipulatePropsFunction(this.props, propsToPass);
52
- }
53
- const newProps = Object.assign(Object.assign({}, propsToPass), { ref: mergeRefs(forwardedRef, this.setComponentElRef), style });
54
- return createElement(tagName, newProps, children);
55
- }
56
- static get displayName() {
57
- return displayName;
58
- }
59
- };
60
- if (ReactComponentContext) {
61
- ReactComponent.contextType = ReactComponentContext;
62
- }
63
- return createForwardRef(ReactComponent, displayName);
64
- };
65
- //# sourceMappingURL=createComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createComponent.js","sourceRoot":"","sources":["../../../lib/elements/react-component-lib/createComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAWxH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAMl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OAAO,QAAQ,KAAK,WAAW,IAAI,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC;wBACnE,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;oBACpB,CAAC;gBACH,CAAC;qBAAM,CAAC;oBAGN,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;oBAE1B,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;wBACjE,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;oBACrC,CAAC;gBACH,CAAC;gBACD,OAAO,GAAG,CAAC;YACb,CAAC,EAAE,EAAwB,CAAC,CAAC;YAE7B,IAAI,uBAAuB,EAAE,CAAC;gBAC5B,WAAW,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YACjE,CAAC;YAED,MAAM,QAAQ,mCACT,WAAW,KACd,GAAG,EAAE,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,EACpD,KAAK,GACN,CAAC;YASF,OAAO,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,KAAK,WAAW;YACpB,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAGF,IAAI,qBAAqB,EAAE,CAAC;QAC1B,cAAc,CAAC,WAAW,GAAG,qBAAqB,CAAC;IACrD,CAAC;IAED,OAAO,gBAAgB,CAAwB,cAAc,EAAE,WAAW,CAAC,CAAC;AAC9E,CAAC,CAAC"}
@@ -1,98 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __rest = (this && this.__rest) || function (s, e) {
11
- var t = {};
12
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
- t[p] = s[p];
14
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
- t[p[i]] = s[p[i]];
18
- }
19
- return t;
20
- };
21
- import React from 'react';
22
- import ReactDOM from 'react-dom';
23
- import { attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils';
24
- export const createOverlayComponent = (tagName, controller, customElement) => {
25
- defineCustomElement(tagName, customElement);
26
- const displayName = dashToPascalCase(tagName);
27
- const didDismissEventName = `on${displayName}DidDismiss`;
28
- const didPresentEventName = `on${displayName}DidPresent`;
29
- const willDismissEventName = `on${displayName}WillDismiss`;
30
- const willPresentEventName = `on${displayName}WillPresent`;
31
- let isDismissing = false;
32
- class Overlay extends React.Component {
33
- constructor(props) {
34
- super(props);
35
- if (typeof document !== 'undefined') {
36
- this.el = document.createElement('div');
37
- }
38
- this.handleDismiss = this.handleDismiss.bind(this);
39
- }
40
- static get displayName() {
41
- return displayName;
42
- }
43
- componentDidMount() {
44
- if (this.props.isOpen) {
45
- this.present();
46
- }
47
- }
48
- componentWillUnmount() {
49
- if (this.overlay) {
50
- this.overlay.dismiss();
51
- }
52
- }
53
- handleDismiss(event) {
54
- if (this.props.onDidDismiss) {
55
- this.props.onDidDismiss(event);
56
- }
57
- setRef(this.props.forwardedRef, null);
58
- }
59
- shouldComponentUpdate(nextProps) {
60
- if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {
61
- isDismissing = true;
62
- }
63
- return true;
64
- }
65
- componentDidUpdate(prevProps) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- if (this.overlay) {
68
- attachProps(this.overlay, this.props, prevProps);
69
- }
70
- if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
71
- this.present(prevProps);
72
- }
73
- if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
74
- yield this.overlay.dismiss();
75
- isDismissing = false;
76
- this.forceUpdate();
77
- }
78
- });
79
- }
80
- present(prevProps) {
81
- return __awaiter(this, void 0, void 0, function* () {
82
- const _a = this.props, { children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent } = _a, cProps = __rest(_a, ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"]);
83
- const elementProps = Object.assign(Object.assign({}, cProps), { ref: this.props.forwardedRef, [didDismissEventName]: this.handleDismiss, [didPresentEventName]: (e) => this.props.onDidPresent && this.props.onDidPresent(e), [willDismissEventName]: (e) => this.props.onWillDismiss && this.props.onWillDismiss(e), [willPresentEventName]: (e) => this.props.onWillPresent && this.props.onWillPresent(e) });
84
- this.overlay = yield controller.create(Object.assign(Object.assign({}, elementProps), { component: this.el, componentProps: {} }));
85
- setRef(this.props.forwardedRef, this.overlay);
86
- attachProps(this.overlay, elementProps, prevProps);
87
- yield this.overlay.present();
88
- });
89
- }
90
- render() {
91
- return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
92
- }
93
- }
94
- return React.forwardRef((props, ref) => {
95
- return React.createElement(Overlay, Object.assign({}, props, { forwardedRef: ref }));
96
- });
97
- };
98
- //# sourceMappingURL=createOverlayComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOverlayComponent.js","sourceRoot":"","sources":["../../../lib/elements/react-component-lib/createOverlayComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAA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AC;KACF;IAED,OAAO,KAAK,CAAC,UAAU,CAAqB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACzD,OAAO,oBAAC,OAAO,oBAAK,KAAK,IAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- export { createReactComponent } from './createComponent';
2
- export { createOverlayComponent } from './createOverlayComponent';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/elements/react-component-lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=interfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../lib/elements/react-component-lib/interfaces.ts"],"names":[],"mappings":""}
@@ -1,92 +0,0 @@
1
- import { camelToDashCase } from './case';
2
- export const attachProps = (node, newProps, oldProps = {}) => {
3
- if (node instanceof Element) {
4
- const className = getClassName(node.classList, newProps, oldProps);
5
- if (className !== '') {
6
- node.className = className;
7
- }
8
- Object.keys(newProps).forEach((name) => {
9
- if (name === 'children' ||
10
- name === 'style' ||
11
- name === 'ref' ||
12
- name === 'class' ||
13
- name === 'className' ||
14
- name === 'forwardedRef') {
15
- return;
16
- }
17
- if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
18
- const eventName = name.substring(2);
19
- const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
20
- if (!isCoveredByReact(eventNameLc)) {
21
- syncEvent(node, eventNameLc, newProps[name]);
22
- }
23
- }
24
- else {
25
- node[name] = newProps[name];
26
- const propType = typeof newProps[name];
27
- if (propType === 'string') {
28
- node.setAttribute(camelToDashCase(name), newProps[name]);
29
- }
30
- }
31
- });
32
- }
33
- };
34
- export const getClassName = (classList, newProps, oldProps) => {
35
- const newClassProp = newProps.className || newProps.class;
36
- const oldClassProp = oldProps.className || oldProps.class;
37
- const currentClasses = arrayToMap(classList);
38
- const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
39
- const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
40
- const finalClassNames = [];
41
- currentClasses.forEach((currentClass) => {
42
- if (incomingPropClasses.has(currentClass)) {
43
- finalClassNames.push(currentClass);
44
- incomingPropClasses.delete(currentClass);
45
- }
46
- else if (!oldPropClasses.has(currentClass)) {
47
- finalClassNames.push(currentClass);
48
- }
49
- });
50
- incomingPropClasses.forEach((s) => finalClassNames.push(s));
51
- return finalClassNames.join(' ');
52
- };
53
- export const transformReactEventName = (eventNameSuffix) => {
54
- switch (eventNameSuffix) {
55
- case 'doubleclick':
56
- return 'dblclick';
57
- }
58
- return eventNameSuffix;
59
- };
60
- export const isCoveredByReact = (eventNameSuffix) => {
61
- if (typeof document === 'undefined') {
62
- return true;
63
- }
64
- else {
65
- const eventName = 'on' + transformReactEventName(eventNameSuffix);
66
- let isSupported = eventName in document;
67
- if (!isSupported) {
68
- const element = document.createElement('div');
69
- element.setAttribute(eventName, 'return;');
70
- isSupported = typeof element[eventName] === 'function';
71
- }
72
- return isSupported;
73
- }
74
- };
75
- export const syncEvent = (node, eventName, newEventHandler) => {
76
- const eventStore = node.__events || (node.__events = {});
77
- const oldEventHandler = eventStore[eventName];
78
- if (oldEventHandler) {
79
- node.removeEventListener(eventName, oldEventHandler);
80
- }
81
- node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {
82
- if (newEventHandler) {
83
- newEventHandler.call(this, e);
84
- }
85
- }));
86
- };
87
- const arrayToMap = (arr) => {
88
- const map = new Map();
89
- arr.forEach((s) => map.set(s, s));
90
- return map;
91
- };
92
- //# sourceMappingURL=attachProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachProps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AM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IAG9C,IAAI,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;IAGD,IAAI,CAAC,gBAAgB,CACnB,SAAS,EACT,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS,OAAO,CAAC,CAAQ;QAChD,IAAI,eAAe,EAAE,CAAC;YACpB,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,GAA4B,EAAE,EAAE;IAClD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB,CAAC;IACrC,GAAgB,CAAC,OAAO,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export const dashToPascalCase = (str) => str
2
- .toLowerCase()
3
- .split('-')
4
- .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
5
- .join('');
6
- export const camelToDashCase = (str) => str.replace(/([A-Z])/g, (m) => `-${m[0].toLowerCase()}`);
7
- //# sourceMappingURL=case.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"case.js","sourceRoot":"","sources":["../../../../lib/elements/react-component-lib/utils/case.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE,CAC9C,GAAG;KACA,WAAW,EAAE;KACb,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACpE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- export const isDevMode = () => {
2
- return process && process.env && process.env.NODE_ENV === 'development';
3
- };
4
- const warnings = {};
5
- export const deprecationWarning = (key, message) => {
6
- if (isDevMode()) {
7
- if (!warnings[key]) {
8
- console.warn(message);
9
- warnings[key] = true;
10
- }
11
- }
12
- };
13
- //# sourceMappingURL=dev.js.map