@redvars/peacock 3.5.1 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseButton-DuASuVth.js → BaseButton-BNFAYn-S.js} +2 -2
- package/dist/{BaseButton-DuASuVth.js.map → BaseButton-BNFAYn-S.js.map} +1 -1
- package/dist/BaseInput-14YmcfK7.js +27 -0
- package/dist/BaseInput-14YmcfK7.js.map +1 -0
- package/dist/banner.js +2 -3
- package/dist/banner.js.map +1 -1
- package/dist/{button-DouvOfEU.js → button-colors-Ccys3hvS.js} +5 -294
- package/dist/button-colors-Ccys3hvS.js.map +1 -0
- package/dist/button-group.js +226 -6
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +294 -8
- package/dist/button.js.map +1 -1
- package/dist/calendar-column-view.js +634 -0
- package/dist/calendar-column-view.js.map +1 -0
- package/dist/calendar-event-BrQ_SEKD.js +199 -0
- package/dist/calendar-event-BrQ_SEKD.js.map +1 -0
- package/dist/calendar-month-view.js +376 -0
- package/dist/calendar-month-view.js.map +1 -0
- package/dist/calendar.js +339 -0
- package/dist/calendar.js.map +1 -0
- package/dist/canvas.js +361 -0
- package/dist/canvas.js.map +1 -0
- package/dist/cb-compound-expression.js +125 -0
- package/dist/cb-compound-expression.js.map +1 -0
- package/dist/cb-divider.js +150 -0
- package/dist/cb-divider.js.map +1 -0
- package/dist/cb-expression.js +75 -0
- package/dist/cb-expression.js.map +1 -0
- package/dist/cb-predicate.js +137 -0
- package/dist/cb-predicate.js.map +1 -0
- package/dist/code-editor.js +2 -1
- package/dist/code-editor.js.map +1 -1
- package/dist/condition-builder.js +58 -0
- package/dist/condition-builder.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +7976 -4294
- package/dist/custom-elements.json +14358 -7589
- package/dist/dropdown-button.js +216 -0
- package/dist/dropdown-button.js.map +1 -0
- package/dist/event-manager-D-QCmUgR.js +113 -0
- package/dist/event-manager-D-QCmUgR.js.map +1 -0
- package/dist/fab.js +1 -1
- package/dist/flow-designer-dZnLJOQT.js +1656 -0
- package/dist/flow-designer-dZnLJOQT.js.map +1 -0
- package/dist/flow-designer-node-XMe-jlKg.js +548 -0
- package/dist/flow-designer-node-XMe-jlKg.js.map +1 -0
- package/dist/flow-designer-node.js +4 -0
- package/dist/flow-designer-node.js.map +1 -0
- package/dist/flow-designer.js +16 -0
- package/dist/flow-designer.js.map +1 -0
- package/dist/html-editor.js +358 -0
- package/dist/html-editor.js.map +1 -0
- package/dist/icon-button-CK1ZuE-2.js +247 -0
- package/dist/icon-button-CK1ZuE-2.js.map +1 -0
- package/dist/index.js +29 -6
- package/dist/index.js.map +1 -1
- package/dist/{is-dark-mode-DicqGkCJ.js → is-dark-mode-DOcaw4Yq.js} +2 -27
- package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -0
- package/dist/modal.js +418 -0
- package/dist/modal.js.map +1 -0
- package/dist/{navigation-rail-Lxetd5-Z.js → navigation-rail-DyO0oAZU.js} +306 -2197
- package/dist/navigation-rail-DyO0oAZU.js.map +1 -0
- package/dist/notification-manager.js +268 -0
- package/dist/notification-manager.js.map +1 -0
- package/dist/peacock-loader.js +84 -8
- package/dist/peacock-loader.js.map +1 -1
- package/dist/popover-NC7b1lTq.js +1971 -0
- package/dist/popover-NC7b1lTq.js.map +1 -0
- package/dist/popover-content.js +125 -0
- package/dist/popover-content.js.map +1 -0
- package/dist/popover.js +4 -0
- package/dist/popover.js.map +1 -0
- package/dist/split-button.js +388 -0
- package/dist/split-button.js.map +1 -0
- package/dist/src/__controllers/floating-controller.d.ts +35 -0
- package/dist/src/calendar/base-event.d.ts +10 -0
- package/dist/src/calendar/calendar-column-view.d.ts +41 -0
- package/dist/src/calendar/calendar-event.d.ts +7 -0
- package/dist/src/calendar/calendar-month-view.d.ts +31 -0
- package/dist/src/calendar/calendar.d.ts +65 -0
- package/dist/src/calendar/event-manager.d.ts +17 -0
- package/dist/src/calendar/index.d.ts +4 -0
- package/dist/src/calendar/types.d.ts +13 -0
- package/dist/src/calendar/utils.d.ts +31 -0
- package/dist/src/canvas/canvas.d.ts +92 -0
- package/dist/src/canvas/index.d.ts +2 -0
- package/dist/src/condition-builder/cb-compound-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-divider.d.ts +26 -0
- package/dist/src/condition-builder/cb-expression.d.ts +31 -0
- package/dist/src/condition-builder/cb-predicate.d.ts +30 -0
- package/dist/src/condition-builder/condition-builder.d.ts +27 -0
- package/dist/src/condition-builder/index.d.ts +5 -0
- package/dist/src/dropdown-button/dropdown-button.d.ts +68 -0
- package/dist/src/dropdown-button/index.d.ts +1 -0
- package/dist/src/flow-designer/commands.d.ts +66 -0
- package/dist/src/flow-designer/flow-designer-node.d.ts +46 -0
- package/dist/src/flow-designer/flow-designer.d.ts +133 -0
- package/dist/src/flow-designer/index.d.ts +7 -0
- package/dist/src/flow-designer/layout.d.ts +30 -0
- package/dist/src/flow-designer/types.d.ts +142 -0
- package/dist/src/flow-designer/validation.d.ts +43 -0
- package/dist/src/flow-designer/workflow-utils.d.ts +40 -0
- package/dist/src/html-editor/html-editor.d.ts +56 -0
- package/dist/src/html-editor/index.d.ts +2 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/menu/menu/menu.d.ts +5 -7
- package/dist/src/menu/menu-item/menu-item.d.ts +14 -13
- package/dist/src/modal/index.d.ts +1 -0
- package/dist/src/modal/modal.d.ts +63 -0
- package/dist/src/notification-manager/index.d.ts +1 -0
- package/dist/src/notification-manager/notification-manager.d.ts +44 -0
- package/dist/src/popover/index.d.ts +2 -0
- package/dist/src/popover/popover-content.d.ts +29 -0
- package/dist/src/popover/popover.d.ts +62 -0
- package/dist/src/split-button/index.d.ts +1 -0
- package/dist/src/split-button/split-button.d.ts +72 -0
- package/dist/src/tooltip/tooltip.d.ts +2 -15
- package/dist/test/flow-designer.test.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/readme.md +2 -2
- package/src/__controllers/floating-controller.ts +237 -0
- package/src/banner/banner.scss +2 -3
- package/src/button/button/button.ts +1 -0
- package/src/calendar/base-event.ts +49 -0
- package/src/calendar/calendar-column-view.scss +326 -0
- package/src/calendar/calendar-column-view.ts +392 -0
- package/src/calendar/calendar-event.ts +20 -0
- package/src/calendar/calendar-month-view.scss +192 -0
- package/src/calendar/calendar-month-view.ts +244 -0
- package/src/calendar/calendar.scss +71 -0
- package/src/calendar/calendar.ts +298 -0
- package/src/calendar/event-manager.ts +117 -0
- package/src/calendar/index.ts +4 -0
- package/src/calendar/types.ts +14 -0
- package/src/calendar/utils.ts +180 -0
- package/src/canvas/canvas.scss +60 -0
- package/src/canvas/canvas.ts +391 -0
- package/src/canvas/index.ts +2 -0
- package/src/condition-builder/cb-compound-expression.scss +37 -0
- package/src/condition-builder/cb-compound-expression.ts +80 -0
- package/src/condition-builder/cb-divider.scss +93 -0
- package/src/condition-builder/cb-divider.ts +56 -0
- package/src/condition-builder/cb-expression.scss +14 -0
- package/src/condition-builder/cb-expression.ts +49 -0
- package/src/condition-builder/cb-predicate.scss +35 -0
- package/src/condition-builder/cb-predicate.ts +102 -0
- package/src/condition-builder/condition-builder.scss +13 -0
- package/src/condition-builder/condition-builder.ts +38 -0
- package/src/condition-builder/index.ts +5 -0
- package/src/dropdown-button/demo/index.html +110 -0
- package/src/dropdown-button/dropdown-button.scss +22 -0
- package/src/dropdown-button/dropdown-button.ts +206 -0
- package/src/dropdown-button/index.ts +1 -0
- package/src/flow-designer/DEMO.md +239 -0
- package/src/flow-designer/commands.ts +278 -0
- package/src/flow-designer/flow-designer-node.ts +172 -0
- package/src/flow-designer/flow-designer.scss +457 -0
- package/src/flow-designer/flow-designer.ts +611 -0
- package/src/flow-designer/index.ts +41 -0
- package/src/flow-designer/layout.ts +357 -0
- package/src/flow-designer/types.ts +166 -0
- package/src/flow-designer/validation.ts +284 -0
- package/src/flow-designer/workflow-utils.ts +282 -0
- package/src/html-editor/html-editor.scss +146 -0
- package/src/html-editor/html-editor.ts +276 -0
- package/src/html-editor/index.ts +3 -0
- package/src/index.ts +25 -0
- package/src/menu/menu/menu.scss +2 -2
- package/src/menu/menu/menu.ts +91 -101
- package/src/menu/menu-item/menu-item.scss +4 -0
- package/src/menu/menu-item/menu-item.ts +82 -78
- package/src/modal/index.ts +1 -0
- package/src/modal/modal.scss +206 -0
- package/src/modal/modal.ts +201 -0
- package/src/notification-manager/index.ts +1 -0
- package/src/notification-manager/notification-manager.scss +113 -0
- package/src/notification-manager/notification-manager.ts +199 -0
- package/src/peacock-loader.ts +71 -0
- package/src/popover/index.ts +2 -0
- package/src/popover/popover-content.scss +69 -0
- package/src/popover/popover-content.ts +51 -0
- package/src/popover/popover.scss +7 -0
- package/src/popover/popover.ts +170 -0
- package/src/split-button/index.ts +1 -0
- package/src/split-button/split-button-colors.scss +56 -0
- package/src/split-button/split-button-sizes.scss +28 -0
- package/src/split-button/split-button.scss +79 -0
- package/src/split-button/split-button.ts +236 -0
- package/src/table/table.ts +2 -2
- package/src/tooltip/tooltip.scss +4 -3
- package/src/tooltip/tooltip.ts +46 -104
- package/dist/button-DouvOfEU.js.map +0 -1
- package/dist/button-group-CEdMwvJJ.js +0 -464
- package/dist/button-group-CEdMwvJJ.js.map +0 -1
- package/dist/is-dark-mode-DicqGkCJ.js.map +0 -1
- package/dist/navigation-rail-Lxetd5-Z.js.map +0 -1
- package/dist/src/menu/menu/MenuSurfaceController.d.ts +0 -18
- package/src/menu/menu/MenuSurfaceController.ts +0 -61
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { a as i, _ as __decorate, I as IndividualComponent, b, A } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { r } from './state-DwbEjqVk.js';
|
|
4
|
+
import { e } from './query-QBcUV-L_.js';
|
|
5
|
+
import { e as e$1 } from './class-map-YU7g0o3B.js';
|
|
6
|
+
import { B as BaseInput } from './BaseInput-14YmcfK7.js';
|
|
7
|
+
import { r as redispatchEvent } from './dispatch-event-utils-CuEqjlPT.js';
|
|
8
|
+
import './directive-ZPhl09Yt.js';
|
|
9
|
+
|
|
10
|
+
var css_248z = i`* {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.screen-reader-only {
|
|
15
|
+
display: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.html-editor-field {
|
|
24
|
+
--field-height: auto;
|
|
25
|
+
--field-padding-block: 0;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.html-editor-toolbar {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: var(--spacing-025, 0.125rem);
|
|
34
|
+
padding: var(--spacing-050, 0.25rem) var(--spacing-100, 0.5rem);
|
|
35
|
+
background: var(--html-editor-toolbar-background, var(--color-surface-container, #f3edf7));
|
|
36
|
+
border-block-end: 1px solid var(--html-editor-toolbar-border-color, var(--color-outline-variant, #cac4d0));
|
|
37
|
+
border-start-start-radius: inherit;
|
|
38
|
+
border-start-end-radius: inherit;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.toolbar-btn {
|
|
42
|
+
display: inline-flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
width: 2rem;
|
|
46
|
+
height: 2rem;
|
|
47
|
+
padding: 0;
|
|
48
|
+
border: none;
|
|
49
|
+
border-radius: var(--shape-corner-extra-small, 0.25rem);
|
|
50
|
+
background: transparent;
|
|
51
|
+
color: var(--color-on-surface-variant, #49454f);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition: background 120ms ease, color 120ms ease;
|
|
54
|
+
}
|
|
55
|
+
.toolbar-btn:hover:not(:disabled) {
|
|
56
|
+
background: color-mix(in srgb, var(--color-on-surface-variant, #49454f) 8%, transparent);
|
|
57
|
+
}
|
|
58
|
+
.toolbar-btn:active:not(:disabled) {
|
|
59
|
+
background: color-mix(in srgb, var(--color-primary, #6750a4) 12%, transparent);
|
|
60
|
+
color: var(--color-primary, #6750a4);
|
|
61
|
+
}
|
|
62
|
+
.toolbar-btn:disabled {
|
|
63
|
+
opacity: 0.38;
|
|
64
|
+
cursor: not-allowed;
|
|
65
|
+
}
|
|
66
|
+
.toolbar-btn wc-icon {
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.toolbar-divider {
|
|
71
|
+
display: inline-block;
|
|
72
|
+
width: 1px;
|
|
73
|
+
height: 1.5rem;
|
|
74
|
+
background: var(--color-outline-variant, #cac4d0);
|
|
75
|
+
margin-inline: var(--spacing-025, 0.125rem);
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.html-editor-content {
|
|
80
|
+
min-height: var(--html-editor-min-height, 8rem);
|
|
81
|
+
padding: var(--spacing-200, 1rem) var(--spacing-150, 0.75rem);
|
|
82
|
+
outline: none;
|
|
83
|
+
color: var(--color-on-surface, #1c1b1f);
|
|
84
|
+
font-family: var(--typography-body-medium-font-family, inherit);
|
|
85
|
+
font-size: var(--typography-body-medium-font-size, 0.875rem);
|
|
86
|
+
line-height: var(--typography-body-medium-line-height, 1.5);
|
|
87
|
+
cursor: text;
|
|
88
|
+
word-break: break-word;
|
|
89
|
+
overflow-wrap: break-word;
|
|
90
|
+
}
|
|
91
|
+
.html-editor-content.is-empty::before {
|
|
92
|
+
content: attr(data-placeholder);
|
|
93
|
+
color: var(--color-on-surface-variant, #49454f);
|
|
94
|
+
opacity: 0.6;
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
position: absolute;
|
|
97
|
+
}
|
|
98
|
+
.html-editor-content ul,
|
|
99
|
+
.html-editor-content ol {
|
|
100
|
+
padding-inline-start: 1.5rem;
|
|
101
|
+
margin-block: 0.25rem;
|
|
102
|
+
}
|
|
103
|
+
.html-editor-content a {
|
|
104
|
+
color: var(--color-primary, #6750a4);
|
|
105
|
+
text-decoration: underline;
|
|
106
|
+
}
|
|
107
|
+
.html-editor-content strong,
|
|
108
|
+
.html-editor-content b {
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.read-only-tag {
|
|
113
|
+
margin: var(--spacing-050, 0.25rem);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([disabled]) .html-editor-content,
|
|
117
|
+
:host([readonly]) .html-editor-content {
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
opacity: 0.6;
|
|
120
|
+
}`;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @label HTML Editor
|
|
124
|
+
* @tag wc-html-editor
|
|
125
|
+
* @rawTag html-editor
|
|
126
|
+
*
|
|
127
|
+
* @summary A WYSIWYG HTML editor component with a Material 3 styled toolbar.
|
|
128
|
+
* @overview
|
|
129
|
+
* <p>The HTML Editor provides a rich-text editing experience using the browser's built-in
|
|
130
|
+
* <code>contenteditable</code> API. It wraps the editable area in a Material 3 styled
|
|
131
|
+
* <code>wc-field</code> and exposes a toolbar with common formatting actions.</p>
|
|
132
|
+
*
|
|
133
|
+
* <p>Get and set the HTML content via the <code>value</code> property. The component
|
|
134
|
+
* dispatches a <code>change</code> event whenever the content is modified.</p>
|
|
135
|
+
*
|
|
136
|
+
* @cssprop --html-editor-min-height - Minimum height of the editable area. Defaults to 8rem.
|
|
137
|
+
* @cssprop --html-editor-toolbar-background - Background color of the toolbar.
|
|
138
|
+
* @cssprop --html-editor-toolbar-border-color - Border color between toolbar and editing area.
|
|
139
|
+
*
|
|
140
|
+
* @fires {Event} change - Fired whenever the editable content changes.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```html
|
|
144
|
+
* <wc-html-editor label="Description" value="<p>Hello <strong>world</strong></p>"></wc-html-editor>
|
|
145
|
+
* ```
|
|
146
|
+
* @tags input editor
|
|
147
|
+
*/
|
|
148
|
+
let HtmlEditor = class HtmlEditor extends BaseInput {
|
|
149
|
+
constructor() {
|
|
150
|
+
super(...arguments);
|
|
151
|
+
/** Current HTML value of the editor. */
|
|
152
|
+
this.value = '';
|
|
153
|
+
/** Label displayed above the editor. */
|
|
154
|
+
this.label = '';
|
|
155
|
+
/** Placeholder text shown when the editor is empty. */
|
|
156
|
+
this.placeholder = 'Enter text\u2026';
|
|
157
|
+
/** Visual style of the wrapping field. */
|
|
158
|
+
this.variant = 'default';
|
|
159
|
+
/** Helper text displayed below the editor. */
|
|
160
|
+
this.helperText = '';
|
|
161
|
+
/** Whether to show an error state. */
|
|
162
|
+
this.error = false;
|
|
163
|
+
/** Error message text. */
|
|
164
|
+
this.errorText = '';
|
|
165
|
+
this._focused = false;
|
|
166
|
+
}
|
|
167
|
+
// ─── Lifecycle ─────────────────────────────────────────────────────────────
|
|
168
|
+
firstUpdated() {
|
|
169
|
+
if (this.value && this._editorEl) {
|
|
170
|
+
this._editorEl.innerHTML = this.value;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
updated(changed) {
|
|
174
|
+
if (changed.has('value') && this._editorEl) {
|
|
175
|
+
if (this._editorEl.innerHTML !== this.value) {
|
|
176
|
+
this._editorEl.innerHTML = this.value ?? '';
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (changed.has('disabled') || changed.has('readonly')) {
|
|
180
|
+
if (this._editorEl) {
|
|
181
|
+
this._editorEl.contentEditable =
|
|
182
|
+
this.disabled || this.readonly ? 'false' : 'true';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// ─── Private helpers ───────────────────────────────────────────────────────
|
|
187
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
188
|
+
_execCmd(command, value) {
|
|
189
|
+
if (this.disabled || this.readonly)
|
|
190
|
+
return;
|
|
191
|
+
this._editorEl.focus();
|
|
192
|
+
// execCommand is deprecated but remains broadly supported for rich-text editing
|
|
193
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
194
|
+
document.execCommand(command, false, value ?? null);
|
|
195
|
+
}
|
|
196
|
+
_handleInput() {
|
|
197
|
+
this.value = this._editorEl.innerHTML;
|
|
198
|
+
redispatchEvent(this, new Event('change', { bubbles: true, composed: true }));
|
|
199
|
+
}
|
|
200
|
+
_handleFocus() {
|
|
201
|
+
this._focused = true;
|
|
202
|
+
}
|
|
203
|
+
_handleBlur() {
|
|
204
|
+
this._focused = false;
|
|
205
|
+
}
|
|
206
|
+
_insertLink() {
|
|
207
|
+
// eslint-disable-next-line no-alert
|
|
208
|
+
const url = window.prompt('Enter URL:', 'https://');
|
|
209
|
+
if (url)
|
|
210
|
+
this._execCmd('createLink', url);
|
|
211
|
+
}
|
|
212
|
+
// ─── Toolbar button ────────────────────────────────────────────────────────
|
|
213
|
+
_toolbarButton(icon, title, command, value) {
|
|
214
|
+
return b `
|
|
215
|
+
<button
|
|
216
|
+
class="toolbar-btn"
|
|
217
|
+
title=${title}
|
|
218
|
+
aria-label=${title}
|
|
219
|
+
?disabled=${this.disabled || this.readonly}
|
|
220
|
+
@mousedown=${(e) => e.preventDefault()}
|
|
221
|
+
@click=${(e) => {
|
|
222
|
+
e.preventDefault();
|
|
223
|
+
this._execCmd(command, value);
|
|
224
|
+
}}
|
|
225
|
+
>
|
|
226
|
+
<wc-icon name=${icon} size="sm"></wc-icon>
|
|
227
|
+
</button>
|
|
228
|
+
`;
|
|
229
|
+
}
|
|
230
|
+
// ─── Toolbar ───────────────────────────────────────────────────────────────
|
|
231
|
+
_renderToolbar() {
|
|
232
|
+
return b `
|
|
233
|
+
<div
|
|
234
|
+
class="html-editor-toolbar"
|
|
235
|
+
role="toolbar"
|
|
236
|
+
aria-label="Formatting toolbar"
|
|
237
|
+
>
|
|
238
|
+
${this._toolbarButton('format_bold', 'Bold', 'bold')}
|
|
239
|
+
${this._toolbarButton('format_italic', 'Italic', 'italic')}
|
|
240
|
+
${this._toolbarButton('format_underlined', 'Underline', 'underline')}
|
|
241
|
+
${this._toolbarButton('format_strikethrough', 'Strikethrough', 'strikeThrough')}
|
|
242
|
+
|
|
243
|
+
<span class="toolbar-divider"></span>
|
|
244
|
+
|
|
245
|
+
${this._toolbarButton('format_align_left', 'Align left', 'justifyLeft')}
|
|
246
|
+
${this._toolbarButton('format_align_center', 'Align center', 'justifyCenter')}
|
|
247
|
+
${this._toolbarButton('format_align_right', 'Align right', 'justifyRight')}
|
|
248
|
+
|
|
249
|
+
<span class="toolbar-divider"></span>
|
|
250
|
+
|
|
251
|
+
${this._toolbarButton('format_list_bulleted', 'Unordered list', 'insertUnorderedList')}
|
|
252
|
+
${this._toolbarButton('format_list_numbered', 'Ordered list', 'insertOrderedList')}
|
|
253
|
+
|
|
254
|
+
<span class="toolbar-divider"></span>
|
|
255
|
+
|
|
256
|
+
${this._toolbarButton('format_indent_increase', 'Indent', 'indent')}
|
|
257
|
+
${this._toolbarButton('format_indent_decrease', 'Outdent', 'outdent')}
|
|
258
|
+
|
|
259
|
+
<span class="toolbar-divider"></span>
|
|
260
|
+
|
|
261
|
+
<button
|
|
262
|
+
class="toolbar-btn"
|
|
263
|
+
title="Insert link"
|
|
264
|
+
aria-label="Insert link"
|
|
265
|
+
?disabled=${this.disabled || this.readonly}
|
|
266
|
+
@mousedown=${(e) => e.preventDefault()}
|
|
267
|
+
@click=${() => this._insertLink()}
|
|
268
|
+
>
|
|
269
|
+
<wc-icon name="link" size="sm"></wc-icon>
|
|
270
|
+
</button>
|
|
271
|
+
|
|
272
|
+
<span class="toolbar-divider"></span>
|
|
273
|
+
|
|
274
|
+
${this._toolbarButton('undo', 'Undo', 'undo')}
|
|
275
|
+
${this._toolbarButton('redo', 'Redo', 'redo')}
|
|
276
|
+
</div>
|
|
277
|
+
`;
|
|
278
|
+
}
|
|
279
|
+
// ─── Render ────────────────────────────────────────────────────────────────
|
|
280
|
+
render() {
|
|
281
|
+
const isEmpty = !this.value || this.value === '<br>';
|
|
282
|
+
return b `
|
|
283
|
+
<wc-field
|
|
284
|
+
label=${this.label}
|
|
285
|
+
?required=${this.required}
|
|
286
|
+
?disabled=${this.disabled}
|
|
287
|
+
?readonly=${this.readonly}
|
|
288
|
+
?skeleton=${this.skeleton}
|
|
289
|
+
?focused=${this._focused}
|
|
290
|
+
?error=${this.error}
|
|
291
|
+
error-text=${this.errorText}
|
|
292
|
+
helper-text=${this.helperText}
|
|
293
|
+
variant=${this.variant}
|
|
294
|
+
?populated=${!isEmpty}
|
|
295
|
+
.host=${this}
|
|
296
|
+
class=${e$1({
|
|
297
|
+
'html-editor-field': true,
|
|
298
|
+
disabled: this.disabled,
|
|
299
|
+
readonly: this.readonly,
|
|
300
|
+
})}
|
|
301
|
+
>
|
|
302
|
+
${this._renderToolbar()}
|
|
303
|
+
|
|
304
|
+
<div
|
|
305
|
+
class=${e$1({
|
|
306
|
+
'html-editor-content': true,
|
|
307
|
+
'is-empty': isEmpty,
|
|
308
|
+
})}
|
|
309
|
+
contenteditable=${this.disabled || this.readonly ? 'false' : 'true'}
|
|
310
|
+
data-placeholder=${this.placeholder}
|
|
311
|
+
@input=${this._handleInput}
|
|
312
|
+
@focus=${this._handleFocus}
|
|
313
|
+
@blur=${this._handleBlur}
|
|
314
|
+
></div>
|
|
315
|
+
|
|
316
|
+
${this.disabled
|
|
317
|
+
? b `<wc-tag class="read-only-tag" color="red">Disabled</wc-tag>`
|
|
318
|
+
: this.readonly
|
|
319
|
+
? b `<wc-tag class="read-only-tag" color="red">Read Only</wc-tag>`
|
|
320
|
+
: A}
|
|
321
|
+
</wc-field>
|
|
322
|
+
`;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
HtmlEditor.styles = [css_248z];
|
|
326
|
+
__decorate([
|
|
327
|
+
n({ type: String })
|
|
328
|
+
], HtmlEditor.prototype, "value", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
n({ type: String })
|
|
331
|
+
], HtmlEditor.prototype, "label", void 0);
|
|
332
|
+
__decorate([
|
|
333
|
+
n({ type: String })
|
|
334
|
+
], HtmlEditor.prototype, "placeholder", void 0);
|
|
335
|
+
__decorate([
|
|
336
|
+
n({ type: String })
|
|
337
|
+
], HtmlEditor.prototype, "variant", void 0);
|
|
338
|
+
__decorate([
|
|
339
|
+
n({ type: String, attribute: 'helper-text' })
|
|
340
|
+
], HtmlEditor.prototype, "helperText", void 0);
|
|
341
|
+
__decorate([
|
|
342
|
+
n({ type: Boolean })
|
|
343
|
+
], HtmlEditor.prototype, "error", void 0);
|
|
344
|
+
__decorate([
|
|
345
|
+
n({ type: String, attribute: 'error-text' })
|
|
346
|
+
], HtmlEditor.prototype, "errorText", void 0);
|
|
347
|
+
__decorate([
|
|
348
|
+
r()
|
|
349
|
+
], HtmlEditor.prototype, "_focused", void 0);
|
|
350
|
+
__decorate([
|
|
351
|
+
e('.html-editor-content')
|
|
352
|
+
], HtmlEditor.prototype, "_editorEl", void 0);
|
|
353
|
+
HtmlEditor = __decorate([
|
|
354
|
+
IndividualComponent
|
|
355
|
+
], HtmlEditor);
|
|
356
|
+
|
|
357
|
+
export { HtmlEditor };
|
|
358
|
+
//# sourceMappingURL=html-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html-editor.js","sources":["../../src/html-editor/html-editor.ts"],"sourcesContent":["import { html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport BaseInput from '../input/BaseInput.js';\nimport { redispatchEvent } from '../__utils/dispatch-event-utils.js';\n\nimport styles from './html-editor.scss';\n\n/**\n * @label HTML Editor\n * @tag wc-html-editor\n * @rawTag html-editor\n *\n * @summary A WYSIWYG HTML editor component with a Material 3 styled toolbar.\n * @overview\n * <p>The HTML Editor provides a rich-text editing experience using the browser's built-in\n * <code>contenteditable</code> API. It wraps the editable area in a Material 3 styled\n * <code>wc-field</code> and exposes a toolbar with common formatting actions.</p>\n *\n * <p>Get and set the HTML content via the <code>value</code> property. The component\n * dispatches a <code>change</code> event whenever the content is modified.</p>\n *\n * @cssprop --html-editor-min-height - Minimum height of the editable area. Defaults to 8rem.\n * @cssprop --html-editor-toolbar-background - Background color of the toolbar.\n * @cssprop --html-editor-toolbar-border-color - Border color between toolbar and editing area.\n *\n * @fires {Event} change - Fired whenever the editable content changes.\n *\n * @example\n * ```html\n * <wc-html-editor label=\"Description\" value=\"<p>Hello <strong>world</strong></p>\"></wc-html-editor>\n * ```\n * @tags input editor\n */\n@IndividualComponent\nexport class HtmlEditor extends BaseInput {\n static styles = [styles];\n\n /** Current HTML value of the editor. */\n @property({ type: String })\n value = '';\n\n /** Label displayed above the editor. */\n @property({ type: String })\n label = '';\n\n /** Placeholder text shown when the editor is empty. */\n @property({ type: String })\n placeholder = 'Enter text\\u2026';\n\n /** Visual style of the wrapping field. */\n @property({ type: String })\n variant: 'filled' | 'outlined' | 'default' = 'default';\n\n /** Helper text displayed below the editor. */\n @property({ type: String, attribute: 'helper-text' })\n helperText = '';\n\n /** Whether to show an error state. */\n @property({ type: Boolean })\n error = false;\n\n /** Error message text. */\n @property({ type: String, attribute: 'error-text' })\n errorText = '';\n\n @state() private _focused = false;\n\n @query('.html-editor-content')\n private _editorEl!: HTMLDivElement;\n\n // ─── Lifecycle ─────────────────────────────────────────────────────────────\n\n protected firstUpdated() {\n if (this.value && this._editorEl) {\n this._editorEl.innerHTML = this.value;\n }\n }\n\n protected updated(changed: Map<string, unknown>) {\n if (changed.has('value') && this._editorEl) {\n if (this._editorEl.innerHTML !== this.value) {\n this._editorEl.innerHTML = this.value ?? '';\n }\n }\n if (changed.has('disabled') || changed.has('readonly')) {\n if (this._editorEl) {\n this._editorEl.contentEditable =\n this.disabled || this.readonly ? 'false' : 'true';\n }\n }\n }\n\n // ─── Private helpers ───────────────────────────────────────────────────────\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _execCmd(command: string, value?: string) {\n if (this.disabled || this.readonly) return;\n this._editorEl.focus();\n // execCommand is deprecated but remains broadly supported for rich-text editing\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (document as any).execCommand(command, false, value ?? null);\n }\n\n private _handleInput() {\n this.value = this._editorEl.innerHTML;\n redispatchEvent(\n this,\n new Event('change', { bubbles: true, composed: true }),\n );\n }\n\n private _handleFocus() {\n this._focused = true;\n }\n\n private _handleBlur() {\n this._focused = false;\n }\n\n private _insertLink() {\n // eslint-disable-next-line no-alert\n const url = window.prompt('Enter URL:', 'https://');\n if (url) this._execCmd('createLink', url);\n }\n\n // ─── Toolbar button ────────────────────────────────────────────────────────\n\n private _toolbarButton(\n icon: string,\n title: string,\n command: string,\n value?: string,\n ) {\n return html`\n <button\n class=\"toolbar-btn\"\n title=${title}\n aria-label=${title}\n ?disabled=${this.disabled || this.readonly}\n @mousedown=${(e: Event) => e.preventDefault()}\n @click=${(e: Event) => {\n e.preventDefault();\n this._execCmd(command, value);\n }}\n >\n <wc-icon name=${icon} size=\"sm\"></wc-icon>\n </button>\n `;\n }\n\n // ─── Toolbar ───────────────────────────────────────────────────────────────\n\n private _renderToolbar() {\n return html`\n <div\n class=\"html-editor-toolbar\"\n role=\"toolbar\"\n aria-label=\"Formatting toolbar\"\n >\n ${this._toolbarButton('format_bold', 'Bold', 'bold')}\n ${this._toolbarButton('format_italic', 'Italic', 'italic')}\n ${this._toolbarButton('format_underlined', 'Underline', 'underline')}\n ${this._toolbarButton(\n 'format_strikethrough',\n 'Strikethrough',\n 'strikeThrough',\n )}\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton('format_align_left', 'Align left', 'justifyLeft')}\n ${this._toolbarButton(\n 'format_align_center',\n 'Align center',\n 'justifyCenter',\n )}\n ${this._toolbarButton(\n 'format_align_right',\n 'Align right',\n 'justifyRight',\n )}\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton(\n 'format_list_bulleted',\n 'Unordered list',\n 'insertUnorderedList',\n )}\n ${this._toolbarButton(\n 'format_list_numbered',\n 'Ordered list',\n 'insertOrderedList',\n )}\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton(\n 'format_indent_increase',\n 'Indent',\n 'indent',\n )}\n ${this._toolbarButton('format_indent_decrease', 'Outdent', 'outdent')}\n\n <span class=\"toolbar-divider\"></span>\n\n <button\n class=\"toolbar-btn\"\n title=\"Insert link\"\n aria-label=\"Insert link\"\n ?disabled=${this.disabled || this.readonly}\n @mousedown=${(e: Event) => e.preventDefault()}\n @click=${() => this._insertLink()}\n >\n <wc-icon name=\"link\" size=\"sm\"></wc-icon>\n </button>\n\n <span class=\"toolbar-divider\"></span>\n\n ${this._toolbarButton('undo', 'Undo', 'undo')}\n ${this._toolbarButton('redo', 'Redo', 'redo')}\n </div>\n `;\n }\n\n // ─── Render ────────────────────────────────────────────────────────────────\n\n render() {\n const isEmpty = !this.value || this.value === '<br>';\n\n return html`\n <wc-field\n label=${this.label}\n ?required=${this.required}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?skeleton=${this.skeleton}\n ?focused=${this._focused}\n ?error=${this.error}\n error-text=${this.errorText}\n helper-text=${this.helperText}\n variant=${this.variant}\n ?populated=${!isEmpty}\n .host=${this}\n class=${classMap({\n 'html-editor-field': true,\n disabled: this.disabled,\n readonly: this.readonly,\n })}\n >\n ${this._renderToolbar()}\n\n <div\n class=${classMap({\n 'html-editor-content': true,\n 'is-empty': isEmpty,\n })}\n contenteditable=${this.disabled || this.readonly ? 'false' : 'true'}\n data-placeholder=${this.placeholder}\n @input=${this._handleInput}\n @focus=${this._handleFocus}\n @blur=${this._handleBlur}\n ></div>\n\n ${this.disabled\n ? html`<wc-tag class=\"read-only-tag\" color=\"red\">Disabled</wc-tag>`\n : this.readonly\n ? html`<wc-tag class=\"read-only-tag\" color=\"red\">Read Only</wc-tag>`\n : nothing}\n </wc-field>\n `;\n }\n}\n"],"names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AA,UAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAlCxB,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CA8OtB;;;;"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { a as i, _ as __decorate, b } from './IndividualComponent-DUINtMGK.js';
|
|
2
|
+
import { n } from './property-1psGvXOq.js';
|
|
3
|
+
import { e } from './class-map-YU7g0o3B.js';
|
|
4
|
+
import { B as BaseButton, o, s as spread } from './BaseButton-BNFAYn-S.js';
|
|
5
|
+
import { c as css_248z$1, a as css_248z$2 } from './button-colors-Ccys3hvS.js';
|
|
6
|
+
import { t as throttle } from './BaseHyperlinkMixin-BNuwbiEf.js';
|
|
7
|
+
|
|
8
|
+
var css_248z = i`.button {
|
|
9
|
+
--_container-padding: 0.75rem;
|
|
10
|
+
width: var(--button-height);
|
|
11
|
+
--_container-padding: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host([size=xs]),
|
|
15
|
+
:host([size=extra-small]) {
|
|
16
|
+
--button-height: 2rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([size=xs]) .button,
|
|
20
|
+
:host([size=extra-small]) .button {
|
|
21
|
+
--_button-icon-size: 1rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([size=sm]),
|
|
25
|
+
:host([size=small]) {
|
|
26
|
+
--button-height: 2.5rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host([size=sm]) .button,
|
|
30
|
+
:host([size=small]) .button {
|
|
31
|
+
--_button-icon-size: 1.25rem;
|
|
32
|
+
--_button-icon-label-spacing: 0.5rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([size=md]),
|
|
36
|
+
:host([size=medium]) {
|
|
37
|
+
--button-height: 3.5rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host([size=md]) .button,
|
|
41
|
+
:host([size=medium]) .button {
|
|
42
|
+
--_button-icon-size: 1.5rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([size=lg]),
|
|
46
|
+
:host([size=large]) {
|
|
47
|
+
--button-height: 6rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([size=lg]) .button,
|
|
51
|
+
:host([size=large]) .button {
|
|
52
|
+
--_button-icon-size: 2rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([size=xl]) {
|
|
56
|
+
--button-height: 8.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([size=xl]) .button {
|
|
60
|
+
--_button-icon-size: 2.5rem;
|
|
61
|
+
}`;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @label Icon Button
|
|
65
|
+
* @tag wc-icon-button
|
|
66
|
+
* @rawTag icon-button
|
|
67
|
+
*
|
|
68
|
+
* @summary Icon buttons allow users to take actions, and make choices, with a single tap.
|
|
69
|
+
*
|
|
70
|
+
* @overview
|
|
71
|
+
* <p>Icon buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. IconButton labels express what action will occur when the user interacts with it.</p>
|
|
72
|
+
*
|
|
73
|
+
* @cssprop --button-container-shape: Defines the border radius of the button container shape.
|
|
74
|
+
*
|
|
75
|
+
* @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.
|
|
76
|
+
* @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.
|
|
77
|
+
* @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.
|
|
78
|
+
* @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.
|
|
79
|
+
*
|
|
80
|
+
*
|
|
81
|
+
* @cssprop --filled-button-container-color: Color of the filled button container.
|
|
82
|
+
* @cssprop --filled-button-label-text-color: Text color of the filled button label.
|
|
83
|
+
*
|
|
84
|
+
* @cssprop --outlined-button-container-color: Color of the outlined button container.
|
|
85
|
+
* @cssprop --outlined-button-label-text-color: Text color of the outlined button label.
|
|
86
|
+
*
|
|
87
|
+
* @cssprop --text-button-label-text-color: Text color of the text button label.
|
|
88
|
+
*
|
|
89
|
+
* @cssprop --tonal-button-container-color: Color of the tonal button container.
|
|
90
|
+
* @cssprop --tonal-button-label-text-color: Text color of the tonal button label.
|
|
91
|
+
*
|
|
92
|
+
* @cssprop --elevated-button-container-color: Color of the elevated button container.
|
|
93
|
+
* @cssprop --elevated-button-label-text-color: Text color of the elevated button label.
|
|
94
|
+
*
|
|
95
|
+
* @cssprop --neo-button-container-color: Color of the neo button container.
|
|
96
|
+
* @cssprop --neo-button-label-text-color: Text color of the neo button label.
|
|
97
|
+
*
|
|
98
|
+
* @fires {CustomEvent} button:click - Dispatched when the button is clicked.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```html
|
|
102
|
+
* <wc-icon-button><wc-icon name="home"></wc-icon></wc-icon-button>
|
|
103
|
+
* ```
|
|
104
|
+
* @tags display
|
|
105
|
+
*/
|
|
106
|
+
class IconButton extends BaseButton {
|
|
107
|
+
constructor() {
|
|
108
|
+
super(...arguments);
|
|
109
|
+
/**
|
|
110
|
+
* Button size.
|
|
111
|
+
* Possible values are `"xs"`, `"sm"`, `"md"`, `"lg"`, `"xl"`. Defaults to `"sm"`.
|
|
112
|
+
*/
|
|
113
|
+
this.size = 'sm';
|
|
114
|
+
/**
|
|
115
|
+
* The visual style of the button.
|
|
116
|
+
*
|
|
117
|
+
* Possible variant values:
|
|
118
|
+
* `"filled"` is a filled button.
|
|
119
|
+
* `"outlined"` is an outlined button.
|
|
120
|
+
* `"text"` is a transparent button.
|
|
121
|
+
* `"tonal"` is a light color button.
|
|
122
|
+
* `"elevated"` is elevated button
|
|
123
|
+
*/
|
|
124
|
+
this.variant = 'filled';
|
|
125
|
+
/**
|
|
126
|
+
* Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
|
|
127
|
+
*/
|
|
128
|
+
this.color = 'primary';
|
|
129
|
+
}
|
|
130
|
+
focus() {
|
|
131
|
+
this.buttonElement?.focus();
|
|
132
|
+
}
|
|
133
|
+
blur() {
|
|
134
|
+
this.buttonElement?.blur();
|
|
135
|
+
}
|
|
136
|
+
firstUpdated() {
|
|
137
|
+
this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
|
|
138
|
+
this.__convertTypeToVariantAndColor();
|
|
139
|
+
}
|
|
140
|
+
__convertTypeToVariantAndColor() {
|
|
141
|
+
if (this.type === 'primary') {
|
|
142
|
+
this.color = 'primary';
|
|
143
|
+
this.variant = 'filled';
|
|
144
|
+
}
|
|
145
|
+
else if (this.type === 'secondary') {
|
|
146
|
+
this.color = 'surface';
|
|
147
|
+
this.variant = 'filled';
|
|
148
|
+
}
|
|
149
|
+
else if (this.type === 'tertiary') {
|
|
150
|
+
this.color = 'primary';
|
|
151
|
+
this.variant = 'text';
|
|
152
|
+
}
|
|
153
|
+
else if (this.type === 'danger') {
|
|
154
|
+
this.color = 'danger';
|
|
155
|
+
this.variant = 'filled';
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
render() {
|
|
159
|
+
const isLink = this.__isLink();
|
|
160
|
+
const cssClasses = {
|
|
161
|
+
button: true,
|
|
162
|
+
'button-element': true,
|
|
163
|
+
[`size-${this.size}`]: true,
|
|
164
|
+
[`variant-${this.variant}`]: true,
|
|
165
|
+
[`color-${this.color}`]: true,
|
|
166
|
+
disabled: this.disabled || this.softDisabled,
|
|
167
|
+
pressed: this.isPressed,
|
|
168
|
+
skeleton: this.skeleton,
|
|
169
|
+
};
|
|
170
|
+
if (!isLink) {
|
|
171
|
+
return b `<button
|
|
172
|
+
class=${e(cssClasses)}
|
|
173
|
+
id="button"
|
|
174
|
+
type=${this.htmlType}
|
|
175
|
+
@click=${this.__dispatchClickWithThrottle}
|
|
176
|
+
@mousedown=${this.__handlePress}
|
|
177
|
+
@keydown=${this.__handlePress}
|
|
178
|
+
@keyup=${this.__handlePress}
|
|
179
|
+
|
|
180
|
+
aria-describedby=${o(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
|
|
181
|
+
?aria-disabled=${this.softDisabled}
|
|
182
|
+
|
|
183
|
+
?disabled=${this.disabled}
|
|
184
|
+
${spread(this.configAria)}
|
|
185
|
+
>
|
|
186
|
+
${this.renderButtonContent()}
|
|
187
|
+
</button>
|
|
188
|
+
${this.__renderTooltip()}`;
|
|
189
|
+
}
|
|
190
|
+
return b `<a
|
|
191
|
+
class=${e(cssClasses)}
|
|
192
|
+
id="button"
|
|
193
|
+
href=${this.href}
|
|
194
|
+
target=${this.target}
|
|
195
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
|
196
|
+
@click=${this.__dispatchClick}
|
|
197
|
+
@mousedown=${this.__handlePress}
|
|
198
|
+
@keydown=${this.__handlePress}
|
|
199
|
+
@keyup=${this.__handlePress}
|
|
200
|
+
role="button"
|
|
201
|
+
|
|
202
|
+
aria-describedby=${o(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
|
|
203
|
+
?aria-disabled=${this.softDisabled}
|
|
204
|
+
|
|
205
|
+
${spread(this.configAria)}
|
|
206
|
+
>
|
|
207
|
+
${this.renderButtonContent()}
|
|
208
|
+
</a>
|
|
209
|
+
${this.__renderTooltip()}`;
|
|
210
|
+
}
|
|
211
|
+
renderButtonContent() {
|
|
212
|
+
return b `
|
|
213
|
+
<wc-focus-ring class="focus-ring" for='button'></wc-focus-ring>
|
|
214
|
+
<wc-elevation class="elevation"></wc-elevation>
|
|
215
|
+
<div class="neo-background"></div>
|
|
216
|
+
<div class="background"></div>
|
|
217
|
+
<div class="outline"></div>
|
|
218
|
+
<wc-ripple class="ripple"></wc-ripple>
|
|
219
|
+
<wc-skeleton class="skeleton"></wc-skeleton>
|
|
220
|
+
|
|
221
|
+
<div class="button-content">
|
|
222
|
+
<slot></slot>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
${this.__renderDisabledReason(this.softDisabled)}
|
|
226
|
+
`;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
IconButton.styles = [css_248z$1, css_248z$2, css_248z];
|
|
230
|
+
__decorate([
|
|
231
|
+
n({ reflect: true })
|
|
232
|
+
], IconButton.prototype, "size", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
n({ type: String })
|
|
235
|
+
], IconButton.prototype, "type", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
n()
|
|
238
|
+
], IconButton.prototype, "variant", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
n({ reflect: true })
|
|
241
|
+
], IconButton.prototype, "color", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
n({ reflect: true })
|
|
244
|
+
], IconButton.prototype, "configAria", void 0);
|
|
245
|
+
|
|
246
|
+
export { IconButton as I };
|
|
247
|
+
//# sourceMappingURL=icon-button-CK1ZuE-2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-button-CK1ZuE-2.js","sources":["../../src/button/icon-button/icon-button.ts"],"sourcesContent":["import { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport styles from '../button/button.scss';\nimport colorStyles from '../button/button-colors.scss';\nimport sizeStyles from './icon-button-sizes.scss';\nimport { spread } from '@/__directive/spread.js';\nimport { throttle } from '@/__utils/throttle.js';\nimport { BaseButton } from '../BaseButton.js';\n\n/**\n * @label Icon Button\n * @tag wc-icon-button\n * @rawTag icon-button\n *\n * @summary Icon buttons allow users to take actions, and make choices, with a single tap.\n *\n * @overview\n * <p>Icon buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. IconButton labels express what action will occur when the user interacts with it.</p>\n *\n * @cssprop --button-container-shape: Defines the border radius of the button container shape.\n *\n * @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.\n * @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.\n *\n *\n * @cssprop --filled-button-container-color: Color of the filled button container.\n * @cssprop --filled-button-label-text-color: Text color of the filled button label.\n *\n * @cssprop --outlined-button-container-color: Color of the outlined button container.\n * @cssprop --outlined-button-label-text-color: Text color of the outlined button label.\n *\n * @cssprop --text-button-label-text-color: Text color of the text button label.\n *\n * @cssprop --tonal-button-container-color: Color of the tonal button container.\n * @cssprop --tonal-button-label-text-color: Text color of the tonal button label.\n *\n * @cssprop --elevated-button-container-color: Color of the elevated button container.\n * @cssprop --elevated-button-label-text-color: Text color of the elevated button label.\n *\n * @cssprop --neo-button-container-color: Color of the neo button container.\n * @cssprop --neo-button-label-text-color: Text color of the neo button label.\n *\n * @fires {CustomEvent} button:click - Dispatched when the button is clicked.\n *\n * @example\n * ```html\n * <wc-icon-button><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * ```\n * @tags display\n */\nexport class IconButton extends BaseButton {\n static override styles = [styles, colorStyles, sizeStyles];\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n\n /**\n * Type is preset of color and variant. Type will be only applied.\n *\n */\n @property({ type: String }) type?: 'primary' | 'secondary' | 'tertiary';\n \n /**\n * The visual style of the button.\n *\n * Possible variant values:\n * `\"filled\"` is a filled button.\n * `\"outlined\"` is an outlined button.\n * `\"text\"` is a transparent button.\n * `\"tonal\"` is a light color button.\n * `\"elevated\"` is elevated button\n */\n @property() variant:\n | 'elevated'\n | 'filled'\n | 'tonal'\n | 'outlined'\n | 'text'\n | 'neo' = 'filled';\n \n /**\n * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.\n */\n @property({ reflect: true }) color:\n | 'primary'\n | 'success'\n | 'danger'\n | 'warning'\n | 'surface'\n | 'on-surface' = 'primary';\n\n /**\n * Additional ARIA attributes to pass to the inner button/anchor element.\n */\n @property({ reflect: true })\n configAria?: { [key: string]: any };\n\n override focus() {\n this.buttonElement?.focus();\n }\n\n override blur() {\n this.buttonElement?.blur();\n }\n \n override firstUpdated() {\n this.__dispatchClickWithThrottle = throttle(\n this.__dispatchClick,\n this.throttleDelay,\n );\n this.__convertTypeToVariantAndColor();\n }\n\n __convertTypeToVariantAndColor() {\n if (this.type === 'primary') {\n this.color = 'primary';\n this.variant = 'filled';\n } else if (this.type === 'secondary') {\n this.color = 'surface';\n this.variant = 'filled';\n } else if (this.type === 'tertiary') {\n this.color = 'primary';\n this.variant = 'text';\n } else if (this.type === 'danger') {\n this.color = 'danger';\n this.variant = 'filled';\n }\n }\n\n override render() {\n const isLink = this.__isLink();\n\n const cssClasses = {\n button: true,\n 'button-element': true,\n [`size-${this.size}`]: true,\n [`variant-${this.variant}`]: true,\n [`color-${this.color}`]: true,\n disabled: this.disabled || this.softDisabled,\n pressed: this.isPressed,\n skeleton: this.skeleton,\n };\n\n if (!isLink) {\n return html`<button\n class=${classMap(cssClasses)}\n id=\"button\"\n type=${this.htmlType}\n @click=${this.__dispatchClickWithThrottle}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n \n aria-describedby=${ifDefined(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}\n ?aria-disabled=${this.softDisabled}\n\n ?disabled=${this.disabled}\n ${spread(this.configAria)}\n >\n ${this.renderButtonContent()}\n </button>\n ${this.__renderTooltip()}`;\n }\n return html`<a\n class=${classMap(cssClasses)}\n id=\"button\"\n href=${this.href}\n target=${this.target}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.__dispatchClick}\n @mousedown=${this.__handlePress}\n @keydown=${this.__handlePress}\n @keyup=${this.__handlePress}\n role=\"button\"\n \n aria-describedby=${ifDefined(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}\n ?aria-disabled=${this.softDisabled}\n\n ${spread(this.configAria)}\n >\n ${this.renderButtonContent()}\n </a>\n ${this.__renderTooltip()}`;\n }\n\n renderButtonContent() {\n return html`\n <wc-focus-ring class=\"focus-ring\" for='button'></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n <div class=\"neo-background\"></div>\n <div class=\"background\"></div>\n <div class=\"outline\"></div>\n <wc-ripple class=\"ripple\"></wc-ripple>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n <div class=\"button-content\">\n <slot></slot>\n </div>\n\n ${this.__renderDisabledReason(this.softDisabled)}\n `;\n }\n}\n"],"names":["html","classMap","ifDefined","styles","colorStyles","sizeStyles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CG;AACG,MAAO,UAAW,SAAQ,UAAU,CAAA;AAA1C,IAAA,WAAA,GAAA;;AAGE;;;AAGG;QAC0B,IAAA,CAAA,IAAI,GAAqC,IAAI;AAQxE;;;;;;;;;AASG;QACS,IAAA,CAAA,OAAO,GAMP,QAAQ;AAEpB;;AAEG;QAC0B,IAAA,CAAA,KAAK,GAMf,SAAS;IAiHhC;IAzGW,KAAK,GAAA;AACZ,QAAA,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE;IAC7B;IAES,IAAI,GAAA;AACX,QAAA,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE;IAC5B;IAES,YAAY,GAAA;AACnB,QAAA,IAAI,CAAC,2BAA2B,GAAG,QAAQ,CACzC,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,aAAa,CACnB;QACD,IAAI,CAAC,8BAA8B,EAAE;IACvC;IAEA,8BAA8B,GAAA;AAC5B,QAAA,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;AAC3B,YAAA,IAAI,CAAC,KAAK,GAAG,SAAS;AACtB,YAAA,IAAI,CAAC,OAAO,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