Skip to content
Open
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2802c4b
feat(button-demo): button component and controls separate
ppipicz24 Oct 6, 2025
04a885d
feat(button-demo): replacing controls with ids components
ppipicz24 Oct 6, 2025
f8ddfd8
feat(button-demo): button model events are triggered
ppipicz24 Oct 13, 2025
8fbe1ec
feat(button-demo): checkbox to switch
ppipicz24 Oct 13, 2025
3f05981
moving folder
ppipicz24 Oct 14, 2025
71a1b1c
components routing work in general
ppipicz24 Oct 15, 2025
a370109
accordion new
ppipicz24 Oct 15, 2025
ea1c61c
style changes
ppipicz24 Oct 15, 2025
d1434b5
demo components routing
ppipicz24 Oct 21, 2025
4ee70d2
demo controls routing
ppipicz24 Oct 22, 2025
20bd991
action-menu-demo refactor
ppipicz24 Oct 22, 2025
7dbfd1d
action-menu-demo refactor
ppipicz24 Oct 22, 2025
e87910b
avatar demo done
ppipicz24 Oct 27, 2025
8eb2064
accordion demo done
ppipicz24 Oct 27, 2025
58cf91d
breadcrumb demo done
ppipicz24 Oct 27, 2025
2a265d8
button demo done
ppipicz24 Oct 27, 2025
1571f73
button done
ppipicz24 Oct 27, 2025
5f0ad51
button demo done
ppipicz24 Oct 27, 2025
6aef8c1
checkbox demo done
ppipicz24 Oct 28, 2025
906a1d0
card demo done
ppipicz24 Oct 28, 2025
66a779e
selector name change
ppipicz24 Oct 28, 2025
9d0e629
chip demo done
ppipicz24 Oct 28, 2025
4e4a75e
date type to idsDatepicker
ppipicz24 Oct 28, 2025
5ff2546
datepicker demo done
ppipicz24 Oct 28, 2025
69b07de
dialog demo done
ppipicz24 Oct 29, 2025
d680832
change services to injectable()
ppipicz24 Oct 29, 2025
803f56f
divider demo done
ppipicz24 Oct 29, 2025
a0e676d
badge demo done
ppipicz24 Oct 29, 2025
36eb7f8
form-field demo done
ppipicz24 Oct 30, 2025
abe607c
fieldset demo done
ppipicz24 Oct 30, 2025
ccf48bc
paginator demo done
ppipicz24 Oct 31, 2025
4bd3801
overlay-panel demo done
ppipicz24 Oct 31, 2025
dc8d16f
notification demo done
ppipicz24 Oct 31, 2025
584cc3d
menu-item demo done
ppipicz24 Oct 31, 2025
7b0ca8b
icon-button demo done
ppipicz24 Oct 31, 2025
6e298fa
radio demo done
ppipicz24 Oct 31, 2025
7e5c7d7
scrollbar demo done
ppipicz24 Oct 31, 2025
9bc4418
segmented control demo done
ppipicz24 Oct 31, 2025
d15ce6b
segmented control toggle demo done
ppipicz24 Oct 31, 2025
806c40b
side-sheet demo done
ppipicz24 Nov 4, 2025
01f540b
select demo done
ppipicz24 Nov 4, 2025
2c0ad2c
snackbar demo done
ppipicz24 Nov 4, 2025
3eca6c3
spinner demo done
ppipicz24 Nov 4, 2025
708a264
switch demo done
ppipicz24 Nov 4, 2025
0cc4f31
table demo done
ppipicz24 Nov 5, 2025
14dd6a9
tag demo done
ppipicz24 Nov 5, 2025
be4802f
tooltip demo done
ppipicz24 Nov 5, 2025
33683b3
ids controls done
ppipicz24 Nov 5, 2025
7b87f89
tab demo done
ppipicz24 Nov 6, 2025
9bb80c3
notification demo done
ppipicz24 Nov 6, 2025
78987a1
icon demo done
ppipicz24 Nov 6, 2025
e41f300
css
ppipicz24 Nov 6, 2025
366e457
formatting
ppipicz24 Nov 6, 2025
cccd174
Merge branch 'feature/navigation-from-statamic' of https://github.com…
ppipicz24 Nov 6, 2025
23be8d8
icon change
ppipicz24 Nov 6, 2025
0f9f127
fix(button-demo): button appearance fix
ppipicz24 Nov 10, 2025
c25d3ff
side nav demo done
ppipicz24 Nov 12, 2025
9f630c6
icon changes
ppipicz24 Nov 12, 2025
4825e4c
remove comments
ppipicz24 Nov 12, 2025
5c92927
fix scss
ppipicz24 Nov 12, 2025
eed1b2c
change numberArray to idsInput
ppipicz24 Nov 12, 2025
894d30b
remove comments
ppipicz24 Nov 12, 2025
065b422
new navigation from tabs
ppipicz24 Nov 26, 2025
c7bc59d
change control-table-small to control-table
ppipicz24 Nov 26, 2025
7a3ba8a
components loading and navigation change
ppipicz24 Nov 28, 2025
20c7fdf
change the visibility of the injected components
ppipicz24 Nov 28, 2025
d0b7596
delete comments and empty files
ppipicz24 Dec 1, 2025
6c99bf7
delete square bracket bindings
ppipicz24 Dec 5, 2025
f5035a4
delete padding
ppipicz24 Dec 5, 2025
e1578b4
change gap between divs
ppipicz24 Dec 5, 2025
77818b2
change height pixel to rem
ppipicz24 Dec 5, 2025
c9617d4
feat(componentDetails): replace any types
ppipicz24 Dec 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
<!-- <ids-nav [menu]="menuConfigs" /> -->
<ids-nav [menu]="dynamicMenu" />
<main cdkScrollable>
<div class="container p-8 mx-auto"><router-outlet /></div>
<div class="container p-8 mx-auto"> <router-outlet/></div>
</main>
783 changes: 635 additions & 148 deletions projects/demo/src/app/app.routes.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<ids-card appearance="filled" class="control-card-group">
<header idsCardHeader>
<h2 idsCardTitle>{{ _caption() | sentenceCase }} controls</h2>
</header>

