@c2n/checkbox 0.0.4 → 0.0.7

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Nguyen Thai Vinh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/checkbox.js CHANGED
@@ -1,90 +1,172 @@
1
- import { unsafeCSS as k, LitElement as l, html as s } from "lit";
2
- import { query as x, property as r, customElement as p } from "lit/decorators.js";
3
- import { ifDefined as a } from "lit/directives/if-defined.js";
4
- const u = `:host{display:inline-flex}.c2-checkbox{display:inline-flex;position:relative;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;z-index:0;align-items:center;justify-content:center;flex-direction:column;width:var(--c2-checkbox-touch-target-size, 48px);height:var(--c2-checkbox-touch-target-size, 48px)}.c2-checkbox-input{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--c2-checkbox-touch-target-size, 48px);height:var(--c2-checkbox-touch-target-size, 48px)}.c2-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;border-style:solid;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:transition-exit(background-color),transition-exit(border-color);width:var(--c2-checkbox-container-width, 18px);height:var(--c2-checkbox-container-height, 18px);border-radius:var(--c2-checkbox-container-border-radius, 5px)}::slotted(svg[slot=checkmark]),.c2-checkbox__checkmark{position:absolute;width:var(--c2-checkbox-checkmark-size, 14px);height:var(--c2-checkbox-checkmark-size, 14px);transition:transition-exit(opacity,0ms,.18s);opacity:0}::slotted(svg[slot=mixedmark]),.c2-checkbox__mixedmark{position:absolute;width:var(--c2-checkbox-mixedmark-size, 14px);height:var(--c2-checkbox-mixedmark-size, 14px);transform:scaleX(0) rotate(0);opacity:0;transition:transition-exit(opacity),transition-exit(transform)}.c2-checkbox-state-layer{position:absolute;width:var(--c2-checkbox-state-layer-size, 40px);height:var(--c2-checkbox-state-layer-size, 40px);border-radius:var(--c2-checkbox-state-layer-border-radius, 9999px);background-color:transparent;opacity:0;pointer-events:none;will-change:background-color,opacity}.c2-checkbox-input:not(:checked):not(:indeterminate):enabled~.c2-checkbox__background{border-width:var(--c2-checkbox-container-border-width, 1.5px);border-color:var(--c2-checkbox-container-border-color, #bcbcc6)}.c2-checkbox-input:indeterminate:enabled~.c2-checkbox__background{border-width:0;background-color:var(--c2-checkbox-container-enabled-selected-color, #476ef9)}.c2-checkbox-input:indeterminate:enabled~.c2-checkbox__background ::slotted(svg[slot=checkmark]),.c2-checkbox-input:indeterminate:enabled~.c2-checkbox__background .c2-checkbox__checkmark{opacity:0}.c2-checkbox-input:indeterminate:enabled~.c2-checkbox__background ::slotted(svg[slot=mixedmark]),.c2-checkbox-input:indeterminate:enabled~.c2-checkbox__background .c2-checkbox__mixedmark{opacity:1;transform:scaleX(1) rotate(0);color:var(--c2-checkbox-mixedmark-color, #fff)}.c2-checkbox-input:checked:enabled~.c2-checkbox__background{border-width:0;background-color:var(--c2-checkbox-container-enabled-selected-color, #476ef9)}.c2-checkbox-input:checked:enabled~.c2-checkbox__background ::slotted(svg[slot=checkmark]),.c2-checkbox-input:checked:enabled~.c2-checkbox__background .c2-checkbox__checkmark{opacity:1;color:var(--c2-checkbox-checkmark-color, #fff)}.c2-checkbox-input:not(:checked):not(:indeterminate):disabled~.c2-checkbox__background{border-width:var(--c2-checkbox-container-border-width, 1.5px);border-color:var(--c2-checkbox-container-border-color, #bcbcc6);opacity:var(--c2-checkbox-disabled-opacity, .38)}.c2-checkbox-input:indeterminate:disabled~.c2-checkbox__background{border-width:0;background-color:var(--c2-checkbox-container-enabled-selected-color, #476ef9);opacity:var(--c2-checkbox-disabled-opacity, .38)}.c2-checkbox-input:indeterminate:disabled~.c2-checkbox__background ::slotted(svg[slot=checkmark]),.c2-checkbox-input:indeterminate:disabled~.c2-checkbox__background .c2-checkbox__checkmark{opacity:0}.c2-checkbox-input:indeterminate:disabled~.c2-checkbox__background ::slotted(svg[slot=mixedmark]),.c2-checkbox-input:indeterminate:disabled~.c2-checkbox__background .c2-checkbox__mixedmark{opacity:1;transform:scaleX(1) rotate(0);color:var(--c2-checkbox-mixedmark-color, #fff)}.c2-checkbox-input:checked:disabled~.c2-checkbox__background{border-width:0;background-color:var(--c2-checkbox-container-enabled-selected-color, #476ef9);opacity:var(--c2-checkbox-disabled-opacity, .38)}.c2-checkbox-input:checked:disabled~.c2-checkbox__background ::slotted(svg[slot=checkmark]),.c2-checkbox-input:checked:disabled~.c2-checkbox__background .c2-checkbox__checkmark{opacity:1;color:var(--c2-checkbox-checkmark-color, #fff)}.c2-checkbox-input:not(:checked):not(:indeterminate):enabled:hover~.c2-checkbox-state-layer{background-color:var(--c2-checkbox-state-layer-hover-unselected-color, #bcbcc6);opacity:var(--c2-checkbox-state-layer-hover-opacity, .08)}.c2-checkbox-input:indeterminate:enabled:hover~.c2-checkbox-state-layer{background-color:var(--c2-checkbox-state-layer-hover-indeterminate-color, #476ef9);opacity:var(--c2-checkbox-state-layer-hover-opacity, .08)}.c2-checkbox-input:checked:enabled:hover~.c2-checkbox-state-layer{background-color:var(--c2-checkbox-state-layer-hover-indeterminate-color, #476ef9);opacity:var(--c2-checkbox-state-layer-hover-opacity, .08)}.c2-checkbox-input:not(:checked):not(:indeterminate):enabled:focus~.c2-checkbox-state-layer{background-color:var(--c2-checkbox-state-layer-hover-unselected-color, #bcbcc6);opacity:var(--c2-checkbox-state-layer-hover-opacity, .08)}.c2-checkbox-input:indeterminate:enabled:focus~.c2-checkbox-state-layer{background-color:var(--c2-checkbox-state-layer-hover-indeterminate-color, #476ef9);opacity:var(--c2-checkbox-state-layer-hover-opacity, .08)}.c2-checkbox-input:checked:enabled:focus~.c2-checkbox-state-layer{background-color:var(--c2-checkbox-state-layer-hover-indeterminate-color, #476ef9);opacity:var(--c2-checkbox-state-layer-hover-opacity, .08)}.c2-checkbox__background--marked{transition:background-color 90ms cubic-bezier(0,0,.2,1),border-color 90ms cubic-bezier(0,0,.2,1)}
5
- `;
6
- var m = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (o, i, b, n) => {
7
- for (var t = n > 1 ? void 0 : n ? v(i, b) : i, d = o.length - 1, h; d >= 0; d--)
8
- (h = o[d]) && (t = (n ? h(i, b, t) : h(t)) || t);
9
- return n && t && m(i, b, t), t;
10
- };
11
- let e = class extends l {
12
- constructor() {
13
- super(...arguments), this.checked = !1, this.indeterminate = !1, this.disabled = !1, this.name = "";
14
- }
15
- render() {
16
- const o = this.indeterminate ? "mixed" : void 0;
17
- return s`
1
+ import { LitElement, html, unsafeCSS } from "lit";
2
+ import { property, query, state } from "lit/decorators.js";
3
+ import { customElement } from "@c2n/core/element-helper.js";
4
+ import { ifDefined } from "lit/directives/if-defined.js";
5
+ import { redispatchEvent } from "@c2n/core/dom-helper.js";
6
+ //#region src/checkbox.scss?inline
7
+ var checkbox_default = "/* ex : var((width: 24px), width, c2-checkbox) returns var(--c2-checkbox-width, 24px) */\n:host {\n display: inline-flex;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.c2-checkbox {\n display: inline-flex;\n position: relative;\n line-height: 0;\n white-space: nowrap;\n cursor: pointer;\n vertical-align: bottom;\n z-index: 0;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n width: var(--c2-checkbox__state-layer--size,32px);\n height: var(--c2-checkbox__state-layer--size,32px);\n}\n\n.c2-checkbox-input {\n position: absolute;\n inset: 0;\n margin: 0;\n padding: 0;\n opacity: 0;\n cursor: inherit;\n width: 100%;\n height: 100%;\n}\n\n.c2-checkbox__background {\n display: inline-flex;\n position: absolute;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n border-style: solid;\n background-color: var(--c2-checkbox__container--background-color,transparent);\n pointer-events: none;\n will-change: background-color, border-color;\n transition: background-color 250ms cubic-bezier(0.2, 0, 0, 1), border-color 250ms cubic-bezier(0.2, 0, 0, 1);\n width: var(--c2-checkbox__container--width,18px);\n height: var(--c2-checkbox__container--height,18px);\n border-top-left-radius: var(--c2-checkbox__container--border-top-left-radius,4px);\n border-top-right-radius: var(--c2-checkbox__container--border-top-right-radius,4px);\n border-bottom-left-radius: var(--c2-checkbox__container--border-bottom-left-radius,4px);\n border-bottom-right-radius: var(--c2-checkbox__container--border-bottom-right-radius,4px);\n}\n\n.c2-checkbox__mark {\n position: absolute;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n opacity: 0;\n transition: opacity 200ms cubic-bezier(0, 0, 0, 1);\n pointer-events: none;\n}\n.c2-checkbox__mark svg,\n.c2-checkbox__mark ::slotted(*) {\n width: 100%;\n height: 100%;\n}\n\n.c2-checkbox__mark--check {\n width: var(--c2-checkbox__checkmark--size,12px);\n height: var(--c2-checkbox__checkmark--size,12px);\n color: var(--c2-checkbox__checkmark--color,#ffffff);\n --c2-feather-icon--size: var(--c2-checkbox__checkmark--size,12px);\n --c2-mat-icon--font-size: var(--c2-checkbox__checkmark--size,12px);\n}\n\n.c2-checkbox__mark--mixed {\n width: var(--c2-checkbox__mixedmark--size,12px);\n height: var(--c2-checkbox__mixedmark--size,12px);\n color: var(--c2-checkbox__mixedmark--color,#ffffff);\n transform: scaleX(0) rotate(0deg);\n transition: opacity 200ms cubic-bezier(0, 0, 0, 1), transform 200ms cubic-bezier(0, 0, 0, 1);\n --c2-feather-icon--size: var(--c2-checkbox__mixedmark--size,12px);\n --c2-mat-icon--font-size: var(--c2-checkbox__mixedmark--size,12px);\n}\n\n.c2-checkbox__mark--uncheck {\n width: var(--c2-checkbox__uncheckmark--size,12px);\n height: var(--c2-checkbox__uncheckmark--size,12px);\n color: var(--c2-checkbox__uncheckmark--color,#ffffff);\n --c2-feather-icon--size: var(--c2-checkbox__uncheckmark--size,12px);\n --c2-mat-icon--font-size: var(--c2-checkbox__uncheckmark--size,12px);\n}\n\n.c2-checkbox-state-layer {\n position: absolute;\n inset: 0;\n z-index: -1;\n border-top-left-radius: var(--c2-checkbox__state-layer--border-top-left-radius,6px);\n border-top-right-radius: var(--c2-checkbox__state-layer--border-top-right-radius,6px);\n border-bottom-left-radius: var(--c2-checkbox__state-layer--border-bottom-left-radius,6px);\n border-bottom-right-radius: var(--c2-checkbox__state-layer--border-bottom-right-radius,6px);\n background-color: transparent;\n opacity: 0;\n pointer-events: none;\n will-change: background-color, opacity;\n transition: background-color 250ms cubic-bezier(0.2, 0, 0, 1), opacity 250ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.c2-checkbox-input:not(:checked):not(:indeterminate):enabled ~ .c2-checkbox__background {\n border-top: var(--c2-checkbox__container--border-top,1px solid #bcbcc6);\n border-right: var(--c2-checkbox__container--border-right,1px solid #bcbcc6);\n border-bottom: var(--c2-checkbox__container--border-bottom,1px solid #bcbcc6);\n border-left: var(--c2-checkbox__container--border-left,1px solid #bcbcc6);\n}\n.c2-checkbox-input:not(:checked):not(:indeterminate):enabled ~ .c2-checkbox__background .c2-checkbox__mark--uncheck {\n opacity: 1;\n}\n\n.c2-checkbox-input:indeterminate:enabled ~ .c2-checkbox__background {\n border-top: var(--c2-checkbox__container__selected--border-top,0px solid transparent);\n border-right: var(--c2-checkbox__container__selected--border-right,0px solid transparent);\n border-bottom: var(--c2-checkbox__container__selected--border-bottom,0px solid transparent);\n border-left: var(--c2-checkbox__container__selected--border-left,0px solid transparent);\n background-color: var(--c2-checkbox__container__selected--background-color,#476ef9);\n}\n.c2-checkbox-input:indeterminate:enabled ~ .c2-checkbox__background .c2-checkbox__mark--mixed {\n opacity: 1;\n transform: scaleX(1) rotate(0deg);\n}\n\n.c2-checkbox-input:checked:enabled ~ .c2-checkbox__background {\n border-top: var(--c2-checkbox__container__selected--border-top,0px solid transparent);\n border-right: var(--c2-checkbox__container__selected--border-right,0px solid transparent);\n border-bottom: var(--c2-checkbox__container__selected--border-bottom,0px solid transparent);\n border-left: var(--c2-checkbox__container__selected--border-left,0px solid transparent);\n background-color: var(--c2-checkbox__container__selected--background-color,#476ef9);\n}\n.c2-checkbox-input:checked:enabled ~ .c2-checkbox__background .c2-checkbox__mark--check {\n opacity: 1;\n}\n\n.c2-checkbox-input:not(:checked):not(:indeterminate):disabled ~ .c2-checkbox__background {\n border-top: var(--c2-checkbox__container--border-top,1px solid #bcbcc6);\n border-right: var(--c2-checkbox__container--border-right,1px solid #bcbcc6);\n border-left: var(--c2-checkbox__container--border-left,1px solid #bcbcc6);\n border-bottom: var(--c2-checkbox__container--border-bottom,1px solid #bcbcc6);\n opacity: var(--c2-checkbox__container__disabled--opacity,0.38);\n}\n.c2-checkbox-input:not(:checked):not(:indeterminate):disabled ~ .c2-checkbox__background .c2-checkbox__mark--uncheck {\n opacity: 1;\n}\n\n.c2-checkbox-input:indeterminate:disabled ~ .c2-checkbox__background {\n border-top: var(--c2-checkbox__container__selected--border-top,0px solid transparent);\n border-right: var(--c2-checkbox__container__selected--border-right,0px solid transparent);\n border-bottom: var(--c2-checkbox__container__selected--border-bottom,0px solid transparent);\n border-left: var(--c2-checkbox__container__selected--border-left,0px solid transparent);\n background-color: var(--c2-checkbox__container__selected--background-color,#476ef9);\n opacity: var(--c2-checkbox__container__disabled--opacity,0.38);\n}\n.c2-checkbox-input:indeterminate:disabled ~ .c2-checkbox__background .c2-checkbox__mark--mixed {\n opacity: 1;\n transform: scaleX(1) rotate(0deg);\n}\n\n.c2-checkbox-input:checked:disabled ~ .c2-checkbox__background {\n border-top: var(--c2-checkbox__container__selected--border-top,0px solid transparent);\n border-right: var(--c2-checkbox__container__selected--border-right,0px solid transparent);\n border-bottom: var(--c2-checkbox__container__selected--border-bottom,0px solid transparent);\n border-left: var(--c2-checkbox__container__selected--border-left,0px solid transparent);\n background-color: var(--c2-checkbox__container__selected--background-color,#476ef9);\n opacity: var(--c2-checkbox__container__disabled--opacity,0.38);\n}\n.c2-checkbox-input:checked:disabled ~ .c2-checkbox__background .c2-checkbox__mark--check {\n opacity: 1;\n}\n\n.c2-checkbox-input:disabled {\n cursor: default;\n}\n\n.c2-checkbox-input:not(:checked):not(:indeterminate):enabled:hover ~ .c2-checkbox-state-layer {\n background-color: var(--c2-checkbox__state-layer__hover__unselected--color);\n opacity: 0.08;\n}\n\n.c2-checkbox-input:indeterminate:enabled:hover ~ .c2-checkbox__background,\n.c2-checkbox-input:checked:enabled:hover ~ .c2-checkbox__background {\n background-color: var(--c2-checkbox__container__selected__hover--background-color,var(--c2-checkbox__container__selected--background-color,#476ef9));\n}\n.c2-checkbox-input:indeterminate:enabled:hover ~ .c2-checkbox-state-layer,\n.c2-checkbox-input:checked:enabled:hover ~ .c2-checkbox-state-layer {\n background-color: var(--c2-checkbox__state-layer__hover__selected--color);\n opacity: 0.08;\n}\n\n.c2-checkbox-input:focus-visible ~ .c2-checkbox__background {\n outline: var(--c2-checkbox__container__focus--outline,2px solid rgba(71, 110, 249, 0.4));\n outline-offset: var(--c2-checkbox__container__focus--outline-offset,2px);\n}";
8
+ //#endregion
9
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/decorate.js
10
+ function __decorate(decorators, target, key, desc) {
11
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
14
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15
+ }
16
+ //#endregion
17
+ //#region src/checkbox.ts
18
+ var Checkbox = class Checkbox extends LitElement {
19
+ constructor(..._args) {
20
+ super(..._args);
21
+ this.internals = this.attachInternals();
22
+ this.customValidityMessage = "";
23
+ this.disabledByForm = false;
24
+ this.checked = false;
25
+ this.indeterminate = false;
26
+ this.disabled = false;
27
+ this.name = "";
28
+ this.value = "on";
29
+ this.required = false;
30
+ }
31
+ static {
32
+ this.formAssociated = true;
33
+ }
34
+ /** The containing form, when this control is associated with one. */
35
+ get form() {
36
+ return this.internals.form;
37
+ }
38
+ /** Labels associated with this form control. */
39
+ get labels() {
40
+ return this.internals.labels;
41
+ }
42
+ get validity() {
43
+ return this.internals.validity;
44
+ }
45
+ get validationMessage() {
46
+ return this.internals.validationMessage;
47
+ }
48
+ get willValidate() {
49
+ return this.internals.willValidate;
50
+ }
51
+ formResetCallback() {
52
+ this.checked = this.hasAttribute("checked");
53
+ this.indeterminate = false;
54
+ }
55
+ formDisabledCallback(disabled) {
56
+ this.disabledByForm = disabled && !this.hasAttribute("disabled");
57
+ }
58
+ formStateRestoreCallback(state) {
59
+ this.checked = state === "checked";
60
+ }
61
+ checkValidity() {
62
+ return this.internals.checkValidity();
63
+ }
64
+ reportValidity() {
65
+ return this.internals.reportValidity();
66
+ }
67
+ setCustomValidity(message) {
68
+ this.customValidityMessage = message;
69
+ this.requestUpdate();
70
+ }
71
+ render() {
72
+ const ariaChecked = this.indeterminate ? "mixed" : void 0;
73
+ return html`
18
74
  <div class="c2-checkbox">
19
75
  <input
20
76
  class="c2-checkbox-input"
21
77
  type="checkbox"
22
- name="${a(this.name)}"
23
- aria-checked="${a(o)}"
24
- aria-label="${a(this.ariaLabel)}"
25
- aria-labelledby="${a(this.ariaLabelledBy)}"
26
- aria-describedby="${a(this.ariaDescribedBy)}"
27
- ?disabled="${this.disabled}"
78
+ name="${ifDefined(this.name)}"
79
+ aria-checked="${ifDefined(ariaChecked)}"
80
+ aria-label="${ifDefined(this.ariaLabel)}"
81
+ aria-labelledby="${ifDefined(this.ariaLabelledBy)}"
82
+ aria-describedby="${ifDefined(this.ariaDescribedBy)}"
83
+ ?disabled="${this.effectiveDisabled}"
84
+ ?required="${this.required}"
85
+ .value="${this.value}"
28
86
  .indeterminate="${this.indeterminate}"
29
87
  ?checked="${this.checked}"
30
88
  @change="${this.handleChange}"
31
89
  />
32
90
  <div class="c2-checkbox__background">
33
- <slot name="checkmark">
34
- <svg class="c2-checkbox__checkmark" viewBox="0 0 24 24">
35
- <path fill="currentColor" d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" />
36
- </svg>
37
- </slot>
38
- <slot name="mixedmark">
39
- <svg class="c2-checkbox__mixedmark" c2-checkbox__mixedmark viewBox="0 0 24 24">
40
- <path fill="currentColor" d="M19 13H5v-2h14v2z" />
41
- </svg>
42
- </slot>
91
+ <!-- Each mark slot sits in its own positioned wrapper, so any slotted content (an inline SVG, a c2-feather-*
92
+ icon, a c2-mat-icon, or a framework wrapper around them) is centred, sized and faded as one unit. -->
93
+ <span class="c2-checkbox__mark c2-checkbox__mark--check" part="checkmark">
94
+ <slot name="checkmark">
95
+ <svg viewBox="0 0 24 24">
96
+ <path fill="currentColor" d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" />
97
+ </svg>
98
+ </slot>
99
+ </span>
100
+ <span class="c2-checkbox__mark c2-checkbox__mark--mixed" part="mixedmark">
101
+ <slot name="mixedmark">
102
+ <svg viewBox="0 0 24 24">
103
+ <path fill="currentColor" d="M19 13H5v-2h14v2z" />
104
+ </svg>
105
+ </slot>
106
+ </span>
107
+ <span class="c2-checkbox__mark c2-checkbox__mark--uncheck" part="uncheckmark">
108
+ <slot name="uncheckmark"></slot>
109
+ </span>
43
110
  </div>
44
111
  <div class="c2-checkbox-state-layer"></div>
45
112
  </div>
46
113
  `;
47
- }
48
- update(o) {
49
- o.has("checked") && this.formElement && (this.formElement.checked = this.checked), super.update(o);
50
- }
51
- handleChange() {
52
- this.checked = this.formElement.checked, this.indeterminate = this.formElement.indeterminate, this.dispatchEvent(
53
- new Event("change", {
54
- bubbles: !0,
55
- composed: !0
56
- })
57
- );
58
- }
59
- };
60
- e.styles = k(u);
61
- c([
62
- x("input")
63
- ], e.prototype, "formElement", 2);
64
- c([
65
- r({ type: Boolean, reflect: !0 })
66
- ], e.prototype, "checked", 2);
67
- c([
68
- r({ type: Boolean, reflect: !0 })
69
- ], e.prototype, "indeterminate", 2);
70
- c([
71
- r({ type: Boolean, reflect: !0 })
72
- ], e.prototype, "disabled", 2);
73
- c([
74
- r({ type: String })
75
- ], e.prototype, "name", 2);
76
- c([
77
- r({ type: String, attribute: "aria-label" })
78
- ], e.prototype, "ariaLabel", 2);
79
- c([
80
- r({ type: String, attribute: "aria-labelledby" })
81
- ], e.prototype, "ariaLabelledBy", 2);
82
- c([
83
- r({ type: String, attribute: "aria-describedby" })
84
- ], e.prototype, "ariaDescribedBy", 2);
85
- e = c([
86
- p("c2-checkbox")
87
- ], e);
88
- export {
89
- e as Checkbox
114
+ }
115
+ focus(options) {
116
+ this.formElement?.focus(options);
117
+ }
118
+ update(changedProperties) {
119
+ if (changedProperties.has("checked") && this.formElement) this.formElement.checked = this.checked;
120
+ super.update(changedProperties);
121
+ }
122
+ updated(_changedProperties) {
123
+ this.internals.setFormValue(this.checked ? this.value : null, this.checked ? "checked" : "unchecked");
124
+ const missing = this.required && !this.checked;
125
+ const flags = this.customValidityMessage ? { customError: true } : missing ? { valueMissing: true } : {};
126
+ const message = this.customValidityMessage || (missing ? "Please check this box." : "");
127
+ this.internals.setValidity(flags, message, this.formElement);
128
+ }
129
+ get effectiveDisabled() {
130
+ return this.disabled || this.disabledByForm;
131
+ }
132
+ handleChange(event) {
133
+ this.checked = this.formElement.checked;
134
+ this.indeterminate = this.formElement.indeterminate;
135
+ redispatchEvent(this, event);
136
+ }
137
+ static {
138
+ this.styles = unsafeCSS(checkbox_default);
139
+ }
90
140
  };
141
+ __decorate([state()], Checkbox.prototype, "disabledByForm", void 0);
142
+ __decorate([query("input")], Checkbox.prototype, "formElement", void 0);
143
+ __decorate([property({ type: Boolean })], Checkbox.prototype, "checked", void 0);
144
+ __decorate([property({
145
+ type: Boolean,
146
+ reflect: true
147
+ })], Checkbox.prototype, "indeterminate", void 0);
148
+ __decorate([property({
149
+ type: Boolean,
150
+ reflect: true
151
+ })], Checkbox.prototype, "disabled", void 0);
152
+ __decorate([property({ type: String })], Checkbox.prototype, "name", void 0);
153
+ __decorate([property({ type: String })], Checkbox.prototype, "value", void 0);
154
+ __decorate([property({
155
+ type: Boolean,
156
+ reflect: true
157
+ })], Checkbox.prototype, "required", void 0);
158
+ __decorate([property({
159
+ type: String,
160
+ attribute: "aria-label"
161
+ })], Checkbox.prototype, "ariaLabel", void 0);
162
+ __decorate([property({
163
+ type: String,
164
+ attribute: "aria-labelledby"
165
+ })], Checkbox.prototype, "ariaLabelledBy", void 0);
166
+ __decorate([property({
167
+ type: String,
168
+ attribute: "aria-describedby"
169
+ })], Checkbox.prototype, "ariaDescribedBy", void 0);
170
+ Checkbox = __decorate([customElement("c2-checkbox")], Checkbox);
171
+ //#endregion
172
+ export { Checkbox };
package/package.json CHANGED
@@ -1,15 +1,30 @@
1
1
  {
2
2
  "name": "@c2n/checkbox",
3
- "version": "0.0.4",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "main": "dist/checkbox.js",
6
6
  "exports": {
7
- ".": "./dist/checkbox.js"
7
+ ".": {
8
+ "types": "./types/src/checkbox.d.ts",
9
+ "default": "./dist/checkbox.js"
10
+ },
11
+ "./react": {
12
+ "types": "./react.d.ts",
13
+ "default": "./react.js"
14
+ },
15
+ "./vue": {
16
+ "types": "./vue.d.ts",
17
+ "default": "./vue.js"
18
+ },
19
+ "./custom-elements.json": "./custom-elements.json"
8
20
  },
9
- "types": "types/src/index.d.ts",
10
21
  "files": [
11
22
  "dist",
12
- "types"
23
+ "types",
24
+ "react.d.ts",
25
+ "react.js",
26
+ "vue.d.ts",
27
+ "vue.js"
13
28
  ],
14
29
  "keywords": [
15
30
  "checkbox",
@@ -26,86 +41,31 @@
26
41
  "url": "https://github.com/code2nguyen/web-components.git"
27
42
  },
28
43
  "scripts": {
29
- "lint": "npm run lint:lit-analyzer && npm run lint:eslint",
30
- "lint:eslint": "eslint 'src/**/*.ts'",
31
- "lint:lit-analyzer": "lit-analyzer",
32
44
  "dev": "vite",
33
- "build": "tsc && vite build"
45
+ "build": "wireit",
46
+ "type-check": "wireit"
47
+ },
48
+ "wireit": {
49
+ "type-check": {
50
+ "dependencies": [
51
+ "../../core:build"
52
+ ],
53
+ "command": "tsc -p tsconfig.lib.json --composite false"
54
+ },
55
+ "build": {
56
+ "dependencies": [
57
+ "type-check"
58
+ ],
59
+ "command": "vite build"
60
+ }
34
61
  },
35
62
  "dependencies": {
36
- "@c2n/wc-utils": "0.0.4",
37
- "lit": "2.3.0"
63
+ "@c2n/core": "0.0.7",
64
+ "lit": "3.3.3"
38
65
  },
39
66
  "devDependencies": {
40
- "@typescript-eslint/eslint-plugin": "5.33.1",
41
- "@typescript-eslint/parser": "5.33.1",
42
- "eslint": "8.22.0",
43
- "lit-analyzer": "1.2.1",
44
- "prettier": "2.7.1",
45
- "typescript": "4.7.4",
46
- "vite": "3.0.8"
47
- },
48
- "prettier": {
49
- "singleQuote": true,
50
- "printWidth": 160,
51
- "tabWidth": 2,
52
- "semi": false
53
- },
54
- "eslintConfig": {
55
- "root": true,
56
- "extends": [
57
- "eslint:recommended",
58
- "plugin:@typescript-eslint/eslint-recommended",
59
- "plugin:@typescript-eslint/recommended"
60
- ],
61
- "parser": "@typescript-eslint/parser",
62
- "parserOptions": {
63
- "ecmaVersion": 2020,
64
- "sourceType": "module"
65
- },
66
- "plugins": [
67
- "@typescript-eslint"
68
- ],
69
- "env": {
70
- "browser": true
71
- },
72
- "rules": {
73
- "no-prototype-builtins": "off",
74
- "@typescript-eslint/ban-types": "off",
75
- "@typescript-eslint/explicit-function-return-type": "off",
76
- "@typescript-eslint/explicit-module-boundary-types": "off",
77
- "@typescript-eslint/no-explicit-any": "error",
78
- "@typescript-eslint/no-empty-function": "off",
79
- "@typescript-eslint/no-non-null-assertion": "off",
80
- "@typescript-eslint/no-unused-vars": [
81
- "warn",
82
- {
83
- "argsIgnorePattern": "^_"
84
- }
85
- ]
86
- },
87
- "overrides": [
88
- {
89
- "files": [
90
- "rollup.config.js",
91
- "web-test-runner.config.js"
92
- ],
93
- "env": {
94
- "node": true
95
- }
96
- },
97
- {
98
- "files": [
99
- "*_test.ts",
100
- "**/custom_typings/*.ts",
101
- "packages/labs/ssr/src/test/integration/tests/**",
102
- "packages/labs/ssr/src/lib/util/parse5-utils.ts"
103
- ],
104
- "rules": {
105
- "@typescript-eslint/no-explicit-any": "off"
106
- }
107
- }
108
- ]
67
+ "@c2n/config": "*"
109
68
  },
110
- "gitHead": "a5ffa12eeca6664d4e9f175053f6b86d49eca1a1"
69
+ "customElements": "custom-elements.json",
70
+ "gitHead": "c8db398a27f7cd417d665fdf5da455fee2d4e910"
111
71
  }
package/react.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ //
3
+ // JSX types for the custom elements of @c2n/checkbox. Import once, anywhere in the program:
4
+ //
5
+ // import '@c2n/checkbox/react'
6
+ //
7
+ // Register the elements at module scope before React renders, or React writes an object prop as an
8
+ // attribute and it stringifies.
9
+
10
+ import type { DetailedHTMLProps, HTMLAttributes } from 'react'
11
+ import type { Checkbox } from '@c2n/checkbox'
12
+
13
+ /** Standard React host-element attributes plus the element's own public properties. */
14
+ type C2Props<T> = DetailedHTMLProps<HTMLAttributes<T>, T> & Partial<Omit<T, keyof HTMLElement>>
15
+
16
+ declare module 'react' {
17
+ namespace JSX {
18
+ interface IntrinsicElements {
19
+ 'c2-checkbox': C2Props<Checkbox>
20
+ }
21
+ }
22
+ }
23
+
24
+ export {}
package/react.js ADDED
@@ -0,0 +1,3 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ // Types only — see the matching .d.ts.
3
+ export {}
@@ -1,22 +1,112 @@
1
- import { LitElement, PropertyValues } from 'lit';
1
+ import { LitElement, type PropertyValues } from 'lit';
2
+ import type { TypedAddEventListener, TypedRemoveEventListener } from '@c2n/core/event-helper.js';
3
+ /** Events fired by {@link Checkbox}, keyed for `addEventListener`. */
4
+ export interface CheckboxEventMap {
5
+ change: Event;
6
+ }
7
+ export interface Checkbox {
8
+ addEventListener: TypedAddEventListener<Checkbox, CheckboxEventMap>;
9
+ removeEventListener: TypedRemoveEventListener<Checkbox, CheckboxEventMap>;
10
+ }
2
11
  /**
3
- * An example element.
12
+ * A checkbox with native `<input type="checkbox">` behaviour. The visible box sits centred in a square touch target
13
+ * (`state-layer--size`) that doubles as the hover layer; that layer is transparent unless a
14
+ * `state-layer__hover__*--color` is set, so the default look is quiet.
15
+ *
16
+ * @tag c2-checkbox
17
+ *
18
+ * @slot checkmark - Icon shown when checked: an inline SVG, a `c2-feather-*` icon or a `c2-mat-icon`. Defaults to a check.
19
+ * @slot mixedmark - Icon shown when indeterminate. Defaults to a dash.
20
+ * @slot uncheckmark - Icon shown when unchecked. Empty by default.
21
+ *
22
+ * @event {Event} change - Re-dispatched from the inner input when the checked state changes.
23
+ *
24
+ * @cssproperty {pixel} [--c2-checkbox__container--height=18px]
25
+ * @cssproperty {pixel} [--c2-checkbox__container--width=18px]
26
+ * @cssproperty {border-radius} [--c2-checkbox__container--border-top-left-radius=4px]
27
+ * @cssproperty {border-radius} [--c2-checkbox__container--border-top-right-radius=4px]
28
+ * @cssproperty {border-radius} [--c2-checkbox__container--border-bottom-left-radius=4px]
29
+ * @cssproperty {border-radius} [--c2-checkbox__container--border-bottom-right-radius=4px]
30
+ *
31
+ * @cssproperty {border} [--c2-checkbox__container--border-top=1px solid #bcbcc6]
32
+ * @cssproperty {border} [--c2-checkbox__container--border-right=1px solid #bcbcc6]
33
+ * @cssproperty {border} [--c2-checkbox__container--border-bottom=1px solid #bcbcc6]
34
+ * @cssproperty {border} [--c2-checkbox__container--border-left=1px solid #bcbcc6]
35
+ * @cssproperty {color} [--c2-checkbox__container--background-color=transparent]
36
+ *
37
+ * @cssproperty {color} [--c2-checkbox__container__selected--background-color=#476ef9]
38
+ * @cssproperty {border} [--c2-checkbox__container__selected--border-top=0px solid transparent]
39
+ * @cssproperty {border} [--c2-checkbox__container__selected--border-right=0px solid transparent]
40
+ * @cssproperty {border} [--c2-checkbox__container__selected--border-bottom=0px solid transparent]
41
+ * @cssproperty {border} [--c2-checkbox__container__selected--border-left=0px solid transparent]
42
+ *
43
+ * @cssproperty {color} --c2-checkbox__container__selected__hover--background-color
44
+ *
45
+ * @cssproperty {outline} [--c2-checkbox__container__focus--outline=2px solid rgba(71, 110, 249, 0.4)]
46
+ * @cssproperty {pixel} [--c2-checkbox__container__focus--outline-offset=2px]
47
+ *
48
+ * @cssproperty {opacity} [--c2-checkbox__container__disabled--opacity=0.38]
49
+ *
50
+ * @cssproperty {pixel} [--c2-checkbox__checkmark--size=12px]
51
+ * @cssproperty {color} [--c2-checkbox__checkmark--color=#ffffff]
52
+ *
53
+ * @cssproperty {pixel} [--c2-checkbox__mixedmark--size=12px]
54
+ * @cssproperty {color} [--c2-checkbox__mixedmark--color=#ffffff]
55
+ *
56
+ * @cssproperty {pixel} [--c2-checkbox__uncheckmark--size=12px]
57
+ * @cssproperty {color} [--c2-checkbox__uncheckmark--color=#ffffff]
4
58
  *
5
- * @slot - This element has a slot
6
- * @csspart button - The button
59
+ * @cssproperty {pixel} [--c2-checkbox__state-layer--size=32px]
60
+ * @cssproperty {border-radius} [--c2-checkbox__state-layer--border-top-left-radius=6px]
61
+ * @cssproperty {border-radius} [--c2-checkbox__state-layer--border-top-right-radius=6px]
62
+ * @cssproperty {border-radius} [--c2-checkbox__state-layer--border-bottom-left-radius=6px]
63
+ * @cssproperty {border-radius} [--c2-checkbox__state-layer--border-bottom-right-radius=6px]
64
+ * @cssproperty {color} --c2-checkbox__state-layer__hover__unselected--color
65
+ * @cssproperty {color} --c2-checkbox__state-layer__hover__selected--color
7
66
  */
8
67
  export declare class Checkbox extends LitElement {
68
+ static formAssociated: boolean;
69
+ private readonly internals;
70
+ private customValidityMessage;
71
+ private disabledByForm;
9
72
  protected formElement: HTMLInputElement;
73
+ /** Whether the checkbox is checked. */
10
74
  checked: boolean;
75
+ /** Shows the mixed state (neither checked nor unchecked), e.g. for a parent of a partially selected group. */
11
76
  indeterminate: boolean;
77
+ /** Disables the control: it no longer toggles and is rendered dimmed. */
12
78
  disabled: boolean;
79
+ /** Form field name forwarded to the inner input. */
13
80
  name: string;
81
+ /** Value submitted while checked. */
82
+ value: string;
83
+ /** Requires the checkbox to be checked for the form to be valid. */
84
+ required: boolean;
85
+ /** Accessible name used when no visible label names the checkbox. */
14
86
  ariaLabel: string;
87
+ /** Id of the element that labels the checkbox. */
15
88
  ariaLabelledBy: undefined | string;
89
+ /** Id of the element that describes the checkbox. */
16
90
  ariaDescribedBy: undefined | string;
91
+ /** The containing form, when this control is associated with one. */
92
+ get form(): HTMLFormElement | null;
93
+ /** Labels associated with this form control. */
94
+ get labels(): NodeList;
95
+ get validity(): ValidityState;
96
+ get validationMessage(): string;
97
+ get willValidate(): boolean;
98
+ formResetCallback(): void;
99
+ formDisabledCallback(disabled: boolean): void;
100
+ formStateRestoreCallback(state: string | File | FormData | null): void;
101
+ checkValidity(): boolean;
102
+ reportValidity(): boolean;
103
+ setCustomValidity(message: string): void;
17
104
  render(): import("lit-html").TemplateResult<1>;
105
+ focus(options?: FocusOptions | undefined): void;
18
106
  protected update(changedProperties: PropertyValues): void;
19
- protected handleChange(): void;
107
+ protected updated(_changedProperties: PropertyValues): void;
108
+ private get effectiveDisabled();
109
+ protected handleChange(event: Event): void;
20
110
  static styles: import("lit").CSSResult;
21
111
  }
22
112
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,cAAc,EAAE,MAAM,KAAK,CAAA;AAIjE;;;;;GAKG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtB,SAAS,CAAC,WAAW,EAAG,gBAAgB,CAAA;IAEZ,OAAO,UAAQ;IAEf,aAAa,UAAQ;IAErB,QAAQ,UAAQ;IAEhC,IAAI,SAAK;IAG5B,SAAS,EAAG,MAAM,CAAA;IAG3B,cAAc,EAAG,SAAS,GAAG,MAAM,CAAA;IAGnC,eAAe,EAAG,SAAS,GAAG,MAAM,CAAA;IAE3B,MAAM;cAkCI,MAAM,CAAC,iBAAiB,EAAE,cAAc;IAO3D,SAAS,CAAC,YAAY;IAWtB,OAAgB,MAAM,0BAAoB;CAC3C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,QAAQ,CAAA;KACxB;CACF"}
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAGtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAKhG,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,KAAK,CAAA;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,gBAAgB,EAAE,qBAAqB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAA;IACnE,mBAAmB,EAAE,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAA;CAC1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,cAAc,UAAO;IAE5B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IACnD,OAAO,CAAC,qBAAqB,CAAK;IACzB,OAAO,CAAC,cAAc,CAAQ;IAEvB,SAAS,CAAC,WAAW,EAAG,gBAAgB,CAAA;IAExD,uCAAuC;IACV,OAAO,UAAQ;IAE5C,8GAA8G;IAClE,aAAa,UAAQ;IAEjE,yEAAyE;IAC7B,QAAQ,UAAQ;IAE5D,oDAAoD;IACxB,IAAI,SAAK;IAErC,qCAAqC;IACT,KAAK,SAAO;IAExC,oEAAoE;IACxB,QAAQ,UAAQ;IAE5D,qEAAqE;IAE5D,SAAS,EAAG,MAAM,CAAA;IAE3B,kDAAkD;IAElD,cAAc,EAAG,SAAS,GAAG,MAAM,CAAA;IAEnC,qDAAqD;IAErD,eAAe,EAAG,SAAS,GAAG,MAAM,CAAA;IAEpC,qEAAqE;IACrE,IAAI,IAAI,2BAEP;IAED,gDAAgD;IAChD,IAAI,MAAM,aAET;IAED,IAAI,QAAQ,kBAEX;IAED,IAAI,iBAAiB,WAEpB;IAED,IAAI,YAAY,YAEf;IAED,iBAAiB;IAKjB,oBAAoB,CAAC,QAAQ,EAAE,OAAO;IAItC,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI;IAI/D,aAAa;IAIb,cAAc;IAId,iBAAiB,CAAC,OAAO,EAAE,MAAM;IAKxB,MAAM;IA6CN,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;cAIrC,MAAM,CAAC,iBAAiB,EAAE,cAAc;cAOxC,OAAO,CAAC,kBAAkB,EAAE,cAAc;IAQ7D,OAAO,KAAK,iBAAiB,GAE5B;IAED,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK;IAMnC,OAAgB,MAAM,0BAAoB;CAC3C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,QAAQ,CAAA;KACxB;CACF"}
package/vue.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ //
3
+ // Vue template types for the custom elements of @c2n/checkbox. Import once, anywhere in the program:
4
+ //
5
+ // import '@c2n/checkbox/vue'
6
+ //
7
+ // Tell the compiler about the tags as well, or every c2-* tag is resolved as a Vue component and renders
8
+ // nothing: template.compilerOptions.isCustomElement = (tag) => tag.startsWith('c2-') in vite.config.ts.
9
+
10
+ import type { DefineComponent, HTMLAttributes } from 'vue'
11
+ import type { Checkbox, CheckboxEventMap } from '@c2n/checkbox'
12
+
13
+ /** The element's own public properties, plus every attribute Vue understands on a host element. */
14
+ type C2Props<T> = Partial<Omit<T, keyof HTMLElement>> & HTMLAttributes
15
+
16
+ declare module 'vue' {
17
+ interface GlobalComponents {
18
+ 'c2-checkbox': DefineComponent<
19
+ C2Props<Checkbox> & {
20
+ 'aria-label'?: unknown
21
+ 'aria-labelledby'?: unknown
22
+ 'aria-describedby'?: unknown
23
+ onChange?: (event: CheckboxEventMap['change']) => void
24
+ }
25
+ >
26
+ }
27
+ }
28
+
29
+ declare module '@vue/runtime-dom' {
30
+ interface HTMLAttributes {
31
+ /** Vue's own definition omits it, and slotting a plain element into a component needs it. */
32
+ slot?: string
33
+ }
34
+ }
35
+
36
+ export {}
package/vue.js ADDED
@@ -0,0 +1,3 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ // Types only — see the matching .d.ts.
3
+ export {}
@@ -1,2 +0,0 @@
1
- export * from './checkbox';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}