@gilav21/shadcn-angular-rte 0.2.3 → 0.2.4
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/fesm2022/{gilav21-shadcn-angular-rte-docx-parser-D_wFX3FP.mjs → gilav21-shadcn-angular-rte-docx-parser-Yd5YQqOL.mjs} +2 -2
- package/fesm2022/{gilav21-shadcn-angular-rte-docx-parser-D_wFX3FP.mjs.map → gilav21-shadcn-angular-rte-docx-parser-Yd5YQqOL.mjs.map} +1 -1
- package/fesm2022/{gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-CHDlfOxW.mjs → gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-ATpviG2l.mjs} +367 -138
- package/fesm2022/gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-ATpviG2l.mjs.map +1 -0
- package/fesm2022/gilav21-shadcn-angular-rte.mjs +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
- package/types/gilav21-shadcn-angular-rte.d.ts +40 -3
- package/types/gilav21-shadcn-angular-rte.d.ts.map +1 -1
- package/fesm2022/gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-CHDlfOxW.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { isDevMode, inject, Injectable, input, computed, ChangeDetectionStrategy, Component, signal, ElementRef, DestroyRef, output, Injector, InjectionToken, effect, untracked, forwardRef, ViewChild, Directive, model, afterNextRender, afterRenderEffect, Renderer2, viewChild, contentChild, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewContainerRef, TemplateRef, PLATFORM_ID, NgZone, ViewChildren, Pipe } from '@angular/core';
|
|
2
|
+
import { isDevMode, inject, Injectable, input, computed, ChangeDetectionStrategy, Component, signal, ElementRef, DestroyRef, output, Injector, InjectionToken, effect, untracked, forwardRef, ViewChild, Directive, model, afterNextRender, afterRenderEffect, Renderer2, viewChild, contentChild, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewContainerRef, ChangeDetectorRef, TemplateRef, PLATFORM_ID, NgZone, ViewChildren, Pipe } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import { DOCUMENT, NgComponentOutlet, NgTemplateOutlet, isPlatformBrowser, DatePipe } from '@angular/common';
|
|
@@ -2194,7 +2194,7 @@ class RichTextSanitizerService {
|
|
|
2194
2194
|
'li': new Set(['data-task', 'data-checked']),
|
|
2195
2195
|
'details': new Set(['open']),
|
|
2196
2196
|
'col': new Set(['span', 'width']),
|
|
2197
|
-
'*': new Set(['data-mention', 'data-mention-id', 'data-tag', 'data-tag-id', 'style', 'dir']),
|
|
2197
|
+
'*': new Set(['data-mention', 'data-mention-id', 'data-tag', 'data-tag-id', 'data-entity-mode', 'style', 'dir']),
|
|
2198
2198
|
};
|
|
2199
2199
|
/** Allowed CSS properties for inline styles */
|
|
2200
2200
|
this.ALLOWED_STYLE_PROPERTIES = new Set([
|
|
@@ -7434,6 +7434,11 @@ function restoreParked(html, open, close, store, map = (s) => s) {
|
|
|
7434
7434
|
}
|
|
7435
7435
|
|
|
7436
7436
|
/** Word's namespaced wrapper elements, unwrapped so the text they hold stays. */
|
|
7437
|
+
/** A Map, not an object: the key is the pasted size attribute, and an object would resolve names like constructor through its prototype. */
|
|
7438
|
+
const FONT_SIZE_PX = new Map([
|
|
7439
|
+
['1', '10px'], ['2', '13px'], ['3', '16px'], ['4', '18px'],
|
|
7440
|
+
['5', '24px'], ['6', '32px'], ['7', '48px'],
|
|
7441
|
+
]);
|
|
7437
7442
|
const WORD_WRAPPER_TAGS = new Set(['o:p', 'w:sdtcontent', 'w:sdt', 'w:sdtpr', 'w:sdtendpr', 'o:oleobject']);
|
|
7438
7443
|
/**
|
|
7439
7444
|
* Normalizes pasted content from various sources (Word, Outlook, Google Docs, etc.)
|
|
@@ -8153,11 +8158,7 @@ class RichTextPasteNormalizerService {
|
|
|
8153
8158
|
styles.push(`font-family: ${face}`);
|
|
8154
8159
|
const size = font.getAttribute('size');
|
|
8155
8160
|
if (size) {
|
|
8156
|
-
const
|
|
8157
|
-
'1': '10px', '2': '13px', '3': '16px', '4': '18px',
|
|
8158
|
-
'5': '24px', '6': '32px', '7': '48px',
|
|
8159
|
-
};
|
|
8160
|
-
const mapped = sizeMap[size];
|
|
8161
|
+
const mapped = FONT_SIZE_PX.get(size);
|
|
8161
8162
|
if (mapped)
|
|
8162
8163
|
styles.push(`font-size: ${mapped}`);
|
|
8163
8164
|
}
|
|
@@ -9325,7 +9326,7 @@ const RICH_TEXT_LOCALES = {
|
|
|
9325
9326
|
characters: '{count} символов',
|
|
9326
9327
|
words: '{count} слов',
|
|
9327
9328
|
formattingOptions: 'Параметры форматирования',
|
|
9328
|
-
blockedImage: 'Изображение
|
|
9329
|
+
blockedImage: 'Изображение заблокировано политикой безопасности',
|
|
9329
9330
|
},
|
|
9330
9331
|
},
|
|
9331
9332
|
pt: {
|
|
@@ -11362,6 +11363,13 @@ const RICH_TEXT_PROSE_CLASSES = [
|
|
|
11362
11363
|
'[&_details]:border [&_details]:border-border [&_details]:rounded-md [&_details]:my-2 [&_details]:overflow-hidden',
|
|
11363
11364
|
'[&_summary]:bg-muted/40 [&_summary]:px-3 [&_summary]:py-2 [&_summary]:cursor-pointer [&_summary]:font-medium',
|
|
11364
11365
|
'[&_details>:not(summary)]:px-3 [&_details>:not(summary)]:py-2',
|
|
11366
|
+
// Mention and tag chips are styled by the data attributes the sanitizer
|
|
11367
|
+
// keeps, not by a class: `class` never survives a sanitizing round trip
|
|
11368
|
+
// (setContent, paste, saved HTML), so a class-only chip lost its look.
|
|
11369
|
+
// The rule applies only to a chip with no `class` of its own (a live chip
|
|
11370
|
+
// carries its classes, so a consumer className or a link/text mode keeps its
|
|
11371
|
+
// look) and no `data-entity-mode` (how text/link modes survive the strip).
|
|
11372
|
+
'[&_:where(span,a):where([data-mention],[data-tag]):not([class],[data-entity-mode])]:bg-accent [&_:where(span,a):where([data-mention],[data-tag]):not([class],[data-entity-mode])]:text-accent-foreground [&_:where(span,a):where([data-mention],[data-tag]):not([class],[data-entity-mode])]:rounded [&_:where(span,a):where([data-mention],[data-tag]):not([class],[data-entity-mode])]:px-1',
|
|
11365
11373
|
'[&_hr]:border-t [&_hr]:border-border [&_hr]:my-4',
|
|
11366
11374
|
'[&_blockquote]:border-s-4 [&_blockquote]:border-border [&_blockquote]:ps-4 [&_blockquote]:py-1 [&_blockquote]:my-2 [&_blockquote]:text-muted-foreground [&_blockquote]:italic',
|
|
11367
11375
|
// Syntax highlighting. The classes are the ones the sanitizer has always
|
|
@@ -12227,6 +12235,8 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
12227
12235
|
this.findScrollHandler = null;
|
|
12228
12236
|
this.snapshots = [];
|
|
12229
12237
|
this.historyIndex = -1;
|
|
12238
|
+
this.inputModeRestoreTimer = null;
|
|
12239
|
+
this.savedInputMode = '';
|
|
12230
12240
|
this.historyDebounceTimer = null;
|
|
12231
12241
|
this.shortcutHandle = null;
|
|
12232
12242
|
this.keydownInterceptors = new Set();
|
|
@@ -14134,20 +14144,16 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
14134
14144
|
executeInlineFormatCommand(command, mentionTargets) {
|
|
14135
14145
|
switch (command) {
|
|
14136
14146
|
case 'bold':
|
|
14137
|
-
this.
|
|
14138
|
-
this.toggleMentionStyle(mentionTargets, 'fontWeight', 'bold', 'normal');
|
|
14147
|
+
this.toggleChipStyle(mentionTargets, 'bold', 'fontWeight', 'bold');
|
|
14139
14148
|
return true;
|
|
14140
14149
|
case 'italic':
|
|
14141
|
-
this.
|
|
14142
|
-
this.toggleMentionStyle(mentionTargets, 'fontStyle', 'italic', 'normal');
|
|
14150
|
+
this.toggleChipStyle(mentionTargets, 'italic', 'fontStyle', 'italic');
|
|
14143
14151
|
return true;
|
|
14144
14152
|
case 'underline':
|
|
14145
|
-
this.
|
|
14146
|
-
this.toggleMentionTextDecoration(mentionTargets, 'underline');
|
|
14153
|
+
this.toggleChipDecoration(mentionTargets, 'underline', 'underline');
|
|
14147
14154
|
return true;
|
|
14148
14155
|
case 'strikethrough':
|
|
14149
|
-
this.
|
|
14150
|
-
this.toggleMentionTextDecoration(mentionTargets, 'line-through');
|
|
14156
|
+
this.toggleChipDecoration(mentionTargets, 'strikeThrough', 'line-through');
|
|
14151
14157
|
return true;
|
|
14152
14158
|
case 'clear':
|
|
14153
14159
|
this.clearFormatting(mentionTargets);
|
|
@@ -14378,18 +14384,34 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
14378
14384
|
return;
|
|
14379
14385
|
this.flushPendingHistoryPush();
|
|
14380
14386
|
const editor = this.editorDiv?.nativeElement;
|
|
14381
|
-
const prevInputMode = editor?.inputMode;
|
|
14382
14387
|
if (editor) {
|
|
14388
|
+
// A burst keeps the value from before its first insert: a second
|
|
14389
|
+
// insert would otherwise capture our own temporary 'none'.
|
|
14390
|
+
if (this.inputModeRestoreTimer === null) {
|
|
14391
|
+
this.savedInputMode = editor.inputMode;
|
|
14392
|
+
}
|
|
14393
|
+
else {
|
|
14394
|
+
clearTimeout(this.inputModeRestoreTimer);
|
|
14395
|
+
}
|
|
14383
14396
|
editor.inputMode = 'none';
|
|
14384
14397
|
}
|
|
14385
|
-
|
|
14386
|
-
|
|
14387
|
-
|
|
14388
|
-
|
|
14389
|
-
|
|
14398
|
+
try {
|
|
14399
|
+
insert();
|
|
14400
|
+
this.pushHistory();
|
|
14401
|
+
const selection = this.document.getSelection();
|
|
14402
|
+
if (selection && selection.rangeCount > 0) {
|
|
14403
|
+
this.savedRange = selection.getRangeAt(0).cloneRange();
|
|
14404
|
+
}
|
|
14390
14405
|
}
|
|
14391
|
-
|
|
14392
|
-
|
|
14406
|
+
finally {
|
|
14407
|
+
// A throwing insert must still schedule the restore, or the editor
|
|
14408
|
+
// keeps 'none' and the next insert saves that as the original.
|
|
14409
|
+
if (editor) {
|
|
14410
|
+
this.inputModeRestoreTimer = setTimeout(() => {
|
|
14411
|
+
this.inputModeRestoreTimer = null;
|
|
14412
|
+
editor.inputMode = this.savedInputMode;
|
|
14413
|
+
}, 100);
|
|
14414
|
+
}
|
|
14393
14415
|
}
|
|
14394
14416
|
}
|
|
14395
14417
|
/** Commit addon DOM edits to the model + flush pending history (addon host surface). */
|
|
@@ -14818,13 +14840,24 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
14818
14840
|
this.flushPendingHistoryPush();
|
|
14819
14841
|
this.restoreSelection();
|
|
14820
14842
|
const mentionTargets = this.getMentionElementsInSelection();
|
|
14843
|
+
// Chromium rewrites the family it writes into `face` (quotes dropped), so
|
|
14844
|
+
// the command's own elements are told apart by what changed across the
|
|
14845
|
+
// exec -- a new element, or a `face` that moved -- not by the text.
|
|
14846
|
+
const facesBefore = new Map(Array.from(this.editorDiv?.nativeElement.querySelectorAll('font[face]') ?? [])
|
|
14847
|
+
.map((font) => [font, font.getAttribute('face')]));
|
|
14821
14848
|
this.execEditorCommand('fontName', family);
|
|
14822
14849
|
const styled = [];
|
|
14823
14850
|
if (this.editorDiv?.nativeElement) {
|
|
14824
|
-
//
|
|
14825
|
-
//
|
|
14851
|
+
// Splitting a pre-existing <font> leaves clones of it on both sides
|
|
14852
|
+
// of the selection; those are new elements but not the command's, so
|
|
14853
|
+
// only fonts the selection actually covers take the new family.
|
|
14854
|
+
const selection = this.document.getSelection();
|
|
14855
|
+
const range = selection && selection.rangeCount > 0 && this.editorDiv.nativeElement.contains(selection.getRangeAt(0).commonAncestorContainer)
|
|
14856
|
+
? selection.getRangeAt(0)
|
|
14857
|
+
: null;
|
|
14826
14858
|
const fontElements = Array.from(this.editorDiv.nativeElement.querySelectorAll('font[face]'))
|
|
14827
|
-
.filter((font) =>
|
|
14859
|
+
.filter((font) => (!range || range.intersectsNode(font))
|
|
14860
|
+
&& (facesBefore.get(font) !== font.getAttribute('face') || this.isSameFontFamily(font.getAttribute('face'), family)));
|
|
14828
14861
|
for (const font of fontElements) {
|
|
14829
14862
|
const el = font;
|
|
14830
14863
|
const span = this.document.createElement('span');
|
|
@@ -14841,6 +14874,15 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
14841
14874
|
this.reSaveLiveSelection(styled);
|
|
14842
14875
|
this.pushHistory();
|
|
14843
14876
|
}
|
|
14877
|
+
/**
|
|
14878
|
+
* A `<font>` already carrying the requested family is left unchanged by
|
|
14879
|
+
* `fontName`, so "did its face move" cannot find it; the sanitizer drops
|
|
14880
|
+
* `<font>`, so it must still become a styled span.
|
|
14881
|
+
*/
|
|
14882
|
+
isSameFontFamily(face, family) {
|
|
14883
|
+
const normalize = (value) => value.replaceAll(/["']/g, '').trim().toLowerCase();
|
|
14884
|
+
return face !== null && normalize(face) === normalize(family);
|
|
14885
|
+
}
|
|
14844
14886
|
getCaretOffset(element) {
|
|
14845
14887
|
const selection = this.document.getSelection();
|
|
14846
14888
|
if (!selection?.anchorNode)
|
|
@@ -17346,21 +17388,59 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
17346
17388
|
});
|
|
17347
17389
|
return result;
|
|
17348
17390
|
}
|
|
17349
|
-
|
|
17350
|
-
|
|
17351
|
-
|
|
17391
|
+
/**
|
|
17392
|
+
* Run a toggling `execCommand` and leave every chip in the selection in the
|
|
17393
|
+
* state the command gave the surrounding text: after a toggle a chip has the
|
|
17394
|
+
* same effective state as the text around it.
|
|
17395
|
+
*
|
|
17396
|
+
* That state is read BEFORE the exec, from the command, not from the chip's
|
|
17397
|
+
* own inline style: a chip can be bold only through a `<b>` ancestor (no
|
|
17398
|
+
* inline style), or carry an inline bold inside a partly-bold selection, and
|
|
17399
|
+
* Chromium also strips a chip's matching inline style when the command turns
|
|
17400
|
+
* the format off, so anything read afterwards reports "off". When the
|
|
17401
|
+
* selection holds nothing but chips (non-editable, so the command has no
|
|
17402
|
+
* text to act on and reports "off") or there is no `queryCommandState`, the
|
|
17403
|
+
* chip's own style is the only state there is.
|
|
17404
|
+
*/
|
|
17405
|
+
toggleChipsWithCommand(commandId, chips, chipHasFormat, setChipFormat) {
|
|
17406
|
+
const textHadFormat = this.selectionHoldsTextOutsideChips() ? this.queryEditorCommandState(commandId) : undefined;
|
|
17407
|
+
const turnOn = chips.map((chip) => !(textHadFormat ?? chipHasFormat(chip)));
|
|
17408
|
+
this.execEditorCommand(commandId);
|
|
17409
|
+
chips.forEach((chip, i) => setChipFormat(chip, turnOn[i]));
|
|
17410
|
+
}
|
|
17411
|
+
/**
|
|
17412
|
+
* Decided on the range, not on `Selection.toString()`: that string follows
|
|
17413
|
+
* rendered text (`text-transform`, a partly selected chip), so comparing it
|
|
17414
|
+
* with a chip's `textContent` misreads a chips-only selection as having text.
|
|
17415
|
+
*/
|
|
17416
|
+
selectionHoldsTextOutsideChips() {
|
|
17417
|
+
const editor = this.getEditorElement();
|
|
17418
|
+
const selection = this.document.getSelection();
|
|
17419
|
+
if (!editor || !selection || selection.rangeCount === 0)
|
|
17420
|
+
return false;
|
|
17421
|
+
const range = selection.getRangeAt(0);
|
|
17422
|
+
const walker = this.document.createTreeWalker(editor, NodeFilter.SHOW_TEXT);
|
|
17423
|
+
for (let node = walker.nextNode(); node; node = walker.nextNode()) {
|
|
17424
|
+
if (!range.intersectsNode(node) || node.parentElement?.closest('[data-mention], [data-tag]'))
|
|
17425
|
+
continue;
|
|
17426
|
+
const from = node === range.startContainer ? range.startOffset : 0;
|
|
17427
|
+
const to = node === range.endContainer ? range.endOffset : node.data.length;
|
|
17428
|
+
if (node.data.slice(from, to).trim() !== '')
|
|
17429
|
+
return true;
|
|
17352
17430
|
}
|
|
17431
|
+
return false;
|
|
17353
17432
|
}
|
|
17354
|
-
|
|
17355
|
-
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
|
|
17360
|
-
|
|
17361
|
-
|
|
17362
|
-
|
|
17363
|
-
|
|
17433
|
+
toggleChipStyle(chips, commandId, prop, onValue) {
|
|
17434
|
+
this.toggleChipsWithCommand(commandId, chips, (chip) => chip.style[prop] === onValue, (chip, on) => { chip.style[prop] = on ? onValue : 'normal'; });
|
|
17435
|
+
}
|
|
17436
|
+
toggleChipDecoration(chips, commandId, decoration) {
|
|
17437
|
+
this.toggleChipsWithCommand(commandId, chips, (chip) => chip.style.textDecoration.includes(decoration), (chip, on) => { chip.style.textDecoration = this.withTextDecoration(chip.style.textDecoration, decoration, on); });
|
|
17438
|
+
}
|
|
17439
|
+
withTextDecoration(current, decoration, on) {
|
|
17440
|
+
const present = current.includes(decoration);
|
|
17441
|
+
if (on === present)
|
|
17442
|
+
return current;
|
|
17443
|
+
return on ? `${current} ${decoration}`.trim() : current.replace(decoration, '').trim();
|
|
17364
17444
|
}
|
|
17365
17445
|
setMentionStyle(elements, prop, value) {
|
|
17366
17446
|
for (const el of elements) {
|
|
@@ -17485,9 +17565,10 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
17485
17565
|
const doc = this.document;
|
|
17486
17566
|
return doc.execCommand?.(commandId, false, value) ?? false;
|
|
17487
17567
|
}
|
|
17568
|
+
/** `undefined` when the environment has no `queryCommandState`. */
|
|
17488
17569
|
queryEditorCommandState(commandId) {
|
|
17489
17570
|
const doc = this.document;
|
|
17490
|
-
return doc.queryCommandState?.(commandId)
|
|
17571
|
+
return doc.queryCommandState?.(commandId);
|
|
17491
17572
|
}
|
|
17492
17573
|
focusEditor() {
|
|
17493
17574
|
this.editorDiv?.nativeElement?.focus();
|
|
@@ -19336,20 +19417,15 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
19336
19417
|
continue;
|
|
19337
19418
|
}
|
|
19338
19419
|
if (foundPrev === -1) {
|
|
19339
|
-
ops.push('
|
|
19420
|
+
ops.push('+' + curLines[ci]);
|
|
19340
19421
|
pi++;
|
|
19341
19422
|
ci++;
|
|
19342
19423
|
continue;
|
|
19343
19424
|
}
|
|
19344
|
-
this.pushRemovedOps(ops, pi, foundPrev);
|
|
19345
19425
|
ops.push('=' + foundPrev);
|
|
19346
19426
|
pi = foundPrev + 1;
|
|
19347
19427
|
ci++;
|
|
19348
19428
|
}
|
|
19349
|
-
while (pi < prevLines.length) {
|
|
19350
|
-
ops.push('-' + pi);
|
|
19351
|
-
pi++;
|
|
19352
|
-
}
|
|
19353
19429
|
while (ci < curLines.length) {
|
|
19354
19430
|
ops.push('+' + curLines[ci]);
|
|
19355
19431
|
ci++;
|
|
@@ -19377,11 +19453,6 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
19377
19453
|
ops.push('+' + curLines[i]);
|
|
19378
19454
|
}
|
|
19379
19455
|
}
|
|
19380
|
-
pushRemovedOps(ops, start, end) {
|
|
19381
|
-
for (let i = start; i < end; i++) {
|
|
19382
|
-
ops.push('-' + i);
|
|
19383
|
-
}
|
|
19384
|
-
}
|
|
19385
19456
|
applyDelta(base, delta) {
|
|
19386
19457
|
if (!delta)
|
|
19387
19458
|
return base;
|
|
@@ -19440,10 +19511,17 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
19440
19511
|
this.lastReconstructedHtml = html;
|
|
19441
19512
|
return html;
|
|
19442
19513
|
}
|
|
19514
|
+
/**
|
|
19515
|
+
* Append the current content as a history entry. An entry's delta is
|
|
19516
|
+
* computed against the entry it is appended to (the one at `historyIndex`),
|
|
19517
|
+
* and the redo tail is dropped before that base is trusted: read from the
|
|
19518
|
+
* tail, the base would be a discarded future entry and the delta would
|
|
19519
|
+
* reconstruct on top of the wrong one.
|
|
19520
|
+
*/
|
|
19443
19521
|
pushHistory() {
|
|
19444
19522
|
const currentHtml = this.htmlContent();
|
|
19445
|
-
const lastEntry = this.snapshots.
|
|
19446
|
-
const lastHtml = lastEntry ? this.reconstructHtmlCached(this.
|
|
19523
|
+
const lastEntry = this.snapshots[this.historyIndex];
|
|
19524
|
+
const lastHtml = lastEntry ? this.reconstructHtmlCached(this.historyIndex) : '';
|
|
19447
19525
|
if (lastEntry && lastHtml === currentHtml) {
|
|
19448
19526
|
return;
|
|
19449
19527
|
}
|
|
@@ -19768,6 +19846,10 @@ class RichTextEditorComponent extends RichTextEditorAddonHost {
|
|
|
19768
19846
|
clearTimeout(this.historyDebounceTimer);
|
|
19769
19847
|
this.historyDebounceTimer = null;
|
|
19770
19848
|
}
|
|
19849
|
+
if (this.inputModeRestoreTimer !== null) {
|
|
19850
|
+
clearTimeout(this.inputModeRestoreTimer);
|
|
19851
|
+
this.inputModeRestoreTimer = null;
|
|
19852
|
+
}
|
|
19771
19853
|
this.releaseTableDragListeners();
|
|
19772
19854
|
this.cancelPendingFind();
|
|
19773
19855
|
this.teardownFindOverlay();
|
|
@@ -20902,8 +20984,10 @@ class UiRippleDirective {
|
|
|
20902
20984
|
return;
|
|
20903
20985
|
const host = this.el.nativeElement;
|
|
20904
20986
|
const rect = host.getBoundingClientRect();
|
|
20905
|
-
|
|
20906
|
-
const
|
|
20987
|
+
// A keyboard-initiated click has no pointer position (detail 0, coords 0,0).
|
|
20988
|
+
const noPointer = event.detail === 0 && event.clientX === 0 && event.clientY === 0;
|
|
20989
|
+
const x = noPointer ? rect.width / 2 : event.clientX - rect.left;
|
|
20990
|
+
const y = noPointer ? rect.height / 2 : event.clientY - rect.top;
|
|
20907
20991
|
const diameter = Math.max(rect.width, rect.height) * 2;
|
|
20908
20992
|
const ripple = this.renderer.createElement('span');
|
|
20909
20993
|
this.renderer.setStyle(ripple, 'position', 'absolute');
|
|
@@ -21020,6 +21104,8 @@ class SpinnerComponent {
|
|
|
21020
21104
|
* rendered instead.
|
|
21021
21105
|
*/
|
|
21022
21106
|
this.variant = input('ring', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
21107
|
+
/** Accessible name announced by assistive technology (applies to every variant). Set it to say what is loading, or to localize it. */
|
|
21108
|
+
this.label = input('Loading', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
21023
21109
|
this.contentWrapper = viewChild('contentWrapper', ...(ngDevMode ? [{ debugName: "contentWrapper" }] : /* istanbul ignore next */ []));
|
|
21024
21110
|
this._hasCustomContent = signal(false, ...(ngDevMode ? [{ debugName: "_hasCustomContent" }] : /* istanbul ignore next */ []));
|
|
21025
21111
|
this.hasCustomContent = this._hasCustomContent.asReadonly();
|
|
@@ -21047,12 +21133,12 @@ class SpinnerComponent {
|
|
|
21047
21133
|
this._hasCustomContent.set((this.contentWrapper()?.nativeElement?.children?.length ?? 0) > 0);
|
|
21048
21134
|
}
|
|
21049
21135
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21050
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SpinnerComponent, isStandalone: true, selector: "ui-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" aria-label=\"
|
|
21136
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SpinnerComponent, isStandalone: true, selector: "ui-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n [attr.aria-label]=\"label()\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21051
21137
|
}
|
|
21052
21138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
21053
21139
|
type: Component,
|
|
21054
|
-
args: [{ selector: 'ui-spinner', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" aria-label=\"
|
|
21055
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "customSize", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }] } });
|
|
21140
|
+
args: [{ selector: 'ui-spinner', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n [attr.aria-label]=\"label()\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n" }]
|
|
21141
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "customSize", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }] } });
|
|
21056
21142
|
|
|
21057
21143
|
/**
|
|
21058
21144
|
* PageSpinner - Full page loading overlay
|
|
@@ -21074,7 +21160,7 @@ class PageSpinnerComponent {
|
|
|
21074
21160
|
this.classes = computed(() => cn('fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
21075
21161
|
}
|
|
21076
21162
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PageSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21077
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PageSpinnerComponent, isStandalone: true, selector: "ui-page-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'page-spinner'\">\n <div class=\"flex flex-col items-center gap-4\">\n <ui-spinner size=\"page\" />\n @if (message()) {\n <p class=\"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none\">{{ message() }}</p>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21163
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PageSpinnerComponent, isStandalone: true, selector: "ui-page-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'page-spinner'\">\n <div class=\"flex flex-col items-center gap-4\">\n <ui-spinner size=\"page\" />\n @if (message()) {\n <p class=\"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none\">{{ message() }}</p>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21078
21164
|
}
|
|
21079
21165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PageSpinnerComponent, decorators: [{
|
|
21080
21166
|
type: Component,
|
|
@@ -21096,7 +21182,7 @@ class SkeletonComponent {
|
|
|
21096
21182
|
* entirely under `prefers-reduced-motion: reduce`.
|
|
21097
21183
|
*/
|
|
21098
21184
|
this.variant = input('pulse', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
21099
|
-
this.classes = computed(() => cn('rounded-md', this.variant() === 'pulse' && 'animate-pulse bg-primary/10', this.variant() === 'shimmer' && 'animate-shimmer', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
21185
|
+
this.classes = computed(() => cn('block rounded-md', this.variant() === 'pulse' && 'animate-pulse bg-primary/10', this.variant() === 'shimmer' && 'animate-shimmer', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
21100
21186
|
}
|
|
21101
21187
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21102
21188
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: SkeletonComponent, isStandalone: true, selector: "ui-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"skeleton\"" } }, ngImport: i0, template: ``, isInline: true, styles: [":host.animate-shimmer{background:#f6f7f8;background:linear-gradient(to right,#f6f7f8 8%,#edeef1 18%,#f6f7f8 33%);background-size:800px 104px;animation:shimmer 2s linear infinite forwards}.dark .animate-shimmer{background:#1e293b;background:linear-gradient(to right,#1e293b 8%,#0f172a 18%,#1e293b 33%);background-size:800px 104px}@keyframes shimmer{0%{background-position:-800px 0}to{background-position:800px 0}}@media(prefers-reduced-motion:reduce){:host.animate-shimmer,.animate-shimmer{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -21203,7 +21289,7 @@ class ButtonComponent {
|
|
|
21203
21289
|
this.classes = computed(() => cn(buttonVariants({ variant: this.variant(), size: this.size() }), this.loading() && 'relative', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
21204
21290
|
}
|
|
21205
21291
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21206
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ui-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "aria-expanded", isSignal: true, isRequired: false, transformFunction: null }, ariaPressed: { classPropertyName: "ariaPressed", publicName: "aria-pressed", isSignal: true, isRequired: false, transformFunction: null }, ariaHaspopup: { classPropertyName: "ariaHaspopup", publicName: "aria-haspopup", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "aria-controls", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, rippleColor: { classPropertyName: "rippleColor", publicName: "rippleColor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "\"contents\"", "attr.data-size": "size()", "attr.aria-label": "null", "attr.aria-expanded": "null", "attr.aria-pressed": "null", "attr.aria-controls": "null", "attr.aria-haspopup": "null" } }, ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-24 rounded-md\" />\n} @else {\n <button\n uiRipple\n [uiRippleDisabled]=\"!ripple()\"\n [uiRippleColor]=\"rippleColor()\"\n [class]=\"classes()\"\n [disabled]=\"disabled() || loading()\"\n [type]=\"type()\"\n [attr.data-slot]=\"'button'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-pressed]=\"ariaPressed() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-haspopup]=\"ariaHaspopup() ?? null\"\n (click)=\"clicked.emit($event)\"\n >\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center\" aria-hidden=\"true\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content />\n }\n </button>\n}\n", styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=button]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d))}:host([data-size=\"sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));padding-inline:calc(.75rem * var(--_d))}:host([data-size=\"lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));padding-inline:calc(2rem * var(--_d))}:host([data-size=\"icon\"]) [data-slot=button]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d));padding:0}:host([data-size=\"icon-sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));width:calc(2rem * var(--_d));padding:0}:host([data-size=\"icon-lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));width:calc(2.5rem * var(--_d));padding:0}}\n"], dependencies: [{ kind: "directive", type: UiRippleDirective, selector: "[uiRipple]", inputs: ["uiRippleColor", "uiRippleDuration", "uiRippleDisabled"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21292
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ui-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "aria-expanded", isSignal: true, isRequired: false, transformFunction: null }, ariaPressed: { classPropertyName: "ariaPressed", publicName: "aria-pressed", isSignal: true, isRequired: false, transformFunction: null }, ariaHaspopup: { classPropertyName: "ariaHaspopup", publicName: "aria-haspopup", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "aria-controls", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, rippleColor: { classPropertyName: "rippleColor", publicName: "rippleColor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "\"contents\"", "attr.data-size": "size()", "attr.aria-label": "null", "attr.aria-expanded": "null", "attr.aria-pressed": "null", "attr.aria-controls": "null", "attr.aria-haspopup": "null" } }, ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-24 rounded-md\" />\n} @else {\n <button\n uiRipple\n [uiRippleDisabled]=\"!ripple()\"\n [uiRippleColor]=\"rippleColor()\"\n [class]=\"classes()\"\n [disabled]=\"disabled() || loading()\"\n [type]=\"type()\"\n [attr.data-slot]=\"'button'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-pressed]=\"ariaPressed() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-haspopup]=\"ariaHaspopup() ?? null\"\n (click)=\"clicked.emit($event)\"\n >\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center\" aria-hidden=\"true\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content />\n }\n </button>\n}\n", styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=button]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d))}:host([data-size=\"sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));padding-inline:calc(.75rem * var(--_d))}:host([data-size=\"lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));padding-inline:calc(2rem * var(--_d))}:host([data-size=\"icon\"]) [data-slot=button]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d));padding:0}:host([data-size=\"icon-sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));width:calc(2rem * var(--_d));padding:0}:host([data-size=\"icon-lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));width:calc(2.5rem * var(--_d));padding:0}}\n"], dependencies: [{ kind: "directive", type: UiRippleDirective, selector: "[uiRipple]", inputs: ["uiRippleColor", "uiRippleDuration", "uiRippleDisabled"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21207
21293
|
}
|
|
21208
21294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
21209
21295
|
type: Component,
|
|
@@ -21604,7 +21690,7 @@ class AlertDialogContentComponent {
|
|
|
21604
21690
|
this.actionClick = output();
|
|
21605
21691
|
/** The cancel button was pressed. Same simple-mode-only rules as {@link actionClick}. */
|
|
21606
21692
|
this.cancelClick = output();
|
|
21607
|
-
this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg
|
|
21693
|
+
this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg border bg-background shadow-lg duration-200 sm:rounded-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
21608
21694
|
/**
|
|
21609
21695
|
* The two places a title can come from: the one this component renders for the `title` input, and one the
|
|
21610
21696
|
* author projects. Read by the naming effect so it runs again when either appears, which a title rendered
|
|
@@ -21695,22 +21781,18 @@ class AlertDialogContentComponent {
|
|
|
21695
21781
|
</div>
|
|
21696
21782
|
</div>
|
|
21697
21783
|
}
|
|
21698
|
-
`, isInline: true, dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header", inputs: ["class"] }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title", inputs: ["class"] }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description", inputs: ["class"] }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer", inputs: ["class"] }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21784
|
+
`, isInline: true, styles: [":host{--_d: var(--density-alert-dialog, var(--density, 1))}@layer components{[data-slot=alert-dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=alert-dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"], dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header", inputs: ["class"] }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title", inputs: ["class"] }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description", inputs: ["class"] }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer", inputs: ["class"] }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21699
21785
|
}
|
|
21700
21786
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogContentComponent, decorators: [{
|
|
21701
21787
|
type: Component,
|
|
21702
|
-
args: [{
|
|
21703
|
-
selector: 'ui-alert-dialog-content',
|
|
21704
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21705
|
-
imports: [
|
|
21788
|
+
args: [{ selector: 'ui-alert-dialog-content', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
21706
21789
|
AlertDialogHeaderComponent,
|
|
21707
21790
|
AlertDialogTitleComponent,
|
|
21708
21791
|
AlertDialogDescriptionComponent,
|
|
21709
21792
|
AlertDialogFooterComponent,
|
|
21710
21793
|
AlertDialogActionComponent,
|
|
21711
21794
|
AlertDialogCancelComponent,
|
|
21712
|
-
],
|
|
21713
|
-
template: `
|
|
21795
|
+
], template: `
|
|
21714
21796
|
@if (alertDialog?.open()) {
|
|
21715
21797
|
<div
|
|
21716
21798
|
class="fixed inset-0 z-50 flex items-center justify-center"
|
|
@@ -21747,9 +21829,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
21747
21829
|
</div>
|
|
21748
21830
|
</div>
|
|
21749
21831
|
}
|
|
21750
|
-
`,
|
|
21751
|
-
host: { class: 'contents' },
|
|
21752
|
-
}]
|
|
21832
|
+
`, host: { class: 'contents' }, styles: [":host{--_d: var(--density-alert-dialog, var(--density, 1))}@layer components{[data-slot=alert-dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=alert-dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"] }]
|
|
21753
21833
|
}], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], cancelClick: [{ type: i0.Output, args: ["cancelClick"] }], ownTitle: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }], projectedTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }] } });
|
|
21754
21834
|
|
|
21755
21835
|
class ConfirmDialogComponent {
|
|
@@ -23042,7 +23122,9 @@ function paramsFor(el, trigger) {
|
|
|
23042
23122
|
return readActions(el).find((a) => a.trigger === trigger)?.params ?? {};
|
|
23043
23123
|
}
|
|
23044
23124
|
function deliver(options, event) {
|
|
23045
|
-
|
|
23125
|
+
// The id comes from untrusted content: only the app's own handlers may run, never inherited names like __proto__ or constructor.
|
|
23126
|
+
if (Object.hasOwn(options.handlers, event.actionId))
|
|
23127
|
+
options.handlers[event.actionId]?.(event);
|
|
23046
23128
|
options.handlers['*']?.(event);
|
|
23047
23129
|
}
|
|
23048
23130
|
function emit(options, el, attr, trigger, domEvent, phase) {
|
|
@@ -25002,6 +25084,7 @@ class PopoverContentComponent {
|
|
|
25002
25084
|
this.popover = inject(POPOVER, { optional: true });
|
|
25003
25085
|
this.document = inject(DOCUMENT);
|
|
25004
25086
|
this.hostEl = inject(ElementRef);
|
|
25087
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
25005
25088
|
/** Extra classes merged onto the panel. Keep a width constraint viewport-aware (`max-w-[calc(100vw-2rem)]`), since the panel is positioned, not laid out by its parent. */
|
|
25006
25089
|
this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
25007
25090
|
/** Alignment along the chosen {@link side}'s edge: `'start'`, `'center'` or `'end'`. May be flipped at runtime when {@link avoidCollisions} is on. */
|
|
@@ -25042,15 +25125,24 @@ class PopoverContentComponent {
|
|
|
25042
25125
|
*/
|
|
25043
25126
|
this.triggerRectSig = signal(null, ...(ngDevMode ? [{ debugName: "triggerRectSig" }] : /* istanbul ignore next */ []));
|
|
25044
25127
|
this.adjustedPosition = signal({ side: 'bottom', align: 'center', offsetX: 0, offsetY: 0 }, ...(ngDevMode ? [{ debugName: "adjustedPosition" }] : /* istanbul ignore next */ []));
|
|
25128
|
+
/**
|
|
25129
|
+
* Width of the trigger, exposed to the content as `--trigger-width` so a
|
|
25130
|
+
* panel can match it (`class="w-(--trigger-width)"`). Re-read on every
|
|
25131
|
+
* open, as the trigger can resize between opens.
|
|
25132
|
+
*/
|
|
25133
|
+
this.triggerWidth = computed(() => {
|
|
25134
|
+
if (!this.popover?.open())
|
|
25135
|
+
return null;
|
|
25136
|
+
const rect = this.triggerRectSig() ?? this.popover.getTriggerRect();
|
|
25137
|
+
return rect ? `${rect.width}px` : null;
|
|
25138
|
+
}, ...(ngDevMode ? [{ debugName: "triggerWidth" }] : /* istanbul ignore next */ []));
|
|
25045
25139
|
this.positionStyles = computed(() => {
|
|
25046
25140
|
const pos = this.adjustedPosition();
|
|
25047
25141
|
if (this.strategy() === 'fixed') {
|
|
25048
25142
|
return this.computeFixedStyles(pos);
|
|
25049
25143
|
}
|
|
25050
|
-
|
|
25051
|
-
|
|
25052
|
-
}
|
|
25053
|
-
return '';
|
|
25144
|
+
const offset = `--popover-offset:${this.sideOffset()}px;`;
|
|
25145
|
+
return pos.offsetX === 0 ? offset : `${offset}transform: translateX(${pos.offsetX}px);`;
|
|
25054
25146
|
}, ...(ngDevMode ? [{ debugName: "positionStyles" }] : /* istanbul ignore next */ []));
|
|
25055
25147
|
this.classes = computed(() => {
|
|
25056
25148
|
const pos = this.adjustedPosition();
|
|
@@ -25062,10 +25154,10 @@ class PopoverContentComponent {
|
|
|
25062
25154
|
end: 'right-0',
|
|
25063
25155
|
};
|
|
25064
25156
|
const sideClasses = {
|
|
25065
|
-
top: 'bottom-full mb-
|
|
25066
|
-
bottom: 'top-full mt-
|
|
25067
|
-
left: 'right-full me-
|
|
25068
|
-
right: 'left-full ms-
|
|
25157
|
+
top: 'bottom-full mb-[var(--popover-offset,4px)]',
|
|
25158
|
+
bottom: 'top-full mt-[var(--popover-offset,4px)]',
|
|
25159
|
+
left: 'right-full me-[var(--popover-offset,4px)] top-0',
|
|
25160
|
+
right: 'left-full ms-[var(--popover-offset,4px)] top-0',
|
|
25069
25161
|
};
|
|
25070
25162
|
const isFixed = this.strategy() === 'fixed';
|
|
25071
25163
|
return cn(isFixed ? 'z-50 w-72 max-w-[calc(100vw-16px)] rounded-md border bg-popover text-popover-foreground shadow-md outline-none' :
|
|
@@ -25266,21 +25358,48 @@ class PopoverContentComponent {
|
|
|
25266
25358
|
}
|
|
25267
25359
|
this.adjustCollisionPosition(this.contentEl.nativeElement);
|
|
25268
25360
|
}
|
|
25361
|
+
/**
|
|
25362
|
+
* Invariant: with `avoidCollisions` on, a fixed top/bottom panel never sits over its trigger
|
|
25363
|
+
* when the opposite side has more room. The absolute strategy flips through
|
|
25364
|
+
* `adjustCollisionPosition`; here the clamp below would otherwise pin an overflowing panel to
|
|
25365
|
+
* the viewport edge on top of the trigger. Flips when the opposite side fits the panel, or —
|
|
25366
|
+
* when neither fits — when it is simply the roomier one; the clamp then trims what is left.
|
|
25367
|
+
* Returns whether the side changed (the styles are re-rendered, so the caller re-measures).
|
|
25368
|
+
*/
|
|
25369
|
+
flipFixedSide(rect, vh) {
|
|
25370
|
+
const side = this.adjustedPosition().side;
|
|
25371
|
+
if (!this.avoidCollisions() || (side !== 'top' && side !== 'bottom'))
|
|
25372
|
+
return false;
|
|
25373
|
+
const overflows = side === 'top' ? rect.top < 0 : rect.bottom > vh;
|
|
25374
|
+
const triggerRect = this.popover?.getTriggerRect();
|
|
25375
|
+
if (!overflows || !triggerRect)
|
|
25376
|
+
return false;
|
|
25377
|
+
const boundary = { top: 0, bottom: vh };
|
|
25378
|
+
const opposite = side === 'top' ? 'bottom' : 'top';
|
|
25379
|
+
const roomThere = this.getAvailableSpace(opposite, triggerRect, boundary);
|
|
25380
|
+
const roomHere = this.getAvailableSpace(side, triggerRect, boundary);
|
|
25381
|
+
if (roomThere < rect.height + this.sideOffset() && roomThere <= roomHere)
|
|
25382
|
+
return false;
|
|
25383
|
+
this.adjustedPosition.update(pos => ({ ...pos, side: opposite }));
|
|
25384
|
+
this.cdr.detectChanges();
|
|
25385
|
+
return true;
|
|
25386
|
+
}
|
|
25269
25387
|
adjustFixedPosition(el) {
|
|
25270
|
-
|
|
25388
|
+
let rect = el.getBoundingClientRect();
|
|
25271
25389
|
const vw = globalThis.window.innerWidth;
|
|
25272
25390
|
const vh = globalThis.window.innerHeight;
|
|
25391
|
+
if (this.flipFixedSide(rect, vh))
|
|
25392
|
+
rect = el.getBoundingClientRect();
|
|
25273
25393
|
const needsHorizontalFix = rect.right > vw || rect.left < 0;
|
|
25274
25394
|
const needsVerticalFix = rect.bottom > vh || rect.top < 0;
|
|
25275
|
-
if (needsHorizontalFix)
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
}
|
|
25395
|
+
if (!needsHorizontalFix && !needsVerticalFix)
|
|
25396
|
+
return;
|
|
25397
|
+
// The measured rect already includes the placement transform (translateX/Y(-50%|-100%)),
|
|
25398
|
+
// so pin both axes from it and drop the transform; fixing one axis alone would leave the
|
|
25399
|
+
// other shifted by the transform that is being removed.
|
|
25400
|
+
el.style.left = `${Math.max(8, Math.min(rect.left, vw - rect.width - 8))}px`;
|
|
25401
|
+
el.style.top = `${Math.max(8, Math.min(rect.top, vh - rect.height - 8))}px`;
|
|
25402
|
+
el.style.transform = 'none';
|
|
25284
25403
|
}
|
|
25285
25404
|
adjustCollisionPosition(content) {
|
|
25286
25405
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -25339,21 +25458,37 @@ class PopoverContentComponent {
|
|
|
25339
25458
|
return '';
|
|
25340
25459
|
const currentSide = this.avoidCollisions() ? pos.side : this.side();
|
|
25341
25460
|
const currentAlign = this.avoidCollisions() ? pos.align : this.align();
|
|
25342
|
-
const top
|
|
25343
|
-
|
|
25344
|
-
left = Math.max(8, Math.min(left, globalThis.window.innerWidth - 8));
|
|
25461
|
+
const { top, left, transform } = this.computeFixedAnchor(currentSide, currentAlign, triggerRect);
|
|
25462
|
+
const clampedLeft = Math.max(8, Math.min(left, globalThis.window.innerWidth - 8));
|
|
25345
25463
|
const clampedTop = Math.max(8, Math.min(top, globalThis.window.innerHeight - 8));
|
|
25346
25464
|
// `inset:auto;margin:0;overflow:visible` neutralize the UA `[popover]`
|
|
25347
25465
|
// defaults (centered via inset:0 + margin:auto, overflow:auto) so our
|
|
25348
25466
|
// own fixed coordinates and layout apply when promoted to the top layer.
|
|
25349
|
-
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
|
|
25467
|
+
return `position:fixed;inset:auto;margin:0;overflow:visible;top:${clampedTop}px;left:${clampedLeft}px;transform:${transform};`;
|
|
25468
|
+
}
|
|
25469
|
+
/**
|
|
25470
|
+
* The panel's anchor point and the transform that pulls the panel's matching edge onto it.
|
|
25471
|
+
* The transform is what lets the panel sit *before* the anchor (above or left of it) without
|
|
25472
|
+
* knowing its own size: `top` places the panel's bottom edge on the point, `left` its right edge.
|
|
25473
|
+
*/
|
|
25474
|
+
computeFixedAnchor(side, align, triggerRect) {
|
|
25475
|
+
const offset = this.sideOffset();
|
|
25476
|
+
const shift = { start: 0, center: -50, end: -100 }[align];
|
|
25477
|
+
if (side === 'top' || side === 'bottom') {
|
|
25478
|
+
const top = side === 'bottom' ? triggerRect.bottom + offset : triggerRect.top - offset;
|
|
25479
|
+
return {
|
|
25480
|
+
top,
|
|
25481
|
+
left: this.computeFixedLeft(align, triggerRect),
|
|
25482
|
+
transform: `translate(${shift}%, ${side === 'top' ? -100 : 0}%)`,
|
|
25483
|
+
};
|
|
25355
25484
|
}
|
|
25356
|
-
|
|
25485
|
+
const crossAxis = { start: triggerRect.top, center: triggerRect.top + triggerRect.height / 2, end: triggerRect.bottom }[align];
|
|
25486
|
+
const isLeft = side === 'left';
|
|
25487
|
+
return {
|
|
25488
|
+
top: crossAxis,
|
|
25489
|
+
left: isLeft ? triggerRect.left - offset : triggerRect.right + offset,
|
|
25490
|
+
transform: `translate(${isLeft ? -100 : 0}%, ${shift}%)`,
|
|
25491
|
+
};
|
|
25357
25492
|
}
|
|
25358
25493
|
computeFixedLeft(align, triggerRect) {
|
|
25359
25494
|
if (align === 'start')
|
|
@@ -25369,6 +25504,7 @@ class PopoverContentComponent {
|
|
|
25369
25504
|
#contentEl
|
|
25370
25505
|
[class]="classes()"
|
|
25371
25506
|
[style]="positionStyles()"
|
|
25507
|
+
[style.--trigger-width]="triggerWidth()"
|
|
25372
25508
|
[style.visibility]="strategy() === 'fixed' && !portalReady() ? 'hidden' : null"
|
|
25373
25509
|
[attr.data-state]="popover?.open() ? 'open' : 'closed'"
|
|
25374
25510
|
[attr.data-slot]="'popover-content'"
|
|
@@ -25386,6 +25522,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
25386
25522
|
#contentEl
|
|
25387
25523
|
[class]="classes()"
|
|
25388
25524
|
[style]="positionStyles()"
|
|
25525
|
+
[style.--trigger-width]="triggerWidth()"
|
|
25389
25526
|
[style.visibility]="strategy() === 'fixed' && !portalReady() ? 'hidden' : null"
|
|
25390
25527
|
[attr.data-state]="popover?.open() ? 'open' : 'closed'"
|
|
25391
25528
|
[attr.data-slot]="'popover-content'"
|
|
@@ -27762,7 +27899,9 @@ class InputComponent {
|
|
|
27762
27899
|
this.labelIsActive = computed(() => this.isFocused() || !!this.value(), ...(ngDevMode ? [{ debugName: "labelIsActive" }] : /* istanbul ignore next */ []));
|
|
27763
27900
|
this.classes = computed(() => cn(inputVariants({ variant: this.effectiveVariant() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
27764
27901
|
this.containerClasses = computed(() => cn('relative flex w-full items-center rounded-lg border border-input shadow-xs', 'transition-[color,box-shadow]', 'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-[3px] has-[input:focus-visible]:ring-ring/50', 'dark:bg-input/30 bg-transparent', this.isDisabled() && 'opacity-50 pointer-events-none cursor-not-allowed', this.class()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
|
|
27765
|
-
this.innerClasses = computed(() => cn(inputVariants({ variant: 'ghost' }), 'flex-1 h-full'
|
|
27902
|
+
this.innerClasses = computed(() => cn(inputVariants({ variant: 'ghost' }), 'flex-1 h-full',
|
|
27903
|
+
// Ghost is flush (px-0); without a prefix the text would sit on the border. `\_` keeps Tailwind from reading `_` as a space, and String.raw keeps the single backslash its class scanner needs in source.
|
|
27904
|
+
!this.prefix() && String.raw `ps-[calc(0.75rem*var(--\_d))]`), ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
|
|
27766
27905
|
this.floatingLabelClasses = computed(() => cn('pointer-events-none absolute select-none text-muted-foreground transition-all duration-150',
|
|
27767
27906
|
// Resting = uniform placeholder; on float it transforms to the (optionally
|
|
27768
27907
|
// dev-customized via labelClass) heading font.
|
|
@@ -27824,7 +27963,7 @@ class InputComponent {
|
|
|
27824
27963
|
useExisting: forwardRef(() => InputComponent),
|
|
27825
27964
|
multi: true,
|
|
27826
27965
|
},
|
|
27827
|
-
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-3 pe-1 text-sm select-none\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n class=\"flex shrink-0 items-center justify-center pe-2 text-muted-foreground hover:text-foreground\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div class=\"flex shrink-0 items-center pe-2 pointer-events-none\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-1 pe-3 text-sm select-none\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
27966
|
+
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-3 pe-1 text-sm select-none\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n class=\"flex shrink-0 items-center justify-center pe-2 text-muted-foreground hover:text-foreground\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div class=\"flex shrink-0 items-center pe-2 pointer-events-none\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-1 pe-3 text-sm select-none\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
27828
27967
|
}
|
|
27829
27968
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: InputComponent, decorators: [{
|
|
27830
27969
|
type: Component,
|
|
@@ -27877,7 +28016,7 @@ class TabsComponent {
|
|
|
27877
28016
|
* projected `<ui-tabs-trigger>` computes its own and honours a `class` input, which this does not.
|
|
27878
28017
|
*/
|
|
27879
28018
|
triggerClasses(value) {
|
|
27880
|
-
return cn('inline-flex items-center justify-center whitespace-nowrap rounded-md
|
|
28019
|
+
return cn('inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', this.activeTab() === value
|
|
27881
28020
|
? 'bg-background text-foreground shadow'
|
|
27882
28021
|
: 'hover:bg-background/50');
|
|
27883
28022
|
}
|
|
@@ -27911,6 +28050,44 @@ class TabsComponent {
|
|
|
27911
28050
|
this.activeTab.set(value);
|
|
27912
28051
|
this.tabChange.emit(value);
|
|
27913
28052
|
}
|
|
28053
|
+
/**
|
|
28054
|
+
* WAI-ARIA tabs keyboard support, shared by both modes' trigger buttons. Left/Right move to the
|
|
28055
|
+
* neighbouring enabled tab (wrapping, and swapped in RTL) and Home/End jump to the first/last
|
|
28056
|
+
* enabled one; the target is focused and activated via {@link selectTab} (automatic activation),
|
|
28057
|
+
* so {@link tabChange} fires without a synthetic click. Other keys, and any key with a
|
|
28058
|
+
* modifier (Alt+Left is browser Back, Ctrl+Arrow is word navigation), are left alone.
|
|
28059
|
+
*/
|
|
28060
|
+
onTabKeydown(event) {
|
|
28061
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
28062
|
+
return;
|
|
28063
|
+
const current = event.currentTarget;
|
|
28064
|
+
const tablist = current.closest('[role="tablist"]');
|
|
28065
|
+
if (!tablist)
|
|
28066
|
+
return;
|
|
28067
|
+
const enabled = Array.from(tablist.querySelectorAll('[role="tab"]:not(:disabled)'));
|
|
28068
|
+
const from = enabled.indexOf(current);
|
|
28069
|
+
const target = this.keyTarget(event.key, from, enabled.length, getComputedStyle(tablist).direction === 'rtl');
|
|
28070
|
+
if (from < 0 || target === null)
|
|
28071
|
+
return;
|
|
28072
|
+
event.preventDefault();
|
|
28073
|
+
enabled[target].focus();
|
|
28074
|
+
const value = enabled[target].dataset['value'];
|
|
28075
|
+
if (value !== undefined)
|
|
28076
|
+
this.selectTab(value);
|
|
28077
|
+
}
|
|
28078
|
+
keyTarget(key, from, count, rtl) {
|
|
28079
|
+
const forward = rtl ? 'ArrowLeft' : 'ArrowRight';
|
|
28080
|
+
const backward = rtl ? 'ArrowRight' : 'ArrowLeft';
|
|
28081
|
+
if (key === 'Home')
|
|
28082
|
+
return 0;
|
|
28083
|
+
if (key === 'End')
|
|
28084
|
+
return count - 1;
|
|
28085
|
+
if (key === forward)
|
|
28086
|
+
return (from + 1) % count;
|
|
28087
|
+
if (key === backward)
|
|
28088
|
+
return (from - 1 + count) % count;
|
|
28089
|
+
return null;
|
|
28090
|
+
}
|
|
27914
28091
|
/**
|
|
27915
28092
|
* The `id` given to that tab's trigger button, which its panel points `aria-labelledby` at.
|
|
27916
28093
|
* Namespaced per `<ui-tabs>` instance so several tab sets can reuse the same values. Used only
|
|
@@ -27936,9 +28113,12 @@ class TabsComponent {
|
|
|
27936
28113
|
[attr.aria-selected]="activeTab() === tab.value"
|
|
27937
28114
|
[attr.data-state]="activeTab() === tab.value ? 'active' : 'inactive'"
|
|
27938
28115
|
[attr.tabindex]="activeTab() === tab.value ? 0 : -1"
|
|
28116
|
+
[attr.data-slot]="'tabs-trigger'"
|
|
28117
|
+
[attr.data-value]="tab.value"
|
|
27939
28118
|
[disabled]="tab.disabled"
|
|
27940
28119
|
[class]="triggerClasses(tab.value)"
|
|
27941
28120
|
(click)="selectTab(tab.value)"
|
|
28121
|
+
(keydown)="onTabKeydown($event)"
|
|
27942
28122
|
>
|
|
27943
28123
|
{{ tab.label }}
|
|
27944
28124
|
</button>
|
|
@@ -27962,17 +28142,11 @@ class TabsComponent {
|
|
|
27962
28142
|
<ng-content />
|
|
27963
28143
|
}
|
|
27964
28144
|
</div>
|
|
27965
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
28145
|
+
`, isInline: true, styles: [":host{--_d: var(--density-tabs, var(--density, 1))}@layer components{[data-slot=tabs-trigger]{padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
27966
28146
|
}
|
|
27967
28147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TabsComponent, decorators: [{
|
|
27968
28148
|
type: Component,
|
|
27969
|
-
args: [{
|
|
27970
|
-
selector: 'ui-tabs',
|
|
27971
|
-
standalone: true,
|
|
27972
|
-
imports: [NgTemplateOutlet, NgComponentOutlet],
|
|
27973
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27974
|
-
providers: [{ provide: TABS, useExisting: forwardRef(() => TabsComponent) }],
|
|
27975
|
-
template: `
|
|
28149
|
+
args: [{ selector: 'ui-tabs', standalone: true, imports: [NgTemplateOutlet, NgComponentOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: TABS, useExisting: forwardRef(() => TabsComponent) }], template: `
|
|
27976
28150
|
<div [class]="classes()" [attr.data-slot]="'tabs'">
|
|
27977
28151
|
@if (tabs().length > 0) {
|
|
27978
28152
|
<!-- Simple mode: auto-generate tabs -->
|
|
@@ -27984,9 +28158,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
27984
28158
|
[attr.aria-selected]="activeTab() === tab.value"
|
|
27985
28159
|
[attr.data-state]="activeTab() === tab.value ? 'active' : 'inactive'"
|
|
27986
28160
|
[attr.tabindex]="activeTab() === tab.value ? 0 : -1"
|
|
28161
|
+
[attr.data-slot]="'tabs-trigger'"
|
|
28162
|
+
[attr.data-value]="tab.value"
|
|
27987
28163
|
[disabled]="tab.disabled"
|
|
27988
28164
|
[class]="triggerClasses(tab.value)"
|
|
27989
28165
|
(click)="selectTab(tab.value)"
|
|
28166
|
+
(keydown)="onTabKeydown($event)"
|
|
27990
28167
|
>
|
|
27991
28168
|
{{ tab.label }}
|
|
27992
28169
|
</button>
|
|
@@ -28010,9 +28187,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
28010
28187
|
<ng-content />
|
|
28011
28188
|
}
|
|
28012
28189
|
</div>
|
|
28013
|
-
`,
|
|
28014
|
-
host: { '[class]': '"contents"' },
|
|
28015
|
-
}]
|
|
28190
|
+
`, host: { '[class]': '"contents"' }, styles: [":host{--_d: var(--density-tabs, var(--density, 1))}@layer components{[data-slot=tabs-trigger]{padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}}\n"] }]
|
|
28016
28191
|
}], propDecorators: { defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: false }] }], tabChange: [{ type: i0.Output, args: ["tabChange"] }] } });
|
|
28017
28192
|
|
|
28018
28193
|
class TabsListComponent {
|
|
@@ -28113,6 +28288,10 @@ class TabsTriggerComponent {
|
|
|
28113
28288
|
this.tabs.selectTab(this.value());
|
|
28114
28289
|
}
|
|
28115
28290
|
}
|
|
28291
|
+
/** Arrow/Home/End navigation between triggers; delegated to the parent `<ui-tabs>`. */
|
|
28292
|
+
onKeydown(event) {
|
|
28293
|
+
this.tabs?.onTabKeydown(event);
|
|
28294
|
+
}
|
|
28116
28295
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TabsTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28117
28296
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: TabsTriggerComponent, isStandalone: true, selector: "ui-tabs-trigger", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "\"contents\"" } }, ngImport: i0, template: `
|
|
28118
28297
|
<button
|
|
@@ -28125,7 +28304,9 @@ class TabsTriggerComponent {
|
|
|
28125
28304
|
[attr.tabindex]="isActive() ? 0 : -1"
|
|
28126
28305
|
[class]="classes()"
|
|
28127
28306
|
[attr.data-slot]="'tabs-trigger'"
|
|
28307
|
+
[attr.data-value]="value()"
|
|
28128
28308
|
(click)="select()"
|
|
28309
|
+
(keydown)="onKeydown($event)"
|
|
28129
28310
|
>
|
|
28130
28311
|
<ng-content />
|
|
28131
28312
|
</button>
|
|
@@ -28144,7 +28325,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
28144
28325
|
[attr.tabindex]="isActive() ? 0 : -1"
|
|
28145
28326
|
[class]="classes()"
|
|
28146
28327
|
[attr.data-slot]="'tabs-trigger'"
|
|
28328
|
+
[attr.data-value]="value()"
|
|
28147
28329
|
(click)="select()"
|
|
28330
|
+
(keydown)="onKeydown($event)"
|
|
28148
28331
|
>
|
|
28149
28332
|
<ng-content />
|
|
28150
28333
|
</button>
|
|
@@ -29517,7 +29700,7 @@ class ColorPickerComponent {
|
|
|
29517
29700
|
useExisting: forwardRef(() => ColorPickerComponent),
|
|
29518
29701
|
multi: true,
|
|
29519
29702
|
},
|
|
29520
|
-
], viewQueries: [{ propertyName: "colorArea", first: true, predicate: ["colorArea"], descendants: true, isSignal: true }, { propertyName: "imageFile", first: true, predicate: ["imageFile"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #colorPanel>\n <div class=\"flex flex-col gap-3\">\n\n @if (enableEyedropper() || enableImagePick()) {\n <div class=\"flex items-center justify-end gap-1\">\n @if (enableEyedropper()) {\n <ui-eyedropper\n variant=\"icon\"\n [fallbackTarget]=\"fallbackTarget()\"\n (colorPick)=\"onEyedropperPick($event)\"\n uiTooltip=\"Pick color from screen\"\n />\n }\n @if (enableImagePick()) {\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n (click)=\"openImagePicker()\"\n [attr.aria-label]=\"t().pickColorFromImage\"\n data-slot=\"image-pick-trigger\"\n uiTooltip=\"Pick color from image\"\n >\n <ui-icon name=\"pipette-image\" class=\"h-4 w-4\" />\n </button>\n <input\n #imageFile\n type=\"file\"\n accept=\"image/*\"\n hidden\n (change)=\"onImageSelected($event)\"\n />\n }\n </div>\n }\n\n <div\n #colorArea\n class=\"relative h-32 w-full cursor-crosshair rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n style=\"touch-action: none\"\n [style.background]=\"areaBackground()\"\n tabindex=\"0\"\n role=\"slider\"\n [attr.aria-label]=\"t().saturationValue\"\n [attr.aria-valuenow]=\"saturation()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuetext]=\"'S ' + saturation() + '%, V ' + hsvValue() + '%'\"\n (mousedown)=\"onAreaMouseDown($event)\"\n (touchstart)=\"onAreaTouchStart($event)\"\n (keydown)=\"onAreaKeyDown($event)\"\n >\n <div\n class=\"absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm pointer-events-none\"\n [style.left.%]=\"saturation()\"\n [style.top.%]=\"100 - hsvValue()\"\n [style.backgroundColor]=\"currentColor()\"\n ></div>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-hue\" class=\"text-xs text-muted-foreground\">Hue</label>\n <input\n id=\"ui-color-picker-hue\"\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [value]=\"hue()\"\n (input)=\"onHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"hueGradient\"\n />\n </div>\n\n @if (alpha()) {\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-alpha\" class=\"text-xs text-muted-foreground\">Alpha</label>\n <div class=\"relative h-3 w-full rounded-md ui-color-picker-checker\">\n <input\n id=\"ui-color-picker-alpha\"\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"alphaValue() * 100\"\n (input)=\"onAlphaChange($event)\"\n [attr.aria-label]=\"t().alpha\"\n class=\"absolute inset-0 w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"alphaGradient()\"\n />\n </div>\n </div>\n }\n\n @if (showRecent() && recents().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">{{ t().recent }}</legend>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().recentColors\">\n @for (color of recents(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform ui-color-picker-checker\"\n [style.backgroundColor]=\"color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Apply recent ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (extractedPalette().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <div class=\"flex items-center justify-between\">\n <legend class=\"text-xs text-muted-foreground p-0\">From image</legend>\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-foreground\"\n (click)=\"clearExtractedPalette()\"\n >Clear</button>\n </div>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().extractedPalette\">\n @for (color of extractedPalette(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"applyExtracted(color)\"\n [attr.aria-label]=\"'Apply extracted ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (presets().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Presets</legend>\n <div class=\"flex flex-wrap gap-1\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n data-color-btn\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n [class.ring-2]=\"currentColor() === color\"\n [class.ring-primary]=\"currentColor() === color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Select ' + color\"\n ></button>\n }\n </div>\n </fieldset>\n }\n\n @if (showHarmonies()) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Harmonies</legend>\n <div class=\"space-y-1\">\n @for (group of harmonyGroups(); track group.label) {\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-20 text-[10px] text-muted-foreground cursor-help underline decoration-dotted underline-offset-2\"\n [uiTooltip]=\"group.hint\"\n >{{ group.label }}</span>\n <div class=\"flex items-center gap-1\">\n @for (color of group.swatches; track color) {\n <button\n type=\"button\"\n class=\"relative aspect-square w-5 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"copyHarmony(color)\"\n [uiTooltip]=\"copiedHarmony() === color ? 'Copied ' + color : 'Click to copy ' + color\"\n [attr.aria-label]=\"'Copy ' + color\"\n >\n @if (copiedHarmony() === color) {\n <span class=\"absolute inset-0 flex items-center justify-center rounded bg-foreground/80 text-background\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n </span>\n }\n </button>\n }\n @if (copiedHarmony(); as copied) {\n @if (groupContains(group, copied)) {\n <span class=\"ml-1 inline-flex items-center gap-1 rounded bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-700 dark:text-green-300\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n {{ copied }}\n </span>\n }\n }\n </div>\n </div>\n }\n </div>\n </fieldset>\n }\n\n @if (showContrast() && contrastBadge(); as badge) {\n <div class=\"mt-3 flex items-center justify-between gap-2 rounded-md border border-input px-2 py-1.5\">\n <div class=\"flex items-center gap-2 min-w-0\">\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'a'\"\n [class.ring-ring]=\"compareActive() === 'a'\"\n (click)=\"setCompareSlot('a')\"\n uiTooltip=\"Edit color A with the picker above\"\n [attr.aria-label]=\"t().editColorA\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareAHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareAHex() }}</span>\n </button>\n <span class=\"text-xs text-muted-foreground shrink-0\">vs</span>\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'b'\"\n [class.ring-ring]=\"compareActive() === 'b'\"\n (click)=\"setCompareSlot('b')\"\n uiTooltip=\"Edit color B with the picker above\"\n [attr.aria-label]=\"t().editColorB\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareBHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareBHex() }}</span>\n </button>\n </div>\n <div class=\"flex items-center gap-2 shrink-0\">\n <span class=\"font-mono text-xs\">{{ contrastRatioDisplay() }}:1</span>\n <span\n class=\"rounded px-1.5 py-0.5 text-[10px] font-semibold\"\n [class.bg-green-500]=\"badge.pass\"\n [class.text-white]=\"badge.pass\"\n [class.bg-destructive]=\"!badge.pass\"\n [class.text-destructive-foreground]=\"!badge.pass\"\n >{{ badge.label }}</span>\n </div>\n </div>\n }\n\n <ui-tabs [defaultValue]=\"formats()[0]\">\n <ui-tabs-list class=\"flex justify-start w-full h-8 gap-1\">\n @for (fmt of formats(); track fmt) {\n <ui-tabs-trigger [value]=\"fmt\" class=\"text-xs uppercase\">{{ fmt }}</ui-tabs-trigger>\n }\n </ui-tabs-list>\n\n @if (formats().includes('hex')) {\n <ui-tabs-content value=\"hex\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <ui-input\n type=\"text\"\n [ngModel]=\"formatValues().hex\"\n (ngModelChange)=\"onHexInput($event)\"\n placeholder=\"#000000\"\n class=\"h-8 text-xs font-mono flex-1\"\n />\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hex')\"\n [attr.aria-label]=\"t().copyHex\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hex' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('rgb')) {\n <ui-tabs-content value=\"rgb\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">R</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().r\"\n (ngModelChange)=\"onRgbChange('r', $event)\"\n [attr.aria-label]=\"t().red\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">G</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().g\"\n (ngModelChange)=\"onRgbChange('g', $event)\"\n [attr.aria-label]=\"t().green\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">B</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().b\"\n (ngModelChange)=\"onRgbChange('b', $event)\"\n [attr.aria-label]=\"t().blue\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().rgb }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('rgb')\"\n [attr.aria-label]=\"t().copyRgb\"\n >\n <ui-icon [name]=\"copiedFormat() === 'rgb' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('hsl')) {\n <ui-tabs-content value=\"hsl\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">H</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"hsl().h\"\n (ngModelChange)=\"onHslHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">S</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().s\"\n (ngModelChange)=\"onHslChange('s', $event)\"\n [attr.aria-label]=\"t().saturation\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">L</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().l\"\n (ngModelChange)=\"onHslChange('l', $event)\"\n [attr.aria-label]=\"t().lightness\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().hsl }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hsl')\"\n [attr.aria-label]=\"t().copyHsl\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hsl' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('oklch')) {\n <ui-tabs-content value=\"oklch\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().oklch }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('oklch')\"\n [attr.aria-label]=\"t().copyOklch\"\n >\n <ui-icon [name]=\"copiedFormat() === 'oklch' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n </ui-tabs>\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n} @else {\n <ui-popover [open]=\"open()\" (openChange)=\"open.set($event)\" [attr.dir]=\"dir()\">\n <ui-popover-trigger>\n <ng-content select=\"[colorPickerTrigger]\" />\n @if (!hasTrigger()) {\n <button\n type=\"button\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.data-slot]=\"'color-picker-trigger'\"\n >\n <span\n class=\"h-6 w-6 rounded border ui-color-picker-checker\"\n [style.backgroundColor]=\"currentColor()\"\n ></span>\n <span class=\"flex-1 text-start text-sm truncate font-mono\">{{ currentColor() || 'Select color' }}</span>\n <ui-icon name=\"chevron-down\" class=\"h-4 w-4 opacity-50\" />\n </button>\n }\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 p-3\" align=\"start\" [restoreFocus]=\"false\">\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n </ui-popover-content>\n </ui-popover>\n}\n", styles: [":host{--_d: var(--density-picker, var(--density, 1))}@layer components{[data-slot=color-picker-trigger]{height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}.ui-color-picker-checker{background-image:linear-gradient(45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(-45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,hsl(0 0% 80%) 75%),linear-gradient(-45deg,transparent 75%,hsl(0 0% 80%) 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: TabsComponent, selector: "ui-tabs", inputs: ["defaultValue", "class", "tabs"], outputs: ["tabChange"] }, { kind: "component", type: TabsListComponent, selector: "ui-tabs-list", inputs: ["class", "ariaLabel", "skeleton", "skeletonCount"] }, { kind: "component", type: TabsTriggerComponent, selector: "ui-tabs-trigger", inputs: ["value", "class"] }, { kind: "component", type: TabsContentComponent, selector: "ui-tabs-content", inputs: ["value", "class"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: EyedropperComponent, selector: "ui-eyedropper", inputs: ["class", "disabled", "label", "variant", "locale", "fallbackTarget"], outputs: ["colorPick", "pickStart", "pickCancel"] }, { kind: "directive", type: TooltipDirective, selector: "[uiTooltip]", inputs: ["uiTooltip", "tooltipSide", "tooltipDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
29703
|
+
], viewQueries: [{ propertyName: "colorArea", first: true, predicate: ["colorArea"], descendants: true, isSignal: true }, { propertyName: "imageFile", first: true, predicate: ["imageFile"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #colorPanel>\n <div class=\"flex flex-col gap-3\">\n\n @if (enableEyedropper() || enableImagePick()) {\n <div class=\"flex items-center justify-end gap-1\">\n @if (enableEyedropper()) {\n <ui-eyedropper\n variant=\"icon\"\n [fallbackTarget]=\"fallbackTarget()\"\n (colorPick)=\"onEyedropperPick($event)\"\n uiTooltip=\"Pick color from screen\"\n />\n }\n @if (enableImagePick()) {\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n (click)=\"openImagePicker()\"\n [attr.aria-label]=\"t().pickColorFromImage\"\n data-slot=\"image-pick-trigger\"\n uiTooltip=\"Pick color from image\"\n >\n <ui-icon name=\"pipette-image\" class=\"h-4 w-4\" />\n </button>\n <input\n #imageFile\n type=\"file\"\n accept=\"image/*\"\n hidden\n (change)=\"onImageSelected($event)\"\n />\n }\n </div>\n }\n\n <div\n #colorArea\n class=\"relative h-32 w-full cursor-crosshair rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n style=\"touch-action: none\"\n [style.background]=\"areaBackground()\"\n tabindex=\"0\"\n role=\"slider\"\n [attr.aria-label]=\"t().saturationValue\"\n [attr.aria-valuenow]=\"saturation()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuetext]=\"'S ' + saturation() + '%, V ' + hsvValue() + '%'\"\n (mousedown)=\"onAreaMouseDown($event)\"\n (touchstart)=\"onAreaTouchStart($event)\"\n (keydown)=\"onAreaKeyDown($event)\"\n >\n <div\n class=\"absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm pointer-events-none\"\n [style.left.%]=\"saturation()\"\n [style.top.%]=\"100 - hsvValue()\"\n [style.backgroundColor]=\"currentColor()\"\n ></div>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-hue\" class=\"text-xs text-muted-foreground\">Hue</label>\n <input\n id=\"ui-color-picker-hue\"\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [value]=\"hue()\"\n (input)=\"onHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"hueGradient\"\n />\n </div>\n\n @if (alpha()) {\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-alpha\" class=\"text-xs text-muted-foreground\">Alpha</label>\n <div class=\"relative h-3 w-full rounded-md ui-color-picker-checker\">\n <input\n id=\"ui-color-picker-alpha\"\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"alphaValue() * 100\"\n (input)=\"onAlphaChange($event)\"\n [attr.aria-label]=\"t().alpha\"\n class=\"absolute inset-0 w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"alphaGradient()\"\n />\n </div>\n </div>\n }\n\n @if (showRecent() && recents().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">{{ t().recent }}</legend>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().recentColors\">\n @for (color of recents(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform ui-color-picker-checker\"\n [style.backgroundColor]=\"color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Apply recent ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (extractedPalette().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <div class=\"flex items-center justify-between\">\n <legend class=\"text-xs text-muted-foreground p-0\">From image</legend>\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-foreground\"\n (click)=\"clearExtractedPalette()\"\n >Clear</button>\n </div>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().extractedPalette\">\n @for (color of extractedPalette(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"applyExtracted(color)\"\n [attr.aria-label]=\"'Apply extracted ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (presets().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Presets</legend>\n <div class=\"flex flex-wrap gap-1\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n data-color-btn\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n [class.ring-2]=\"currentColor() === color\"\n [class.ring-primary]=\"currentColor() === color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Select ' + color\"\n ></button>\n }\n </div>\n </fieldset>\n }\n\n @if (showHarmonies()) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Harmonies</legend>\n <div class=\"space-y-1\">\n @for (group of harmonyGroups(); track group.label) {\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-20 text-[10px] text-muted-foreground cursor-help underline decoration-dotted underline-offset-2\"\n [uiTooltip]=\"group.hint\"\n >{{ group.label }}</span>\n <div class=\"flex items-center gap-1\">\n @for (color of group.swatches; track color) {\n <button\n type=\"button\"\n class=\"relative aspect-square w-5 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"copyHarmony(color)\"\n [uiTooltip]=\"copiedHarmony() === color ? 'Copied ' + color : 'Click to copy ' + color\"\n [attr.aria-label]=\"'Copy ' + color\"\n >\n @if (copiedHarmony() === color) {\n <span class=\"absolute inset-0 flex items-center justify-center rounded bg-foreground/80 text-background\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n </span>\n }\n </button>\n }\n @if (copiedHarmony(); as copied) {\n @if (groupContains(group, copied)) {\n <span class=\"ml-1 inline-flex items-center gap-1 rounded bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-700 dark:text-green-300\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n {{ copied }}\n </span>\n }\n }\n </div>\n </div>\n }\n </div>\n </fieldset>\n }\n\n @if (showContrast() && contrastBadge(); as badge) {\n <div class=\"mt-3 flex items-center justify-between gap-2 rounded-md border border-input px-2 py-1.5\">\n <div class=\"flex items-center gap-2 min-w-0\">\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'a'\"\n [class.ring-ring]=\"compareActive() === 'a'\"\n (click)=\"setCompareSlot('a')\"\n uiTooltip=\"Edit color A with the picker above\"\n [attr.aria-label]=\"t().editColorA + ' ' + compareAHex()\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareAHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareAHex() }}</span>\n </button>\n <span class=\"text-xs text-muted-foreground shrink-0\">vs</span>\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'b'\"\n [class.ring-ring]=\"compareActive() === 'b'\"\n (click)=\"setCompareSlot('b')\"\n uiTooltip=\"Edit color B with the picker above\"\n [attr.aria-label]=\"t().editColorB + ' ' + compareBHex()\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareBHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareBHex() }}</span>\n </button>\n </div>\n <div class=\"flex items-center gap-2 shrink-0\">\n <span class=\"font-mono text-xs\">{{ contrastRatioDisplay() }}:1</span>\n <span\n class=\"rounded px-1.5 py-0.5 text-[10px] font-semibold\"\n [class.bg-green-700]=\"badge.pass\"\n [class.text-white]=\"badge.pass\"\n [class.bg-destructive]=\"!badge.pass\"\n [class.text-destructive-foreground]=\"!badge.pass\"\n >{{ badge.label }}</span>\n </div>\n </div>\n }\n\n <ui-tabs [defaultValue]=\"formats()[0]\">\n <ui-tabs-list class=\"flex justify-start w-full h-8 gap-1\">\n @for (fmt of formats(); track fmt) {\n <ui-tabs-trigger [value]=\"fmt\" class=\"text-xs uppercase\">{{ fmt }}</ui-tabs-trigger>\n }\n </ui-tabs-list>\n\n @if (formats().includes('hex')) {\n <ui-tabs-content value=\"hex\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <ui-input\n type=\"text\"\n [ngModel]=\"formatValues().hex\"\n (ngModelChange)=\"onHexInput($event)\"\n placeholder=\"#000000\"\n class=\"h-8 text-xs font-mono flex-1\"\n />\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hex')\"\n [attr.aria-label]=\"t().copyHex\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hex' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('rgb')) {\n <ui-tabs-content value=\"rgb\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">R</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().r\"\n (ngModelChange)=\"onRgbChange('r', $event)\"\n [attr.aria-label]=\"t().red\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">G</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().g\"\n (ngModelChange)=\"onRgbChange('g', $event)\"\n [attr.aria-label]=\"t().green\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">B</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().b\"\n (ngModelChange)=\"onRgbChange('b', $event)\"\n [attr.aria-label]=\"t().blue\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().rgb }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('rgb')\"\n [attr.aria-label]=\"t().copyRgb\"\n >\n <ui-icon [name]=\"copiedFormat() === 'rgb' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('hsl')) {\n <ui-tabs-content value=\"hsl\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">H</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"hsl().h\"\n (ngModelChange)=\"onHslHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">S</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().s\"\n (ngModelChange)=\"onHslChange('s', $event)\"\n [attr.aria-label]=\"t().saturation\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">L</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().l\"\n (ngModelChange)=\"onHslChange('l', $event)\"\n [attr.aria-label]=\"t().lightness\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().hsl }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hsl')\"\n [attr.aria-label]=\"t().copyHsl\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hsl' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('oklch')) {\n <ui-tabs-content value=\"oklch\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().oklch }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('oklch')\"\n [attr.aria-label]=\"t().copyOklch\"\n >\n <ui-icon [name]=\"copiedFormat() === 'oklch' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n </ui-tabs>\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n} @else {\n <ui-popover [open]=\"open()\" (openChange)=\"open.set($event)\" [attr.dir]=\"dir()\">\n <ui-popover-trigger>\n <ng-content select=\"[colorPickerTrigger]\" />\n @if (!hasTrigger()) {\n <button\n type=\"button\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.data-slot]=\"'color-picker-trigger'\"\n >\n <span\n class=\"h-6 w-6 rounded border ui-color-picker-checker\"\n [style.backgroundColor]=\"currentColor()\"\n ></span>\n <span class=\"flex-1 text-start text-sm truncate font-mono\">{{ currentColor() || 'Select color' }}</span>\n <span class=\"inline-flex opacity-50\"><ui-icon name=\"chevron-down\" class=\"h-4 w-4\" /></span>\n </button>\n }\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 p-3\" align=\"start\" [restoreFocus]=\"false\">\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n </ui-popover-content>\n </ui-popover>\n}\n", styles: [":host{--_d: var(--density-picker, var(--density, 1))}@layer components{[data-slot=color-picker-trigger]{height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}.ui-color-picker-checker{background-image:linear-gradient(45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(-45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,hsl(0 0% 80%) 75%),linear-gradient(-45deg,transparent 75%,hsl(0 0% 80%) 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: TabsComponent, selector: "ui-tabs", inputs: ["defaultValue", "class", "tabs"], outputs: ["tabChange"] }, { kind: "component", type: TabsListComponent, selector: "ui-tabs-list", inputs: ["class", "ariaLabel", "skeleton", "skeletonCount"] }, { kind: "component", type: TabsTriggerComponent, selector: "ui-tabs-trigger", inputs: ["value", "class"] }, { kind: "component", type: TabsContentComponent, selector: "ui-tabs-content", inputs: ["value", "class"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: EyedropperComponent, selector: "ui-eyedropper", inputs: ["class", "disabled", "label", "variant", "locale", "fallbackTarget"], outputs: ["colorPick", "pickStart", "pickCancel"] }, { kind: "directive", type: TooltipDirective, selector: "[uiTooltip]", inputs: ["uiTooltip", "tooltipSide", "tooltipDisabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
29521
29704
|
}
|
|
29522
29705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
29523
29706
|
type: Component,
|
|
@@ -29541,7 +29724,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
29541
29724
|
useExisting: forwardRef(() => ColorPickerComponent),
|
|
29542
29725
|
multi: true,
|
|
29543
29726
|
},
|
|
29544
|
-
], host: { class: 'inline-block' }, template: "<ng-template #colorPanel>\n <div class=\"flex flex-col gap-3\">\n\n @if (enableEyedropper() || enableImagePick()) {\n <div class=\"flex items-center justify-end gap-1\">\n @if (enableEyedropper()) {\n <ui-eyedropper\n variant=\"icon\"\n [fallbackTarget]=\"fallbackTarget()\"\n (colorPick)=\"onEyedropperPick($event)\"\n uiTooltip=\"Pick color from screen\"\n />\n }\n @if (enableImagePick()) {\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n (click)=\"openImagePicker()\"\n [attr.aria-label]=\"t().pickColorFromImage\"\n data-slot=\"image-pick-trigger\"\n uiTooltip=\"Pick color from image\"\n >\n <ui-icon name=\"pipette-image\" class=\"h-4 w-4\" />\n </button>\n <input\n #imageFile\n type=\"file\"\n accept=\"image/*\"\n hidden\n (change)=\"onImageSelected($event)\"\n />\n }\n </div>\n }\n\n <div\n #colorArea\n class=\"relative h-32 w-full cursor-crosshair rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n style=\"touch-action: none\"\n [style.background]=\"areaBackground()\"\n tabindex=\"0\"\n role=\"slider\"\n [attr.aria-label]=\"t().saturationValue\"\n [attr.aria-valuenow]=\"saturation()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuetext]=\"'S ' + saturation() + '%, V ' + hsvValue() + '%'\"\n (mousedown)=\"onAreaMouseDown($event)\"\n (touchstart)=\"onAreaTouchStart($event)\"\n (keydown)=\"onAreaKeyDown($event)\"\n >\n <div\n class=\"absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm pointer-events-none\"\n [style.left.%]=\"saturation()\"\n [style.top.%]=\"100 - hsvValue()\"\n [style.backgroundColor]=\"currentColor()\"\n ></div>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-hue\" class=\"text-xs text-muted-foreground\">Hue</label>\n <input\n id=\"ui-color-picker-hue\"\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [value]=\"hue()\"\n (input)=\"onHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"hueGradient\"\n />\n </div>\n\n @if (alpha()) {\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-alpha\" class=\"text-xs text-muted-foreground\">Alpha</label>\n <div class=\"relative h-3 w-full rounded-md ui-color-picker-checker\">\n <input\n id=\"ui-color-picker-alpha\"\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"alphaValue() * 100\"\n (input)=\"onAlphaChange($event)\"\n [attr.aria-label]=\"t().alpha\"\n class=\"absolute inset-0 w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"alphaGradient()\"\n />\n </div>\n </div>\n }\n\n @if (showRecent() && recents().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">{{ t().recent }}</legend>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().recentColors\">\n @for (color of recents(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform ui-color-picker-checker\"\n [style.backgroundColor]=\"color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Apply recent ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (extractedPalette().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <div class=\"flex items-center justify-between\">\n <legend class=\"text-xs text-muted-foreground p-0\">From image</legend>\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-foreground\"\n (click)=\"clearExtractedPalette()\"\n >Clear</button>\n </div>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().extractedPalette\">\n @for (color of extractedPalette(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"applyExtracted(color)\"\n [attr.aria-label]=\"'Apply extracted ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (presets().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Presets</legend>\n <div class=\"flex flex-wrap gap-1\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n data-color-btn\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n [class.ring-2]=\"currentColor() === color\"\n [class.ring-primary]=\"currentColor() === color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Select ' + color\"\n ></button>\n }\n </div>\n </fieldset>\n }\n\n @if (showHarmonies()) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Harmonies</legend>\n <div class=\"space-y-1\">\n @for (group of harmonyGroups(); track group.label) {\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-20 text-[10px] text-muted-foreground cursor-help underline decoration-dotted underline-offset-2\"\n [uiTooltip]=\"group.hint\"\n >{{ group.label }}</span>\n <div class=\"flex items-center gap-1\">\n @for (color of group.swatches; track color) {\n <button\n type=\"button\"\n class=\"relative aspect-square w-5 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"copyHarmony(color)\"\n [uiTooltip]=\"copiedHarmony() === color ? 'Copied ' + color : 'Click to copy ' + color\"\n [attr.aria-label]=\"'Copy ' + color\"\n >\n @if (copiedHarmony() === color) {\n <span class=\"absolute inset-0 flex items-center justify-center rounded bg-foreground/80 text-background\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n </span>\n }\n </button>\n }\n @if (copiedHarmony(); as copied) {\n @if (groupContains(group, copied)) {\n <span class=\"ml-1 inline-flex items-center gap-1 rounded bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-700 dark:text-green-300\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n {{ copied }}\n </span>\n }\n }\n </div>\n </div>\n }\n </div>\n </fieldset>\n }\n\n @if (showContrast() && contrastBadge(); as badge) {\n <div class=\"mt-3 flex items-center justify-between gap-2 rounded-md border border-input px-2 py-1.5\">\n <div class=\"flex items-center gap-2 min-w-0\">\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'a'\"\n [class.ring-ring]=\"compareActive() === 'a'\"\n (click)=\"setCompareSlot('a')\"\n uiTooltip=\"Edit color A with the picker above\"\n [attr.aria-label]=\"t().editColorA\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareAHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareAHex() }}</span>\n </button>\n <span class=\"text-xs text-muted-foreground shrink-0\">vs</span>\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'b'\"\n [class.ring-ring]=\"compareActive() === 'b'\"\n (click)=\"setCompareSlot('b')\"\n uiTooltip=\"Edit color B with the picker above\"\n [attr.aria-label]=\"t().editColorB\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareBHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareBHex() }}</span>\n </button>\n </div>\n <div class=\"flex items-center gap-2 shrink-0\">\n <span class=\"font-mono text-xs\">{{ contrastRatioDisplay() }}:1</span>\n <span\n class=\"rounded px-1.5 py-0.5 text-[10px] font-semibold\"\n [class.bg-green-500]=\"badge.pass\"\n [class.text-white]=\"badge.pass\"\n [class.bg-destructive]=\"!badge.pass\"\n [class.text-destructive-foreground]=\"!badge.pass\"\n >{{ badge.label }}</span>\n </div>\n </div>\n }\n\n <ui-tabs [defaultValue]=\"formats()[0]\">\n <ui-tabs-list class=\"flex justify-start w-full h-8 gap-1\">\n @for (fmt of formats(); track fmt) {\n <ui-tabs-trigger [value]=\"fmt\" class=\"text-xs uppercase\">{{ fmt }}</ui-tabs-trigger>\n }\n </ui-tabs-list>\n\n @if (formats().includes('hex')) {\n <ui-tabs-content value=\"hex\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <ui-input\n type=\"text\"\n [ngModel]=\"formatValues().hex\"\n (ngModelChange)=\"onHexInput($event)\"\n placeholder=\"#000000\"\n class=\"h-8 text-xs font-mono flex-1\"\n />\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hex')\"\n [attr.aria-label]=\"t().copyHex\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hex' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('rgb')) {\n <ui-tabs-content value=\"rgb\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">R</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().r\"\n (ngModelChange)=\"onRgbChange('r', $event)\"\n [attr.aria-label]=\"t().red\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">G</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().g\"\n (ngModelChange)=\"onRgbChange('g', $event)\"\n [attr.aria-label]=\"t().green\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">B</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().b\"\n (ngModelChange)=\"onRgbChange('b', $event)\"\n [attr.aria-label]=\"t().blue\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().rgb }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('rgb')\"\n [attr.aria-label]=\"t().copyRgb\"\n >\n <ui-icon [name]=\"copiedFormat() === 'rgb' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('hsl')) {\n <ui-tabs-content value=\"hsl\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">H</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"hsl().h\"\n (ngModelChange)=\"onHslHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">S</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().s\"\n (ngModelChange)=\"onHslChange('s', $event)\"\n [attr.aria-label]=\"t().saturation\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">L</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().l\"\n (ngModelChange)=\"onHslChange('l', $event)\"\n [attr.aria-label]=\"t().lightness\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().hsl }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hsl')\"\n [attr.aria-label]=\"t().copyHsl\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hsl' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('oklch')) {\n <ui-tabs-content value=\"oklch\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().oklch }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('oklch')\"\n [attr.aria-label]=\"t().copyOklch\"\n >\n <ui-icon [name]=\"copiedFormat() === 'oklch' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n </ui-tabs>\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n} @else {\n <ui-popover [open]=\"open()\" (openChange)=\"open.set($event)\" [attr.dir]=\"dir()\">\n <ui-popover-trigger>\n <ng-content select=\"[colorPickerTrigger]\" />\n @if (!hasTrigger()) {\n <button\n type=\"button\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.data-slot]=\"'color-picker-trigger'\"\n >\n <span\n class=\"h-6 w-6 rounded border ui-color-picker-checker\"\n [style.backgroundColor]=\"currentColor()\"\n ></span>\n <span class=\"flex-1 text-start text-sm truncate font-mono\">{{ currentColor() || 'Select color' }}</span>\n <ui-icon name=\"chevron-down\" class=\"h-4 w-4 opacity-50\" />\n </button>\n }\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 p-3\" align=\"start\" [restoreFocus]=\"false\">\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n </ui-popover-content>\n </ui-popover>\n}\n", styles: [":host{--_d: var(--density-picker, var(--density, 1))}@layer components{[data-slot=color-picker-trigger]{height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}.ui-color-picker-checker{background-image:linear-gradient(45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(-45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,hsl(0 0% 80%) 75%),linear-gradient(-45deg,transparent 75%,hsl(0 0% 80%) 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}}\n"] }]
|
|
29727
|
+
], host: { class: 'inline-block' }, template: "<ng-template #colorPanel>\n <div class=\"flex flex-col gap-3\">\n\n @if (enableEyedropper() || enableImagePick()) {\n <div class=\"flex items-center justify-end gap-1\">\n @if (enableEyedropper()) {\n <ui-eyedropper\n variant=\"icon\"\n [fallbackTarget]=\"fallbackTarget()\"\n (colorPick)=\"onEyedropperPick($event)\"\n uiTooltip=\"Pick color from screen\"\n />\n }\n @if (enableImagePick()) {\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-9 items-center justify-center rounded-md border border-input bg-background text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n (click)=\"openImagePicker()\"\n [attr.aria-label]=\"t().pickColorFromImage\"\n data-slot=\"image-pick-trigger\"\n uiTooltip=\"Pick color from image\"\n >\n <ui-icon name=\"pipette-image\" class=\"h-4 w-4\" />\n </button>\n <input\n #imageFile\n type=\"file\"\n accept=\"image/*\"\n hidden\n (change)=\"onImageSelected($event)\"\n />\n }\n </div>\n }\n\n <div\n #colorArea\n class=\"relative h-32 w-full cursor-crosshair rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n style=\"touch-action: none\"\n [style.background]=\"areaBackground()\"\n tabindex=\"0\"\n role=\"slider\"\n [attr.aria-label]=\"t().saturationValue\"\n [attr.aria-valuenow]=\"saturation()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"100\"\n [attr.aria-valuetext]=\"'S ' + saturation() + '%, V ' + hsvValue() + '%'\"\n (mousedown)=\"onAreaMouseDown($event)\"\n (touchstart)=\"onAreaTouchStart($event)\"\n (keydown)=\"onAreaKeyDown($event)\"\n >\n <div\n class=\"absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-sm pointer-events-none\"\n [style.left.%]=\"saturation()\"\n [style.top.%]=\"100 - hsvValue()\"\n [style.backgroundColor]=\"currentColor()\"\n ></div>\n </div>\n\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-hue\" class=\"text-xs text-muted-foreground\">Hue</label>\n <input\n id=\"ui-color-picker-hue\"\n type=\"range\"\n min=\"0\"\n max=\"360\"\n [value]=\"hue()\"\n (input)=\"onHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"hueGradient\"\n />\n </div>\n\n @if (alpha()) {\n <div class=\"space-y-1\">\n <label for=\"ui-color-picker-alpha\" class=\"text-xs text-muted-foreground\">Alpha</label>\n <div class=\"relative h-3 w-full rounded-md ui-color-picker-checker\">\n <input\n id=\"ui-color-picker-alpha\"\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"1\"\n [value]=\"alphaValue() * 100\"\n (input)=\"onAlphaChange($event)\"\n [attr.aria-label]=\"t().alpha\"\n class=\"absolute inset-0 w-full h-3 rounded-md cursor-pointer appearance-none\"\n [style.background]=\"alphaGradient()\"\n />\n </div>\n </div>\n }\n\n @if (showRecent() && recents().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">{{ t().recent }}</legend>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().recentColors\">\n @for (color of recents(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform ui-color-picker-checker\"\n [style.backgroundColor]=\"color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Apply recent ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (extractedPalette().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <div class=\"flex items-center justify-between\">\n <legend class=\"text-xs text-muted-foreground p-0\">From image</legend>\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-foreground\"\n (click)=\"clearExtractedPalette()\"\n >Clear</button>\n </div>\n <ul class=\"flex flex-wrap gap-1 list-none p-0 m-0\" [attr.aria-label]=\"t().extractedPalette\">\n @for (color of extractedPalette(); track color) {\n <li>\n <button\n type=\"button\"\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"applyExtracted(color)\"\n [attr.aria-label]=\"'Apply extracted ' + color\"\n ></button>\n </li>\n }\n </ul>\n </fieldset>\n }\n\n @if (presets().length > 0) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Presets</legend>\n <div class=\"flex flex-wrap gap-1\">\n @for (color of presets(); track color) {\n <button\n type=\"button\"\n data-color-btn\n class=\"aspect-square w-6 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n [class.ring-2]=\"currentColor() === color\"\n [class.ring-primary]=\"currentColor() === color\"\n (click)=\"selectPreset(color)\"\n [attr.aria-label]=\"'Select ' + color\"\n ></button>\n }\n </div>\n </fieldset>\n }\n\n @if (showHarmonies()) {\n <fieldset class=\"space-y-1 border-0 p-0 m-0\">\n <legend class=\"text-xs text-muted-foreground p-0\">Harmonies</legend>\n <div class=\"space-y-1\">\n @for (group of harmonyGroups(); track group.label) {\n <div class=\"flex items-center gap-2\">\n <span\n class=\"w-20 text-[10px] text-muted-foreground cursor-help underline decoration-dotted underline-offset-2\"\n [uiTooltip]=\"group.hint\"\n >{{ group.label }}</span>\n <div class=\"flex items-center gap-1\">\n @for (color of group.swatches; track color) {\n <button\n type=\"button\"\n class=\"relative aspect-square w-5 rounded border cursor-pointer hover:scale-110 transition-transform\"\n [style.backgroundColor]=\"color\"\n (click)=\"copyHarmony(color)\"\n [uiTooltip]=\"copiedHarmony() === color ? 'Copied ' + color : 'Click to copy ' + color\"\n [attr.aria-label]=\"'Copy ' + color\"\n >\n @if (copiedHarmony() === color) {\n <span class=\"absolute inset-0 flex items-center justify-center rounded bg-foreground/80 text-background\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n </span>\n }\n </button>\n }\n @if (copiedHarmony(); as copied) {\n @if (groupContains(group, copied)) {\n <span class=\"ml-1 inline-flex items-center gap-1 rounded bg-green-500/15 px-1.5 py-0.5 text-[10px] font-medium text-green-700 dark:text-green-300\">\n <ui-icon name=\"check\" class=\"h-3 w-3\" />\n {{ copied }}\n </span>\n }\n }\n </div>\n </div>\n }\n </div>\n </fieldset>\n }\n\n @if (showContrast() && contrastBadge(); as badge) {\n <div class=\"mt-3 flex items-center justify-between gap-2 rounded-md border border-input px-2 py-1.5\">\n <div class=\"flex items-center gap-2 min-w-0\">\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'a'\"\n [class.ring-ring]=\"compareActive() === 'a'\"\n (click)=\"setCompareSlot('a')\"\n uiTooltip=\"Edit color A with the picker above\"\n [attr.aria-label]=\"t().editColorA + ' ' + compareAHex()\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareAHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareAHex() }}</span>\n </button>\n <span class=\"text-xs text-muted-foreground shrink-0\">vs</span>\n <button\n type=\"button\"\n class=\"flex flex-col items-center gap-0.5 rounded p-1 transition focus:outline-none\"\n [class.ring-2]=\"compareActive() === 'b'\"\n [class.ring-ring]=\"compareActive() === 'b'\"\n (click)=\"setCompareSlot('b')\"\n uiTooltip=\"Edit color B with the picker above\"\n [attr.aria-label]=\"t().editColorB + ' ' + compareBHex()\"\n >\n <span\n class=\"block h-6 w-6 rounded border\"\n [style.backgroundColor]=\"compareBHex()\"\n ></span>\n <span class=\"font-mono text-[9px] text-muted-foreground\">{{ compareBHex() }}</span>\n </button>\n </div>\n <div class=\"flex items-center gap-2 shrink-0\">\n <span class=\"font-mono text-xs\">{{ contrastRatioDisplay() }}:1</span>\n <span\n class=\"rounded px-1.5 py-0.5 text-[10px] font-semibold\"\n [class.bg-green-700]=\"badge.pass\"\n [class.text-white]=\"badge.pass\"\n [class.bg-destructive]=\"!badge.pass\"\n [class.text-destructive-foreground]=\"!badge.pass\"\n >{{ badge.label }}</span>\n </div>\n </div>\n }\n\n <ui-tabs [defaultValue]=\"formats()[0]\">\n <ui-tabs-list class=\"flex justify-start w-full h-8 gap-1\">\n @for (fmt of formats(); track fmt) {\n <ui-tabs-trigger [value]=\"fmt\" class=\"text-xs uppercase\">{{ fmt }}</ui-tabs-trigger>\n }\n </ui-tabs-list>\n\n @if (formats().includes('hex')) {\n <ui-tabs-content value=\"hex\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <ui-input\n type=\"text\"\n [ngModel]=\"formatValues().hex\"\n (ngModelChange)=\"onHexInput($event)\"\n placeholder=\"#000000\"\n class=\"h-8 text-xs font-mono flex-1\"\n />\n <button\n type=\"button\"\n class=\"inline-flex h-8 w-8 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hex')\"\n [attr.aria-label]=\"t().copyHex\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hex' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('rgb')) {\n <ui-tabs-content value=\"rgb\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">R</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().r\"\n (ngModelChange)=\"onRgbChange('r', $event)\"\n [attr.aria-label]=\"t().red\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">G</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().g\"\n (ngModelChange)=\"onRgbChange('g', $event)\"\n [attr.aria-label]=\"t().green\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">B</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [ngModel]=\"rgb().b\"\n (ngModelChange)=\"onRgbChange('b', $event)\"\n [attr.aria-label]=\"t().blue\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().rgb }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('rgb')\"\n [attr.aria-label]=\"t().copyRgb\"\n >\n <ui-icon [name]=\"copiedFormat() === 'rgb' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('hsl')) {\n <ui-tabs-content value=\"hsl\" class=\"mt-2\">\n <div class=\"space-y-2\">\n <div class=\"grid grid-cols-3 gap-2\">\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">H</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [ngModel]=\"hsl().h\"\n (ngModelChange)=\"onHslHueChange($event)\"\n [attr.aria-label]=\"t().hue\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">S</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().s\"\n (ngModelChange)=\"onHslChange('s', $event)\"\n [attr.aria-label]=\"t().saturation\"\n class=\"h-8 text-xs\"\n />\n </div>\n <div>\n <span class=\"text-xs text-muted-foreground\" aria-hidden=\"true\">L</span>\n <ui-input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [ngModel]=\"hsl().l\"\n (ngModelChange)=\"onHslChange('l', $event)\"\n [attr.aria-label]=\"t().lightness\"\n class=\"h-8 text-xs\"\n />\n </div>\n </div>\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().hsl }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('hsl')\"\n [attr.aria-label]=\"t().copyHsl\"\n >\n <ui-icon [name]=\"copiedFormat() === 'hsl' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n </ui-tabs-content>\n }\n\n @if (formats().includes('oklch')) {\n <ui-tabs-content value=\"oklch\" class=\"mt-2\">\n <div class=\"flex items-center gap-1\">\n <span class=\"flex-1 truncate text-xs font-mono text-muted-foreground\">{{ formatValues().oklch }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 pointer-coarse:size-11 items-center justify-center rounded-md text-muted-foreground hover:text-foreground\"\n (click)=\"copy('oklch')\"\n [attr.aria-label]=\"t().copyOklch\"\n >\n <ui-icon [name]=\"copiedFormat() === 'oklch' ? 'check' : 'copy'\" class=\"h-4 w-4\" />\n </button>\n </div>\n </ui-tabs-content>\n }\n </ui-tabs>\n </div>\n</ng-template>\n\n@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n} @else {\n <ui-popover [open]=\"open()\" (openChange)=\"open.set($event)\" [attr.dir]=\"dir()\">\n <ui-popover-trigger>\n <ng-content select=\"[colorPickerTrigger]\" />\n @if (!hasTrigger()) {\n <button\n type=\"button\"\n [class]=\"triggerClasses()\"\n [disabled]=\"isDisabled()\"\n [attr.data-slot]=\"'color-picker-trigger'\"\n >\n <span\n class=\"h-6 w-6 rounded border ui-color-picker-checker\"\n [style.backgroundColor]=\"currentColor()\"\n ></span>\n <span class=\"flex-1 text-start text-sm truncate font-mono\">{{ currentColor() || 'Select color' }}</span>\n <span class=\"inline-flex opacity-50\"><ui-icon name=\"chevron-down\" class=\"h-4 w-4\" /></span>\n </button>\n }\n </ui-popover-trigger>\n <ui-popover-content class=\"w-72 p-3\" align=\"start\" [restoreFocus]=\"false\">\n <ng-container [ngTemplateOutlet]=\"colorPanel\" />\n </ui-popover-content>\n </ui-popover>\n}\n", styles: [":host{--_d: var(--density-picker, var(--density, 1))}@layer components{[data-slot=color-picker-trigger]{height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}.ui-color-picker-checker{background-image:linear-gradient(45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(-45deg,hsl(0 0% 80%) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,hsl(0 0% 80%) 75%),linear-gradient(-45deg,transparent 75%,hsl(0 0% 80%) 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}}\n"] }]
|
|
29545
29728
|
}], ctorParameters: () => [], propDecorators: { presets: [{ type: i0.Input, args: [{ isSignal: true, alias: "presets", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], alpha: [{ type: i0.Input, args: [{ isSignal: true, alias: "alpha", required: false }] }], recentColors: [{ type: i0.Input, args: [{ isSignal: true, alias: "recentColors", required: false }] }], showRecent: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRecent", required: false }] }], maxRecent: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxRecent", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], enableEyedropper: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableEyedropper", required: false }] }], fallbackTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackTarget", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], enableImagePick: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableImagePick", required: false }] }], imageExtractAlgorithm: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageExtractAlgorithm", required: false }] }], imageExtractCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageExtractCount", required: false }] }], showHarmonies: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHarmonies", required: false }] }], showContrast: [{ type: i0.Input, args: [{ isSignal: true, alias: "showContrast", required: false }] }], contrastBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "contrastBackground", required: false }] }], formats: [{ type: i0.Input, args: [{ isSignal: true, alias: "formats", required: false }] }], colorChange: [{ type: i0.Output, args: ["colorChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], recentColorsChange: [{ type: i0.Output, args: ["recentColorsChange"] }], colorArea: [{ type: i0.ViewChild, args: ['colorArea', { isSignal: true }] }], imageFile: [{ type: i0.ViewChild, args: ['imageFile', { isSignal: true }] }] } });
|
|
29546
29729
|
|
|
29547
29730
|
const RICH_TEXT_COLOR_BUTTON_CONTEXT = new InjectionToken('RICH_TEXT_COLOR_BUTTON_CONTEXT');
|
|
@@ -32390,6 +32573,14 @@ const EMOJI_DATA = {
|
|
|
32390
32573
|
|
|
32391
32574
|
/** How many leading keywords make up an emoji's spoken name. */
|
|
32392
32575
|
const EMOJI_LABEL_WORDS = 3;
|
|
32576
|
+
/** Frames the scroll position must hold still before a category jump counts as finished. */
|
|
32577
|
+
const SETTLE_STABLE_FRAMES = 3;
|
|
32578
|
+
/** Frames a smooth scroll may sit at its start position (a busy main thread delays its first step) before "not moving" counts as "arrived". */
|
|
32579
|
+
const SETTLE_START_GRACE_FRAMES = 20;
|
|
32580
|
+
/** Upper bound (~4s at 60fps) so a stuck scroll can never leave the scroll-spy suppressed. */
|
|
32581
|
+
const SETTLE_MAX_FRAMES = 240;
|
|
32582
|
+
/** Re-aims allowed once the scroll stops: each one corrects a height estimate, and a few cover the worst case. */
|
|
32583
|
+
const SETTLE_MAX_REAIMS = 5;
|
|
32393
32584
|
class EmojiPickerContentComponent {
|
|
32394
32585
|
set scrollArea(value) {
|
|
32395
32586
|
this._scrollArea = value;
|
|
@@ -32554,29 +32745,63 @@ class EmojiPickerContentComponent {
|
|
|
32554
32745
|
/**
|
|
32555
32746
|
* Jumps the grid to a category section, clearing the search box first so every
|
|
32556
32747
|
* category is present to scroll to. The scroll is smooth and the scroll-spy that
|
|
32557
|
-
* normally tracks the active tab is suppressed
|
|
32558
|
-
*
|
|
32748
|
+
* normally tracks the active tab is suppressed until the animation has settled so it
|
|
32749
|
+
* cannot fight it.
|
|
32559
32750
|
*/
|
|
32560
32751
|
scrollToCategory(categoryId) {
|
|
32561
32752
|
this.searchQuery.set('');
|
|
32562
32753
|
this.activeCategory.set(categoryId);
|
|
32563
32754
|
this.isScrollingProgrammatically = true;
|
|
32564
32755
|
setTimeout(() => {
|
|
32565
|
-
|
|
32566
|
-
const section = this.el.nativeElement.querySelector(`[data-category="${categoryId}"]`);
|
|
32567
|
-
if (section && viewport) {
|
|
32568
|
-
const relativeTop = section.getBoundingClientRect().top - viewport.getBoundingClientRect().top;
|
|
32569
|
-
const scrollTop = viewport.scrollTop + relativeTop;
|
|
32570
|
-
viewport.scrollTo({ top: scrollTop, behavior: 'smooth' });
|
|
32571
|
-
setTimeout(() => {
|
|
32572
|
-
this.isScrollingProgrammatically = false;
|
|
32573
|
-
}, 800);
|
|
32574
|
-
}
|
|
32575
|
-
else {
|
|
32756
|
+
if (this.alignToCategory(categoryId, 'smooth') === null) {
|
|
32576
32757
|
this.isScrollingProgrammatically = false;
|
|
32758
|
+
return;
|
|
32577
32759
|
}
|
|
32760
|
+
// Sections are content-visibility:auto with an estimated height, so the
|
|
32761
|
+
// scroll height changes as the animation passes them; re-aim once it ends.
|
|
32762
|
+
const startTop = this.scrollViewport()?.scrollTop ?? 0;
|
|
32763
|
+
this.settleOnCategory(categoryId, { startTop, lastTop: startTop, stableFrames: 0, moved: false, framesLeft: SETTLE_MAX_FRAMES, reaimsLeft: SETTLE_MAX_REAIMS });
|
|
32764
|
+
});
|
|
32765
|
+
}
|
|
32766
|
+
/**
|
|
32767
|
+
* Waits until the smooth scroll has stopped moving (its length depends on distance and on how
|
|
32768
|
+
* busy the frame loop is, so a fixed delay is a bet), then snaps the heading into place.
|
|
32769
|
+
*/
|
|
32770
|
+
settleOnCategory(categoryId, state) {
|
|
32771
|
+
const top = this.scrollViewport()?.scrollTop ?? 0;
|
|
32772
|
+
const moved = state.moved || top !== state.startTop;
|
|
32773
|
+
const stable = top === state.lastTop ? state.stableFrames + 1 : 0;
|
|
32774
|
+
// A smooth scroll that has not taken its first step yet looks identical to one that has finished;
|
|
32775
|
+
// only a seen movement, or the start grace running out (we were already there), makes stillness mean arrival.
|
|
32776
|
+
const arrived = stable >= SETTLE_STABLE_FRAMES && (moved || SETTLE_MAX_FRAMES - state.framesLeft >= SETTLE_START_GRACE_FRAMES);
|
|
32777
|
+
if (state.framesLeft > 0 && !arrived) {
|
|
32778
|
+
requestAnimationFrame(() => this.settleOnCategory(categoryId, { ...state, lastTop: top, stableFrames: stable, moved, framesLeft: state.framesLeft - 1 }));
|
|
32779
|
+
return;
|
|
32780
|
+
}
|
|
32781
|
+
const offset = this.alignToCategory(categoryId, 'auto');
|
|
32782
|
+
if (offset !== null && Math.abs(offset) > 1 && state.reaimsLeft > 0) {
|
|
32783
|
+
requestAnimationFrame(() => this.settleOnCategory(categoryId, { ...state, lastTop: top, stableFrames: 0, moved: true, framesLeft: state.framesLeft - 1, reaimsLeft: state.reaimsLeft - 1 }));
|
|
32784
|
+
return;
|
|
32785
|
+
}
|
|
32786
|
+
setTimeout(() => {
|
|
32787
|
+
this.isScrollingProgrammatically = false;
|
|
32578
32788
|
});
|
|
32579
32789
|
}
|
|
32790
|
+
scrollViewport() {
|
|
32791
|
+
return this._scrollArea?.viewportRef?.nativeElement;
|
|
32792
|
+
}
|
|
32793
|
+
/** Scrolls so the section's heading sits at the viewport top; returns how far it was off, or null when the section or viewport is missing. */
|
|
32794
|
+
alignToCategory(categoryId, behavior) {
|
|
32795
|
+
const viewport = this.scrollViewport();
|
|
32796
|
+
const section = this.el.nativeElement.querySelector(`[data-category="${categoryId}"]`);
|
|
32797
|
+
if (!section || !viewport)
|
|
32798
|
+
return null;
|
|
32799
|
+
const relativeTop = section.getBoundingClientRect().top - viewport.getBoundingClientRect().top;
|
|
32800
|
+
if (behavior === 'smooth' || Math.abs(relativeTop) > 1) {
|
|
32801
|
+
viewport.scrollTo({ top: viewport.scrollTop + relativeTop, behavior });
|
|
32802
|
+
}
|
|
32803
|
+
return relativeTop;
|
|
32804
|
+
}
|
|
32580
32805
|
setupScrollListener(viewport) {
|
|
32581
32806
|
this.scrollRemoveListener?.();
|
|
32582
32807
|
const listener = () => this.onScroll();
|
|
@@ -33413,7 +33638,7 @@ class RichTextFileImportDirective {
|
|
|
33413
33638
|
async importDocx(file) {
|
|
33414
33639
|
this.assertImportableSize(file);
|
|
33415
33640
|
const bytes = new Uint8Array(await file.arrayBuffer());
|
|
33416
|
-
const { parseDocx } = await import('./gilav21-shadcn-angular-rte-docx-parser-
|
|
33641
|
+
const { parseDocx } = await import('./gilav21-shadcn-angular-rte-docx-parser-Yd5YQqOL.mjs');
|
|
33417
33642
|
const { renderDocxForEditor } = await import('./gilav21-shadcn-angular-rte-docx-to-editor-html-BreagmS_.mjs');
|
|
33418
33643
|
const html = renderDocxForEditor(parseDocx(bytes));
|
|
33419
33644
|
this.insertImported(html);
|
|
@@ -36288,8 +36513,12 @@ function resolveEntityUrl(context, options, sanitizeUrl) {
|
|
|
36288
36513
|
}
|
|
36289
36514
|
return raw ? sanitizeUrl(raw) : null;
|
|
36290
36515
|
}
|
|
36291
|
-
function applyEntityBaseAttributes(element, context) {
|
|
36516
|
+
function applyEntityBaseAttributes(element, context, mode) {
|
|
36292
36517
|
element.setAttribute('contenteditable', 'false');
|
|
36518
|
+
// `class` does not survive the sanitizer, so the mode is what tells the
|
|
36519
|
+
// chip look to leave a text/link entity alone after a round trip.
|
|
36520
|
+
if (mode !== 'chip')
|
|
36521
|
+
element.dataset['entityMode'] = mode;
|
|
36293
36522
|
if (context.type === 'mention') {
|
|
36294
36523
|
element.dataset['mention'] = context.value;
|
|
36295
36524
|
element.dataset['mentionId'] = context.id;
|
|
@@ -36301,7 +36530,7 @@ function applyEntityBaseAttributes(element, context) {
|
|
|
36301
36530
|
}
|
|
36302
36531
|
function createEntitySpanElement(doc, context, text, mode, customClassName) {
|
|
36303
36532
|
const span = doc.createElement('span');
|
|
36304
|
-
applyEntityBaseAttributes(span, context);
|
|
36533
|
+
applyEntityBaseAttributes(span, context, mode);
|
|
36305
36534
|
span.className = mode === 'text'
|
|
36306
36535
|
? (customClassName ?? '')
|
|
36307
36536
|
: (customClassName ?? 'bg-accent text-accent-foreground rounded px-1');
|
|
@@ -36314,7 +36543,7 @@ function createEntityLinkElement(doc, context, text, options, sanitizeUrl) {
|
|
|
36314
36543
|
return createEntitySpanElement(doc, context, text, 'chip', options.className);
|
|
36315
36544
|
}
|
|
36316
36545
|
const link = doc.createElement('a');
|
|
36317
|
-
applyEntityBaseAttributes(link, context);
|
|
36546
|
+
applyEntityBaseAttributes(link, context, 'link');
|
|
36318
36547
|
link.href = safeUrl;
|
|
36319
36548
|
link.target = options.target ?? '_blank';
|
|
36320
36549
|
link.rel = options.rel ?? 'noopener noreferrer';
|
|
@@ -40154,7 +40383,7 @@ class AutocompleteComponent {
|
|
|
40154
40383
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
40155
40384
|
multi: true,
|
|
40156
40385
|
},
|
|
40157
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "command", first: true, predicate: CommandComponent, descendants: true, isSignal: true }, { propertyName: "commandService", first: true, predicate: CommandComponent, descendants: true, read: CommandService, isSignal: true }], ngImport: i0, template: "<ui-popover [open]=\"open()\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger class=\"w-full\">\n <div\n [class]=\"containerClasses()\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.data-disabled]=\"isDisabled() || null\"\n [attr.data-slot]=\"'autocomplete-container'\"\n [attr.dir]=\"dir()\"\n tabindex=\"-1\"\n (click)=\"onContainerClick($event)\"\n (keydown.enter)=\"onContainerClick($event)\"\n (keydown.space)=\"onContainerClick($event)\"\n >\n @if (multiple()) {\n <div class=\"flex flex-wrap items-center gap-1 w-full\">\n @for (item of selectedItems(); track item; let i = $index) {\n <ui-badge variant=\"secondary\" class=\"gap-1 pe-0.5\">\n {{ getDisplayValue(item) }}\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full p-0.5 pointer-coarse:size-11 hover:bg-secondary-foreground/20 inline-flex items-center justify-center bg-transparent border-0\"\n data-slot=\"chip-remove\"\n (click)=\"removeItem(item, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-3 w-3\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>\n </button>\n </ui-badge>\n }\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"multiInputClasses()\"\n [placeholder]=\"selectedItems().length === 0 ? (placeholder() ?? t().selectPlaceholder) : ''\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n />\n </div>\n } @else {\n <div class=\"flex items-center w-full gap-2\">\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"singleInputClasses()\"\n [placeholder]=\"placeholder() ?? t().selectPlaceholder\"\n [disabled]=\"isDisabled()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4 opacity-50 shrink-0\"><path d=\"m6 9 6 6 6-6\"/></svg>\n </div>\n }\n </div>\n </ui-popover-trigger>\n <ui-popover-content [side]=\"dropdownSide()\" class=\"w-
|
|
40386
|
+
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }, { propertyName: "command", first: true, predicate: CommandComponent, descendants: true, isSignal: true }, { propertyName: "commandService", first: true, predicate: CommandComponent, descendants: true, read: CommandService, isSignal: true }], ngImport: i0, template: "<ui-popover [open]=\"open()\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger class=\"w-full\">\n <div\n [class]=\"containerClasses()\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.data-disabled]=\"isDisabled() || null\"\n [attr.data-slot]=\"'autocomplete-container'\"\n [attr.dir]=\"dir()\"\n tabindex=\"-1\"\n (click)=\"onContainerClick($event)\"\n (keydown.enter)=\"onContainerClick($event)\"\n (keydown.space)=\"onContainerClick($event)\"\n >\n @if (multiple()) {\n <div class=\"flex flex-wrap items-center gap-1 w-full\">\n @for (item of selectedItems(); track item; let i = $index) {\n <ui-badge variant=\"secondary\" class=\"gap-1 pe-0.5\">\n {{ getDisplayValue(item) }}\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full p-0.5 pointer-coarse:size-11 hover:bg-secondary-foreground/20 inline-flex items-center justify-center bg-transparent border-0\"\n data-slot=\"chip-remove\"\n (click)=\"removeItem(item, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-3 w-3\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>\n </button>\n </ui-badge>\n }\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"multiInputClasses()\"\n [placeholder]=\"selectedItems().length === 0 ? (placeholder() ?? t().selectPlaceholder) : ''\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n />\n </div>\n } @else {\n <div class=\"flex items-center w-full gap-2\">\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"singleInputClasses()\"\n [placeholder]=\"placeholder() ?? t().selectPlaceholder\"\n [disabled]=\"isDisabled()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4 opacity-50 shrink-0\"><path d=\"m6 9 6 6 6-6\"/></svg>\n </div>\n }\n </div>\n </ui-popover-trigger>\n <ui-popover-content [side]=\"dropdownSide()\" class=\"w-(--trigger-width) p-0\" align=\"start\" [restoreFocus]=\"false\" [avoidCollisions]=\"avoidPopoverCollisions()\">\n <ui-command [shouldFilter]=\"filter()\" [search]=\"searchTerm()\" [attr.dir]=\"dir()\">\n <ui-command-list [attr.id]=\"listId\" role=\"listbox\">\n <ui-command-empty>{{ t().noResults }}</ui-command-empty>\n\n @for (option of options(); track getTrackBy(option)) {\n <ui-command-item\n [value]=\"getSearchValue(option)\"\n [selected]=\"isSelected(option)\"\n (selectItem)=\"onSelect(option)\"\n >\n <span class=\"truncate\" [innerHTML]=\"getDisplayValue(option) | highlight: searchTerm()\"></span>\n <span class=\"ms-auto flex h-3.5 w-3.5 shrink-0 items-center justify-center opacity-0\" [class.opacity-100]=\"isSelected(option)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><polyline points=\"20 6 9 17 4 12\"/></svg>\n </span>\n </ui-command-item>\n }\n </ui-command-list>\n </ui-command>\n </ui-popover-content>\n</ui-popover>\n", styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=autocomplete-container]{min-height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"], dependencies: [{ kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: CommandComponent, selector: "ui-command", inputs: ["class", "shouldFilter", "search", "source", "debounce", "recentKey", "recentLimit"] }, { kind: "component", type: CommandListComponent, selector: "ui-command-list", inputs: ["class", "ariaLabel"] }, { kind: "component", type: CommandItemComponent, selector: "ui-command-item", inputs: ["class", "disabled", "selected", "value", "shortcut"], outputs: ["selectItem"] }, { kind: "component", type: CommandEmptyComponent, selector: "ui-command-empty", inputs: ["class"] }, { kind: "component", type: BadgeComponent, selector: "ui-badge", inputs: ["variant", "label", "class", "skeleton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
40158
40387
|
}
|
|
40159
40388
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
40160
40389
|
type: Component,
|
|
@@ -40175,7 +40404,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
40175
40404
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
40176
40405
|
multi: true,
|
|
40177
40406
|
},
|
|
40178
|
-
], host: { class: 'contents' }, template: "<ui-popover [open]=\"open()\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger class=\"w-full\">\n <div\n [class]=\"containerClasses()\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.data-disabled]=\"isDisabled() || null\"\n [attr.data-slot]=\"'autocomplete-container'\"\n [attr.dir]=\"dir()\"\n tabindex=\"-1\"\n (click)=\"onContainerClick($event)\"\n (keydown.enter)=\"onContainerClick($event)\"\n (keydown.space)=\"onContainerClick($event)\"\n >\n @if (multiple()) {\n <div class=\"flex flex-wrap items-center gap-1 w-full\">\n @for (item of selectedItems(); track item; let i = $index) {\n <ui-badge variant=\"secondary\" class=\"gap-1 pe-0.5\">\n {{ getDisplayValue(item) }}\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full p-0.5 pointer-coarse:size-11 hover:bg-secondary-foreground/20 inline-flex items-center justify-center bg-transparent border-0\"\n data-slot=\"chip-remove\"\n (click)=\"removeItem(item, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-3 w-3\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>\n </button>\n </ui-badge>\n }\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"multiInputClasses()\"\n [placeholder]=\"selectedItems().length === 0 ? (placeholder() ?? t().selectPlaceholder) : ''\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n />\n </div>\n } @else {\n <div class=\"flex items-center w-full gap-2\">\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"singleInputClasses()\"\n [placeholder]=\"placeholder() ?? t().selectPlaceholder\"\n [disabled]=\"isDisabled()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4 opacity-50 shrink-0\"><path d=\"m6 9 6 6 6-6\"/></svg>\n </div>\n }\n </div>\n </ui-popover-trigger>\n <ui-popover-content [side]=\"dropdownSide()\" class=\"w-
|
|
40407
|
+
], host: { class: 'contents' }, template: "<ui-popover [open]=\"open()\" (openChange)=\"onOpenChange($event)\">\n <ui-popover-trigger class=\"w-full\">\n <div\n [class]=\"containerClasses()\"\n [attr.data-state]=\"open() ? 'open' : 'closed'\"\n [attr.data-disabled]=\"isDisabled() || null\"\n [attr.data-slot]=\"'autocomplete-container'\"\n [attr.dir]=\"dir()\"\n tabindex=\"-1\"\n (click)=\"onContainerClick($event)\"\n (keydown.enter)=\"onContainerClick($event)\"\n (keydown.space)=\"onContainerClick($event)\"\n >\n @if (multiple()) {\n <div class=\"flex flex-wrap items-center gap-1 w-full\">\n @for (item of selectedItems(); track item; let i = $index) {\n <ui-badge variant=\"secondary\" class=\"gap-1 pe-0.5\">\n {{ getDisplayValue(item) }}\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full p-0.5 pointer-coarse:size-11 hover:bg-secondary-foreground/20 inline-flex items-center justify-center bg-transparent border-0\"\n data-slot=\"chip-remove\"\n (click)=\"removeItem(item, $event)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-3 w-3\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>\n </button>\n </ui-badge>\n }\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"multiInputClasses()\"\n [placeholder]=\"selectedItems().length === 0 ? (placeholder() ?? t().selectPlaceholder) : ''\"\n [disabled]=\"isDisabled()\"\n [(ngModel)]=\"searchTerm\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n />\n </div>\n } @else {\n <div class=\"flex items-center w-full gap-2\">\n <input\n #inputEl\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-activedescendant]=\"activeItemId()\"\n [class]=\"singleInputClasses()\"\n [placeholder]=\"placeholder() ?? t().selectPlaceholder\"\n [disabled]=\"isDisabled()\"\n [value]=\"inputValue()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4 opacity-50 shrink-0\"><path d=\"m6 9 6 6 6-6\"/></svg>\n </div>\n }\n </div>\n </ui-popover-trigger>\n <ui-popover-content [side]=\"dropdownSide()\" class=\"w-(--trigger-width) p-0\" align=\"start\" [restoreFocus]=\"false\" [avoidCollisions]=\"avoidPopoverCollisions()\">\n <ui-command [shouldFilter]=\"filter()\" [search]=\"searchTerm()\" [attr.dir]=\"dir()\">\n <ui-command-list [attr.id]=\"listId\" role=\"listbox\">\n <ui-command-empty>{{ t().noResults }}</ui-command-empty>\n\n @for (option of options(); track getTrackBy(option)) {\n <ui-command-item\n [value]=\"getSearchValue(option)\"\n [selected]=\"isSelected(option)\"\n (selectItem)=\"onSelect(option)\"\n >\n <span class=\"truncate\" [innerHTML]=\"getDisplayValue(option) | highlight: searchTerm()\"></span>\n <span class=\"ms-auto flex h-3.5 w-3.5 shrink-0 items-center justify-center opacity-0\" [class.opacity-100]=\"isSelected(option)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><polyline points=\"20 6 9 17 4 12\"/></svg>\n </span>\n </ui-command-item>\n }\n </ui-command-list>\n </ui-command>\n </ui-popover-content>\n</ui-popover>\n", styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=autocomplete-container]{min-height:calc(2.5rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"] }]
|
|
40179
40408
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], displayWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayWith", required: false }] }], valueAttribute: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueAttribute", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }], searchTerm: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchTerm", required: false }] }, { type: i0.Output, args: ["searchTermChange"] }], inputEl: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], command: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CommandComponent), { isSignal: true }] }], commandService: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CommandComponent), { ...{ read: CommandService }, isSignal: true }] }] } });
|
|
40180
40409
|
|
|
40181
40410
|
const RICH_TEXT_TYPOGRAPHY_BUTTON_CONTEXT = new InjectionToken('RICH_TEXT_TYPOGRAPHY_BUTTON_CONTEXT');
|
|
@@ -40452,4 +40681,4 @@ const RTE_FULL = [
|
|
|
40452
40681
|
*/
|
|
40453
40682
|
|
|
40454
40683
|
export { RichTextAllowHost as $, ACTION_ATTRS as A, RICH_TEXT_LOCALES as B, RICH_TEXT_MENTIONS_LOCALES as C, DEFAULT_COLOR_PALETTE as D, EMPTINESS_FIXTURES as E, FIND_MAX_PAINTED_RECTS as F, RICH_TEXT_OUTLINE_CONTEXT as G, HEADER_BYTES as H, IMAGE_IMPORT_ACCEPT as I, RICH_TEXT_OUTLINE_LOCALES as J, RICH_TEXT_PROSE_CLASSES as K, RICH_TEXT_SHORTCUT_DEFINITIONS as L, MAX_NESTING_DEPTH as M, RICH_TEXT_SLASH_COMMANDS_LOCALES as N, RICH_TEXT_TABLES_BUTTON_CONTEXT as O, PDF_MIME as P, RICH_TEXT_TABLES_LOCALES as Q, RICH_TEXT_ACTIONS_SANITIZER_RULES as R, RICH_TEXT_TYPOGRAPHY_BUTTON_CONTEXT as S, RICH_TEXT_TYPOGRAPHY_LOCALES as T, RTE_FULL as U, RichTextActionsBindDirective as V, RichTextActionsDirective as W, RichTextAiChipComponent as X, RichTextAiDirective as Y, RichTextAiPanelComponent as Z, RichTextAllowDirective as _, ACTION_PARAMS as a, flattenIntoRowText as a$, RichTextColorsButtonComponent as a0, RichTextColorsDirective as a1, RichTextCommandRegistry as a2, RichTextEditorAddonHost as a3, RichTextEditorComponent as a4, RichTextEmojiButtonComponent as a5, RichTextEmojiDirective as a6, RichTextFileImportButtonComponent as a7, RichTextFileImportDirective as a8, RichTextFileImportOverlayComponent as a9, TRANSPARENT_PIXEL as aA, addonSetting as aB, anchorOverlay as aC, applyImageAlignment as aD, applyStarterStyle as aE, assertFlatParams as aF, bindRichTextActions as aG, blockquoteDepthOf as aH, buildDefaultSlashCommands as aI, buildEntityInsertNode as aJ, buildEntityRenderContext as aK, buildFindIndex as aL, buildLineIndex as aM, caretPosition as aN, childList as aO, classifyImport as aP, compileFindRegex as aQ, computeSeedStyleString as aR, containsCssUrl as aS, createImageElement as aT, cssFunctionCalls as aU, dataUrlToFile as aV, decodeCssEscapes as aW, detectTrigger as aX, directionOf as aY, dragHasSupportedDocument as aZ, extractCssUrls as a_, RichTextHistoryDirective as aa, RichTextHistoryPanelComponent as ab, RichTextImageResizerComponent as ac, RichTextImagesButtonComponent as ad, RichTextImagesDirective as ae, RichTextImagesOverlayComponent as af, RichTextLinksButtonComponent as ag, RichTextLinksDirective as ah, RichTextLinksFormComponent as ai, RichTextMarkdownService as aj, RichTextMentionPopoverComponent as ak, RichTextMentionsDirective as al, RichTextOutlineDirective as am, RichTextOutlinePanelComponent as an, RichTextPasteNormalizerService as ao, RichTextSanitizerService as ap, RichTextSlashCommandsDirective as aq, RichTextSlashCommandsMenuComponent as ar, RichTextTablesButtonComponent as as, RichTextTablesDirective as at, RichTextToolbarComponent as au, RichTextToolbarViewContext as av, RichTextTypographyButtonComponent as aw, RichTextTypographyDirective as ax, TEXT_STYLE_OPTIONS as ay, TOOLBAR_BUTTONS as az, AddonSlotRegistry as b, validateActionParams as b$, hasUnsafeCssFunction as b0, holdsNothing as b1, hostOf as b2, hoverCardAction as b3, hoverCardHandlers as b4, inlineElementsHoldingBlocks as b5, isCombinedOnElement as b6, isHostAllowed as b7, isHostBearingUrl as b8, isLineOwner as b9, offsetToPosition as bA, openDialogAction as bB, openDialogHandlers as bC, parseImageSize as bD, placeCaretIn as bE, placeImageAtSelection as bF, positionAfterLine as bG, rangeShowsNothing as bH, readActions as bI, readFileAsDataUrl as bJ, remoteHostOf as bK, removeAction as bL, reportResourceDecisions as bM, resolveFromPage as bN, richTextHasMedia as bO, richTextMaxLength as bP, richTextMinWords as bQ, richTextRequired as bR, richTextVisibleText as bS, rowRunsOf as bT, selectTriggerRange as bU, separateListKinds as bV, simpleHash as bW, stripCssComments as bX, stripStyleIfMatches as bY, structureAround as bZ, validateActionId as b_, isNestedList as ba, isPdfHeader as bb, isPhrasing as bc, isRichTextEmpty as bd, isSupportedDocumentFile as be, isZipHeader as bf, labelBlockedImages as bg, lastOwnInlineNode as bh, lineAbove as bi, lineBelow as bj, lineIsEmpty as bk, lineIsTextOnly as bl, lineKeepsItsElement as bm, lineOf as bn, lineOwnNodes as bo, lineTagIsFixed as bp, lineText as bq, linesBetween as br, linesMayJoin as bs, linkedPreviewDialogAction as bt, linkedPreviewDialogHandlers as bu, matchBlockInputRule as bv, matchInlineInputRule as bw, mountTopLayer as bx, nodeShowsNothing as by, normalizeHostEntry as bz, DEFAULT_FONT_FAMILIES as c, writeAction as c0, writeCombined as c1, DEFAULT_HIGHLIGHT_PALETTE as d, DEFAULT_LINK_SCHEMES as e, DEFAULT_TOOLBAR_ITEMS as f, DOCUMENT_IMPORT_ACCEPT as g, DOCX_MIME as h, isValidImageMagicBytes as i, FIND_MAX_QUERY_LENGTH as j, INLINE_RULE_LOOKBEHIND as k, PresetDialogComponent as l, PresetHoverCardComponent as m, RICH_TEXT_AI_CONTEXT as n, RICH_TEXT_AI_LOCALES as o, RICH_TEXT_COLORS_LOCALES as p, RICH_TEXT_COLOR_BUTTON_CONTEXT as q, RICH_TEXT_EMOJI_CONTEXT as r, RICH_TEXT_EMOJI_LOCALES as s, RICH_TEXT_FILE_IMPORT_BUTTON_CONTEXT as t, RICH_TEXT_FILE_IMPORT_LOCALES as u, RICH_TEXT_HISTORY_LOCALES as v, RICH_TEXT_IMAGES_BUTTON_CONTEXT as w, RICH_TEXT_IMAGES_LOCALES as x, RICH_TEXT_LINKS_BUTTON_CONTEXT as y, RICH_TEXT_LINKS_LOCALES as z };
|
|
40455
|
-
//# sourceMappingURL=gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-
|
|
40684
|
+
//# sourceMappingURL=gilav21-shadcn-angular-rte-gilav21-shadcn-angular-rte-ATpviG2l.mjs.map
|