@juligc99/loro-ui 0.0.13 → 0.0.14
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.
|
@@ -1339,13 +1339,13 @@ class LoroButton {
|
|
|
1339
1339
|
return value === 'none' || value === 'with-icon' || value === 'only-icon';
|
|
1340
1340
|
}
|
|
1341
1341
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1342
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroButton, isStandalone: true, selector: "loro-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconContent: { classPropertyName: "iconContent", publicName: "iconContent", isSignal: true, isRequired: false, transformFunction: null }, iconMode: { classPropertyName: "iconMode", publicName: "iconMode", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconButtonSize: { classPropertyName: "iconButtonSize", publicName: "iconButtonSize", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, socialMobileCompact: { classPropertyName: "socialMobileCompact", publicName: "socialMobileCompact", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, typeButton: { classPropertyName: "typeButton", publicName: "typeButton", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, buttonWidth: { classPropertyName: "buttonWidth", publicName: "buttonWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescription: { classPropertyName: "ariaDescription", publicName: "ariaDescription", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", change: "change", sanChange: "sanChange" }, host: { properties: { "class.loro-button-host--full": "resolvedButtonWidth() === 'full'" } }, ngImport: i0, template: "<button\n [type]=\"type()\"\n [attr.form]=\"formId() || null\"\n class=\"loro-button\"\n [class]=\"'loro-button loro-button--' + resolvedTypeButton()\"\n [class.loro-button--outline]=\"variant() === 'outline'\"\n [class.loro-button--ghost]=\"variant() === 'ghost'\"\n [class.loro-button--soft]=\"variant() === 'soft'\"\n [class.loro-button--social]=\"variant() === 'social'\"\n [class.loro-button--action]=\"variant() === 'action'\"\n [class.loro-button--navigation]=\"variant() === 'navigation'\"\n [class.loro-button--danger]=\"variant() === 'danger'\"\n [class.loro-button--secondary-color]=\"resolvedColor() === 'secondary'\"\n [class.loro-button--tertiary-color]=\"resolvedColor() === 'tertiary'\"\n [class.loro-button--danger-color]=\"resolvedColor() === 'danger'\"\n [class.loro-button--sm]=\"size() === 'sm'\"\n [class.loro-button--lg]=\"size() === 'lg'\"\n [class.loro-button--full]=\"resolvedButtonWidth() === 'full'\"\n [class.loro-button--icon-only]=\"resolvedIconMode() === 'only-icon'\"\n [class.loro-button--social-mobile-compact]=\"socialMobileCompact()\"\n [class.loro-button--selected]=\"selected()\"\n [class.loro-button--loading]=\"loading()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-description]=\"ariaDescription() || null\"\n [attr.aria-busy]=\"loading()\"\n [style.--loro-button-icon-size]=\"resolvedIconButtonSize()\"\n (click)=\"emitChange()\"\n>\n @if (showIcon()) {\n <loro-icon\n [name]=\"resolvedIcon()!\"\n [size]=\"iconSize()\"\n [alt]=\"resolvedText()\"\n [color]=\"resolvedIconColor()\"\n [renderMode]=\"resolvedIconRenderMode()\"\n />\n }\n\n @if (showSpinner()) {\n <span class=\"loro-button__spinner\" aria-hidden=\"true\"></span>\n <span class=\"loro-button__sr-status\" aria-live=\"polite\">{{ loadingAriaLabel() }}</span>\n }\n\n @if (resolvedIconMode() !== 'only-icon') {\n <span class=\"loro-button__label\">{{ resolvedText() }}</span>\n }\n</button>\n", styles: [":host{display:inline-flex;width:fit-content;font-family:var(--loro-font-brand)}:host(.loro-button-host--full){display:block;width:100%}.loro-button{display:inline-flex;align-items:center;justify-content:center;gap:.65rem;min-width:0;min-height:var(--loro-button-min-height, 3.25rem);padding:var(--loro-button-padding, .85rem 1.25rem);border:1px solid transparent;border-radius:var(--loro-button-radius, .9rem);background:var(--loro-button-background, var(--loro-surface-muted));color:var(--loro-text-strong);box-shadow:var(--loro-button-shadow, none);font:inherit;font-size:var(--loro-button-font-size, 1rem);font-weight:900;line-height:1.1;white-space:normal;overflow-wrap:anywhere;word-break:break-word;text-align:center;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease,color .15s ease}.loro-button__label{min-width:0}.loro-button__spinner{width:1rem;height:1rem;flex:0 0 auto;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:loro-button-spin .7s linear infinite}.loro-button__sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loro-button:hover:not(:disabled){transform:translateY(-1px)}.loro-button--full{width:100%}.loro-button--primary,.loro-button--primary.loro-button--primary-color{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-button--secondary,.loro-button--outline{border-color:var(--loro-primary-500);background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary,.loro-button--ghost{background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary{min-height:auto;padding:0;border-radius:.55rem;box-shadow:none}.loro-button--tertiary:hover:not(:disabled){transform:none}.loro-button--tertiary:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:2px}.loro-button--soft{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent);color:var(--loro-primary-700)}.loro-button--social{border-color:var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text)}.loro-button--action{min-height:var(--loro-button-min-height, 2.75rem);padding:var(--loro-button-padding, 0);border:0;border-radius:var(--loro-button-radius, 50%);background:var(--loro-button-background, transparent);color:var(--loro-button-color, var(--loro-primary-700));box-shadow:var(--loro-button-shadow, none)}.loro-button--action:hover:not(:disabled){background:var(--loro-button-hover-background, color-mix(in srgb, var(--loro-primary) 8%, transparent));transform:translateY(-1px)}.loro-button--action:active:not(:disabled){transform:translateY(1px)}.loro-button--action:focus-visible{outline:3px solid var(--loro-button-focus-ring, color-mix(in srgb, var(--loro-primary) 36%, transparent));outline-offset:3px}.loro-button--social:hover:not(:disabled),.loro-button--social:focus-visible{border-color:var(--loro-primary-500);box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-button--navigation{justify-content:flex-start;gap:1rem;padding:.5rem;border-color:var(--loro-button-border-color, transparent);border-radius:var(--loro-button-radius, 1rem);color:var(--loro-home-avatar-color);text-align:left}.loro-button--navigation .loro-button__label{flex:1;text-align:left}.loro-button--navigation:hover:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected),.loro-button--navigation:focus-visible:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected){background:var(--loro-home-avatar-bg);transform:translateY(-.24rem) scale(1.01)}.loro-button--selected{border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))))}.loro-button--navigation.loro-button--selected:hover:not(:disabled),.loro-button--navigation.loro-button--selected:focus-visible:not(:disabled){transform:none;border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))));outline:none}.loro-button--danger,.loro-button--danger-color{border-color:color-mix(in srgb,var(--loro-danger-text) 24%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-button--navigation.loro-button--danger-color{border-color:var(--loro-button-border-color, transparent);background:var(--loro-button-background, var(--loro-danger-surface));color:var(--loro-button-color, var(--loro-danger-text))}.loro-button--secondary-color.loro-button--primary{background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-900));color:#fff}.loro-button--tertiary-color.loro-button--primary{background:linear-gradient(135deg,color-mix(in srgb,var(--loro-primary-500) 82%,white),var(--loro-primary-700));color:#fff}.loro-button--sm{min-height:var(--loro-button-min-height, 2.35rem);border-radius:var(--loro-button-radius, .65rem);font-size:var(--loro-button-font-size, .82rem)}.loro-button--lg{min-height:var(--loro-button-min-height, 3.65rem);padding:var(--loro-button-padding, .95rem 1.35rem);border-radius:var(--loro-button-radius, 1rem);font-size:var(--loro-button-font-size, 1.08rem)}.loro-button--icon-only{width:var(--loro-button-icon-size, 3rem);min-width:var(--loro-button-icon-size, 3rem);padding:0;aspect-ratio:1}.loro-button:disabled{cursor:not-allowed;opacity:.62;transform:none}.loro-button--loading{cursor:progress}@keyframes loro-button-spin{to{transform:rotate(360deg)}}@media(max-width:767.88px){.loro-button--social.loro-button--social-mobile-compact{width:var(--loro-button-icon-size, 3rem);min-width:var(--loro-button-icon-size, 3rem);min-height:var(--loro-button-icon-size, 3rem);margin-inline:auto;padding:0;aspect-ratio:1}.loro-button--social.loro-button--social-mobile-compact .loro-button__label{display:none}}@media(prefers-reduced-motion:reduce){.loro-button{transition:none}.loro-button__spinner{animation-duration:1.4s}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1342
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroButton, isStandalone: true, selector: "loro-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconContent: { classPropertyName: "iconContent", publicName: "iconContent", isSignal: true, isRequired: false, transformFunction: null }, iconMode: { classPropertyName: "iconMode", publicName: "iconMode", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconButtonSize: { classPropertyName: "iconButtonSize", publicName: "iconButtonSize", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, socialMobileCompact: { classPropertyName: "socialMobileCompact", publicName: "socialMobileCompact", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, typeButton: { classPropertyName: "typeButton", publicName: "typeButton", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, buttonWidth: { classPropertyName: "buttonWidth", publicName: "buttonWidth", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescription: { classPropertyName: "ariaDescription", publicName: "ariaDescription", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", change: "change", sanChange: "sanChange" }, host: { properties: { "class.loro-button-host--full": "resolvedButtonWidth() === 'full'" } }, ngImport: i0, template: "<button\n [type]=\"type()\"\n [attr.form]=\"formId() || null\"\n class=\"loro-button\"\n [class]=\"'loro-button loro-button--' + resolvedTypeButton()\"\n [class.loro-button--outline]=\"variant() === 'outline'\"\n [class.loro-button--ghost]=\"variant() === 'ghost'\"\n [class.loro-button--soft]=\"variant() === 'soft'\"\n [class.loro-button--social]=\"variant() === 'social'\"\n [class.loro-button--action]=\"variant() === 'action'\"\n [class.loro-button--navigation]=\"variant() === 'navigation'\"\n [class.loro-button--danger]=\"variant() === 'danger'\"\n [class.loro-button--secondary-color]=\"resolvedColor() === 'secondary'\"\n [class.loro-button--tertiary-color]=\"resolvedColor() === 'tertiary'\"\n [class.loro-button--danger-color]=\"resolvedColor() === 'danger'\"\n [class.loro-button--sm]=\"size() === 'sm'\"\n [class.loro-button--lg]=\"size() === 'lg'\"\n [class.loro-button--full]=\"resolvedButtonWidth() === 'full'\"\n [class.loro-button--icon-only]=\"resolvedIconMode() === 'only-icon'\"\n [class.loro-button--social-mobile-compact]=\"socialMobileCompact()\"\n [class.loro-button--selected]=\"selected()\"\n [class.loro-button--loading]=\"loading()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-description]=\"ariaDescription() || null\"\n [attr.aria-busy]=\"loading()\"\n [style.--loro-button-icon-size]=\"resolvedIconButtonSize()\"\n (click)=\"emitChange()\"\n>\n @if (showIcon()) {\n <loro-icon\n [name]=\"resolvedIcon()!\"\n [size]=\"iconSize()\"\n [alt]=\"resolvedText()\"\n [color]=\"resolvedIconColor()\"\n [renderMode]=\"resolvedIconRenderMode()\"\n />\n }\n\n @if (showSpinner()) {\n <span class=\"loro-button__spinner\" aria-hidden=\"true\"></span>\n <span class=\"loro-button__sr-status\" aria-live=\"polite\">{{ loadingAriaLabel() }}</span>\n }\n\n @if (resolvedIconMode() !== 'only-icon') {\n <span class=\"loro-button__label\">{{ resolvedText() }}</span>\n }\n</button>\n", styles: [":host{display:inline-flex;width:fit-content;font-family:var(--loro-font-brand)}:host(.loro-button-host--full){display:block;width:100%}.loro-button{display:inline-flex;align-items:center;justify-content:center;gap:.65rem;min-width:0;min-height:var(--loro-button-min-height, 3.25rem);padding:var(--loro-button-padding, .85rem 1.25rem);border:1px solid transparent;border-radius:var(--loro-button-radius, .9rem);background:var(--loro-button-background, var(--loro-surface-muted));color:var(--loro-text-strong);box-shadow:var(--loro-button-shadow, none);font:inherit;font-size:var(--loro-button-font-size, 1rem);font-weight:900;line-height:1.1;white-space:normal;overflow-wrap:anywhere;word-break:break-word;text-align:center;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease,color .15s ease}.loro-button__label{min-width:0}.loro-button__spinner{width:1rem;height:1rem;flex:0 0 auto;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:loro-button-spin .7s linear infinite}.loro-button__sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loro-button:hover:not(:disabled){transform:translateY(-1px)}.loro-button--full{width:100%}.loro-button--primary,.loro-button--primary.loro-button--primary-color{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-button--secondary,.loro-button--outline{border-color:var(--loro-primary-500);background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary,.loro-button--ghost{background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary{min-height:auto;padding:0;border-radius:.55rem;box-shadow:none}.loro-button--tertiary:hover:not(:disabled){transform:none}.loro-button--tertiary:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:2px}.loro-button--soft{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent);color:var(--loro-primary-700)}.loro-button--social{border-color:var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text)}.loro-button--action{min-height:var(--loro-button-min-height, 2.75rem);padding:var(--loro-button-padding, 0);border:0;border-radius:var(--loro-button-radius, 50%);background:var(--loro-button-background, transparent);color:var(--loro-button-color, var(--loro-primary-700));box-shadow:var(--loro-button-shadow, none)}.loro-button--action:hover:not(:disabled){background:var(--loro-button-hover-background, color-mix(in srgb, var(--loro-primary) 8%, transparent));transform:translateY(-1px)}.loro-button--action:active:not(:disabled){transform:translateY(1px)}.loro-button--action:focus-visible{outline:3px solid var(--loro-button-focus-ring, color-mix(in srgb, var(--loro-primary) 36%, transparent));outline-offset:3px}.loro-button--social:hover:not(:disabled),.loro-button--social:focus-visible{border-color:var(--loro-primary-500);box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-button--navigation{justify-content:flex-start;gap:1rem;padding:.5rem;border-color:var(--loro-button-border-color, transparent);border-radius:var(--loro-button-radius, 1rem);color:var(--loro-home-avatar-color);text-align:left}.loro-button--navigation .loro-button__label{flex:1;text-align:left}.loro-button--navigation:hover:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected),.loro-button--navigation:focus-visible:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected){background:var(--loro-home-avatar-bg);transform:translateY(-.24rem) scale(1.01)}.loro-button--selected{border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))))}.loro-button--navigation.loro-button--selected:hover:not(:disabled),.loro-button--navigation.loro-button--selected:focus-visible:not(:disabled){transform:none;border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))));outline:none}.loro-button--danger,.loro-button--danger-color{border-color:color-mix(in srgb,var(--loro-danger-text) 24%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-button--navigation.loro-button--danger-color{border-color:var(--loro-button-border-color, transparent);background:var(--loro-button-background, var(--loro-danger-surface));color:var(--loro-button-color, var(--loro-danger-text))}.loro-button--secondary-color.loro-button--primary{background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-900));color:#fff}.loro-button--tertiary-color.loro-button--primary{background:linear-gradient(135deg,color-mix(in srgb,var(--loro-primary-500) 82%,white),var(--loro-primary-700));color:#fff}.loro-button--sm{min-height:var(--loro-button-min-height, 2.35rem);border-radius:var(--loro-button-radius, .65rem);font-size:var(--loro-button-font-size, .82rem)}.loro-button--lg{min-height:var(--loro-button-min-height, 3.65rem);padding:var(--loro-button-padding, .95rem 1.35rem);border-radius:var(--loro-button-radius, 1rem);font-size:var(--loro-button-font-size, 1.08rem)}.loro-button--icon-only{width:var(--loro-button-icon-size, 3rem);min-width:var(--loro-button-icon-size, 3rem);padding:0;aspect-ratio:1}.loro-button:disabled{cursor:not-allowed;opacity:1;transform:none;border-color:var(--loro-button-disabled-border, var(--loro-disabled-border));background:var(--loro-button-disabled-bg, var(--loro-disabled-surface));color:var(--loro-button-disabled-text, var(--loro-disabled-text));box-shadow:var(--loro-button-disabled-shadow, none)}.loro-button--primary:disabled,.loro-button--primary-color:disabled{background:var(--loro-button-disabled-bg, var(--loro-disabled-primary-surface, var(--loro-disabled-surface)));color:var(--loro-button-disabled-text, var(--loro-disabled-primary-text, var(--loro-disabled-text)))}.loro-button--social:disabled{border-color:var(--loro-social-disabled-border, var(--loro-button-disabled-border, var(--loro-disabled-border)));background:var(--loro-social-disabled-surface, var(--loro-button-disabled-bg, var(--loro-disabled-surface)));color:var(--loro-social-disabled-text, var(--loro-button-disabled-text, var(--loro-disabled-text)));box-shadow:var(--loro-social-disabled-shadow, none)}.loro-button:disabled loro-icon,.loro-button:disabled ::ng-deep .loro-icon,.loro-button:disabled ::ng-deep svg{opacity:var(--loro-button-disabled-icon-opacity, .72)!important}.loro-button--loading:disabled{cursor:progress}.loro-button--loading{cursor:progress}@keyframes loro-button-spin{to{transform:rotate(360deg)}}@media(max-width:767.88px){.loro-button--social.loro-button--social-mobile-compact{width:var(--loro-button-icon-size, 3rem);min-width:var(--loro-button-icon-size, 3rem);min-height:var(--loro-button-icon-size, 3rem);margin-inline:auto;padding:0;aspect-ratio:1}.loro-button--social.loro-button--social-mobile-compact .loro-button__label{display:none}}@media(prefers-reduced-motion:reduce){.loro-button{transition:none}.loro-button__spinner{animation-duration:1.4s}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1343
1343
|
}
|
|
1344
1344
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroButton, decorators: [{
|
|
1345
1345
|
type: Component,
|
|
1346
1346
|
args: [{ selector: 'loro-button', standalone: true, imports: [LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1347
1347
|
'[class.loro-button-host--full]': "resolvedButtonWidth() === 'full'",
|
|
1348
|
-
}, template: "<button\n [type]=\"type()\"\n [attr.form]=\"formId() || null\"\n class=\"loro-button\"\n [class]=\"'loro-button loro-button--' + resolvedTypeButton()\"\n [class.loro-button--outline]=\"variant() === 'outline'\"\n [class.loro-button--ghost]=\"variant() === 'ghost'\"\n [class.loro-button--soft]=\"variant() === 'soft'\"\n [class.loro-button--social]=\"variant() === 'social'\"\n [class.loro-button--action]=\"variant() === 'action'\"\n [class.loro-button--navigation]=\"variant() === 'navigation'\"\n [class.loro-button--danger]=\"variant() === 'danger'\"\n [class.loro-button--secondary-color]=\"resolvedColor() === 'secondary'\"\n [class.loro-button--tertiary-color]=\"resolvedColor() === 'tertiary'\"\n [class.loro-button--danger-color]=\"resolvedColor() === 'danger'\"\n [class.loro-button--sm]=\"size() === 'sm'\"\n [class.loro-button--lg]=\"size() === 'lg'\"\n [class.loro-button--full]=\"resolvedButtonWidth() === 'full'\"\n [class.loro-button--icon-only]=\"resolvedIconMode() === 'only-icon'\"\n [class.loro-button--social-mobile-compact]=\"socialMobileCompact()\"\n [class.loro-button--selected]=\"selected()\"\n [class.loro-button--loading]=\"loading()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-description]=\"ariaDescription() || null\"\n [attr.aria-busy]=\"loading()\"\n [style.--loro-button-icon-size]=\"resolvedIconButtonSize()\"\n (click)=\"emitChange()\"\n>\n @if (showIcon()) {\n <loro-icon\n [name]=\"resolvedIcon()!\"\n [size]=\"iconSize()\"\n [alt]=\"resolvedText()\"\n [color]=\"resolvedIconColor()\"\n [renderMode]=\"resolvedIconRenderMode()\"\n />\n }\n\n @if (showSpinner()) {\n <span class=\"loro-button__spinner\" aria-hidden=\"true\"></span>\n <span class=\"loro-button__sr-status\" aria-live=\"polite\">{{ loadingAriaLabel() }}</span>\n }\n\n @if (resolvedIconMode() !== 'only-icon') {\n <span class=\"loro-button__label\">{{ resolvedText() }}</span>\n }\n</button>\n", styles: [":host{display:inline-flex;width:fit-content;font-family:var(--loro-font-brand)}:host(.loro-button-host--full){display:block;width:100%}.loro-button{display:inline-flex;align-items:center;justify-content:center;gap:.65rem;min-width:0;min-height:var(--loro-button-min-height, 3.25rem);padding:var(--loro-button-padding, .85rem 1.25rem);border:1px solid transparent;border-radius:var(--loro-button-radius, .9rem);background:var(--loro-button-background, var(--loro-surface-muted));color:var(--loro-text-strong);box-shadow:var(--loro-button-shadow, none);font:inherit;font-size:var(--loro-button-font-size, 1rem);font-weight:900;line-height:1.1;white-space:normal;overflow-wrap:anywhere;word-break:break-word;text-align:center;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease,color .15s ease}.loro-button__label{min-width:0}.loro-button__spinner{width:1rem;height:1rem;flex:0 0 auto;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:loro-button-spin .7s linear infinite}.loro-button__sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loro-button:hover:not(:disabled){transform:translateY(-1px)}.loro-button--full{width:100%}.loro-button--primary,.loro-button--primary.loro-button--primary-color{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-button--secondary,.loro-button--outline{border-color:var(--loro-primary-500);background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary,.loro-button--ghost{background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary{min-height:auto;padding:0;border-radius:.55rem;box-shadow:none}.loro-button--tertiary:hover:not(:disabled){transform:none}.loro-button--tertiary:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:2px}.loro-button--soft{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent);color:var(--loro-primary-700)}.loro-button--social{border-color:var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text)}.loro-button--action{min-height:var(--loro-button-min-height, 2.75rem);padding:var(--loro-button-padding, 0);border:0;border-radius:var(--loro-button-radius, 50%);background:var(--loro-button-background, transparent);color:var(--loro-button-color, var(--loro-primary-700));box-shadow:var(--loro-button-shadow, none)}.loro-button--action:hover:not(:disabled){background:var(--loro-button-hover-background, color-mix(in srgb, var(--loro-primary) 8%, transparent));transform:translateY(-1px)}.loro-button--action:active:not(:disabled){transform:translateY(1px)}.loro-button--action:focus-visible{outline:3px solid var(--loro-button-focus-ring, color-mix(in srgb, var(--loro-primary) 36%, transparent));outline-offset:3px}.loro-button--social:hover:not(:disabled),.loro-button--social:focus-visible{border-color:var(--loro-primary-500);box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-button--navigation{justify-content:flex-start;gap:1rem;padding:.5rem;border-color:var(--loro-button-border-color, transparent);border-radius:var(--loro-button-radius, 1rem);color:var(--loro-home-avatar-color);text-align:left}.loro-button--navigation .loro-button__label{flex:1;text-align:left}.loro-button--navigation:hover:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected),.loro-button--navigation:focus-visible:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected){background:var(--loro-home-avatar-bg);transform:translateY(-.24rem) scale(1.01)}.loro-button--selected{border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))))}.loro-button--navigation.loro-button--selected:hover:not(:disabled),.loro-button--navigation.loro-button--selected:focus-visible:not(:disabled){transform:none;border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))));outline:none}.loro-button--danger,.loro-button--danger-color{border-color:color-mix(in srgb,var(--loro-danger-text) 24%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-button--navigation.loro-button--danger-color{border-color:var(--loro-button-border-color, transparent);background:var(--loro-button-background, var(--loro-danger-surface));color:var(--loro-button-color, var(--loro-danger-text))}.loro-button--secondary-color.loro-button--primary{background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-900));color:#fff}.loro-button--tertiary-color.loro-button--primary{background:linear-gradient(135deg,color-mix(in srgb,var(--loro-primary-500) 82%,white),var(--loro-primary-700));color:#fff}.loro-button--sm{min-height:var(--loro-button-min-height, 2.35rem);border-radius:var(--loro-button-radius, .65rem);font-size:var(--loro-button-font-size, .82rem)}.loro-button--lg{min-height:var(--loro-button-min-height, 3.65rem);padding:var(--loro-button-padding, .95rem 1.35rem);border-radius:var(--loro-button-radius, 1rem);font-size:var(--loro-button-font-size, 1.08rem)}.loro-button--icon-only{width:var(--loro-button-icon-size, 3rem);min-width:var(--loro-button-icon-size, 3rem);padding:0;aspect-ratio:1}.loro-button:disabled{cursor:not-allowed;opacity
|
|
1348
|
+
}, template: "<button\n [type]=\"type()\"\n [attr.form]=\"formId() || null\"\n class=\"loro-button\"\n [class]=\"'loro-button loro-button--' + resolvedTypeButton()\"\n [class.loro-button--outline]=\"variant() === 'outline'\"\n [class.loro-button--ghost]=\"variant() === 'ghost'\"\n [class.loro-button--soft]=\"variant() === 'soft'\"\n [class.loro-button--social]=\"variant() === 'social'\"\n [class.loro-button--action]=\"variant() === 'action'\"\n [class.loro-button--navigation]=\"variant() === 'navigation'\"\n [class.loro-button--danger]=\"variant() === 'danger'\"\n [class.loro-button--secondary-color]=\"resolvedColor() === 'secondary'\"\n [class.loro-button--tertiary-color]=\"resolvedColor() === 'tertiary'\"\n [class.loro-button--danger-color]=\"resolvedColor() === 'danger'\"\n [class.loro-button--sm]=\"size() === 'sm'\"\n [class.loro-button--lg]=\"size() === 'lg'\"\n [class.loro-button--full]=\"resolvedButtonWidth() === 'full'\"\n [class.loro-button--icon-only]=\"resolvedIconMode() === 'only-icon'\"\n [class.loro-button--social-mobile-compact]=\"socialMobileCompact()\"\n [class.loro-button--selected]=\"selected()\"\n [class.loro-button--loading]=\"loading()\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-description]=\"ariaDescription() || null\"\n [attr.aria-busy]=\"loading()\"\n [style.--loro-button-icon-size]=\"resolvedIconButtonSize()\"\n (click)=\"emitChange()\"\n>\n @if (showIcon()) {\n <loro-icon\n [name]=\"resolvedIcon()!\"\n [size]=\"iconSize()\"\n [alt]=\"resolvedText()\"\n [color]=\"resolvedIconColor()\"\n [renderMode]=\"resolvedIconRenderMode()\"\n />\n }\n\n @if (showSpinner()) {\n <span class=\"loro-button__spinner\" aria-hidden=\"true\"></span>\n <span class=\"loro-button__sr-status\" aria-live=\"polite\">{{ loadingAriaLabel() }}</span>\n }\n\n @if (resolvedIconMode() !== 'only-icon') {\n <span class=\"loro-button__label\">{{ resolvedText() }}</span>\n }\n</button>\n", styles: [":host{display:inline-flex;width:fit-content;font-family:var(--loro-font-brand)}:host(.loro-button-host--full){display:block;width:100%}.loro-button{display:inline-flex;align-items:center;justify-content:center;gap:.65rem;min-width:0;min-height:var(--loro-button-min-height, 3.25rem);padding:var(--loro-button-padding, .85rem 1.25rem);border:1px solid transparent;border-radius:var(--loro-button-radius, .9rem);background:var(--loro-button-background, var(--loro-surface-muted));color:var(--loro-text-strong);box-shadow:var(--loro-button-shadow, none);font:inherit;font-size:var(--loro-button-font-size, 1rem);font-weight:900;line-height:1.1;white-space:normal;overflow-wrap:anywhere;word-break:break-word;text-align:center;cursor:pointer;transition:transform .15s ease,border-color .15s ease,background .15s ease,box-shadow .15s ease,color .15s ease}.loro-button__label{min-width:0}.loro-button__spinner{width:1rem;height:1rem;flex:0 0 auto;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:loro-button-spin .7s linear infinite}.loro-button__sr-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loro-button:hover:not(:disabled){transform:translateY(-1px)}.loro-button--full{width:100%}.loro-button--primary,.loro-button--primary.loro-button--primary-color{background:linear-gradient(135deg,var(--loro-primary-500),var(--loro-primary-700));color:#fff}.loro-button--secondary,.loro-button--outline{border-color:var(--loro-primary-500);background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary,.loro-button--ghost{background:transparent;color:var(--loro-primary-700)}.loro-button--tertiary{min-height:auto;padding:0;border-radius:.55rem;box-shadow:none}.loro-button--tertiary:hover:not(:disabled){transform:none}.loro-button--tertiary:focus-visible{outline:3px solid color-mix(in srgb,var(--loro-primary-500) 28%,transparent);outline-offset:2px}.loro-button--soft{background:color-mix(in srgb,var(--loro-primary-500) 8%,transparent);color:var(--loro-primary-700)}.loro-button--social{border-color:var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text)}.loro-button--action{min-height:var(--loro-button-min-height, 2.75rem);padding:var(--loro-button-padding, 0);border:0;border-radius:var(--loro-button-radius, 50%);background:var(--loro-button-background, transparent);color:var(--loro-button-color, var(--loro-primary-700));box-shadow:var(--loro-button-shadow, none)}.loro-button--action:hover:not(:disabled){background:var(--loro-button-hover-background, color-mix(in srgb, var(--loro-primary) 8%, transparent));transform:translateY(-1px)}.loro-button--action:active:not(:disabled){transform:translateY(1px)}.loro-button--action:focus-visible{outline:3px solid var(--loro-button-focus-ring, color-mix(in srgb, var(--loro-primary) 36%, transparent));outline-offset:3px}.loro-button--social:hover:not(:disabled),.loro-button--social:focus-visible{border-color:var(--loro-primary-500);box-shadow:var(--loro-shadow-soft),0 0 0 3px color-mix(in srgb,var(--loro-primary-500) 14%,transparent)}.loro-button--navigation{justify-content:flex-start;gap:1rem;padding:.5rem;border-color:var(--loro-button-border-color, transparent);border-radius:var(--loro-button-radius, 1rem);color:var(--loro-home-avatar-color);text-align:left}.loro-button--navigation .loro-button__label{flex:1;text-align:left}.loro-button--navigation:hover:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected),.loro-button--navigation:focus-visible:not(:disabled):not(.loro-button--danger-color):not(.loro-button--selected){background:var(--loro-home-avatar-bg);transform:translateY(-.24rem) scale(1.01)}.loro-button--selected{border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))))}.loro-button--navigation.loro-button--selected:hover:not(:disabled),.loro-button--navigation.loro-button--selected:focus-visible:not(:disabled){transform:none;border-color:var(--loro-button-selected-border-color, var(--loro-button-border-color, transparent));background:var(--loro-button-selected-background, var(--loro-button-background, transparent));color:var(--loro-button-selected-color, var(--loro-button-color, var(--loro-nav-button-text, var(--loro-text-strong))));outline:none}.loro-button--danger,.loro-button--danger-color{border-color:color-mix(in srgb,var(--loro-danger-text) 24%,transparent);background:var(--loro-danger-surface);color:var(--loro-danger-text)}.loro-button--navigation.loro-button--danger-color{border-color:var(--loro-button-border-color, transparent);background:var(--loro-button-background, var(--loro-danger-surface));color:var(--loro-button-color, var(--loro-danger-text))}.loro-button--secondary-color.loro-button--primary{background:linear-gradient(135deg,var(--loro-primary-700),var(--loro-primary-900));color:#fff}.loro-button--tertiary-color.loro-button--primary{background:linear-gradient(135deg,color-mix(in srgb,var(--loro-primary-500) 82%,white),var(--loro-primary-700));color:#fff}.loro-button--sm{min-height:var(--loro-button-min-height, 2.35rem);border-radius:var(--loro-button-radius, .65rem);font-size:var(--loro-button-font-size, .82rem)}.loro-button--lg{min-height:var(--loro-button-min-height, 3.65rem);padding:var(--loro-button-padding, .95rem 1.35rem);border-radius:var(--loro-button-radius, 1rem);font-size:var(--loro-button-font-size, 1.08rem)}.loro-button--icon-only{width:var(--loro-button-icon-size, 3rem);min-width:var(--loro-button-icon-size, 3rem);padding:0;aspect-ratio:1}.loro-button:disabled{cursor:not-allowed;opacity:1;transform:none;border-color:var(--loro-button-disabled-border, var(--loro-disabled-border));background:var(--loro-button-disabled-bg, var(--loro-disabled-surface));color:var(--loro-button-disabled-text, var(--loro-disabled-text));box-shadow:var(--loro-button-disabled-shadow, none)}.loro-button--primary:disabled,.loro-button--primary-color:disabled{background:var(--loro-button-disabled-bg, var(--loro-disabled-primary-surface, var(--loro-disabled-surface)));color:var(--loro-button-disabled-text, var(--loro-disabled-primary-text, var(--loro-disabled-text)))}.loro-button--social:disabled{border-color:var(--loro-social-disabled-border, var(--loro-button-disabled-border, var(--loro-disabled-border)));background:var(--loro-social-disabled-surface, var(--loro-button-disabled-bg, var(--loro-disabled-surface)));color:var(--loro-social-disabled-text, var(--loro-button-disabled-text, var(--loro-disabled-text)));box-shadow:var(--loro-social-disabled-shadow, none)}.loro-button:disabled loro-icon,.loro-button:disabled ::ng-deep .loro-icon,.loro-button:disabled ::ng-deep svg{opacity:var(--loro-button-disabled-icon-opacity, .72)!important}.loro-button--loading:disabled{cursor:progress}.loro-button--loading{cursor:progress}@keyframes loro-button-spin{to{transform:rotate(360deg)}}@media(max-width:767.88px){.loro-button--social.loro-button--social-mobile-compact{width:var(--loro-button-icon-size, 3rem);min-width:var(--loro-button-icon-size, 3rem);min-height:var(--loro-button-icon-size, 3rem);margin-inline:auto;padding:0;aspect-ratio:1}.loro-button--social.loro-button--social-mobile-compact .loro-button__label{display:none}}@media(prefers-reduced-motion:reduce){.loro-button{transition:none}.loro-button__spinner{animation-duration:1.4s}}\n"] }]
|
|
1349
1349
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconContent", required: false }] }], iconMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconMode", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconButtonSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconButtonSize", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], socialMobileCompact: [{ type: i0.Input, args: [{ isSignal: true, alias: "socialMobileCompact", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], typeButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeButton", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], buttonWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonWidth", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], formId: [{ type: i0.Input, args: [{ isSignal: true, alias: "formId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescription", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }], change: [{ type: i0.Output, args: ["change"] }], sanChange: [{ type: i0.Output, args: ["sanChange"] }] } });
|
|
1350
1350
|
|
|
1351
1351
|
const DEFAULT_MAIN_ITEMS = [
|
|
@@ -1361,8 +1361,8 @@ const DEFAULT_UTILITY_ITEMS = [
|
|
|
1361
1361
|
];
|
|
1362
1362
|
class LoroAppNav {
|
|
1363
1363
|
haptics = inject(LoroHapticsService);
|
|
1364
|
-
draggedMobilePosition = signal(null, ...(ngDevMode ? [{ debugName: "draggedMobilePosition" }] : /* istanbul ignore next */ []));
|
|
1365
1364
|
draggedMobileIndex = signal(null, ...(ngDevMode ? [{ debugName: "draggedMobileIndex" }] : /* istanbul ignore next */ []));
|
|
1365
|
+
mobilePointerActive = signal(false, ...(ngDevMode ? [{ debugName: "mobilePointerActive" }] : /* istanbul ignore next */ []));
|
|
1366
1366
|
activePointerId = null;
|
|
1367
1367
|
suppressNextMobileClick = false;
|
|
1368
1368
|
items = input(DEFAULT_MAIN_ITEMS, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
@@ -1380,14 +1380,11 @@ class LoroAppNav {
|
|
|
1380
1380
|
const index = this.mobileItems().findIndex((item) => item.active);
|
|
1381
1381
|
return index >= 0 ? index : 0;
|
|
1382
1382
|
}, ...(ngDevMode ? [{ debugName: "selectedMobileIndex" }] : /* istanbul ignore next */ []));
|
|
1383
|
-
mobileSliderPosition = computed(() => this.
|
|
1384
|
-
isMobileDragging = computed(() => this.
|
|
1383
|
+
mobileSliderPosition = computed(() => this.mobileItemIndexToVisualSlot(this.selectedMobileIndex()), ...(ngDevMode ? [{ debugName: "mobileSliderPosition" }] : /* istanbul ignore next */ []));
|
|
1384
|
+
isMobileDragging = computed(() => this.mobilePointerActive(), ...(ngDevMode ? [{ debugName: "isMobileDragging" }] : /* istanbul ignore next */ []));
|
|
1385
1385
|
mobileItemCount = computed(() => this.mobileItems().length, ...(ngDevMode ? [{ debugName: "mobileItemCount" }] : /* istanbul ignore next */ []));
|
|
1386
1386
|
selectedMobileItemId = computed(() => this.mobileItems()[this.selectedMobileIndex()]?.id ?? '', ...(ngDevMode ? [{ debugName: "selectedMobileItemId" }] : /* istanbul ignore next */ []));
|
|
1387
1387
|
isMobileItemVisualActive(index) {
|
|
1388
|
-
// Mientras se arrastra, ningún icono cambia visualmente.
|
|
1389
|
-
// El nuevo activo solo se refleja cuando el gesto termina y el padre
|
|
1390
|
-
// actualiza el item con active: true.
|
|
1391
1388
|
return this.selectedMobileIndex() === index;
|
|
1392
1389
|
}
|
|
1393
1390
|
onMainItemClick(item) {
|
|
@@ -1409,13 +1406,13 @@ class LoroAppNav {
|
|
|
1409
1406
|
}
|
|
1410
1407
|
const nav = event.currentTarget;
|
|
1411
1408
|
this.activePointerId = event.pointerId;
|
|
1409
|
+
this.mobilePointerActive.set(true);
|
|
1412
1410
|
nav.setPointerCapture(event.pointerId);
|
|
1413
|
-
const
|
|
1414
|
-
const index = this.getNearestEnabledMobileIndex(slotPosition);
|
|
1411
|
+
const index = this.getNearestEnabledMobileIndex(this.getMobileVisualSlotPosition(event.clientX, nav));
|
|
1415
1412
|
if (index === null) {
|
|
1413
|
+
this.releaseMobilePointer(nav, event.pointerId);
|
|
1416
1414
|
return;
|
|
1417
1415
|
}
|
|
1418
|
-
this.draggedMobilePosition.set(slotPosition);
|
|
1419
1416
|
this.draggedMobileIndex.set(index);
|
|
1420
1417
|
this.haptics.selection();
|
|
1421
1418
|
event.preventDefault();
|
|
@@ -1427,7 +1424,6 @@ class LoroAppNav {
|
|
|
1427
1424
|
const nav = event.currentTarget;
|
|
1428
1425
|
const slotPosition = this.getMobileVisualSlotPosition(event.clientX, nav);
|
|
1429
1426
|
const index = this.getNearestEnabledMobileIndex(slotPosition);
|
|
1430
|
-
this.draggedMobilePosition.set(slotPosition);
|
|
1431
1427
|
if (index !== null && index !== this.draggedMobileIndex()) {
|
|
1432
1428
|
this.draggedMobileIndex.set(index);
|
|
1433
1429
|
this.haptics.selection();
|
|
@@ -1443,19 +1439,14 @@ class LoroAppNav {
|
|
|
1443
1439
|
const index = this.getNearestEnabledMobileIndex(slotPosition) ?? this.draggedMobileIndex();
|
|
1444
1440
|
this.releaseMobilePointer(nav, event.pointerId);
|
|
1445
1441
|
if (index === null) {
|
|
1446
|
-
this.draggedMobilePosition.set(null);
|
|
1447
1442
|
this.draggedMobileIndex.set(null);
|
|
1448
1443
|
return;
|
|
1449
1444
|
}
|
|
1450
1445
|
const item = this.mobileItems()[index];
|
|
1451
1446
|
if (!item || item.disabled) {
|
|
1452
|
-
this.draggedMobilePosition.set(null);
|
|
1453
1447
|
this.draggedMobileIndex.set(null);
|
|
1454
1448
|
return;
|
|
1455
1449
|
}
|
|
1456
|
-
// Keep the thumb exactly on the snapped item until the parent applies
|
|
1457
|
-
// the new active state, avoiding a visual jump back to the old item.
|
|
1458
|
-
this.draggedMobilePosition.set(this.mobileItemIndexToVisualSlot(index));
|
|
1459
1450
|
this.draggedMobileIndex.set(index);
|
|
1460
1451
|
this.suppressNextMobileClick = true;
|
|
1461
1452
|
globalThis.setTimeout(() => {
|
|
@@ -1463,7 +1454,6 @@ class LoroAppNav {
|
|
|
1463
1454
|
});
|
|
1464
1455
|
this.emitMainItem(item, false);
|
|
1465
1456
|
globalThis.queueMicrotask(() => {
|
|
1466
|
-
this.draggedMobilePosition.set(null);
|
|
1467
1457
|
this.draggedMobileIndex.set(null);
|
|
1468
1458
|
});
|
|
1469
1459
|
event.preventDefault();
|
|
@@ -1473,7 +1463,6 @@ class LoroAppNav {
|
|
|
1473
1463
|
return;
|
|
1474
1464
|
}
|
|
1475
1465
|
this.releaseMobilePointer(event.currentTarget, event.pointerId);
|
|
1476
|
-
this.draggedMobilePosition.set(null);
|
|
1477
1466
|
this.draggedMobileIndex.set(null);
|
|
1478
1467
|
}
|
|
1479
1468
|
onUtilityItemClick(item) {
|
|
@@ -1526,13 +1515,14 @@ class LoroAppNav {
|
|
|
1526
1515
|
nav.releasePointerCapture(pointerId);
|
|
1527
1516
|
}
|
|
1528
1517
|
this.activePointerId = null;
|
|
1518
|
+
this.mobilePointerActive.set(false);
|
|
1529
1519
|
}
|
|
1530
1520
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAppNav, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1531
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAppNav, isStandalone: true, selector: "loro-app-nav", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, utilityItems: { classPropertyName: "utilityItems", publicName: "utilityItems", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, showUtilityItems: { classPropertyName: "showUtilityItems", publicName: "showUtilityItems", isSignal: true, isRequired: false, transformFunction: null }, compactDesktop: { classPropertyName: "compactDesktop", publicName: "compactDesktop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", utilityItemClick: "utilityItemClick", navItemClick: "navItemClick" }, ngImport: i0, template: "<aside class=\"loro-app-nav\">\n <div class=\"loro-app-nav__desktop\">\n <div class=\"loro-app-nav__surface\" [class.loro-app-nav__surface--compact]=\"compactDesktop()\">\n <div class=\"loro-app-nav__brand\">\n <loro-image\n class=\"loro-app-nav__brand-image\"\n name=\"image-loro-apaisado\"\n alt=\"AlLoro\"\n width=\"10rem\"\n height=\"auto\"\n />\n </div>\n\n <nav class=\"loro-app-nav__nav\" [attr.aria-label]=\"ariaLabel()\">\n @for (item of desktopItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onMainItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n\n <div class=\"loro-app-nav__spacer\"></div>\n\n @if (showUtilityItems() && utilityItems().length > 0) {\n <div class=\"loro-app-nav__divider\" aria-hidden=\"true\"></div>\n\n <nav\n class=\"loro-app-nav__nav loro-app-nav__nav--utility\"\n aria-label=\"Navegaci\u00F3n secundaria\"\n >\n @for (item of utilityItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onUtilityItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n }\n </div>\n </div>\n\n <nav\n ngToolbar\n class=\"loro-app-nav__mobile\"\n [attr.aria-label]=\"ariaLabel()\"\n [style.--loro-mobile-slider-position]=\"mobileSliderPosition()\"\n [class.loro-app-nav__mobile--dragging]=\"isMobileDragging()\"\n [class.loro-app-nav__mobile--with-labels]=\"true\"\n [style.--loro-mobile-item-count]=\"mobileItemCount()\"\n [style.--loro-mobile-visual-slot-count]=\"mobileVisualSlotCount()\"\n (pointerdown)=\"onMobilePointerDown($event)\"\n (pointermove)=\"onMobilePointerMove($event)\"\n (pointerup)=\"onMobilePointerUp($event)\"\n (pointercancel)=\"onMobilePointerCancel($event)\"\n >\n <span\n class=\"loro-app-nav__mobile-slider\"\n [class.loro-app-nav__mobile-slider--scan]=\"selectedMobileItemId() === 'scan'\"\n aria-hidden=\"true\"></span>\n\n @for (item of mobileItems(); track item.id; let index = $index) {\n <button\n ngToolbarWidget\n type=\"button\"\n class=\"loro-app-nav__mobile-item\"\n [style.grid-column]=\"mobileItemGridColumn(index)\"\n [class.loro-app-nav__mobile-item--active]=\"isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--scan-active]=\"item.id === 'scan' && isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--disabled]=\"item.disabled\"\n [attr.aria-label]=\"item.label\"\n [attr.aria-current]=\"item.active ? 'page' : null\"\n [value]=\"item.id\"\n [disabled]=\"!!item.disabled\"\n (click)=\"onMobileItemClick(item)\"\n >\n <loro-icon\n class=\"loro-app-nav__mobile-icon\"\n [name]=\"item.icon\"\n [size]=\"24\"\n color=\"default\"\n [alt]=\"item.label\"\n />\n <span class=\"loro-app-nav__mobile-label\">{{ item.label }}</span>\n </button>\n }\n </nav>\n</aside>\n", styles: [":host{display:block;width:100%;height:100%}.loro-app-nav{width:100%;height:100%}.loro-app-nav__desktop{display:none;height:100%}.loro-app-nav__surface{width:100%;max-width:none;display:flex;height:100%;flex-direction:column;gap:1.1rem;padding:1.75rem 1.35rem 1.5rem;background:var(--loro-nav-desktop-surface, var(--loro-shell-header-surface));border:1px solid var(--loro-nav-desktop-border, var(--loro-border-soft))}html[data-theme=dark] .loro-app-nav__surface{background:var(--loro-nav-desktop-surface, rgba(24, 28, 32, .78));border-color:var(--loro-nav-desktop-border, rgba(255, 255, 255, .08));box-shadow:var(--loro-nav-desktop-shadow, none)}.loro-app-nav__surface--compact{gap:.9rem;padding:1.25rem 1rem 1.15rem}.loro-app-nav__surface--compact .loro-app-nav__brand{min-height:3.65rem;padding-bottom:1.2rem}.loro-app-nav__surface--compact .loro-app-nav__item{--loro-button-min-height: 3.75rem}.loro-app-nav__brand{display:flex;align-items:center;min-height:4.25rem;padding:.35rem .55rem .85rem}.loro-app-nav__brand-image{display:block}.loro-app-nav__nav{display:flex;flex-direction:column;gap:.75rem}.loro-app-nav__item{--loro-button-min-height: 4.25rem;--loro-button-padding: 1rem 1.2rem;--loro-button-radius: 1rem;--loro-button-font-size: 1rem;--loro-button-background: var(--loro-nav-button-background, transparent);--loro-button-border-color: var(--loro-nav-button-border, transparent);--loro-button-color: var(--loro-nav-button-text, var(--loro-text-strong));--loro-button-hover-background: var(--loro-nav-button-hover-bg, var(--loro-nav-hover-bg));--loro-button-hover-border-color: var(--loro-nav-button-hover-border, transparent);--loro-button-hover-color: var(--loro-nav-button-hover-text, var(--loro-nav-button-text, var(--loro-text-strong)));--loro-button-hover-shadow: var(--loro-nav-button-hover-shadow, none);display:block;width:100%;color:var(--loro-nav-button-text, var(--loro-text-strong))}.loro-app-nav__item--active{--loro-button-selected-background: var(--loro-nav-button-active-bg, var(--loro-nav-active-bg));--loro-button-selected-border-color: var(--loro-nav-button-active-border, var(--loro-nav-active-border));--loro-button-selected-color: var(--loro-nav-button-active-text, var(--loro-primary-500));--loro-button-selected-shadow: var(--loro-nav-button-active-shadow, inset .35rem 0 0 var(--loro-primary-500))}.loro-app-nav__item--logout{--loro-button-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-hover-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-hover-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-hover-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-shadow: none;--loro-button-hover-shadow: none}.loro-app-nav__item--disabled,.loro-app-nav__mobile-item--disabled{cursor:not-allowed;opacity:.45}.loro-app-nav__label,.loro-app-nav__mobile-label{color:inherit}.loro-app-nav__label{font-size:.98rem;font-weight:700;color:inherit}.loro-app-nav__badge{margin-left:auto;min-width:1.5rem;padding:.125rem .5rem;border-radius:999px;background:#ffffff24;color:inherit;font-size:.75rem;font-weight:700;text-align:center;box-shadow:inset 0 1px #ffffff14}.loro-app-nav__spacer{flex:1}.loro-app-nav__divider{height:1px;margin:.65rem 0 .9rem;background:var(--loro-nav-divider)}.loro-app-nav__nav--utility{margin-top:auto}.loro-app-nav__mobile{position:fixed;left:50%;bottom:max(1.25rem,env(safe-area-inset-bottom,0px) * .28);z-index:70;display:grid;grid-template-columns:repeat(var(--loro-mobile-visual-slot-count, 4),minmax(0,1fr));width:min(76vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),19rem);gap:0;margin:0;transform:translate(-50%);padding:0;overflow:hidden;border:1px solid var(--loro-nav-mobile-border, rgba(43, 35, 80, .08));border-radius:999px;isolation:isolate;background:var(--loro-nav-mobile-glass-surface, rgba(255, 255, 255, .68));box-shadow:var(--loro-nav-mobile-surface-shadow, 0 8px 24px rgba(28, 32, 48, .1));backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);-webkit-backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;transition:background .22s ease,border-color .22s ease,box-shadow .22s ease}.loro-app-nav__mobile-item{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:3.58rem;gap:.18rem;padding:.35rem .15rem;border:0;border-radius:999px;outline:0;background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text));cursor:pointer;appearance:none;-webkit-appearance:none;opacity:1;visibility:visible;transition:transform .22s cubic-bezier(.22,1,.36,1);-webkit-tap-highlight-color:transparent}.loro-app-nav__mobile-item:active,.loro-app-nav__mobile-item--active,.loro-app-nav__mobile-item:hover{background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text))}.loro-app-nav__mobile-item:focus-visible{outline:2px solid var(--loro-focus-ring);outline-offset:-4px}.loro-app-nav__mobile-item:disabled{cursor:not-allowed;opacity:.45}.loro-app-nav__mobile-icon{position:relative;z-index:3;display:inline-flex;align-items:center;justify-content:center;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none;mix-blend-mode:normal;transform:scale(.94);transform-origin:center}.loro-app-nav__mobile-item ::ng-deep .loro-icon,.loro-app-nav__mobile-item ::ng-deep svg{display:block!important;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none!important}.loro-app-nav__mobile-item ::ng-deep .loro-icon__mask{background-color:currentColor!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-item ::ng-deep svg [fill]:not([fill=none]){fill:currentColor!important}.loro-app-nav__mobile-item ::ng-deep svg [stroke]:not([stroke=none]){stroke:currentColor!important}.loro-app-nav__mobile-slider{position:absolute;inset-block:0;left:0;z-index:1;width:calc(100% / var(--loro-mobile-visual-slot-count, 4));border:0;border-radius:999px;background:var(--loro-nav-mobile-indicator, linear-gradient(180deg, rgba(227, 229, 233, .96) 0%, rgba(214, 217, 223, .92) 100%));box-shadow:var(--loro-nav-mobile-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 5px rgba(21, 28, 42, .06));transform:translate3d(calc(var(--loro-mobile-slider-position, 0) * 100%),0,0);will-change:transform;transition:transform .26s cubic-bezier(.22,1,.36,1);pointer-events:none}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-slider{transition:none}.loro-app-nav__mobile-slider--scan{background:var(--loro-nav-mobile-scan-indicator, linear-gradient(180deg, rgba(132, 83, 255, .98) 0%, rgba(94, 47, 224, .96) 100%));box-shadow:var(--loro-nav-mobile-scan-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .38), 0 .85rem 1.65rem rgba(108, 60, 255, .28))}.loro-app-nav__mobile-item--scan-active{color:var(--loro-nav-mobile-scan-active-color, #fff)!important}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item ::ng-deep .loro-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item ::ng-deep svg{color:var(--loro-nav-mobile-icon, var(--loro-text))!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-label{display:block;max-width:100%;overflow:hidden;color:inherit;font-size:.625rem;font-weight:700;line-height:1.1;text-align:center;text-overflow:ellipsis;white-space:nowrap;opacity:0;transform:translateY(.08rem);transition:opacity .18s ease,transform .18s ease}.loro-app-nav__mobile--with-labels{width:min(92vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),24rem)}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-item{min-height:4.4rem;padding-top:.7rem}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-label{opacity:1;transform:translateY(0)}@media(max-width:479.99px)and (orientation:portrait){:host{height:auto}.loro-app-nav{height:auto;padding:0}.loro-app-nav__desktop{height:auto}}@media(min-width:1024px){:host,.loro-app-nav,.loro-app-nav__desktop{height:100%}.loro-app-nav__desktop{display:block}.loro-app-nav__mobile{display:none}}@media(prefers-reduced-motion:reduce){.loro-app-nav__mobile-slider,.loro-app-nav__mobile-item,.loro-app-nav__mobile-item ::ng-deep .loro-icon{transition-duration:1ms}}\n"], dependencies: [{ kind: "directive", type: Toolbar, selector: "[ngToolbar]", inputs: ["orientation", "softDisabled", "disabled", "wrap", "values"], outputs: ["valuesChange"], exportAs: ["ngToolbar"] }, { kind: "directive", type: ToolbarWidget, selector: "[ngToolbarWidget]", inputs: ["id", "disabled", "value"], exportAs: ["ngToolbarWidget"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }, { kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1521
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroAppNav, isStandalone: true, selector: "loro-app-nav", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, utilityItems: { classPropertyName: "utilityItems", publicName: "utilityItems", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, showUtilityItems: { classPropertyName: "showUtilityItems", publicName: "showUtilityItems", isSignal: true, isRequired: false, transformFunction: null }, compactDesktop: { classPropertyName: "compactDesktop", publicName: "compactDesktop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", utilityItemClick: "utilityItemClick", navItemClick: "navItemClick" }, ngImport: i0, template: "<aside class=\"loro-app-nav\">\n <div class=\"loro-app-nav__desktop\">\n <div class=\"loro-app-nav__surface\" [class.loro-app-nav__surface--compact]=\"compactDesktop()\">\n <div class=\"loro-app-nav__brand\">\n <loro-image\n class=\"loro-app-nav__brand-image\"\n name=\"image-loro-apaisado\"\n alt=\"AlLoro\"\n width=\"10rem\"\n height=\"auto\"\n />\n </div>\n\n <nav class=\"loro-app-nav__nav\" [attr.aria-label]=\"ariaLabel()\">\n @for (item of desktopItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onMainItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n\n <div class=\"loro-app-nav__spacer\"></div>\n\n @if (showUtilityItems() && utilityItems().length > 0) {\n <div class=\"loro-app-nav__divider\" aria-hidden=\"true\"></div>\n\n <nav\n class=\"loro-app-nav__nav loro-app-nav__nav--utility\"\n aria-label=\"Navegaci\u00F3n secundaria\"\n >\n @for (item of utilityItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onUtilityItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n }\n </div>\n </div>\n\n <nav\n ngToolbar\n class=\"loro-app-nav__mobile\"\n data-horizontal-gesture\n [attr.aria-label]=\"ariaLabel()\"\n [style.--loro-mobile-slider-position]=\"mobileSliderPosition()\"\n [class.loro-app-nav__mobile--dragging]=\"isMobileDragging()\"\n [class.loro-app-nav__mobile--with-labels]=\"true\"\n [style.--loro-mobile-item-count]=\"mobileItemCount()\"\n [style.--loro-mobile-visual-slot-count]=\"mobileVisualSlotCount()\"\n (pointerdown)=\"onMobilePointerDown($event)\"\n (pointermove)=\"onMobilePointerMove($event)\"\n (pointerup)=\"onMobilePointerUp($event)\"\n (pointercancel)=\"onMobilePointerCancel($event)\"\n >\n <span\n class=\"loro-app-nav__mobile-slider\"\n [class.loro-app-nav__mobile-slider--scan]=\"selectedMobileItemId() === 'scan'\"\n aria-hidden=\"true\"></span>\n\n @for (item of mobileItems(); track item.id; let index = $index) {\n <button\n ngToolbarWidget\n type=\"button\"\n class=\"loro-app-nav__mobile-item\"\n [style.grid-column]=\"mobileItemGridColumn(index)\"\n [class.loro-app-nav__mobile-item--active]=\"isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--scan-active]=\"item.id === 'scan' && isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--disabled]=\"item.disabled\"\n [attr.aria-label]=\"item.label\"\n [attr.aria-current]=\"item.active ? 'page' : null\"\n [value]=\"item.id\"\n [disabled]=\"!!item.disabled\"\n (click)=\"onMobileItemClick(item)\"\n >\n <loro-icon\n class=\"loro-app-nav__mobile-icon\"\n [name]=\"item.icon\"\n [size]=\"24\"\n color=\"default\"\n [alt]=\"item.label\"\n />\n <span class=\"loro-app-nav__mobile-label\">{{ item.label }}</span>\n </button>\n }\n </nav>\n</aside>\n", styles: [":host{display:block;width:100%;height:100%}.loro-app-nav{width:100%;height:100%}.loro-app-nav__desktop{display:none;height:100%}.loro-app-nav__surface{width:100%;max-width:none;display:flex;height:100%;flex-direction:column;gap:1.1rem;padding:1.75rem 1.35rem 1.5rem;background:var(--loro-nav-desktop-surface, var(--loro-shell-header-surface));border:1px solid var(--loro-nav-desktop-border, var(--loro-border-soft))}html[data-theme=dark] .loro-app-nav__surface{background:var(--loro-nav-desktop-surface, rgba(24, 28, 32, .78));border-color:var(--loro-nav-desktop-border, rgba(255, 255, 255, .08));box-shadow:var(--loro-nav-desktop-shadow, none)}.loro-app-nav__surface--compact{gap:.9rem;padding:1.25rem 1rem 1.15rem}.loro-app-nav__surface--compact .loro-app-nav__brand{min-height:3.65rem;padding-bottom:1.2rem}.loro-app-nav__surface--compact .loro-app-nav__item{--loro-button-min-height: 3.75rem}.loro-app-nav__brand{display:flex;align-items:center;min-height:4.25rem;padding:.35rem .55rem .85rem}.loro-app-nav__brand-image{display:block}.loro-app-nav__nav{display:flex;flex-direction:column;gap:.75rem}.loro-app-nav__item{--loro-button-min-height: 4.25rem;--loro-button-padding: 1rem 1.2rem;--loro-button-radius: 1rem;--loro-button-font-size: 1rem;--loro-button-background: var(--loro-nav-button-background, transparent);--loro-button-border-color: var(--loro-nav-button-border, transparent);--loro-button-color: var(--loro-nav-button-text, var(--loro-text-strong));--loro-button-hover-background: var(--loro-nav-button-hover-bg, var(--loro-nav-hover-bg));--loro-button-hover-border-color: var(--loro-nav-button-hover-border, transparent);--loro-button-hover-color: var(--loro-nav-button-hover-text, var(--loro-nav-button-text, var(--loro-text-strong)));--loro-button-hover-shadow: var(--loro-nav-button-hover-shadow, none);display:block;width:100%;color:var(--loro-nav-button-text, var(--loro-text-strong))}.loro-app-nav__item--active{--loro-button-selected-background: var(--loro-nav-button-active-bg, var(--loro-nav-active-bg));--loro-button-selected-border-color: var(--loro-nav-button-active-border, var(--loro-nav-active-border));--loro-button-selected-color: var(--loro-nav-button-active-text, var(--loro-primary-500));--loro-button-selected-shadow: var(--loro-nav-button-active-shadow, inset .35rem 0 0 var(--loro-primary-500))}.loro-app-nav__item--logout{--loro-button-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-hover-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-hover-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-hover-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-shadow: none;--loro-button-hover-shadow: none}.loro-app-nav__item--disabled,.loro-app-nav__mobile-item--disabled{cursor:not-allowed;opacity:1}.loro-app-nav__item--disabled{--loro-button-disabled-bg: var(--loro-disabled-surface);--loro-button-disabled-border: var(--loro-disabled-border);--loro-button-disabled-text: var(--loro-disabled-text)}.loro-app-nav__mobile-item--disabled{color:var(--loro-disabled-text)}.loro-app-nav__label,.loro-app-nav__mobile-label{color:inherit}.loro-app-nav__label{font-size:.98rem;font-weight:700;color:inherit}.loro-app-nav__badge{margin-left:auto;min-width:1.5rem;padding:.125rem .5rem;border-radius:999px;background:#ffffff24;color:inherit;font-size:.75rem;font-weight:700;text-align:center;box-shadow:inset 0 1px #ffffff14}.loro-app-nav__spacer{flex:1}.loro-app-nav__divider{height:1px;margin:.65rem 0 .9rem;background:var(--loro-nav-divider)}.loro-app-nav__nav--utility{margin-top:auto}.loro-app-nav__mobile{position:fixed;left:50%;bottom:max(1.25rem,env(safe-area-inset-bottom,0px) * .28);z-index:70;display:grid;grid-template-columns:repeat(var(--loro-mobile-visual-slot-count, 4),minmax(0,1fr));width:min(76vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),19rem);gap:0;margin:0;transform:translate(-50%);padding:0;overflow:hidden;border:1px solid var(--loro-nav-mobile-border, rgba(43, 35, 80, .08));border-radius:999px;isolation:isolate;background:var(--loro-nav-mobile-glass-surface, rgba(255, 255, 255, .68));box-shadow:var(--loro-nav-mobile-surface-shadow, 0 8px 24px rgba(28, 32, 48, .1));backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);-webkit-backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);touch-action:pan-y;contain:layout paint;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;transition:background .22s ease,border-color .22s ease,box-shadow .22s ease}.loro-app-nav__mobile-item{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:3.58rem;gap:.18rem;padding:.35rem .15rem;border:0;border-radius:999px;outline:0;background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text));cursor:pointer;appearance:none;-webkit-appearance:none;opacity:1;visibility:visible;transition:transform .22s cubic-bezier(.22,1,.36,1);-webkit-tap-highlight-color:transparent}.loro-app-nav__mobile-item:hover:not(.loro-app-nav__mobile-item--active),.loro-app-nav__mobile-item:active:not(.loro-app-nav__mobile-item--active),.loro-app-nav__mobile-item:focus:not(.loro-app-nav__mobile-item--active){background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text))}.loro-app-nav__mobile-item--active{background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text))}.loro-app-nav__mobile-item:focus-visible{outline:2px solid var(--loro-focus-ring);outline-offset:-4px}.loro-app-nav__mobile-item:disabled{cursor:not-allowed;opacity:1;color:var(--loro-disabled-text)}.loro-app-nav__mobile-icon{position:relative;z-index:3;display:inline-flex;align-items:center;justify-content:center;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none;mix-blend-mode:normal;transform:scale(.94);transform-origin:center}.loro-app-nav__mobile-item ::ng-deep .loro-icon,.loro-app-nav__mobile-item ::ng-deep svg{display:block!important;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none!important}.loro-app-nav__mobile-item ::ng-deep .loro-icon__mask{background-color:currentColor!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-item ::ng-deep svg [fill]:not([fill=none]){fill:currentColor!important}.loro-app-nav__mobile-item ::ng-deep svg [stroke]:not([stroke=none]){stroke:currentColor!important}.loro-app-nav__mobile-slider{position:absolute;inset-block:0;left:0;z-index:1;width:calc(100% / var(--loro-mobile-visual-slot-count, 4));border:0;border-radius:999px;background:var(--loro-nav-mobile-indicator, linear-gradient(180deg, rgba(227, 229, 233, .96) 0%, rgba(214, 217, 223, .92) 100%));box-shadow:var(--loro-nav-mobile-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 5px rgba(21, 28, 42, .06));transform:translate3d(calc(var(--loro-mobile-slider-position, 0) * 100%),0,0);will-change:transform;transition:transform .26s cubic-bezier(.22,1,.36,1);pointer-events:none}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-slider{transition:transform 1ms linear}.loro-app-nav__mobile-slider--scan{background:var(--loro-nav-mobile-scan-indicator, linear-gradient(180deg, rgba(132, 83, 255, .98) 0%, rgba(94, 47, 224, .96) 100%));box-shadow:var(--loro-nav-mobile-scan-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .38), 0 .85rem 1.65rem rgba(108, 60, 255, .28))}.loro-app-nav__mobile-item--scan-active{color:var(--loro-nav-mobile-scan-active-color, #fff)!important}.loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active):hover,.loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active):active{color:var(--loro-nav-mobile-icon, var(--loro-text))!important}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active),.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active) .loro-app-nav__mobile-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active) ::ng-deep .loro-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active) ::ng-deep svg{color:var(--loro-nav-mobile-icon, var(--loro-text))!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-label{display:block;max-width:100%;overflow:hidden;color:inherit;font-size:.625rem;font-weight:700;line-height:1.1;text-align:center;text-overflow:ellipsis;white-space:nowrap;opacity:0;transform:translateY(.08rem);transition:opacity .18s ease,transform .18s ease}.loro-app-nav__mobile--with-labels{width:min(92vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),24rem)}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-item{min-height:4.4rem;padding-top:.7rem}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-label{opacity:1;transform:translateY(0)}@media(max-width:479.99px)and (orientation:portrait){:host{height:auto}.loro-app-nav{height:auto;padding:0}.loro-app-nav__desktop{height:auto}}@media(min-width:1024px){:host,.loro-app-nav,.loro-app-nav__desktop{height:100%}.loro-app-nav__desktop{display:block}.loro-app-nav__mobile{display:none}}@media(prefers-reduced-motion:reduce){.loro-app-nav__mobile-slider,.loro-app-nav__mobile-item,.loro-app-nav__mobile-item ::ng-deep .loro-icon{transition-duration:1ms}}\n"], dependencies: [{ kind: "directive", type: Toolbar, selector: "[ngToolbar]", inputs: ["orientation", "softDisabled", "disabled", "wrap", "values"], outputs: ["valuesChange"], exportAs: ["ngToolbar"] }, { kind: "directive", type: ToolbarWidget, selector: "[ngToolbarWidget]", inputs: ["id", "disabled", "value"], exportAs: ["ngToolbarWidget"] }, { kind: "component", type: LoroImage, selector: "loro-image", inputs: ["name", "alt", "size", "width", "height", "fit"] }, { kind: "component", type: LoroButton, selector: "loro-button", inputs: ["label", "text", "icon", "iconContent", "iconMode", "iconSize", "iconButtonSize", "iconColor", "socialMobileCompact", "selected", "variant", "typeButton", "color", "size", "fullWidth", "buttonWidth", "disabled", "loading", "type", "formId", "ariaLabel", "ariaDescription"], outputs: ["buttonClick", "change", "sanChange"] }, { kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1532
1522
|
}
|
|
1533
1523
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroAppNav, decorators: [{
|
|
1534
1524
|
type: Component,
|
|
1535
|
-
args: [{ selector: 'loro-app-nav', standalone: true, imports: [Toolbar, ToolbarWidget, LoroImage, LoroButton, LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aside class=\"loro-app-nav\">\n <div class=\"loro-app-nav__desktop\">\n <div class=\"loro-app-nav__surface\" [class.loro-app-nav__surface--compact]=\"compactDesktop()\">\n <div class=\"loro-app-nav__brand\">\n <loro-image\n class=\"loro-app-nav__brand-image\"\n name=\"image-loro-apaisado\"\n alt=\"AlLoro\"\n width=\"10rem\"\n height=\"auto\"\n />\n </div>\n\n <nav class=\"loro-app-nav__nav\" [attr.aria-label]=\"ariaLabel()\">\n @for (item of desktopItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onMainItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n\n <div class=\"loro-app-nav__spacer\"></div>\n\n @if (showUtilityItems() && utilityItems().length > 0) {\n <div class=\"loro-app-nav__divider\" aria-hidden=\"true\"></div>\n\n <nav\n class=\"loro-app-nav__nav loro-app-nav__nav--utility\"\n aria-label=\"Navegaci\u00F3n secundaria\"\n >\n @for (item of utilityItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onUtilityItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n }\n </div>\n </div>\n\n <nav\n ngToolbar\n class=\"loro-app-nav__mobile\"\n [attr.aria-label]=\"ariaLabel()\"\n [style.--loro-mobile-slider-position]=\"mobileSliderPosition()\"\n [class.loro-app-nav__mobile--dragging]=\"isMobileDragging()\"\n [class.loro-app-nav__mobile--with-labels]=\"true\"\n [style.--loro-mobile-item-count]=\"mobileItemCount()\"\n [style.--loro-mobile-visual-slot-count]=\"mobileVisualSlotCount()\"\n (pointerdown)=\"onMobilePointerDown($event)\"\n (pointermove)=\"onMobilePointerMove($event)\"\n (pointerup)=\"onMobilePointerUp($event)\"\n (pointercancel)=\"onMobilePointerCancel($event)\"\n >\n <span\n class=\"loro-app-nav__mobile-slider\"\n [class.loro-app-nav__mobile-slider--scan]=\"selectedMobileItemId() === 'scan'\"\n aria-hidden=\"true\"></span>\n\n @for (item of mobileItems(); track item.id; let index = $index) {\n <button\n ngToolbarWidget\n type=\"button\"\n class=\"loro-app-nav__mobile-item\"\n [style.grid-column]=\"mobileItemGridColumn(index)\"\n [class.loro-app-nav__mobile-item--active]=\"isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--scan-active]=\"item.id === 'scan' && isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--disabled]=\"item.disabled\"\n [attr.aria-label]=\"item.label\"\n [attr.aria-current]=\"item.active ? 'page' : null\"\n [value]=\"item.id\"\n [disabled]=\"!!item.disabled\"\n (click)=\"onMobileItemClick(item)\"\n >\n <loro-icon\n class=\"loro-app-nav__mobile-icon\"\n [name]=\"item.icon\"\n [size]=\"24\"\n color=\"default\"\n [alt]=\"item.label\"\n />\n <span class=\"loro-app-nav__mobile-label\">{{ item.label }}</span>\n </button>\n }\n </nav>\n</aside>\n", styles: [":host{display:block;width:100%;height:100%}.loro-app-nav{width:100%;height:100%}.loro-app-nav__desktop{display:none;height:100%}.loro-app-nav__surface{width:100%;max-width:none;display:flex;height:100%;flex-direction:column;gap:1.1rem;padding:1.75rem 1.35rem 1.5rem;background:var(--loro-nav-desktop-surface, var(--loro-shell-header-surface));border:1px solid var(--loro-nav-desktop-border, var(--loro-border-soft))}html[data-theme=dark] .loro-app-nav__surface{background:var(--loro-nav-desktop-surface, rgba(24, 28, 32, .78));border-color:var(--loro-nav-desktop-border, rgba(255, 255, 255, .08));box-shadow:var(--loro-nav-desktop-shadow, none)}.loro-app-nav__surface--compact{gap:.9rem;padding:1.25rem 1rem 1.15rem}.loro-app-nav__surface--compact .loro-app-nav__brand{min-height:3.65rem;padding-bottom:1.2rem}.loro-app-nav__surface--compact .loro-app-nav__item{--loro-button-min-height: 3.75rem}.loro-app-nav__brand{display:flex;align-items:center;min-height:4.25rem;padding:.35rem .55rem .85rem}.loro-app-nav__brand-image{display:block}.loro-app-nav__nav{display:flex;flex-direction:column;gap:.75rem}.loro-app-nav__item{--loro-button-min-height: 4.25rem;--loro-button-padding: 1rem 1.2rem;--loro-button-radius: 1rem;--loro-button-font-size: 1rem;--loro-button-background: var(--loro-nav-button-background, transparent);--loro-button-border-color: var(--loro-nav-button-border, transparent);--loro-button-color: var(--loro-nav-button-text, var(--loro-text-strong));--loro-button-hover-background: var(--loro-nav-button-hover-bg, var(--loro-nav-hover-bg));--loro-button-hover-border-color: var(--loro-nav-button-hover-border, transparent);--loro-button-hover-color: var(--loro-nav-button-hover-text, var(--loro-nav-button-text, var(--loro-text-strong)));--loro-button-hover-shadow: var(--loro-nav-button-hover-shadow, none);display:block;width:100%;color:var(--loro-nav-button-text, var(--loro-text-strong))}.loro-app-nav__item--active{--loro-button-selected-background: var(--loro-nav-button-active-bg, var(--loro-nav-active-bg));--loro-button-selected-border-color: var(--loro-nav-button-active-border, var(--loro-nav-active-border));--loro-button-selected-color: var(--loro-nav-button-active-text, var(--loro-primary-500));--loro-button-selected-shadow: var(--loro-nav-button-active-shadow, inset .35rem 0 0 var(--loro-primary-500))}.loro-app-nav__item--logout{--loro-button-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-hover-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-hover-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-hover-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-shadow: none;--loro-button-hover-shadow: none}.loro-app-nav__item--disabled,.loro-app-nav__mobile-item--disabled{cursor:not-allowed;opacity:.45}.loro-app-nav__label,.loro-app-nav__mobile-label{color:inherit}.loro-app-nav__label{font-size:.98rem;font-weight:700;color:inherit}.loro-app-nav__badge{margin-left:auto;min-width:1.5rem;padding:.125rem .5rem;border-radius:999px;background:#ffffff24;color:inherit;font-size:.75rem;font-weight:700;text-align:center;box-shadow:inset 0 1px #ffffff14}.loro-app-nav__spacer{flex:1}.loro-app-nav__divider{height:1px;margin:.65rem 0 .9rem;background:var(--loro-nav-divider)}.loro-app-nav__nav--utility{margin-top:auto}.loro-app-nav__mobile{position:fixed;left:50%;bottom:max(1.25rem,env(safe-area-inset-bottom,0px) * .28);z-index:70;display:grid;grid-template-columns:repeat(var(--loro-mobile-visual-slot-count, 4),minmax(0,1fr));width:min(76vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),19rem);gap:0;margin:0;transform:translate(-50%);padding:0;overflow:hidden;border:1px solid var(--loro-nav-mobile-border, rgba(43, 35, 80, .08));border-radius:999px;isolation:isolate;background:var(--loro-nav-mobile-glass-surface, rgba(255, 255, 255, .68));box-shadow:var(--loro-nav-mobile-surface-shadow, 0 8px 24px rgba(28, 32, 48, .1));backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);-webkit-backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;transition:background .22s ease,border-color .22s ease,box-shadow .22s ease}.loro-app-nav__mobile-item{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:3.58rem;gap:.18rem;padding:.35rem .15rem;border:0;border-radius:999px;outline:0;background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text));cursor:pointer;appearance:none;-webkit-appearance:none;opacity:1;visibility:visible;transition:transform .22s cubic-bezier(.22,1,.36,1);-webkit-tap-highlight-color:transparent}.loro-app-nav__mobile-item:active,.loro-app-nav__mobile-item--active,.loro-app-nav__mobile-item:hover{background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text))}.loro-app-nav__mobile-item:focus-visible{outline:2px solid var(--loro-focus-ring);outline-offset:-4px}.loro-app-nav__mobile-item:disabled{cursor:not-allowed;opacity:.45}.loro-app-nav__mobile-icon{position:relative;z-index:3;display:inline-flex;align-items:center;justify-content:center;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none;mix-blend-mode:normal;transform:scale(.94);transform-origin:center}.loro-app-nav__mobile-item ::ng-deep .loro-icon,.loro-app-nav__mobile-item ::ng-deep svg{display:block!important;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none!important}.loro-app-nav__mobile-item ::ng-deep .loro-icon__mask{background-color:currentColor!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-item ::ng-deep svg [fill]:not([fill=none]){fill:currentColor!important}.loro-app-nav__mobile-item ::ng-deep svg [stroke]:not([stroke=none]){stroke:currentColor!important}.loro-app-nav__mobile-slider{position:absolute;inset-block:0;left:0;z-index:1;width:calc(100% / var(--loro-mobile-visual-slot-count, 4));border:0;border-radius:999px;background:var(--loro-nav-mobile-indicator, linear-gradient(180deg, rgba(227, 229, 233, .96) 0%, rgba(214, 217, 223, .92) 100%));box-shadow:var(--loro-nav-mobile-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 5px rgba(21, 28, 42, .06));transform:translate3d(calc(var(--loro-mobile-slider-position, 0) * 100%),0,0);will-change:transform;transition:transform .26s cubic-bezier(.22,1,.36,1);pointer-events:none}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-slider{transition:none}.loro-app-nav__mobile-slider--scan{background:var(--loro-nav-mobile-scan-indicator, linear-gradient(180deg, rgba(132, 83, 255, .98) 0%, rgba(94, 47, 224, .96) 100%));box-shadow:var(--loro-nav-mobile-scan-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .38), 0 .85rem 1.65rem rgba(108, 60, 255, .28))}.loro-app-nav__mobile-item--scan-active{color:var(--loro-nav-mobile-scan-active-color, #fff)!important}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item ::ng-deep .loro-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item ::ng-deep svg{color:var(--loro-nav-mobile-icon, var(--loro-text))!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-label{display:block;max-width:100%;overflow:hidden;color:inherit;font-size:.625rem;font-weight:700;line-height:1.1;text-align:center;text-overflow:ellipsis;white-space:nowrap;opacity:0;transform:translateY(.08rem);transition:opacity .18s ease,transform .18s ease}.loro-app-nav__mobile--with-labels{width:min(92vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),24rem)}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-item{min-height:4.4rem;padding-top:.7rem}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-label{opacity:1;transform:translateY(0)}@media(max-width:479.99px)and (orientation:portrait){:host{height:auto}.loro-app-nav{height:auto;padding:0}.loro-app-nav__desktop{height:auto}}@media(min-width:1024px){:host,.loro-app-nav,.loro-app-nav__desktop{height:100%}.loro-app-nav__desktop{display:block}.loro-app-nav__mobile{display:none}}@media(prefers-reduced-motion:reduce){.loro-app-nav__mobile-slider,.loro-app-nav__mobile-item,.loro-app-nav__mobile-item ::ng-deep .loro-icon{transition-duration:1ms}}\n"] }]
|
|
1525
|
+
args: [{ selector: 'loro-app-nav', standalone: true, imports: [Toolbar, ToolbarWidget, LoroImage, LoroButton, LoroIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aside class=\"loro-app-nav\">\n <div class=\"loro-app-nav__desktop\">\n <div class=\"loro-app-nav__surface\" [class.loro-app-nav__surface--compact]=\"compactDesktop()\">\n <div class=\"loro-app-nav__brand\">\n <loro-image\n class=\"loro-app-nav__brand-image\"\n name=\"image-loro-apaisado\"\n alt=\"AlLoro\"\n width=\"10rem\"\n height=\"auto\"\n />\n </div>\n\n <nav class=\"loro-app-nav__nav\" [attr.aria-label]=\"ariaLabel()\">\n @for (item of desktopItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onMainItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n\n <div class=\"loro-app-nav__spacer\"></div>\n\n @if (showUtilityItems() && utilityItems().length > 0) {\n <div class=\"loro-app-nav__divider\" aria-hidden=\"true\"></div>\n\n <nav\n class=\"loro-app-nav__nav loro-app-nav__nav--utility\"\n aria-label=\"Navegaci\u00F3n secundaria\"\n >\n @for (item of utilityItems(); track item.id) {\n <loro-button\n class=\"loro-app-nav__item\"\n [class.loro-app-nav__item--active]=\"item.active\"\n [class.loro-app-nav__item--disabled]=\"item.disabled\"\n [class.loro-app-nav__item--logout]=\"item.id === 'logout'\"\n [text]=\"item.label\"\n [icon]=\"item.icon\"\n iconMode=\"with-icon\"\n iconColor=\"default\"\n variant=\"navigation\"\n [selected]=\"!!item.active\"\n [color]=\"item.id === 'logout' ? 'danger' : 'primary'\"\n type=\"button\"\n [fullWidth]=\"true\"\n [ariaLabel]=\"item.label\"\n [disabled]=\"!!item.disabled\"\n (buttonClick)=\"onUtilityItemClick(item)\"\n >\n @if (item.badge !== null && item.badge !== undefined && item.badge !== '') {\n <span class=\"loro-app-nav__badge\">{{ item.badge }}</span>\n }\n </loro-button>\n }\n </nav>\n }\n </div>\n </div>\n\n <nav\n ngToolbar\n class=\"loro-app-nav__mobile\"\n data-horizontal-gesture\n [attr.aria-label]=\"ariaLabel()\"\n [style.--loro-mobile-slider-position]=\"mobileSliderPosition()\"\n [class.loro-app-nav__mobile--dragging]=\"isMobileDragging()\"\n [class.loro-app-nav__mobile--with-labels]=\"true\"\n [style.--loro-mobile-item-count]=\"mobileItemCount()\"\n [style.--loro-mobile-visual-slot-count]=\"mobileVisualSlotCount()\"\n (pointerdown)=\"onMobilePointerDown($event)\"\n (pointermove)=\"onMobilePointerMove($event)\"\n (pointerup)=\"onMobilePointerUp($event)\"\n (pointercancel)=\"onMobilePointerCancel($event)\"\n >\n <span\n class=\"loro-app-nav__mobile-slider\"\n [class.loro-app-nav__mobile-slider--scan]=\"selectedMobileItemId() === 'scan'\"\n aria-hidden=\"true\"></span>\n\n @for (item of mobileItems(); track item.id; let index = $index) {\n <button\n ngToolbarWidget\n type=\"button\"\n class=\"loro-app-nav__mobile-item\"\n [style.grid-column]=\"mobileItemGridColumn(index)\"\n [class.loro-app-nav__mobile-item--active]=\"isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--scan-active]=\"item.id === 'scan' && isMobileItemVisualActive(index)\"\n [class.loro-app-nav__mobile-item--disabled]=\"item.disabled\"\n [attr.aria-label]=\"item.label\"\n [attr.aria-current]=\"item.active ? 'page' : null\"\n [value]=\"item.id\"\n [disabled]=\"!!item.disabled\"\n (click)=\"onMobileItemClick(item)\"\n >\n <loro-icon\n class=\"loro-app-nav__mobile-icon\"\n [name]=\"item.icon\"\n [size]=\"24\"\n color=\"default\"\n [alt]=\"item.label\"\n />\n <span class=\"loro-app-nav__mobile-label\">{{ item.label }}</span>\n </button>\n }\n </nav>\n</aside>\n", styles: [":host{display:block;width:100%;height:100%}.loro-app-nav{width:100%;height:100%}.loro-app-nav__desktop{display:none;height:100%}.loro-app-nav__surface{width:100%;max-width:none;display:flex;height:100%;flex-direction:column;gap:1.1rem;padding:1.75rem 1.35rem 1.5rem;background:var(--loro-nav-desktop-surface, var(--loro-shell-header-surface));border:1px solid var(--loro-nav-desktop-border, var(--loro-border-soft))}html[data-theme=dark] .loro-app-nav__surface{background:var(--loro-nav-desktop-surface, rgba(24, 28, 32, .78));border-color:var(--loro-nav-desktop-border, rgba(255, 255, 255, .08));box-shadow:var(--loro-nav-desktop-shadow, none)}.loro-app-nav__surface--compact{gap:.9rem;padding:1.25rem 1rem 1.15rem}.loro-app-nav__surface--compact .loro-app-nav__brand{min-height:3.65rem;padding-bottom:1.2rem}.loro-app-nav__surface--compact .loro-app-nav__item{--loro-button-min-height: 3.75rem}.loro-app-nav__brand{display:flex;align-items:center;min-height:4.25rem;padding:.35rem .55rem .85rem}.loro-app-nav__brand-image{display:block}.loro-app-nav__nav{display:flex;flex-direction:column;gap:.75rem}.loro-app-nav__item{--loro-button-min-height: 4.25rem;--loro-button-padding: 1rem 1.2rem;--loro-button-radius: 1rem;--loro-button-font-size: 1rem;--loro-button-background: var(--loro-nav-button-background, transparent);--loro-button-border-color: var(--loro-nav-button-border, transparent);--loro-button-color: var(--loro-nav-button-text, var(--loro-text-strong));--loro-button-hover-background: var(--loro-nav-button-hover-bg, var(--loro-nav-hover-bg));--loro-button-hover-border-color: var(--loro-nav-button-hover-border, transparent);--loro-button-hover-color: var(--loro-nav-button-hover-text, var(--loro-nav-button-text, var(--loro-text-strong)));--loro-button-hover-shadow: var(--loro-nav-button-hover-shadow, none);display:block;width:100%;color:var(--loro-nav-button-text, var(--loro-text-strong))}.loro-app-nav__item--active{--loro-button-selected-background: var(--loro-nav-button-active-bg, var(--loro-nav-active-bg));--loro-button-selected-border-color: var(--loro-nav-button-active-border, var(--loro-nav-active-border));--loro-button-selected-color: var(--loro-nav-button-active-text, var(--loro-primary-500));--loro-button-selected-shadow: var(--loro-nav-button-active-shadow, inset .35rem 0 0 var(--loro-primary-500))}.loro-app-nav__item--logout{--loro-button-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-hover-background: var(--loro-nav-button-danger-bg, var(--loro-danger-surface));--loro-button-hover-border-color: var(--loro-nav-button-danger-border, transparent);--loro-button-hover-color: var(--loro-nav-button-danger-text, var(--loro-danger-text));--loro-button-shadow: none;--loro-button-hover-shadow: none}.loro-app-nav__item--disabled,.loro-app-nav__mobile-item--disabled{cursor:not-allowed;opacity:1}.loro-app-nav__item--disabled{--loro-button-disabled-bg: var(--loro-disabled-surface);--loro-button-disabled-border: var(--loro-disabled-border);--loro-button-disabled-text: var(--loro-disabled-text)}.loro-app-nav__mobile-item--disabled{color:var(--loro-disabled-text)}.loro-app-nav__label,.loro-app-nav__mobile-label{color:inherit}.loro-app-nav__label{font-size:.98rem;font-weight:700;color:inherit}.loro-app-nav__badge{margin-left:auto;min-width:1.5rem;padding:.125rem .5rem;border-radius:999px;background:#ffffff24;color:inherit;font-size:.75rem;font-weight:700;text-align:center;box-shadow:inset 0 1px #ffffff14}.loro-app-nav__spacer{flex:1}.loro-app-nav__divider{height:1px;margin:.65rem 0 .9rem;background:var(--loro-nav-divider)}.loro-app-nav__nav--utility{margin-top:auto}.loro-app-nav__mobile{position:fixed;left:50%;bottom:max(1.25rem,env(safe-area-inset-bottom,0px) * .28);z-index:70;display:grid;grid-template-columns:repeat(var(--loro-mobile-visual-slot-count, 4),minmax(0,1fr));width:min(76vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),19rem);gap:0;margin:0;transform:translate(-50%);padding:0;overflow:hidden;border:1px solid var(--loro-nav-mobile-border, rgba(43, 35, 80, .08));border-radius:999px;isolation:isolate;background:var(--loro-nav-mobile-glass-surface, rgba(255, 255, 255, .68));box-shadow:var(--loro-nav-mobile-surface-shadow, 0 8px 24px rgba(28, 32, 48, .1));backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);-webkit-backdrop-filter:blur(var(--loro-nav-mobile-glass-blur, 24px)) saturate(1.32);touch-action:pan-y;contain:layout paint;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;transition:background .22s ease,border-color .22s ease,box-shadow .22s ease}.loro-app-nav__mobile-item{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:3.58rem;gap:.18rem;padding:.35rem .15rem;border:0;border-radius:999px;outline:0;background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text));cursor:pointer;appearance:none;-webkit-appearance:none;opacity:1;visibility:visible;transition:transform .22s cubic-bezier(.22,1,.36,1);-webkit-tap-highlight-color:transparent}.loro-app-nav__mobile-item:hover:not(.loro-app-nav__mobile-item--active),.loro-app-nav__mobile-item:active:not(.loro-app-nav__mobile-item--active),.loro-app-nav__mobile-item:focus:not(.loro-app-nav__mobile-item--active){background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text))}.loro-app-nav__mobile-item--active{background:transparent;color:var(--loro-nav-mobile-icon, var(--loro-text))}.loro-app-nav__mobile-item:focus-visible{outline:2px solid var(--loro-focus-ring);outline-offset:-4px}.loro-app-nav__mobile-item:disabled{cursor:not-allowed;opacity:1;color:var(--loro-disabled-text)}.loro-app-nav__mobile-icon{position:relative;z-index:3;display:inline-flex;align-items:center;justify-content:center;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none;mix-blend-mode:normal;transform:scale(.94);transform-origin:center}.loro-app-nav__mobile-item ::ng-deep .loro-icon,.loro-app-nav__mobile-item ::ng-deep svg{display:block!important;color:inherit!important;opacity:1!important;visibility:visible!important;pointer-events:none!important}.loro-app-nav__mobile-item ::ng-deep .loro-icon__mask{background-color:currentColor!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-item ::ng-deep svg [fill]:not([fill=none]){fill:currentColor!important}.loro-app-nav__mobile-item ::ng-deep svg [stroke]:not([stroke=none]){stroke:currentColor!important}.loro-app-nav__mobile-slider{position:absolute;inset-block:0;left:0;z-index:1;width:calc(100% / var(--loro-mobile-visual-slot-count, 4));border:0;border-radius:999px;background:var(--loro-nav-mobile-indicator, linear-gradient(180deg, rgba(227, 229, 233, .96) 0%, rgba(214, 217, 223, .92) 100%));box-shadow:var(--loro-nav-mobile-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 5px rgba(21, 28, 42, .06));transform:translate3d(calc(var(--loro-mobile-slider-position, 0) * 100%),0,0);will-change:transform;transition:transform .26s cubic-bezier(.22,1,.36,1);pointer-events:none}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-slider{transition:transform 1ms linear}.loro-app-nav__mobile-slider--scan{background:var(--loro-nav-mobile-scan-indicator, linear-gradient(180deg, rgba(132, 83, 255, .98) 0%, rgba(94, 47, 224, .96) 100%));box-shadow:var(--loro-nav-mobile-scan-indicator-shadow, inset 0 1px 0 rgba(255, 255, 255, .38), 0 .85rem 1.65rem rgba(108, 60, 255, .28))}.loro-app-nav__mobile-item--scan-active{color:var(--loro-nav-mobile-scan-active-color, #fff)!important}.loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active):hover,.loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active):active{color:var(--loro-nav-mobile-icon, var(--loro-text))!important}.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active),.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active) .loro-app-nav__mobile-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active) ::ng-deep .loro-icon,.loro-app-nav__mobile--dragging .loro-app-nav__mobile-item:not(.loro-app-nav__mobile-item--scan-active) ::ng-deep svg{color:var(--loro-nav-mobile-icon, var(--loro-text))!important;opacity:1!important;visibility:visible!important}.loro-app-nav__mobile-label{display:block;max-width:100%;overflow:hidden;color:inherit;font-size:.625rem;font-weight:700;line-height:1.1;text-align:center;text-overflow:ellipsis;white-space:nowrap;opacity:0;transform:translateY(.08rem);transition:opacity .18s ease,transform .18s ease}.loro-app-nav__mobile--with-labels{width:min(92vw - max(1rem,var(--app-shell-mobile-gutter, 1rem) * .75),24rem)}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-item{min-height:4.4rem;padding-top:.7rem}.loro-app-nav__mobile--with-labels .loro-app-nav__mobile-label{opacity:1;transform:translateY(0)}@media(max-width:479.99px)and (orientation:portrait){:host{height:auto}.loro-app-nav{height:auto;padding:0}.loro-app-nav__desktop{height:auto}}@media(min-width:1024px){:host,.loro-app-nav,.loro-app-nav__desktop{height:100%}.loro-app-nav__desktop{display:block}.loro-app-nav__mobile{display:none}}@media(prefers-reduced-motion:reduce){.loro-app-nav__mobile-slider,.loro-app-nav__mobile-item,.loro-app-nav__mobile-item ::ng-deep .loro-icon{transition-duration:1ms}}\n"] }]
|
|
1536
1526
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], utilityItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "utilityItems", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], showUtilityItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "showUtilityItems", required: false }] }], compactDesktop: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactDesktop", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], utilityItemClick: [{ type: i0.Output, args: ["utilityItemClick"] }], navItemClick: [{ type: i0.Output, args: ["navItemClick"] }] } });
|
|
1537
1527
|
|
|
1538
1528
|
class LoroAssistantCard {
|
|
@@ -2882,6 +2872,10 @@ class LoroProfileCard {
|
|
|
2882
2872
|
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
2883
2873
|
email = input.required(...(ngDevMode ? [{ debugName: "email" }] : /* istanbul ignore next */ []));
|
|
2884
2874
|
imageSrc = input(null, ...(ngDevMode ? [{ debugName: "imageSrc" }] : /* istanbul ignore next */ []));
|
|
2875
|
+
changePhotoLabel = input('Cambiar foto', ...(ngDevMode ? [{ debugName: "changePhotoLabel" }] : /* istanbul ignore next */ []));
|
|
2876
|
+
changePhotoLoadingLabel = input('Actualizando...', ...(ngDevMode ? [{ debugName: "changePhotoLoadingLabel" }] : /* istanbul ignore next */ []));
|
|
2877
|
+
changePhotoLoading = input(false, ...(ngDevMode ? [{ debugName: "changePhotoLoading" }] : /* istanbul ignore next */ []));
|
|
2878
|
+
changePhotoDisabled = input(false, ...(ngDevMode ? [{ debugName: "changePhotoDisabled" }] : /* istanbul ignore next */ []));
|
|
2885
2879
|
changePhotoClick = output();
|
|
2886
2880
|
imageFailed = signal(false, ...(ngDevMode ? [{ debugName: "imageFailed" }] : /* istanbul ignore next */ []));
|
|
2887
2881
|
constructor() {
|
|
@@ -2897,7 +2891,7 @@ class LoroProfileCard {
|
|
|
2897
2891
|
this.imageFailed.set(true);
|
|
2898
2892
|
}
|
|
2899
2893
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroProfileCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2900
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroProfileCard, isStandalone: true, selector: "loro-profile-card", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: true, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changePhotoClick: "changePhotoClick" }, ngImport: i0, template: `
|
|
2894
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroProfileCard, isStandalone: true, selector: "loro-profile-card", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, email: { classPropertyName: "email", publicName: "email", isSignal: true, isRequired: true, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLabel: { classPropertyName: "changePhotoLabel", publicName: "changePhotoLabel", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLoadingLabel: { classPropertyName: "changePhotoLoadingLabel", publicName: "changePhotoLoadingLabel", isSignal: true, isRequired: false, transformFunction: null }, changePhotoLoading: { classPropertyName: "changePhotoLoading", publicName: "changePhotoLoading", isSignal: true, isRequired: false, transformFunction: null }, changePhotoDisabled: { classPropertyName: "changePhotoDisabled", publicName: "changePhotoDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changePhotoClick: "changePhotoClick" }, ngImport: i0, template: `
|
|
2901
2895
|
<section class="loro-profile-card">
|
|
2902
2896
|
<div class="loro-profile-card__avatar">
|
|
2903
2897
|
@if (resolvedImageSrc()) {
|
|
@@ -2910,9 +2904,11 @@ class LoroProfileCard {
|
|
|
2910
2904
|
<h2>{{ name() }}</h2>
|
|
2911
2905
|
<p>{{ email() }}</p>
|
|
2912
2906
|
<loro-button
|
|
2913
|
-
label="
|
|
2907
|
+
[label]="changePhotoLoading() ? changePhotoLoadingLabel() : changePhotoLabel()"
|
|
2914
2908
|
icon="camera"
|
|
2915
2909
|
variant="outline"
|
|
2910
|
+
[disabled]="changePhotoDisabled() || changePhotoLoading()"
|
|
2911
|
+
[loading]="changePhotoLoading()"
|
|
2916
2912
|
(buttonClick)="changePhotoClick.emit()" />
|
|
2917
2913
|
</div>
|
|
2918
2914
|
</section>
|
|
@@ -2933,14 +2929,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
2933
2929
|
<h2>{{ name() }}</h2>
|
|
2934
2930
|
<p>{{ email() }}</p>
|
|
2935
2931
|
<loro-button
|
|
2936
|
-
label="
|
|
2932
|
+
[label]="changePhotoLoading() ? changePhotoLoadingLabel() : changePhotoLabel()"
|
|
2937
2933
|
icon="camera"
|
|
2938
2934
|
variant="outline"
|
|
2935
|
+
[disabled]="changePhotoDisabled() || changePhotoLoading()"
|
|
2936
|
+
[loading]="changePhotoLoading()"
|
|
2939
2937
|
(buttonClick)="changePhotoClick.emit()" />
|
|
2940
2938
|
</div>
|
|
2941
2939
|
</section>
|
|
2942
2940
|
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1.5rem;padding:clamp(1.25rem,3vw,2rem);border:1px solid var(--loro-border-subtle);border-radius:var(--loro-radius-card);background:var(--loro-surface-soft);box-shadow:var(--loro-shadow-soft)}.loro-profile-card__avatar{display:grid;width:clamp(7rem,16vw,9.5rem);aspect-ratio:1;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(180deg,#6c3cff24,#6c3cff0a)}img{width:100%;height:100%;object-fit:cover}h2,p{margin:0}h2{color:var(--loro-text-strong);font-size:clamp(2rem,4vw,2.7rem);font-weight:900;line-height:1}p{margin:.4rem 0 1rem;color:var(--loro-muted);font-size:1.05rem;font-weight:650}@media(max-width:520px){.loro-profile-card{grid-template-columns:max-content minmax(0,1fr);gap:1rem}}\n"] }]
|
|
2943
|
-
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], email: [{ type: i0.Input, args: [{ isSignal: true, alias: "email", required: true }] }], imageSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageSrc", required: false }] }], changePhotoClick: [{ type: i0.Output, args: ["changePhotoClick"] }] } });
|
|
2941
|
+
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], email: [{ type: i0.Input, args: [{ isSignal: true, alias: "email", required: true }] }], imageSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageSrc", required: false }] }], changePhotoLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoLabel", required: false }] }], changePhotoLoadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoLoadingLabel", required: false }] }], changePhotoLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoLoading", required: false }] }], changePhotoDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "changePhotoDisabled", required: false }] }], changePhotoClick: [{ type: i0.Output, args: ["changePhotoClick"] }] } });
|
|
2944
2942
|
|
|
2945
2943
|
class LoroProfileHero {
|
|
2946
2944
|
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
@@ -3537,10 +3535,16 @@ class LoroNotificationRow {
|
|
|
3537
3535
|
(touchmove)="onTouchMove($event)"
|
|
3538
3536
|
(touchend)="onTouchEnd()"
|
|
3539
3537
|
(touchcancel)="resetDrag()">
|
|
3540
|
-
<
|
|
3538
|
+
<button
|
|
3539
|
+
type="button"
|
|
3540
|
+
class="loro-notification-row-shell__delete"
|
|
3541
|
+
aria-label="Eliminar notificacion"
|
|
3542
|
+
(pointerdown)="$event.stopPropagation()"
|
|
3543
|
+
(touchstart)="$event.stopPropagation()"
|
|
3544
|
+
(click)="onDeleteClick($event)">
|
|
3541
3545
|
<loro-icon name="trash-white" [size]="22" alt="" [decorative]="true" color="inverse" />
|
|
3542
3546
|
<span>Eliminar</span>
|
|
3543
|
-
</
|
|
3547
|
+
</button>
|
|
3544
3548
|
<article
|
|
3545
3549
|
role="button"
|
|
3546
3550
|
tabindex="0"
|
|
@@ -3574,7 +3578,7 @@ class LoroNotificationRow {
|
|
|
3574
3578
|
</button>
|
|
3575
3579
|
</article>
|
|
3576
3580
|
</div>
|
|
3577
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;background:#ef4444;color:var(--loro-text-inverse);opacity:0;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3581
|
+
`, isInline: true, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;border:0;background:#ef4444;color:var(--loro-text-inverse);font:inherit;font-weight:850;cursor:pointer;opacity:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3578
3582
|
}
|
|
3579
3583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotificationRow, decorators: [{
|
|
3580
3584
|
type: Component,
|
|
@@ -3589,10 +3593,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3589
3593
|
(touchmove)="onTouchMove($event)"
|
|
3590
3594
|
(touchend)="onTouchEnd()"
|
|
3591
3595
|
(touchcancel)="resetDrag()">
|
|
3592
|
-
<
|
|
3596
|
+
<button
|
|
3597
|
+
type="button"
|
|
3598
|
+
class="loro-notification-row-shell__delete"
|
|
3599
|
+
aria-label="Eliminar notificacion"
|
|
3600
|
+
(pointerdown)="$event.stopPropagation()"
|
|
3601
|
+
(touchstart)="$event.stopPropagation()"
|
|
3602
|
+
(click)="onDeleteClick($event)">
|
|
3593
3603
|
<loro-icon name="trash-white" [size]="22" alt="" [decorative]="true" color="inverse" />
|
|
3594
3604
|
<span>Eliminar</span>
|
|
3595
|
-
</
|
|
3605
|
+
</button>
|
|
3596
3606
|
<article
|
|
3597
3607
|
role="button"
|
|
3598
3608
|
tabindex="0"
|
|
@@ -3626,7 +3636,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3626
3636
|
</button>
|
|
3627
3637
|
</article>
|
|
3628
3638
|
</div>
|
|
3629
|
-
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;background:#ef4444;color:var(--loro-text-inverse);opacity:0;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"] }]
|
|
3639
|
+
`, styles: [":host{display:block;font-family:var(--loro-font-brand)}.loro-notification-row-shell{position:relative;overflow:hidden;background:transparent;touch-action:pan-y}.loro-notification-row-shell__delete{position:absolute;inset:0 0 0 auto;display:grid;width:8.75rem;align-content:center;justify-items:center;gap:.45rem;border:0;background:#ef4444;color:var(--loro-text-inverse);font:inherit;font-weight:850;cursor:pointer;opacity:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:opacity .18s ease,transform .18s ease}.loro-notification-row-shell--dragging .loro-notification-row-shell__delete,.loro-notification-row-shell--armed .loro-notification-row-shell__delete,.loro-notification-row-shell--removing .loro-notification-row-shell__delete{opacity:1}.loro-notification-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:.85rem;width:100%;padding:.82rem .95rem;border:0;border-bottom:1px solid var(--loro-border-subtle);background:var(--loro-surface);color:var(--loro-text);text-align:left;cursor:pointer;will-change:transform;transition:background .15s ease,transform .22s cubic-bezier(.2,.8,.2,1),opacity .18s ease}.loro-notification-row-shell--dragging .loro-notification-row{transition:background .15s ease}.loro-notification-row-shell--removing .loro-notification-row{opacity:.18;transform:translate3d(-100%,0,0)!important}:host:last-child .loro-notification-row{border-bottom-color:transparent}.loro-notification-row:hover{background:var(--loro-surface)}.loro-notification-row:focus-visible{position:relative;z-index:1;outline:2px solid rgba(108,60,255,.32);outline-offset:-2px}.loro-notification-row__icon{display:grid;width:2.5rem;height:2.5rem;place-items:center;border-radius:.8rem;background:transparent}.loro-notification-row__content{display:grid;gap:.2rem;min-width:0}.loro-notification-row__meta{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:.75rem}strong{overflow:hidden;color:var(--loro-text-strong);font-size:.92rem;font-weight:950;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}small,.loro-notification-row__message{color:var(--loro-muted);font-size:.82rem;font-weight:700;line-height:1.35}.loro-notification-row__dot{width:.5rem;height:.5rem;border-radius:50%;background:var(--loro-primary-500)}.loro-notification-row__delete-button{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:.7rem;background:color-mix(in srgb,var(--loro-danger-text) 8%,transparent);cursor:pointer;opacity:0;transition:background .15s ease,opacity .15s ease,transform .15s ease}.loro-notification-row:hover .loro-notification-row__delete-button,.loro-notification-row:focus-visible .loro-notification-row__delete-button,.loro-notification-row__delete-button:focus-visible{opacity:1}.loro-notification-row__delete-button:hover,.loro-notification-row__delete-button:focus-visible{background:color-mix(in srgb,var(--loro-danger-text) 14%,transparent);outline:0;transform:translateY(-1px)}@media(max-width:1023.88px){.loro-notification-row{grid-template-columns:auto minmax(0,1fr) auto;padding:.82rem .8rem}.loro-notification-row__delete-button{display:none}}\n"] }]
|
|
3630
3640
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: true }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], unread: [{ type: i0.Input, args: [{ isSignal: true, alias: "unread", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], rowRemove: [{ type: i0.Output, args: ["rowRemove"] }] } });
|
|
3631
3641
|
|
|
3632
3642
|
class LoroNotificationPanel {
|
|
@@ -3645,6 +3655,16 @@ class LoroNotificationPanel {
|
|
|
3645
3655
|
markAllRead = output();
|
|
3646
3656
|
clearAll = output();
|
|
3647
3657
|
hasUnread = computed(() => this.items().some((item) => !!item.unread), ...(ngDevMode ? [{ debugName: "hasUnread" }] : /* istanbul ignore next */ []));
|
|
3658
|
+
onMarkAllReadClick(event) {
|
|
3659
|
+
event.preventDefault();
|
|
3660
|
+
event.stopPropagation();
|
|
3661
|
+
this.markAllRead.emit();
|
|
3662
|
+
}
|
|
3663
|
+
onClearAllClick(event) {
|
|
3664
|
+
event.preventDefault();
|
|
3665
|
+
event.stopPropagation();
|
|
3666
|
+
this.clearAll.emit();
|
|
3667
|
+
}
|
|
3648
3668
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotificationPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3649
3669
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: LoroNotificationPanel, isStandalone: true, selector: "loro-notification-panel", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, showMarkAll: { classPropertyName: "showMarkAll", publicName: "showMarkAll", isSignal: true, isRequired: false, transformFunction: null }, markAllLabel: { classPropertyName: "markAllLabel", publicName: "markAllLabel", isSignal: true, isRequired: false, transformFunction: null }, showClearAll: { classPropertyName: "showClearAll", publicName: "showClearAll", isSignal: true, isRequired: false, transformFunction: null }, clearAllLabel: { classPropertyName: "clearAllLabel", publicName: "clearAllLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyIcon: { classPropertyName: "emptyIcon", publicName: "emptyIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyTitle: { classPropertyName: "emptyTitle", publicName: "emptyTitle", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", itemRemove: "itemRemove", markAllRead: "markAllRead", clearAll: "clearAll" }, ngImport: i0, template: `
|
|
3650
3670
|
<section
|
|
@@ -3659,9 +3679,18 @@ class LoroNotificationPanel {
|
|
|
3659
3679
|
@if (items().length > 0) {
|
|
3660
3680
|
<div class="loro-notification-panel__actions">
|
|
3661
3681
|
@if (showMarkAll() && hasUnread()) {
|
|
3662
|
-
<button
|
|
3663
|
-
|
|
3664
|
-
|
|
3682
|
+
<button
|
|
3683
|
+
type="button"
|
|
3684
|
+
(pointerdown)="$event.stopPropagation()"
|
|
3685
|
+
(touchstart)="$event.stopPropagation()"
|
|
3686
|
+
(click)="onMarkAllReadClick($event)">{{ markAllLabel() }}</button>
|
|
3687
|
+
}
|
|
3688
|
+
@if (showClearAll()) {
|
|
3689
|
+
<button
|
|
3690
|
+
type="button"
|
|
3691
|
+
(pointerdown)="$event.stopPropagation()"
|
|
3692
|
+
(touchstart)="$event.stopPropagation()"
|
|
3693
|
+
(click)="onClearAllClick($event)">{{ clearAllLabel() }}</button>
|
|
3665
3694
|
}
|
|
3666
3695
|
</div>
|
|
3667
3696
|
}
|
|
@@ -3690,7 +3719,7 @@ class LoroNotificationPanel {
|
|
|
3690
3719
|
</div>
|
|
3691
3720
|
}
|
|
3692
3721
|
</section>
|
|
3693
|
-
`, isInline: true, styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{border:0;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.
|
|
3722
|
+
`, isInline: true, styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{min-height:2.2rem;border:0;border-radius:.65rem;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover,button:focus-visible{background:color-mix(in srgb,var(--loro-primary-500) 9%,transparent);outline:none}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.35rem}.loro-notification-panel__actions button{white-space:nowrap}}\n"], dependencies: [{ kind: "component", type: LoroIcon, selector: "loro-icon", inputs: ["name", "size", "alt", "decorative", "color", "renderMode"] }, { kind: "component", type: LoroNotificationRow, selector: "loro-notification-row", inputs: ["title", "message", "time", "icon", "unread"], outputs: ["rowClick", "rowRemove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3694
3723
|
}
|
|
3695
3724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroNotificationPanel, decorators: [{
|
|
3696
3725
|
type: Component,
|
|
@@ -3707,9 +3736,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3707
3736
|
@if (items().length > 0) {
|
|
3708
3737
|
<div class="loro-notification-panel__actions">
|
|
3709
3738
|
@if (showMarkAll() && hasUnread()) {
|
|
3710
|
-
<button
|
|
3711
|
-
|
|
3712
|
-
|
|
3739
|
+
<button
|
|
3740
|
+
type="button"
|
|
3741
|
+
(pointerdown)="$event.stopPropagation()"
|
|
3742
|
+
(touchstart)="$event.stopPropagation()"
|
|
3743
|
+
(click)="onMarkAllReadClick($event)">{{ markAllLabel() }}</button>
|
|
3744
|
+
}
|
|
3745
|
+
@if (showClearAll()) {
|
|
3746
|
+
<button
|
|
3747
|
+
type="button"
|
|
3748
|
+
(pointerdown)="$event.stopPropagation()"
|
|
3749
|
+
(touchstart)="$event.stopPropagation()"
|
|
3750
|
+
(click)="onClearAllClick($event)">{{ clearAllLabel() }}</button>
|
|
3713
3751
|
}
|
|
3714
3752
|
</div>
|
|
3715
3753
|
}
|
|
@@ -3738,7 +3776,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
3738
3776
|
</div>
|
|
3739
3777
|
}
|
|
3740
3778
|
</section>
|
|
3741
|
-
`, styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{border:0;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.
|
|
3779
|
+
`, styles: [":host{display:block;width:min(100%,24rem);min-height:0;font-family:var(--loro-font-brand)}.loro-notification-panel{overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;min-height:0;isolation:isolate;border:1px solid var(--loro-border-subtle);border-radius:1rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text)}.loro-notification-panel__handle{display:none}.loro-notification-panel__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem 1rem;border-bottom:1px solid var(--loro-border-subtle)}.loro-notification-panel__actions{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:.75rem}h2{margin:0;color:var(--loro-text-strong);font-size:1rem;font-weight:950}button{min-height:2.2rem;border:0;border-radius:.65rem;background:transparent;color:var(--loro-primary-700);font:inherit;font-size:.82rem;font-weight:850;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:hover,button:focus-visible{background:color-mix(in srgb,var(--loro-primary-500) 9%,transparent);outline:none}.loro-notification-panel__list{display:grid;align-content:start;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface)}.loro-notification-panel__empty{display:grid;min-height:18rem;place-items:center;align-content:center;gap:.75rem;padding:2rem;text-align:center;background:var(--loro-surface)}.loro-notification-panel__empty-icon{display:grid;width:6rem;height:6rem;place-items:center;border-radius:50%;background:#6c3cff0f}.loro-notification-panel__empty strong{color:var(--loro-text-strong);font-weight:950}.loro-notification-panel__empty p{max-width:16rem;margin:0;color:var(--loro-muted);font-weight:700;line-height:1.45}@media(min-width:1024px){.loro-notification-panel__list{max-height:min(28rem,60vh)}}@media(max-width:1023.88px){:host{display:grid;width:100%;height:100%;min-height:0}.loro-notification-panel,.loro-notification-panel--sheet{width:100%;height:100%;min-height:0;border-radius:1.15rem 1.15rem 0 0;background:var(--loro-surface)}.loro-notification-panel--sheet{display:grid;min-height:0;grid-template-rows:auto auto minmax(0,1fr)}.loro-notification-panel--sheet .loro-notification-panel__list{min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;background:var(--loro-surface);touch-action:pan-y}.loro-notification-panel--sheet .loro-notification-panel__header{position:sticky;top:0;z-index:2;background:var(--loro-surface);align-items:center;grid-template-columns:minmax(0,1fr) auto;gap:.65rem}.loro-notification-panel--sheet.loro-notification-panel--empty .loro-notification-panel__header{border-bottom:0}.loro-notification-panel--sheet .loro-notification-panel__empty{min-height:0;height:100%;place-items:center;align-content:center;padding:1rem 1.15rem 1.4rem;background:var(--loro-surface)}.loro-notification-panel--sheet .loro-notification-panel__handle{display:block;width:3rem;height:.25rem;margin:.5rem auto .2rem;border-radius:999px;background:#62588259}.loro-notification-panel--sheet .loro-notification-panel__header{padding:.7rem .95rem}.loro-notification-panel__actions{display:inline-flex;width:auto;justify-content:flex-end;gap:.35rem}.loro-notification-panel__actions button{white-space:nowrap}}\n"] }]
|
|
3742
3780
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: false }] }], showMarkAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMarkAll", required: false }] }], markAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "markAllLabel", required: false }] }], showClearAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearAll", required: false }] }], clearAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAllLabel", required: false }] }], emptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyIcon", required: false }] }], emptyTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTitle", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemRemove: [{ type: i0.Output, args: ["itemRemove"] }], markAllRead: [{ type: i0.Output, args: ["markAllRead"] }], clearAll: [{ type: i0.Output, args: ["clearAll"] }] } });
|
|
3743
3781
|
|
|
3744
3782
|
class LoroSpinner {
|
|
@@ -4431,6 +4469,11 @@ class LoroModal {
|
|
|
4431
4469
|
this.resetSheetState();
|
|
4432
4470
|
this.modalClose.emit();
|
|
4433
4471
|
}
|
|
4472
|
+
onCloseClick(event) {
|
|
4473
|
+
event.preventDefault();
|
|
4474
|
+
event.stopPropagation();
|
|
4475
|
+
this.requestClose();
|
|
4476
|
+
}
|
|
4434
4477
|
onSheetTouchStart(event, dialog) {
|
|
4435
4478
|
if (!this.isSheetInteractionEnabled() || event.touches.length !== 1 || !this.isDragZone(event, dialog)) {
|
|
4436
4479
|
return;
|
|
@@ -4525,6 +4568,9 @@ class LoroModal {
|
|
|
4525
4568
|
return false;
|
|
4526
4569
|
}
|
|
4527
4570
|
const target = event.target instanceof Element ? event.target : null;
|
|
4571
|
+
if (target?.closest('button, a, input, textarea, select, [contenteditable="true"]')) {
|
|
4572
|
+
return false;
|
|
4573
|
+
}
|
|
4528
4574
|
if (target?.closest('.loro-notification-panel__handle, .loro-modal__header')) {
|
|
4529
4575
|
return true;
|
|
4530
4576
|
}
|
|
@@ -4563,7 +4609,13 @@ class LoroModal {
|
|
|
4563
4609
|
<h2>{{ title() }}</h2>
|
|
4564
4610
|
}
|
|
4565
4611
|
@if (dismissible()) {
|
|
4566
|
-
<button
|
|
4612
|
+
<button
|
|
4613
|
+
type="button"
|
|
4614
|
+
class="loro-modal__close"
|
|
4615
|
+
aria-label="Cerrar modal"
|
|
4616
|
+
(pointerdown)="$event.stopPropagation()"
|
|
4617
|
+
(touchstart)="$event.stopPropagation()"
|
|
4618
|
+
(click)="onCloseClick($event)">
|
|
4567
4619
|
X
|
|
4568
4620
|
</button>
|
|
4569
4621
|
}
|
|
@@ -4580,7 +4632,7 @@ class LoroModal {
|
|
|
4580
4632
|
</section>
|
|
4581
4633
|
</div>
|
|
4582
4634
|
}
|
|
4583
|
-
`, isInline: true, styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem));overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;
|
|
4635
|
+
`, isInline: true, styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem));overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;inset:auto 0 0;width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)));grid-template-rows:auto minmax(0,auto) auto;background:var(--loro-surface);overscroll-behavior-y:contain;transform:translate3d(0,var(--loro-modal-sheet-drag-y, 0px),0)}.loro-modal--sheet .loro-modal__dialog--dragging{transition:none}.loro-modal--sheet .loro-modal__content{display:block;height:auto;min-height:0;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)) - 4rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:.85rem;background:var(--loro-surface);touch-action:pan-y}.loro-modal--sheet .loro-modal__content--flush{padding:0}.loro-modal--center{align-items:center;padding:1rem}.loro-modal--center .loro-modal__dialog{border-radius:1.15rem}::ng-deep [loro-modal-actions]{flex-direction:column-reverse;padding:.7rem .9rem max(.85rem,env(safe-area-inset-bottom,0px));background:var(--loro-surface)}}@media(min-width:1024px){.loro-modal{place-items:center;padding:2rem}.loro-modal__backdrop{background:#070a129e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.loro-modal--center .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog{position:relative;inset:auto;max-height:min(46rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 4rem));border-radius:1.5rem}.loro-modal__dialog--sm{width:min(100%,28rem)}.loro-modal__dialog--md{width:min(100%,36rem)}.loro-modal__dialog--lg{width:min(100%,60rem)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4584
4636
|
}
|
|
4585
4637
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: LoroModal, decorators: [{
|
|
4586
4638
|
type: Component,
|
|
@@ -4615,7 +4667,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
4615
4667
|
<h2>{{ title() }}</h2>
|
|
4616
4668
|
}
|
|
4617
4669
|
@if (dismissible()) {
|
|
4618
|
-
<button
|
|
4670
|
+
<button
|
|
4671
|
+
type="button"
|
|
4672
|
+
class="loro-modal__close"
|
|
4673
|
+
aria-label="Cerrar modal"
|
|
4674
|
+
(pointerdown)="$event.stopPropagation()"
|
|
4675
|
+
(touchstart)="$event.stopPropagation()"
|
|
4676
|
+
(click)="onCloseClick($event)">
|
|
4619
4677
|
X
|
|
4620
4678
|
</button>
|
|
4621
4679
|
}
|
|
@@ -4632,7 +4690,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
4632
4690
|
</section>
|
|
4633
4691
|
</div>
|
|
4634
4692
|
}
|
|
4635
|
-
`, styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem));overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;
|
|
4693
|
+
`, styles: [":host{display:contents;font-family:var(--loro-font-brand)}.loro-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;width:100vw;height:100vh;height:var(--app-fill-height, var(--app-viewport-height, 100dvh));padding:1.25rem;isolation:isolate}.loro-modal__backdrop{position:absolute;inset:0;border:0;background:#140e276b;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);cursor:pointer}.loro-modal__dialog{position:relative;z-index:1;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(100%,32rem);max-height:min(42rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 2.5rem));overflow:hidden;border:1px solid var(--loro-border-subtle);border-radius:1.25rem;background:var(--loro-surface);box-shadow:var(--loro-shadow-panel);color:var(--loro-text);transition:transform .22s cubic-bezier(.22,1,.36,1)}.loro-modal__dialog--sm{width:min(100%,24rem)}.loro-modal__dialog--lg{width:min(100%,44rem)}.loro-modal__header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.15rem;border-bottom:1px solid var(--loro-border-subtle)}h2{margin:0;color:var(--loro-text-strong);font-size:1.08rem;font-weight:950;line-height:1.2}.loro-modal__close{display:grid;width:2.25rem;height:2.25rem;place-items:center;border:0;border-radius:50%;background:#6c3cff14;color:var(--loro-text-strong);font:inherit;font-weight:950;cursor:pointer}.loro-modal__content{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:1.15rem}::ng-deep [loro-modal-actions]{display:flex;justify-content:flex-end;gap:.75rem;padding:.9rem 1.15rem 1.15rem;border-top:1px solid var(--loro-border-subtle)}@media(max-width:1023.88px){.loro-modal{align-items:end;padding:0}.loro-modal--sheet{place-items:end stretch}.loro-modal__dialog,.loro-modal__dialog--sm,.loro-modal__dialog--md,.loro-modal__dialog--lg{width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 1rem);border-radius:1.75rem 1.75rem 0 0}.loro-modal--sheet .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog--sm,.loro-modal--sheet .loro-modal__dialog--md,.loro-modal--sheet .loro-modal__dialog--lg{--loro-modal-sheet-rest-top: max( calc(var(--app-fill-height, 100dvh) * .3), calc(env(safe-area-inset-top, 0px) + .65rem) );position:fixed;inset:auto 0 0;width:100%;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)));grid-template-rows:auto minmax(0,auto) auto;background:var(--loro-surface);overscroll-behavior-y:contain;transform:translate3d(0,var(--loro-modal-sheet-drag-y, 0px),0)}.loro-modal--sheet .loro-modal__dialog--dragging{transition:none}.loro-modal--sheet .loro-modal__content{display:block;height:auto;min-height:0;max-height:calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - max(var(--loro-modal-sheet-rest-top),calc(env(safe-area-inset-top,0px) + .65rem)) - 4rem);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:.85rem;background:var(--loro-surface);touch-action:pan-y}.loro-modal--sheet .loro-modal__content--flush{padding:0}.loro-modal--center{align-items:center;padding:1rem}.loro-modal--center .loro-modal__dialog{border-radius:1.15rem}::ng-deep [loro-modal-actions]{flex-direction:column-reverse;padding:.7rem .9rem max(.85rem,env(safe-area-inset-bottom,0px));background:var(--loro-surface)}}@media(min-width:1024px){.loro-modal{place-items:center;padding:2rem}.loro-modal__backdrop{background:#070a129e;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.loro-modal--center .loro-modal__dialog,.loro-modal--sheet .loro-modal__dialog{position:relative;inset:auto;max-height:min(46rem,calc(var(--app-fill-height, var(--app-viewport-height, 100dvh)) - 4rem));border-radius:1.5rem}.loro-modal__dialog--sm{width:min(100%,28rem)}.loro-modal__dialog--md{width:min(100%,36rem)}.loro-modal__dialog--lg{width:min(100%,60rem)}}\n"] }]
|
|
4636
4694
|
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], sheetDragToClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetDragToClose", required: false }] }], sheetRestTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetRestTop", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], closeOnBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdrop", required: false }] }], modalClose: [{ type: i0.Output, args: ["modalClose"] }] } });
|
|
4637
4695
|
|
|
4638
4696
|
/**
|