@ardium-ui/ui 5.0.0-alpha.100 → 5.0.0-alpha.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ardium-ui-ui.mjs +128 -77
- package/fesm2022/ardium-ui-ui.mjs.map +1 -1
- package/lib/_internal/utils/context-to-inputs.d.ts +2 -0
- package/lib/_internal/utils/date.utils.d.ts +2 -0
- package/lib/breakpoints/breakpoint.utils.d.ts +5 -5
- package/lib/checkbox/checkbox.component.d.ts +2 -0
- package/lib/checkbox/checkbox.defaults.d.ts +3 -1
- package/lib/checkbox/checkbox.types.d.ts +3 -0
- package/lib/grid/grid.component.d.ts +4 -0
- package/lib/grid/grid.utils.d.ts +12 -3
- package/lib/slider/range-slider/range-slider.component.d.ts +1 -1
- package/lib/stack/stack.component.d.ts +1 -0
- package/lib/types/utility.types.d.ts +4 -0
- package/package.json +2 -2
- package/prebuilt-themes/default/inputs/date-input.css +4 -0
- package/prebuilt-themes/default/inputs/date-input.css.map +1 -1
- package/themes/default/inputs/date-input.scss +4 -0
|
@@ -2,10 +2,10 @@ import 'first-last';
|
|
|
2
2
|
import { Overlay, ScrollStrategyOptions, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
3
3
|
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { signal, computed, InjectionToken, Directive, Input, HostBinding, input, output, ViewChildren, viewChild, contentChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, inject, ViewContainerRef, TemplateRef, forwardRef, HostListener, NgModule, effect, viewChildren, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, Renderer2, linkedSignal, untracked, contentChildren, Injectable, Injector } from '@angular/core';
|
|
5
|
+
import { signal, computed, InjectionToken, Directive, Input, HostBinding, input, output, ViewChildren, viewChild, contentChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, inject, ViewContainerRef, TemplateRef, forwardRef, HostListener, NgModule, effect, viewChildren, Pipe, model, ElementRef, ChangeDetectorRef, ContentChildren, Renderer2, linkedSignal, untracked, contentChildren, reflectComponentType, Injectable, Injector } from '@angular/core';
|
|
6
6
|
import { Validators, NG_VALUE_ACCESSOR, TouchedChangeEvent } from '@angular/forms';
|
|
7
7
|
import * as i4 from '@ardium-ui/devkit';
|
|
8
|
-
import { arraySignal, coerceBooleanProperty, coerceNumberProperty, trackBoundControl, coerceArrayProperty, ArdiumClickOutsideModule, ArdiumEscapeHTMLModule, FileSystemService, FileSystemMethod, ArdiumFilePipesModule,
|
|
8
|
+
import { arraySignal, coerceBooleanProperty, coerceNumberProperty, trackBoundControl, coerceArrayProperty, ArdiumClickOutsideModule, ArdiumEscapeHTMLModule, FileSystemService, FileSystemMethod, ArdiumFilePipesModule, coerceDateOnlyProperty, getUTCDate as getUTCDate$1, ArdiumHoldModule } from '@ardium-ui/devkit';
|
|
9
9
|
import { isDefined, any, isPrimitive, isAnyString, isNull, isNumber, isString, isArray, isFunction, isRegExp, evaluate, isObject, isPromise, isDate } from 'simple-bool';
|
|
10
10
|
import { resolvePath } from 'resolve-object-path';
|
|
11
11
|
import { TakeChance } from 'take-chance';
|
|
@@ -5924,6 +5924,18 @@ function getDateComponents(date, UTC) {
|
|
|
5924
5924
|
date: UTC ? date.getUTCDate() : date.getDate(),
|
|
5925
5925
|
};
|
|
5926
5926
|
}
|
|
5927
|
+
function startOfDay(date, UTC = false) {
|
|
5928
|
+
if (UTC) {
|
|
5929
|
+
return getUTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
|
|
5930
|
+
}
|
|
5931
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
5932
|
+
}
|
|
5933
|
+
function endOfDay(date, UTC = false) {
|
|
5934
|
+
if (UTC) {
|
|
5935
|
+
return getUTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 23, 59, 59, 999);
|
|
5936
|
+
}
|
|
5937
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);
|
|
5938
|
+
}
|
|
5927
5939
|
|
|
5928
5940
|
//public (exported)
|
|
5929
5941
|
class ArdDateInputPrefixTemplateDirective {
|
|
@@ -6170,8 +6182,12 @@ class _AbstractDateInput extends _FormFieldComponentBase {
|
|
|
6170
6182
|
return value;
|
|
6171
6183
|
},
|
|
6172
6184
|
});
|
|
6173
|
-
this.min = input(this._DEFAULTS.min, {
|
|
6174
|
-
|
|
6185
|
+
this.min = input(this._DEFAULTS.min, {
|
|
6186
|
+
transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.min, true)),
|
|
6187
|
+
});
|
|
6188
|
+
this.max = input(this._DEFAULTS.max, {
|
|
6189
|
+
transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.max, true)),
|
|
6190
|
+
});
|
|
6175
6191
|
this.UTC = input(this._DEFAULTS.UTC, { transform: v => coerceBooleanProperty(v) });
|
|
6176
6192
|
this._UTCAfterInit = signal(this._DEFAULTS.UTC);
|
|
6177
6193
|
this.filter = input(this._DEFAULTS.filter);
|
|
@@ -7732,10 +7748,10 @@ class _AbstractCalendar extends _FormFieldComponentBase {
|
|
|
7732
7748
|
this.yearSelect = output();
|
|
7733
7749
|
this.monthSelect = output();
|
|
7734
7750
|
this.min = input(this._DEFAULTS.min, {
|
|
7735
|
-
transform: v => (v === null ? null :
|
|
7751
|
+
transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.min, true)),
|
|
7736
7752
|
});
|
|
7737
7753
|
this.max = input(this._DEFAULTS.max, {
|
|
7738
|
-
transform: v => (v === null ? null :
|
|
7754
|
+
transform: v => (v === null ? null : coerceDateOnlyProperty(v, this._DEFAULTS.max, true)),
|
|
7739
7755
|
});
|
|
7740
7756
|
this.UTC = input(this._DEFAULTS.UTC, { transform: v => coerceBooleanProperty(v) });
|
|
7741
7757
|
this._UTCAfterInit = signal(this._DEFAULTS.UTC);
|
|
@@ -8831,17 +8847,30 @@ class ArdiumDateInputComponent extends _AbstractDateInput {
|
|
|
8831
8847
|
if (this.minMaxStrategy() === ArdDateInputMinMaxStrategy.Adjust && date) {
|
|
8832
8848
|
const min = this.min();
|
|
8833
8849
|
const max = this.max();
|
|
8850
|
+
// min and max are always in UTC when they are set, so we need to convert the date to UTC for comparison
|
|
8851
|
+
date = getUTCDate(date.getFullYear(), date.getMonth(), date.getDate());
|
|
8834
8852
|
if (min && date < min) {
|
|
8835
|
-
date =
|
|
8853
|
+
date = min;
|
|
8836
8854
|
}
|
|
8837
8855
|
else if (max && date > max) {
|
|
8838
|
-
date =
|
|
8856
|
+
date = max;
|
|
8857
|
+
}
|
|
8858
|
+
// convert the date back to local time if the UTC mode is off
|
|
8859
|
+
if (!this._UTCAfterInit()) {
|
|
8860
|
+
date = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
|
|
8839
8861
|
}
|
|
8862
|
+
if (date.toISOString() !== this.value()?.toISOString()) {
|
|
8863
|
+
this.value.set(date);
|
|
8864
|
+
}
|
|
8865
|
+
return;
|
|
8840
8866
|
}
|
|
8867
|
+
// deserialized date should always be in local time, so we need to convert it to UTC if the UTC mode is on
|
|
8841
8868
|
if (date && this._UTCAfterInit()) {
|
|
8842
8869
|
date = getUTCDate(date.getFullYear(), date.getMonth(), date.getDate());
|
|
8843
8870
|
}
|
|
8844
|
-
this.value
|
|
8871
|
+
if (date?.toISOString() !== this.value()?.toISOString()) {
|
|
8872
|
+
this.value.set(date);
|
|
8873
|
+
}
|
|
8845
8874
|
}
|
|
8846
8875
|
_setDateInputAttributes() {
|
|
8847
8876
|
const input = this.dateInput()?.nativeElement;
|
|
@@ -10669,10 +10698,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
10669
10698
|
}]
|
|
10670
10699
|
}] });
|
|
10671
10700
|
|
|
10701
|
+
function contextToInputs(context, component) {
|
|
10702
|
+
let allowed;
|
|
10703
|
+
return computed(() => {
|
|
10704
|
+
if (!component)
|
|
10705
|
+
return {};
|
|
10706
|
+
if (!allowed) {
|
|
10707
|
+
const meta = reflectComponentType(component);
|
|
10708
|
+
if (!meta)
|
|
10709
|
+
return {};
|
|
10710
|
+
allowed = new Set(meta.inputs.map(i => i.templateName));
|
|
10711
|
+
}
|
|
10712
|
+
return Object.fromEntries(Object.entries(context()).filter(([key]) => allowed.has(key)));
|
|
10713
|
+
});
|
|
10714
|
+
}
|
|
10715
|
+
|
|
10672
10716
|
const _checkboxDefaults = {
|
|
10673
10717
|
..._booleanComponentDefaults,
|
|
10674
10718
|
color: SimpleComponentColor.Primary,
|
|
10675
10719
|
unselectedColor: SimpleComponentColor.None,
|
|
10720
|
+
CheckboxIconComponent: undefined,
|
|
10676
10721
|
};
|
|
10677
10722
|
const ARD_CHECKBOX_DEFAULTS = new InjectionToken('ard-checkbox-defaults', {
|
|
10678
10723
|
factory: () => ({
|
|
@@ -10735,6 +10780,7 @@ class ArdiumCheckboxComponent extends _BooleanComponentBase {
|
|
|
10735
10780
|
});
|
|
10736
10781
|
this.State = CheckboxState;
|
|
10737
10782
|
//! templates
|
|
10783
|
+
this.checkboxIconComponent = this._DEFAULTS.CheckboxIconComponent;
|
|
10738
10784
|
this.templateRepository = contentChild(_CheckboxTemplateRepositoryDirective);
|
|
10739
10785
|
this.checkboxTemplate = contentChild(ArdCheckboxTemplateDirective);
|
|
10740
10786
|
this.checkboxTemplateContext = computed(() => ({
|
|
@@ -10744,6 +10790,7 @@ class ArdiumCheckboxComponent extends _BooleanComponentBase {
|
|
|
10744
10790
|
state: this.state(),
|
|
10745
10791
|
internalState: this.internalState(),
|
|
10746
10792
|
}));
|
|
10793
|
+
this.checkboxIconInputs = contextToInputs(this.checkboxTemplateContext, this.checkboxIconComponent);
|
|
10747
10794
|
}
|
|
10748
10795
|
//override the "selected" setter, so it changes the state too.
|
|
10749
10796
|
set _selected(v) {
|
|
@@ -10765,13 +10812,13 @@ class ArdiumCheckboxComponent extends _BooleanComponentBase {
|
|
|
10765
10812
|
this._emitTouched();
|
|
10766
10813
|
}
|
|
10767
10814
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumCheckboxComponent, deps: [{ token: ARD_CHECKBOX_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10768
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
10815
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ArdiumCheckboxComponent, isStandalone: false, selector: "ard-checkbox", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, unselectedColor: { classPropertyName: "unselectedColor", publicName: "unselectedColor", isSignal: true, isRequired: false, transformFunction: null }, internalState: { classPropertyName: "internalState", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { internalState: "stateChange" }, providers: [
|
|
10769
10816
|
{
|
|
10770
10817
|
provide: NG_VALUE_ACCESSOR,
|
|
10771
10818
|
useExisting: forwardRef(() => ArdiumCheckboxComponent),
|
|
10772
10819
|
multi: true,
|
|
10773
10820
|
},
|
|
10774
|
-
], queries: [{ propertyName: "templateRepository", first: true, predicate: _CheckboxTemplateRepositoryDirective, descendants: true, isSignal: true }, { propertyName: "checkboxTemplate", first: true, predicate: ArdCheckboxTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n
|
|
10821
|
+
], queries: [{ propertyName: "templateRepository", first: true, predicate: _CheckboxTemplateRepositoryDirective, descendants: true, isSignal: true }, { propertyName: "checkboxTemplate", first: true, predicate: ArdCheckboxTemplateDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n @if (checkboxIconComponent) {\r\n <!-- render the component -->\r\n <ng-template\r\n [ngComponentOutlet]=\"checkboxIconComponent\"\r\n [ngComponentOutletInputs]=\"checkboxIconInputs()\"\r\n />\r\n } @else {\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n let-state=\"state\"\r\n let-selected=\"selected\"\r\n >\r\n <ard-icon\r\n [icon]=\"\r\n state === State.Selected\r\n ? 'check_box'\r\n : state === State.Unselected\r\n ? 'check_box_outline_blank'\r\n : 'indeterminate_check_box'\r\n \"\r\n [filled]=\"state !== State.Indeterminate\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"\r\n templateRepository()?.checkboxTmp()?.template ?? checkboxTemplate()?.template ?? defaultCheckboxTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"checkboxTemplateContext()\"\r\n />\r\n }\r\n</button>\r\n", styles: ["@layer ard-ui{ard-checkbox{display:block}.ard-checkbox{font-size:inherit}.ard-checkbox>ard-icon{font-size:1.5em}ard-checkbox.ard-readonly .ard-checkbox,ard-checkbox.ard-disabled .ard-checkbox{cursor:default}ard-checkbox.ard-readonly .ard-checkbox .ard-focus-overlay,ard-checkbox.ard-disabled .ard-checkbox .ard-focus-overlay{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ArdiumIconComponent, selector: "ard-icon", inputs: ["ariaLabel", "icon", "filled", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10775
10822
|
}
|
|
10776
10823
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumCheckboxComponent, decorators: [{
|
|
10777
10824
|
type: Component,
|
|
@@ -10781,7 +10828,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
10781
10828
|
useExisting: forwardRef(() => ArdiumCheckboxComponent),
|
|
10782
10829
|
multi: true,
|
|
10783
10830
|
},
|
|
10784
|
-
], template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n
|
|
10831
|
+
], template: "<button\r\n class=\"ard-checkbox\"\r\n role=\"checkbox\"\r\n type=\"button\"\r\n [attr.id]=\"htmlId()\"\r\n [attr.name]=\"htmlName()\"\r\n [attr.aria-checked]=\"selectedAccountingForReverse()\"\r\n [attr.aria-disabled]=\"disabled()\"\r\n [tabindex]=\"tabIndex()\"\r\n [ngClass]=\"ngClasses()\"\r\n (click)=\"toggleState()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n>\r\n <div class=\"ard-hitbox\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n\r\n @if (checkboxIconComponent) {\r\n <!-- render the component -->\r\n <ng-template\r\n [ngComponentOutlet]=\"checkboxIconComponent\"\r\n [ngComponentOutletInputs]=\"checkboxIconInputs()\"\r\n />\r\n } @else {\r\n <ng-template\r\n #defaultCheckboxTemplate\r\n let-state=\"state\"\r\n let-selected=\"selected\"\r\n >\r\n <ard-icon\r\n [icon]=\"\r\n state === State.Selected\r\n ? 'check_box'\r\n : state === State.Unselected\r\n ? 'check_box_outline_blank'\r\n : 'indeterminate_check_box'\r\n \"\r\n [filled]=\"state !== State.Indeterminate\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template\r\n [ngTemplateOutlet]=\"\r\n templateRepository()?.checkboxTmp()?.template ?? checkboxTemplate()?.template ?? defaultCheckboxTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"checkboxTemplateContext()\"\r\n />\r\n }\r\n</button>\r\n", styles: ["@layer ard-ui{ard-checkbox{display:block}.ard-checkbox{font-size:inherit}.ard-checkbox>ard-icon{font-size:1.5em}ard-checkbox.ard-readonly .ard-checkbox,ard-checkbox.ard-disabled .ard-checkbox{cursor:default}ard-checkbox.ard-readonly .ard-checkbox .ard-focus-overlay,ard-checkbox.ard-disabled .ard-checkbox .ard-focus-overlay{display:none}}\n"] }]
|
|
10785
10832
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
10786
10833
|
type: Inject,
|
|
10787
10834
|
args: [ARD_CHECKBOX_DEFAULTS]
|
|
@@ -16357,18 +16404,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
16357
16404
|
type: Injectable
|
|
16358
16405
|
}], ctorParameters: () => [] });
|
|
16359
16406
|
|
|
16360
|
-
|
|
16361
|
-
* Normalizes various responsive value representations into a full {@link ArdBreakpointsConfig}.
|
|
16362
|
-
*
|
|
16363
|
-
* - `number`: same value is applied to all breakpoints.
|
|
16364
|
-
* - `string`: either a single number or a space-separated breakpoint list
|
|
16365
|
-
* like `"base:1 sm:2 md:3 lg:4 xl:5"`.
|
|
16366
|
-
* - `ArdBreakpointsConfig`: missing breakpoints are filled based on smaller ones.
|
|
16367
|
-
*/
|
|
16368
|
-
function transformResponsiveValue(v, breakpoints, parseValue) {
|
|
16407
|
+
function transformResponsiveValue(v, breakpoints, componentId, parseValue, parseToR) {
|
|
16369
16408
|
// if it's an object, fill in missing breakpoints
|
|
16370
16409
|
if (isObject(v)) {
|
|
16371
|
-
|
|
16410
|
+
const vAsR = {};
|
|
16411
|
+
for (const [bp, val] of Object.entries(v)) {
|
|
16412
|
+
vAsR[bp] = parseToR?.(val) ?? val;
|
|
16413
|
+
}
|
|
16414
|
+
return fillInMissingBreakpoints(vAsR, breakpoints, componentId);
|
|
16372
16415
|
}
|
|
16373
16416
|
// parse string like "xs:1 sm:2 md:3 lg:4 xl:5"
|
|
16374
16417
|
const items = coerceArrayProperty(v, ' ')
|
|
@@ -16383,25 +16426,25 @@ function transformResponsiveValue(v, breakpoints, parseValue) {
|
|
|
16383
16426
|
})
|
|
16384
16427
|
.filter(item => {
|
|
16385
16428
|
if (!breakpoints.includes(item.breakpoint)) {
|
|
16386
|
-
console.warn(`ARD-
|
|
16429
|
+
console.warn(`ARD-WA${componentId}0: Unknown breakpoint "${item.breakpoint}:${item.value}". This entry will be ignored.`);
|
|
16387
16430
|
return false;
|
|
16388
16431
|
}
|
|
16389
16432
|
if (item.value === undefined || item.value === null || item.value === '' || (isNumber(item.value) && isNaN(item.value))) {
|
|
16390
|
-
console.warn(`ARD-
|
|
16433
|
+
console.warn(`ARD-WA${componentId}1: Invalid value for breakpoint "${item.breakpoint}". This entry will be ignored.`);
|
|
16391
16434
|
return false;
|
|
16392
16435
|
}
|
|
16393
16436
|
return true;
|
|
16394
16437
|
})
|
|
16395
16438
|
.reduce((acc, curr) => {
|
|
16396
16439
|
if (acc[curr.breakpoint]) {
|
|
16397
|
-
console.warn(`ARD-
|
|
16440
|
+
console.warn(`ARD-WA${componentId}2: Duplicate value for breakpoint "${curr.breakpoint}". The value "${curr.rawValue}" will overwrite the previous value "${acc[curr.breakpoint]}".`);
|
|
16398
16441
|
}
|
|
16399
16442
|
acc[curr.breakpoint] = curr.value;
|
|
16400
16443
|
return acc;
|
|
16401
16444
|
}, {});
|
|
16402
|
-
return fillInMissingBreakpoints(items, breakpoints);
|
|
16445
|
+
return fillInMissingBreakpoints(items, breakpoints, componentId);
|
|
16403
16446
|
}
|
|
16404
|
-
function fillInMissingBreakpoints(config, breakpoints) {
|
|
16447
|
+
function fillInMissingBreakpoints(config, breakpoints, componentId) {
|
|
16405
16448
|
const filledConfig = {};
|
|
16406
16449
|
let lastValue = undefined;
|
|
16407
16450
|
for (const bp of breakpoints) {
|
|
@@ -16414,58 +16457,58 @@ function fillInMissingBreakpoints(config, breakpoints) {
|
|
|
16414
16457
|
filledConfig[bp] = lastValue;
|
|
16415
16458
|
continue;
|
|
16416
16459
|
}
|
|
16417
|
-
throw new Error(`ARD-
|
|
16460
|
+
throw new Error(`ARD-FT${componentId}3: Missing value for breakpoint "${bp}" and no smaller breakpoint to inherit from.`);
|
|
16418
16461
|
}
|
|
16419
16462
|
return filledConfig;
|
|
16420
16463
|
}
|
|
16421
16464
|
|
|
16422
|
-
function parseNumberOrBreakpointConfig(value, breakpoints) {
|
|
16465
|
+
function parseNumberOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16423
16466
|
if (typeof value === 'number') {
|
|
16424
16467
|
// If it's a number, apply it to all breakpoints
|
|
16425
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16468
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16426
16469
|
}
|
|
16427
|
-
return transformResponsiveValue(value, breakpoints, coerceNumberProperty);
|
|
16470
|
+
return transformResponsiveValue(value, breakpoints, componentId, coerceNumberProperty);
|
|
16428
16471
|
}
|
|
16429
|
-
function parseSizeOrBreakpointConfig(value, breakpoints) {
|
|
16472
|
+
function parseSizeOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16430
16473
|
if (typeof value === 'number' || isArdGridSize(value)) {
|
|
16431
16474
|
// If it's a number or ArdGridSize, apply it to all breakpoints
|
|
16432
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16475
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16433
16476
|
}
|
|
16434
|
-
return transformResponsiveValue(value, breakpoints, v => {
|
|
16477
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => {
|
|
16435
16478
|
if (isArdGridSize(v)) {
|
|
16436
16479
|
return v;
|
|
16437
16480
|
}
|
|
16438
16481
|
return coerceNumberProperty(v);
|
|
16439
16482
|
});
|
|
16440
16483
|
}
|
|
16441
|
-
function parseBooleanOrBreakpointConfig(value, breakpoints) {
|
|
16484
|
+
function parseBooleanOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16442
16485
|
if (typeof value === 'boolean') {
|
|
16443
16486
|
// If it's a boolean, apply it to all breakpoints
|
|
16444
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16487
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16445
16488
|
}
|
|
16446
16489
|
if (value === '' || value === 'true') {
|
|
16447
|
-
return fillInMissingBreakpoints({ xs: true }, breakpoints);
|
|
16490
|
+
return fillInMissingBreakpoints({ xs: true }, breakpoints, componentId);
|
|
16448
16491
|
}
|
|
16449
|
-
return transformResponsiveValue(value, breakpoints, v => v === 'true');
|
|
16492
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => v === 'true');
|
|
16450
16493
|
}
|
|
16451
|
-
function parseCSSUnitOrBreakpointConfig(value, breakpoints) {
|
|
16494
|
+
function parseCSSUnitOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16452
16495
|
if (isNull(value)) {
|
|
16453
16496
|
return value;
|
|
16454
16497
|
}
|
|
16455
16498
|
if (isNumber(value)) {
|
|
16456
|
-
fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16499
|
+
fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16457
16500
|
}
|
|
16458
|
-
return transformResponsiveValue(value, breakpoints, v => {
|
|
16501
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => {
|
|
16459
16502
|
const num = coerceNumberProperty(v, NaN);
|
|
16460
16503
|
return isNaN(num) ? v : `calc(var(--ard-grid-spacing-unit) * ${num})`;
|
|
16461
|
-
});
|
|
16504
|
+
}, v => (typeof v === 'number' ? `calc(var(--ard-grid-spacing-unit) * ${v})` : v));
|
|
16462
16505
|
}
|
|
16463
|
-
function parseEnumOrBreakpointConfig(value, breakpoints, isEnumValue) {
|
|
16506
|
+
function parseEnumOrBreakpointConfig(value, breakpoints, componentId, isEnumValue) {
|
|
16464
16507
|
if (isEnumValue(value)) {
|
|
16465
16508
|
// If it's an enum value, apply it to all breakpoints
|
|
16466
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16509
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16467
16510
|
}
|
|
16468
|
-
return transformResponsiveValue(value, breakpoints, v => (isEnumValue(v) ? v : undefined));
|
|
16511
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => (isEnumValue(v) ? v : undefined));
|
|
16469
16512
|
}
|
|
16470
16513
|
|
|
16471
16514
|
//! size
|
|
@@ -16544,33 +16587,34 @@ function provideGridDefaults(config) {
|
|
|
16544
16587
|
|
|
16545
16588
|
class ArdiumGridComponent {
|
|
16546
16589
|
constructor() {
|
|
16590
|
+
this._componentId = '601';
|
|
16547
16591
|
this._DEFAULTS = inject(ARD_GRID_DEFAULTS);
|
|
16548
16592
|
this._breakpointService = inject(ArdiumBreakpointService);
|
|
16549
16593
|
this._wasContentInitialized = false;
|
|
16550
16594
|
//! is container
|
|
16551
16595
|
this.container = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
16552
16596
|
//! configurations
|
|
16553
|
-
this.columns = input(parseNumberOrBreakpointConfig(this._DEFAULTS.columns, this._breakpointService.breakpoints), { transform: value => parseNumberOrBreakpointConfig(value, this._breakpointService.breakpoints) });
|
|
16554
|
-
this.size = input(parseSizeOrBreakpointConfig(this._DEFAULTS.size, this._breakpointService.breakpoints), {
|
|
16555
|
-
transform: value => parseSizeOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16597
|
+
this.columns = input(parseNumberOrBreakpointConfig(this._DEFAULTS.columns, this._breakpointService.breakpoints, this._componentId), { transform: value => parseNumberOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId) });
|
|
16598
|
+
this.size = input(parseSizeOrBreakpointConfig(this._DEFAULTS.size, this._breakpointService.breakpoints, this._componentId), {
|
|
16599
|
+
transform: value => parseSizeOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16556
16600
|
});
|
|
16557
|
-
this.reverse = input(parseBooleanOrBreakpointConfig(this._DEFAULTS.reverse, this._breakpointService.breakpoints), { transform: value => parseBooleanOrBreakpointConfig(value, this._breakpointService.breakpoints) });
|
|
16558
|
-
this.justifyContent = input(parseEnumOrBreakpointConfig(this._DEFAULTS.justifyContent, this._breakpointService.breakpoints, isArdGridJustify), {
|
|
16559
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridJustify),
|
|
16601
|
+
this.reverse = input(parseBooleanOrBreakpointConfig(this._DEFAULTS.reverse, this._breakpointService.breakpoints, this._componentId), { transform: value => parseBooleanOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId) });
|
|
16602
|
+
this.justifyContent = input(parseEnumOrBreakpointConfig(this._DEFAULTS.justifyContent, this._breakpointService.breakpoints, this._componentId, isArdGridJustify), {
|
|
16603
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridJustify),
|
|
16560
16604
|
});
|
|
16561
|
-
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, isArdGridAlign), {
|
|
16562
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridAlign),
|
|
16605
|
+
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, this._componentId, isArdGridAlign), {
|
|
16606
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridAlign),
|
|
16563
16607
|
});
|
|
16564
|
-
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints), {
|
|
16565
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16608
|
+
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16609
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16566
16610
|
});
|
|
16567
|
-
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints), {
|
|
16568
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16611
|
+
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16612
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16569
16613
|
});
|
|
16570
|
-
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints), {
|
|
16571
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16614
|
+
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16615
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16572
16616
|
});
|
|
16573
|
-
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridWrap) });
|
|
16617
|
+
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, this._componentId, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridWrap) });
|
|
16574
16618
|
//! inherited properties
|
|
16575
16619
|
this.inheritedColumns = signal(null);
|
|
16576
16620
|
this.inheritedReverse = signal(null);
|
|
@@ -16606,8 +16650,14 @@ class ArdiumGridComponent {
|
|
|
16606
16650
|
this.currentColumnSpacing = computed(() => this.finalColumnSpacing()[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16607
16651
|
this.currentRowSpacing = computed(() => this.finalRowSpacing()[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16608
16652
|
this.currentWrap = computed(() => this.wrapOrInherited()[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16653
|
+
this.currentInheritedColumns = computed(() => this.inheritedColumns()?.[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16654
|
+
this.currentInheritedColumnSpacing = computed(() => this.inheritedColumnSpacing()?.[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16655
|
+
this.currentInheritedRowSpacing = computed(() => this.inheritedRowSpacing()?.[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16609
16656
|
this.currentStyle = computed(() => [
|
|
16610
16657
|
this.currentSize() ? `--ard-_grid-size: ${this.currentSize()}` : '',
|
|
16658
|
+
this.currentInheritedColumns() ? `--ard-_grid-parent-columns: ${this.currentInheritedColumns()}` : '',
|
|
16659
|
+
this.currentInheritedColumnSpacing() ? `--ard-_grid-parent-column-spacing: ${this.currentInheritedColumnSpacing()}` : '',
|
|
16660
|
+
this.currentInheritedRowSpacing() ? `--ard-_grid-parent-row-spacing: ${this.currentInheritedRowSpacing()}` : '',
|
|
16611
16661
|
this.container() ? `--ard-_grid-columns: ${this.currentColumns()}` : '',
|
|
16612
16662
|
this.container() ? `--ard-_grid-direction: ${this.currentReverse() ? 'row-reverse' : 'row'}` : '',
|
|
16613
16663
|
this.container() ? `--ard-_grid-justify-content: ${this.currentJustifyContent()}` : '',
|
|
@@ -16652,7 +16702,7 @@ class ArdiumGridComponent {
|
|
|
16652
16702
|
}
|
|
16653
16703
|
}
|
|
16654
16704
|
_updateChildrenStyles() {
|
|
16655
|
-
const
|
|
16705
|
+
const children = this.children();
|
|
16656
16706
|
const columns = this.columnsOrInherited();
|
|
16657
16707
|
const reverse = this.reverseOrInherited();
|
|
16658
16708
|
const justifyContent = this.justifyContentOrInherited();
|
|
@@ -16663,7 +16713,7 @@ class ArdiumGridComponent {
|
|
|
16663
16713
|
if (!this._wasContentInitialized) {
|
|
16664
16714
|
return;
|
|
16665
16715
|
}
|
|
16666
|
-
for (const child of
|
|
16716
|
+
for (const child of children) {
|
|
16667
16717
|
child.inheritedColumns.set(columns);
|
|
16668
16718
|
child.inheritedReverse.set(reverse);
|
|
16669
16719
|
child.inheritedJustifyContent.set(justifyContent);
|
|
@@ -16674,7 +16724,7 @@ class ArdiumGridComponent {
|
|
|
16674
16724
|
}
|
|
16675
16725
|
}
|
|
16676
16726
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16677
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: ArdiumGridComponent, isStandalone: false, selector: "ard-grid", inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: true, isRequired: false, transformFunction: null }, justifyContent: { classPropertyName: "justifyContent", publicName: "justifyContent", isSignal: true, isRequired: false, transformFunction: null }, alignItems: { classPropertyName: "alignItems", publicName: "alignItems", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, columnSpacing: { classPropertyName: "columnSpacing", publicName: "columnSpacing", isSignal: true, isRequired: false, transformFunction: null }, rowSpacing: { classPropertyName: "rowSpacing", publicName: "rowSpacing", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "currentStyle()", "class.ard-grid__container": "container()", "class.ard-grid__item": "!container()", "class.ard-grid__item-grow": "!container() && currentSize() === \"grow\"", "class.ard-grid__item-auto": "!container() && currentSize() === \"auto\"" }, classAttribute: "ard-grid" }, queries: [{ propertyName: "children", predicate: ArdiumGridComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content />", styles: ["@layer ard-ui{.ard-grid{display:block;box-sizing:border-box;min-width:0px}.ard-grid__container{display:flex;flex-direction:var(--ard-_grid-direction, row);flex-wrap:var(--ard-_grid-wrap, wrap);row-gap:var(--ard-_grid-row-spacing, 0px);column-gap:var(--ard-_grid-column-spacing, 0px);justify-content:var(--ard-_grid-justify-content, flex-start);align-items:var(--ard-_grid-align-items, flex-start)}.ard-grid__container>.ard-grid{flex-grow:0;flex-basis:auto;max-width:100%;width:calc(100% * var(--ard-_grid-size) / var(--ard-_grid-columns) - (var(--ard-_grid-columns) - var(--ard-_grid-size)) * var(--ard-_grid-column-spacing) / var(--ard-_grid-columns))}.ard-grid__container>.ard-grid.ard-grid__item-grow{flex-grow:1;width:auto}.ard-grid__container>.ard-grid.ard-grid__item-auto{width:auto}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
16727
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: ArdiumGridComponent, isStandalone: false, selector: "ard-grid", inputs: { container: { classPropertyName: "container", publicName: "container", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: true, isRequired: false, transformFunction: null }, justifyContent: { classPropertyName: "justifyContent", publicName: "justifyContent", isSignal: true, isRequired: false, transformFunction: null }, alignItems: { classPropertyName: "alignItems", publicName: "alignItems", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, columnSpacing: { classPropertyName: "columnSpacing", publicName: "columnSpacing", isSignal: true, isRequired: false, transformFunction: null }, rowSpacing: { classPropertyName: "rowSpacing", publicName: "rowSpacing", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "currentStyle()", "class.ard-grid__container": "container()", "class.ard-grid__item": "!container()", "class.ard-grid__item-grow": "!container() && currentSize() === \"grow\"", "class.ard-grid__item-auto": "!container() && currentSize() === \"auto\"" }, classAttribute: "ard-grid" }, queries: [{ propertyName: "children", predicate: ArdiumGridComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content />", styles: ["@layer ard-ui{.ard-grid{display:block;box-sizing:border-box;min-width:0px}.ard-grid__container{display:flex;flex-direction:var(--ard-_grid-direction, row);flex-wrap:var(--ard-_grid-wrap, wrap);row-gap:var(--ard-_grid-row-spacing, 0px);column-gap:var(--ard-_grid-column-spacing, 0px);justify-content:var(--ard-_grid-justify-content, flex-start);align-items:var(--ard-_grid-align-items, flex-start)}.ard-grid__container>.ard-grid{flex-grow:0;flex-basis:auto;max-width:100%;width:calc(100% * var(--ard-_grid-size) / var(--ard-_grid-parent-columns) - (var(--ard-_grid-parent-columns) - var(--ard-_grid-size)) * var(--ard-_grid-parent-column-spacing) / var(--ard-_grid-parent-columns))}.ard-grid__container>.ard-grid.ard-grid__item-grow{flex-grow:1;width:auto}.ard-grid__container>.ard-grid.ard-grid__item-auto{width:auto}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
16678
16728
|
}
|
|
16679
16729
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumGridComponent, decorators: [{
|
|
16680
16730
|
type: Component,
|
|
@@ -16685,7 +16735,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
16685
16735
|
'[class.ard-grid__item]': '!container()',
|
|
16686
16736
|
'[class.ard-grid__item-grow]': '!container() && currentSize() === "grow"',
|
|
16687
16737
|
'[class.ard-grid__item-auto]': '!container() && currentSize() === "auto"',
|
|
16688
|
-
}, template: "<ng-content />", styles: ["@layer ard-ui{.ard-grid{display:block;box-sizing:border-box;min-width:0px}.ard-grid__container{display:flex;flex-direction:var(--ard-_grid-direction, row);flex-wrap:var(--ard-_grid-wrap, wrap);row-gap:var(--ard-_grid-row-spacing, 0px);column-gap:var(--ard-_grid-column-spacing, 0px);justify-content:var(--ard-_grid-justify-content, flex-start);align-items:var(--ard-_grid-align-items, flex-start)}.ard-grid__container>.ard-grid{flex-grow:0;flex-basis:auto;max-width:100%;width:calc(100% * var(--ard-_grid-size) / var(--ard-_grid-columns) - (var(--ard-_grid-columns) - var(--ard-_grid-size)) * var(--ard-_grid-column-spacing) / var(--ard-_grid-columns))}.ard-grid__container>.ard-grid.ard-grid__item-grow{flex-grow:1;width:auto}.ard-grid__container>.ard-grid.ard-grid__item-auto{width:auto}}\n"] }]
|
|
16738
|
+
}, template: "<ng-content />", styles: ["@layer ard-ui{.ard-grid{display:block;box-sizing:border-box;min-width:0px}.ard-grid__container{display:flex;flex-direction:var(--ard-_grid-direction, row);flex-wrap:var(--ard-_grid-wrap, wrap);row-gap:var(--ard-_grid-row-spacing, 0px);column-gap:var(--ard-_grid-column-spacing, 0px);justify-content:var(--ard-_grid-justify-content, flex-start);align-items:var(--ard-_grid-align-items, flex-start)}.ard-grid__container>.ard-grid{flex-grow:0;flex-basis:auto;max-width:100%;width:calc(100% * var(--ard-_grid-size) / var(--ard-_grid-parent-columns) - (var(--ard-_grid-parent-columns) - var(--ard-_grid-size)) * var(--ard-_grid-parent-column-spacing) / var(--ard-_grid-parent-columns))}.ard-grid__container>.ard-grid.ard-grid__item-grow{flex-grow:1;width:auto}.ard-grid__container>.ard-grid.ard-grid__item-auto{width:auto}}\n"] }]
|
|
16689
16739
|
}], ctorParameters: () => [] });
|
|
16690
16740
|
|
|
16691
16741
|
class ArdiumGridModule {
|
|
@@ -16726,28 +16776,29 @@ function provideStackDefaults(config) {
|
|
|
16726
16776
|
|
|
16727
16777
|
class ArdiumStackComponent {
|
|
16728
16778
|
constructor() {
|
|
16779
|
+
this._componentId = '602';
|
|
16729
16780
|
this._DEFAULTS = inject(ARD_STACK_DEFAULTS);
|
|
16730
16781
|
this._breakpointService = inject(ArdiumBreakpointService);
|
|
16731
16782
|
//! configurations
|
|
16732
|
-
this.direction = input(parseEnumOrBreakpointConfig(this._DEFAULTS.direction, this._breakpointService.breakpoints, isArdGridDirection), {
|
|
16733
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridDirection),
|
|
16783
|
+
this.direction = input(parseEnumOrBreakpointConfig(this._DEFAULTS.direction, this._breakpointService.breakpoints, this._componentId, isArdGridDirection), {
|
|
16784
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridDirection),
|
|
16734
16785
|
});
|
|
16735
|
-
this.justifyContent = input(parseEnumOrBreakpointConfig(this._DEFAULTS.justifyContent, this._breakpointService.breakpoints, isArdGridJustify), {
|
|
16736
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridJustify),
|
|
16786
|
+
this.justifyContent = input(parseEnumOrBreakpointConfig(this._DEFAULTS.justifyContent, this._breakpointService.breakpoints, this._componentId, isArdGridJustify), {
|
|
16787
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridJustify),
|
|
16737
16788
|
});
|
|
16738
|
-
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, isArdGridAlign), {
|
|
16739
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridAlign),
|
|
16789
|
+
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, this._componentId, isArdGridAlign), {
|
|
16790
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridAlign),
|
|
16740
16791
|
});
|
|
16741
|
-
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints), {
|
|
16742
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16792
|
+
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16793
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16743
16794
|
});
|
|
16744
|
-
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints), {
|
|
16745
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16795
|
+
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16796
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16746
16797
|
});
|
|
16747
|
-
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints), {
|
|
16748
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16798
|
+
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16799
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16749
16800
|
});
|
|
16750
|
-
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridWrap) });
|
|
16801
|
+
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, this._componentId, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridWrap) });
|
|
16751
16802
|
//! computed properties
|
|
16752
16803
|
this.finalColumnSpacing = computed(() => this.columnSpacing() ?? this.spacing());
|
|
16753
16804
|
this.finalRowSpacing = computed(() => this.rowSpacing() ?? this.spacing());
|