@nylas/react 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{abstract-provider-97cdbfea-5837e17f.cjs → abstract-provider-45ada3b4-31e3ed72.cjs} +1 -1
- package/dist/{abstract-provider-97cdbfea-6b0e3547.js → abstract-provider-45ada3b4-abd3105d.js} +1 -1
- package/dist/{add-circle-icon_2.entry-96ef4ded.cjs → add-circle-icon_2.entry-48953f9c.cjs} +1 -1
- package/dist/{add-circle-icon_2.entry-e59a5b4d.js → add-circle-icon_2.entry-f6f8b5e5.js} +1 -1
- package/dist/{archive-icon.entry-ea5667df.js → archive-icon.entry-b3a76711.js} +1 -1
- package/dist/{archive-icon.entry-49b4e0fd.cjs → archive-icon.entry-e2880dc7.cjs} +1 -1
- package/dist/{arrow-icon.entry-5aefd7de.cjs → arrow-icon.entry-84d1e26c.cjs} +1 -1
- package/dist/{arrow-icon.entry-1f766862.js → arrow-icon.entry-9b3441aa.js} +1 -1
- package/dist/{bold-icon.entry-240950a6.js → bold-icon.entry-0749a116.js} +1 -1
- package/dist/{bold-icon.entry-1a4955df.cjs → bold-icon.entry-e1d8ab5e.cjs} +1 -1
- package/dist/{button-component_2.entry-357fa02a.cjs → button-component_2.entry-1a817230.cjs} +1 -1
- package/dist/{button-component_2.entry-96785a34.js → button-component_2.entry-6eb55e97.js} +1 -1
- package/dist/calendar-agenda-fill-icon_37.entry-0ca8b9f4.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_37.entry-e732ee2e.js → calendar-agenda-fill-icon_37.entry-4adf73a2.js} +1434 -1169
- package/dist/{calendar-cancel-icon.entry-7543c684.js → calendar-cancel-icon.entry-2a29cb3f.js} +1 -1
- package/dist/{calendar-cancel-icon.entry-55d746cf.cjs → calendar-cancel-icon.entry-e0dee585.cjs} +1 -1
- package/dist/{calendar-check-icon.entry-63d33f23.cjs → calendar-check-icon.entry-7f96d456.cjs} +1 -1
- package/dist/{calendar-check-icon.entry-aba54652.js → calendar-check-icon.entry-c12b63ea.js} +1 -1
- package/dist/{calendar-icon.entry-e13add9b.cjs → calendar-icon.entry-a2d19ff2.cjs} +1 -1
- package/dist/{calendar-icon.entry-2cb3b7d1.js → calendar-icon.entry-e82a5169.js} +1 -1
- package/dist/checkbox-component.entry-59612a67.js +52 -0
- package/dist/checkbox-component.entry-ddce70bc.cjs +1 -0
- package/dist/checkbox-group_4.entry-3311da64.cjs +28 -0
- package/dist/{checkbox-group_4.entry-04561314.js → checkbox-group_4.entry-7df47ad4.js} +286 -245
- package/dist/{checkmark-circle-icon.entry-1f788efc.js → checkmark-circle-icon.entry-677b0def.js} +1 -1
- package/dist/{checkmark-circle-icon.entry-e637e20e.cjs → checkmark-circle-icon.entry-67df713b.cjs} +1 -1
- package/dist/checkmark-icon_15.entry-2121e1b7.cjs +5 -0
- package/dist/{checkmark-icon_15.entry-146c1cb0.js → checkmark-icon_15.entry-9fd0ec58.js} +403 -330
- package/dist/chevron-icon_3.entry-1a42235c.cjs +1 -0
- package/dist/{chevron-icon_3.entry-637338b5.js → chevron-icon_3.entry-f0ad71d9.js} +19 -10
- package/dist/{clock-icon_4.entry-aa4117dc.cjs → clock-icon_4.entry-88822a84.cjs} +1 -1
- package/dist/{clock-icon_4.entry-e69395a2.js → clock-icon_4.entry-e7472d5f.js} +1 -1
- package/dist/{customParseFormat-8be9be1b-2464f2ba.js → customParseFormat-eeec04f5-3ad26beb.js} +1 -1
- package/dist/{customParseFormat-8be9be1b-7ad95d87.cjs → customParseFormat-eeec04f5-d5957784.cjs} +1 -1
- package/dist/{delete-icon.entry-af0cc45b.cjs → delete-icon.entry-3cb58910.cjs} +1 -1
- package/dist/{delete-icon.entry-8a956edd.js → delete-icon.entry-813429d7.js} +1 -1
- package/dist/{document-refresh-icon.entry-45931416.cjs → document-refresh-icon.entry-ae361b0b.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-5f58f367.js → document-refresh-icon.entry-c224c778.js} +1 -1
- package/dist/{feedbackSync-3db3713c-aadf336b.js → feedbackSync-0ebd0eda-803c3ebe.js} +1 -1
- package/dist/{feedbackSync-3db3713c-701d2eb9.cjs → feedbackSync-0ebd0eda-e12b00d5.cjs} +1 -1
- package/dist/{folder-icon.entry-cb80c172.cjs → folder-icon.entry-107841af.cjs} +1 -1
- package/dist/{folder-icon.entry-e5d7a651.js → folder-icon.entry-9c1f7c41.js} +1 -1
- package/dist/{forward-icon.entry-59be8165.js → forward-icon.entry-4ac22c16.js} +1 -1
- package/dist/{forward-icon.entry-c792734b.cjs → forward-icon.entry-6cec1f94.cjs} +1 -1
- package/dist/{globe-icon.entry-0fe4a4bb.js → globe-icon.entry-7798c93b.js} +1 -1
- package/dist/{globe-icon.entry-9ecf0255.cjs → globe-icon.entry-909c1382.cjs} +1 -1
- package/dist/google-logo-icon_6.entry-1f4ad364.cjs +2 -0
- package/dist/{google-logo-icon_6.entry-799511df.js → google-logo-icon_6.entry-b198c90a.js} +132 -89
- package/dist/{google-meet-icon_5.entry-3841313d.cjs → google-meet-icon_5.entry-82d87e77.cjs} +1 -1
- package/dist/{google-meet-icon_5.entry-e753ba28.js → google-meet-icon_5.entry-fa6dc1dc.js} +1 -1
- package/dist/{inbox-icon.entry-61132337.js → inbox-icon.entry-1b123e64.js} +1 -1
- package/dist/{inbox-icon.entry-2b450378.cjs → inbox-icon.entry-84f96d31.cjs} +1 -1
- package/dist/{index-2084ffd9.js → index-140eb219.js} +6439 -6370
- package/dist/index-d8a42c15.cjs +118 -0
- package/dist/{index.es-9e756df7-42d8a4cf.js → index.es-57d4a08f-184cbc01.js} +1 -1
- package/dist/{index.es-9e756df7-fa75b01e.cjs → index.es-57d4a08f-b0a2ca19.cjs} +1 -1
- package/dist/{info-icon_2.entry-c547775c.cjs → info-icon_2.entry-f09e7dae.cjs} +1 -1
- package/dist/{info-icon_2.entry-8d2750ce.js → info-icon_2.entry-f8b72d08.js} +1 -1
- package/dist/{input-component.entry-2e134e2a.js → input-component.entry-44607977.js} +26 -17
- package/dist/{input-component.entry-b1086460.cjs → input-component.entry-fd38953d.cjs} +1 -1
- package/dist/input-dropdown_2.entry-4c2e5e1a.cjs +1 -0
- package/dist/{input-dropdown_2.entry-1a02e672.js → input-dropdown_2.entry-6898b420.js} +30 -9
- package/dist/{italic-icon.entry-0ec2793b.js → italic-icon.entry-16aa1ada.js} +1 -1
- package/dist/{italic-icon.entry-6a3a5464.cjs → italic-icon.entry-beef2254.cjs} +1 -1
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +3 -2
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +2 -0
- package/dist/{multi-select-dropdown.entry-15e887be.js → multi-select-dropdown.entry-50133d29.js} +39 -30
- package/dist/multi-select-dropdown.entry-c82cd6d4.cjs +1 -0
- package/dist/{nylas-booked-event-card_11.entry-98bcc904.js → nylas-booked-event-card_11.entry-56768a09.js} +60 -60
- package/dist/nylas-booked-event-card_11.entry-eb4b3c5c.cjs +1 -0
- package/dist/nylas-date-component_2.entry-93f2f352.cjs +1 -0
- package/dist/{nylas-date-component_2.entry-6a98a5bf.js → nylas-date-component_2.entry-df957150.js} +85 -67
- package/dist/nylas-form-card.entry-4d95a4ad.cjs +1 -0
- package/dist/nylas-form-card.entry-7724e61f.js +72 -0
- package/dist/{nylas-notification_2.entry-4638126b.cjs → nylas-notification_2.entry-448c2cb8.cjs} +1 -1
- package/dist/{nylas-notification_2.entry-320a5a65.js → nylas-notification_2.entry-af763b6c.js} +1 -1
- package/dist/{nylas-scheduler-editor.entry-aa62c689.js → nylas-scheduler-editor.entry-0e4ba46d.js} +45 -34
- package/dist/{nylas-scheduler-editor.entry-82e0f79e.cjs → nylas-scheduler-editor.entry-e36cdd9d.cjs} +2 -2
- package/dist/{nylas-scheduling.entry-aec79de5.js → nylas-scheduling.entry-1b207e91.js} +194 -184
- package/dist/nylas-scheduling.entry-904dd10e.cjs +1 -0
- package/dist/{person-icon.entry-01a6a976.cjs → person-icon.entry-70d46ca6.cjs} +1 -1
- package/dist/{person-icon.entry-23cbe5dd.js → person-icon.entry-f2979577.js} +1 -1
- package/dist/{play-icon.entry-33443687.cjs → play-icon.entry-c2cf0b12.cjs} +1 -1
- package/dist/{play-icon.entry-4a529bd2.js → play-icon.entry-d387df5d.js} +1 -1
- package/dist/{radio-button-group.entry-04b7ff59.js → radio-button-group.entry-45dbd2df.js} +19 -10
- package/dist/{radio-button-group.entry-65155787.cjs → radio-button-group.entry-94e06176.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +1 -1
- package/dist/{refresh-icon.entry-e4ea4811.cjs → refresh-icon.entry-5ab20f26.cjs} +1 -1
- package/dist/{refresh-icon.entry-61ced881.js → refresh-icon.entry-777cff27.js} +1 -1
- package/dist/{register-component-8bbd6492-0d8737fd.js → register-component-0aad9e3d-b395364a.js} +1 -1
- package/dist/{register-component-8bbd6492-d9a23f3c.cjs → register-component-0aad9e3d-d2f2e543.cjs} +1 -1
- package/dist/{reply-all-icon.entry-c64d923b.cjs → reply-all-icon.entry-3c90510e.cjs} +1 -1
- package/dist/{reply-all-icon.entry-83509aaf.js → reply-all-icon.entry-e2dd6da9.js} +1 -1
- package/dist/{reply-icon.entry-131ade31.js → reply-icon.entry-00a97d9f.js} +1 -1
- package/dist/{reply-icon.entry-4edfbb70.cjs → reply-icon.entry-d96478be.cjs} +1 -1
- package/dist/{sent-icon.entry-e4f6a3ef.cjs → sent-icon.entry-2d16da4e.cjs} +1 -1
- package/dist/{sent-icon.entry-72fd8f16.js → sent-icon.entry-949cf214.js} +1 -1
- package/dist/{spam-icon.entry-7594c792.js → spam-icon.entry-3baf9e79.js} +1 -1
- package/dist/{spam-icon.entry-c531c188.cjs → spam-icon.entry-7ee61730.cjs} +1 -1
- package/dist/{star-icon.entry-adbe1bb3.js → star-icon.entry-9fdb278b.js} +1 -1
- package/dist/{star-icon.entry-a75255ff.cjs → star-icon.entry-dc702d73.cjs} +1 -1
- package/dist/{stop-icon.entry-079b28c6.cjs → stop-icon.entry-b5ae7e55.cjs} +1 -1
- package/dist/{stop-icon.entry-e95993f2.js → stop-icon.entry-efa1ea66.js} +1 -1
- package/dist/{textarea-component.entry-920a81ac.cjs → textarea-component.entry-247aca42.cjs} +1 -1
- package/dist/{textarea-component.entry-f5d74fb8.js → textarea-component.entry-7c6fc4d8.js} +26 -10
- package/dist/toggle-switch.entry-a0295d17.js +49 -0
- package/dist/toggle-switch.entry-d52b0338.cjs +1 -0
- package/dist/{translate-icon.entry-01cbe664.js → translate-icon.entry-219cab17.js} +1 -1
- package/dist/{translate-icon.entry-f33632d6.cjs → translate-icon.entry-985b3b29.cjs} +1 -1
- package/dist/{trash-fill-icon.entry-b39ff771.js → trash-fill-icon.entry-03c90559.js} +1 -1
- package/dist/{trash-fill-icon.entry-298eece8.cjs → trash-fill-icon.entry-4dfd7d24.cjs} +1 -1
- package/dist/{underline-icon.entry-39179a2e.js → underline-icon.entry-58fa18b5.js} +1 -1
- package/dist/{underline-icon.entry-3704187c.cjs → underline-icon.entry-c60b77a6.cjs} +1 -1
- package/package.json +3 -3
- package/dist/calendar-agenda-fill-icon_37.entry-5e405c00.cjs +0 -6
- package/dist/checkbox-component.entry-8341a8d6.cjs +0 -1
- package/dist/checkbox-component.entry-da122544.js +0 -43
- package/dist/checkbox-group_4.entry-8854d522.cjs +0 -28
- package/dist/checkmark-icon_15.entry-a265f687.cjs +0 -5
- package/dist/chevron-icon_3.entry-6c38b5e5.cjs +0 -1
- package/dist/google-logo-icon_6.entry-60924f34.cjs +0 -2
- package/dist/index-e9dc7971.cjs +0 -118
- package/dist/input-dropdown_2.entry-cb163dc3.cjs +0 -1
- package/dist/multi-select-dropdown.entry-daccefd5.cjs +0 -1
- package/dist/nylas-booked-event-card_11.entry-3cdf8015.cjs +0 -1
- package/dist/nylas-date-component_2.entry-5d4f54fa.cjs +0 -1
- package/dist/nylas-form-card.entry-22851b77.cjs +0 -1
- package/dist/nylas-form-card.entry-a997084f.js +0 -58
- package/dist/nylas-scheduling.entry-9cef581a.cjs +0 -1
- package/dist/toggle-switch.entry-33273409.js +0 -34
- package/dist/toggle-switch.entry-ba6b4f33.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-e9dc7971.cjs");require("react");require("react/jsx-runtime");require("react-dom");const a=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:100%}.checkbox-container{display:flex;flex-direction:column;gap:0.5rem}.checkbox-container p.error{color:var(--nylas-error);font-size:14px;font-weight:400;line-height:20px;font-family:var(--nylas-font-family);margin:0}label{display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label.readonly{cursor:not-allowed}label span.required{color:var(--nylas-error);padding:0 0.25rem}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer;border:1px solid var(--nylas-base-300)}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:1px solid var(--nylas-primary)}label input[type=checkbox]:disabled{cursor:not-allowed;background:var(--nylas-base-100);border:1px solid var(--nylas-base-300)}label .checkmark{border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-base-300);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}',o=a,r=class{constructor(l){e.registerInstance(this,l),this.nylasFormCheckboxToggled=e.createEvent(this,"nylasFormCheckboxToggled",7),this.componentType="checkbox",this.name="checkbox",this.checked=void 0,this.label="",this.readOnly=!1,this.required=!1,this.isChecked=void 0,this.error=""}checkedPropChangedHandler(l){typeof l=="boolean"&&(this.isChecked=l)}componentWillLoad(){this.el.setAttribute("component-type",this.componentType)}componentDidLoad(){this.isChecked=this.checked||!1}handleBookingFormSubmitted(l){this.required&&!this.isChecked&&(this.error=`${this.label} is required.`),this.error&&l.preventDefault()}toggleCheck(){this.error="",this.isChecked=!this.isChecked,this.nylasFormCheckboxToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return e.h("div",{key:"238fd5ba78b8e1fecd770c1c546b1dd331c8e9cd",class:"checkbox-container"},e.h("label",{key:"55d41ec03a225841bea3efb427ba08acdad84d66",title:this.readOnly?"read-only field":void 0,class:{readonly:this.readOnly}},e.h("input",{key:"52658e7a95738612621527230ef2468edb317574",type:"checkbox",disabled:this.readOnly,readOnly:this.readOnly,name:this.name,title:this.readOnly?"read-only field":void 0,checked:this.isChecked,onChange:()=>this.toggleCheck()}),e.h("span",{key:"846d3c0112fba61630034f4b0863e9dbf9f9f71f",class:"checkmark"}),e.h("slot",{key:"54a380b1b4fa89b9ee63e561166c6929ddc94e98",name:"label"},e.h("span",{key:"b1a2ce0828e2aa069a99d1da62351c94ec62a638",class:"label",part:"checkbox-label-span"},this.label,this.required&&e.h("span",{class:"required"},"*")))),this.error&&e.h("p",{class:"error"},this.error))}get el(){return e.getElement(this)}static get watchers(){return{checked:["checkedPropChangedHandler"]}}};r.style=o;exports.checkbox_component=r;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { r as a, a as r, h as e, g as o } from "./index-2084ffd9.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
const s = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;width:100%}.checkbox-container{display:flex;flex-direction:column;gap:0.5rem}.checkbox-container p.error{color:var(--nylas-error);font-size:14px;font-weight:400;line-height:20px;font-family:var(--nylas-font-family);margin:0}label{display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label.readonly{cursor:not-allowed}label span.required{color:var(--nylas-error);padding:0 0.25rem}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer;border:1px solid var(--nylas-base-300)}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:1px solid var(--nylas-primary)}label input[type=checkbox]:disabled{cursor:not-allowed;background:var(--nylas-base-100);border:1px solid var(--nylas-base-300)}label .checkmark{border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-base-300);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}', n = s, c = class {
|
|
6
|
-
constructor(l) {
|
|
7
|
-
a(this, l), this.nylasFormCheckboxToggled = r(this, "nylasFormCheckboxToggled", 7), this.componentType = "checkbox", this.name = "checkbox", this.checked = void 0, this.label = "", this.readOnly = !1, this.required = !1, this.isChecked = void 0, this.error = "";
|
|
8
|
-
}
|
|
9
|
-
checkedPropChangedHandler(l) {
|
|
10
|
-
typeof l == "boolean" && (this.isChecked = l);
|
|
11
|
-
}
|
|
12
|
-
componentWillLoad() {
|
|
13
|
-
this.el.setAttribute("component-type", this.componentType);
|
|
14
|
-
}
|
|
15
|
-
componentDidLoad() {
|
|
16
|
-
this.isChecked = this.checked || !1;
|
|
17
|
-
}
|
|
18
|
-
handleBookingFormSubmitted(l) {
|
|
19
|
-
this.required && !this.isChecked && (this.error = `${this.label} is required.`), this.error && l.preventDefault();
|
|
20
|
-
}
|
|
21
|
-
toggleCheck() {
|
|
22
|
-
this.error = "", this.isChecked = !this.isChecked, this.nylasFormCheckboxToggled.emit({
|
|
23
|
-
checked: this.isChecked,
|
|
24
|
-
name: this.name,
|
|
25
|
-
label: this.label
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
return e("div", { key: "238fd5ba78b8e1fecd770c1c546b1dd331c8e9cd", class: "checkbox-container" }, e("label", { key: "55d41ec03a225841bea3efb427ba08acdad84d66", title: this.readOnly ? "read-only field" : void 0, class: { readonly: this.readOnly } }, e("input", { key: "52658e7a95738612621527230ef2468edb317574", type: "checkbox", disabled: this.readOnly, readOnly: this.readOnly, name: this.name, title: this.readOnly ? "read-only field" : void 0, checked: this.isChecked, onChange: () => this.toggleCheck() }), e("span", { key: "846d3c0112fba61630034f4b0863e9dbf9f9f71f", class: "checkmark" }), e("slot", { key: "54a380b1b4fa89b9ee63e561166c6929ddc94e98", name: "label" }, e("span", { key: "b1a2ce0828e2aa069a99d1da62351c94ec62a638", class: "label", part: "checkbox-label-span" }, this.label, this.required && e("span", { class: "required" }, "*")))), this.error && e("p", { class: "error" }, this.error));
|
|
30
|
-
}
|
|
31
|
-
get el() {
|
|
32
|
-
return o(this);
|
|
33
|
-
}
|
|
34
|
-
static get watchers() {
|
|
35
|
-
return {
|
|
36
|
-
checked: ["checkedPropChangedHandler"]
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
c.style = n;
|
|
41
|
-
export {
|
|
42
|
-
c as checkbox_component
|
|
43
|
-
};
|