@area8975/ui 0.2.2-dev.49 → 0.2.2-dev.50
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/README.md +3 -2
- package/fesm2022/area8975-ui-alert.mjs +113 -0
- package/fesm2022/area8975-ui-alert.mjs.map +1 -0
- package/fesm2022/area8975-ui-avatar.mjs +157 -0
- package/fesm2022/area8975-ui-avatar.mjs.map +1 -0
- package/fesm2022/area8975-ui-badge.mjs +116 -0
- package/fesm2022/area8975-ui-badge.mjs.map +1 -0
- package/fesm2022/area8975-ui-button.mjs +314 -0
- package/fesm2022/area8975-ui-button.mjs.map +1 -0
- package/fesm2022/area8975-ui-calendar.mjs +549 -0
- package/fesm2022/area8975-ui-calendar.mjs.map +1 -0
- package/fesm2022/area8975-ui-card-header.mjs +96 -0
- package/fesm2022/area8975-ui-card-header.mjs.map +1 -0
- package/fesm2022/area8975-ui-card.mjs +73 -0
- package/fesm2022/area8975-ui-card.mjs.map +1 -0
- package/fesm2022/area8975-ui-chart-palette.mjs +225 -0
- package/fesm2022/area8975-ui-chart-palette.mjs.map +1 -0
- package/fesm2022/area8975-ui-charts.mjs +2813 -0
- package/fesm2022/area8975-ui-charts.mjs.map +1 -0
- package/fesm2022/area8975-ui-checkbox.mjs +202 -0
- package/fesm2022/area8975-ui-checkbox.mjs.map +1 -0
- package/fesm2022/area8975-ui-colour.mjs +200 -0
- package/fesm2022/area8975-ui-colour.mjs.map +1 -0
- package/fesm2022/area8975-ui-container.mjs +40 -0
- package/fesm2022/area8975-ui-container.mjs.map +1 -0
- package/fesm2022/area8975-ui-counter.mjs +246 -0
- package/fesm2022/area8975-ui-counter.mjs.map +1 -0
- package/fesm2022/area8975-ui-date-range-picker.mjs +554 -0
- package/fesm2022/area8975-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/area8975-ui-datepicker.mjs +547 -0
- package/fesm2022/area8975-ui-datepicker.mjs.map +1 -0
- package/fesm2022/area8975-ui-disclosure.mjs +279 -0
- package/fesm2022/area8975-ui-disclosure.mjs.map +1 -0
- package/fesm2022/area8975-ui-drawer.mjs +106 -0
- package/fesm2022/area8975-ui-drawer.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown-button.mjs +141 -0
- package/fesm2022/area8975-ui-dropdown-button.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown-menu.mjs +96 -0
- package/fesm2022/area8975-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown.mjs +208 -0
- package/fesm2022/area8975-ui-dropdown.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropzone.mjs +332 -0
- package/fesm2022/area8975-ui-dropzone.mjs.map +1 -0
- package/fesm2022/area8975-ui-field.mjs +191 -0
- package/fesm2022/area8975-ui-field.mjs.map +1 -0
- package/fesm2022/area8975-ui-file-input.mjs +340 -0
- package/fesm2022/area8975-ui-file-input.mjs.map +1 -0
- package/fesm2022/area8975-ui-file.mjs +47 -0
- package/fesm2022/area8975-ui-file.mjs.map +1 -0
- package/fesm2022/area8975-ui-format.mjs +70 -0
- package/fesm2022/area8975-ui-format.mjs.map +1 -0
- package/fesm2022/area8975-ui-input-addon.mjs +42 -0
- package/fesm2022/area8975-ui-input-addon.mjs.map +1 -0
- package/fesm2022/area8975-ui-input-group.mjs +86 -0
- package/fesm2022/area8975-ui-input-group.mjs.map +1 -0
- package/fesm2022/area8975-ui-input.mjs +682 -0
- package/fesm2022/area8975-ui-input.mjs.map +1 -0
- package/fesm2022/area8975-ui-kpi.mjs +167 -0
- package/fesm2022/area8975-ui-kpi.mjs.map +1 -0
- package/fesm2022/area8975-ui-layout.mjs +63 -0
- package/fesm2022/area8975-ui-layout.mjs.map +1 -0
- package/fesm2022/area8975-ui-loading.mjs +76 -0
- package/fesm2022/area8975-ui-loading.mjs.map +1 -0
- package/fesm2022/area8975-ui-modal-close-btn.mjs +89 -0
- package/fesm2022/area8975-ui-modal-close-btn.mjs.map +1 -0
- package/fesm2022/area8975-ui-modal.mjs +235 -0
- package/fesm2022/area8975-ui-modal.mjs.map +1 -0
- package/fesm2022/area8975-ui-money.mjs +230 -0
- package/fesm2022/area8975-ui-money.mjs.map +1 -0
- package/fesm2022/area8975-ui-overlay.mjs +317 -0
- package/fesm2022/area8975-ui-overlay.mjs.map +1 -0
- package/fesm2022/area8975-ui-pagination.mjs +152 -0
- package/fesm2022/area8975-ui-pagination.mjs.map +1 -0
- package/fesm2022/area8975-ui-private.mjs +63 -0
- package/fesm2022/area8975-ui-private.mjs.map +1 -0
- package/fesm2022/area8975-ui-progress.mjs +307 -0
- package/fesm2022/area8975-ui-progress.mjs.map +1 -0
- package/fesm2022/area8975-ui-radio.mjs +199 -0
- package/fesm2022/area8975-ui-radio.mjs.map +1 -0
- package/fesm2022/area8975-ui-rich-text-editor.mjs +778 -0
- package/fesm2022/area8975-ui-rich-text-editor.mjs.map +1 -0
- package/fesm2022/area8975-ui-search.mjs +266 -0
- package/fesm2022/area8975-ui-search.mjs.map +1 -0
- package/fesm2022/area8975-ui-segmented.mjs +118 -0
- package/fesm2022/area8975-ui-segmented.mjs.map +1 -0
- package/fesm2022/area8975-ui-select.mjs +926 -0
- package/fesm2022/area8975-ui-select.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar-group.mjs +60 -0
- package/fesm2022/area8975-ui-sidebar-group.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar-item.mjs +107 -0
- package/fesm2022/area8975-ui-sidebar-item.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar.mjs +109 -0
- package/fesm2022/area8975-ui-sidebar.mjs.map +1 -0
- package/fesm2022/area8975-ui-skeleton.mjs +116 -0
- package/fesm2022/area8975-ui-skeleton.mjs.map +1 -0
- package/fesm2022/area8975-ui-stat.mjs +55 -0
- package/fesm2022/area8975-ui-stat.mjs.map +1 -0
- package/fesm2022/area8975-ui-switch.mjs +132 -0
- package/fesm2022/area8975-ui-switch.mjs.map +1 -0
- package/fesm2022/area8975-ui-tab.mjs +217 -0
- package/fesm2022/area8975-ui-tab.mjs.map +1 -0
- package/fesm2022/area8975-ui-table-filters.mjs +499 -0
- package/fesm2022/area8975-ui-table-filters.mjs.map +1 -0
- package/fesm2022/area8975-ui-table.mjs +1237 -0
- package/fesm2022/area8975-ui-table.mjs.map +1 -0
- package/fesm2022/area8975-ui-textarea.mjs +375 -0
- package/fesm2022/area8975-ui-textarea.mjs.map +1 -0
- package/fesm2022/area8975-ui-theme.mjs +246 -0
- package/fesm2022/area8975-ui-theme.mjs.map +1 -0
- package/fesm2022/area8975-ui-time-select.mjs +170 -0
- package/fesm2022/area8975-ui-time-select.mjs.map +1 -0
- package/fesm2022/area8975-ui-toast.mjs +269 -0
- package/fesm2022/area8975-ui-toast.mjs.map +1 -0
- package/fesm2022/area8975-ui-toaster.mjs +117 -0
- package/fesm2022/area8975-ui-toaster.mjs.map +1 -0
- package/fesm2022/area8975-ui-tooltip.mjs +196 -0
- package/fesm2022/area8975-ui-tooltip.mjs.map +1 -0
- package/fesm2022/area8975-ui-user-menu.mjs +186 -0
- package/fesm2022/area8975-ui-user-menu.mjs.map +1 -0
- package/fesm2022/area8975-ui.mjs +0 -16520
- package/package.json +237 -1
- package/types/area8975-ui-alert.d.ts +25 -0
- package/types/area8975-ui-avatar.d.ts +40 -0
- package/types/area8975-ui-badge.d.ts +31 -0
- package/types/area8975-ui-button.d.ts +129 -0
- package/types/area8975-ui-calendar.d.ts +177 -0
- package/types/area8975-ui-card-header.d.ts +28 -0
- package/types/area8975-ui-card.d.ts +18 -0
- package/types/area8975-ui-chart-palette.d.ts +176 -0
- package/types/area8975-ui-charts.d.ts +747 -0
- package/types/area8975-ui-checkbox.d.ts +61 -0
- package/types/area8975-ui-colour.d.ts +31 -0
- package/types/area8975-ui-container.d.ts +5 -0
- package/types/area8975-ui-counter.d.ts +43 -0
- package/types/area8975-ui-date-range-picker.d.ts +132 -0
- package/types/area8975-ui-datepicker.d.ts +124 -0
- package/types/area8975-ui-disclosure.d.ts +79 -0
- package/types/area8975-ui-drawer.d.ts +25 -0
- package/types/area8975-ui-dropdown-button.d.ts +32 -0
- package/types/area8975-ui-dropdown-menu.d.ts +25 -0
- package/types/area8975-ui-dropdown.d.ts +56 -0
- package/types/area8975-ui-dropzone.d.ts +96 -0
- package/types/area8975-ui-field.d.ts +72 -0
- package/types/area8975-ui-file-input.d.ts +72 -0
- package/types/area8975-ui-file.d.ts +21 -0
- package/types/area8975-ui-format.d.ts +37 -0
- package/types/area8975-ui-input-addon.d.ts +10 -0
- package/types/area8975-ui-input-group.d.ts +18 -0
- package/types/area8975-ui-input.d.ts +224 -0
- package/types/area8975-ui-kpi.d.ts +36 -0
- package/types/area8975-ui-layout.d.ts +7 -0
- package/types/area8975-ui-loading.d.ts +16 -0
- package/types/area8975-ui-modal-close-btn.d.ts +14 -0
- package/types/area8975-ui-modal.d.ts +45 -0
- package/types/area8975-ui-money.d.ts +77 -0
- package/types/area8975-ui-overlay.d.ts +75 -0
- package/types/area8975-ui-pagination.d.ts +27 -0
- package/types/area8975-ui-private.d.ts +20 -0
- package/types/area8975-ui-progress.d.ts +127 -0
- package/types/area8975-ui-radio.d.ts +61 -0
- package/types/area8975-ui-rich-text-editor.d.ts +165 -0
- package/types/area8975-ui-search.d.ts +56 -0
- package/types/area8975-ui-segmented.d.ts +41 -0
- package/types/area8975-ui-select.d.ts +293 -0
- package/types/area8975-ui-sidebar-group.d.ts +15 -0
- package/types/area8975-ui-sidebar-item.d.ts +20 -0
- package/types/area8975-ui-sidebar.d.ts +16 -0
- package/types/area8975-ui-skeleton.d.ts +35 -0
- package/types/area8975-ui-stat.d.ts +13 -0
- package/types/area8975-ui-switch.d.ts +32 -0
- package/types/area8975-ui-tab.d.ts +45 -0
- package/types/area8975-ui-table-filters.d.ts +138 -0
- package/types/area8975-ui-table.d.ts +371 -0
- package/types/area8975-ui-textarea.d.ts +126 -0
- package/types/area8975-ui-theme.d.ts +61 -0
- package/types/area8975-ui-time-select.d.ts +35 -0
- package/types/area8975-ui-toast.d.ts +78 -0
- package/types/area8975-ui-toaster.d.ts +23 -0
- package/types/area8975-ui-tooltip.d.ts +47 -0
- package/types/area8975-ui-user-menu.d.ts +39 -0
- package/types/area8975-ui.d.ts +1 -4546
- package/fesm2022/area8975-ui.mjs.map +0 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, computed, input } from "@angular/core";
|
|
3
|
+
var UiProgressComponent = class UiProgressComponent {
|
|
4
|
+
value = input(0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
5
|
+
max = input(100, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
6
|
+
intent = input("primary", ...ngDevMode ? [{ debugName: "intent" }] : /* istanbul ignore next */ []);
|
|
7
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
8
|
+
shape = input("rounded", ...ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []);
|
|
9
|
+
orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
10
|
+
title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
11
|
+
labelPosition = input("none", ...ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []);
|
|
12
|
+
labelWith = input((value, max) => `${Math.round(value / max * 100)}%`, ...ngDevMode ? [{ debugName: "labelWith" }] : /* istanbul ignore next */ []);
|
|
13
|
+
steps = input(null, ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
|
|
14
|
+
segments = input(null, ...ngDevMode ? [{ debugName: "segments" }] : /* istanbul ignore next */ []);
|
|
15
|
+
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
16
|
+
isIndeterminate = computed(() => this.value() === null && !this.segments(), ...ngDevMode ? [{ debugName: "isIndeterminate" }] : /* istanbul ignore next */ []);
|
|
17
|
+
total = computed(() => {
|
|
18
|
+
const segments = this.segments();
|
|
19
|
+
return segments ? segments.reduce((sum, segment) => sum + segment.value, 0) : this.value() ?? 0;
|
|
20
|
+
}, ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
21
|
+
fillPercent = computed(() => this.clampPercent(this.total() / this.max() * 100), ...ngDevMode ? [{ debugName: "fillPercent" }] : /* istanbul ignore next */ []);
|
|
22
|
+
label = computed(() => this.isIndeterminate() ? "" : this.labelWith()(this.total(), this.max()), ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
23
|
+
segmentViews = computed(() => {
|
|
24
|
+
const segments = this.segments() ?? [];
|
|
25
|
+
let used = 0;
|
|
26
|
+
return segments.map((segment) => {
|
|
27
|
+
const percent = Math.min(this.clampPercent(segment.value / this.max() * 100), 100 - used);
|
|
28
|
+
used += percent;
|
|
29
|
+
return {
|
|
30
|
+
percent,
|
|
31
|
+
intent: segment.intent ?? this.intent(),
|
|
32
|
+
label: segment.label ?? this.labelWith()(segment.value, this.max())
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
}, ...ngDevMode ? [{ debugName: "segmentViews" }] : /* istanbul ignore next */ []);
|
|
36
|
+
stepStates = computed(() => {
|
|
37
|
+
const steps = Math.max(1, Math.floor(this.steps() ?? 1));
|
|
38
|
+
const filled = Math.round(this.fillPercent() / 100 * steps);
|
|
39
|
+
return Array.from({ length: steps }, (_, index) => index < filled);
|
|
40
|
+
}, ...ngDevMode ? [{ debugName: "stepStates" }] : /* istanbul ignore next */ []);
|
|
41
|
+
floatingOffset = computed(() => `clamp(0px, calc(${this.fillPercent()}% - 1.25rem), calc(100% - 2.5rem))`, ...ngDevMode ? [{ debugName: "floatingOffset" }] : /* istanbul ignore next */ []);
|
|
42
|
+
isVertical = computed(() => this.orientation() === "vertical", ...ngDevMode ? [{ debugName: "isVertical" }] : /* istanbul ignore next */ []);
|
|
43
|
+
rootClasses = computed(() => [
|
|
44
|
+
"ui-progress",
|
|
45
|
+
`ui-progress--${this.orientation()}`,
|
|
46
|
+
`ui-progress--${this.size()}`,
|
|
47
|
+
`ui-progress--${this.shape()}`,
|
|
48
|
+
this.labelPosition() === "inside" ? "ui-progress--label-inside" : ""
|
|
49
|
+
].filter(Boolean).join(" "), ...ngDevMode ? [{ debugName: "rootClasses" }] : /* istanbul ignore next */ []);
|
|
50
|
+
fillClasses(intent) {
|
|
51
|
+
return [
|
|
52
|
+
"ui-progress-fill",
|
|
53
|
+
`ui-progress-fill--${intent}`,
|
|
54
|
+
this.isIndeterminate() ? "ui-progress-fill--indeterminate" : ""
|
|
55
|
+
].filter(Boolean).join(" ");
|
|
56
|
+
}
|
|
57
|
+
clampPercent(percent) {
|
|
58
|
+
return Number.isFinite(percent) ? Math.min(100, Math.max(0, percent)) : 0;
|
|
59
|
+
}
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
61
|
+
minVersion: "12.0.0",
|
|
62
|
+
version: "22.2.1",
|
|
63
|
+
ngImport: i0,
|
|
64
|
+
type: UiProgressComponent,
|
|
65
|
+
deps: [],
|
|
66
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
67
|
+
});
|
|
68
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
69
|
+
minVersion: "17.0.0",
|
|
70
|
+
version: "22.2.1",
|
|
71
|
+
type: UiProgressComponent,
|
|
72
|
+
isStandalone: true,
|
|
73
|
+
selector: "ui-progress",
|
|
74
|
+
inputs: {
|
|
75
|
+
value: {
|
|
76
|
+
classPropertyName: "value",
|
|
77
|
+
publicName: "value",
|
|
78
|
+
isSignal: true,
|
|
79
|
+
isRequired: false,
|
|
80
|
+
transformFunction: null
|
|
81
|
+
},
|
|
82
|
+
max: {
|
|
83
|
+
classPropertyName: "max",
|
|
84
|
+
publicName: "max",
|
|
85
|
+
isSignal: true,
|
|
86
|
+
isRequired: false,
|
|
87
|
+
transformFunction: null
|
|
88
|
+
},
|
|
89
|
+
intent: {
|
|
90
|
+
classPropertyName: "intent",
|
|
91
|
+
publicName: "intent",
|
|
92
|
+
isSignal: true,
|
|
93
|
+
isRequired: false,
|
|
94
|
+
transformFunction: null
|
|
95
|
+
},
|
|
96
|
+
size: {
|
|
97
|
+
classPropertyName: "size",
|
|
98
|
+
publicName: "size",
|
|
99
|
+
isSignal: true,
|
|
100
|
+
isRequired: false,
|
|
101
|
+
transformFunction: null
|
|
102
|
+
},
|
|
103
|
+
shape: {
|
|
104
|
+
classPropertyName: "shape",
|
|
105
|
+
publicName: "shape",
|
|
106
|
+
isSignal: true,
|
|
107
|
+
isRequired: false,
|
|
108
|
+
transformFunction: null
|
|
109
|
+
},
|
|
110
|
+
orientation: {
|
|
111
|
+
classPropertyName: "orientation",
|
|
112
|
+
publicName: "orientation",
|
|
113
|
+
isSignal: true,
|
|
114
|
+
isRequired: false,
|
|
115
|
+
transformFunction: null
|
|
116
|
+
},
|
|
117
|
+
title: {
|
|
118
|
+
classPropertyName: "title",
|
|
119
|
+
publicName: "title",
|
|
120
|
+
isSignal: true,
|
|
121
|
+
isRequired: false,
|
|
122
|
+
transformFunction: null
|
|
123
|
+
},
|
|
124
|
+
labelPosition: {
|
|
125
|
+
classPropertyName: "labelPosition",
|
|
126
|
+
publicName: "labelPosition",
|
|
127
|
+
isSignal: true,
|
|
128
|
+
isRequired: false,
|
|
129
|
+
transformFunction: null
|
|
130
|
+
},
|
|
131
|
+
labelWith: {
|
|
132
|
+
classPropertyName: "labelWith",
|
|
133
|
+
publicName: "labelWith",
|
|
134
|
+
isSignal: true,
|
|
135
|
+
isRequired: false,
|
|
136
|
+
transformFunction: null
|
|
137
|
+
},
|
|
138
|
+
steps: {
|
|
139
|
+
classPropertyName: "steps",
|
|
140
|
+
publicName: "steps",
|
|
141
|
+
isSignal: true,
|
|
142
|
+
isRequired: false,
|
|
143
|
+
transformFunction: null
|
|
144
|
+
},
|
|
145
|
+
segments: {
|
|
146
|
+
classPropertyName: "segments",
|
|
147
|
+
publicName: "segments",
|
|
148
|
+
isSignal: true,
|
|
149
|
+
isRequired: false,
|
|
150
|
+
transformFunction: null
|
|
151
|
+
},
|
|
152
|
+
ariaLabel: {
|
|
153
|
+
classPropertyName: "ariaLabel",
|
|
154
|
+
publicName: "ariaLabel",
|
|
155
|
+
isSignal: true,
|
|
156
|
+
isRequired: false,
|
|
157
|
+
transformFunction: null
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
host: { properties: { "class.ui-progress-host--vertical": "orientation() === \"vertical\"" } },
|
|
161
|
+
ngImport: i0,
|
|
162
|
+
template: "<div [class]=\"rootClasses()\">\n @if (title() || labelPosition() === 'top') {\n <div class=\"ui-progress-header\">\n <span class=\"text-foreground ui-text-body-alt\">{{ title() }}</span>\n\n @if (labelPosition() === 'top') {\n <span class=\"text-foreground ui-text-body-alt\">{{ label() }}</span>\n }\n </div>\n }\n\n @if (labelPosition() === 'floating' && !isIndeterminate() && !isVertical()) {\n <div class=\"ui-progress-floating-row\" aria-hidden=\"true\">\n <span\n class=\"ui-progress-floating ui-text-caption\"\n [class]=\"'ui-progress-floating--' + intent()\"\n [style.margin-inline-start]=\"floatingOffset()\"\n >\n {{ label() }}\n </span>\n </div>\n }\n\n <div class=\"ui-progress-row\">\n <div\n class=\"ui-progress-track\"\n [class.ui-progress-track--steps]=\"steps()\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"isIndeterminate() ? null : total()\"\n [attr.aria-valuetext]=\"label() || null\"\n [attr.aria-label]=\"ariaLabel() || title() || null\"\n >\n @if (steps()) {\n @for (filled of stepStates(); track $index) {\n <span\n class=\"ui-progress-step\"\n [class]=\"filled ? 'ui-progress-fill--' + intent() : ''\"\n ></span>\n }\n } @else if (segments()) {\n @for (segment of segmentViews(); track $index) {\n <span\n [class]=\"fillClasses(segment.intent)\"\n [style.width.%]=\"isVertical() ? null : segment.percent\"\n [style.height.%]=\"isVertical() ? segment.percent : null\"\n [attr.title]=\"segment.label\"\n >\n @if (labelPosition() === 'inside') {\n <span class=\"ui-progress-inside-label ui-text-caption\">{{ segment.label }}</span>\n }\n </span>\n }\n } @else {\n <span\n [class]=\"fillClasses(intent())\"\n [style.width.%]=\"isVertical() || isIndeterminate() ? null : fillPercent()\"\n [style.height.%]=\"isVertical() && !isIndeterminate() ? fillPercent() : null\"\n >\n @if (labelPosition() === 'inside' && !isIndeterminate()) {\n <span class=\"ui-progress-inside-label ui-text-caption\">{{ label() }}</span>\n }\n </span>\n }\n </div>\n\n @if (labelPosition() === 'end' && !isIndeterminate()) {\n <span class=\"ui-progress-end text-foreground ui-text-body-alt\">{{ label() }}</span>\n }\n </div>\n</div>\n",
|
|
163
|
+
styles: ["@layer properties;:host{display:block}:host(.ui-progress-host--vertical){display:inline-flex;min-height:calc(var(--spacing, .25rem) * 32);flex-direction:column}.ui-progress{display:flex;flex-direction:column;row-gap:calc(var(--spacing, .25rem) * 2)}.ui-progress--vertical{flex:1;align-items:center}.ui-progress-header{display:flex;align-items:center;justify-content:space-between;column-gap:calc(var(--spacing, .25rem) * 3)}.ui-progress-row{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 3)}.ui-progress--vertical .ui-progress-row{flex:1;flex-direction:column;row-gap:calc(var(--spacing, .25rem) * 2)}.ui-progress-end{min-width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;text-align:end;--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ui-progress-track{position:relative;display:flex;width:100%;overflow:hidden;background-color:var(--surface-1)}.ui-progress--vertical .ui-progress-track{width:auto;flex:1;flex-direction:column;justify-content:flex-end}.ui-progress--sm .ui-progress-track{height:var(--spacing, .25rem)}.ui-progress--md .ui-progress-track{height:calc(var(--spacing, .25rem) * 1.5)}.ui-progress--lg .ui-progress-track{height:calc(var(--spacing, .25rem) * 2.5)}.ui-progress--xl .ui-progress-track{height:calc(var(--spacing, .25rem) * 4)}.ui-progress--vertical.ui-progress--sm .ui-progress-track{height:auto;width:var(--spacing, .25rem)}.ui-progress--vertical.ui-progress--md .ui-progress-track{height:auto;width:calc(var(--spacing, .25rem) * 1.5)}.ui-progress--vertical.ui-progress--lg .ui-progress-track{height:auto;width:calc(var(--spacing, .25rem) * 2.5)}.ui-progress--vertical.ui-progress--xl .ui-progress-track{height:auto;width:calc(var(--spacing, .25rem) * 4)}.ui-progress--label-inside .ui-progress-track{min-height:calc(var(--spacing, .25rem) * 4)}.ui-progress-fill{display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;transition-property:width,height;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .5s;transition-duration:.5s}.ui-progress-inside-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:calc(var(--spacing, .25rem) * 1.5);text-align:center;color:var(--color-white, #fff)}.ui-progress--rounded .ui-progress-track,.ui-progress--rounded .ui-progress-fill:only-child,.ui-progress--rounded .ui-progress-step,.ui-progress--straight .ui-progress-fill,.ui-progress--straight .ui-progress-step{border-radius:var(--radius-full, calc(infinity * 1px))}.ui-progress--straight .ui-progress-fill:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.ui-progress--straight .ui-progress-fill:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.ui-progress-track--steps{column-gap:var(--spacing, .25rem);background-color:transparent}.ui-progress--vertical .ui-progress-track--steps{flex-direction:column-reverse;row-gap:var(--spacing, .25rem)}.ui-progress-step{flex:1;background-color:var(--surface-1)}.ui-progress-fill--primary{background-color:var(--color-primary-600, var(--color-blue-600))}.ui-progress-fill--secondary{background-color:var(--color-secondary-600, var(--color-gray-600))}.ui-progress-fill--success{background-color:var(--color-success-600, var(--color-teal-600))}.ui-progress-fill--warning{background-color:var(--color-warning-500, var(--color-yellow-500))}.ui-progress-fill--danger{background-color:var(--color-danger-600, var(--color-red-600))}.ui-progress-floating-row{display:flex}.ui-progress-floating{display:inline-block;border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;padding-inline:calc(var(--spacing, .25rem) * 1.5);padding-block:calc(var(--spacing, .25rem) * .5);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);transition-property:margin;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .5s;transition-duration:.5s}.ui-progress-floating--primary{border-color:var(--color-primary-200, var(--color-blue-200));background-color:var(--color-primary-50, var(--color-blue-50));color:var(--color-primary-600, var(--color-blue-600))}.ui-progress-floating--secondary{border-color:var(--color-secondary-200, var(--color-gray-200));background-color:var(--color-secondary-50, var(--color-gray-50));color:var(--color-secondary-600, var(--color-gray-600))}.ui-progress-floating--success{border-color:var(--color-success-200, var(--color-teal-200));background-color:var(--color-success-50, var(--color-teal-50));color:var(--color-success-600, var(--color-teal-600))}.ui-progress-floating--warning{border-color:var(--color-warning-200, var(--color-yellow-200));background-color:var(--color-warning-50, var(--color-yellow-50));color:var(--color-warning-600, var(--color-yellow-600))}.ui-progress-floating--danger{border-color:var(--color-danger-200, var(--color-red-200));background-color:var(--color-danger-50, var(--color-red-50));color:var(--color-danger-600, var(--color-red-600))}.ui-progress-fill--indeterminate{width:40%}.ui-progress--vertical .ui-progress-fill--indeterminate{height:40%;width:auto}@media(prefers-reduced-motion:no-preference){.ui-progress-fill--indeterminate{animation:ui-progress-slide 1.4s ease-in-out infinite}.ui-progress--vertical .ui-progress-fill--indeterminate{animation-name:ui-progress-slide-up}}@keyframes ui-progress-slide{0%{transform:translate(-100%)}to{transform:translate(250%)}}@keyframes ui-progress-slide-up{0%{transform:translateY(100%)}to{transform:translateY(-250%)}}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial;--tw-duration: initial;--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
167
|
+
minVersion: "12.0.0",
|
|
168
|
+
version: "22.2.1",
|
|
169
|
+
ngImport: i0,
|
|
170
|
+
type: UiProgressComponent,
|
|
171
|
+
decorators: [{
|
|
172
|
+
type: Component,
|
|
173
|
+
args: [{
|
|
174
|
+
selector: "ui-progress",
|
|
175
|
+
host: { "[class.ui-progress-host--vertical]": "orientation() === \"vertical\"" },
|
|
176
|
+
template: "<div [class]=\"rootClasses()\">\n @if (title() || labelPosition() === 'top') {\n <div class=\"ui-progress-header\">\n <span class=\"text-foreground ui-text-body-alt\">{{ title() }}</span>\n\n @if (labelPosition() === 'top') {\n <span class=\"text-foreground ui-text-body-alt\">{{ label() }}</span>\n }\n </div>\n }\n\n @if (labelPosition() === 'floating' && !isIndeterminate() && !isVertical()) {\n <div class=\"ui-progress-floating-row\" aria-hidden=\"true\">\n <span\n class=\"ui-progress-floating ui-text-caption\"\n [class]=\"'ui-progress-floating--' + intent()\"\n [style.margin-inline-start]=\"floatingOffset()\"\n >\n {{ label() }}\n </span>\n </div>\n }\n\n <div class=\"ui-progress-row\">\n <div\n class=\"ui-progress-track\"\n [class.ui-progress-track--steps]=\"steps()\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"isIndeterminate() ? null : total()\"\n [attr.aria-valuetext]=\"label() || null\"\n [attr.aria-label]=\"ariaLabel() || title() || null\"\n >\n @if (steps()) {\n @for (filled of stepStates(); track $index) {\n <span\n class=\"ui-progress-step\"\n [class]=\"filled ? 'ui-progress-fill--' + intent() : ''\"\n ></span>\n }\n } @else if (segments()) {\n @for (segment of segmentViews(); track $index) {\n <span\n [class]=\"fillClasses(segment.intent)\"\n [style.width.%]=\"isVertical() ? null : segment.percent\"\n [style.height.%]=\"isVertical() ? segment.percent : null\"\n [attr.title]=\"segment.label\"\n >\n @if (labelPosition() === 'inside') {\n <span class=\"ui-progress-inside-label ui-text-caption\">{{ segment.label }}</span>\n }\n </span>\n }\n } @else {\n <span\n [class]=\"fillClasses(intent())\"\n [style.width.%]=\"isVertical() || isIndeterminate() ? null : fillPercent()\"\n [style.height.%]=\"isVertical() && !isIndeterminate() ? fillPercent() : null\"\n >\n @if (labelPosition() === 'inside' && !isIndeterminate()) {\n <span class=\"ui-progress-inside-label ui-text-caption\">{{ label() }}</span>\n }\n </span>\n }\n </div>\n\n @if (labelPosition() === 'end' && !isIndeterminate()) {\n <span class=\"ui-progress-end text-foreground ui-text-body-alt\">{{ label() }}</span>\n }\n </div>\n</div>\n",
|
|
177
|
+
styles: ["@layer properties;:host{display:block}:host(.ui-progress-host--vertical){display:inline-flex;min-height:calc(var(--spacing, .25rem) * 32);flex-direction:column}.ui-progress{display:flex;flex-direction:column;row-gap:calc(var(--spacing, .25rem) * 2)}.ui-progress--vertical{flex:1;align-items:center}.ui-progress-header{display:flex;align-items:center;justify-content:space-between;column-gap:calc(var(--spacing, .25rem) * 3)}.ui-progress-row{display:flex;align-items:center;column-gap:calc(var(--spacing, .25rem) * 3)}.ui-progress--vertical .ui-progress-row{flex:1;flex-direction:column;row-gap:calc(var(--spacing, .25rem) * 2)}.ui-progress-end{min-width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;text-align:end;--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ui-progress-track{position:relative;display:flex;width:100%;overflow:hidden;background-color:var(--surface-1)}.ui-progress--vertical .ui-progress-track{width:auto;flex:1;flex-direction:column;justify-content:flex-end}.ui-progress--sm .ui-progress-track{height:var(--spacing, .25rem)}.ui-progress--md .ui-progress-track{height:calc(var(--spacing, .25rem) * 1.5)}.ui-progress--lg .ui-progress-track{height:calc(var(--spacing, .25rem) * 2.5)}.ui-progress--xl .ui-progress-track{height:calc(var(--spacing, .25rem) * 4)}.ui-progress--vertical.ui-progress--sm .ui-progress-track{height:auto;width:var(--spacing, .25rem)}.ui-progress--vertical.ui-progress--md .ui-progress-track{height:auto;width:calc(var(--spacing, .25rem) * 1.5)}.ui-progress--vertical.ui-progress--lg .ui-progress-track{height:auto;width:calc(var(--spacing, .25rem) * 2.5)}.ui-progress--vertical.ui-progress--xl .ui-progress-track{height:auto;width:calc(var(--spacing, .25rem) * 4)}.ui-progress--label-inside .ui-progress-track{min-height:calc(var(--spacing, .25rem) * 4)}.ui-progress-fill{display:flex;flex-direction:column;justify-content:center;overflow:hidden;white-space:nowrap;transition-property:width,height;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .5s;transition-duration:.5s}.ui-progress-inside-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:calc(var(--spacing, .25rem) * 1.5);text-align:center;color:var(--color-white, #fff)}.ui-progress--rounded .ui-progress-track,.ui-progress--rounded .ui-progress-fill:only-child,.ui-progress--rounded .ui-progress-step,.ui-progress--straight .ui-progress-fill,.ui-progress--straight .ui-progress-step{border-radius:var(--radius-full, calc(infinity * 1px))}.ui-progress--straight .ui-progress-fill:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.ui-progress--straight .ui-progress-fill:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.ui-progress-track--steps{column-gap:var(--spacing, .25rem);background-color:transparent}.ui-progress--vertical .ui-progress-track--steps{flex-direction:column-reverse;row-gap:var(--spacing, .25rem)}.ui-progress-step{flex:1;background-color:var(--surface-1)}.ui-progress-fill--primary{background-color:var(--color-primary-600, var(--color-blue-600))}.ui-progress-fill--secondary{background-color:var(--color-secondary-600, var(--color-gray-600))}.ui-progress-fill--success{background-color:var(--color-success-600, var(--color-teal-600))}.ui-progress-fill--warning{background-color:var(--color-warning-500, var(--color-yellow-500))}.ui-progress-fill--danger{background-color:var(--color-danger-600, var(--color-red-600))}.ui-progress-floating-row{display:flex}.ui-progress-floating{display:inline-block;border-radius:var(--radius-lg, .5rem);border-style:var(--tw-border-style);border-width:1px;padding-inline:calc(var(--spacing, .25rem) * 1.5);padding-block:calc(var(--spacing, .25rem) * .5);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);transition-property:margin;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .5s;transition-duration:.5s}.ui-progress-floating--primary{border-color:var(--color-primary-200, var(--color-blue-200));background-color:var(--color-primary-50, var(--color-blue-50));color:var(--color-primary-600, var(--color-blue-600))}.ui-progress-floating--secondary{border-color:var(--color-secondary-200, var(--color-gray-200));background-color:var(--color-secondary-50, var(--color-gray-50));color:var(--color-secondary-600, var(--color-gray-600))}.ui-progress-floating--success{border-color:var(--color-success-200, var(--color-teal-200));background-color:var(--color-success-50, var(--color-teal-50));color:var(--color-success-600, var(--color-teal-600))}.ui-progress-floating--warning{border-color:var(--color-warning-200, var(--color-yellow-200));background-color:var(--color-warning-50, var(--color-yellow-50));color:var(--color-warning-600, var(--color-yellow-600))}.ui-progress-floating--danger{border-color:var(--color-danger-200, var(--color-red-200));background-color:var(--color-danger-50, var(--color-red-50));color:var(--color-danger-600, var(--color-red-600))}.ui-progress-fill--indeterminate{width:40%}.ui-progress--vertical .ui-progress-fill--indeterminate{height:40%;width:auto}@media(prefers-reduced-motion:no-preference){.ui-progress-fill--indeterminate{animation:ui-progress-slide 1.4s ease-in-out infinite}.ui-progress--vertical .ui-progress-fill--indeterminate{animation-name:ui-progress-slide-up}}@keyframes ui-progress-slide{0%{transform:translate(-100%)}to{transform:translate(250%)}}@keyframes ui-progress-slide-up{0%{transform:translateY(100%)}to{transform:translateY(-250%)}}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial;--tw-duration: initial;--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
178
|
+
}]
|
|
179
|
+
}],
|
|
180
|
+
propDecorators: {
|
|
181
|
+
value: [{
|
|
182
|
+
type: i0.Input,
|
|
183
|
+
args: [{
|
|
184
|
+
isSignal: true,
|
|
185
|
+
alias: "value",
|
|
186
|
+
required: false
|
|
187
|
+
}]
|
|
188
|
+
}],
|
|
189
|
+
max: [{
|
|
190
|
+
type: i0.Input,
|
|
191
|
+
args: [{
|
|
192
|
+
isSignal: true,
|
|
193
|
+
alias: "max",
|
|
194
|
+
required: false
|
|
195
|
+
}]
|
|
196
|
+
}],
|
|
197
|
+
intent: [{
|
|
198
|
+
type: i0.Input,
|
|
199
|
+
args: [{
|
|
200
|
+
isSignal: true,
|
|
201
|
+
alias: "intent",
|
|
202
|
+
required: false
|
|
203
|
+
}]
|
|
204
|
+
}],
|
|
205
|
+
size: [{
|
|
206
|
+
type: i0.Input,
|
|
207
|
+
args: [{
|
|
208
|
+
isSignal: true,
|
|
209
|
+
alias: "size",
|
|
210
|
+
required: false
|
|
211
|
+
}]
|
|
212
|
+
}],
|
|
213
|
+
shape: [{
|
|
214
|
+
type: i0.Input,
|
|
215
|
+
args: [{
|
|
216
|
+
isSignal: true,
|
|
217
|
+
alias: "shape",
|
|
218
|
+
required: false
|
|
219
|
+
}]
|
|
220
|
+
}],
|
|
221
|
+
orientation: [{
|
|
222
|
+
type: i0.Input,
|
|
223
|
+
args: [{
|
|
224
|
+
isSignal: true,
|
|
225
|
+
alias: "orientation",
|
|
226
|
+
required: false
|
|
227
|
+
}]
|
|
228
|
+
}],
|
|
229
|
+
title: [{
|
|
230
|
+
type: i0.Input,
|
|
231
|
+
args: [{
|
|
232
|
+
isSignal: true,
|
|
233
|
+
alias: "title",
|
|
234
|
+
required: false
|
|
235
|
+
}]
|
|
236
|
+
}],
|
|
237
|
+
labelPosition: [{
|
|
238
|
+
type: i0.Input,
|
|
239
|
+
args: [{
|
|
240
|
+
isSignal: true,
|
|
241
|
+
alias: "labelPosition",
|
|
242
|
+
required: false
|
|
243
|
+
}]
|
|
244
|
+
}],
|
|
245
|
+
labelWith: [{
|
|
246
|
+
type: i0.Input,
|
|
247
|
+
args: [{
|
|
248
|
+
isSignal: true,
|
|
249
|
+
alias: "labelWith",
|
|
250
|
+
required: false
|
|
251
|
+
}]
|
|
252
|
+
}],
|
|
253
|
+
steps: [{
|
|
254
|
+
type: i0.Input,
|
|
255
|
+
args: [{
|
|
256
|
+
isSignal: true,
|
|
257
|
+
alias: "steps",
|
|
258
|
+
required: false
|
|
259
|
+
}]
|
|
260
|
+
}],
|
|
261
|
+
segments: [{
|
|
262
|
+
type: i0.Input,
|
|
263
|
+
args: [{
|
|
264
|
+
isSignal: true,
|
|
265
|
+
alias: "segments",
|
|
266
|
+
required: false
|
|
267
|
+
}]
|
|
268
|
+
}],
|
|
269
|
+
ariaLabel: [{
|
|
270
|
+
type: i0.Input,
|
|
271
|
+
args: [{
|
|
272
|
+
isSignal: true,
|
|
273
|
+
alias: "ariaLabel",
|
|
274
|
+
required: false
|
|
275
|
+
}]
|
|
276
|
+
}]
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
const ProgressIntents = [
|
|
280
|
+
"primary",
|
|
281
|
+
"secondary",
|
|
282
|
+
"success",
|
|
283
|
+
"warning",
|
|
284
|
+
"danger"
|
|
285
|
+
];
|
|
286
|
+
const ProgressSizes = [
|
|
287
|
+
"sm",
|
|
288
|
+
"md",
|
|
289
|
+
"lg",
|
|
290
|
+
"xl"
|
|
291
|
+
];
|
|
292
|
+
const ProgressLabelPositions = [
|
|
293
|
+
"none",
|
|
294
|
+
"inside",
|
|
295
|
+
"end",
|
|
296
|
+
"top",
|
|
297
|
+
"floating"
|
|
298
|
+
];
|
|
299
|
+
const ProgressShapes = [
|
|
300
|
+
"rounded",
|
|
301
|
+
"square",
|
|
302
|
+
"straight"
|
|
303
|
+
];
|
|
304
|
+
const ProgressOrientations = ["horizontal", "vertical"];
|
|
305
|
+
export { ProgressIntents, ProgressLabelPositions, ProgressOrientations, ProgressShapes, ProgressSizes, UiProgressComponent };
|
|
306
|
+
|
|
307
|
+
//# sourceMappingURL=area8975-ui-progress.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area8975-ui-progress.mjs","names":[],"sources":["../../../projects/ui/progress/progress.component.ts","../../../projects/ui/progress/progress.component.html","../../../projects/ui/progress/progress.types.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\n\nimport type {\n ProgressIntent,\n ProgressLabelPosition,\n ProgressOrientation,\n ProgressSegment,\n ProgressShape,\n ProgressSize\n} from './progress.types';\n\n\ninterface SegmentView {\n percent: number;\n intent: ProgressIntent;\n label: string;\n}\n\n/**\n * A progress bar. Leave `value` null for work of unknown length, a value over\n * `max` fills the bar but the label still shows the real amount.\n */\n@Component({\n selector: 'ui-progress',\n templateUrl: './progress.component.html',\n styleUrl: './progress.component.css',\n host: {\n '[class.ui-progress-host--vertical]': 'orientation() === \"vertical\"'\n }\n})\nexport class UiProgressComponent {\n readonly value = input<number | null>(0);\n readonly max = input<number>(100);\n\n readonly intent = input<ProgressIntent>('primary');\n readonly size = input<ProgressSize>('md');\n readonly shape = input<ProgressShape>('rounded');\n readonly orientation = input<ProgressOrientation>('horizontal');\n\n readonly title = input<string>('');\n readonly labelPosition = input<ProgressLabelPosition>('none');\n readonly labelWith = input<(value: number, max: number) => string>(\n (value, max) => `${Math.round(value / max * 100)}%`\n );\n\n /** Splits the bar into this many blocks. */\n readonly steps = input<number | null>(null);\n\n /** Several fills stacked in one track, each with its own colour. */\n readonly segments = input<ProgressSegment[] | null>(null);\n\n /** Needed when there's no visible title. */\n readonly ariaLabel = input<string>('');\n\n protected readonly isIndeterminate = computed(() => this.value() === null && !this.segments());\n\n protected readonly total = computed(() => {\n const segments = this.segments();\n\n return segments\n ? segments.reduce((sum, segment) => sum + segment.value, 0)\n : this.value() ?? 0;\n });\n\n /** 0 to 100, what the bar actually draws. */\n protected readonly fillPercent = computed(() =>\n this.clampPercent(this.total() / this.max() * 100)\n );\n\n protected readonly label = computed(() =>\n this.isIndeterminate() ? '' : this.labelWith()(this.total(), this.max())\n );\n\n protected readonly segmentViews = computed<SegmentView[]>(() => {\n const segments = this.segments() ?? [];\n let used = 0;\n\n // later segments get squeezed once the track is full\n return segments.map(segment => {\n const percent = Math.min(this.clampPercent(segment.value / this.max() * 100), 100 - used);\n\n used += percent;\n\n return {\n percent,\n intent: segment.intent ?? this.intent(),\n label: segment.label ?? this.labelWith()(segment.value, this.max())\n };\n });\n });\n\n protected readonly stepStates = computed(() => {\n const steps = Math.max(1, Math.floor(this.steps() ?? 1));\n const filled = Math.round(this.fillPercent() / 100 * steps);\n\n return Array.from({ length: steps }, (_, index) => index < filled);\n });\n\n // keeps the floating label over the end of the fill without spilling off either side\n protected readonly floatingOffset = computed(() =>\n `clamp(0px, calc(${this.fillPercent()}% - 1.25rem), calc(100% - 2.5rem))`\n );\n\n protected readonly isVertical = computed(() => this.orientation() === 'vertical');\n\n protected readonly rootClasses = computed(() =>\n [\n 'ui-progress',\n `ui-progress--${this.orientation()}`,\n `ui-progress--${this.size()}`,\n `ui-progress--${this.shape()}`,\n this.labelPosition() === 'inside' ? 'ui-progress--label-inside' : ''\n ]\n .filter(Boolean)\n .join(' ')\n );\n\n protected fillClasses(intent: ProgressIntent): string {\n return [\n 'ui-progress-fill',\n `ui-progress-fill--${intent}`,\n this.isIndeterminate() ? 'ui-progress-fill--indeterminate' : ''\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n private clampPercent(percent: number): number {\n return Number.isFinite(percent) ? Math.min(100, Math.max(0, percent)) : 0;\n }\n}\n","<div [class]=\"rootClasses()\">\n @if (title() || labelPosition() === 'top') {\n <div class=\"ui-progress-header\">\n <span class=\"text-foreground ui-text-body-alt\">{{ title() }}</span>\n\n @if (labelPosition() === 'top') {\n <span class=\"text-foreground ui-text-body-alt\">{{ label() }}</span>\n }\n </div>\n }\n\n @if (labelPosition() === 'floating' && !isIndeterminate() && !isVertical()) {\n <div class=\"ui-progress-floating-row\" aria-hidden=\"true\">\n <span\n class=\"ui-progress-floating ui-text-caption\"\n [class]=\"'ui-progress-floating--' + intent()\"\n [style.margin-inline-start]=\"floatingOffset()\"\n >\n {{ label() }}\n </span>\n </div>\n }\n\n <div class=\"ui-progress-row\">\n <div\n class=\"ui-progress-track\"\n [class.ui-progress-track--steps]=\"steps()\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"isIndeterminate() ? null : total()\"\n [attr.aria-valuetext]=\"label() || null\"\n [attr.aria-label]=\"ariaLabel() || title() || null\"\n >\n @if (steps()) {\n @for (filled of stepStates(); track $index) {\n <span\n class=\"ui-progress-step\"\n [class]=\"filled ? 'ui-progress-fill--' + intent() : ''\"\n ></span>\n }\n } @else if (segments()) {\n @for (segment of segmentViews(); track $index) {\n <span\n [class]=\"fillClasses(segment.intent)\"\n [style.width.%]=\"isVertical() ? null : segment.percent\"\n [style.height.%]=\"isVertical() ? segment.percent : null\"\n [attr.title]=\"segment.label\"\n >\n @if (labelPosition() === 'inside') {\n <span class=\"ui-progress-inside-label ui-text-caption\">{{ segment.label }}</span>\n }\n </span>\n }\n } @else {\n <span\n [class]=\"fillClasses(intent())\"\n [style.width.%]=\"isVertical() || isIndeterminate() ? null : fillPercent()\"\n [style.height.%]=\"isVertical() && !isIndeterminate() ? fillPercent() : null\"\n >\n @if (labelPosition() === 'inside' && !isIndeterminate()) {\n <span class=\"ui-progress-inside-label ui-text-caption\">{{ label() }}</span>\n }\n </span>\n }\n </div>\n\n @if (labelPosition() === 'end' && !isIndeterminate()) {\n <span class=\"ui-progress-end text-foreground ui-text-body-alt\">{{ label() }}</span>\n }\n </div>\n</div>\n","/** Same names as badges, so a status reads the same wherever it shows. */\nexport const ProgressIntents = [\n 'primary',\n 'secondary',\n 'success',\n 'warning',\n 'danger'\n] as const;\n\n/** @see {@link ProgressIntents} */\nexport type ProgressIntent = typeof ProgressIntents[number];\n\n/** Track thickness, md matches Preline's default and xl fits a label inside. */\nexport const ProgressSizes = ['sm', 'md', 'lg', 'xl'] as const;\n\n/** @see {@link ProgressSizes} */\nexport type ProgressSize = typeof ProgressSizes[number];\n\n/** Where the value label goes, if anywhere. */\nexport const ProgressLabelPositions = ['none', 'inside', 'end', 'top', 'floating'] as const;\n\n/** @see {@link ProgressLabelPositions} */\nexport type ProgressLabelPosition = typeof ProgressLabelPositions[number];\n\n/** rounded: both ends round, square: no rounding, straight: square track with a round fill. */\nexport const ProgressShapes = ['rounded', 'square', 'straight'] as const;\n\n/** @see {@link ProgressShapes} */\nexport type ProgressShape = typeof ProgressShapes[number];\n\nexport const ProgressOrientations = ['horizontal', 'vertical'] as const;\n\n/** @see {@link ProgressOrientations} */\nexport type ProgressOrientation = typeof ProgressOrientations[number];\n\n/** One part of a stacked bar, e.g. spending in one category. */\nexport interface ProgressSegment {\n value: number;\n intent?: ProgressIntent;\n label?: string;\n}\n"],"mappings":";;AA8BA,IAAa,sBAAb,MAAa,oBAAmB;CACnB,QAAQ,MAAqB,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,MAAM,MAAc,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;CAExB,SAAS,MAAsB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACzC,OAAO,MAAoB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,QAAQ,MAAqB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,cAAc,MAA2B,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAEtD,QAA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,mBAAA;GAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,MAAA,EAAA,YAAA,EAAA,oCAAA,iCAAA,EAAA;EAAA,UAAA;EAAA,UC9BhC;EAwEA,QAAA,CAAA,s5NAAA;CAAA,CAAA;;AD1Ca,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAR/B,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAa,MAGjB,EACF,sCAAsC,iCACzC;GAAA,UAAA;GAAA,QAAA,CAAA,s5NAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AE3BL,MAAa,kBAAkB;CAC3B;CACA;CACA;CACA;CACA;AACM;AAMV,MAAa,gBAAgB;CAAC;CAAM;CAAM;CAAM;AAAI;AAMpD,MAAa,yBAAyB;CAAC;CAAQ;CAAU;CAAO;CAAO;AAAU;AAMjF,MAAa,iBAAiB;CAAC;CAAW;CAAU;AAAU;AAK9D,MAAa,uBAAuB,CAAC,cAAc,UAAU"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, booleanAttribute, computed, input, model } from "@angular/core";
|
|
3
|
+
var UiRadioComponent = class UiRadioComponent {
|
|
4
|
+
value = model.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
5
|
+
option = input.required(...ngDevMode ? [{ debugName: "option" }] : /* istanbul ignore next */ []);
|
|
6
|
+
id = input("", ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
|
|
7
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
8
|
+
required = input(false, {
|
|
9
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
10
|
+
transform: booleanAttribute
|
|
11
|
+
});
|
|
12
|
+
disabled = input(false, {
|
|
13
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
14
|
+
transform: booleanAttribute
|
|
15
|
+
});
|
|
16
|
+
validationState = model(null, ...ngDevMode ? [{ debugName: "validationState" }] : /* istanbul ignore next */ []);
|
|
17
|
+
compareWith = input((a, b) => a === b, ...ngDevMode ? [{ debugName: "compareWith" }] : /* istanbul ignore next */ []);
|
|
18
|
+
checked = computed(() => this.compareWith()(this.value(), this.option()), ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
|
|
19
|
+
select() {
|
|
20
|
+
this.value.set(this.option());
|
|
21
|
+
}
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.2.1",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: UiRadioComponent,
|
|
27
|
+
deps: [],
|
|
28
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
29
|
+
});
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
|
+
minVersion: "17.1.0",
|
|
32
|
+
version: "22.2.1",
|
|
33
|
+
type: UiRadioComponent,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
selector: "ui-radio",
|
|
36
|
+
inputs: {
|
|
37
|
+
value: {
|
|
38
|
+
classPropertyName: "value",
|
|
39
|
+
publicName: "value",
|
|
40
|
+
isSignal: true,
|
|
41
|
+
isRequired: true,
|
|
42
|
+
transformFunction: null
|
|
43
|
+
},
|
|
44
|
+
option: {
|
|
45
|
+
classPropertyName: "option",
|
|
46
|
+
publicName: "option",
|
|
47
|
+
isSignal: true,
|
|
48
|
+
isRequired: true,
|
|
49
|
+
transformFunction: null
|
|
50
|
+
},
|
|
51
|
+
id: {
|
|
52
|
+
classPropertyName: "id",
|
|
53
|
+
publicName: "id",
|
|
54
|
+
isSignal: true,
|
|
55
|
+
isRequired: false,
|
|
56
|
+
transformFunction: null
|
|
57
|
+
},
|
|
58
|
+
name: {
|
|
59
|
+
classPropertyName: "name",
|
|
60
|
+
publicName: "name",
|
|
61
|
+
isSignal: true,
|
|
62
|
+
isRequired: false,
|
|
63
|
+
transformFunction: null
|
|
64
|
+
},
|
|
65
|
+
required: {
|
|
66
|
+
classPropertyName: "required",
|
|
67
|
+
publicName: "required",
|
|
68
|
+
isSignal: true,
|
|
69
|
+
isRequired: false,
|
|
70
|
+
transformFunction: null
|
|
71
|
+
},
|
|
72
|
+
disabled: {
|
|
73
|
+
classPropertyName: "disabled",
|
|
74
|
+
publicName: "disabled",
|
|
75
|
+
isSignal: true,
|
|
76
|
+
isRequired: false,
|
|
77
|
+
transformFunction: null
|
|
78
|
+
},
|
|
79
|
+
validationState: {
|
|
80
|
+
classPropertyName: "validationState",
|
|
81
|
+
publicName: "validationState",
|
|
82
|
+
isSignal: true,
|
|
83
|
+
isRequired: false,
|
|
84
|
+
transformFunction: null
|
|
85
|
+
},
|
|
86
|
+
compareWith: {
|
|
87
|
+
classPropertyName: "compareWith",
|
|
88
|
+
publicName: "compareWith",
|
|
89
|
+
isSignal: true,
|
|
90
|
+
isRequired: false,
|
|
91
|
+
transformFunction: null
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
outputs: {
|
|
95
|
+
value: "valueChange",
|
|
96
|
+
validationState: "validationStateChange"
|
|
97
|
+
},
|
|
98
|
+
host: { properties: {
|
|
99
|
+
"attr.id": "null",
|
|
100
|
+
"attr.name": "null"
|
|
101
|
+
} },
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
template: "<input\n type=\"radio\"\n class=\"not-checked:bg-layer border-line-3 focus:ring-2 focus:ring-primary-200/50 size-4 text-primary-600\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n (change)=\"select()\"\n/>\n",
|
|
104
|
+
styles: [":host{display:inline-flex}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
108
|
+
minVersion: "12.0.0",
|
|
109
|
+
version: "22.2.1",
|
|
110
|
+
ngImport: i0,
|
|
111
|
+
type: UiRadioComponent,
|
|
112
|
+
decorators: [{
|
|
113
|
+
type: Component,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: "ui-radio",
|
|
116
|
+
host: {
|
|
117
|
+
"[attr.id]": "null",
|
|
118
|
+
"[attr.name]": "null"
|
|
119
|
+
},
|
|
120
|
+
template: "<input\n type=\"radio\"\n class=\"not-checked:bg-layer border-line-3 focus:ring-2 focus:ring-primary-200/50 size-4 text-primary-600\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n (change)=\"select()\"\n/>\n",
|
|
121
|
+
styles: [":host{display:inline-flex}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
122
|
+
}]
|
|
123
|
+
}],
|
|
124
|
+
propDecorators: {
|
|
125
|
+
value: [{
|
|
126
|
+
type: i0.Input,
|
|
127
|
+
args: [{
|
|
128
|
+
isSignal: true,
|
|
129
|
+
alias: "value",
|
|
130
|
+
required: true
|
|
131
|
+
}]
|
|
132
|
+
}, {
|
|
133
|
+
type: i0.Output,
|
|
134
|
+
args: ["valueChange"]
|
|
135
|
+
}],
|
|
136
|
+
option: [{
|
|
137
|
+
type: i0.Input,
|
|
138
|
+
args: [{
|
|
139
|
+
isSignal: true,
|
|
140
|
+
alias: "option",
|
|
141
|
+
required: true
|
|
142
|
+
}]
|
|
143
|
+
}],
|
|
144
|
+
id: [{
|
|
145
|
+
type: i0.Input,
|
|
146
|
+
args: [{
|
|
147
|
+
isSignal: true,
|
|
148
|
+
alias: "id",
|
|
149
|
+
required: false
|
|
150
|
+
}]
|
|
151
|
+
}],
|
|
152
|
+
name: [{
|
|
153
|
+
type: i0.Input,
|
|
154
|
+
args: [{
|
|
155
|
+
isSignal: true,
|
|
156
|
+
alias: "name",
|
|
157
|
+
required: false
|
|
158
|
+
}]
|
|
159
|
+
}],
|
|
160
|
+
required: [{
|
|
161
|
+
type: i0.Input,
|
|
162
|
+
args: [{
|
|
163
|
+
isSignal: true,
|
|
164
|
+
alias: "required",
|
|
165
|
+
required: false
|
|
166
|
+
}]
|
|
167
|
+
}],
|
|
168
|
+
disabled: [{
|
|
169
|
+
type: i0.Input,
|
|
170
|
+
args: [{
|
|
171
|
+
isSignal: true,
|
|
172
|
+
alias: "disabled",
|
|
173
|
+
required: false
|
|
174
|
+
}]
|
|
175
|
+
}],
|
|
176
|
+
validationState: [{
|
|
177
|
+
type: i0.Input,
|
|
178
|
+
args: [{
|
|
179
|
+
isSignal: true,
|
|
180
|
+
alias: "validationState",
|
|
181
|
+
required: false
|
|
182
|
+
}]
|
|
183
|
+
}, {
|
|
184
|
+
type: i0.Output,
|
|
185
|
+
args: ["validationStateChange"]
|
|
186
|
+
}],
|
|
187
|
+
compareWith: [{
|
|
188
|
+
type: i0.Input,
|
|
189
|
+
args: [{
|
|
190
|
+
isSignal: true,
|
|
191
|
+
alias: "compareWith",
|
|
192
|
+
required: false
|
|
193
|
+
}]
|
|
194
|
+
}]
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
export { UiRadioComponent };
|
|
198
|
+
|
|
199
|
+
//# sourceMappingURL=area8975-ui-radio.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area8975-ui-radio.mjs","names":[],"sources":["../../../projects/ui/radio/radio.component.ts","../../../projects/ui/radio/radio.component.html"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n input,\n model\n} from '@angular/core';\n\nimport { InputValidation } from '@area8975/ui/input';\n\n\n@Component({\n selector: 'ui-radio',\n templateUrl: './radio.component.html',\n styleUrl: './radio.component.css',\n // unbind id and name attrs to not cause conflict with the native input\n host: { '[attr.id]': 'null', '[attr.name]': 'null' }\n})\nexport class UiRadioComponent<ValueType = unknown> {\n readonly value = model.required<ValueType>();\n readonly option = input.required<ValueType>();\n\n readonly id = input<string>('');\n readonly name = input<string>('');\n\n readonly required = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** true/false shows valid/invalid styling. null means not validated yet. */\n readonly validationState = model<InputValidation>(null);\n\n readonly compareWith = input<(a: ValueType, b: ValueType) => boolean>(\n (a, b) => a === b\n );\n\n readonly checked = computed(() =>\n this.compareWith()(this.value(), this.option())\n );\n\n select(): void {\n this.value.set(this.option());\n }\n}\n","<input\n type=\"radio\"\n class=\"not-checked:bg-layer border-line-3 focus:ring-2 focus:ring-primary-200/50 size-4 text-primary-600\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"disabled()\"\n (change)=\"select()\"\n/>\n"],"mappings":";;AAkBA,IAAa,mBAAb,MAAa,iBAAgB;CAChB,QAAQ,MAAM,SAAqB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACnC,SAAS,MAAM,SAAqB,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAEpC,KAAK,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,OAAO,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAExB,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,W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