Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"ngx-float-ui": "^19.0.1 || ^20.0.0 || ^21.0.0"
},
"dependencies": {
"@tedi-design-system/core": "^6.0.1"
"@tedi-design-system/core": "^6.1.0"
},
"devDependencies": {
"@angular-devkit/core": "19.2.15",
Expand Down
29 changes: 27 additions & 2 deletions skills/tedi-angular/references/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,26 @@ Implements `ControlValueAccessor`. Value type is `T` (single) or `T[]` (multisel
<a tedi-link href="/page" variant="default">Go to page</a>
```

### HorizontalStepper
**Selector:** `tedi-horizontal-stepper`
**Inputs:**
- `ariaLabel: string`
- `background: "default" | "transparent" = "default"`
- `compact: boolean | "sm" | "md" | "lg" | "xl" | "xxl" = "sm"` — collapse labels to show only indicators plus the selected step's label. `true` = always collapsed; a breakpoint = collapsed below that breakpoint.

**Sub-component:** `tedi-horizontal-stepper-item`
- `label: string` (required), `description: string`
- `completed`, `error`, `selected` (booleanAttribute inputs)
- `(stepSelect)` — emitted on click

```html
<tedi-horizontal-stepper ariaLabel="Form progress" compact="md">
<tedi-horizontal-stepper-item label="Request" completed />
<tedi-horizontal-stepper-item label="Application" selected />
<tedi-horizontal-stepper-item label="Response" />
</tedi-horizontal-stepper>
```

## Notifications

### Alert
Expand Down Expand Up @@ -700,8 +720,9 @@ openModal() {
size: 'default', // 'default' | 'small'
position: 'center', // 'center' | 'top' | 'left' | 'right'
closeOnBackdropClick: true,
closeOnEscape: true,
scrollBehavior: 'content', // 'content' | 'page'
mobileFullscreen: false,
fullscreen: false, // true | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | false
});

ref.closed.subscribe(result => console.log(result));
Expand All @@ -711,11 +732,15 @@ openModal() {
**ModalConfig inputs:**
- `data: unknown` — injected via `MODAL_DATA` token
- `width: ModalWidth = "sm"` — preset (`xs`-`xl`) or custom CSS value (`"80%"`, `"600px"`)
- `maxWidth: string` — max-width cap (e.g. `"75%"`, `"60vw"`). Overrides the default 95vw limit.
- `size: ModalSize = "default"` — `"default"` or `"small"`
- `position: ModalPosition = "center"` — `"center"`, `"top"`, `"left"`, `"right"`
- `closeOnBackdropClick: boolean = true`
- `closeOnEscape: boolean = true`
- `scrollBehavior: "content" | "page" = "content"`
- `mobileFullscreen: boolean = false`
- `fullscreen: boolean | "sm" | "md" | "lg" | "xl" | "xxl" = false` — `true` = always fullscreen; a breakpoint = fullscreen below that breakpoint.
- `ariaLabel: string` — ARIA label for the dialog.
- `ariaLabelledBy: string` — ID of the element that labels the dialog.

**ModalRef methods/properties:**
- `close(result?: R)` — close with optional result
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<button
class="tedi-horizontal-stepper-item__step"
type="button"
[disabled]="disabled()"
[attr.aria-current]="selected() ? 'step' : null"
(click)="onClick()"
>
<span class="tedi-horizontal-stepper-item__indicator">
@if (completed() && !error()) {
<tedi-icon
name="check"
color="white"
[size]="18"
[label]="'stepper.completed' | tediTranslate"
/>
} @else if (error()) {
<tedi-icon
name="exclamation"
color="white"
[size]="18"
[label]="'stepper.error' | tediTranslate"
/>
} @else {
<span class="tedi-horizontal-stepper-item__number">{{ _stepNumber() }}</span>
}
</span>
<span class="tedi-horizontal-stepper-item__content">
<span class="tedi-horizontal-stepper-item__label">{{ label() }}</span>
@if (description()) {
<span class="tedi-horizontal-stepper-item__description">{{ description() }}</span>
}
</span>
</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
.tedi-horizontal-stepper-item {
$host: &;

position: relative;
display: flex;

&__step {
position: relative;
display: flex;
gap: var(--stepper-item-horizontal-inner-spacing);
align-items: flex-start;
width: auto;
min-height: 40px;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use the variable here? min-height: var(--stepper-item-horizontal-min-height);

padding: var(--stepper-item-horizontal-padding-y) var(--stepper-item-horizontal-padding-x);
font-family: var(--family-default);
text-align: left;
cursor: pointer;
background: none;
border: none;
border-radius: 0;

&:focus-visible {
z-index: 2;
outline: 2px solid var(--general-focus-outline);
outline-offset: -2px;
}

&:disabled {
cursor: default;
}
}

&__indicator {
display: flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: var(--stepper-item-vertical-step-size-lg);
height: var(--stepper-item-vertical-step-size-lg);
background-color: var(--stepper-step-default-bg);
border: 1px solid var(--stepper-step-default-border);
border-radius: 100%;
}

&__number {
font-size: var(--body-small-bold-size);
font-weight: var(--body-bold-weight);
line-height: var(--body-small-bold-line-height);
color: var(--general-text-secondary);
}

&__content {
display: flex;
flex-direction: column;
justify-content: center;
white-space: nowrap;
}

&__label {
font-size: var(--body-regular-size);
font-weight: var(--body-regular-weight);
line-height: var(--body-regular-line-height);
color: var(--stepper-item-horizontal-text-default);
}

&__description {
font-size: var(--body-small-regular-size);
font-weight: var(--body-small-regular-weight);
line-height: var(--body-small-regular-line-height);
color: var(--general-text-tertiary);
}

&:not(#{$host}--selected):not(#{$host}--completed):not(#{$host}--error) {
#{$host}__step:hover:not(:disabled) {
#{$host}__indicator {
background-color: var(--stepper-step-default-bg-hover);
border-color: var(--stepper-step-default-border-hover);
}

#{$host}__number {
color: var(--general-text-white);
}

#{$host}__label {
color: var(--stepper-item-horizontal-text-hover);
}
}

#{$host}__step:active:not(:disabled) {
#{$host}__indicator {
background-color: var(--stepper-step-default-bg-active);
border-color: var(--stepper-step-default-border-active);
}

#{$host}__number {
color: var(--general-text-white);
}

#{$host}__label {
color: var(--stepper-item-horizontal-text-hover);
}
}
}

// -------------------------------------------------------
// Selected
// -------------------------------------------------------
&--selected {
--_step-arrow-width: 1rem;

z-index: 1;

#{$host}__step {
padding-right: calc(var(--stepper-item-horizontal-padding-x) + var(--_step-arrow-width));
cursor: default;
background-color: var(--stepper-item-horizontal-type-selected-bg-default);
clip-path: polygon(0 0, calc(100% - var(--_step-arrow-width)) 0, 100% 50%, calc(100% - var(--_step-arrow-width)) 100%, 0 100%);
}

#{$host}__indicator {
background-color: var(--stepper-step-default-bg);
border-color: transparent;
}

#{$host}__number {
font-weight: var(--body-bold-weight);
color: var(--general-text-brand);
}

#{$host}__label {
font-weight: var(--body-bold-weight);
line-height: var(--body-bold-line-height);
color: var(--stepper-item-horizontal-text-selected);
}

#{$host}__description {
color: var(--general-text-white);
}
}

&--completed {
#{$host}__step {
background-color: var(--stepper-item-horizontal-type-completed-bg-default);
}

#{$host}__indicator {
background-color: var(--stepper-step-completed-bg);
border-color: transparent;
}

#{$host}__label {
color: var(--stepper-item-horizontal-text-completed-default);
}

#{$host}__description {
color: var(--stepper-item-horizontal-text-completed-default);
}

#{$host}__step:hover:not(:disabled) {
#{$host}__indicator {
background-color: var(--stepper-step-completed-bg-hover);
}

#{$host}__label,
#{$host}__description {
color: var(--stepper-item-horizontal-text-completed-hover);
}
}

#{$host}__step:active:not(:disabled) {
background-color: var(--stepper-item-horizontal-type-completed-bg-active);

#{$host}__indicator {
background-color: var(--stepper-step-completed-bg-hover);
}

#{$host}__label,
#{$host}__description {
color: var(--stepper-item-horizontal-text-completed-hover);
}
}
}

&--error {
#{$host}__step {
background-color: var(--stepper-item-horizontal-type-danger-bg-default);
}

#{$host}__indicator {
background-color: var(--stepper-step-danger-bg);
border-color: transparent;
}

#{$host}__label {
color: var(--stepper-item-horizontal-text-danger-default);
}

#{$host}__description {
color: var(--stepper-item-horizontal-text-danger-default);
}

#{$host}__step:hover:not(:disabled) {
#{$host}__indicator {
background-color: var(--stepper-step-danger-bg-hover);
}

#{$host}__label,
#{$host}__description {
color: var(--stepper-item-horizontal-text-danger-hover);
}
}

#{$host}__step:active:not(:disabled) {
background-color: var(--stepper-item-horizontal-type-danger-bg-active);

#{$host}__indicator {
background-color: var(--stepper-step-danger-bg-hover);
}

#{$host}__label,
#{$host}__description {
color: var(--stepper-item-horizontal-text-danger-hover);
}
}
}
}
Loading
Loading