<ids-card-body style="overflow: visible">
@for (control of _flatControls(); track $index) {
<div class="control-row">
<div class="control-name">{{ control.name }}</div>

<div class="control-input">
@let disabled = control.disabled ?? false;

@switch (control.control) {
@case (_demoControl.SWITCH) {
<ids-switch
[hasIcon]="true"
[name]="control.name"
[id]="control.name"
[disabled]="disabled"
[(ngModel)]="model()[control.name]"
(ngModelChange)="control.onModelChange?.($event)"
/>
}
@case (_demoControl.SELECT) {
<ids-form-field style="width: 100%; z-index: 10; position: relative">
<ids-select
style="width: 100%"
[disabled]="disabled"
[(ngModel)]="model()[control.name]"
(ngModelChange)="control.onModelChange?.($event)"
>
<ids-option-group>
@for (item of control.list; track $index) {
<ids-option [value]="item">{{ item }}</ids-option>
}
</ids-option-group>
</ids-select>
</ids-form-field>
}
@case (_demoControl.NUMBER) {
<ids-form-field style="width: 100%; z-index: 10; position: relative">
<input
idsInput
type="number"
style="width: 100%"
[name]="control.name"
[id]="control.name"
[disabled]="disabled"
[attr.min]="control.min"
[attr.step]="control.step"
[(ngModel)]="model()[control.name]"
(ngModelChange)="control.onModelChange?.($event)"
/>
</ids-form-field>
}

@case (_demoControl.DATE) {
<ids-form-field style="width: 100%" [variant]="'surface'">
<input
#inputFieldModel="ngModel"
#datepicker="idsDatepicker"
idsInput
idsDatepicker
style="width: 100%"
[name]="control.name"
[id]="control.name"
[disabled]="disabled"
[(ngModel)]="model()[control.name]"
(ngModelChange)="control.onModelChange?.($event)"
/>

<ids-datepicker-trigger idsSuffix [for]="datepicker" />
</ids-form-field>
}
@case (_demoControl.NUMBERARRAY) {
<ids-form-field style="width: 100%" [variant]="'surface'">
<input
idsInput
type="text"
style="width: 100%"
[name]="control.name"
[id]="control.name"
[disabled]="disabled"
[(ngModel)]="model()[control.name]"
(ngModelChange)="_convertModelValueStringToNumberArray(control.name); control.onModelChange?.($event)"
/>
</ids-form-field>
}
@default {
<ids-form-field style="width: 100%" [variant]="'surface'">
<input
#inputFieldModel="ngModel"
idsInput
type="text"
style="width: 100%"
[name]="control.name"
[id]="control.name"
[disabled]="disabled"
[(ngModel)]="model()[control.name]"
(ngModelChange)="control.onModelChange?.($event)"
/>
</ids-form-field>
}
}
</div>
</div>
}
</ids-card-body>
</ids-card>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.control-card-group {
// Add spacing between the multiple control card groups
// margin-bottom: 20px;
}

