yukit-web 0.9.0 → 0.9.2
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/yukit-web.mjs +71 -25
- package/fesm2022/yukit-web.mjs.map +1 -1
- package/package.json +1 -1
- package/types/yukit-web.d.ts +31 -7
package/fesm2022/yukit-web.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import * as i1 from '@spartan-ng/brain/tooltip';
|
|
|
15
15
|
import { BrnTooltip, provideBrnTooltipDefaultOptions } from '@spartan-ng/brain/tooltip';
|
|
16
16
|
import { tooltipPositionVariants, DEFAULT_TOOLTIP_CONTENT_CLASSES, DEFAULT_TOOLTIP_SVG_CLASS } from 'yukit-web/helm/tooltip';
|
|
17
17
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
18
|
-
import { lucideX, lucideChevronRight, lucideChevronLeft, lucideUpload, lucideImagePlus, lucideSearch, lucideEyeOff, lucideEye, lucideChevronsUpDown, lucideChevronUp, lucideChevronDown, lucidePencil, lucideCheck, lucideMinus, lucideEllipsis, lucideCopy, lucideTrash2, lucideSave, lucideArrowLeft, lucideArchiveRestore, lucidePlus, lucideShare, lucidePrinter, lucideFileText, lucideFileSpreadsheet, lucideFileDown, lucideClipboardCopy, lucideSettings2, lucideList, lucideLayoutGrid, lucideDownload, lucideStar } from '@ng-icons/lucide';
|
|
18
|
+
import { lucideX, lucideChevronRight, lucideChevronLeft, lucideUpload, lucidePaperclip, lucideImagePlus, lucideSearch, lucideEyeOff, lucideEye, lucideChevronsUpDown, lucideChevronUp, lucideChevronDown, lucidePencil, lucideCheck, lucideMinus, lucideEllipsis, lucideCopy, lucideTrash2, lucideSave, lucideArrowLeft, lucideArchiveRestore, lucidePlus, lucideShare, lucidePrinter, lucideFileText, lucideFileSpreadsheet, lucideFileDown, lucideClipboardCopy, lucideSettings2, lucideList, lucideLayoutGrid, lucideDownload, lucideStar } from '@ng-icons/lucide';
|
|
19
19
|
import * as i1$1 from 'yukit-web/helm/badge';
|
|
20
20
|
import { HlmBadge } from 'yukit-web/helm/badge';
|
|
21
21
|
import * as i1$2 from 'yukit-web/helm/breadcrumb';
|
|
@@ -623,8 +623,11 @@ function createPagedList(options) {
|
|
|
623
623
|
* `classes()` utility registers it as base classes and merges it last through `twMerge`, so every
|
|
624
624
|
* class here beats the helm default of the same Tailwind group *and* modifier stack without
|
|
625
625
|
* needing `!important`.
|
|
626
|
+
*
|
|
627
|
+
* The base drops the helm `transition-all` while disabled: a button disabled under the pointer, such as a save that
|
|
628
|
+
* starts saving on click, would otherwise fade from its hover fill to the disabled one instead of turning grey at once.
|
|
626
629
|
*/
|
|
627
|
-
const yuwButtonVariants = cva('', {
|
|
630
|
+
const yuwButtonVariants = cva('data-disabled:transition-none', {
|
|
628
631
|
variants: {
|
|
629
632
|
size: {
|
|
630
633
|
default: 'h-10',
|
|
@@ -1647,19 +1650,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
1647
1650
|
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<hlm-accordion-trigger [triggerClass]=\"_triggerClass()\">\n <ng-content />\n</hlm-accordion-trigger>\n" }]
|
|
1648
1651
|
}], propDecorators: { triggerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerClass", required: false }] }], underline: [{ type: i0.Input, args: [{ isSignal: true, alias: "underline", required: false }] }] } });
|
|
1649
1652
|
|
|
1653
|
+
const ACCORDION_NAVIGATION_KEYS = new Set([
|
|
1654
|
+
' ',
|
|
1655
|
+
'Enter',
|
|
1656
|
+
'ArrowUp',
|
|
1657
|
+
'ArrowDown',
|
|
1658
|
+
'ArrowLeft',
|
|
1659
|
+
'ArrowRight',
|
|
1660
|
+
'PageUp',
|
|
1661
|
+
'PageDown',
|
|
1662
|
+
'Home',
|
|
1663
|
+
'End',
|
|
1664
|
+
]);
|
|
1650
1665
|
/**
|
|
1651
1666
|
* Collapsible panel container for a `yuw-accordion-item`.
|
|
1652
1667
|
*
|
|
1653
1668
|
* Projects body content revealed when the item is expanded (supports text, custom markup, or nested components).
|
|
1669
|
+
*
|
|
1670
|
+
* The keys the accordion uses to move between its triggers stop here. `BrnAccordion` listens for them on its whole
|
|
1671
|
+
* host and prevents their default unless the target is a text field, so a switch, a toggle or a button inside the
|
|
1672
|
+
* panel could not be pressed with Space or Enter. Escape and Tab still bubble, so an enclosing sheet or dialog keeps
|
|
1673
|
+
* closing and trapping focus.
|
|
1654
1674
|
*/
|
|
1655
1675
|
class YuwAccordionContentComponent {
|
|
1676
|
+
onKeydown(event) {
|
|
1677
|
+
if (ACCORDION_NAVIGATION_KEYS.has(event.key)) {
|
|
1678
|
+
event.stopPropagation();
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1656
1681
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwAccordionContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1657
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: YuwAccordionContentComponent, isStandalone: true, selector: "yuw-accordion-content", host: { classAttribute: "contents" }, ngImport: i0, template: "<hlm-accordion-content>\n <ng-content />\n</hlm-accordion-content>\n", dependencies: [{ kind: "component", type: HlmAccordionContent, selector: "hlm-accordion-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1682
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: YuwAccordionContentComponent, isStandalone: true, selector: "yuw-accordion-content", host: { listeners: { "keydown": "onKeydown($event)" }, classAttribute: "contents" }, ngImport: i0, template: "<hlm-accordion-content>\n <ng-content />\n</hlm-accordion-content>\n", dependencies: [{ kind: "component", type: HlmAccordionContent, selector: "hlm-accordion-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1658
1683
|
}
|
|
1659
1684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwAccordionContentComponent, decorators: [{
|
|
1660
1685
|
type: Component,
|
|
1661
1686
|
args: [{ selector: 'yuw-accordion-content', imports: [HlmAccordionContent], host: {
|
|
1662
1687
|
class: 'contents',
|
|
1688
|
+
'(keydown)': 'onKeydown($event)',
|
|
1663
1689
|
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<hlm-accordion-content>\n <ng-content />\n</hlm-accordion-content>\n" }]
|
|
1664
1690
|
}] });
|
|
1665
1691
|
|
|
@@ -2164,6 +2190,8 @@ let nextYuwInputFileId = 0;
|
|
|
2164
2190
|
* Inputs / Models:
|
|
2165
2191
|
* - `value`: Two-way `File[]` selection.
|
|
2166
2192
|
* - `variant`: `'avatar'`, `'tile'` or `'inline'`. Default is `'avatar'`.
|
|
2193
|
+
* - `emptyLabel`: With nothing chosen, `inline` shows this text, such as "No document", with a compact attach button
|
|
2194
|
+
* beside it instead of the full-width upload button. Default is `undefined`.
|
|
2167
2195
|
* - `uploadLabel`: Text of the upload button. User-facing text — the consuming app provides and
|
|
2168
2196
|
* translates it; required, there is no default copy.
|
|
2169
2197
|
* - `removeLabel`: Accessible label of each remove icon (`inline` and `tile`). Required for `inline`; without it a
|
|
@@ -2205,6 +2233,7 @@ class YuwInputFileComponent extends YuwValueAccessorBase {
|
|
|
2205
2233
|
this.accept = input(undefined, ...(ngDevMode ? [{ debugName: "accept" }] : /* istanbul ignore next */ []));
|
|
2206
2234
|
this.alt = input('', ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
2207
2235
|
this.countLabel = input(undefined, ...(ngDevMode ? [{ debugName: "countLabel" }] : /* istanbul ignore next */ []));
|
|
2236
|
+
this.emptyLabel = input(undefined, ...(ngDevMode ? [{ debugName: "emptyLabel" }] : /* istanbul ignore next */ []));
|
|
2208
2237
|
this.errorText = input(undefined, ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
2209
2238
|
this.fallback = input(undefined, ...(ngDevMode ? [{ debugName: "fallback" }] : /* istanbul ignore next */ []));
|
|
2210
2239
|
this.helperText = input(undefined, ...(ngDevMode ? [{ debugName: "helperText" }] : /* istanbul ignore next */ []));
|
|
@@ -2262,7 +2291,10 @@ class YuwInputFileComponent extends YuwValueAccessorBase {
|
|
|
2262
2291
|
this._commit(Array.from(event.target.files ?? []));
|
|
2263
2292
|
}
|
|
2264
2293
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwInputFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2265
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwInputFileComponent, isStandalone: true, selector: "yuw-input-file", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, countLabel: { classPropertyName: "countLabel", publicName: "countLabel", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", removed: "removed" }, host: { classAttribute: "contents" }, providers: [provideValueAccessor(YuwInputFileComponent), provideIcons({ lucideImagePlus, lucideUpload, lucideX })], viewQueries: [{ propertyName: "_native", first: true, predicate: ["native"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #fileRow let-entry>\n <span class=\"min-w-0 flex-1 truncate\">{{ entry.file.name }}</span>\n <span class=\"shrink-0 text-muted-foreground\">{{ entry.size }}</span>\n <yuw-button\n variant=\"ghost\"\n size=\"icon-xs\"\n [ariaLabel]=\"removeLabel()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"removed.emit(entry.file)\"\n >\n <ng-icon name=\"lucideX\" size=\"14\" />\n </yuw-button>\n</ng-template>\n\n<hlm-field\n yuwFieldFeedback\n #feedback=\"yuwFieldFeedback\"\n class=\"min-w-0 data-[matches-spartan-invalid=true]:text-inherit\"\n [invalid]=\"invalid()\"\n [errorText]=\"errorText()\"\n>\n <input\n #native\n hlmInput\n hidden\n type=\"file\"\n [id]=\"_inputId()\"\n [attr.accept]=\"accept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"_disabled()\"\n [required]=\"required()\"\n [forceInvalid]=\"feedback.forcedInvalid()\"\n [attr.name]=\"name()\"\n (change)=\"onChange($event)\"\n />\n\n @if (variant() === 'avatar') {\n <div class=\"flex min-w-0 flex-wrap items-center gap-3\">\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full disabled:cursor-not-allowed\"\n tabindex=\"-1\"\n [attr.aria-label]=\"uploadLabel()\"\n [disabled]=\"_disabled()\"\n (click)=\"native.click()\"\n >\n <yuw-avatar size=\"lg\" [class]=\"userClass()\" [src]=\"_imageSrc()\" [alt]=\"alt()\" [fallback]=\"fallback()\" />\n </button>\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n {{ uploadLabel() }}\n </yuw-button>\n </div>\n } @else if (variant() === 'tile') {\n <div class=\"flex\">\n <div class=\"relative\">\n <button\n type=\"button\"\n [class]=\"_tileClasses()\"\n [class.border-destructive]=\"feedback.showError()\"\n [attr.aria-label]=\"uploadLabel()\"\n [disabled]=\"_disabled()\"\n (click)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n @if (_imageSrc(); as image) {\n <img class=\"size-full object-cover\" [src]=\"image\" [alt]=\"alt()\" />\n } @else {\n <ng-icon name=\"lucideImagePlus\" size=\"20\" />\n <span>{{ uploadLabel() }}</span>\n }\n </button>\n @if (removeLabel() && value()[0]; as file) {\n <yuw-button\n class=\"absolute end-1 top-1\"\n variant=\"outline\"\n size=\"icon-xs\"\n [ariaLabel]=\"removeLabel()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"removed.emit(file)\"\n >\n <ng-icon name=\"lucideX\" size=\"12\" />\n </yuw-button>\n }\n </div>\n </div>\n } @else {\n <div [class]=\"_inlineClasses()\">\n @if (_entries().length === 0) {\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n color=\"secondary\"\n class=\"w-full\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n <ng-icon name=\"lucideUpload\" size=\"16\" />\n {{ uploadLabel() }}\n </yuw-button>\n } @else if (_entries().length === 1) {\n <div [class]=\"_boxClasses()\" [class.border-destructive]=\"feedback.showError()\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: _entries()[0] }\" />\n </div>\n } @else {\n @if (_isMobile()) {\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n class=\"w-full justify-start font-normal\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"_listOpen.set(true)\"\n >\n {{ _countText() }}\n </yuw-button>\n\n <yuw-sheet\n side=\"bottom\"\n panelClass=\"max-h-[85svh] overflow-y-auto\"\n [showTrigger]=\"false\"\n [title]=\"_countText()\"\n [(open)]=\"_listOpen\"\n >\n <ul class=\"flex flex-col gap-1 pb-3\">\n @for (entry of _entries(); track entry.file) {\n <li class=\"flex items-center gap-2 text-sm\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: entry }\" />\n </li>\n }\n </ul>\n </yuw-sheet>\n } @else {\n <div class=\"[&_yuw-button]:flex [&_yuw-button]:w-full\">\n <yuw-popover\n align=\"start\"\n panelClass=\"w-80 p-2\"\n triggerVariant=\"outline\"\n triggerClass=\"w-full justify-start font-normal\"\n [triggerSize]=\"size()\"\n [(open)]=\"_listOpen\"\n >\n <span yuwPopoverTrigger>{{ _countText() }}</span>\n\n <ul class=\"flex flex-col gap-1\">\n @for (entry of _entries(); track entry.file) {\n <li class=\"flex items-center gap-2 text-sm\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: entry }\" />\n </li>\n }\n </ul>\n </yuw-popover>\n </div>\n }\n }\n </div>\n }\n\n @if (feedback.showError()) {\n <hlm-field-description role=\"alert\" class=\"text-destructive\">{{ feedback.errorMessage() }}</hlm-field-description>\n } @else if (helperText(); as helper) {\n <hlm-field-description>{{ helper }}</hlm-field-description>\n }\n</hlm-field>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmField, selector: "[hlmField],hlm-field", inputs: ["orientation"] }, { kind: "directive", type: HlmFieldDescription, selector: "[hlmFieldDescription],hlm-field-description", inputs: ["id"] }, { kind: "directive", type: YuwFieldFeedbackDirective, selector: "hlm-field[yuwFieldFeedback]", inputs: ["errorText", "invalid"], exportAs: ["yuwFieldFeedback"] }, { kind: "directive", type: HlmInput, selector: "[hlmInput]" }, { kind: "component", type: YuwAvatarComponent, selector: "yuw-avatar", inputs: ["alt", "badge", "fallback", "group", "groupCount", "size", "src", "class"] }, { kind: "component", type: YuwButtonComponent, selector: "yuw-button", inputs: ["animationDisabled", "ariaLabel", "color", "disabled", "href", "size", "target", "transparent", "type", "class", "variant", "yuwDropdownMenuAlign", "yuwDropdownMenuTrigger"], outputs: ["clicked"] }, { kind: "component", type: YuwPopoverComponent, selector: "yuw-popover", inputs: ["align", "description", "offsetX", "open", "panelClass", "showTrigger", "sideOffset", "title", "triggerClass", "triggerColor", "triggerSize", "triggerTransparent", "triggerVariant"], outputs: ["openChange"] }, { kind: "component", type: YuwSheetComponent, selector: "yuw-sheet", inputs: ["ariaLabel", "ariaModal", "bodyClass", "closeLabel", "closeOnOutsidePointerEvents", "description", "disableClose", "open", "overlayClass", "panelClass", "scrollStrategy", "showTrigger", "side", "title", "triggerSize", "triggerVariant"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2294
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwInputFileComponent, isStandalone: true, selector: "yuw-input-file", inputs: { accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, countLabel: { classPropertyName: "countLabel", publicName: "countLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", removed: "removed" }, providers: [
|
|
2295
|
+
provideValueAccessor(YuwInputFileComponent),
|
|
2296
|
+
provideIcons({ lucideImagePlus, lucidePaperclip, lucideUpload, lucideX }),
|
|
2297
|
+
], viewQueries: [{ propertyName: "_native", first: true, predicate: ["native"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #fileRow let-entry>\n <span class=\"min-w-0 flex-1 truncate\">{{ entry.file.name }}</span>\n <span class=\"shrink-0 text-muted-foreground\">{{ entry.size }}</span>\n <yuw-button\n variant=\"ghost\"\n size=\"icon-xs\"\n [ariaLabel]=\"removeLabel()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"removed.emit(entry.file)\"\n >\n <ng-icon name=\"lucideX\" size=\"14\" />\n </yuw-button>\n</ng-template>\n\n<hlm-field\n yuwFieldFeedback\n #feedback=\"yuwFieldFeedback\"\n class=\"min-w-0 data-[matches-spartan-invalid=true]:text-inherit\"\n [invalid]=\"invalid()\"\n [errorText]=\"errorText()\"\n>\n <input\n #native\n hlmInput\n hidden\n type=\"file\"\n [id]=\"_inputId()\"\n [attr.accept]=\"accept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"_disabled()\"\n [required]=\"required()\"\n [forceInvalid]=\"feedback.forcedInvalid()\"\n [attr.name]=\"name()\"\n (change)=\"onChange($event)\"\n />\n\n @if (variant() === 'avatar') {\n <div class=\"flex min-w-0 flex-wrap items-center gap-3\">\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full disabled:cursor-not-allowed\"\n tabindex=\"-1\"\n [attr.aria-label]=\"uploadLabel()\"\n [disabled]=\"_disabled()\"\n (click)=\"native.click()\"\n >\n <yuw-avatar size=\"lg\" [class]=\"userClass()\" [src]=\"_imageSrc()\" [alt]=\"alt()\" [fallback]=\"fallback()\" />\n </button>\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n {{ uploadLabel() }}\n </yuw-button>\n </div>\n } @else if (variant() === 'tile') {\n <div class=\"flex\">\n <div class=\"relative\">\n <button\n type=\"button\"\n [class]=\"_tileClasses()\"\n [class.border-destructive]=\"feedback.showError()\"\n [attr.aria-label]=\"uploadLabel()\"\n [disabled]=\"_disabled()\"\n (click)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n @if (_imageSrc(); as image) {\n <img class=\"size-full object-cover\" [src]=\"image\" [alt]=\"alt()\" />\n } @else {\n <ng-icon name=\"lucideImagePlus\" size=\"20\" />\n <span>{{ uploadLabel() }}</span>\n }\n </button>\n @if (removeLabel() && value()[0]; as file) {\n <yuw-button\n class=\"absolute end-1 top-1\"\n variant=\"outline\"\n size=\"icon-xs\"\n [ariaLabel]=\"removeLabel()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"removed.emit(file)\"\n >\n <ng-icon name=\"lucideX\" size=\"12\" />\n </yuw-button>\n }\n </div>\n </div>\n } @else {\n <div [class]=\"_inlineClasses()\">\n @if (_entries().length === 0 && emptyLabel()) {\n <div class=\"flex min-w-0 items-center justify-between gap-3\">\n <span class=\"truncate text-sm text-muted-foreground\">{{ emptyLabel() }}</span>\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n color=\"secondary\"\n class=\"shrink-0\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n <ng-icon name=\"lucidePaperclip\" size=\"16\" />\n {{ uploadLabel() }}\n </yuw-button>\n </div>\n } @else if (_entries().length === 0) {\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n color=\"secondary\"\n class=\"w-full\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n <ng-icon name=\"lucideUpload\" size=\"16\" />\n {{ uploadLabel() }}\n </yuw-button>\n } @else if (_entries().length === 1) {\n <div [class]=\"_boxClasses()\" [class.border-destructive]=\"feedback.showError()\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: _entries()[0] }\" />\n </div>\n } @else {\n @if (_isMobile()) {\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n class=\"w-full justify-start font-normal\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"_listOpen.set(true)\"\n >\n {{ _countText() }}\n </yuw-button>\n\n <yuw-sheet\n side=\"bottom\"\n panelClass=\"max-h-[85svh] overflow-y-auto\"\n [showTrigger]=\"false\"\n [title]=\"_countText()\"\n [(open)]=\"_listOpen\"\n >\n <ul class=\"flex flex-col gap-1 pb-3\">\n @for (entry of _entries(); track entry.file) {\n <li class=\"flex items-center gap-2 text-sm\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: entry }\" />\n </li>\n }\n </ul>\n </yuw-sheet>\n } @else {\n <div class=\"[&_yuw-button]:flex [&_yuw-button]:w-full\">\n <yuw-popover\n align=\"start\"\n panelClass=\"w-80 p-2\"\n triggerVariant=\"outline\"\n triggerClass=\"w-full justify-start font-normal\"\n [triggerSize]=\"size()\"\n [(open)]=\"_listOpen\"\n >\n <span yuwPopoverTrigger>{{ _countText() }}</span>\n\n <ul class=\"flex flex-col gap-1\">\n @for (entry of _entries(); track entry.file) {\n <li class=\"flex items-center gap-2 text-sm\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: entry }\" />\n </li>\n }\n </ul>\n </yuw-popover>\n </div>\n }\n }\n </div>\n }\n\n @if (feedback.showError()) {\n <hlm-field-description role=\"alert\" class=\"text-destructive\">{{ feedback.errorMessage() }}</hlm-field-description>\n } @else if (helperText(); as helper) {\n <hlm-field-description>{{ helper }}</hlm-field-description>\n }\n</hlm-field>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmField, selector: "[hlmField],hlm-field", inputs: ["orientation"] }, { kind: "directive", type: HlmFieldDescription, selector: "[hlmFieldDescription],hlm-field-description", inputs: ["id"] }, { kind: "directive", type: YuwFieldFeedbackDirective, selector: "hlm-field[yuwFieldFeedback]", inputs: ["errorText", "invalid"], exportAs: ["yuwFieldFeedback"] }, { kind: "directive", type: HlmInput, selector: "[hlmInput]" }, { kind: "component", type: YuwAvatarComponent, selector: "yuw-avatar", inputs: ["alt", "badge", "fallback", "group", "groupCount", "size", "src", "class"] }, { kind: "component", type: YuwButtonComponent, selector: "yuw-button", inputs: ["animationDisabled", "ariaLabel", "color", "disabled", "href", "size", "target", "transparent", "type", "class", "variant", "yuwDropdownMenuAlign", "yuwDropdownMenuTrigger"], outputs: ["clicked"] }, { kind: "component", type: YuwPopoverComponent, selector: "yuw-popover", inputs: ["align", "description", "offsetX", "open", "panelClass", "showTrigger", "sideOffset", "title", "triggerClass", "triggerColor", "triggerSize", "triggerTransparent", "triggerVariant"], outputs: ["openChange"] }, { kind: "component", type: YuwSheetComponent, selector: "yuw-sheet", inputs: ["ariaLabel", "ariaModal", "bodyClass", "closeLabel", "closeOnOutsidePointerEvents", "description", "disableClose", "open", "overlayClass", "panelClass", "scrollStrategy", "showTrigger", "side", "title", "triggerSize", "triggerVariant"], outputs: ["openChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2266
2298
|
}
|
|
2267
2299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwInputFileComponent, decorators: [{
|
|
2268
2300
|
type: Component,
|
|
@@ -2277,10 +2309,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
2277
2309
|
YuwButtonComponent,
|
|
2278
2310
|
YuwPopoverComponent,
|
|
2279
2311
|
YuwSheetComponent,
|
|
2280
|
-
], providers: [
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2312
|
+
], providers: [
|
|
2313
|
+
provideValueAccessor(YuwInputFileComponent),
|
|
2314
|
+
provideIcons({ lucideImagePlus, lucidePaperclip, lucideUpload, lucideX }),
|
|
2315
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #fileRow let-entry>\n <span class=\"min-w-0 flex-1 truncate\">{{ entry.file.name }}</span>\n <span class=\"shrink-0 text-muted-foreground\">{{ entry.size }}</span>\n <yuw-button\n variant=\"ghost\"\n size=\"icon-xs\"\n [ariaLabel]=\"removeLabel()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"removed.emit(entry.file)\"\n >\n <ng-icon name=\"lucideX\" size=\"14\" />\n </yuw-button>\n</ng-template>\n\n<hlm-field\n yuwFieldFeedback\n #feedback=\"yuwFieldFeedback\"\n class=\"min-w-0 data-[matches-spartan-invalid=true]:text-inherit\"\n [invalid]=\"invalid()\"\n [errorText]=\"errorText()\"\n>\n <input\n #native\n hlmInput\n hidden\n type=\"file\"\n [id]=\"_inputId()\"\n [attr.accept]=\"accept()\"\n [multiple]=\"multiple()\"\n [disabled]=\"_disabled()\"\n [required]=\"required()\"\n [forceInvalid]=\"feedback.forcedInvalid()\"\n [attr.name]=\"name()\"\n (change)=\"onChange($event)\"\n />\n\n @if (variant() === 'avatar') {\n <div class=\"flex min-w-0 flex-wrap items-center gap-3\">\n <button\n type=\"button\"\n class=\"cursor-pointer rounded-full disabled:cursor-not-allowed\"\n tabindex=\"-1\"\n [attr.aria-label]=\"uploadLabel()\"\n [disabled]=\"_disabled()\"\n (click)=\"native.click()\"\n >\n <yuw-avatar size=\"lg\" [class]=\"userClass()\" [src]=\"_imageSrc()\" [alt]=\"alt()\" [fallback]=\"fallback()\" />\n </button>\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n {{ uploadLabel() }}\n </yuw-button>\n </div>\n } @else if (variant() === 'tile') {\n <div class=\"flex\">\n <div class=\"relative\">\n <button\n type=\"button\"\n [class]=\"_tileClasses()\"\n [class.border-destructive]=\"feedback.showError()\"\n [attr.aria-label]=\"uploadLabel()\"\n [disabled]=\"_disabled()\"\n (click)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n @if (_imageSrc(); as image) {\n <img class=\"size-full object-cover\" [src]=\"image\" [alt]=\"alt()\" />\n } @else {\n <ng-icon name=\"lucideImagePlus\" size=\"20\" />\n <span>{{ uploadLabel() }}</span>\n }\n </button>\n @if (removeLabel() && value()[0]; as file) {\n <yuw-button\n class=\"absolute end-1 top-1\"\n variant=\"outline\"\n size=\"icon-xs\"\n [ariaLabel]=\"removeLabel()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"removed.emit(file)\"\n >\n <ng-icon name=\"lucideX\" size=\"12\" />\n </yuw-button>\n }\n </div>\n </div>\n } @else {\n <div [class]=\"_inlineClasses()\">\n @if (_entries().length === 0 && emptyLabel()) {\n <div class=\"flex min-w-0 items-center justify-between gap-3\">\n <span class=\"truncate text-sm text-muted-foreground\">{{ emptyLabel() }}</span>\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n color=\"secondary\"\n class=\"shrink-0\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n <ng-icon name=\"lucidePaperclip\" size=\"16\" />\n {{ uploadLabel() }}\n </yuw-button>\n </div>\n } @else if (_entries().length === 0) {\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n color=\"secondary\"\n class=\"w-full\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"native.click()\"\n (focusout)=\"_onBlur()\"\n >\n <ng-icon name=\"lucideUpload\" size=\"16\" />\n {{ uploadLabel() }}\n </yuw-button>\n } @else if (_entries().length === 1) {\n <div [class]=\"_boxClasses()\" [class.border-destructive]=\"feedback.showError()\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: _entries()[0] }\" />\n </div>\n } @else {\n @if (_isMobile()) {\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n class=\"w-full justify-start font-normal\"\n [size]=\"size()\"\n [disabled]=\"_disabled()\"\n (clicked)=\"_listOpen.set(true)\"\n >\n {{ _countText() }}\n </yuw-button>\n\n <yuw-sheet\n side=\"bottom\"\n panelClass=\"max-h-[85svh] overflow-y-auto\"\n [showTrigger]=\"false\"\n [title]=\"_countText()\"\n [(open)]=\"_listOpen\"\n >\n <ul class=\"flex flex-col gap-1 pb-3\">\n @for (entry of _entries(); track entry.file) {\n <li class=\"flex items-center gap-2 text-sm\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: entry }\" />\n </li>\n }\n </ul>\n </yuw-sheet>\n } @else {\n <div class=\"[&_yuw-button]:flex [&_yuw-button]:w-full\">\n <yuw-popover\n align=\"start\"\n panelClass=\"w-80 p-2\"\n triggerVariant=\"outline\"\n triggerClass=\"w-full justify-start font-normal\"\n [triggerSize]=\"size()\"\n [(open)]=\"_listOpen\"\n >\n <span yuwPopoverTrigger>{{ _countText() }}</span>\n\n <ul class=\"flex flex-col gap-1\">\n @for (entry of _entries(); track entry.file) {\n <li class=\"flex items-center gap-2 text-sm\">\n <ng-container [ngTemplateOutlet]=\"fileRow\" [ngTemplateOutletContext]=\"{ $implicit: entry }\" />\n </li>\n }\n </ul>\n </yuw-popover>\n </div>\n }\n }\n </div>\n }\n\n @if (feedback.showError()) {\n <hlm-field-description role=\"alert\" class=\"text-destructive\">{{ feedback.errorMessage() }}</hlm-field-description>\n } @else if (helperText(); as helper) {\n <hlm-field-description>{{ helper }}</hlm-field-description>\n }\n</hlm-field>\n" }]
|
|
2316
|
+
}], ctorParameters: () => [], propDecorators: { _native: [{ type: i0.ViewChild, args: ['native', { isSignal: true }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], countLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "countLabel", required: false }] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], uploadLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadLabel", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], removed: [{ type: i0.Output, args: ["removed"] }] } });
|
|
2284
2317
|
|
|
2285
2318
|
let nextYuwTextareaId = 0;
|
|
2286
2319
|
/**
|
|
@@ -3172,13 +3205,13 @@ class YuwSwitchCardComponent extends YuwValueAccessorBase {
|
|
|
3172
3205
|
this._commit(checked);
|
|
3173
3206
|
}
|
|
3174
3207
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwSwitchCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3175
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwSwitchCardComponent, isStandalone: true, selector: "yuw-switch-card", inputs: { description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "checkedChange" }, host: { classAttribute: "block" }, providers: [provideValueAccessor(YuwSwitchCardComponent)], usesInheritance: true, ngImport: i0, template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-
|
|
3208
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwSwitchCardComponent, isStandalone: true, selector: "yuw-switch-card", inputs: { description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "checkedChange" }, host: { classAttribute: "block" }, providers: [provideValueAccessor(YuwSwitchCardComponent)], usesInheritance: true, ngImport: i0, template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-sm font-semibold text-foreground\">{{ label() }}</span>\n @if (description(); as text) {\n <span [id]=\"_descriptionId\" class=\"text-sm text-muted-foreground\">{{ text }}</span>\n }\n </span>\n <hlm-switch\n [checked]=\"value()\"\n [class]=\"_switchClass\"\n [disabled]=\"_disabled()\"\n [inputId]=\"inputId() ?? null\"\n [aria-labelledby]=\"_labelId\"\n [aria-describedby]=\"_describedBy()\"\n (checkedChange)=\"onCheckedChange($event)\"\n />\n</label>\n", dependencies: [{ kind: "component", type: i1$c.HlmSwitch, selector: "hlm-switch", inputs: ["class", "checked", "disabled", "size", "inputId", "aria-label", "aria-labelledby", "aria-describedby"], outputs: ["checkedChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3176
3209
|
}
|
|
3177
3210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwSwitchCardComponent, decorators: [{
|
|
3178
3211
|
type: Component,
|
|
3179
3212
|
args: [{ selector: 'yuw-switch-card', imports: [...HlmSwitchImports], providers: [provideValueAccessor(YuwSwitchCardComponent)], host: {
|
|
3180
3213
|
class: 'block',
|
|
3181
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-
|
|
3214
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label [class]=\"_cardClass\" (focusout)=\"_onBlur()\">\n <span class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span [id]=\"_labelId\" class=\"text-sm font-semibold text-foreground\">{{ label() }}</span>\n @if (description(); as text) {\n <span [id]=\"_descriptionId\" class=\"text-sm text-muted-foreground\">{{ text }}</span>\n }\n </span>\n <hlm-switch\n [checked]=\"value()\"\n [class]=\"_switchClass\"\n [disabled]=\"_disabled()\"\n [inputId]=\"inputId() ?? null\"\n [aria-labelledby]=\"_labelId\"\n [aria-describedby]=\"_describedBy()\"\n (checkedChange)=\"onCheckedChange($event)\"\n />\n</label>\n" }]
|
|
3182
3215
|
}], propDecorators: { description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }] } });
|
|
3183
3216
|
|
|
3184
3217
|
/** Blue dot and outline for a checked radio, the component default. Stacks the helm's own `group-data-[checked=true]` variant on the indicator's inner dot. */
|
|
@@ -3259,7 +3292,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
3259
3292
|
* - `disabled`: Disables every button.
|
|
3260
3293
|
* - `size`: Height of the buttons, `'sm'`, `'default'` or `'lg'`, as `yuw-button`'s. Default is `'lg'`.
|
|
3261
3294
|
*
|
|
3262
|
-
* The buttons are outlined, and a pressed one is
|
|
3295
|
+
* The buttons are outlined, and a pressed one is painted like a `secondary` `yuw-button` in the `secondary` color,
|
|
3296
|
+
* with the `secondary` border, from its tokens so the unpressed borders keep their color. When the row does not fit
|
|
3263
3297
|
* its container it wraps onto the next line instead of overflowing.
|
|
3264
3298
|
*
|
|
3265
3299
|
* Usage:
|
|
@@ -3298,13 +3332,13 @@ class YuwToggleGroupComponent extends YuwValueAccessorBase {
|
|
|
3298
3332
|
}
|
|
3299
3333
|
}
|
|
3300
3334
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwToggleGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3301
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwToggleGroupComponent, isStandalone: true, selector: "yuw-toggle-group", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "contents" }, providers: [provideValueAccessor(YuwToggleGroupComponent)], usesInheritance: true, ngImport: i0, template: "<hlm-toggle-group\n class=\"max-w-full flex-wrap\"\n variant=\"outline\"\n spacing=\"2\"\n [size]=\"size()\"\n [type]=\"type()\"\n [value]=\"_groupValue()\"\n [disabled]=\"_disabled()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n (valueChange)=\"onValueChange($event)\"\n (focusout)=\"_onBlur()\"\n>\n @for (option of options(); track option.value) {\n <button\n hlmToggleGroupItem\n class=\"data-[state=on]:border-
|
|
3335
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwToggleGroupComponent, isStandalone: true, selector: "yuw-toggle-group", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { classAttribute: "contents" }, providers: [provideValueAccessor(YuwToggleGroupComponent)], usesInheritance: true, ngImport: i0, template: "<hlm-toggle-group\n class=\"max-w-full flex-wrap\"\n variant=\"outline\"\n spacing=\"2\"\n [size]=\"size()\"\n [type]=\"type()\"\n [value]=\"_groupValue()\"\n [disabled]=\"_disabled()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n (valueChange)=\"onValueChange($event)\"\n (focusout)=\"_onBlur()\"\n>\n @for (option of options(); track option.value) {\n <button\n hlmToggleGroupItem\n class=\"aria-pressed:border-(--secondary-border) aria-pressed:bg-(--secondary-subtle-hover) aria-pressed:text-(--secondary-text) data-[state=on]:border-(--secondary-border) data-[state=on]:bg-(--secondary-subtle-hover) data-[state=on]:text-(--secondary-text)\"\n [value]=\"option.value\"\n [disabled]=\"option.disabled ?? false\"\n [aria-label]=\"option.ariaLabel ?? ''\"\n >\n {{ option.label }}\n </button>\n }\n</hlm-toggle-group>\n", dependencies: [{ kind: "directive", type: i1$e.HlmToggleGroup, selector: "[hlmToggleGroup],hlm-toggle-group", inputs: ["variant", "size", "spacing", "orientation"] }, { kind: "directive", type: i1$e.HlmToggleGroupItem, selector: "button[hlmToggleGroupItem]", inputs: ["variant", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3302
3336
|
}
|
|
3303
3337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwToggleGroupComponent, decorators: [{
|
|
3304
3338
|
type: Component,
|
|
3305
3339
|
args: [{ selector: 'yuw-toggle-group', imports: [...HlmToggleGroupImports], providers: [provideValueAccessor(YuwToggleGroupComponent)], host: {
|
|
3306
3340
|
class: 'contents',
|
|
3307
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<hlm-toggle-group\n class=\"max-w-full flex-wrap\"\n variant=\"outline\"\n spacing=\"2\"\n [size]=\"size()\"\n [type]=\"type()\"\n [value]=\"_groupValue()\"\n [disabled]=\"_disabled()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n (valueChange)=\"onValueChange($event)\"\n (focusout)=\"_onBlur()\"\n>\n @for (option of options(); track option.value) {\n <button\n hlmToggleGroupItem\n class=\"data-[state=on]:border-
|
|
3341
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<hlm-toggle-group\n class=\"max-w-full flex-wrap\"\n variant=\"outline\"\n spacing=\"2\"\n [size]=\"size()\"\n [type]=\"type()\"\n [value]=\"_groupValue()\"\n [disabled]=\"_disabled()\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? null\"\n (valueChange)=\"onValueChange($event)\"\n (focusout)=\"_onBlur()\"\n>\n @for (option of options(); track option.value) {\n <button\n hlmToggleGroupItem\n class=\"aria-pressed:border-(--secondary-border) aria-pressed:bg-(--secondary-subtle-hover) aria-pressed:text-(--secondary-text) data-[state=on]:border-(--secondary-border) data-[state=on]:bg-(--secondary-subtle-hover) data-[state=on]:text-(--secondary-text)\"\n [value]=\"option.value\"\n [disabled]=\"option.disabled ?? false\"\n [aria-label]=\"option.ariaLabel ?? ''\"\n >\n {{ option.label }}\n </button>\n }\n</hlm-toggle-group>\n" }]
|
|
3308
3342
|
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
|
|
3309
3343
|
|
|
3310
3344
|
/**
|
|
@@ -7837,6 +7871,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
7837
7871
|
* - `destructive`: Paints the icon in the destructive color, for an action that removes. Default is `false`.
|
|
7838
7872
|
* - `icon` (required): SVG markup of the icon.
|
|
7839
7873
|
* - `label` (required): Accessible name of the button. The consuming app translates it.
|
|
7874
|
+
* - `tooltip`: Hint shown on hover or keyboard focus; empty shows none. The consuming app translates it.
|
|
7840
7875
|
*/
|
|
7841
7876
|
const DESTRUCTIVE_CLASS = 'text-destructive hover:bg-destructive/10 hover:text-destructive';
|
|
7842
7877
|
class YuwsIconActionCellComponent {
|
|
@@ -7845,18 +7880,19 @@ class YuwsIconActionCellComponent {
|
|
|
7845
7880
|
this.destructive = input(false, ...(ngDevMode ? [{ debugName: "destructive" }] : /* istanbul ignore next */ []));
|
|
7846
7881
|
this.icon = input.required(...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
7847
7882
|
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
7883
|
+
this.tooltip = input('', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
7848
7884
|
this.buttonClass = computed(() => (this.destructive() ? DESTRUCTIVE_CLASS : ''), ...(ngDevMode ? [{ debugName: "buttonClass" }] : /* istanbul ignore next */ []));
|
|
7849
7885
|
}
|
|
7850
7886
|
run() {
|
|
7851
7887
|
this.action()();
|
|
7852
7888
|
}
|
|
7853
7889
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsIconActionCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7854
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsIconActionCellComponent, isStandalone: true, selector: "yuws-icon-action-cell", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, destructive: { classPropertyName: "destructive", publicName: "destructive", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "$event.stopPropagation()" }, classAttribute: "yuw-reveal" }, ngImport: i0, template: "<yuw-button
|
|
7890
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsIconActionCellComponent, isStandalone: true, selector: "yuws-icon-action-cell", inputs: { action: { classPropertyName: "action", publicName: "action", isSignal: true, isRequired: true, transformFunction: null }, destructive: { classPropertyName: "destructive", publicName: "destructive", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "$event.stopPropagation()" }, classAttribute: "yuw-reveal" }, ngImport: i0, template: "<yuw-button\n variant=\"ghost\"\n size=\"icon\"\n [class]=\"buttonClass()\"\n [ariaLabel]=\"label()\"\n [yuwTooltip]=\"tooltip()\"\n [tooltipDisabled]=\"!tooltip()\"\n (clicked)=\"run()\"\n>\n <ng-icon [svg]=\"icon()\" size=\"16\" />\n</yuw-button>\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: YuwButtonComponent, selector: "yuw-button", inputs: ["animationDisabled", "ariaLabel", "color", "disabled", "href", "size", "target", "transparent", "type", "class", "variant", "yuwDropdownMenuAlign", "yuwDropdownMenuTrigger"], outputs: ["clicked"] }, { kind: "directive", type: YuwTooltipDirective, selector: "[yuwTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7855
7891
|
}
|
|
7856
7892
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsIconActionCellComponent, decorators: [{
|
|
7857
7893
|
type: Component,
|
|
7858
|
-
args: [{ selector: 'yuws-icon-action-cell', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIcon, YuwButtonComponent], host: { class: 'yuw-reveal', '(click)': '$event.stopPropagation()' }, template: "<yuw-button
|
|
7859
|
-
}], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }], destructive: [{ type: i0.Input, args: [{ isSignal: true, alias: "destructive", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
|
|
7894
|
+
args: [{ selector: 'yuws-icon-action-cell', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIcon, YuwButtonComponent, YuwTooltipDirective], host: { class: 'yuw-reveal', '(click)': '$event.stopPropagation()' }, template: "<yuw-button\n variant=\"ghost\"\n size=\"icon\"\n [class]=\"buttonClass()\"\n [ariaLabel]=\"label()\"\n [yuwTooltip]=\"tooltip()\"\n [tooltipDisabled]=\"!tooltip()\"\n (clicked)=\"run()\"\n>\n <ng-icon [svg]=\"icon()\" size=\"16\" />\n</yuw-button>\n" }]
|
|
7895
|
+
}], propDecorators: { action: [{ type: i0.Input, args: [{ isSignal: true, alias: "action", required: true }] }], destructive: [{ type: i0.Input, args: [{ isSignal: true, alias: "destructive", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }] } });
|
|
7860
7896
|
|
|
7861
7897
|
const SIZE_CLASS = {
|
|
7862
7898
|
md: 'h-11.25 w-11.25',
|
|
@@ -8058,6 +8094,8 @@ const TONE_CLASS = {
|
|
|
8058
8094
|
* - `label` (required): Visible text. The consuming app translates it.
|
|
8059
8095
|
* - `positive`: `true` paints the pill green, `false` red; unset keeps it neutral. Default is `undefined`.
|
|
8060
8096
|
* - `toggled` (required): Callback run on click.
|
|
8097
|
+
* - `tooltip`: Hint shown on hover or keyboard focus, such as what a click does; empty shows none. The consuming app
|
|
8098
|
+
* translates it.
|
|
8061
8099
|
*/
|
|
8062
8100
|
class YuwsStatusToggleCellComponent {
|
|
8063
8101
|
constructor() {
|
|
@@ -8065,6 +8103,7 @@ class YuwsStatusToggleCellComponent {
|
|
|
8065
8103
|
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
8066
8104
|
this.positive = input(...(ngDevMode ? [undefined, { debugName: "positive" }] : /* istanbul ignore next */ []));
|
|
8067
8105
|
this.toggled = input.required(...(ngDevMode ? [{ debugName: "toggled" }] : /* istanbul ignore next */ []));
|
|
8106
|
+
this.tooltip = input('', ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
8068
8107
|
this._tone = computed(() => {
|
|
8069
8108
|
const positive = this.positive();
|
|
8070
8109
|
if (positive === undefined) {
|
|
@@ -8079,12 +8118,12 @@ class YuwsStatusToggleCellComponent {
|
|
|
8079
8118
|
this.toggled()();
|
|
8080
8119
|
}
|
|
8081
8120
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsStatusToggleCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8082
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsStatusToggleCellComponent, isStandalone: true, selector: "yuws-status-toggle-cell", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, positive: { classPropertyName: "positive", publicName: "positive", isSignal: true, isRequired: false, transformFunction: null }, toggled: { classPropertyName: "toggled", publicName: "toggled", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"cursor-pointer rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors hover:bg-accent/45 disabled:cursor-not-allowed disabled:opacity-50\"\n [class]=\"toneClass()\"\n [disabled]=\"disabled()\"\n (click)=\"onClick($event)\"\n>\n {{ label() }}\n</button>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8121
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsStatusToggleCellComponent, isStandalone: true, selector: "yuws-status-toggle-cell", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, positive: { classPropertyName: "positive", publicName: "positive", isSignal: true, isRequired: false, transformFunction: null }, toggled: { classPropertyName: "toggled", publicName: "toggled", isSignal: true, isRequired: true, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"cursor-pointer rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors hover:bg-accent/45 disabled:cursor-not-allowed disabled:opacity-50\"\n [class]=\"toneClass()\"\n [disabled]=\"disabled()\"\n [yuwTooltip]=\"tooltip()\"\n [tooltipDisabled]=\"!tooltip()\"\n (click)=\"onClick($event)\"\n>\n {{ label() }}\n</button>\n", dependencies: [{ kind: "directive", type: YuwTooltipDirective, selector: "[yuwTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8083
8122
|
}
|
|
8084
8123
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsStatusToggleCellComponent, decorators: [{
|
|
8085
8124
|
type: Component,
|
|
8086
|
-
args: [{ selector: 'yuws-status-toggle-cell', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n type=\"button\"\n class=\"cursor-pointer rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors hover:bg-accent/45 disabled:cursor-not-allowed disabled:opacity-50\"\n [class]=\"toneClass()\"\n [disabled]=\"disabled()\"\n (click)=\"onClick($event)\"\n>\n {{ label() }}\n</button>\n" }]
|
|
8087
|
-
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], positive: [{ type: i0.Input, args: [{ isSignal: true, alias: "positive", required: false }] }], toggled: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggled", required: true }] }] } });
|
|
8125
|
+
args: [{ selector: 'yuws-status-toggle-cell', changeDetection: ChangeDetectionStrategy.OnPush, imports: [YuwTooltipDirective], template: "<button\n type=\"button\"\n class=\"cursor-pointer rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors hover:bg-accent/45 disabled:cursor-not-allowed disabled:opacity-50\"\n [class]=\"toneClass()\"\n [disabled]=\"disabled()\"\n [yuwTooltip]=\"tooltip()\"\n [tooltipDisabled]=\"!tooltip()\"\n (click)=\"onClick($event)\"\n>\n {{ label() }}\n</button>\n" }]
|
|
8126
|
+
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], positive: [{ type: i0.Input, args: [{ isSignal: true, alias: "positive", required: false }] }], toggled: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggled", required: true }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }] } });
|
|
8088
8127
|
|
|
8089
8128
|
/** Text of a cell with no value. */
|
|
8090
8129
|
const YUWS_NO_DATA_PLACEHOLDER = '—';
|
|
@@ -8132,6 +8171,7 @@ function buildYuwsStatusToggleColumn(column) {
|
|
|
8132
8171
|
label: positive ? column.labels.on : column.labels.off,
|
|
8133
8172
|
positive,
|
|
8134
8173
|
toggled: () => column.toggled(row.original),
|
|
8174
|
+
tooltip: (positive ? column.tooltips?.on : column.tooltips?.off) ?? '',
|
|
8135
8175
|
},
|
|
8136
8176
|
});
|
|
8137
8177
|
},
|
|
@@ -8150,6 +8190,7 @@ function buildYuwsIconActionColumn(column) {
|
|
|
8150
8190
|
icon: column.icon,
|
|
8151
8191
|
label: column.label,
|
|
8152
8192
|
destructive: column.destructive ?? false,
|
|
8193
|
+
tooltip: column.tooltip ?? '',
|
|
8153
8194
|
action: () => column.onAction(row.original),
|
|
8154
8195
|
},
|
|
8155
8196
|
})
|
|
@@ -8318,6 +8359,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
8318
8359
|
* Inputs:
|
|
8319
8360
|
* - `backLabel`: Turns the panel into a sub-step: a back arrow with this accessible name precedes the title and
|
|
8320
8361
|
* `description`, the close button goes away and cancel emits `back`. Default is `undefined`.
|
|
8362
|
+
* Like `guarded`, it draws its own header, with an outlined button, and a border separates header and footer from the
|
|
8363
|
+
* body.
|
|
8321
8364
|
* - `description`: Muted line under the title, such as the step and which fields are required. Default is `undefined`.
|
|
8322
8365
|
* - `guarded`: The panel only closes when the host says so: Escape and presses outside do nothing, and the close
|
|
8323
8366
|
* button and cancel emit `closeRequest`, so the host can confirm discarding what was typed. Default is `false`.
|
|
@@ -8329,6 +8372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
8329
8372
|
* - `removeDisabled`: Disables the delete button. Default is `false`.
|
|
8330
8373
|
* - `removeLabel`: Renders the delete button with this text. Default is `undefined`.
|
|
8331
8374
|
* - `restoreLabel`: Renders the restore button with this text. Default is `undefined`.
|
|
8375
|
+
* - `saveColor`: Color of the save button (any `YuwColorDto` value). Default is `'primary'`.
|
|
8332
8376
|
* - `saveDisabled`: Disables the save button. Default is `false`.
|
|
8333
8377
|
* - `saving`: Disables the footer actions while the host's write is in flight. Default is `false`.
|
|
8334
8378
|
* - `title` (required): Panel title.
|
|
@@ -8350,6 +8394,7 @@ class YuwsFormSheetComponent {
|
|
|
8350
8394
|
this.removeDisabled = input(false, { ...(ngDevMode ? { debugName: "removeDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8351
8395
|
this.removeLabel = input(...(ngDevMode ? [undefined, { debugName: "removeLabel" }] : /* istanbul ignore next */ []));
|
|
8352
8396
|
this.restoreLabel = input(...(ngDevMode ? [undefined, { debugName: "restoreLabel" }] : /* istanbul ignore next */ []));
|
|
8397
|
+
this.saveColor = input('primary', ...(ngDevMode ? [{ debugName: "saveColor" }] : /* istanbul ignore next */ []));
|
|
8353
8398
|
this.saveDisabled = input(false, { ...(ngDevMode ? { debugName: "saveDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8354
8399
|
this.saving = input(false, { ...(ngDevMode ? { debugName: "saving" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
8355
8400
|
this.title = input.required(...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
@@ -8358,6 +8403,7 @@ class YuwsFormSheetComponent {
|
|
|
8358
8403
|
this.remove = output();
|
|
8359
8404
|
this.restore = output();
|
|
8360
8405
|
this.save = output();
|
|
8406
|
+
this._divided = computed(() => this.guarded() || !!this.backLabel(), ...(ngDevMode ? [{ debugName: "_divided" }] : /* istanbul ignore next */ []));
|
|
8361
8407
|
}
|
|
8362
8408
|
onCancel() {
|
|
8363
8409
|
if (this.backLabel()) {
|
|
@@ -8371,18 +8417,18 @@ class YuwsFormSheetComponent {
|
|
|
8371
8417
|
}
|
|
8372
8418
|
}
|
|
8373
8419
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsFormSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8374
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwsFormSheetComponent, isStandalone: true, selector: "yuws-form-sheet", inputs: { backLabel: { classPropertyName: "backLabel", publicName: "backLabel", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, guarded: { classPropertyName: "guarded", publicName: "guarded", isSignal: true, isRequired: false, transformFunction: null }, hideFooter: { classPropertyName: "hideFooter", publicName: "hideFooter", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: true, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, removeDisabled: { classPropertyName: "removeDisabled", publicName: "removeDisabled", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, restoreLabel: { classPropertyName: "restoreLabel", publicName: "restoreLabel", isSignal: true, isRequired: false, transformFunction: null }, saveDisabled: { classPropertyName: "saveDisabled", publicName: "saveDisabled", isSignal: true, isRequired: false, transformFunction: null }, saving: { classPropertyName: "saving", publicName: "saving", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { open: "openChange", back: "back", closeRequest: "closeRequest", remove: "remove", restore: "restore", save: "save" }, providers: [
|
|
8420
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: YuwsFormSheetComponent, isStandalone: true, selector: "yuws-form-sheet", inputs: { backLabel: { classPropertyName: "backLabel", publicName: "backLabel", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, guarded: { classPropertyName: "guarded", publicName: "guarded", isSignal: true, isRequired: false, transformFunction: null }, hideFooter: { classPropertyName: "hideFooter", publicName: "hideFooter", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: true, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, removeDisabled: { classPropertyName: "removeDisabled", publicName: "removeDisabled", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, restoreLabel: { classPropertyName: "restoreLabel", publicName: "restoreLabel", isSignal: true, isRequired: false, transformFunction: null }, saveColor: { classPropertyName: "saveColor", publicName: "saveColor", isSignal: true, isRequired: false, transformFunction: null }, saveDisabled: { classPropertyName: "saveDisabled", publicName: "saveDisabled", isSignal: true, isRequired: false, transformFunction: null }, saving: { classPropertyName: "saving", publicName: "saving", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { open: "openChange", back: "back", closeRequest: "closeRequest", remove: "remove", restore: "restore", save: "save" }, providers: [
|
|
8375
8421
|
provideIcons({ lucideArchiveRestore, lucideArrowLeft, lucideSave, lucideTrash2, lucideX }),
|
|
8376
8422
|
{ provide: YuwSheetOpenState, useExisting: YuwsFormSheetComponent },
|
|
8377
|
-
], ngImport: i0, template: "<yuw-sheet\n side=\"right\"\n [showTrigger]=\"false\"\n [panelClass]=\"panelClass()\"\n bodyClass=\"scroll-fade-y\"\n [title]=\"backLabel() || guarded() ? undefined : title()\"\n [description]=\"backLabel() || guarded() ? undefined : description()\"\n [closeLabel]=\"backLabel() || guarded() ? undefined : labels().close\"\n [disableClose]=\"guarded()\"\n [(open)]=\"open\"\n>\n @if (backLabel(); as label) {\n <div yuwSheetHeader class=\"-
|
|
8423
|
+
], ngImport: i0, template: "<yuw-sheet\n side=\"right\"\n [showTrigger]=\"false\"\n [panelClass]=\"panelClass()\"\n bodyClass=\"scroll-fade-y\"\n [title]=\"backLabel() || guarded() ? undefined : title()\"\n [description]=\"backLabel() || guarded() ? undefined : description()\"\n [closeLabel]=\"backLabel() || guarded() ? undefined : labels().close\"\n [disableClose]=\"guarded()\"\n [(open)]=\"open\"\n>\n @if (backLabel(); as label) {\n <div yuwSheetHeader class=\"-mx-4 -mt-3 flex items-center gap-2 border-b px-4 pb-4\">\n <yuw-button type=\"button\" variant=\"outline\" size=\"icon-sm\" [ariaLabel]=\"label\" (clicked)=\"back.emit()\">\n <ng-icon name=\"lucideArrowLeft\" size=\"16\" />\n </yuw-button>\n <div class=\"min-w-0\">\n <h2 class=\"text-base font-medium text-foreground\">{{ title() }}</h2>\n @if (description(); as text) {\n <p class=\"truncate text-sm text-muted-foreground\">{{ text }}</p>\n }\n </div>\n </div>\n } @else if (guarded()) {\n <div yuwSheetHeader class=\"-mx-4 -mt-3 flex items-start gap-2 border-b px-4 pb-4\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"text-base font-medium text-foreground\">{{ title() }}</h2>\n @if (description(); as text) {\n <p class=\"text-sm text-muted-foreground\">{{ text }}</p>\n }\n </div>\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n [ariaLabel]=\"labels().close\"\n (clicked)=\"closeRequest.emit()\"\n >\n <ng-icon name=\"lucideX\" size=\"16\" />\n </yuw-button>\n </div>\n }\n\n <ng-content />\n\n <div\n yuwSheetFooter\n class=\"flex flex-wrap items-center justify-between gap-2\"\n [class.-m-4]=\"_divided()\"\n [class.border-t]=\"_divided()\"\n [class.p-4]=\"_divided()\"\n [style.display]=\"hideFooter() ? 'none' : null\"\n [attr.aria-busy]=\"saving()\"\n >\n @if (errorMessage(); as message) {\n <p role=\"alert\" class=\"w-full rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive\">{{ message }}</p>\n }\n\n @if (removeLabel(); as label) {\n <yuw-button\n variant=\"ghost\"\n color=\"destructive\"\n class=\"gap-2\"\n [disabled]=\"removeDisabled() || saving()\"\n (clicked)=\"remove.emit()\"\n >\n <ng-icon name=\"lucideTrash2\" size=\"16\" />\n {{ label }}\n </yuw-button>\n }\n\n <span class=\"ms-auto flex gap-2\">\n <yuw-button variant=\"outline\" (clicked)=\"onCancel()\">\n <ng-icon name=\"lucideX\" size=\"16\" />\n {{ labels().cancel }}\n </yuw-button>\n @if (restoreLabel(); as label) {\n <yuw-button color=\"primary\" [disabled]=\"saving()\" (clicked)=\"restore.emit()\">\n <ng-icon name=\"lucideArchiveRestore\" size=\"16\" />\n {{ label }}\n </yuw-button>\n }\n @if (!readonly()) {\n <yuw-button [color]=\"saveColor()\" [disabled]=\"saveDisabled() || saving()\" (clicked)=\"save.emit()\">\n <ng-icon name=\"lucideSave\" size=\"16\" />\n {{ labels().save }}\n </yuw-button>\n }\n </span>\n </div>\n</yuw-sheet>\n", dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: YuwButtonComponent, selector: "yuw-button", inputs: ["animationDisabled", "ariaLabel", "color", "disabled", "href", "size", "target", "transparent", "type", "class", "variant", "yuwDropdownMenuAlign", "yuwDropdownMenuTrigger"], outputs: ["clicked"] }, { kind: "component", type: YuwSheetComponent, selector: "yuw-sheet", inputs: ["ariaLabel", "ariaModal", "bodyClass", "closeLabel", "closeOnOutsidePointerEvents", "description", "disableClose", "open", "overlayClass", "panelClass", "scrollStrategy", "showTrigger", "side", "title", "triggerSize", "triggerVariant"], outputs: ["openChange"] }, { kind: "directive", type: YuwSheetFooterDirective, selector: "[yuwSheetFooter]" }, { kind: "directive", type: YuwSheetHeaderDirective, selector: "[yuwSheetHeader]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8378
8424
|
}
|
|
8379
8425
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsFormSheetComponent, decorators: [{
|
|
8380
8426
|
type: Component,
|
|
8381
8427
|
args: [{ selector: 'yuws-form-sheet', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIcon, YuwButtonComponent, YuwSheetComponent, YuwSheetFooterDirective, YuwSheetHeaderDirective], providers: [
|
|
8382
8428
|
provideIcons({ lucideArchiveRestore, lucideArrowLeft, lucideSave, lucideTrash2, lucideX }),
|
|
8383
8429
|
{ provide: YuwSheetOpenState, useExisting: YuwsFormSheetComponent },
|
|
8384
|
-
], template: "<yuw-sheet\n side=\"right\"\n [showTrigger]=\"false\"\n [panelClass]=\"panelClass()\"\n bodyClass=\"scroll-fade-y\"\n [title]=\"backLabel() || guarded() ? undefined : title()\"\n [description]=\"backLabel() || guarded() ? undefined : description()\"\n [closeLabel]=\"backLabel() || guarded() ? undefined : labels().close\"\n [disableClose]=\"guarded()\"\n [(open)]=\"open\"\n>\n @if (backLabel(); as label) {\n <div yuwSheetHeader class=\"-
|
|
8385
|
-
}], propDecorators: { backLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "backLabel", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], guarded: [{ type: i0.Input, args: [{ isSignal: true, alias: "guarded", required: false }] }], hideFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideFooter", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: true }] }, { type: i0.Output, args: ["openChange"] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], removeDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeDisabled", required: false }] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], restoreLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreLabel", required: false }] }], saveDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveDisabled", required: false }] }], saving: [{ type: i0.Input, args: [{ isSignal: true, alias: "saving", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], back: [{ type: i0.Output, args: ["back"] }], closeRequest: [{ type: i0.Output, args: ["closeRequest"] }], remove: [{ type: i0.Output, args: ["remove"] }], restore: [{ type: i0.Output, args: ["restore"] }], save: [{ type: i0.Output, args: ["save"] }] } });
|
|
8430
|
+
], template: "<yuw-sheet\n side=\"right\"\n [showTrigger]=\"false\"\n [panelClass]=\"panelClass()\"\n bodyClass=\"scroll-fade-y\"\n [title]=\"backLabel() || guarded() ? undefined : title()\"\n [description]=\"backLabel() || guarded() ? undefined : description()\"\n [closeLabel]=\"backLabel() || guarded() ? undefined : labels().close\"\n [disableClose]=\"guarded()\"\n [(open)]=\"open\"\n>\n @if (backLabel(); as label) {\n <div yuwSheetHeader class=\"-mx-4 -mt-3 flex items-center gap-2 border-b px-4 pb-4\">\n <yuw-button type=\"button\" variant=\"outline\" size=\"icon-sm\" [ariaLabel]=\"label\" (clicked)=\"back.emit()\">\n <ng-icon name=\"lucideArrowLeft\" size=\"16\" />\n </yuw-button>\n <div class=\"min-w-0\">\n <h2 class=\"text-base font-medium text-foreground\">{{ title() }}</h2>\n @if (description(); as text) {\n <p class=\"truncate text-sm text-muted-foreground\">{{ text }}</p>\n }\n </div>\n </div>\n } @else if (guarded()) {\n <div yuwSheetHeader class=\"-mx-4 -mt-3 flex items-start gap-2 border-b px-4 pb-4\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"text-base font-medium text-foreground\">{{ title() }}</h2>\n @if (description(); as text) {\n <p class=\"text-sm text-muted-foreground\">{{ text }}</p>\n }\n </div>\n <yuw-button\n type=\"button\"\n variant=\"outline\"\n size=\"icon-sm\"\n [ariaLabel]=\"labels().close\"\n (clicked)=\"closeRequest.emit()\"\n >\n <ng-icon name=\"lucideX\" size=\"16\" />\n </yuw-button>\n </div>\n }\n\n <ng-content />\n\n <div\n yuwSheetFooter\n class=\"flex flex-wrap items-center justify-between gap-2\"\n [class.-m-4]=\"_divided()\"\n [class.border-t]=\"_divided()\"\n [class.p-4]=\"_divided()\"\n [style.display]=\"hideFooter() ? 'none' : null\"\n [attr.aria-busy]=\"saving()\"\n >\n @if (errorMessage(); as message) {\n <p role=\"alert\" class=\"w-full rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive\">{{ message }}</p>\n }\n\n @if (removeLabel(); as label) {\n <yuw-button\n variant=\"ghost\"\n color=\"destructive\"\n class=\"gap-2\"\n [disabled]=\"removeDisabled() || saving()\"\n (clicked)=\"remove.emit()\"\n >\n <ng-icon name=\"lucideTrash2\" size=\"16\" />\n {{ label }}\n </yuw-button>\n }\n\n <span class=\"ms-auto flex gap-2\">\n <yuw-button variant=\"outline\" (clicked)=\"onCancel()\">\n <ng-icon name=\"lucideX\" size=\"16\" />\n {{ labels().cancel }}\n </yuw-button>\n @if (restoreLabel(); as label) {\n <yuw-button color=\"primary\" [disabled]=\"saving()\" (clicked)=\"restore.emit()\">\n <ng-icon name=\"lucideArchiveRestore\" size=\"16\" />\n {{ label }}\n </yuw-button>\n }\n @if (!readonly()) {\n <yuw-button [color]=\"saveColor()\" [disabled]=\"saveDisabled() || saving()\" (clicked)=\"save.emit()\">\n <ng-icon name=\"lucideSave\" size=\"16\" />\n {{ labels().save }}\n </yuw-button>\n }\n </span>\n </div>\n</yuw-sheet>\n" }]
|
|
8431
|
+
}], propDecorators: { backLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "backLabel", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], guarded: [{ type: i0.Input, args: [{ isSignal: true, alias: "guarded", required: false }] }], hideFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideFooter", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: true }] }, { type: i0.Output, args: ["openChange"] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], removeDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeDisabled", required: false }] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], restoreLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreLabel", required: false }] }], saveColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveColor", required: false }] }], saveDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveDisabled", required: false }] }], saving: [{ type: i0.Input, args: [{ isSignal: true, alias: "saving", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], back: [{ type: i0.Output, args: ["back"] }], closeRequest: [{ type: i0.Output, args: ["closeRequest"] }], remove: [{ type: i0.Output, args: ["remove"] }], restore: [{ type: i0.Output, args: ["restore"] }], save: [{ type: i0.Output, args: ["save"] }] } });
|
|
8386
8432
|
|
|
8387
8433
|
/**
|
|
8388
8434
|
* Image field of a form: label and the picker, either an avatar with the current image beside an upload button, or a
|
|
@@ -8412,7 +8458,7 @@ class YuwsImageFieldComponent {
|
|
|
8412
8458
|
this.initial = computed(() => this.name().trim().charAt(0).toLocaleUpperCase(), ...(ngDevMode ? [{ debugName: "initial" }] : /* istanbul ignore next */ []));
|
|
8413
8459
|
}
|
|
8414
8460
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsImageFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8415
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsImageFieldComponent, isStandalone: true, selector: "yuws-image-field", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n <label yuwLabel [for]=\"inputId()\">{{ label() }}</label>\n <yuw-input-file\n accept=\"image/*\"\n [inputId]=\"inputId()\"\n [alt]=\"name()\"\n [fallback]=\"initial()\"\n [src]=\"src()\"\n [uploadLabel]=\"uploadLabel()\"\n [removeLabel]=\"removeLabel()\"\n [variant]=\"variant()\"\n [(value)]=\"value\"\n (removed)=\"value.set([])\"\n />\n</div>\n", dependencies: [{ kind: "component", type: YuwInputFileComponent, selector: "yuw-input-file", inputs: ["accept", "alt", "countLabel", "errorText", "fallback", "helperText", "inputId", "invalid", "multiple", "name", "removeLabel", "required", "size", "src", "uploadLabel", "class", "value", "variant"], outputs: ["valueChange", "removed"] }, { kind: "directive", type: YuwLabel, selector: "label[yuwLabel]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8461
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsImageFieldComponent, isStandalone: true, selector: "yuws-image-field", inputs: { inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-2\">\n <label yuwLabel [for]=\"inputId()\">{{ label() }}</label>\n <yuw-input-file\n accept=\"image/*\"\n [inputId]=\"inputId()\"\n [alt]=\"name()\"\n [fallback]=\"initial()\"\n [src]=\"src()\"\n [uploadLabel]=\"uploadLabel()\"\n [removeLabel]=\"removeLabel()\"\n [variant]=\"variant()\"\n [(value)]=\"value\"\n (removed)=\"value.set([])\"\n />\n</div>\n", dependencies: [{ kind: "component", type: YuwInputFileComponent, selector: "yuw-input-file", inputs: ["accept", "alt", "countLabel", "emptyLabel", "errorText", "fallback", "helperText", "inputId", "invalid", "multiple", "name", "removeLabel", "required", "size", "src", "uploadLabel", "class", "value", "variant"], outputs: ["valueChange", "removed"] }, { kind: "directive", type: YuwLabel, selector: "label[yuwLabel]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8416
8462
|
}
|
|
8417
8463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsImageFieldComponent, decorators: [{
|
|
8418
8464
|
type: Component,
|
|
@@ -8447,7 +8493,7 @@ class YuwsImageUploadComponent {
|
|
|
8447
8493
|
this.files.set([]);
|
|
8448
8494
|
}
|
|
8449
8495
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsImageUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8450
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsImageUploadComponent, isStandalone: true, selector: "yuws-image-upload", inputs: { fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { imageUrl: "imageUrlChange" }, ngImport: i0, template: "<yuw-input-file\n accept=\"image/*\"\n size=\"sm\"\n [src]=\"imageUrl()\"\n [alt]=\"name()\"\n [fallback]=\"initials()\"\n [uploadLabel]=\"uploadLabel()\"\n [value]=\"files()\"\n (valueChange)=\"onFiles($event)\"\n/>\n", dependencies: [{ kind: "component", type: YuwInputFileComponent, selector: "yuw-input-file", inputs: ["accept", "alt", "countLabel", "errorText", "fallback", "helperText", "inputId", "invalid", "multiple", "name", "removeLabel", "required", "size", "src", "uploadLabel", "class", "value", "variant"], outputs: ["valueChange", "removed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8496
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: YuwsImageUploadComponent, isStandalone: true, selector: "yuws-image-upload", inputs: { fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { imageUrl: "imageUrlChange" }, ngImport: i0, template: "<yuw-input-file\n accept=\"image/*\"\n size=\"sm\"\n [src]=\"imageUrl()\"\n [alt]=\"name()\"\n [fallback]=\"initials()\"\n [uploadLabel]=\"uploadLabel()\"\n [value]=\"files()\"\n (valueChange)=\"onFiles($event)\"\n/>\n", dependencies: [{ kind: "component", type: YuwInputFileComponent, selector: "yuw-input-file", inputs: ["accept", "alt", "countLabel", "emptyLabel", "errorText", "fallback", "helperText", "inputId", "invalid", "multiple", "name", "removeLabel", "required", "size", "src", "uploadLabel", "class", "value", "variant"], outputs: ["valueChange", "removed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8451
8497
|
}
|
|
8452
8498
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: YuwsImageUploadComponent, decorators: [{
|
|
8453
8499
|
type: Component,
|