@ardium-ui/ui 5.0.0-alpha.100 → 5.0.0-alpha.101
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 +69 -65
- package/fesm2022/ardium-ui-ui.mjs.map +1 -1
- package/lib/breakpoints/breakpoint.utils.d.ts +5 -5
- 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/package.json +1 -1
|
@@ -16357,18 +16357,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
16357
16357
|
type: Injectable
|
|
16358
16358
|
}], ctorParameters: () => [] });
|
|
16359
16359
|
|
|
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) {
|
|
16360
|
+
function transformResponsiveValue(v, breakpoints, componentId, parseValue, parseToR) {
|
|
16369
16361
|
// if it's an object, fill in missing breakpoints
|
|
16370
16362
|
if (isObject(v)) {
|
|
16371
|
-
|
|
16363
|
+
const vAsR = {};
|
|
16364
|
+
for (const [bp, val] of Object.entries(v)) {
|
|
16365
|
+
vAsR[bp] = parseToR?.(val) ?? val;
|
|
16366
|
+
}
|
|
16367
|
+
return fillInMissingBreakpoints(vAsR, breakpoints, componentId);
|
|
16372
16368
|
}
|
|
16373
16369
|
// parse string like "xs:1 sm:2 md:3 lg:4 xl:5"
|
|
16374
16370
|
const items = coerceArrayProperty(v, ' ')
|
|
@@ -16383,25 +16379,25 @@ function transformResponsiveValue(v, breakpoints, parseValue) {
|
|
|
16383
16379
|
})
|
|
16384
16380
|
.filter(item => {
|
|
16385
16381
|
if (!breakpoints.includes(item.breakpoint)) {
|
|
16386
|
-
console.warn(`ARD-
|
|
16382
|
+
console.warn(`ARD-WA${componentId}0: Unknown breakpoint "${item.breakpoint}:${item.value}". This entry will be ignored.`);
|
|
16387
16383
|
return false;
|
|
16388
16384
|
}
|
|
16389
16385
|
if (item.value === undefined || item.value === null || item.value === '' || (isNumber(item.value) && isNaN(item.value))) {
|
|
16390
|
-
console.warn(`ARD-
|
|
16386
|
+
console.warn(`ARD-WA${componentId}1: Invalid value for breakpoint "${item.breakpoint}". This entry will be ignored.`);
|
|
16391
16387
|
return false;
|
|
16392
16388
|
}
|
|
16393
16389
|
return true;
|
|
16394
16390
|
})
|
|
16395
16391
|
.reduce((acc, curr) => {
|
|
16396
16392
|
if (acc[curr.breakpoint]) {
|
|
16397
|
-
console.warn(`ARD-
|
|
16393
|
+
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
16394
|
}
|
|
16399
16395
|
acc[curr.breakpoint] = curr.value;
|
|
16400
16396
|
return acc;
|
|
16401
16397
|
}, {});
|
|
16402
|
-
return fillInMissingBreakpoints(items, breakpoints);
|
|
16398
|
+
return fillInMissingBreakpoints(items, breakpoints, componentId);
|
|
16403
16399
|
}
|
|
16404
|
-
function fillInMissingBreakpoints(config, breakpoints) {
|
|
16400
|
+
function fillInMissingBreakpoints(config, breakpoints, componentId) {
|
|
16405
16401
|
const filledConfig = {};
|
|
16406
16402
|
let lastValue = undefined;
|
|
16407
16403
|
for (const bp of breakpoints) {
|
|
@@ -16414,58 +16410,58 @@ function fillInMissingBreakpoints(config, breakpoints) {
|
|
|
16414
16410
|
filledConfig[bp] = lastValue;
|
|
16415
16411
|
continue;
|
|
16416
16412
|
}
|
|
16417
|
-
throw new Error(`ARD-
|
|
16413
|
+
throw new Error(`ARD-FT${componentId}3: Missing value for breakpoint "${bp}" and no smaller breakpoint to inherit from.`);
|
|
16418
16414
|
}
|
|
16419
16415
|
return filledConfig;
|
|
16420
16416
|
}
|
|
16421
16417
|
|
|
16422
|
-
function parseNumberOrBreakpointConfig(value, breakpoints) {
|
|
16418
|
+
function parseNumberOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16423
16419
|
if (typeof value === 'number') {
|
|
16424
16420
|
// If it's a number, apply it to all breakpoints
|
|
16425
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16421
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16426
16422
|
}
|
|
16427
|
-
return transformResponsiveValue(value, breakpoints, coerceNumberProperty);
|
|
16423
|
+
return transformResponsiveValue(value, breakpoints, componentId, coerceNumberProperty);
|
|
16428
16424
|
}
|
|
16429
|
-
function parseSizeOrBreakpointConfig(value, breakpoints) {
|
|
16425
|
+
function parseSizeOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16430
16426
|
if (typeof value === 'number' || isArdGridSize(value)) {
|
|
16431
16427
|
// If it's a number or ArdGridSize, apply it to all breakpoints
|
|
16432
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16428
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16433
16429
|
}
|
|
16434
|
-
return transformResponsiveValue(value, breakpoints, v => {
|
|
16430
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => {
|
|
16435
16431
|
if (isArdGridSize(v)) {
|
|
16436
16432
|
return v;
|
|
16437
16433
|
}
|
|
16438
16434
|
return coerceNumberProperty(v);
|
|
16439
16435
|
});
|
|
16440
16436
|
}
|
|
16441
|
-
function parseBooleanOrBreakpointConfig(value, breakpoints) {
|
|
16437
|
+
function parseBooleanOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16442
16438
|
if (typeof value === 'boolean') {
|
|
16443
16439
|
// If it's a boolean, apply it to all breakpoints
|
|
16444
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16440
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16445
16441
|
}
|
|
16446
16442
|
if (value === '' || value === 'true') {
|
|
16447
|
-
return fillInMissingBreakpoints({ xs: true }, breakpoints);
|
|
16443
|
+
return fillInMissingBreakpoints({ xs: true }, breakpoints, componentId);
|
|
16448
16444
|
}
|
|
16449
|
-
return transformResponsiveValue(value, breakpoints, v => v === 'true');
|
|
16445
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => v === 'true');
|
|
16450
16446
|
}
|
|
16451
|
-
function parseCSSUnitOrBreakpointConfig(value, breakpoints) {
|
|
16447
|
+
function parseCSSUnitOrBreakpointConfig(value, breakpoints, componentId) {
|
|
16452
16448
|
if (isNull(value)) {
|
|
16453
16449
|
return value;
|
|
16454
16450
|
}
|
|
16455
16451
|
if (isNumber(value)) {
|
|
16456
|
-
fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16452
|
+
fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16457
16453
|
}
|
|
16458
|
-
return transformResponsiveValue(value, breakpoints, v => {
|
|
16454
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => {
|
|
16459
16455
|
const num = coerceNumberProperty(v, NaN);
|
|
16460
16456
|
return isNaN(num) ? v : `calc(var(--ard-grid-spacing-unit) * ${num})`;
|
|
16461
|
-
});
|
|
16457
|
+
}, v => (typeof v === 'number' ? `calc(var(--ard-grid-spacing-unit) * ${v})` : v));
|
|
16462
16458
|
}
|
|
16463
|
-
function parseEnumOrBreakpointConfig(value, breakpoints, isEnumValue) {
|
|
16459
|
+
function parseEnumOrBreakpointConfig(value, breakpoints, componentId, isEnumValue) {
|
|
16464
16460
|
if (isEnumValue(value)) {
|
|
16465
16461
|
// If it's an enum value, apply it to all breakpoints
|
|
16466
|
-
return fillInMissingBreakpoints({ xs: value }, breakpoints);
|
|
16462
|
+
return fillInMissingBreakpoints({ xs: value }, breakpoints, componentId);
|
|
16467
16463
|
}
|
|
16468
|
-
return transformResponsiveValue(value, breakpoints, v => (isEnumValue(v) ? v : undefined));
|
|
16464
|
+
return transformResponsiveValue(value, breakpoints, componentId, v => (isEnumValue(v) ? v : undefined));
|
|
16469
16465
|
}
|
|
16470
16466
|
|
|
16471
16467
|
//! size
|
|
@@ -16544,33 +16540,34 @@ function provideGridDefaults(config) {
|
|
|
16544
16540
|
|
|
16545
16541
|
class ArdiumGridComponent {
|
|
16546
16542
|
constructor() {
|
|
16543
|
+
this._componentId = '601';
|
|
16547
16544
|
this._DEFAULTS = inject(ARD_GRID_DEFAULTS);
|
|
16548
16545
|
this._breakpointService = inject(ArdiumBreakpointService);
|
|
16549
16546
|
this._wasContentInitialized = false;
|
|
16550
16547
|
//! is container
|
|
16551
16548
|
this.container = input(false, { transform: v => coerceBooleanProperty(v) });
|
|
16552
16549
|
//! 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),
|
|
16550
|
+
this.columns = input(parseNumberOrBreakpointConfig(this._DEFAULTS.columns, this._breakpointService.breakpoints, this._componentId), { transform: value => parseNumberOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId) });
|
|
16551
|
+
this.size = input(parseSizeOrBreakpointConfig(this._DEFAULTS.size, this._breakpointService.breakpoints, this._componentId), {
|
|
16552
|
+
transform: value => parseSizeOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16556
16553
|
});
|
|
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),
|
|
16554
|
+
this.reverse = input(parseBooleanOrBreakpointConfig(this._DEFAULTS.reverse, this._breakpointService.breakpoints, this._componentId), { transform: value => parseBooleanOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId) });
|
|
16555
|
+
this.justifyContent = input(parseEnumOrBreakpointConfig(this._DEFAULTS.justifyContent, this._breakpointService.breakpoints, this._componentId, isArdGridJustify), {
|
|
16556
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridJustify),
|
|
16560
16557
|
});
|
|
16561
|
-
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, isArdGridAlign), {
|
|
16562
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridAlign),
|
|
16558
|
+
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, this._componentId, isArdGridAlign), {
|
|
16559
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridAlign),
|
|
16563
16560
|
});
|
|
16564
|
-
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints), {
|
|
16565
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16561
|
+
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16562
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16566
16563
|
});
|
|
16567
|
-
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints), {
|
|
16568
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16564
|
+
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16565
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16569
16566
|
});
|
|
16570
|
-
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints), {
|
|
16571
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16567
|
+
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16568
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16572
16569
|
});
|
|
16573
|
-
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridWrap) });
|
|
16570
|
+
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, this._componentId, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridWrap) });
|
|
16574
16571
|
//! inherited properties
|
|
16575
16572
|
this.inheritedColumns = signal(null);
|
|
16576
16573
|
this.inheritedReverse = signal(null);
|
|
@@ -16606,8 +16603,14 @@ class ArdiumGridComponent {
|
|
|
16606
16603
|
this.currentColumnSpacing = computed(() => this.finalColumnSpacing()[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16607
16604
|
this.currentRowSpacing = computed(() => this.finalRowSpacing()[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16608
16605
|
this.currentWrap = computed(() => this.wrapOrInherited()[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16606
|
+
this.currentInheritedColumns = computed(() => this.inheritedColumns()?.[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16607
|
+
this.currentInheritedColumnSpacing = computed(() => this.inheritedColumnSpacing()?.[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16608
|
+
this.currentInheritedRowSpacing = computed(() => this.inheritedRowSpacing()?.[this._breakpointService.currentBreakpoint() ?? 'xs']);
|
|
16609
16609
|
this.currentStyle = computed(() => [
|
|
16610
16610
|
this.currentSize() ? `--ard-_grid-size: ${this.currentSize()}` : '',
|
|
16611
|
+
this.currentInheritedColumns() ? `--ard-_grid-parent-columns: ${this.currentInheritedColumns()}` : '',
|
|
16612
|
+
this.currentInheritedColumnSpacing() ? `--ard-_grid-parent-column-spacing: ${this.currentInheritedColumnSpacing()}` : '',
|
|
16613
|
+
this.currentInheritedRowSpacing() ? `--ard-_grid-parent-row-spacing: ${this.currentInheritedRowSpacing()}` : '',
|
|
16611
16614
|
this.container() ? `--ard-_grid-columns: ${this.currentColumns()}` : '',
|
|
16612
16615
|
this.container() ? `--ard-_grid-direction: ${this.currentReverse() ? 'row-reverse' : 'row'}` : '',
|
|
16613
16616
|
this.container() ? `--ard-_grid-justify-content: ${this.currentJustifyContent()}` : '',
|
|
@@ -16652,7 +16655,7 @@ class ArdiumGridComponent {
|
|
|
16652
16655
|
}
|
|
16653
16656
|
}
|
|
16654
16657
|
_updateChildrenStyles() {
|
|
16655
|
-
const
|
|
16658
|
+
const children = this.children();
|
|
16656
16659
|
const columns = this.columnsOrInherited();
|
|
16657
16660
|
const reverse = this.reverseOrInherited();
|
|
16658
16661
|
const justifyContent = this.justifyContentOrInherited();
|
|
@@ -16663,7 +16666,7 @@ class ArdiumGridComponent {
|
|
|
16663
16666
|
if (!this._wasContentInitialized) {
|
|
16664
16667
|
return;
|
|
16665
16668
|
}
|
|
16666
|
-
for (const child of
|
|
16669
|
+
for (const child of children) {
|
|
16667
16670
|
child.inheritedColumns.set(columns);
|
|
16668
16671
|
child.inheritedReverse.set(reverse);
|
|
16669
16672
|
child.inheritedJustifyContent.set(justifyContent);
|
|
@@ -16674,7 +16677,7 @@ class ArdiumGridComponent {
|
|
|
16674
16677
|
}
|
|
16675
16678
|
}
|
|
16676
16679
|
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 }); }
|
|
16680
|
+
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
16681
|
}
|
|
16679
16682
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumGridComponent, decorators: [{
|
|
16680
16683
|
type: Component,
|
|
@@ -16685,7 +16688,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
16685
16688
|
'[class.ard-grid__item]': '!container()',
|
|
16686
16689
|
'[class.ard-grid__item-grow]': '!container() && currentSize() === "grow"',
|
|
16687
16690
|
'[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"] }]
|
|
16691
|
+
}, 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
16692
|
}], ctorParameters: () => [] });
|
|
16690
16693
|
|
|
16691
16694
|
class ArdiumGridModule {
|
|
@@ -16726,28 +16729,29 @@ function provideStackDefaults(config) {
|
|
|
16726
16729
|
|
|
16727
16730
|
class ArdiumStackComponent {
|
|
16728
16731
|
constructor() {
|
|
16732
|
+
this._componentId = '602';
|
|
16729
16733
|
this._DEFAULTS = inject(ARD_STACK_DEFAULTS);
|
|
16730
16734
|
this._breakpointService = inject(ArdiumBreakpointService);
|
|
16731
16735
|
//! configurations
|
|
16732
|
-
this.direction = input(parseEnumOrBreakpointConfig(this._DEFAULTS.direction, this._breakpointService.breakpoints, isArdGridDirection), {
|
|
16733
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridDirection),
|
|
16736
|
+
this.direction = input(parseEnumOrBreakpointConfig(this._DEFAULTS.direction, this._breakpointService.breakpoints, this._componentId, isArdGridDirection), {
|
|
16737
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridDirection),
|
|
16734
16738
|
});
|
|
16735
|
-
this.justifyContent = input(parseEnumOrBreakpointConfig(this._DEFAULTS.justifyContent, this._breakpointService.breakpoints, isArdGridJustify), {
|
|
16736
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridJustify),
|
|
16739
|
+
this.justifyContent = input(parseEnumOrBreakpointConfig(this._DEFAULTS.justifyContent, this._breakpointService.breakpoints, this._componentId, isArdGridJustify), {
|
|
16740
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridJustify),
|
|
16737
16741
|
});
|
|
16738
|
-
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, isArdGridAlign), {
|
|
16739
|
-
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridAlign),
|
|
16742
|
+
this.alignItems = input(parseEnumOrBreakpointConfig(this._DEFAULTS.alignItems, this._breakpointService.breakpoints, this._componentId, isArdGridAlign), {
|
|
16743
|
+
transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridAlign),
|
|
16740
16744
|
});
|
|
16741
|
-
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints), {
|
|
16742
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16745
|
+
this.spacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.spacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16746
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16743
16747
|
});
|
|
16744
|
-
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints), {
|
|
16745
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16748
|
+
this.columnSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.columnSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16749
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16746
16750
|
});
|
|
16747
|
-
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints), {
|
|
16748
|
-
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints),
|
|
16751
|
+
this.rowSpacing = input(parseCSSUnitOrBreakpointConfig(this._DEFAULTS.rowSpacing, this._breakpointService.breakpoints, this._componentId), {
|
|
16752
|
+
transform: value => parseCSSUnitOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId),
|
|
16749
16753
|
});
|
|
16750
|
-
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, isArdGridWrap) });
|
|
16754
|
+
this.wrap = input(parseEnumOrBreakpointConfig(this._DEFAULTS.wrap, this._breakpointService.breakpoints, this._componentId, isArdGridWrap), { transform: value => parseEnumOrBreakpointConfig(value, this._breakpointService.breakpoints, this._componentId, isArdGridWrap) });
|
|
16751
16755
|
//! computed properties
|
|
16752
16756
|
this.finalColumnSpacing = computed(() => this.columnSpacing() ?? this.spacing());
|
|
16753
16757
|
this.finalRowSpacing = computed(() => this.rowSpacing() ?? this.spacing());
|