.ids-card-title {
color: var(--smc-reference-container-color-fg-secondary-fixed-darker-30, #1e293b);

/* ids/title/medium/prominent */
font-family: Montserrat;
font-size: 16px;
font-style: normal;
font-weight: 600;
line-height: 24px; /* 150% */
}

.control-row {
// Use Flexbox to align the name and input side-by-side
display: flex;
align-items: center;
padding: 10px 0; // Vertical padding for row separation
}

.control-name {
// Allocate space for the name column, similar to the 15% in the original table
flex: 0 0 150px; // Use a fixed width or percentage based on your needs
// padding-right: 20px;
// font-weight: 600; // Make the label stand out
color: var(--smc-reference-container-color-fg-secondary-fixed-default, #64748b);
/* ids/body/large/regular */
font-family: Montserrat;
font-size: 16px;
font-style: normal;
font-weight: 400;
line-height: 24px; /* 150% */
letter-spacing: 0.5px;
}

.control-input {
// The control takes up the remaining space
display: flex;
align-items: center;
flex: 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import { DemoControl, DemoControlConfig, DemoControlItem } from '../../../../types/demo-control.type';

import { CommonModule } from '@angular/common';
import { Component, computed, input, model, output } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { IdsCardBodyDirective, IdsCardComponent, IdsCardHeaderComponent, IdsCardTitleDirective } from '@i-cell/ids-angular/card';
import { IdsSentenceCasePipe } from '@i-cell/ids-angular/core';
import { IdsDatepickerTriggerComponent, IdsDatepickerDirective } from '@i-cell/ids-angular/datepicker';
import { IdsFormFieldComponent, IdsInputDirective, IdsOptionComponent, IdsOptionGroupComponent, IdsSuffixDirective } from '@i-cell/ids-angular/forms';
import { IdsSelectComponent } from '@i-cell/ids-angular/select';
import { IdsSwitchComponent } from '@i-cell/ids-angular/switch';

const DEFAULT_CONTROL_TABLE_PADDING = 8;

@Component({
selector: 'app-control-table-small',
imports: [
CommonModule,
IdsSentenceCasePipe,
FormsModule,
IdsSwitchComponent,
IdsSelectComponent,
IdsFormFieldComponent,
IdsOptionComponent,
IdsOptionGroupComponent,
IdsCardComponent,
IdsCardTitleDirective,
IdsCardBodyDirective,
IdsCardHeaderComponent,
IdsInputDirective,
IdsDatepickerDirective,
IdsSuffixDirective,
IdsDatepickerTriggerComponent,
],
templateUrl: './control-table-small.component.html',
styleUrl: './control-table-small.component.scss',
})
export class ControlTableSmallComponent<T extends Record<string, T[keyof T]>> {
public cellPadding = input<number>(DEFAULT_CONTROL_TABLE_PADDING);
public configType = input<'input' | 'helper'>('input');
public controlName = input<string | undefined>();
public controlConfig = input<DemoControlConfig<T>>();
public model = model.required<T>();
public modelChange = output<T>();
public resetted = output<void>();

protected _demoControl = DemoControl;

protected _caption = computed(() => [
this.controlName(),
this.configType(),
].filter(Boolean).join(' '));

protected _flatControls = computed(() => {
const controls = this.controlConfig();
if (!controls) {
return [];
}
return Object.entries<DemoControlItem<T[keyof T]>>(controls).map(([
key,
ctrl,
]) => {
const listToDisplay = ctrl.control === 'select' ? ctrl.list : undefined;
return ({
name: key,
...ctrl,
list: listToDisplay,
});
});
});

protected _convertModelValueStringToNumberArray(controlName: keyof T): void {
const value = this.model()[controlName];
if (typeof value === 'string') {
this.model.update((obj) => ({
...obj,
[controlName]: this._stringToArray(obj[controlName] as string).map((item) => +item) as T[keyof T],
}));
}
}

private _stringToArray(value: string): string[] {
const arr = value.split(',').map((item) => item.trim()).filter(Boolean);
if (arr.length === 0) {
return [];
}
return arr;
}

protected _reset(): void {
this.resetted.emit();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="flex items-center mb-12 gap-ids-container-gap-16">
@if (heroData().isBackButton) {
<button type="button" idsIconButton size="comfortable" variant="surface" appearance="standard" (click)="goBack()">
<ids-icon aria-hidden="true" alt="" fontIcon="arrow-left" />
<ids-icon aria-hidden="true" alt="" fontIcon="west" />
</button>
}
<h1 class="text-display-medium-prominent">{{ heroData().title }}</h1>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<section class="controls">
<div class="control-tables-container">
<ng-content select="[controls]" />
</div>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-control-tryout',
templateUrl: './tryout-controls.component.html',
styleUrl: './tryout.component.scss',
})
export class TryoutControlComponent {

}
13 changes: 0 additions & 13 deletions projects/demo/src/app/components/tryout/tryout.component.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<div class="title">
<h1>{{ title() }}</h1>
<button type="button" idsIconButton appearance="standard" variant="dark" (click)="_reset()">
<ids-icon fontIcon="reload" />
</button>
</div>

<section class="component" [class.light]="hasDarkBackground()">
<ng-content select="[component]" />
</section>

<section class="controls">
<div class="control-tables-container">
<ng-content select="[controls]" />
</div>
</section>
13 changes: 10 additions & 3 deletions projects/demo/src/app/components/tryout/tryout.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
display: flex;
flex-direction: column;
gap: 1rem;
padding: 2rem;
box-sizing: border-box;
height: 100%;
overflow: hidden;
justify-content: center;
align-items: stretch;
}

.title {
Expand All @@ -24,14 +25,20 @@
}

section {
padding: 2rem;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
align-items: stretch;
gap: 4rem;

&.component {
padding: 2rem;

display: flex;
justify-content: center;
align-items: center;
flex: 1 0 0;

&.light {
color: var(--ids-smc-colors-surface-lighter-10);
background-color: var(--ids-smc-colors-surface-darker-80);
Expand Down
15 changes: 2 additions & 13 deletions projects/demo/src/app/components/tryout/tryout.component.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
import { Component, input, output } from '@angular/core';
import { IdsIconComponent } from '@i-cell/ids-angular/icon';
import { IdsIconButtonComponent } from '@i-cell/ids-angular/icon-button';
import { Component, input } from '@angular/core';

@Component({
selector: 'app-tryout',
imports: [
IdsIconButtonComponent,
IdsIconComponent,
],
templateUrl: './tryout.component.html',
styleUrl: './tryout.component.scss',
})
export class TryoutComponent {
public title = input.required<string>();
public hasDarkBackground = input<boolean>(false);

public resetted = output<void>();
public hasDarkBackground = input<boolean>(false);

protected _reset(): void {
this.resetted.emit();
}
}
2 changes: 2 additions & 0 deletions projects/demo/src/app/model/componentEntry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export interface ComponentEntry {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
componentBlocks: any;
id: string;
title: string;
slug: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<app-control-tryout>
<app-control-table-small controls [configType]="'input'" [controlConfig]="accordionDemoService.inputControlConfig" [(model)]="accordionDemoService.model" />
</app-control-tryout>
Loading