@nylas/react 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/add-circle-icon.entry-25aecb13.js +15 -0
- package/dist/{add-circle-icon.entry-640d2b46.cjs → add-circle-icon.entry-5c49ba96.cjs} +1 -1
- package/dist/{archive-icon.entry-5b209336.cjs → archive-icon.entry-0a9e8ec3.cjs} +1 -1
- package/dist/{archive-icon.entry-e8a39eda.js → archive-icon.entry-89e31121.js} +2 -2
- package/dist/{arrow-icon.entry-a25b7b7e.cjs → arrow-icon.entry-19e5237c.cjs} +1 -1
- package/dist/{arrow-icon.entry-fa9584cf.js → arrow-icon.entry-9cfd86a1.js} +2 -2
- package/dist/bold-icon.entry-d591e701.cjs +1 -0
- package/dist/{bold-icon.entry-ac6a4956.js → bold-icon.entry-eab3420d.js} +6 -6
- package/dist/{button-component_2.entry-caf33abf.js → button-component_2.entry-7cd5f9c0.js} +6 -6
- package/dist/{button-component_2.entry-1471422a.cjs → button-component_2.entry-ce4314bf.cjs} +1 -1
- package/dist/{calendar-agenda-fill-icon_53.entry-6d7f9c79.js → calendar-agenda-fill-icon_54.entry-7099138a.js} +786 -678
- package/dist/calendar-agenda-fill-icon_54.entry-9228dbe7.cjs +8 -0
- package/dist/{calendar-cancel-icon.entry-02015d74.js → calendar-cancel-icon.entry-299d6fba.js} +4 -4
- package/dist/{calendar-cancel-icon.entry-42d3d226.cjs → calendar-cancel-icon.entry-6e3d20f1.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-45aacd91.cjs → calendar-check-icon_2.entry-087dd913.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-2f7dc236.js → calendar-check-icon_2.entry-08ef8d2f.js} +5 -5
- package/dist/{calendar-icon.entry-70ac9bd6.js → calendar-icon.entry-53b54115.js} +5 -5
- package/dist/{calendar-icon.entry-90d67b03.cjs → calendar-icon.entry-73f9d05b.cjs} +1 -1
- package/dist/checkbox-component_3.entry-bc9768dd.cjs +1 -0
- package/dist/checkbox-component_3.entry-d828eb1d.js +149 -0
- package/dist/{chevron-icon_3.entry-3c95cc88.js → chevron-icon_3.entry-783588a9.js} +8 -8
- package/dist/chevron-icon_3.entry-e956d78c.cjs +1 -0
- package/dist/{clock-icon_4.entry-af5301d7.js → clock-icon_4.entry-0e809dcb.js} +18 -18
- package/dist/{clock-icon_4.entry-b50cce70.cjs → clock-icon_4.entry-60d41dfd.cjs} +1 -1
- package/dist/close-icon.entry-1b5d25c5.cjs +1 -0
- package/dist/close-icon.entry-fef4f624.js +15 -0
- package/dist/constants-6da0ede7-151395ad.cjs +1 -0
- package/dist/{constants-f6e79ab7-24392f9e.js → constants-6da0ede7-49c32ba7.js} +24 -13
- package/dist/{copy-icon.entry-312ff230.js → copy-icon.entry-25699ab8.js} +7 -7
- package/dist/{copy-icon.entry-74f8ebcd.cjs → copy-icon.entry-ab6530e0.cjs} +1 -1
- package/dist/{delete-icon.entry-00cb3ee8.js → delete-icon.entry-802084f6.js} +5 -5
- package/dist/{delete-icon.entry-b61a6706.cjs → delete-icon.entry-e99e1f82.cjs} +1 -1
- package/dist/document-refresh-icon.entry-065a59f5.cjs +1 -0
- package/dist/document-refresh-icon.entry-d1604f53.js +15 -0
- package/dist/elements/index.d.ts +1 -0
- package/dist/{feedbackSync-547e51ee-bcaf691c.js → feedbackSync-c040f483-2b6476c4.js} +1 -1
- package/dist/{feedbackSync-547e51ee-9b572309.cjs → feedbackSync-c040f483-d6dd0560.cjs} +1 -1
- package/dist/{folder-icon.entry-c32a6e15.cjs → folder-icon.entry-351e61fc.cjs} +1 -1
- package/dist/{folder-icon.entry-60b3eda5.js → folder-icon.entry-6c0c09ed.js} +4 -4
- package/dist/forward-icon.entry-0ccfb600.js +15 -0
- package/dist/forward-icon.entry-6b7af9cd.cjs +1 -0
- package/dist/{globe-icon.entry-21a80591.cjs → globe-icon.entry-2b75b66b.cjs} +1 -1
- package/dist/{globe-icon.entry-397727e1.js → globe-icon.entry-5ddcd2cb.js} +4 -4
- package/dist/{google-logo-icon_4.entry-6ccf8379.js → google-logo-icon_4.entry-04174684.js} +354 -342
- package/dist/google-logo-icon_4.entry-a685ff91.cjs +1 -0
- package/dist/inbox-icon.entry-0ad18b3f.js +15 -0
- package/dist/inbox-icon.entry-425d1ded.cjs +1 -0
- package/dist/{index-594c8e7b.js → index-7e7c24f1.js} +1486 -1412
- package/dist/index-81719cc6.cjs +81 -0
- package/dist/{index.es-2d849a15-2d84f7a5.cjs → index.es-2b014ec7-0589e68a.cjs} +1 -1
- package/dist/{index.es-2d849a15-4eb8e180.js → index.es-2b014ec7-72557487.js} +1 -1
- package/dist/{info-icon_2.entry-e7b86847.cjs → info-icon_2.entry-7ec02802.cjs} +1 -1
- package/dist/{info-icon_2.entry-65e0023f.js → info-icon_2.entry-a6d0e842.js} +6 -6
- package/dist/{input-color-picker.entry-37d2fb66.js → input-color-picker.entry-d98d06ca.js} +3 -3
- package/dist/{input-color-picker.entry-aabfe638.cjs → input-color-picker.entry-ed9a1c07.cjs} +1 -1
- package/dist/input-component.entry-2e57b00e.cjs +1 -0
- package/dist/{input-component.entry-c07d92b1.js → input-component.entry-f3aa3419.js} +7 -7
- package/dist/{input-dropdown_2.entry-90c08f10.js → input-dropdown_2.entry-0d9c8475.js} +15 -15
- package/dist/input-dropdown_2.entry-6fc7df16.cjs +1 -0
- package/dist/italic-icon.entry-7a8712f2.cjs +1 -0
- package/dist/italic-icon.entry-d610e66f.js +15 -0
- package/dist/{multi-select-dropdown.entry-c143becc.js → multi-select-dropdown.entry-b31d9f11.js} +4 -4
- package/dist/multi-select-dropdown.entry-eaa268b4.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-4974ffe6.js → nylas-booked-event-card_12.entry-45514813.js} +395 -349
- package/dist/nylas-booked-event-card_12.entry-498de30a.cjs +1 -0
- package/dist/{nylas-form-card.entry-42e718e2.js → nylas-form-card.entry-67aec298.js} +3 -3
- package/dist/{nylas-form-card.entry-55d3909c.cjs → nylas-form-card.entry-fdb3c114.cjs} +1 -1
- package/dist/{nylas-if-state.entry-4de782b7.cjs → nylas-if-state.entry-76b38c9c.cjs} +1 -1
- package/dist/{nylas-if-state.entry-beef8af6.js → nylas-if-state.entry-ee7d92b0.js} +3 -3
- package/dist/{nylas-login.entry-1661cbd4.js → nylas-login.entry-265f9d0f.js} +3 -3
- package/dist/{nylas-login.entry-d6b80abe.cjs → nylas-login.entry-589e45d0.cjs} +1 -1
- package/dist/{nylas-provider.entry-1f140378.js → nylas-provider.entry-5605a3e0.js} +5 -5
- package/dist/{nylas-provider.entry-d5495e1a.cjs → nylas-provider.entry-cfb9627c.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-bebe4e7d.cjs → nylas-scheduler-editor.entry-6fdfb9b5.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-f184f72e.js → nylas-scheduler-editor.entry-b3e085b3.js} +30 -30
- package/dist/nylas-scheduling.entry-8cc5c353.cjs +1 -0
- package/dist/{nylas-scheduling.entry-c335ad21.js → nylas-scheduling.entry-bc00beba.js} +88 -79
- package/dist/nylas-time-window-picker.entry-a77c1d67.cjs +1 -0
- package/dist/nylas-time-window-picker.entry-c421303e.js +316 -0
- package/dist/{person-icon.entry-21946944.cjs → person-icon.entry-36b21e95.cjs} +1 -1
- package/dist/{person-icon.entry-f9ca9147.js → person-icon.entry-85660f98.js} +2 -2
- package/dist/{play-icon.entry-dbfed5e8.js → play-icon.entry-953b1bc8.js} +4 -4
- package/dist/{play-icon.entry-b27fcb18.cjs → play-icon.entry-c35ade8a.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +71 -70
- package/dist/{refresh-icon.entry-9d94a60b.cjs → refresh-icon.entry-038501ca.cjs} +1 -1
- package/dist/{refresh-icon.entry-7886041f.js → refresh-icon.entry-d8644f5d.js} +4 -4
- package/dist/{register-component-677d8d2b-0113766e.js → register-component-e9c10e19-099fb50f.js} +1 -1
- package/dist/{register-component-677d8d2b-4738af1d.cjs → register-component-e9c10e19-80bbc4dd.cjs} +1 -1
- package/dist/{reply-all-icon.entry-f0e0a5c4.cjs → reply-all-icon.entry-ead9d0ba.cjs} +1 -1
- package/dist/{reply-all-icon.entry-fdd0058e.js → reply-all-icon.entry-f209daeb.js} +5 -5
- package/dist/reply-icon.entry-b7f35ecd.cjs +1 -0
- package/dist/reply-icon.entry-d37a129b.js +15 -0
- package/dist/{scheduler-config-store-ed4a8dfd-a16d5c62.cjs → scheduler-config-store-ed4a8dfd-0d4408cf.cjs} +1 -1
- package/dist/{scheduler-config-store-ed4a8dfd-012dcf85.js → scheduler-config-store-ed4a8dfd-35ec90c6.js} +1 -1
- package/dist/{scheduler-store-92eb8804-bc68a43a.js → scheduler-store-dc3a7958-7c73f5e2.js} +2 -2
- package/dist/{scheduler-store-92eb8804-c3deee73.cjs → scheduler-store-dc3a7958-99c6bdf6.cjs} +1 -1
- package/dist/sent-icon.entry-b662ef5b.cjs +1 -0
- package/dist/sent-icon.entry-ec433cec.js +15 -0
- package/dist/spam-icon.entry-3a553ae4.js +15 -0
- package/dist/spam-icon.entry-a79819fd.cjs +1 -0
- package/dist/{star-icon.entry-4dcae472.cjs → star-icon.entry-47ea44e7.cjs} +1 -1
- package/dist/{star-icon.entry-501083c1.js → star-icon.entry-9b22bb32.js} +4 -4
- package/dist/stop-icon.entry-1f7918b2.js +15 -0
- package/dist/{stop-icon.entry-ed949255.cjs → stop-icon.entry-26e2e633.cjs} +1 -1
- package/dist/{textarea-component.entry-efae9031.js → textarea-component.entry-6939d0fc.js} +5 -4
- package/dist/textarea-component.entry-da0a861e.cjs +1 -0
- package/dist/toggle-switch.entry-5ae5ba46.js +33 -0
- package/dist/toggle-switch.entry-c5fd3e33.cjs +1 -0
- package/dist/{translate-icon.entry-2591baf8.cjs → translate-icon.entry-72e0369e.cjs} +1 -1
- package/dist/{translate-icon.entry-676a4150.js → translate-icon.entry-8cffa646.js} +2 -2
- package/dist/trash-fill-icon.entry-815859c6.js +15 -0
- package/dist/trash-fill-icon.entry-8620c28f.cjs +1 -0
- package/dist/{underline-icon.entry-3513c5ef.js → underline-icon.entry-afd9c78b.js} +2 -2
- package/dist/{underline-icon.entry-6bf14476.cjs → underline-icon.entry-ba1a9e87.cjs} +1 -1
- package/dist/{warning-icon.entry-6e723597.js → warning-icon.entry-53441175.js} +7 -7
- package/dist/{warning-icon.entry-719a094d.cjs → warning-icon.entry-7cbede6b.cjs} +1 -1
- package/package.json +3 -3
- package/dist/add-circle-icon.entry-00c87903.js +0 -15
- package/dist/bold-icon.entry-d837c73d.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_53.entry-094bd4b9.cjs +0 -6
- package/dist/checkbox-component_3.entry-231b2254.cjs +0 -1
- package/dist/checkbox-component_3.entry-7270533c.js +0 -153
- package/dist/chevron-icon_3.entry-ead3d4c8.cjs +0 -1
- package/dist/close-icon.entry-04008446.cjs +0 -1
- package/dist/close-icon.entry-0a4105c9.js +0 -15
- package/dist/constants-f6e79ab7-23d7236b.cjs +0 -1
- package/dist/document-refresh-icon.entry-1c985b1e.js +0 -15
- package/dist/document-refresh-icon.entry-27ff5cb2.cjs +0 -1
- package/dist/forward-icon.entry-5f9a7639.js +0 -15
- package/dist/forward-icon.entry-8cd805dc.cjs +0 -1
- package/dist/google-logo-icon_4.entry-42e87368.cjs +0 -1
- package/dist/inbox-icon.entry-1e448b4b.js +0 -15
- package/dist/inbox-icon.entry-50605b1d.cjs +0 -1
- package/dist/index-cfb93df6.cjs +0 -81
- package/dist/input-component.entry-51f6da14.cjs +0 -1
- package/dist/input-dropdown_2.entry-20fb0552.cjs +0 -1
- package/dist/italic-icon.entry-8e5599ff.js +0 -15
- package/dist/italic-icon.entry-ee10a040.cjs +0 -1
- package/dist/multi-select-dropdown.entry-656d2791.cjs +0 -1
- package/dist/nylas-booked-event-card_12.entry-669bb872.cjs +0 -1
- package/dist/nylas-scheduling.entry-21c04831.cjs +0 -1
- package/dist/nylas-time-window-picker_2.entry-9e0dd470.js +0 -336
- package/dist/nylas-time-window-picker_2.entry-a2651ee7.cjs +0 -1
- package/dist/reply-icon.entry-0a42fb2c.cjs +0 -1
- package/dist/reply-icon.entry-a8d2b0f8.js +0 -15
- package/dist/sent-icon.entry-c3f84a59.cjs +0 -1
- package/dist/sent-icon.entry-e047f087.js +0 -15
- package/dist/spam-icon.entry-55d01416.js +0 -15
- package/dist/spam-icon.entry-671eb165.cjs +0 -1
- package/dist/stop-icon.entry-130a28b2.js +0 -15
- package/dist/textarea-component.entry-65dd740a.cjs +0 -1
- package/dist/trash-fill-icon.entry-5b373be7.js +0 -15
- package/dist/trash-fill-icon.entry-c411d0e0.cjs +0 -1
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import { b as oe, Q as Y, r as q, c as U, R as Z, S as B, T as G, U as Q, h as f, H as le, g as he } from "./index-594c8e7b.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
var J = { exports: {} };
|
|
5
|
-
(function(e, t) {
|
|
6
|
-
(function(n, i) {
|
|
7
|
-
e.exports = i();
|
|
8
|
-
})(oe, function() {
|
|
9
|
-
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, a = /\d\d/, o = /\d\d?/, x = /\d*[^-_:/,()\s\d]+/, v = {}, V = function(s) {
|
|
10
|
-
return (s = +s) + (s > 68 ? 1900 : 2e3);
|
|
11
|
-
}, c = function(s) {
|
|
12
|
-
return function(r) {
|
|
13
|
-
this[s] = +r;
|
|
14
|
-
};
|
|
15
|
-
}, X = [/[+-]\d\d:?(\d\d)?|Z/, function(s) {
|
|
16
|
-
(this.zone || (this.zone = {})).offset = function(r) {
|
|
17
|
-
if (!r || r === "Z")
|
|
18
|
-
return 0;
|
|
19
|
-
var l = r.match(/([+-]|\d\d)/g), h = 60 * l[1] + (+l[2] || 0);
|
|
20
|
-
return h === 0 ? 0 : l[0] === "+" ? -h : h;
|
|
21
|
-
}(s);
|
|
22
|
-
}], F = function(s) {
|
|
23
|
-
var r = v[s];
|
|
24
|
-
return r && (r.indexOf ? r : r.s.concat(r.f));
|
|
25
|
-
}, j = function(s, r) {
|
|
26
|
-
var l, h = v.meridiem;
|
|
27
|
-
if (h) {
|
|
28
|
-
for (var p = 1; p <= 24; p += 1)
|
|
29
|
-
if (s.indexOf(h(p, 0, r)) > -1) {
|
|
30
|
-
l = p > 12;
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
} else
|
|
34
|
-
l = s === (r ? "pm" : "PM");
|
|
35
|
-
return l;
|
|
36
|
-
}, ee = { A: [x, function(s) {
|
|
37
|
-
this.afternoon = j(s, !1);
|
|
38
|
-
}], a: [x, function(s) {
|
|
39
|
-
this.afternoon = j(s, !0);
|
|
40
|
-
}], S: [/\d/, function(s) {
|
|
41
|
-
this.milliseconds = 100 * +s;
|
|
42
|
-
}], SS: [a, function(s) {
|
|
43
|
-
this.milliseconds = 10 * +s;
|
|
44
|
-
}], SSS: [/\d{3}/, function(s) {
|
|
45
|
-
this.milliseconds = +s;
|
|
46
|
-
}], s: [o, c("seconds")], ss: [o, c("seconds")], m: [o, c("minutes")], mm: [o, c("minutes")], H: [o, c("hours")], h: [o, c("hours")], HH: [o, c("hours")], hh: [o, c("hours")], D: [o, c("day")], DD: [a, c("day")], Do: [x, function(s) {
|
|
47
|
-
var r = v.ordinal, l = s.match(/\d+/);
|
|
48
|
-
if (this.day = l[0], r)
|
|
49
|
-
for (var h = 1; h <= 31; h += 1)
|
|
50
|
-
r(h).replace(/\[|\]/g, "") === s && (this.day = h);
|
|
51
|
-
}], M: [o, c("month")], MM: [a, c("month")], MMM: [x, function(s) {
|
|
52
|
-
var r = F("months"), l = (F("monthsShort") || r.map(function(h) {
|
|
53
|
-
return h.slice(0, 3);
|
|
54
|
-
})).indexOf(s) + 1;
|
|
55
|
-
if (l < 1)
|
|
56
|
-
throw new Error();
|
|
57
|
-
this.month = l % 12 || l;
|
|
58
|
-
}], MMMM: [x, function(s) {
|
|
59
|
-
var r = F("months").indexOf(s) + 1;
|
|
60
|
-
if (r < 1)
|
|
61
|
-
throw new Error();
|
|
62
|
-
this.month = r % 12 || r;
|
|
63
|
-
}], Y: [/[+-]?\d+/, c("year")], YY: [a, function(s) {
|
|
64
|
-
this.year = V(s);
|
|
65
|
-
}], YYYY: [/\d{4}/, c("year")], Z: X, ZZ: X };
|
|
66
|
-
function te(s) {
|
|
67
|
-
var r, l;
|
|
68
|
-
r = s, l = v && v.formats;
|
|
69
|
-
for (var h = (s = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(I, w, u) {
|
|
70
|
-
var d = u && u.toUpperCase();
|
|
71
|
-
return w || l[u] || n[u] || l[d].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(k, T, C) {
|
|
72
|
-
return T || C.slice(1);
|
|
73
|
-
});
|
|
74
|
-
})).match(i), p = h.length, y = 0; y < p; y += 1) {
|
|
75
|
-
var L = h[y], S = ee[L], b = S && S[0], g = S && S[1];
|
|
76
|
-
h[y] = g ? { regex: b, parser: g } : L.replace(/^\[|\]$/g, "");
|
|
77
|
-
}
|
|
78
|
-
return function(I) {
|
|
79
|
-
for (var w = {}, u = 0, d = 0; u < p; u += 1) {
|
|
80
|
-
var k = h[u];
|
|
81
|
-
if (typeof k == "string")
|
|
82
|
-
d += k.length;
|
|
83
|
-
else {
|
|
84
|
-
var T = k.regex, C = k.parser, E = I.slice(d), M = T.exec(E)[0];
|
|
85
|
-
C.call(w, M), I = I.replace(M, "");
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return function(D) {
|
|
89
|
-
var m = D.afternoon;
|
|
90
|
-
if (m !== void 0) {
|
|
91
|
-
var A = D.hours;
|
|
92
|
-
m ? A < 12 && (D.hours += 12) : A === 12 && (D.hours = 0), delete D.afternoon;
|
|
93
|
-
}
|
|
94
|
-
}(w), w;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return function(s, r, l) {
|
|
98
|
-
l.p.customParseFormat = !0, s && s.parseTwoDigitYear && (V = s.parseTwoDigitYear);
|
|
99
|
-
var h = r.prototype, p = h.parse;
|
|
100
|
-
h.parse = function(y) {
|
|
101
|
-
var L = y.date, S = y.utc, b = y.args;
|
|
102
|
-
this.$u = S;
|
|
103
|
-
var g = b[1];
|
|
104
|
-
if (typeof g == "string") {
|
|
105
|
-
var I = b[2] === !0, w = b[3] === !0, u = I || w, d = b[2];
|
|
106
|
-
w && (d = b[2]), v = this.$locale(), !I && d && (v = l.Ls[d]), this.$d = function(E, M, D) {
|
|
107
|
-
try {
|
|
108
|
-
if (["x", "X"].indexOf(M) > -1)
|
|
109
|
-
return new Date((M === "X" ? 1e3 : 1) * E);
|
|
110
|
-
var m = te(M)(E), A = m.year, O = m.month, ie = m.day, se = m.hours, ne = m.minutes, ae = m.seconds, re = m.milliseconds, N = m.zone, P = /* @__PURE__ */ new Date(), _ = ie || (A || O ? 1 : P.getDate()), z = A || P.getFullYear(), $ = 0;
|
|
111
|
-
A && !O || ($ = O > 0 ? O - 1 : P.getMonth());
|
|
112
|
-
var H = se || 0, K = ne || 0, R = ae || 0, W = re || 0;
|
|
113
|
-
return N ? new Date(Date.UTC(z, $, _, H, K, R, W + 60 * N.offset * 1e3)) : D ? new Date(Date.UTC(z, $, _, H, K, R, W)) : new Date(z, $, _, H, K, R, W);
|
|
114
|
-
} catch {
|
|
115
|
-
return /* @__PURE__ */ new Date("");
|
|
116
|
-
}
|
|
117
|
-
}(L, g, S), this.init(), d && d !== !0 && (this.$L = this.locale(d).$L), u && L != this.format(g) && (this.$d = /* @__PURE__ */ new Date("")), v = {};
|
|
118
|
-
} else if (g instanceof Array)
|
|
119
|
-
for (var k = g.length, T = 1; T <= k; T += 1) {
|
|
120
|
-
b[1] = g[T - 1];
|
|
121
|
-
var C = l.apply(this, b);
|
|
122
|
-
if (C.isValid()) {
|
|
123
|
-
this.$d = C.$d, this.$L = C.$L, this.init();
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
T === k && (this.$d = /* @__PURE__ */ new Date(""));
|
|
127
|
-
}
|
|
128
|
-
else
|
|
129
|
-
p.call(this, y);
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
});
|
|
133
|
-
})(J);
|
|
134
|
-
const ce = J.exports, de = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', me = de;
|
|
135
|
-
Y.extend(ce);
|
|
136
|
-
const fe = class {
|
|
137
|
-
constructor(e) {
|
|
138
|
-
q(this, e), this.timeChange = U(this, "timeChange", 7), this.formError = U(this, "formError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
|
|
139
|
-
}
|
|
140
|
-
handleOutsideClick(e) {
|
|
141
|
-
!e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
|
|
142
|
-
}
|
|
143
|
-
minimumStartTimeChangedHandler() {
|
|
144
|
-
if (this.minimumStartTime) {
|
|
145
|
-
let e = Y().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
|
|
146
|
-
this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? e = e.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (e = e.subtract(12, "hour")), this.times = this.generateTimes();
|
|
147
|
-
const t = Y(this.times[0].value, "hh:mma");
|
|
148
|
-
Y(this.time, "hh:mma").isBefore(t) && (this.err = "Invalid", this.formError.emit({
|
|
149
|
-
key: this.el.id,
|
|
150
|
-
message: "Invalid"
|
|
151
|
-
}));
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
componentDidRender() {
|
|
155
|
-
if (this.showTimes && this.shouldAutoScroll) {
|
|
156
|
-
const e = Z(this.time), t = this.times.findIndex((n) => n.value === e);
|
|
157
|
-
t > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(t));
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
handleTimeChange(e, t) {
|
|
162
|
-
const n = t.split(":");
|
|
163
|
-
n[0] === "00" && n[1].slice(-2) == "pm" && (this.err = "Invalid", this.formError.emit({
|
|
164
|
-
key: this.el.id,
|
|
165
|
-
message: "Invalid"
|
|
166
|
-
})), B(t) ? (this.err = "", this.formError.emit({
|
|
167
|
-
key: this.el.id,
|
|
168
|
-
message: ""
|
|
169
|
-
})) : (this.err = "Invalid", this.formError.emit({
|
|
170
|
-
key: this.el.id,
|
|
171
|
-
message: "Invalid"
|
|
172
|
-
})), this.timeChange.emit({
|
|
173
|
-
key: this.el.id,
|
|
174
|
-
value: t
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
handleTimeAutocomplete(e) {
|
|
178
|
-
var n;
|
|
179
|
-
const t = (n = e.target) == null ? void 0 : n.value;
|
|
180
|
-
if (!B(t)) {
|
|
181
|
-
this.err = "Invalid", this.formError.emit({
|
|
182
|
-
key: this.el.id,
|
|
183
|
-
message: "Invalid"
|
|
184
|
-
});
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
if (t === "") {
|
|
188
|
-
const i = G().format("hh:mma");
|
|
189
|
-
this.timeChange.emit({
|
|
190
|
-
key: this.el.id,
|
|
191
|
-
value: i
|
|
192
|
-
});
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
if (!Q(t)) {
|
|
196
|
-
const i = Z(t);
|
|
197
|
-
this.timeChange.emit({
|
|
198
|
-
key: this.el.id,
|
|
199
|
-
value: i
|
|
200
|
-
});
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
this.timeChange.emit({
|
|
204
|
-
key: this.el.id,
|
|
205
|
-
value: t
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
handleOnInput(e) {
|
|
209
|
-
var n;
|
|
210
|
-
const t = (n = e.target) == null ? void 0 : n.value;
|
|
211
|
-
if (B(t)) {
|
|
212
|
-
if (t === "") {
|
|
213
|
-
const i = G().format("hh:mma"), a = this.times.findIndex((o) => o.value === i);
|
|
214
|
-
a > -1 && this.scrollToViewWithinParent(a);
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
if (!Q(t)) {
|
|
218
|
-
const i = Z(t), a = this.times.findIndex((o) => o.value === i);
|
|
219
|
-
a > -1 && this.scrollToViewWithinParent(a);
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
generateTimes() {
|
|
225
|
-
const e = [];
|
|
226
|
-
let t = Y().set("hour", 0).set("minute", 0).set("second", 0);
|
|
227
|
-
this.minimumStartTime && (t = Y(this.minimumStartTime, "hh:mma"));
|
|
228
|
-
const n = t.endOf("day").diff(t, "minutes"), i = Math.round(n / 15);
|
|
229
|
-
for (let a = 0; a < i + 1; a++) {
|
|
230
|
-
const o = t.add(a * 15, "minute");
|
|
231
|
-
if (a == i && o.format("hh:mma").includes("am"))
|
|
232
|
-
break;
|
|
233
|
-
e.push({ id: a, value: o.format("hh:mma") });
|
|
234
|
-
}
|
|
235
|
-
return e;
|
|
236
|
-
}
|
|
237
|
-
handleComboboxKeyDown(e) {
|
|
238
|
-
if (e.key === "ArrowDown") {
|
|
239
|
-
if (e.preventDefault(), !this.showTimes) {
|
|
240
|
-
this.showTimes = !0, this.shouldAutoScroll = !0;
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
if (this.ariaActivedescendant === "")
|
|
244
|
-
this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
|
|
245
|
-
else {
|
|
246
|
-
const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t + 1 < this.times.length ? t + 1 : 0;
|
|
247
|
-
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
248
|
-
}
|
|
249
|
-
} else if (e.key === "ArrowUp")
|
|
250
|
-
if (e.preventDefault(), this.ariaActivedescendant === "")
|
|
251
|
-
this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
|
|
252
|
-
else {
|
|
253
|
-
const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t - 1 >= 0 ? t - 1 : this.times.length - 1;
|
|
254
|
-
this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
|
|
255
|
-
}
|
|
256
|
-
else
|
|
257
|
-
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
258
|
-
}
|
|
259
|
-
handleListboxKeydown(e) {
|
|
260
|
-
const t = this.times, n = t.findIndex((i) => i.id.toString() === this.ariaActivedescendant);
|
|
261
|
-
if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
|
|
262
|
-
e.preventDefault();
|
|
263
|
-
const i = n + 1 < t.length ? n + 1 : 0;
|
|
264
|
-
this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
|
|
265
|
-
} else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey) {
|
|
266
|
-
e.preventDefault();
|
|
267
|
-
const i = n - 1 >= 0 ? n - 1 : t.length - 1;
|
|
268
|
-
this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
|
|
269
|
-
} else if (e.key === "Enter") {
|
|
270
|
-
if (e.preventDefault(), this.ariaActivedescendant) {
|
|
271
|
-
const i = t[n];
|
|
272
|
-
this.handleTimeChange(e, i.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
|
|
273
|
-
}
|
|
274
|
-
} else
|
|
275
|
-
e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
|
|
276
|
-
}
|
|
277
|
-
scrollToViewWithinParent(e) {
|
|
278
|
-
var x;
|
|
279
|
-
const t = this.times[e], n = (x = this.el.shadowRoot) == null ? void 0 : x.getElementById(t.id.toString()), i = this.timeMenu;
|
|
280
|
-
this.ariaActivedescendant = t.id.toString();
|
|
281
|
-
const a = n.getBoundingClientRect(), o = i.getBoundingClientRect();
|
|
282
|
-
a.top < o.top ? i.scrollTop -= o.top - a.top : a.bottom > o.bottom && (i.scrollTop += a.bottom - o.bottom), a.left < o.left ? i.scrollLeft -= o.left - a.left : a.right > o.right && (i.scrollLeft += a.right - o.right);
|
|
283
|
-
}
|
|
284
|
-
focusOption(e) {
|
|
285
|
-
var a;
|
|
286
|
-
const t = this.times[e];
|
|
287
|
-
if (!t)
|
|
288
|
-
return;
|
|
289
|
-
const n = t.id.toString(), i = (a = this.el.shadowRoot) == null ? void 0 : a.getElementById(n);
|
|
290
|
-
i && (i.focus(), i.scrollIntoView({ behavior: "smooth", block: "nearest" }));
|
|
291
|
-
}
|
|
292
|
-
render() {
|
|
293
|
-
return f(le, { key: "08c910b64f1990194d69892923e03e8cf2967853" }, f("div", { key: "8580adca9096558b400d9fc1ceaac1807345a4bf", class: "time-picker", part: "time-picker" }, f("input", { key: "922200c3ba40d880f368f06dba3a2c2549cfa9d6", type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
294
|
-
"time-input": !0,
|
|
295
|
-
error: !!this.err || this.hasError
|
|
296
|
-
}, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
|
|
297
|
-
this.showTimes = !this.showTimes, this.shouldAutoScroll = !0;
|
|
298
|
-
}, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && f("div", { class: "invalid-time-icon" }), this.showTimes && f("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, f("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => f("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
|
|
299
|
-
focused: this.ariaActivedescendant === e.id.toString()
|
|
300
|
-
}, onClick: (t) => {
|
|
301
|
-
this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
|
|
302
|
-
}, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && f("p", { class: "error", id: "email-error" }, this.err)));
|
|
303
|
-
}
|
|
304
|
-
get el() {
|
|
305
|
-
return he(this);
|
|
306
|
-
}
|
|
307
|
-
static get watchers() {
|
|
308
|
-
return {
|
|
309
|
-
minimumStartTime: ["minimumStartTimeChangedHandler"]
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
fe.style = me;
|
|
314
|
-
const ue = '.switch{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}', pe = ue, ye = class {
|
|
315
|
-
constructor(e) {
|
|
316
|
-
q(this, e), this.nylasFormSwitchToggled = U(this, "nylasFormSwitchToggled", 7), this.name = "toggle-switch", this.checked = !1, this.label = "", this.isChecked = this.checked;
|
|
317
|
-
}
|
|
318
|
-
componentWillLoad() {
|
|
319
|
-
this.isChecked = this.checked;
|
|
320
|
-
}
|
|
321
|
-
toggleCheck() {
|
|
322
|
-
this.isChecked = !this.isChecked, this.nylasFormSwitchToggled.emit({
|
|
323
|
-
checked: this.isChecked,
|
|
324
|
-
name: this.name,
|
|
325
|
-
label: this.label
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
render() {
|
|
329
|
-
return f("label", { key: "1586b4b0484716254ad8befbd9f99f7956e9c129", class: "switch", part: "ts_label" }, f("input", { key: "c7e9432dfe88d4c27bb146c3816f750fb7dc6851", type: "checkbox", part: "ts_input", name: this.name, checked: this.isChecked, onChange: () => this.toggleCheck() }), f("div", { key: "08980c1db3849f197b1780caa55bfe8e84ce0a92", class: "slider round", part: "ts_slider" }));
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
ye.style = pe;
|
|
333
|
-
export {
|
|
334
|
-
fe as nylas_time_window_picker,
|
|
335
|
-
ye as toggle_switch
|
|
336
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-cfb93df6.cjs");require("react");require("react-dom");var V={exports:{}};(function(e,t){(function(a,i){e.exports=i()})(n.commonjsGlobal,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,l=/\d\d?/,v=/\d*[^-_:/,()\s\d]+/,x={},R=function(s){return(s=+s)+(s>68?1900:2e3)},d=function(s){return function(o){this[s]=+o}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var h=o.match(/([+-]|\d\d)/g),c=60*h[1]+(+h[2]||0);return c===0?0:h[0]==="+"?-c:c}(s)}],O=function(s){var o=x[s];return o&&(o.indexOf?o:o.s.concat(o.f))},Z=function(s,o){var h,c=x.meridiem;if(c){for(var p=1;p<=24;p+=1)if(s.indexOf(c(p,0,o))>-1){h=p>12;break}}else h=s===(o?"pm":"PM");return h},N={A:[v,function(s){this.afternoon=Z(s,!1)}],a:[v,function(s){this.afternoon=Z(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[r,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[l,d("seconds")],ss:[l,d("seconds")],m:[l,d("minutes")],mm:[l,d("minutes")],H:[l,d("hours")],h:[l,d("hours")],HH:[l,d("hours")],hh:[l,d("hours")],D:[l,d("day")],DD:[r,d("day")],Do:[v,function(s){var o=x.ordinal,h=s.match(/\d+/);if(this.day=h[0],o)for(var c=1;c<=31;c+=1)o(c).replace(/\[|\]/g,"")===s&&(this.day=c)}],M:[l,d("month")],MM:[r,d("month")],MMM:[v,function(s){var o=O("months"),h=(O("monthsShort")||o.map(function(c){return c.slice(0,3)})).indexOf(s)+1;if(h<1)throw new Error;this.month=h%12||h}],MMMM:[v,function(s){var o=O("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,d("year")],YY:[r,function(s){this.year=R(s)}],YYYY:[/\d{4}/,d("year")],Z:W,ZZ:W};function X(s){var o,h;o=s,h=x&&x.formats;for(var c=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,w,f){var m=f&&f.toUpperCase();return w||h[f]||a[f]||h[m].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,T,M){return T||M.slice(1)})})).match(i),p=c.length,y=0;y<p;y+=1){var Y=c[y],S=N[Y],b=S&&S[0],g=S&&S[1];c[y]=g?{regex:b,parser:g}:Y.replace(/^\[|\]$/g,"")}return function(I){for(var w={},f=0,m=0;f<p;f+=1){var k=c[f];if(typeof k=="string")m+=k.length;else{var T=k.regex,M=k.parser,L=I.slice(m),D=T.exec(L)[0];M.call(w,D),I=I.replace(D,"")}}return function(C){var u=C.afternoon;if(u!==void 0){var A=C.hours;u?A<12&&(C.hours+=12):A===12&&(C.hours=0),delete C.afternoon}}(w),w}}return function(s,o,h){h.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(R=s.parseTwoDigitYear);var c=o.prototype,p=c.parse;c.parse=function(y){var Y=y.date,S=y.utc,b=y.args;this.$u=S;var g=b[1];if(typeof g=="string"){var I=b[2]===!0,w=b[3]===!0,f=I||w,m=b[2];w&&(m=b[2]),x=this.$locale(),!I&&m&&(x=h.Ls[m]),this.$d=function(L,D,C){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*L);var u=X(D)(L),A=u.year,E=u.month,G=u.day,J=u.hours,Q=u.minutes,ee=u.seconds,te=u.milliseconds,B=u.zone,$=new Date,P=G||(A||E?1:$.getDate()),_=A||$.getFullYear(),F=0;A&&!E||(F=E>0?E-1:$.getMonth());var z=J||0,j=Q||0,H=ee||0,K=te||0;return B?new Date(Date.UTC(_,F,P,z,j,H,K+60*B.offset*1e3)):C?new Date(Date.UTC(_,F,P,z,j,H,K)):new Date(_,F,P,z,j,H,K)}catch{return new Date("")}}(Y,g,S),this.init(),m&&m!==!0&&(this.$L=this.locale(m).$L),f&&Y!=this.format(g)&&(this.$d=new Date("")),x={}}else if(g instanceof Array)for(var k=g.length,T=1;T<=k;T+=1){b[1]=g[T-1];var M=h.apply(this,b);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}T===k&&(this.$d=new Date(""))}else p.call(this,y)}}})})(V);const ie=V.exports,se=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',ne=se;n.dayjs.extend(ie);const U=class{constructor(e){n.registerInstance(this,e),this.timeChange=n.createEvent(this,"timeChange",7),this.formError=n.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=n.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=n.dayjs(this.times[0].value,"hh:mma");n.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=n.autocompleteTimeFormat(this.time),t=this.times.findIndex(a=>a.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const a=t.split(":");a[0]==="00"&&a[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),n.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var a;const t=(a=e.target)==null?void 0:a.value;if(!n.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=n.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!n.validateExactTimeFormat(t)){const i=n.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var a;const t=(a=e.target)==null?void 0:a.value;if(n.validateTimeFormatInput(t)){if(t===""){const i=n.roundToNearest15Minutes().format("hh:mma"),r=this.times.findIndex(l=>l.value===i);r>-1&&this.scrollToViewWithinParent(r);return}if(!n.validateExactTimeFormat(t)){const i=n.autocompleteTimeFormat(t),r=this.times.findIndex(l=>l.value===i);r>-1&&this.scrollToViewWithinParent(r);return}}}generateTimes(){const e=[];let t=n.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=n.dayjs(this.minimumStartTime,"hh:mma"));const a=t.endOf("day").diff(t,"minutes"),i=Math.round(a/15);for(let r=0;r<i+1;r++){const l=t.add(r*15,"minute");if(r==i&&l.format("hh:mma").includes("am"))break;e.push({id:r,value:l.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),a=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),a=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[a].id.toString(),this.focusOption(a)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,a=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=a+1<t.length?a+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=a-1>=0?a-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[a];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var v;const t=this.times[e],a=(v=this.el.shadowRoot)==null?void 0:v.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const r=a.getBoundingClientRect(),l=i.getBoundingClientRect();r.top<l.top?i.scrollTop-=l.top-r.top:r.bottom>l.bottom&&(i.scrollTop+=r.bottom-l.bottom),r.left<l.left?i.scrollLeft-=l.left-r.left:r.right>l.right&&(i.scrollLeft+=r.right-l.right)}focusOption(e){var r;const t=this.times[e];if(!t)return;const a=t.id.toString(),i=(r=this.el.shadowRoot)==null?void 0:r.getElementById(a);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return n.h(n.Host,{key:"08c910b64f1990194d69892923e03e8cf2967853"},n.h("div",{key:"8580adca9096558b400d9fc1ceaac1807345a4bf",class:"time-picker",part:"time-picker"},n.h("input",{key:"922200c3ba40d880f368f06dba3a2c2549cfa9d6",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&n.h("div",{class:"invalid-time-icon"}),this.showTimes&&n.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},n.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>n.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&n.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return n.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=ne;const ae='.switch{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:inline-block;height:34px;position:relative;width:60px}.switch input{display:none}.slider{background-color:var(--nylas-base-300);bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{background-color:var(--nylas-base-0);bottom:4px;content:"";height:32px;left:4px;position:absolute;transition:0.4s;width:32px}input:checked+.slider{background-color:var(--nylas-success)}input:checked+.slider:before{transform:translateX(32px)}.slider.round{border-radius:35px;width:72px;height:40px}.slider.round:before{border-radius:50%}',re=ae,q=class{constructor(e){n.registerInstance(this,e),this.nylasFormSwitchToggled=n.createEvent(this,"nylasFormSwitchToggled",7),this.name="toggle-switch",this.checked=!1,this.label="",this.isChecked=this.checked}componentWillLoad(){this.isChecked=this.checked}toggleCheck(){this.isChecked=!this.isChecked,this.nylasFormSwitchToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return n.h("label",{key:"1586b4b0484716254ad8befbd9f99f7956e9c129",class:"switch",part:"ts_label"},n.h("input",{key:"c7e9432dfe88d4c27bb146c3816f750fb7dc6851",type:"checkbox",part:"ts_input",name:this.name,checked:this.isChecked,onChange:()=>this.toggleCheck()}),n.h("div",{key:"08980c1db3849f197b1780caa55bfe8e84ce0a92",class:"slider round",part:"ts_slider"}))}};q.style=re;exports.nylas_time_window_picker=U;exports.toggle_switch=q;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-cfb93df6.cjs");require("react");require("react-dom");const s=".sc-reply-icon-h{display:flex}",r=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"18be7bd8957b2b4e5531ac731dc5368d8189bed5",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"a420fae211dab532a422e6c9521f4a104275d4ed",d:"M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816","fill-rule":"evenodd"}))}};t.style=r;exports.reply_icon=t;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as s, h as e } from "./index-594c8e7b.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const i = ".sc-reply-icon-h{display:flex}", h = i, o = class {
|
|
5
|
-
constructor(t) {
|
|
6
|
-
s(this, t), this.width = "15", this.height = "15";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return e("svg", { key: "18be7bd8957b2b4e5531ac731dc5368d8189bed5", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, e("path", { key: "a420fae211dab532a422e6c9521f4a104275d4ed", d: "M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816", "fill-rule": "evenodd" }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
o.style = h;
|
|
13
|
-
export {
|
|
14
|
-
o as reply_icon
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-cfb93df6.cjs");require("react");require("react-dom");const c=".sc-sent-icon-h{display:flex}",a=c,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"0ad41e7b85d22b3be57d03090dfb7e39bcc46c40",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"d941ffc63a46e3fa2ccdca64b66c6faf2f5f3a4c",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"0098af5d7a9432a2782cd06ad25614f97d766869",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"1aaba59cbef1f759f899cecd2a24349a10061dba",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};e.style=a;exports.sent_icon=e;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as s, h as t } from "./index-594c8e7b.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const a = ".sc-sent-icon-h{display:flex}", o = a, c = class {
|
|
5
|
-
constructor(e) {
|
|
6
|
-
s(this, e), this.width = "15", this.height = "15";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return t("svg", { key: "0ad41e7b85d22b3be57d03090dfb7e39bcc46c40", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "d941ffc63a46e3fa2ccdca64b66c6faf2f5f3a4c", d: "M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "0098af5d7a9432a2782cd06ad25614f97d766869", d: "M3.5 3.5L12 10.5", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "1aaba59cbef1f759f899cecd2a24349a10061dba", d: "M3.5 20.5L12 13.5", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
c.style = o;
|
|
13
|
-
export {
|
|
14
|
-
c as sent_icon
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as e, h as t } from "./index-594c8e7b.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const o = ".sc-spam-icon-h{display:flex}", i = o, a = class {
|
|
5
|
-
constructor(s) {
|
|
6
|
-
e(this, s), this.width = "15", this.height = "15";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return t("svg", { key: "2cf09db799baa037808e0e147267e6e521581656", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "f53e6026a77ef28e49938206d4ad39645a364078", d: "M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "bf941f342528605433f231734cba30b329dab16c", d: "M2 5L12 12.5L22 5", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
a.style = i;
|
|
13
|
-
export {
|
|
14
|
-
a as spam_icon
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-cfb93df6.cjs");require("react");require("react-dom");const i=".sc-spam-icon-h{display:flex}",o=i,t=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"2cf09db799baa037808e0e147267e6e521581656",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f53e6026a77ef28e49938206d4ad39645a364078",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e.h("path",{key:"bf941f342528605433f231734cba30b329dab16c",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};t.style=o;exports.spam_icon=t;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as s, h as t } from "./index-594c8e7b.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const e = ".sc-stop-icon-h{display:flex}", i = e, c = class {
|
|
5
|
-
constructor(o) {
|
|
6
|
-
s(this, o), this.width = "15", this.height = "15";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return t("svg", { key: "df7eec4c007960f83155487d96452a10ffcbcd7e", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "1cd0f4af8c05959b3be310a29864967382e732c0", d: "M4 4H20V20H4V4Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
c.style = i;
|
|
13
|
-
export {
|
|
14
|
-
c as stop_icon
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-cfb93df6.cjs");require("react");require("react-dom");const s=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0;display:flex;gap:4px;align-items:center}label .error{color:var(--nylas-error)}textarea{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px}textarea:focus{outline-color:var(--nylas-primary)}textarea.error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}textarea.error::placeholder{font-weight:400}textarea::placeholder{color:var(--nylas-base-300)}textarea::-webkit-resizer{display:none}',l=s,r=class{constructor(a){e.registerInstance(this,a),this.nylasFormInputChanged=e.createEvent(this,"nylasFormInputChanged",7),this.name="textarea",this.defaultValue=void 0,this.label="",this.placeholder="",this.required=!1,this.readOnly=!1,this.autoFocus=!1,this.maxLength=255,this.type="multi_line_text",this.tooltip="",this.value="",this.error=""}componentDidLoad(){this.value=e.sanitize(this.defaultValue||"")}handleBookingFormSubmitted(a){this.validate(this.value),this.error&&a.preventDefault()}handletriggerValidation(a){this.validate(this.value),this.error&&a.preventDefault()}handleInput(a){const t=a.target;this.value=e.sanitize(t.value),this.nylasFormInputChanged.emit({value:this.value,name:this.name,error:this.error,label:this.label,type:this.type})}validate(a){this.required&&!a?this.error=`${this.label} is required.`:a.length>this.maxLength?this.error=`${this.label} cannot exceed ${this.maxLength} characters.`:this.error=""}render(){return e.h("label",{key:"18b05c7318527e7cf7215bf3825e2e65674527d9",part:"tc__label",class:{error:!!this.error}},e.h("p",{key:"ab8167c6d7f695c75ecf00f3719783fdb92b92f5"},e.h("span",{key:"f0669daea951f39a0f47929cf84fe2c573c7ab48",class:"label"},this.label),this.required&&e.h("span",{class:"required"},"*"),this.tooltip&&e.h("tooltip-component",null,e.h("info-icon",{slot:"tooltip-icon"}),e.h("span",{slot:"tooltip-content"},this.tooltip))),e.h("textarea",{key:"c0960b3e0662e02cd5e26586853cd1550b0fc4e5",name:this.name,placeholder:this.placeholder,readOnly:this.readOnly,autoFocus:this.autoFocus,value:this.value,maxLength:this.maxLength,onInput:a=>this.handleInput(a),class:{error:!!this.error},part:"tc__textarea"}),this.error&&e.h("span",{class:"error help-text"},this.error))}};r.style=l;exports.textarea_component=r;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { r as e, h as t } from "./index-594c8e7b.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react-dom";
|
|
4
|
-
const c = ".sc-trash-fill-icon-h{display:flex}", o = c, d = class {
|
|
5
|
-
constructor(s) {
|
|
6
|
-
e(this, s), this.width = "15", this.height = "15";
|
|
7
|
-
}
|
|
8
|
-
render() {
|
|
9
|
-
return t("svg", { key: "0915e20980a0cd15706dad23e7c3b8f51dfc121f", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "4463838bc52c3c2d6bbecbe34f3c9f2df36dcc88", d: "M3 6H5H21", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "0d2dd476dca360cd158875f1c3fd01003fab037a", d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "2788d2221bc853883be245634befaa552da5b167", d: "M10 11V17", stroke: "auto", "stroke-width": "1.5" }), t("path", { key: "9c35b81238b0c60b83f455618a4bc2d1ef034ff7", d: "M14 11V17", stroke: "auto", "stroke-width": "1.5" }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
d.style = o;
|
|
13
|
-
export {
|
|
14
|
-
d as trash_fill_icon
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-cfb93df6.cjs");require("react");require("react-dom");const c=".sc-trash-fill-icon-h{display:flex}",h=c,e=class{constructor(s){t.registerInstance(this,s),this.width="15",this.height="15"}render(){return t.h("svg",{key:"0915e20980a0cd15706dad23e7c3b8f51dfc121f",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},t.h("path",{key:"4463838bc52c3c2d6bbecbe34f3c9f2df36dcc88",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"0d2dd476dca360cd158875f1c3fd01003fab037a",d:"M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"2788d2221bc853883be245634befaa552da5b167",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),t.h("path",{key:"9c35b81238b0c60b83f455618a4bc2d1ef034ff7",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};e.style=h;exports.trash_fill_icon=e;
|