etherpad-webcomponents 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/LICENSE +21 -0
  2. package/dist/EpButton.d.ts +16 -0
  3. package/dist/EpButton.d.ts.map +1 -0
  4. package/dist/EpButton.js +148 -0
  5. package/dist/EpButton.js.map +1 -0
  6. package/dist/EpCard.d.ts +15 -0
  7. package/dist/EpCard.d.ts.map +1 -0
  8. package/dist/EpCard.js +126 -0
  9. package/dist/EpCard.js.map +1 -0
  10. package/dist/EpChatMessage.d.ts +15 -0
  11. package/dist/EpChatMessage.d.ts.map +1 -0
  12. package/dist/EpChatMessage.js +86 -0
  13. package/dist/EpChatMessage.js.map +1 -0
  14. package/dist/EpCheckbox.d.ts +15 -0
  15. package/dist/EpCheckbox.d.ts.map +1 -0
  16. package/dist/EpCheckbox.js +122 -0
  17. package/dist/EpCheckbox.js.map +1 -0
  18. package/dist/EpColorPicker.d.ts +16 -0
  19. package/dist/EpColorPicker.d.ts.map +1 -0
  20. package/dist/EpColorPicker.js +188 -0
  21. package/dist/EpColorPicker.js.map +1 -0
  22. package/dist/EpColorWheel.d.ts +61 -0
  23. package/dist/EpColorWheel.d.ts.map +1 -0
  24. package/dist/EpColorWheel.js +428 -0
  25. package/dist/EpColorWheel.js.map +1 -0
  26. package/dist/EpDropdown.d.ts +41 -0
  27. package/dist/EpDropdown.d.ts.map +1 -0
  28. package/dist/EpDropdown.js +272 -0
  29. package/dist/EpDropdown.js.map +1 -0
  30. package/dist/EpDropdownItem.d.ts +16 -0
  31. package/dist/EpDropdownItem.d.ts.map +1 -0
  32. package/dist/EpDropdownItem.js +88 -0
  33. package/dist/EpDropdownItem.js.map +1 -0
  34. package/dist/EpInput.d.ts +20 -0
  35. package/dist/EpInput.d.ts.map +1 -0
  36. package/dist/EpInput.js +149 -0
  37. package/dist/EpInput.js.map +1 -0
  38. package/dist/EpModal.d.ts +45 -0
  39. package/dist/EpModal.d.ts.map +1 -0
  40. package/dist/EpModal.js +210 -0
  41. package/dist/EpModal.js.map +1 -0
  42. package/dist/EpNotification.d.ts +32 -0
  43. package/dist/EpNotification.d.ts.map +1 -0
  44. package/dist/EpNotification.js +215 -0
  45. package/dist/EpNotification.js.map +1 -0
  46. package/dist/EpTheme.d.ts +33 -0
  47. package/dist/EpTheme.d.ts.map +1 -0
  48. package/dist/EpTheme.js +109 -0
  49. package/dist/EpTheme.js.map +1 -0
  50. package/dist/EpToast.d.ts +37 -0
  51. package/dist/EpToast.d.ts.map +1 -0
  52. package/dist/EpToast.js +220 -0
  53. package/dist/EpToast.js.map +1 -0
  54. package/dist/EpToolbarSelect.d.ts +24 -0
  55. package/dist/EpToolbarSelect.d.ts.map +1 -0
  56. package/dist/EpToolbarSelect.js +138 -0
  57. package/dist/EpToolbarSelect.js.map +1 -0
  58. package/dist/EpUserBadge.d.ts +15 -0
  59. package/dist/EpUserBadge.d.ts.map +1 -0
  60. package/dist/EpUserBadge.js +90 -0
  61. package/dist/EpUserBadge.js.map +1 -0
  62. package/dist/index.d.ts +17 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +16 -0
  65. package/dist/index.js.map +1 -0
  66. package/package.json +43 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The Etherpad Foundation
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.
@@ -0,0 +1,16 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class EpButton extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ variant: 'default' | 'primary' | 'ghost' | 'icon';
5
+ size: 'small' | 'medium' | 'large';
6
+ uppercase: boolean;
7
+ disabled: boolean;
8
+ type: 'button' | 'submit' | 'reset';
9
+ render(): import("lit").TemplateResult<1>;
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'ep-button': EpButton;
14
+ }
15
+ }
16
+ //# sourceMappingURL=EpButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpButton.d.ts","sourceRoot":"","sources":["../src/EpButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBACa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,MAAM,0BAsGX;IAE2B,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAa;IAC9D,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAY;IAC/B,SAAS,UAAQ;IACjB,QAAQ,UAAS;IACjD,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAY;IAE3D,MAAM;CAOP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,148 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ let EpButton = class EpButton extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.variant = 'default';
13
+ this.size = 'medium';
14
+ this.uppercase = false;
15
+ this.disabled = false;
16
+ this.type = 'button';
17
+ }
18
+ render() {
19
+ return html `
20
+ <button type="${this.type}" ?disabled="${this.disabled}">
21
+ <slot></slot>
22
+ </button>
23
+ `;
24
+ }
25
+ };
26
+ EpButton.styles = css `
27
+ :host {
28
+ --ep-font: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
29
+ display: inline-block;
30
+ }
31
+
32
+ button {
33
+ font-family: var(--ep-font);
34
+ padding: 5px 20px;
35
+ border-radius: 4px;
36
+ font-size: 14px;
37
+ font-weight: 700;
38
+ cursor: pointer;
39
+ transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
40
+ line-height: 1.5;
41
+ border: none;
42
+ outline: none;
43
+ display: inline-flex;
44
+ align-items: center;
45
+ gap: 6px;
46
+ }
47
+
48
+ button:focus-visible {
49
+ outline: 2px solid var(--dark-color, #576273);
50
+ outline-offset: 2px;
51
+ }
52
+
53
+ /* Uppercase */
54
+ :host([uppercase]) button {
55
+ text-transform: uppercase;
56
+ }
57
+
58
+ /* Default */
59
+ :host([variant="default"]) button,
60
+ button {
61
+ background: transparent;
62
+ color: var(--text-color, #485365);
63
+ border: 1px solid var(--middle-color, #d2d2d2);
64
+ }
65
+
66
+ :host([variant="default"]) button:hover,
67
+ button:hover {
68
+ background: var(--bg-soft-color, #f2f3f4);
69
+ }
70
+
71
+ /* Primary */
72
+ :host([variant="primary"]) button {
73
+ background: var(--text-color, #485365);
74
+ color: var(--primary-color, #64d29b);
75
+ border: 1px solid var(--text-color, #485365);
76
+ }
77
+
78
+ :host([variant="primary"]) button:hover {
79
+ background: var(--dark-color, #576273);
80
+ border-color: var(--dark-color, #576273);
81
+ }
82
+
83
+ /* Ghost */
84
+ :host([variant="ghost"]) button {
85
+ background: transparent;
86
+ color: var(--text-color, #485365);
87
+ border: none;
88
+ padding: 5px 12px;
89
+ }
90
+
91
+ :host([variant="ghost"]) button:hover {
92
+ background: var(--bg-soft-color, #f2f3f4);
93
+ }
94
+
95
+ /* Icon */
96
+ :host([variant="icon"]) button {
97
+ background: transparent;
98
+ color: var(--text-color, #485365);
99
+ border: none;
100
+ padding: 4px;
101
+ border-radius: 3px;
102
+ min-width: 28px;
103
+ min-height: 28px;
104
+ justify-content: center;
105
+ }
106
+
107
+ :host([variant="icon"]) button:hover {
108
+ background: var(--bg-soft-color, #f2f3f4);
109
+ }
110
+
111
+ /* Sizes */
112
+ :host([size="small"]) button {
113
+ padding: 3px 12px;
114
+ font-size: 12px;
115
+ }
116
+
117
+ :host([size="large"]) button {
118
+ padding: 8px 28px;
119
+ font-size: 16px;
120
+ }
121
+
122
+ /* Disabled */
123
+ :host([disabled]) button {
124
+ opacity: 0.4;
125
+ cursor: not-allowed;
126
+ pointer-events: none;
127
+ }
128
+ `;
129
+ __decorate([
130
+ property({ reflect: true })
131
+ ], EpButton.prototype, "variant", void 0);
132
+ __decorate([
133
+ property({ reflect: true })
134
+ ], EpButton.prototype, "size", void 0);
135
+ __decorate([
136
+ property({ reflect: true, type: Boolean })
137
+ ], EpButton.prototype, "uppercase", void 0);
138
+ __decorate([
139
+ property({ type: Boolean, reflect: true })
140
+ ], EpButton.prototype, "disabled", void 0);
141
+ __decorate([
142
+ property()
143
+ ], EpButton.prototype, "type", void 0);
144
+ EpButton = __decorate([
145
+ customElement('ep-button')
146
+ ], EpButton);
147
+ export { EpButton };
148
+ //# sourceMappingURL=EpButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpButton.js","sourceRoot":"","sources":["../src/EpButton.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGrD,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAyGwB,YAAO,GAA6C,SAAS,CAAC;QAC9D,SAAI,GAAiC,QAAQ,CAAC;QAC/B,cAAS,GAAG,KAAK,CAAA;QACjB,aAAQ,GAAG,KAAK,CAAC;QACjD,SAAI,GAAkC,QAAQ,CAAC;IAS7D,CAAC;IAPC,MAAM;QACJ,OAAO,IAAI,CAAA;sBACO,IAAI,CAAC,IAAI,gBAAgB,IAAI,CAAC,QAAQ;;;KAGvD,CAAC;IACJ,CAAC;;AApHM,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsGlB,AAtGY,CAsGX;AAE2B;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAA+D;AAC9D;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAA+C;AAC/B;IAA3C,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CAAkB;AACjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAkB;AACjD;IAAX,QAAQ,EAAE;sCAAgD;AA7GhD,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAsHpB"}
@@ -0,0 +1,15 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class EpCard extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ cardTitle: string;
5
+ subtitle: string;
6
+ bordered: boolean;
7
+ compact: boolean;
8
+ render(): import("lit").TemplateResult<1>;
9
+ }
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ 'ep-card': EpCard;
13
+ }
14
+ }
15
+ //# sourceMappingURL=EpCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpCard.d.ts","sourceRoot":"","sources":["../src/EpCard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBACa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,MAAM,0BAwEX;IAEqC,SAAS,SAAM;IAC1C,QAAQ,SAAM;IACkB,QAAQ,UAAS;IACjB,OAAO,UAAS;IAE5D,MAAM;CAmBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
package/dist/EpCard.js ADDED
@@ -0,0 +1,126 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ let EpCard = class EpCard extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.cardTitle = '';
13
+ this.subtitle = '';
14
+ this.bordered = false;
15
+ this.compact = false;
16
+ }
17
+ render() {
18
+ const hasHeader = this.cardTitle || this.subtitle;
19
+ return html `
20
+ <div class="card" part="card">
21
+ ${hasHeader ? html `
22
+ <div class="header" part="header">
23
+ ${this.cardTitle ? html `<h3 class="title">${this.cardTitle}</h3>` : ''}
24
+ ${this.subtitle ? html `<p class="subtitle">${this.subtitle}</p>` : ''}
25
+ </div>
26
+ ` : ''}
27
+ <div class="body" part="body">
28
+ <slot></slot>
29
+ </div>
30
+ <div class="footer" part="footer">
31
+ <slot name="footer"></slot>
32
+ </div>
33
+ </div>
34
+ `;
35
+ }
36
+ };
37
+ EpCard.styles = css `
38
+ :host {
39
+ --ep-font: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
40
+ display: block;
41
+ font-family: var(--ep-font);
42
+ font-size: 14px;
43
+ color: var(--text-color, #485365);
44
+ }
45
+
46
+ .card {
47
+ background: var(--bg-color, white);
48
+ border-radius: 5px;
49
+ box-shadow: 0 0 0 1px rgba(99, 114, 130, 0.16), 0 8px 16px rgba(27, 39, 51, 0.08);
50
+ overflow: hidden;
51
+ }
52
+
53
+ :host([bordered]) .card {
54
+ box-shadow: none;
55
+ border: 1px solid var(--middle-color, #d2d2d2);
56
+ }
57
+
58
+ .header {
59
+ padding: 20px 25px 0;
60
+ }
61
+
62
+ .header:empty { display: none; }
63
+
64
+ .title {
65
+ margin: 0;
66
+ font-size: 1.2rem;
67
+ font-weight: 700;
68
+ line-height: 1.4;
69
+ color: var(--text-color, #485365);
70
+ }
71
+
72
+ .subtitle {
73
+ margin: 4px 0 0;
74
+ font-size: 13px;
75
+ color: var(--text-soft-color, #576273);
76
+ }
77
+
78
+ .body {
79
+ padding: 20px 25px;
80
+ line-height: 1.6;
81
+ }
82
+
83
+ :host([compact]) .body {
84
+ padding: 12px 16px;
85
+ }
86
+
87
+ :host([compact]) .header {
88
+ padding: 12px 16px 0;
89
+ }
90
+
91
+ .footer {
92
+ padding: 0 25px 20px;
93
+ display: flex;
94
+ align-items: center;
95
+ gap: 8px;
96
+ }
97
+
98
+ :host([compact]) .footer {
99
+ padding: 0 16px 12px;
100
+ }
101
+
102
+ .footer:empty { display: none; }
103
+
104
+ .divider {
105
+ border: none;
106
+ border-top: 1px solid var(--bg-soft-color, #f2f3f4);
107
+ margin: 0;
108
+ }
109
+ `;
110
+ __decorate([
111
+ property({ attribute: 'card-title' })
112
+ ], EpCard.prototype, "cardTitle", void 0);
113
+ __decorate([
114
+ property()
115
+ ], EpCard.prototype, "subtitle", void 0);
116
+ __decorate([
117
+ property({ type: Boolean, reflect: true })
118
+ ], EpCard.prototype, "bordered", void 0);
119
+ __decorate([
120
+ property({ type: Boolean, reflect: true })
121
+ ], EpCard.prototype, "compact", void 0);
122
+ EpCard = __decorate([
123
+ customElement('ep-card')
124
+ ], EpCard);
125
+ export { EpCard };
126
+ //# sourceMappingURL=EpCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpCard.js","sourceRoot":"","sources":["../src/EpCard.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGrD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAA/B;;QA2EkC,cAAS,GAAG,EAAE,CAAC;QAC1C,aAAQ,GAAG,EAAE,CAAC;QACkB,aAAQ,GAAG,KAAK,CAAC;QACjB,YAAO,GAAG,KAAK,CAAC;IAqB9D,CAAC;IAnBC,MAAM;QACJ,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC;QAClD,OAAO,IAAI,CAAA;;UAEL,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA;;cAEZ,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA,qBAAqB,IAAI,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE;cACpE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,uBAAuB,IAAI,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,EAAE;;SAExE,CAAC,CAAC,CAAC,EAAE;;;;;;;;KAQT,CAAC;IACJ,CAAC;;AAjGM,aAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwElB,AAxEY,CAwEX;AAEqC;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;yCAAgB;AAC1C;IAAX,QAAQ,EAAE;wCAAe;AACkB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAkB;AACjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAiB;AA9EjD,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM,CAmGlB"}
@@ -0,0 +1,15 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class EpChatMessage extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ author: string;
5
+ authorColor: string;
6
+ time: string;
7
+ own: boolean;
8
+ render(): import("lit").TemplateResult<1>;
9
+ }
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ 'ep-chat-message': EpChatMessage;
13
+ }
14
+ }
15
+ //# sourceMappingURL=EpChatMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpChatMessage.d.ts","sourceRoot":"","sources":["../src/EpChatMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BAwCX;IAEU,MAAM,SAAM;IACiB,WAAW,SAAM;IAC9C,IAAI,SAAM;IACsB,GAAG,UAAS;IAExD,MAAM;CAWP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
@@ -0,0 +1,86 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ let EpChatMessage = class EpChatMessage extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.author = '';
13
+ this.authorColor = '';
14
+ this.time = '';
15
+ this.own = false;
16
+ }
17
+ render() {
18
+ return html `
19
+ <div class="header">
20
+ <span class="author" style="${this.authorColor ? `color: ${this.authorColor}` : ''}">${this.author}</span>
21
+ ${this.time ? html `<span class="time">${this.time}</span>` : ''}
22
+ </div>
23
+ <div class="body">
24
+ <slot></slot>
25
+ </div>
26
+ `;
27
+ }
28
+ };
29
+ EpChatMessage.styles = css `
30
+ :host {
31
+ --ep-font: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
32
+ display: block;
33
+ font-family: var(--ep-font);
34
+ font-size: 14px;
35
+ color: var(--text-color, #485365);
36
+ padding: 6px 10px;
37
+ }
38
+
39
+ :host(:first-child) { padding-top: 10px; }
40
+ :host(:last-child) { padding-bottom: 10px; }
41
+
42
+ .header {
43
+ display: flex;
44
+ align-items: baseline;
45
+ gap: 8px;
46
+ margin-bottom: 2px;
47
+ }
48
+
49
+ .author {
50
+ font-weight: 700;
51
+ font-size: 13px;
52
+ }
53
+
54
+ .time {
55
+ font-size: 11px;
56
+ color: var(--text-soft-color, #576273);
57
+ }
58
+
59
+ .body {
60
+ line-height: 1.5;
61
+ word-wrap: break-word;
62
+ }
63
+
64
+ :host([own]) {
65
+ background: var(--bg-soft-color, #f2f3f4);
66
+ border-radius: 4px;
67
+ margin: 2px 0;
68
+ }
69
+ `;
70
+ __decorate([
71
+ property()
72
+ ], EpChatMessage.prototype, "author", void 0);
73
+ __decorate([
74
+ property({ attribute: 'author-color' })
75
+ ], EpChatMessage.prototype, "authorColor", void 0);
76
+ __decorate([
77
+ property()
78
+ ], EpChatMessage.prototype, "time", void 0);
79
+ __decorate([
80
+ property({ type: Boolean, reflect: true })
81
+ ], EpChatMessage.prototype, "own", void 0);
82
+ EpChatMessage = __decorate([
83
+ customElement('ep-chat-message')
84
+ ], EpChatMessage);
85
+ export { EpChatMessage };
86
+ //# sourceMappingURL=EpChatMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpChatMessage.js","sourceRoot":"","sources":["../src/EpChatMessage.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGrD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QA2CO,WAAM,GAAG,EAAE,CAAC;QACiB,gBAAW,GAAG,EAAE,CAAC;QAC9C,SAAI,GAAG,EAAE,CAAC;QACsB,QAAG,GAAG,KAAK,CAAC;IAa1D,CAAC;IAXC,MAAM;QACJ,OAAO,IAAI,CAAA;;sCAEuB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,MAAM;UAChG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,sBAAsB,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE;;;;;KAKlE,CAAC;IACJ,CAAC;;AAzDM,oBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwClB,AAxCY,CAwCX;AAEU;IAAX,QAAQ,EAAE;6CAAa;AACiB;IAAxC,QAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;kDAAkB;AAC9C;IAAX,QAAQ,EAAE;2CAAW;AACsB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAa;AA9C7C,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CA2DzB"}
@@ -0,0 +1,15 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class EpCheckbox extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ checked: boolean;
5
+ disabled: boolean;
6
+ label: string;
7
+ render(): import("lit").TemplateResult<1>;
8
+ private _toggle;
9
+ }
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ 'ep-checkbox': EpCheckbox;
13
+ }
14
+ }
15
+ //# sourceMappingURL=EpCheckbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpCheckbox.d.ts","sourceRoot":"","sources":["../src/EpCheckbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBACa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,MAAM,0BAqEX;IAE0C,OAAO,UAAS;IAChB,QAAQ,UAAS;IACjD,KAAK,SAAM;IAEvB,MAAM;IAcN,OAAO,CAAC,OAAO;CAQhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
@@ -0,0 +1,122 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ 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;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ let EpCheckbox = class EpCheckbox extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.checked = false;
13
+ this.disabled = false;
14
+ this.label = '';
15
+ }
16
+ render() {
17
+ return html `
18
+ <div class="track" @click="${this._toggle}">
19
+ <div class="thumb"></div>
20
+ </div>
21
+ <input type="checkbox"
22
+ .checked="${this.checked}"
23
+ ?disabled="${this.disabled}"
24
+ @change="${this._toggle}"
25
+ aria-label="${this.label}" />
26
+ ${this.label ? html `<span class="label" @click="${this._toggle}">${this.label}</span>` : ''}
27
+ `;
28
+ }
29
+ _toggle() {
30
+ if (this.disabled)
31
+ return;
32
+ this.checked = !this.checked;
33
+ this.dispatchEvent(new CustomEvent('ep-change', {
34
+ bubbles: true, composed: true,
35
+ detail: { checked: this.checked },
36
+ }));
37
+ }
38
+ };
39
+ EpCheckbox.styles = css `
40
+ :host {
41
+ --ep-font: var(--main-font-family, Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif);
42
+ display: inline-flex;
43
+ align-items: center;
44
+ gap: 8px;
45
+ cursor: pointer;
46
+ font-family: var(--ep-font);
47
+ font-size: 14px;
48
+ color: var(--text-color, #485365);
49
+ user-select: none;
50
+ }
51
+
52
+ :host([disabled]) {
53
+ opacity: 0.4;
54
+ cursor: not-allowed;
55
+ pointer-events: none;
56
+ }
57
+
58
+ .track {
59
+ position: relative;
60
+ width: 36px;
61
+ height: 20px;
62
+ background: var(--middle-color, #d2d2d2);
63
+ border-radius: 10px;
64
+ transition: background 0.2s ease;
65
+ flex-shrink: 0;
66
+ }
67
+
68
+ :host([checked]) .track {
69
+ background: var(--text-color, #485365);
70
+ }
71
+
72
+ .thumb {
73
+ position: absolute;
74
+ top: 2px;
75
+ left: 2px;
76
+ width: 16px;
77
+ height: 16px;
78
+ border-radius: 50%;
79
+ background: white;
80
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
81
+ transition: transform 0.2s ease;
82
+ }
83
+
84
+ :host([checked]) .thumb {
85
+ transform: translateX(16px);
86
+ }
87
+
88
+ input {
89
+ position: absolute;
90
+ width: 1px;
91
+ height: 1px;
92
+ padding: 0;
93
+ margin: -1px;
94
+ overflow: hidden;
95
+ clip: rect(0, 0, 0, 0);
96
+ white-space: nowrap;
97
+ border: 0;
98
+ }
99
+
100
+ :host(:focus-within) .track {
101
+ outline: 2px solid var(--dark-color, #576273);
102
+ outline-offset: 2px;
103
+ }
104
+
105
+ .label {
106
+ line-height: 1.4;
107
+ }
108
+ `;
109
+ __decorate([
110
+ property({ type: Boolean, reflect: true })
111
+ ], EpCheckbox.prototype, "checked", void 0);
112
+ __decorate([
113
+ property({ type: Boolean, reflect: true })
114
+ ], EpCheckbox.prototype, "disabled", void 0);
115
+ __decorate([
116
+ property()
117
+ ], EpCheckbox.prototype, "label", void 0);
118
+ EpCheckbox = __decorate([
119
+ customElement('ep-checkbox')
120
+ ], EpCheckbox);
121
+ export { EpCheckbox };
122
+ //# sourceMappingURL=EpCheckbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpCheckbox.js","sourceRoot":"","sources":["../src/EpCheckbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGrD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAwEuC,YAAO,GAAG,KAAK,CAAC;QAChB,aAAQ,GAAG,KAAK,CAAC;QACjD,UAAK,GAAG,EAAE,CAAC;IAwBzB,CAAC;IAtBC,MAAM;QACJ,OAAO,IAAI,CAAA;mCACoB,IAAI,CAAC,OAAO;;;;yBAItB,IAAI,CAAC,OAAO;0BACX,IAAI,CAAC,QAAQ;wBACf,IAAI,CAAC,OAAO;2BACT,IAAI,CAAC,KAAK;QAC7B,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA,+BAA+B,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE;KAC5F,CAAC;IACJ,CAAC;IAEO,OAAO;QACb,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;QAC1B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,WAAW,EAAE;YAC9C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI;YAC7B,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;SAClC,CAAC,CAAC,CAAC;IACN,CAAC;;AAhGM,iBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqElB,AArEY,CAqEX;AAE0C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAiB;AAChB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAkB;AACjD;IAAX,QAAQ,EAAE;yCAAY;AA1EZ,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAkGtB"}
@@ -0,0 +1,16 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class EpColorPicker extends LitElement {
3
+ static styles: import("lit").CSSResult;
4
+ colors: string[];
5
+ value: string;
6
+ render(): import("lit").TemplateResult<1>;
7
+ private _renderSwatch;
8
+ private _selectColor;
9
+ private _handleKeydown;
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'ep-color-picker': EpColorPicker;
14
+ }
15
+ }
16
+ //# sourceMappingURL=EpColorPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EpColorPicker.d.ts","sourceRoot":"","sources":["../src/EpColorPicker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAkC5C,qBACa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,MAAM,0BA6DX;IAEyB,MAAM,EAAE,MAAM,EAAE,CAAkB;IACjD,KAAK,SAAM;IAEvB,MAAM;IAQN,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,cAAc;CAqCvB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}