avero-ui 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1043 -2
- package/fesm2022/avero-ui-accordion.mjs +515 -0
- package/fesm2022/avero-ui-accordion.mjs.map +1 -0
- package/fesm2022/avero-ui-animate-on-scroll.mjs +223 -0
- package/fesm2022/avero-ui-animate-on-scroll.mjs.map +1 -0
- package/fesm2022/avero-ui-auto-complete.mjs +638 -0
- package/fesm2022/avero-ui-auto-complete.mjs.map +1 -0
- package/fesm2022/avero-ui-auto-focus.mjs +88 -0
- package/fesm2022/avero-ui-auto-focus.mjs.map +1 -0
- package/fesm2022/avero-ui-avatar.mjs +274 -0
- package/fesm2022/avero-ui-avatar.mjs.map +1 -0
- package/fesm2022/avero-ui-badge.mjs +278 -0
- package/fesm2022/avero-ui-badge.mjs.map +1 -0
- package/fesm2022/avero-ui-bind.mjs +103 -0
- package/fesm2022/avero-ui-bind.mjs.map +1 -0
- package/fesm2022/avero-ui-block-ui.mjs +175 -0
- package/fesm2022/avero-ui-block-ui.mjs.map +1 -0
- package/fesm2022/avero-ui-breadcrumb.mjs +187 -0
- package/fesm2022/avero-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/avero-ui-button.mjs +118 -0
- package/fesm2022/avero-ui-button.mjs.map +1 -0
- package/fesm2022/avero-ui-calendar.mjs +412 -0
- package/fesm2022/avero-ui-calendar.mjs.map +1 -0
- package/fesm2022/avero-ui-card.mjs +305 -0
- package/fesm2022/avero-ui-card.mjs.map +1 -0
- package/fesm2022/avero-ui-carousel.mjs +390 -0
- package/fesm2022/avero-ui-carousel.mjs.map +1 -0
- package/fesm2022/avero-ui-cascade-select.mjs +771 -0
- package/fesm2022/avero-ui-cascade-select.mjs.map +1 -0
- package/fesm2022/avero-ui-chart.mjs +361 -0
- package/fesm2022/avero-ui-chart.mjs.map +1 -0
- package/fesm2022/avero-ui-checkbox.mjs +279 -0
- package/fesm2022/avero-ui-checkbox.mjs.map +1 -0
- package/fesm2022/avero-ui-chip.mjs +256 -0
- package/fesm2022/avero-ui-chip.mjs.map +1 -0
- package/fesm2022/avero-ui-class-names.mjs +80 -0
- package/fesm2022/avero-ui-class-names.mjs.map +1 -0
- package/fesm2022/avero-ui-color-picker.mjs +665 -0
- package/fesm2022/avero-ui-color-picker.mjs.map +1 -0
- package/fesm2022/avero-ui-confirm-dialog.mjs +561 -0
- package/fesm2022/avero-ui-confirm-dialog.mjs.map +1 -0
- package/fesm2022/avero-ui-confirm-popup.mjs +406 -0
- package/fesm2022/avero-ui-confirm-popup.mjs.map +1 -0
- package/fesm2022/avero-ui-context-menu.mjs +409 -0
- package/fesm2022/avero-ui-context-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-core.mjs +38 -0
- package/fesm2022/avero-ui-core.mjs.map +1 -0
- package/fesm2022/avero-ui-data-view.mjs +312 -0
- package/fesm2022/avero-ui-data-view.mjs.map +1 -0
- package/fesm2022/avero-ui-dialog.mjs +595 -0
- package/fesm2022/avero-ui-dialog.mjs.map +1 -0
- package/fesm2022/avero-ui-divider.mjs +119 -0
- package/fesm2022/avero-ui-divider.mjs.map +1 -0
- package/fesm2022/avero-ui-dock.mjs +243 -0
- package/fesm2022/avero-ui-dock.mjs.map +1 -0
- package/fesm2022/avero-ui-drawer.mjs +577 -0
- package/fesm2022/avero-ui-drawer.mjs.map +1 -0
- package/fesm2022/avero-ui-dropdown.mjs +510 -0
- package/fesm2022/avero-ui-dropdown.mjs.map +1 -0
- package/fesm2022/avero-ui-dynamic-dialog.mjs +268 -0
- package/fesm2022/avero-ui-dynamic-dialog.mjs.map +1 -0
- package/fesm2022/avero-ui-fieldset.mjs +354 -0
- package/fesm2022/avero-ui-fieldset.mjs.map +1 -0
- package/fesm2022/avero-ui-file-upload.mjs +658 -0
- package/fesm2022/avero-ui-file-upload.mjs.map +1 -0
- package/fesm2022/avero-ui-fluid.mjs +147 -0
- package/fesm2022/avero-ui-fluid.mjs.map +1 -0
- package/fesm2022/avero-ui-focus-trap.mjs +120 -0
- package/fesm2022/avero-ui-focus-trap.mjs.map +1 -0
- package/fesm2022/avero-ui-galleria.mjs +523 -0
- package/fesm2022/avero-ui-galleria.mjs.map +1 -0
- package/fesm2022/avero-ui-icon-field.mjs +99 -0
- package/fesm2022/avero-ui-icon-field.mjs.map +1 -0
- package/fesm2022/avero-ui-image-compare.mjs +274 -0
- package/fesm2022/avero-ui-image-compare.mjs.map +1 -0
- package/fesm2022/avero-ui-image.mjs +397 -0
- package/fesm2022/avero-ui-image.mjs.map +1 -0
- package/fesm2022/avero-ui-input-group.mjs +79 -0
- package/fesm2022/avero-ui-input-group.mjs.map +1 -0
- package/fesm2022/avero-ui-input-mask.mjs +678 -0
- package/fesm2022/avero-ui-input-mask.mjs.map +1 -0
- package/fesm2022/avero-ui-input-number.mjs +390 -0
- package/fesm2022/avero-ui-input-number.mjs.map +1 -0
- package/fesm2022/avero-ui-input-otp.mjs +541 -0
- package/fesm2022/avero-ui-input-otp.mjs.map +1 -0
- package/fesm2022/avero-ui-input.mjs +140 -0
- package/fesm2022/avero-ui-input.mjs.map +1 -0
- package/fesm2022/avero-ui-knob.mjs +436 -0
- package/fesm2022/avero-ui-knob.mjs.map +1 -0
- package/fesm2022/avero-ui-mega-menu.mjs +431 -0
- package/fesm2022/avero-ui-mega-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-menu.mjs +398 -0
- package/fesm2022/avero-ui-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-menubar.mjs +387 -0
- package/fesm2022/avero-ui-menubar.mjs.map +1 -0
- package/fesm2022/avero-ui-message.mjs +221 -0
- package/fesm2022/avero-ui-message.mjs.map +1 -0
- package/fesm2022/avero-ui-order-list.mjs +302 -0
- package/fesm2022/avero-ui-order-list.mjs.map +1 -0
- package/fesm2022/avero-ui-organization-chart.mjs +505 -0
- package/fesm2022/avero-ui-organization-chart.mjs.map +1 -0
- package/fesm2022/avero-ui-paginator.mjs +319 -0
- package/fesm2022/avero-ui-paginator.mjs.map +1 -0
- package/fesm2022/avero-ui-panel-menu.mjs +339 -0
- package/fesm2022/avero-ui-panel-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-password.mjs +483 -0
- package/fesm2022/avero-ui-password.mjs.map +1 -0
- package/fesm2022/avero-ui-popover.mjs +469 -0
- package/fesm2022/avero-ui-popover.mjs.map +1 -0
- package/fesm2022/avero-ui-progress-bar.mjs +194 -0
- package/fesm2022/avero-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/avero-ui-progress-spinner.mjs +150 -0
- package/fesm2022/avero-ui-progress-spinner.mjs.map +1 -0
- package/fesm2022/avero-ui-radio.mjs +67 -0
- package/fesm2022/avero-ui-radio.mjs.map +1 -0
- package/fesm2022/avero-ui-rating.mjs +271 -0
- package/fesm2022/avero-ui-rating.mjs.map +1 -0
- package/fesm2022/avero-ui-scroll-panel.mjs +415 -0
- package/fesm2022/avero-ui-scroll-panel.mjs.map +1 -0
- package/fesm2022/avero-ui-slider.mjs +274 -0
- package/fesm2022/avero-ui-slider.mjs.map +1 -0
- package/fesm2022/avero-ui-splitter.mjs +438 -0
- package/fesm2022/avero-ui-splitter.mjs.map +1 -0
- package/fesm2022/avero-ui-stepper.mjs +626 -0
- package/fesm2022/avero-ui-stepper.mjs.map +1 -0
- package/fesm2022/avero-ui-switch.mjs +252 -0
- package/fesm2022/avero-ui-switch.mjs.map +1 -0
- package/fesm2022/avero-ui-table.mjs +448 -0
- package/fesm2022/avero-ui-table.mjs.map +1 -0
- package/fesm2022/avero-ui-tabs.mjs +693 -0
- package/fesm2022/avero-ui-tabs.mjs.map +1 -0
- package/fesm2022/avero-ui-textarea.mjs +180 -0
- package/fesm2022/avero-ui-textarea.mjs.map +1 -0
- package/fesm2022/avero-ui-tiered-menu.mjs +444 -0
- package/fesm2022/avero-ui-tiered-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-timeline.mjs +348 -0
- package/fesm2022/avero-ui-timeline.mjs.map +1 -0
- package/fesm2022/avero-ui-toast.mjs +291 -0
- package/fesm2022/avero-ui-toast.mjs.map +1 -0
- package/fesm2022/avero-ui-toggle-button.mjs +317 -0
- package/fesm2022/avero-ui-toggle-button.mjs.map +1 -0
- package/fesm2022/avero-ui-toolbar.mjs +284 -0
- package/fesm2022/avero-ui-toolbar.mjs.map +1 -0
- package/fesm2022/avero-ui-tooltip.mjs +442 -0
- package/fesm2022/avero-ui-tooltip.mjs.map +1 -0
- package/fesm2022/avero-ui-tree.mjs +426 -0
- package/fesm2022/avero-ui-tree.mjs.map +1 -0
- package/fesm2022/avero-ui-virtual-scroller.mjs +503 -0
- package/fesm2022/avero-ui-virtual-scroller.mjs.map +1 -0
- package/fesm2022/avero-ui.mjs +114 -0
- package/fesm2022/avero-ui.mjs.map +1 -0
- package/package.json +342 -3
- package/scripts/install-agent-skills.mjs +31 -0
- package/skills/avero-ui-build/SKILL.md +40 -0
- package/skills/avero-ui-build/agents/openai.yaml +4 -0
- package/skills/avero-ui-build/assets/workspace-page.scss +94 -0
- package/skills/avero-ui-build/assets/workspace-page.ts +222 -0
- package/skills/avero-ui-build/references/components.md +47 -0
- package/skills/avero-ui-build/references/integration.md +65 -0
- package/skills/avero-ui-build/references/recipes.md +88 -0
- package/styles/theme.scss +92 -0
- package/types/avero-ui-accordion.d.ts +101 -0
- package/types/avero-ui-animate-on-scroll.d.ts +56 -0
- package/types/avero-ui-auto-complete.d.ts +188 -0
- package/types/avero-ui-auto-focus.d.ts +24 -0
- package/types/avero-ui-avatar.d.ts +73 -0
- package/types/avero-ui-badge.d.ts +71 -0
- package/types/avero-ui-bind.d.ts +26 -0
- package/types/avero-ui-block-ui.d.ts +31 -0
- package/types/avero-ui-breadcrumb.d.ts +65 -0
- package/types/avero-ui-button.d.ts +37 -0
- package/types/avero-ui-calendar.d.ts +105 -0
- package/types/avero-ui-card.d.ts +53 -0
- package/types/avero-ui-carousel.d.ts +128 -0
- package/types/avero-ui-cascade-select.d.ts +212 -0
- package/types/avero-ui-chart.d.ts +106 -0
- package/types/avero-ui-checkbox.d.ts +90 -0
- package/types/avero-ui-chip.d.ts +63 -0
- package/types/avero-ui-class-names.d.ts +24 -0
- package/types/avero-ui-color-picker.d.ts +173 -0
- package/types/avero-ui-confirm-dialog.d.ts +113 -0
- package/types/avero-ui-confirm-popup.d.ts +68 -0
- package/types/avero-ui-context-menu.d.ts +95 -0
- package/types/avero-ui-core.d.ts +11 -0
- package/types/avero-ui-data-view.d.ts +102 -0
- package/types/avero-ui-dialog.d.ts +118 -0
- package/types/avero-ui-divider.d.ts +31 -0
- package/types/avero-ui-dock.d.ts +80 -0
- package/types/avero-ui-drawer.d.ts +109 -0
- package/types/avero-ui-dropdown.d.ts +146 -0
- package/types/avero-ui-dynamic-dialog.d.ts +51 -0
- package/types/avero-ui-fieldset.d.ts +73 -0
- package/types/avero-ui-file-upload.d.ts +195 -0
- package/types/avero-ui-fluid.d.ts +32 -0
- package/types/avero-ui-focus-trap.d.ts +25 -0
- package/types/avero-ui-galleria.d.ts +156 -0
- package/types/avero-ui-icon-field.d.ts +22 -0
- package/types/avero-ui-image-compare.d.ts +77 -0
- package/types/avero-ui-image.d.ts +111 -0
- package/types/avero-ui-input-group.d.ts +14 -0
- package/types/avero-ui-input-mask.d.ts +178 -0
- package/types/avero-ui-input-number.d.ts +131 -0
- package/types/avero-ui-input-otp.d.ts +140 -0
- package/types/avero-ui-input.d.ts +36 -0
- package/types/avero-ui-knob.d.ts +139 -0
- package/types/avero-ui-mega-menu.d.ts +115 -0
- package/types/avero-ui-menu.d.ts +100 -0
- package/types/avero-ui-menubar.d.ts +91 -0
- package/types/avero-ui-message.d.ts +54 -0
- package/types/avero-ui-order-list.d.ts +85 -0
- package/types/avero-ui-organization-chart.d.ts +145 -0
- package/types/avero-ui-paginator.d.ts +104 -0
- package/types/avero-ui-panel-menu.d.ts +99 -0
- package/types/avero-ui-password.d.ts +163 -0
- package/types/avero-ui-popover.d.ts +91 -0
- package/types/avero-ui-progress-bar.d.ts +45 -0
- package/types/avero-ui-progress-spinner.d.ts +41 -0
- package/types/avero-ui-radio.d.ts +16 -0
- package/types/avero-ui-rating.d.ts +75 -0
- package/types/avero-ui-scroll-panel.d.ts +78 -0
- package/types/avero-ui-slider.d.ts +92 -0
- package/types/avero-ui-splitter.d.ts +90 -0
- package/types/avero-ui-stepper.d.ts +134 -0
- package/types/avero-ui-switch.d.ts +83 -0
- package/types/avero-ui-table.d.ts +150 -0
- package/types/avero-ui-tabs.d.ts +135 -0
- package/types/avero-ui-textarea.d.ts +43 -0
- package/types/avero-ui-tiered-menu.d.ts +105 -0
- package/types/avero-ui-timeline.d.ts +97 -0
- package/types/avero-ui-toast.d.ts +99 -0
- package/types/avero-ui-toggle-button.d.ts +115 -0
- package/types/avero-ui-toolbar.d.ts +33 -0
- package/types/avero-ui-tooltip.d.ts +93 -0
- package/types/avero-ui-tree.d.ts +128 -0
- package/types/avero-ui-virtual-scroller.d.ts +149 -0
- package/types/avero-ui.d.ts +82 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, computed, contentChild, input, output } from "@angular/core";
|
|
4
|
+
import { RouterLink } from "@angular/router";
|
|
5
|
+
var AvBreadcrumb = class AvBreadcrumb {
|
|
6
|
+
model = input([], ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
|
|
7
|
+
home = input(null, ...ngDevMode ? [{ debugName: "home" }] : /* istanbul ignore next */ []);
|
|
8
|
+
ariaLabel = input("Breadcrumb", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
9
|
+
ariaLabelledBy = input(null, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
10
|
+
onItemClick = output();
|
|
11
|
+
itemTemplate = contentChild("item", ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
|
|
12
|
+
separatorTemplate = contentChild("separator", ...ngDevMode ? [{ debugName: "separatorTemplate" }] : /* istanbul ignore next */ []);
|
|
13
|
+
items = computed(() => {
|
|
14
|
+
const home = this.home();
|
|
15
|
+
return [...home ? [home] : [], ...this.model()].filter((item) => item.visible !== false);
|
|
16
|
+
}, ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
17
|
+
activate(originalEvent, item) {
|
|
18
|
+
if (item.disabled) {
|
|
19
|
+
originalEvent.preventDefault();
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const event = {
|
|
23
|
+
originalEvent,
|
|
24
|
+
item
|
|
25
|
+
};
|
|
26
|
+
item.command?.(event);
|
|
27
|
+
this.onItemClick.emit(event);
|
|
28
|
+
}
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
30
|
+
minVersion: "12.0.0",
|
|
31
|
+
version: "22.3.2",
|
|
32
|
+
ngImport: i0,
|
|
33
|
+
type: AvBreadcrumb,
|
|
34
|
+
deps: [],
|
|
35
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
36
|
+
});
|
|
37
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
38
|
+
minVersion: "17.0.0",
|
|
39
|
+
version: "22.3.2",
|
|
40
|
+
type: AvBreadcrumb,
|
|
41
|
+
isStandalone: true,
|
|
42
|
+
selector: "av-breadcrumb",
|
|
43
|
+
inputs: {
|
|
44
|
+
model: {
|
|
45
|
+
classPropertyName: "model",
|
|
46
|
+
publicName: "model",
|
|
47
|
+
isSignal: true,
|
|
48
|
+
isRequired: false,
|
|
49
|
+
transformFunction: null
|
|
50
|
+
},
|
|
51
|
+
home: {
|
|
52
|
+
classPropertyName: "home",
|
|
53
|
+
publicName: "home",
|
|
54
|
+
isSignal: true,
|
|
55
|
+
isRequired: false,
|
|
56
|
+
transformFunction: null
|
|
57
|
+
},
|
|
58
|
+
ariaLabel: {
|
|
59
|
+
classPropertyName: "ariaLabel",
|
|
60
|
+
publicName: "ariaLabel",
|
|
61
|
+
isSignal: true,
|
|
62
|
+
isRequired: false,
|
|
63
|
+
transformFunction: null
|
|
64
|
+
},
|
|
65
|
+
ariaLabelledBy: {
|
|
66
|
+
classPropertyName: "ariaLabelledBy",
|
|
67
|
+
publicName: "ariaLabelledBy",
|
|
68
|
+
isSignal: true,
|
|
69
|
+
isRequired: false,
|
|
70
|
+
transformFunction: null
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
outputs: { onItemClick: "onItemClick" },
|
|
74
|
+
queries: [{
|
|
75
|
+
propertyName: "itemTemplate",
|
|
76
|
+
first: true,
|
|
77
|
+
predicate: ["item"],
|
|
78
|
+
descendants: true,
|
|
79
|
+
isSignal: true
|
|
80
|
+
}, {
|
|
81
|
+
propertyName: "separatorTemplate",
|
|
82
|
+
first: true,
|
|
83
|
+
predicate: ["separator"],
|
|
84
|
+
descendants: true,
|
|
85
|
+
isSignal: true
|
|
86
|
+
}],
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
template: "<nav\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n>\n <ol>\n @for (item of items(); track $index; let index = $index; let last = $last) {\n <li>\n @if (index > 0) {\n <span class=\"separator\" aria-hidden=\"true\">\n @if (separatorTemplate(); as separator) {\n <ng-container [ngTemplateOutlet]=\"separator\" />\n } @else {\n ›\n }\n </span>\n }\n <ng-template #content>\n @if (itemTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, last }\"\n />\n } @else {\n @if (item.icon) {\n <span [class]=\"item.icon\" aria-hidden=\"true\"></span>\n }\n {{ item.label }}\n }\n </ng-template>\n @if (item.disabled) {\n <span\n class=\"item disabled\"\n aria-disabled=\"true\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></span>\n } @else if (item.routerLink != null) {\n <a\n class=\"item\"\n [routerLink]=\"item.routerLink\"\n [queryParams]=\"item.queryParams\"\n [fragment]=\"item.fragment\"\n [target]=\"item.target ?? '_self'\"\n [attr.rel]=\"item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></a>\n } @else if (item.url) {\n <a\n class=\"item\"\n [href]=\"item.url\"\n [target]=\"item.target ?? '_self'\"\n [attr.rel]=\"item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></a>\n } @else if (item.command) {\n <button\n class=\"item\"\n type=\"button\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n } @else {\n <span\n class=\"item\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></span>\n }\n </li>\n }\n </ol>\n</nav>\n",
|
|
89
|
+
styles: [":host{display:block;min-width:0}nav{padding:12px 16px;border:1px solid var(--av-breadcrumb-border, var(--av-border, #dce7e2));border-radius:var(--av-breadcrumb-radius, 10px);background:var(--av-breadcrumb-background, var(--av-surface, #fff))}ol{display:flex;flex-wrap:wrap;align-items:center;gap:4px;list-style:none;margin:0;padding:0}li{display:flex;align-items:center;gap:4px;min-width:0}.separator{color:var(--av-text-muted, #899b93);padding:0 6px;-webkit-user-select:none;user-select:none}.item{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;border-radius:5px;padding:6px 8px;color:var(--av-breadcrumb-color, var(--av-text, #52685e));font:inherit;font-size:14px;text-decoration:none;overflow-wrap:anywhere}a.item,button.item{cursor:pointer}a.item:hover,button.item:hover{background:var(--av-surface-hover, #edf6f2);color:var(--av-primary, #0f766e)}a.item:focus-visible,button.item:focus-visible{outline:2px solid var(--av-primary, #0f766e);outline-offset:2px}[aria-current=page]{color:var(--av-breadcrumb-current-color, var(--av-primary, #0f766e));font-weight:600}.disabled{opacity:.5}\n"],
|
|
90
|
+
dependencies: [{
|
|
91
|
+
kind: "directive",
|
|
92
|
+
type: NgTemplateOutlet,
|
|
93
|
+
selector: "[ngTemplateOutlet]",
|
|
94
|
+
inputs: [
|
|
95
|
+
"ngTemplateOutletContext",
|
|
96
|
+
"ngTemplateOutlet",
|
|
97
|
+
"ngTemplateOutletInjector"
|
|
98
|
+
]
|
|
99
|
+
}, {
|
|
100
|
+
kind: "directive",
|
|
101
|
+
type: RouterLink,
|
|
102
|
+
selector: "[routerLink]",
|
|
103
|
+
inputs: [
|
|
104
|
+
"target",
|
|
105
|
+
"queryParams",
|
|
106
|
+
"fragment",
|
|
107
|
+
"queryParamsHandling",
|
|
108
|
+
"state",
|
|
109
|
+
"info",
|
|
110
|
+
"relativeTo",
|
|
111
|
+
"preserveFragment",
|
|
112
|
+
"skipLocationChange",
|
|
113
|
+
"replaceUrl",
|
|
114
|
+
"browserUrl",
|
|
115
|
+
"scroll",
|
|
116
|
+
"routerLink"
|
|
117
|
+
]
|
|
118
|
+
}],
|
|
119
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
123
|
+
minVersion: "12.0.0",
|
|
124
|
+
version: "22.3.2",
|
|
125
|
+
ngImport: i0,
|
|
126
|
+
type: AvBreadcrumb,
|
|
127
|
+
decorators: [{
|
|
128
|
+
type: Component,
|
|
129
|
+
args: [{
|
|
130
|
+
selector: "av-breadcrumb",
|
|
131
|
+
standalone: true,
|
|
132
|
+
imports: [NgTemplateOutlet, RouterLink],
|
|
133
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
134
|
+
template: "<nav\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n>\n <ol>\n @for (item of items(); track $index; let index = $index; let last = $last) {\n <li>\n @if (index > 0) {\n <span class=\"separator\" aria-hidden=\"true\">\n @if (separatorTemplate(); as separator) {\n <ng-container [ngTemplateOutlet]=\"separator\" />\n } @else {\n ›\n }\n </span>\n }\n <ng-template #content>\n @if (itemTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, last }\"\n />\n } @else {\n @if (item.icon) {\n <span [class]=\"item.icon\" aria-hidden=\"true\"></span>\n }\n {{ item.label }}\n }\n </ng-template>\n @if (item.disabled) {\n <span\n class=\"item disabled\"\n aria-disabled=\"true\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></span>\n } @else if (item.routerLink != null) {\n <a\n class=\"item\"\n [routerLink]=\"item.routerLink\"\n [queryParams]=\"item.queryParams\"\n [fragment]=\"item.fragment\"\n [target]=\"item.target ?? '_self'\"\n [attr.rel]=\"item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></a>\n } @else if (item.url) {\n <a\n class=\"item\"\n [href]=\"item.url\"\n [target]=\"item.target ?? '_self'\"\n [attr.rel]=\"item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></a>\n } @else if (item.command) {\n <button\n class=\"item\"\n type=\"button\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n } @else {\n <span\n class=\"item\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></span>\n }\n </li>\n }\n </ol>\n</nav>\n",
|
|
135
|
+
styles: [":host{display:block;min-width:0}nav{padding:12px 16px;border:1px solid var(--av-breadcrumb-border, var(--av-border, #dce7e2));border-radius:var(--av-breadcrumb-radius, 10px);background:var(--av-breadcrumb-background, var(--av-surface, #fff))}ol{display:flex;flex-wrap:wrap;align-items:center;gap:4px;list-style:none;margin:0;padding:0}li{display:flex;align-items:center;gap:4px;min-width:0}.separator{color:var(--av-text-muted, #899b93);padding:0 6px;-webkit-user-select:none;user-select:none}.item{display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;border-radius:5px;padding:6px 8px;color:var(--av-breadcrumb-color, var(--av-text, #52685e));font:inherit;font-size:14px;text-decoration:none;overflow-wrap:anywhere}a.item,button.item{cursor:pointer}a.item:hover,button.item:hover{background:var(--av-surface-hover, #edf6f2);color:var(--av-primary, #0f766e)}a.item:focus-visible,button.item:focus-visible{outline:2px solid var(--av-primary, #0f766e);outline-offset:2px}[aria-current=page]{color:var(--av-breadcrumb-current-color, var(--av-primary, #0f766e));font-weight:600}.disabled{opacity:.5}\n"]
|
|
136
|
+
}]
|
|
137
|
+
}],
|
|
138
|
+
propDecorators: {
|
|
139
|
+
model: [{
|
|
140
|
+
type: i0.Input,
|
|
141
|
+
args: [{
|
|
142
|
+
isSignal: true,
|
|
143
|
+
alias: "model",
|
|
144
|
+
required: false
|
|
145
|
+
}]
|
|
146
|
+
}],
|
|
147
|
+
home: [{
|
|
148
|
+
type: i0.Input,
|
|
149
|
+
args: [{
|
|
150
|
+
isSignal: true,
|
|
151
|
+
alias: "home",
|
|
152
|
+
required: false
|
|
153
|
+
}]
|
|
154
|
+
}],
|
|
155
|
+
ariaLabel: [{
|
|
156
|
+
type: i0.Input,
|
|
157
|
+
args: [{
|
|
158
|
+
isSignal: true,
|
|
159
|
+
alias: "ariaLabel",
|
|
160
|
+
required: false
|
|
161
|
+
}]
|
|
162
|
+
}],
|
|
163
|
+
ariaLabelledBy: [{
|
|
164
|
+
type: i0.Input,
|
|
165
|
+
args: [{
|
|
166
|
+
isSignal: true,
|
|
167
|
+
alias: "ariaLabelledBy",
|
|
168
|
+
required: false
|
|
169
|
+
}]
|
|
170
|
+
}],
|
|
171
|
+
onItemClick: [{
|
|
172
|
+
type: i0.Output,
|
|
173
|
+
args: ["onItemClick"]
|
|
174
|
+
}],
|
|
175
|
+
itemTemplate: [{
|
|
176
|
+
type: i0.ContentChild,
|
|
177
|
+
args: ["item", { isSignal: true }]
|
|
178
|
+
}],
|
|
179
|
+
separatorTemplate: [{
|
|
180
|
+
type: i0.ContentChild,
|
|
181
|
+
args: ["separator", { isSignal: true }]
|
|
182
|
+
}]
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
export { AvBreadcrumb };
|
|
186
|
+
|
|
187
|
+
//# sourceMappingURL=avero-ui-breadcrumb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avero-ui-breadcrumb.mjs","names":[],"sources":["../../../projects/avero-ui/src/lib/breadcrumb/breadcrumb.ts","../../../projects/avero-ui/src/lib/breadcrumb/breadcrumb.html"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n input,\n output,\n TemplateRef,\n} from '@angular/core';\nimport { Params, RouterLink, UrlTree } from '@angular/router';\n\nexport interface AvBreadcrumbItem {\n label?: string;\n /** CSS class for an icon supplied by the application. */\n icon?: string;\n ariaLabel?: string;\n routerLink?: string | any[] | UrlTree;\n queryParams?: Params;\n fragment?: string;\n url?: string;\n target?: string;\n disabled?: boolean;\n visible?: boolean;\n command?: (event: AvBreadcrumbClickEvent) => void;\n}\nexport interface AvBreadcrumbClickEvent {\n originalEvent: MouseEvent;\n item: AvBreadcrumbItem;\n}\nexport interface AvBreadcrumbItemContext {\n $implicit: AvBreadcrumbItem;\n index: number;\n last: boolean;\n}\n\n@Component({\n selector: 'av-breadcrumb',\n standalone: true,\n imports: [NgTemplateOutlet, RouterLink],\n templateUrl: './breadcrumb.html',\n styleUrl: './breadcrumb.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AvBreadcrumb {\n readonly model = input<readonly AvBreadcrumbItem[]>([]);\n readonly home = input<AvBreadcrumbItem | null>(null);\n readonly ariaLabel = input('Breadcrumb');\n readonly ariaLabelledBy = input<string | null>(null);\n readonly onItemClick = output<AvBreadcrumbClickEvent>();\n protected readonly itemTemplate = contentChild<TemplateRef<AvBreadcrumbItemContext>>('item');\n protected readonly separatorTemplate = contentChild<TemplateRef<unknown>>('separator');\n protected readonly items = computed(() => {\n const home = this.home();\n return [...(home ? [home] : []), ...this.model()].filter((item) => item.visible !== false);\n });\n protected activate(originalEvent: MouseEvent, item: AvBreadcrumbItem): void {\n if (item.disabled) {\n originalEvent.preventDefault();\n return;\n }\n const event = { originalEvent, item };\n item.command?.(event);\n this.onItemClick.emit(event);\n }\n}\n","<nav\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n>\n <ol>\n @for (item of items(); track $index; let index = $index; let last = $last) {\n <li>\n @if (index > 0) {\n <span class=\"separator\" aria-hidden=\"true\">\n @if (separatorTemplate(); as separator) {\n <ng-container [ngTemplateOutlet]=\"separator\" />\n } @else {\n ›\n }\n </span>\n }\n <ng-template #content>\n @if (itemTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index, last }\"\n />\n } @else {\n @if (item.icon) {\n <span [class]=\"item.icon\" aria-hidden=\"true\"></span>\n }\n {{ item.label }}\n }\n </ng-template>\n @if (item.disabled) {\n <span\n class=\"item disabled\"\n aria-disabled=\"true\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></span>\n } @else if (item.routerLink != null) {\n <a\n class=\"item\"\n [routerLink]=\"item.routerLink\"\n [queryParams]=\"item.queryParams\"\n [fragment]=\"item.fragment\"\n [target]=\"item.target ?? '_self'\"\n [attr.rel]=\"item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></a>\n } @else if (item.url) {\n <a\n class=\"item\"\n [href]=\"item.url\"\n [target]=\"item.target ?? '_self'\"\n [attr.rel]=\"item.target === '_blank' ? 'noopener noreferrer' : null\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></a>\n } @else if (item.command) {\n <button\n class=\"item\"\n type=\"button\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n (click)=\"activate($event, item)\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </button>\n } @else {\n <span\n class=\"item\"\n [attr.aria-current]=\"last ? 'page' : null\"\n [attr.aria-label]=\"item.ariaLabel\"\n ><ng-container [ngTemplateOutlet]=\"content\"\n /></span>\n }\n </li>\n }\n </ol>\n</nav>\n"],"mappings":";;;;AA4CA,IAAa,eAAb,MAAa,aAAY;CACd,QAAQ,MAAmC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC9C,OAAO,MAA+B,MAAK,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A;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;EAAA,cAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,mBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACjB,aAAW,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { AvFluidControl } from "avero-ui/fluid";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
|
|
4
|
+
var AvButton = class AvButton {
|
|
5
|
+
variant = input("primary", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
6
|
+
avSize = input("md", ...ngDevMode ? [{ debugName: "avSize" }] : /* istanbul ignore next */ []);
|
|
7
|
+
type = input("button", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
9
|
+
minVersion: "12.0.0",
|
|
10
|
+
version: "22.3.2",
|
|
11
|
+
ngImport: i0,
|
|
12
|
+
type: AvButton,
|
|
13
|
+
deps: [],
|
|
14
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
15
|
+
});
|
|
16
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
17
|
+
minVersion: "17.1.0",
|
|
18
|
+
version: "22.3.2",
|
|
19
|
+
type: AvButton,
|
|
20
|
+
isStandalone: true,
|
|
21
|
+
selector: "button[avButton]",
|
|
22
|
+
inputs: {
|
|
23
|
+
variant: {
|
|
24
|
+
classPropertyName: "variant",
|
|
25
|
+
publicName: "variant",
|
|
26
|
+
isSignal: true,
|
|
27
|
+
isRequired: false,
|
|
28
|
+
transformFunction: null
|
|
29
|
+
},
|
|
30
|
+
avSize: {
|
|
31
|
+
classPropertyName: "avSize",
|
|
32
|
+
publicName: "avSize",
|
|
33
|
+
isSignal: true,
|
|
34
|
+
isRequired: false,
|
|
35
|
+
transformFunction: null
|
|
36
|
+
},
|
|
37
|
+
type: {
|
|
38
|
+
classPropertyName: "type",
|
|
39
|
+
publicName: "type",
|
|
40
|
+
isSignal: true,
|
|
41
|
+
isRequired: false,
|
|
42
|
+
transformFunction: null
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
host: {
|
|
46
|
+
properties: {
|
|
47
|
+
"attr.data-av-variant": "variant()",
|
|
48
|
+
"attr.data-av-size": "avSize()",
|
|
49
|
+
"attr.type": "type()"
|
|
50
|
+
},
|
|
51
|
+
classAttribute: "av-button"
|
|
52
|
+
},
|
|
53
|
+
hostDirectives: [{
|
|
54
|
+
directive: AvFluidControl,
|
|
55
|
+
inputs: ["fluid", "fluid"]
|
|
56
|
+
}],
|
|
57
|
+
ngImport: i0,
|
|
58
|
+
template: "<ng-content />",
|
|
59
|
+
isInline: true,
|
|
60
|
+
styles: [":host{--_background: var(--av-button-primary-background, var(--av-primary-solid, #0f766e));--_color: var(--av-button-primary-color, var(--av-on-solid, #fff));--_border: var(--av-button-primary-border, var(--av-primary-solid, #0f766e));--_hover: var(--av-button-primary-hover, var(--av-primary-hover, #115e59));--_active: var(--av-button-primary-active, var(--av-primary-active, #134e4a));box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border:1px solid var(--_border);border-radius:var(--av-button-radius, 8px);background:var(--_background);color:var(--_color);font-family:inherit;font-size:14px;font-weight:600;line-height:1.25;text-decoration:none;vertical-align:middle;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}:host([data-av-variant=secondary]){--_background: var(--av-button-secondary-background, var(--av-surface, #fff));--_color: var(--av-button-secondary-color, var(--av-primary, #0f766e));--_border: var(--av-button-secondary-border, var(--av-border, #b8d5cd));--_hover: var(--av-button-secondary-hover, var(--av-surface-hover, #edf6f2));--_active: var(--av-button-secondary-active, var(--av-primary-soft, #dceee6))}:host([data-av-variant=ghost]){--_background: var(--av-button-ghost-background, transparent);--_color: var(--av-button-ghost-color, var(--av-primary, #0f766e));--_border: var(--av-button-ghost-border, transparent);--_hover: var(--av-button-ghost-hover, var(--av-surface-hover, #edf6f2));--_active: var(--av-button-ghost-active, var(--av-primary-soft, #dceee6))}:host([data-av-variant=danger]){--_background: var(--av-button-danger-background, var(--av-danger-solid, #b91c1c));--_color: var(--av-button-danger-color, var(--av-on-solid, #fff));--_border: var(--av-button-danger-border, var(--av-danger-solid, #b91c1c));--_hover: var(--av-button-danger-hover, var(--av-danger-hover, #991b1b));--_active: var(--av-button-danger-active, var(--av-danger-active, #7f1d1d))}:host([data-av-size=sm]){height:32px;padding-inline:12px;font-size:12px}:host([data-av-size=lg]){height:48px;padding-inline:20px;font-size:16px}:host(:hover:not(:disabled)){background:var(--_hover)}:host(:active:not(:disabled)){background:var(--_active)}:host(:focus-visible){outline:2px solid var(--av-button-focus, var(--av-primary, #0f766e));outline-offset:3px}:host(:disabled){opacity:var(--av-button-disabled-opacity, .45);cursor:not-allowed}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"],
|
|
61
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
65
|
+
minVersion: "12.0.0",
|
|
66
|
+
version: "22.3.2",
|
|
67
|
+
ngImport: i0,
|
|
68
|
+
type: AvButton,
|
|
69
|
+
decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{
|
|
72
|
+
hostDirectives: [{
|
|
73
|
+
directive: AvFluidControl,
|
|
74
|
+
inputs: ["fluid"]
|
|
75
|
+
}],
|
|
76
|
+
selector: "button[avButton]",
|
|
77
|
+
standalone: true,
|
|
78
|
+
template: "<ng-content />",
|
|
79
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
80
|
+
host: {
|
|
81
|
+
class: "av-button",
|
|
82
|
+
"[attr.data-av-variant]": "variant()",
|
|
83
|
+
"[attr.data-av-size]": "avSize()",
|
|
84
|
+
"[attr.type]": "type()"
|
|
85
|
+
},
|
|
86
|
+
styles: [":host{--_background: var(--av-button-primary-background, var(--av-primary-solid, #0f766e));--_color: var(--av-button-primary-color, var(--av-on-solid, #fff));--_border: var(--av-button-primary-border, var(--av-primary-solid, #0f766e));--_hover: var(--av-button-primary-hover, var(--av-primary-hover, #115e59));--_active: var(--av-button-primary-active, var(--av-primary-active, #134e4a));box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border:1px solid var(--_border);border-radius:var(--av-button-radius, 8px);background:var(--_background);color:var(--_color);font-family:inherit;font-size:14px;font-weight:600;line-height:1.25;text-decoration:none;vertical-align:middle;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}:host([data-av-variant=secondary]){--_background: var(--av-button-secondary-background, var(--av-surface, #fff));--_color: var(--av-button-secondary-color, var(--av-primary, #0f766e));--_border: var(--av-button-secondary-border, var(--av-border, #b8d5cd));--_hover: var(--av-button-secondary-hover, var(--av-surface-hover, #edf6f2));--_active: var(--av-button-secondary-active, var(--av-primary-soft, #dceee6))}:host([data-av-variant=ghost]){--_background: var(--av-button-ghost-background, transparent);--_color: var(--av-button-ghost-color, var(--av-primary, #0f766e));--_border: var(--av-button-ghost-border, transparent);--_hover: var(--av-button-ghost-hover, var(--av-surface-hover, #edf6f2));--_active: var(--av-button-ghost-active, var(--av-primary-soft, #dceee6))}:host([data-av-variant=danger]){--_background: var(--av-button-danger-background, var(--av-danger-solid, #b91c1c));--_color: var(--av-button-danger-color, var(--av-on-solid, #fff));--_border: var(--av-button-danger-border, var(--av-danger-solid, #b91c1c));--_hover: var(--av-button-danger-hover, var(--av-danger-hover, #991b1b));--_active: var(--av-button-danger-active, var(--av-danger-active, #7f1d1d))}:host([data-av-size=sm]){height:32px;padding-inline:12px;font-size:12px}:host([data-av-size=lg]){height:48px;padding-inline:20px;font-size:16px}:host(:hover:not(:disabled)){background:var(--_hover)}:host(:active:not(:disabled)){background:var(--_active)}:host(:focus-visible){outline:2px solid var(--av-button-focus, var(--av-primary, #0f766e));outline-offset:3px}:host(:disabled){opacity:var(--av-button-disabled-opacity, .45);cursor:not-allowed}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"]
|
|
87
|
+
}]
|
|
88
|
+
}],
|
|
89
|
+
propDecorators: {
|
|
90
|
+
variant: [{
|
|
91
|
+
type: i0.Input,
|
|
92
|
+
args: [{
|
|
93
|
+
isSignal: true,
|
|
94
|
+
alias: "variant",
|
|
95
|
+
required: false
|
|
96
|
+
}]
|
|
97
|
+
}],
|
|
98
|
+
avSize: [{
|
|
99
|
+
type: i0.Input,
|
|
100
|
+
args: [{
|
|
101
|
+
isSignal: true,
|
|
102
|
+
alias: "avSize",
|
|
103
|
+
required: false
|
|
104
|
+
}]
|
|
105
|
+
}],
|
|
106
|
+
type: [{
|
|
107
|
+
type: i0.Input,
|
|
108
|
+
args: [{
|
|
109
|
+
isSignal: true,
|
|
110
|
+
alias: "type",
|
|
111
|
+
required: false
|
|
112
|
+
}]
|
|
113
|
+
}]
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export { AvButton };
|
|
117
|
+
|
|
118
|
+
//# sourceMappingURL=avero-ui-button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avero-ui-button.mjs","names":[],"sources":["../../../projects/avero-ui/src/lib/button/button.ts"],"sourcesContent":["import { AvFluidControl } from 'avero-ui/fluid';\r\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nexport type AvButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';\nexport type AvButtonSize = 'sm' | 'md' | 'lg';\n\n/** Styles a native button while preserving its events and disabled state. */\n@Component({\r\n hostDirectives: [{ directive: AvFluidControl, inputs: ['fluid'] }],\n selector: 'button[avButton]',\n standalone: true,\n template: '<ng-content />',\n styleUrl: './button.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'av-button',\n '[attr.data-av-variant]': 'variant()',\n '[attr.data-av-size]': 'avSize()',\n '[attr.type]': 'type()',\n },\n})\nexport class AvButton {\n readonly variant = input<AvButtonVariant>('primary');\n readonly avSize = input<AvButtonSize>('md');\n readonly type = input<'button' | 'submit' | 'reset'>('button');\n}\r\n"],"mappings":";;;AAqBA,IAAa,WAAb,MAAa,SAAQ;CACV,UAAU,MAAuB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAC3C,SAAS,MAAoB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,OAAO,MAAqC,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAHnD,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,SAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,QAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,MAAA;IAAA,mBAA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