+
{variant === 'default' || showIndicator ? (
{
onChangeHandler(value, e.target.checked);
}}
- className={styles['tedi-choice-group-item__input']}
+ className="visually-hidden"
role={type === 'radio' ? 'radio' : undefined}
aria-checked={isChecked}
+ tabIndex={-1}
/>
- {helper &&
}
+ {helper &&
}
{inputUpdated && (
{inputUpdated}
From 26ca01b7c576caf898872d53f1012f6763ed5341 Mon Sep 17 00:00:00 2001
From: semantic-release-bot
Date: Fri, 20 Feb 2026 05:26:31 +0000
Subject: [PATCH 37/46] chore(release): 16.0.0-rc.16
# [16.0.0-rc.16](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.15...react-16.0.0-rc.16) (2026-02-20)
### Bug Fixes
* **number-field:** fix variables [#516](https://github.com/TEDI-Design-System/react/issues/516) ([#522](https://github.com/TEDI-Design-System/react/issues/522)) ([dcf6240](https://github.com/TEDI-Design-System/react/commit/dcf62404afa9543c13277623a9aaa6daed1b93df))
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5839a7c27..49907ce25 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# [16.0.0-rc.16](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.15...react-16.0.0-rc.16) (2026-02-20)
+
+
+### Bug Fixes
+
+* **number-field:** fix variables [#516](https://github.com/TEDI-Design-System/react/issues/516) ([#522](https://github.com/TEDI-Design-System/react/issues/522)) ([dcf6240](https://github.com/TEDI-Design-System/react/commit/dcf62404afa9543c13277623a9aaa6daed1b93df))
+
# [16.0.0-rc.15](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.14...react-16.0.0-rc.15) (2026-02-19)
From 097627db68e23afaa27dd288319b34ccba3e5888 Mon Sep 17 00:00:00 2001
From: Airike Jaska <95303654+airikej@users.noreply.github.com>
Date: Wed, 25 Feb 2026 15:05:43 +0200
Subject: [PATCH 38/46] fix(checkbox,radio): show pointer on label hover #532
(#533)
---
src/tedi/components/form/checkbox/checkbox.module.scss | 2 +-
src/tedi/components/form/checkbox/checkbox.tsx | 6 +++++-
src/tedi/components/form/radio/radio.module.scss | 3 ++-
src/tedi/components/form/radio/radio.tsx | 6 +++++-
4 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/tedi/components/form/checkbox/checkbox.module.scss b/src/tedi/components/form/checkbox/checkbox.module.scss
index 20e351cd3..b7562273b 100644
--- a/src/tedi/components/form/checkbox/checkbox.module.scss
+++ b/src/tedi/components/form/checkbox/checkbox.module.scss
@@ -6,7 +6,7 @@
@include mixins.print-grayscale;
- &:hover:not(.checkbox--disabled) {
+ &:hover:not(.tedi-checkbox--disabled) label {
cursor: pointer;
}
diff --git a/src/tedi/components/form/checkbox/checkbox.tsx b/src/tedi/components/form/checkbox/checkbox.tsx
index 8a0d87354..303f766db 100644
--- a/src/tedi/components/form/checkbox/checkbox.tsx
+++ b/src/tedi/components/form/checkbox/checkbox.tsx
@@ -57,7 +57,11 @@ export const Checkbox = (props: CheckboxProps): JSX.Element => {
const LabelBEM = cn(styles['tedi-checkbox__label'], { [styles['tedi-checkbox--disabled']]: disabled });
return (
-
+
diff --git a/src/tedi/components/form/radio/radio.module.scss b/src/tedi/components/form/radio/radio.module.scss
index 4c4aa6cc4..bca07f7dc 100644
--- a/src/tedi/components/form/radio/radio.module.scss
+++ b/src/tedi/components/form/radio/radio.module.scss
@@ -6,12 +6,13 @@
@include mixins.print-grayscale;
- &:hover:not(.tedi-radio--disabled) {
+ &:hover:not(.tedi-radio--disabled) label {
cursor: pointer;
}
&--disabled {
color: var(--general-text-disabled);
+ cursor: not-allowed;
}
&__input {
diff --git a/src/tedi/components/form/radio/radio.tsx b/src/tedi/components/form/radio/radio.tsx
index 9590b8ff4..d49a6cda6 100644
--- a/src/tedi/components/form/radio/radio.tsx
+++ b/src/tedi/components/form/radio/radio.tsx
@@ -50,7 +50,11 @@ export const Radio = (props: RadioProps): JSX.Element => {
const LabelBEM = cn(styles['tedi-radio__label'], { [styles['tedi-radio--disabled']]: disabled });
return (
-
+
From 043a23618e9e5f3b716b1ddb776f14982ad6ba08 Mon Sep 17 00:00:00 2001
From: semantic-release-bot
Date: Wed, 25 Feb 2026 13:09:57 +0000
Subject: [PATCH 39/46] chore(release): 16.0.0-rc.17
# [16.0.0-rc.17](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.16...react-16.0.0-rc.17) (2026-02-25)
### Bug Fixes
* **checkbox,radio:** show pointer on label hover [#532](https://github.com/TEDI-Design-System/react/issues/532) ([#533](https://github.com/TEDI-Design-System/react/issues/533)) ([097627d](https://github.com/TEDI-Design-System/react/commit/097627db68e23afaa27dd288319b34ccba3e5888))
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 49907ce25..772692d48 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# [16.0.0-rc.17](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.16...react-16.0.0-rc.17) (2026-02-25)
+
+
+### Bug Fixes
+
+* **checkbox,radio:** show pointer on label hover [#532](https://github.com/TEDI-Design-System/react/issues/532) ([#533](https://github.com/TEDI-Design-System/react/issues/533)) ([097627d](https://github.com/TEDI-Design-System/react/commit/097627db68e23afaa27dd288319b34ccba3e5888))
+
# [16.0.0-rc.16](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.15...react-16.0.0-rc.16) (2026-02-20)
From 93e9e118aab73d40347029089c5370851a7b551c Mon Sep 17 00:00:00 2001
From: Airike Jaska <95303654+airikej@users.noreply.github.com>
Date: Wed, 25 Feb 2026 15:32:16 +0200
Subject: [PATCH 40/46] feat(separator): redesign with new spacing API,
dotPosition and dotStyle support #30 (#525)
* feat(separator): redesign with new spacing API, dotPosition and dotStyle support #30
BREAKING CHANGE: legacy spacing props removed, dotSize enum changed, variant values simplified
* chore: fix stories that use Separator #30
* fix(separator): design review fixes #30
* fix(separator): change outlined dotted dot background color #30
* fix(separator): improve css #30
---
.../left-panel/left-panel-footer.tsx | 2 +-
.../components/cards/card/card.stories.tsx | 2 +-
.../misc/separator/separator.module.scss | 244 ++++++----
.../misc/separator/separator.spec.tsx | 177 +++----
.../misc/separator/separator.stories.tsx | 441 +++++++++++++-----
.../components/misc/separator/separator.tsx | 186 +++++---
6 files changed, 679 insertions(+), 373 deletions(-)
diff --git a/src/community/components/map-components/left-panel/left-panel-footer.tsx b/src/community/components/map-components/left-panel/left-panel-footer.tsx
index 526f38fc9..f3d725cbc 100644
--- a/src/community/components/map-components/left-panel/left-panel-footer.tsx
+++ b/src/community/components/map-components/left-panel/left-panel-footer.tsx
@@ -7,7 +7,7 @@ const LeftPanelFooter = () => {
Tume režiim} />
-
+
diff --git a/src/tedi/components/cards/card/card.stories.tsx b/src/tedi/components/cards/card/card.stories.tsx
index 4d2c39ab7..48ddc9f8e 100644
--- a/src/tedi/components/cards/card/card.stories.tsx
+++ b/src/tedi/components/cards/card/card.stories.tsx
@@ -283,7 +283,7 @@ const Timeline: StoryFn = (args) => (
Card content
-
+
Card content
diff --git a/src/tedi/components/misc/separator/separator.module.scss b/src/tedi/components/misc/separator/separator.module.scss
index 0e17b456e..6d648458d 100644
--- a/src/tedi/components/misc/separator/separator.module.scss
+++ b/src/tedi/components/misc/separator/separator.module.scss
@@ -13,6 +13,15 @@ $sizes: (
'2-5': 2.5rem,
'5': 5rem,
);
+$thicknesses: (
+ '1': 1px,
+ '2': 2px,
+);
+$dot-colors: (
+ 'primary': var(--general-border-primary),
+ 'secondary': var(--general-border-secondary),
+ 'accent': var(--general-border-accent),
+);
.tedi-separator {
--vertical-separator-height: 100%;
@@ -30,12 +39,8 @@ $sizes: (
border-left: 1px solid var(--general-border-primary);
}
- &--secondary {
- border-color: var(--general-border-secondary);
- }
-
- &--accent {
- border-color: var(--general-border-accent);
+ &--horizontal {
+ display: block;
}
&--block {
@@ -45,84 +50,38 @@ $sizes: (
&--inline {
display: inline;
}
-}
-
-.tedi-separator--dotted,
-.tedi-separator--dotted-small {
- &::before {
- position: absolute;
- top: 1.25rem;
- width: var(--separator-dotted-dot-lg);
- height: var(--separator-dotted-dot-lg);
- content: '';
- background-color: var(--general-border-primary);
- border-radius: 100%;
- transform: translateX(-8px);
-
- @include mixins.print-grayscale;
- }
- &.tedi-separator--secondary::before {
- background-color: var(--general-border-secondary);
+ &--secondary {
+ border-color: var(--general-border-secondary);
}
- &.tedi-separator--accent::before {
- background-color: var(--general-border-accent);
+ &--accent {
+ border-color: var(--general-border-accent);
}
-}
-.tedi-separator--dotted-small::before {
- top: 1.5rem;
- width: var(--separator-dotted-dot-md);
- height: var(--separator-dotted-dot-md);
- transform: translateX(-5px);
-}
-
-.tedi-separator--is-stretched {
- margin-right: calc(var(--card-content-padding-right) * -1);
- margin-left: calc(var(--card-content-padding-left) * -1);
+ &--is-stretched {
+ margin-right: calc(var(--card-content-padding-right) * -1);
+ margin-left: calc(var(--card-content-padding-left) * -1);
- &.tedi-separator--vertical {
- height: calc(100% + (var(--card-content-padding-top) + var(--card-content-padding-bottom)));
- margin: calc(var(--card-content-padding-top) * -1) 0 calc(var(--card-content-padding-bottom) * -1);
+ &.tedi-separator--vertical {
+ height: calc(100% + (var(--card-content-padding-top) + var(--card-content-padding-bottom)));
+ margin: calc(var(--card-content-padding-top) * -1) 0 calc(var(--card-content-padding-bottom) * -1);
+ }
}
}
-@each $size, $value in $sizes {
- .tedi-separator--horizontal.tedi-separator--top-#{$size} {
- margin-top: #{$value};
- }
-
- .tedi-separator--horizontal.tedi-separator--bottom-#{$size} {
- margin-bottom: #{$value};
- }
-
- .tedi-separator--horizontal.tedi-separator--spacing-#{$size}:not(.tedi-separator--dot-only) {
- margin-top: #{$value};
- margin-bottom: #{$value};
- }
+.tedi-separator--dotted {
+ &::before {
+ position: absolute;
+ content: '';
+ background-color: var(--general-border-primary);
+ border-radius: 50%;
- .tedi-separator--horizontal.tedi-separator--dot-only.tedi-separator--spacing-#{$size},
- .tedi-separator--vertical.tedi-separator--spacing-#{$size} {
- margin-right: #{$value};
- margin-left: #{$value};
+ @include mixins.print-grayscale;
}
-}
-
-$thicknesses: (
- '1': 1px,
- '2': 2px,
-);
-@each $thickness, $value in $thicknesses {
- .tedi-separator {
- &.tedi-separator--thickness-#{$thickness} {
- border-top-width: #{$value};
- }
-
- &--vertical.tedi-separator--thickness-#{$thickness} {
- border-left-width: #{$value};
- }
+ &.tedi-separator--vertical {
+ min-height: 3rem;
}
}
@@ -138,58 +97,139 @@ $thicknesses: (
width: var(--separator-dotted-dot-sm);
height: var(--separator-dotted-dot-sm);
content: '';
- border-radius: 100%;
+ border-radius: 50%;
@include mixins.print-grayscale;
}
- &.tedi-separator--dot-only-extra-small::before {
- width: var(--separator-dotted-dot-xs);
- height: var(--separator-dotted-dot-xs);
+ &.tedi-separator--dot-style-outlined::before {
+ background: transparent;
}
+}
- &.tedi-separator--dot-only-small::before {
- width: var(--separator-dotted-dot-sm);
- height: var(--separator-dotted-dot-sm);
+@each $name, $color in $dot-colors {
+ .tedi-separator--#{$name} {
+ border-color: $color;
+
+ &::before {
+ background-color: $color;
+ }
+
+ &.tedi-separator--dot-style-outlined:not(.tedi-separator--dot-only)::before {
+ border-color: $color;
+ }
}
+}
- &.tedi-separator--dot-only-medium::before {
- width: var(--separator-dotted-dot-md);
- height: var(--separator-dotted-dot-md);
+@each $size, $var in (extra-small: xs, small: sm, medium: md, large: lg) {
+ .tedi-separator--dot-only-#{$size}::before,
+ .tedi-separator--dotted-#{$size}::before,
+ .tedi-separator--dot-style-outlined.tedi-separator--dotted-#{$size}::before {
+ width: var(--separator-dot-size-#{$var});
+ height: var(--separator-dot-size-#{$var});
}
+}
- &.tedi-separator--dot-only-large::before {
- width: var(--separator-dotted-dot-lg);
- height: var(--separator-dotted-dot-lg);
+@each $axis in (horizontal, vertical) {
+ @each $pos in (start, center, end) {
+ .tedi-separator--#{$axis}.tedi-separator--dot-position-#{$pos}::before {
+ @if $axis == horizontal {
+ @if $pos == start {
+ right: auto;
+ left: 0;
+ } @else if $pos == center {
+ right: 0;
+ left: 0;
+ margin: auto;
+ } @else {
+ right: 0;
+ left: auto;
+ }
+ } @else {
+ @if $pos == start {
+ top: 0;
+ bottom: auto;
+ } @else if $pos == center {
+ top: 0;
+ bottom: 0;
+ margin: auto 0;
+ } @else {
+ top: auto;
+ bottom: 0;
+ }
+ }
+ }
}
+}
- &.tedi-separator--primary::before {
- background-color: var(--general-border-primary);
+.tedi-separator--horizontal.tedi-separator--dot-position-custom::before {
+ right: auto;
+ left: var(--separator-dot-position);
+}
+
+.tedi-separator--vertical.tedi-separator--dot-position-custom::before {
+ top: var(--separator-dot-position);
+ bottom: auto;
+}
+
+@each $size, $value in $sizes {
+ .tedi-separator--spacing-#{$size}:not(.tedi-separator--dot-only) {
+ margin: #{$value} 0;
+ }
+
+ .tedi-separator--dot-only.tedi-separator--spacing-#{$size} {
+ &.tedi-separator--horizontal {
+ margin-right: $value;
+ margin-left: $value;
+ }
+
+ &.tedi-separator--vertical {
+ margin-top: $value;
+ margin-bottom: $value;
+ }
}
- &.tedi-separator--secondary::before {
- background-color: var(--general-border-secondary);
+ @each $side in (top, bottom, left, right) {
+ .tedi-separator--#{$side}-#{$size} {
+ margin-#{$side}: $value;
+ }
}
+}
- &.tedi-separator--accent::before {
- background-color: var(--general-border-accent);
+@each $thickness, $value in $thicknesses {
+ .tedi-separator--thickness-#{$thickness} {
+ border-top-width: $value;
+ }
+ .tedi-separator--vertical.tedi-separator--thickness-#{$thickness} {
+ border-left-width: $value;
}
}
-.tedi-separator--horizontal {
- &.tedi-separator--dotted::before,
- &.tedi-separator--dotted-small::before {
- right: 0;
- left: 0;
- margin: 0 auto;
- transform: initial;
+@each $axis in (horizontal, vertical) {
+ @each $size, $var in (extra-small: xs, small: sm, medium: md, large: lg) {
+ .tedi-separator--#{$axis}.tedi-separator--dotted-#{$size}::before,
+ .tedi-separator--#{$axis}.tedi-separator--dot-style-outlined.tedi-separator--dotted-#{$size}::before {
+ @if $axis == horizontal {
+ top: calc((var(--separator-dot-size-#{$var}) / 2 + var(--separator-thickness)) * -1);
+ } @else {
+ left: calc((var(--separator-dot-size-#{$var}) / 2 + var(--separator-thickness) / 2) * -1);
+ }
+ }
}
+}
- &.tedi-separator--dotted::before {
- top: calc(var(--separator-dotted-dot-lg) / 2 * -1);
+.tedi-separator--dot-style-outlined {
+ &::before {
+ background-color: var(--general-surface-primary);
+ border-style: solid;
+ border-width: var(--separator-thickness);
}
- &.tedi-separator--dotted-small::before {
- top: calc(var(--separator-dotted-dot-md) / 2 * -1);
+ @each $name, $color in $dot-colors {
+ &.tedi-separator--#{$name}::before,
+ &.tedi-separator--dotted-#{$name}::before {
+ z-index: 10;
+ border-color: $color;
+ }
}
}
diff --git a/src/tedi/components/misc/separator/separator.spec.tsx b/src/tedi/components/misc/separator/separator.spec.tsx
index 65d9c7e20..694961d9a 100644
--- a/src/tedi/components/misc/separator/separator.spec.tsx
+++ b/src/tedi/components/misc/separator/separator.spec.tsx
@@ -17,132 +17,141 @@ describe('Separator Component', () => {
});
});
- const renderComponent = (props: SeparatorProps) => render();
+ const renderComponent = (props: P) =>
+ render();
- it('should render a div element by default', () => {
- const { getByTestId } = renderComponent({});
+ it('renders a div by default', () => {
+ const { getByTestId } = renderComponent({ element: 'div' });
expect(getByTestId('separator').tagName).toBe('DIV');
});
- it('should render the specified element', () => {
+ it('renders the specified element', () => {
const { getByTestId } = renderComponent({ element: 'hr' });
expect(getByTestId('separator').tagName).toBe('HR');
});
- it('should apply default classes', () => {
- const { getByTestId } = renderComponent({});
- const separator = getByTestId('separator');
- expect(separator).toHaveClass(styles['tedi-separator']);
- expect(separator).toHaveClass(styles['tedi-separator--thickness-1']);
- expect(separator).toHaveClass(styles['tedi-separator--horizontal']);
- });
-
- it('should apply additional classes from className prop', () => {
- const { getByTestId } = renderComponent({ className: 'custom-class' });
- expect(getByTestId('separator')).toHaveClass('custom-class');
- });
-
- it('should apply correct spacing class', () => {
- const { getByTestId } = renderComponent({ spacing: 1.25 });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--spacing-1-25']);
- });
+ it('applies base and default classes', () => {
+ const { getByTestId } = renderComponent({ axis: 'horizontal' });
+ const el = getByTestId('separator');
- it('should apply correct top and bottom spacing classes', () => {
- const { getByTestId } = renderComponent({ topSpacing: 0.5, bottomSpacing: 1 });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--top-0-5']);
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--bottom-1']);
+ expect(el).toHaveClass(styles['tedi-separator']);
+ expect(el).toHaveClass(styles['tedi-separator--horizontal']);
+ expect(el).toHaveClass(styles['tedi-separator--thickness-1']);
});
- it('should apply axis specific class', () => {
- const { getByTestId } = renderComponent({ axis: 'vertical' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--vertical']);
+ it('applies custom className', () => {
+ const { getByTestId } = renderComponent({ className: 'my-extra-class' });
+ expect(getByTestId('separator')).toHaveClass('my-extra-class');
});
- it('should apply color class', () => {
+ it('applies color modifier', () => {
const { getByTestId } = renderComponent({ color: 'accent' });
expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--accent']);
});
- it('should apply variant class', () => {
- const { getByTestId } = renderComponent({ variant: 'dotted' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dotted']);
+ it('applies vertical axis class and allows height', () => {
+ const { getByTestId } = renderComponent({ axis: 'vertical', height: 5.5 });
+ const el = getByTestId('separator');
+
+ expect(el).toHaveClass(styles['tedi-separator--vertical']);
+ expect(el).toHaveStyle('--vertical-separator-height: 5.5rem');
});
- it('should apply thickness class when no variant is used', () => {
- const { getByTestId } = renderComponent({ thickness: 2 });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--thickness-2']);
+ it('applies spacing classes — number value', () => {
+ const { getByTestId } = renderComponent({ spacing: 1.5 });
+ const el = getByTestId('separator');
+
+ expect(el).toHaveClass(styles['tedi-separator--top-1-5']);
+ expect(el).toHaveClass(styles['tedi-separator--bottom-1-5']);
});
- it('should not apply thickness class when variant is used', () => {
- const { getByTestId } = renderComponent({ variant: 'dotted', thickness: 2 });
- expect(getByTestId('separator')).not.toHaveClass(styles['tedi-separator--thickness-2']);
+ it('applies spacing classes — object value', () => {
+ const { getByTestId } = renderComponent({
+ spacing: { top: 2, bottom: 0.5, left: 1 },
+ axis: 'horizontal',
+ });
+ const el = getByTestId('separator');
+
+ expect(el).toHaveClass(styles['tedi-separator--top-2']);
+ expect(el).toHaveClass(styles['tedi-separator--bottom-0-5']);
+ expect(el).toHaveClass(styles['tedi-separator--left-1']);
});
- it('should apply isStretched class', () => {
+ it('applies isStretched class', () => {
const { getByTestId } = renderComponent({ isStretched: true });
expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--is-stretched']);
});
- it('should set height CSS variable for vertical separator', () => {
- const { getByTestId } = renderComponent({ axis: 'vertical', height: 2 });
- expect(getByTestId('separator')).toHaveStyle('--vertical-separator-height: 2rem');
+ it('applies thickness class when no variant', () => {
+ const { getByTestId } = renderComponent({ thickness: 2 });
+ expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--thickness-2']);
});
+ it('applies dotted class and dot size', () => {
+ const { getByTestId } = renderComponent({
+ variant: 'dotted',
+ dotSize: 'small',
+ dotPosition: 'center',
+ });
+ const el = getByTestId('separator');
- it('should apply dot-only variant class', () => {
- const { getByTestId } = renderComponent({ variant: 'dot-only' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dot-only']);
+ expect(el).toHaveClass(styles['tedi-separator--dotted']);
+ expect(el).toHaveClass(styles['tedi-separator--dotted-small']);
+ expect(el).toHaveClass(styles['tedi-separator--dot-position-center']);
});
- it('should apply correct dot size class when variant is dot-only and dotSize is extra small', () => {
- const { getByTestId } = renderComponent({ variant: 'dot-only', dotSize: 'extra-small' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dot-only-extra-small']);
+ it('applies custom dot position via CSS var', () => {
+ const { getByTestId } = renderComponent({
+ variant: 'dotted',
+ dotPosition: 2.75,
+ });
+ expect(getByTestId('separator')).toHaveStyle('--separator-dot-position: 2.75rem');
+ expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dot-position-custom']);
});
- it('should apply correct dot size class when variant is dot-only and dotSize is small', () => {
- const { getByTestId } = renderComponent({ variant: 'dot-only', dotSize: 'small' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dot-only-small']);
- });
+ it('applies dot-only and dot size class', () => {
+ const { getByTestId } = renderComponent({
+ variant: 'dot-only',
+ dotSize: 'large',
+ dotStyle: 'filled',
+ });
+ const el = getByTestId('separator');
- it('should apply correct dot size class when variant is dot-only and dotSize is medium', () => {
- const { getByTestId } = renderComponent({ variant: 'dot-only', dotSize: 'medium' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dot-only-medium']);
+ expect(el).toHaveClass(styles['tedi-separator--dot-only']);
+ expect(el).toHaveClass(styles['tedi-separator--dot-only-large']);
+ expect(el).not.toHaveClass(styles['tedi-separator--dot-style-outlined']);
});
- it('should apply correct dot size class when variant is dot-only and dotSize is large', () => {
- const { getByTestId } = renderComponent({ variant: 'dot-only', dotSize: 'large' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dot-only-large']);
- });
+ it('applies outlined style and thickness var when outlined', () => {
+ const { getByTestId } = renderComponent({
+ variant: 'dot-only',
+ dotSize: 'medium',
+ dotStyle: 'outlined',
+ thickness: 2,
+ });
+ const el = getByTestId('separator');
- it('should not apply dot size class when variant is not dot-only', () => {
- const { getByTestId } = renderComponent({ variant: 'dotted', dotSize: 'large' });
- expect(getByTestId('separator')).not.toHaveClass(styles['tedi-separator--dot-only-large']);
+ expect(el).toHaveClass(styles['tedi-separator--dot-style-outlined']);
+ expect(el).toHaveStyle('--separator-thickness: 2px');
+ expect(el).toHaveClass(styles['tedi-separator--thickness-2']);
});
- it('should default vertical separator display to block', () => {
+ it('requires dotSize (but test fallback/default)', () => {
+ const { getByTestId } = renderComponent({
+ variant: 'dot-only',
+ dotSize: 'large',
+ });
+ expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--dot-only-large']);
+ });
+ it('defaults to block display in vertical mode', () => {
const { getByTestId } = renderComponent({ axis: 'vertical' });
expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--block']);
});
- it('should apply inline display class to vertical separator when specified', () => {
- const { getByTestId } = renderComponent({ axis: 'vertical', display: 'inline' });
- expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--inline']);
- });
-
- it('should not apply inline display class to horizontal separator', () => {
- const { getByTestId } = renderComponent({ axis: 'horizontal', display: 'block' });
- expect(getByTestId('separator')).not.toHaveClass(styles['tedi-separator--inline']);
- });
- it('should apply dotSize class when variant is dot-only', () => {
- const { getByTestId } = renderComponent({ variant: 'dot-only', dotSize: 'medium' });
- const separator = getByTestId('separator');
- expect(separator).toHaveClass(styles['tedi-separator--dot-only']);
- expect(separator).toHaveClass(styles['tedi-separator--dot-only-medium']);
- });
-
- it('should ignore dotSize when variant is not dot-only', () => {
- const { getByTestId } = renderComponent({ variant: 'dotted', dotSize: 'medium' });
- const separator = getByTestId('separator');
- expect(separator).toHaveClass(styles['tedi-separator--dotted']);
- expect(separator).not.toHaveClass(styles['tedi-separator--dot-only-medium']);
+ it('applies inline display when specified (vertical)', () => {
+ const { getByTestId } = renderComponent({
+ axis: 'vertical',
+ display: 'inline-block',
+ });
+ expect(getByTestId('separator')).toHaveClass(styles['tedi-separator--inline-block']);
});
});
diff --git a/src/tedi/components/misc/separator/separator.stories.tsx b/src/tedi/components/misc/separator/separator.stories.tsx
index 5d5a4f6f5..385b2a01d 100644
--- a/src/tedi/components/misc/separator/separator.stories.tsx
+++ b/src/tedi/components/misc/separator/separator.stories.tsx
@@ -1,11 +1,10 @@
import { Meta, StoryFn, StoryObj } from '@storybook/react';
-import { Fragment } from 'react/jsx-runtime';
import { Text } from '../../base/typography/text/text';
import { Card, CardContent } from '../../cards/card';
import { Col, Row } from '../../layout/grid';
import { VerticalSpacing } from '../../layout/vertical-spacing';
-import Separator, { SeparatorProps } from './separator';
+import Separator, { DotSize, SeparatorProps } from './separator';
/**
* Figma ↗
@@ -32,86 +31,254 @@ const meta: Meta = {
export default meta;
type Story = StoryObj;
-const colorArray: SeparatorProps['color'][] = ['primary', 'secondary', 'accent'];
+const spacingArray: SeparatorProps['spacing'][] = [0, 0.5, 1, 1.5, 2, 2.5];
+const sizeArray: SeparatorProps['dotSize'][] = ['large', 'medium'];
+type TemplateMultipleProps = SeparatorProps & {
+ array: Type[];
+ property: keyof SeparatorProps;
+};
+const Template: StoryFn = (args) => ;
-const Template: StoryFn = (args) => (
- <>
- Some content
-
- Other content
- >
-);
+const SizesTemplate: StoryFn = (args) => {
+ const { array } = args;
-const ColorsAndThickness: StoryFn = (args) => (
- <>
- {colorArray.map((color) => (
-
-
-
-
+ return (
+
+ {array.map((value, key) => (
+
+
+ {value === 'large' ? 'Large' : 'Medium'}
-
-
-
-
+
+
+
+
+
-
- ))}
- >
-);
+ ))}
+
+ );
+};
-const VerticalColorTemplate: StoryFn = (args) => (
+const ColorsAndThickness: StoryFn = (args) => (
- {colorArray.map((color) => (
-
-
-
-
-
-
-
-
-
-
- ))}
+
+
+
+
);
-const DotOnlyTemplate: StoryFn = (args) => (
+const SpacingHorizontal: StoryFn = (args) => (
-
-
-
-
+ {spacingArray.map((spacing, index) => (
+
+ ))}
);
+const SpacingVertical: StoryFn = (args) => (
+
+ {spacingArray.map((spacing, index) => (
+
+
+
+ ))}
+
+);
+
export const Default: Story = {
render: Template,
args: { spacing: 1 },
};
-export const HorizontalColors: Story = {
+export const HorizontalSpacings: Story = {
+ render: SpacingHorizontal,
+ args: {
+ axis: 'horizontal',
+ },
+};
+
+export const HorizontalThickness: Story = {
render: ColorsAndThickness,
- args: { spacing: 1 },
};
-export const VerticalColors: Story = {
- render: VerticalColorTemplate,
- args: { axis: 'vertical', height: 5 },
+export const Vertical: Story = {
+ render: Template,
+ args: { axis: 'vertical', height: 3 },
+};
+
+export const VerticalSpacings: Story = {
+ render: SpacingVertical,
+ args: {
+ axis: 'vertical',
+ height: 3,
+ display: 'inline-block',
+ },
+};
+
+export const VerticalThickness: Story = {
+ render: ColorsAndThickness,
+ args: { axis: 'vertical', height: 3, display: 'inline' },
};
-export const PaddedEven: Story = {
+export const DottedLineHorizontal: Story = {
render: Template,
- args: { spacing: 1 },
+ args: { axis: 'horizontal', variant: 'dotted', color: 'accent', dotPosition: 'center' },
};
-export const PaddedUneven: Story = {
+export const DottedLineVertical: Story = {
render: Template,
- args: { topSpacing: 2.5, bottomSpacing: 0.5 },
+ args: { axis: 'vertical', variant: 'dotted', color: 'accent', height: 5, dotPosition: 'center' },
+};
+
+export const Sizes: StoryObj = {
+ render: SizesTemplate,
+
+ args: {
+ property: 'dotSize',
+ array: sizeArray,
+ },
+};
+
+export const SpacingTopDefault: Story = {
+ render: () => {
+ return (
+
+
+
+
+
+
+
+
+ );
+ },
+};
+
+export const SpacingTopSmall: Story = {
+ render: () => {
+ return (
+
+
+
+
+
+
+
+
+ );
+ },
+};
+
+export const Position: Story = {
+ render: () => {
+ return (
+ <>
+
+
+
+ Start
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Center
+
+
+
+
+
+
+
+
+
+
+
+
+ End
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+ },
};
const TemplateVertical: StoryFn = (args) => (
@@ -137,88 +304,132 @@ const TemplateVertical: StoryFn = (args) => (
);
-export const VerticalThick: Story = {
- render: TemplateVertical,
+export const DotFilled: Story = {
+ render: () => {
+ return (
+ <>
+
+ >
+ );
+ },
+};
+
+export const DotOutlined: Story = {
+ render: () => {
+ return (
+ <>
+
+ >
+ );
+ },
+};
+
+const dotSizeToPxMap: Record = {
+ xs: '2px',
+ sm: '4px',
+ md: '8px',
+ lg: '15px',
+};
+
+const DottedSizesTemplate: StoryFn = (args) => {
+ const { array } = args;
+
+ return (
+
+ {array.map((value, key) => (
+
+
+ {value !== undefined ? dotSizeToPxMap[value] || value : '—'}
+
+
+
+
+
+
+
+
+ ))}
+
+ );
+};
+
+export const DottedSizes: StoryObj = {
+ render: DottedSizesTemplate,
args: {
- axis: 'horizontal',
- thickness: 1,
- isStretched: true,
- topSpacing: 1,
- bottomSpacing: 1,
- md: { axis: 'vertical', thickness: 1 },
+ property: 'dotSize',
+ array: ['extra-small', 'small', 'medium', 'large'],
},
};
-export const VerticalDotted: Story = {
+const InlineSeparatorTemplate: StoryFn = (args) => {
+ const { dotPosition, ...safeArgs } = args;
+
+ return (
+ <>
+
+ Lorem ipsum dolor sit, amet
+
+ consectetur adipisicing elit.
+
+
+ Lorem ipsum dolor sit, amet
+
+ consectetur adipisicing elit.
+
+
+ Lorem ipsum dolor sit, amet
+
+ consectetur adipisicing elit.
+
+
+ Lorem ipsum dolor sit, amet
+
+ consectetur adipisicing elit.
+
+ >
+ );
+};
+
+export const InlineSeparatorUsage: Story = {
+ render: InlineSeparatorTemplate,
+ args: { axis: 'vertical', display: 'inline' },
+};
+
+export const VerticalDottedCardExample: Story = {
render: TemplateVertical,
args: {
axis: 'horizontal',
variant: 'dotted',
color: 'accent',
- topSpacing: 1,
- bottomSpacing: 1,
+ spacing: 1,
isStretched: true,
+ dotPosition: 1.25,
md: { axis: 'vertical' },
},
};
-export const VerticalDottedSmall: Story = {
+export const VerticalDottedSmallCardExample: Story = {
render: TemplateVertical,
args: {
axis: 'horizontal',
- topSpacing: 1,
- bottomSpacing: 1,
- variant: 'dotted-small',
+ spacing: 1,
+ variant: 'dotted',
+ dotSize: 'medium',
color: 'accent',
isStretched: true,
+ dotPosition: 1.25,
md: { axis: 'vertical' },
},
};
-
-export const HorizontalDottedSeparator: Story = {
- render: () => (
-
-
-
-
-
-
-
-
- ),
-};
-
-export const DotOnly: Story = {
- render: DotOnlyTemplate,
- args: { spacing: 0.5 },
-};
-
-const InlineSeparatorTemplate: StoryFn = (args) => (
-
-
- Lorem ipsum dolor sit, amet
-
- consectetur adipisicing elit.
-
-
- Lorem ipsum dolor sit, amet
-
- consectetur adipisicing elit.
-
-
- Lorem ipsum dolor sit, amet
-
- consectetur adipisicing elit.
-
-
- Lorem ipsum dolor sit, amet
-
- consectetur adipisicing elit.
-
-
-);
-
-export const InlineSeparatorUsedInText: Story = {
- render: InlineSeparatorTemplate,
- args: { axis: 'vertical', display: 'inline' },
-};
diff --git a/src/tedi/components/misc/separator/separator.tsx b/src/tedi/components/misc/separator/separator.tsx
index bcf4f7682..cabe5bd3c 100644
--- a/src/tedi/components/misc/separator/separator.tsx
+++ b/src/tedi/components/misc/separator/separator.tsx
@@ -4,130 +4,162 @@ import { CSSProperties } from 'react';
import { BreakpointSupport, useBreakpointProps } from '../../../helpers';
import styles from './separator.module.scss';
-export type SeparatorSpacing = 0 | 0.25 | 0.5 | 0.75 | 1 | 1.25 | 1.5 | 1.75 | 2 | 2.5 | 5;
+export type SeparatorVariant = 'dotted' | 'dot-only';
+export type DotSize = 'large' | 'medium' | 'small' | 'extra-small';
+export type DotStyle = 'filled' | 'outlined';
+export type DotPosition = 'start' | 'center' | 'end' | number;
+
+/**
+ * Margin/padding-like spacing around the separator
+ * - number → uniform spacing on main axis
+ * - object → fine-grained control (top/bottom/left/right)
+ */
+export type SeparatorSpacing =
+ | number
+ | {
+ top?: number;
+ bottom?: number;
+ left?: number;
+ right?: number;
+ };
export interface SeparatorSharedProps {
/**
- * Additional class.
+ * Additional class names
*/
className?: string;
/**
- * Rendered HTML element.
- * @default div
+ * HTML element to render — most common are 'hr', 'div', 'span'
*/
element?: 'hr' | 'div' | 'span';
/**
- * Whether the separator should stretch to fill the full spacing inside cardContent.
+ * When true, the separator stretches to fill available space (100%)
*/
isStretched?: boolean;
- /*
- * Color of separator
- * @default default
+ /**
+ * Semantic color token
+ * @default primary
*/
color?: 'primary' | 'secondary' | 'accent';
- /*
- * Separator style variant.
- */
- variant?: 'dotted' | 'dotted-small' | 'dot-only';
- /*
- * Dot size.
- * Only used when variant="dot-only"
+ /**
+ * Visual style — line with dots vs standalone centered dot(s)
*/
- dotSize?: 'large' | 'medium' | 'small' | 'extra-small';
- /*
- * Thickness in pixels (ignored if variant is used).
- * @default 1
+ variant?: SeparatorVariant;
+ /**
+ * Line thickness in pixels (1 or 2) — affects outlined & solid lines
*/
thickness?: 1 | 2;
/**
- * Spacing applied based on the axis:
- * - For horizontal axis, spacing is applied to top and bottom of the separator.
- * - For vertical axis, spacing is applied to left and right of the separator.
+ * Spacing (margin) around the separator
+ * @example
+ * spacing={16} // 16px top & bottom (horizontal) or left & right (vertical)
+ * spacing={{ top: 24, bottom: 8 }}
*/
spacing?: SeparatorSpacing;
}
-
export interface SeparatorVerticalProps extends SeparatorSharedProps {
/**
- * Height of separator. Use with vertical axis, when full-width separator is not needed.
- * Height can be number in rem units. It's customizable to allow for more flexibility around X components.
+ * Must be set to 'vertical'
+ */
+ axis: 'vertical';
+ /**
+ * Height of the vertical separator in rem units
*/
height?: number;
/**
- * Axis of separator, vertical and horizontal separators support different props
+ * CSS display value — usually 'block' or 'inline-block'
*/
- axis: 'vertical';
- topSpacing?: undefined;
- bottomSpacing?: undefined;
- display?: 'block' | 'inline';
+ display?: 'block' | 'inline' | 'inline-block';
}
-
export interface SeparatorHorizontalProps extends SeparatorSharedProps {
/**
- * Spacing on top of separator. Ignored when spacing is also used. Only for horizontal axis.
+ * Must be set to 'horizontal' or left undefined (defaults to horizontal)
*/
- topSpacing?: SeparatorSpacing;
+ axis?: 'horizontal';
/**
- * Spacing on bottom of separator. Ignored when spacing is also used. Only for horizontal axis.
- */
- bottomSpacing?: SeparatorSpacing;
+ Vertical height is not used in horizontal mode
+ */
+ height?: undefined;
/**
- * Axis of separator, vertical and horizontal separators support different props
+ * Display is forced to 'block' in horizontal mode
*/
- axis?: 'horizontal';
- height?: undefined;
display?: 'block';
}
-export type SeparatorBreakpointProps = {
+type DottedSeparatorProps = {
+ variant?: 'dotted';
+ dotSize?: DotSize;
+ dotStyle?: DotStyle;
/**
- * Spacing values based on breakpoints.
+ * Position of the single dot
+ * @example
+ * 'center' | 'start' | 'end' | 2.5 // 2.5rem from start
*/
- spacing?: Omit;
- /**
- * Height values based on breakpoints (for vertical separators).
- */
- height?: Omit;
+ dotPosition?: DotPosition;
+};
+
+type DotOnlySeparatorProps = {
+ variant: 'dot-only';
+ dotSize: DotSize;
+ dotStyle?: DotStyle;
+ dotPosition?: never;
+};
+
+export type SeparatorBreakpointProps = {
+ spacing?: SeparatorSpacing;
+ height?: number;
axis?: 'horizontal' | 'vertical';
};
export type SeparatorProps = BreakpointSupport<
- | (
- | SeparatorHorizontalProps
- | (SeparatorVerticalProps & {
- variant?: 'dotted' | 'dotted-small';
- dotSize?: undefined;
- })
- )
- | (
- | SeparatorHorizontalProps
- | (SeparatorVerticalProps & {
- variant: 'dot-only';
- dotSize: 'large' | 'medium' | 'small' | 'extra-small';
- })
- )
+ | (SeparatorHorizontalProps & (DottedSeparatorProps | DotOnlySeparatorProps))
+ | (SeparatorVerticalProps & (DottedSeparatorProps | DotOnlySeparatorProps))
> &
SeparatorBreakpointProps;
export const Separator = (props: SeparatorProps): JSX.Element => {
const { getCurrentBreakpointProps } = useBreakpointProps(props.defaultServerBreakpoint);
+
const {
className,
element: Element = 'div',
isStretched,
spacing,
- topSpacing,
- bottomSpacing,
axis = 'horizontal',
- color = 'default',
+ color = 'primary',
variant,
thickness = 1,
height,
- dotSize,
+ dotSize = 'large',
+ dotStyle = 'filled',
+ dotPosition,
display = 'block',
...rest
} = getCurrentBreakpointProps(props);
+ const isNumericDotPosition = typeof dotPosition === 'number';
+ const resolvedDotPosition = variant !== 'dot-only' && !isNumericDotPosition ? dotPosition : undefined;
+
+ let top: number | undefined;
+ let bottom: number | undefined;
+ let left: number | undefined;
+ let right: number | undefined;
+
+ if (typeof spacing === 'number') {
+ if (axis === 'horizontal') {
+ top = bottom = spacing;
+ left = right = 0;
+ } else {
+ left = right = spacing;
+ top = bottom = 0;
+ }
+ } else if (typeof spacing === 'object' && spacing !== null) {
+ top = spacing.top ?? (axis === 'horizontal' ? spacing.top ?? spacing.bottom ?? 0 : 0);
+ bottom = spacing.bottom ?? (axis === 'horizontal' ? spacing.top ?? spacing.bottom ?? 0 : 0);
+ left = spacing.left ?? (axis === 'vertical' ? spacing.left ?? spacing.right ?? 0 : 0);
+ right = spacing.right ?? (axis === 'vertical' ? spacing.left ?? spacing.right ?? 0 : 0);
+ }
+
const SeparatorBEM = cn(
styles['tedi-separator'],
className,
@@ -135,19 +167,33 @@ export const Separator = (props: SeparatorProps): JSX.Element => {
{ [styles[`tedi-separator--${axis}`]]: axis },
{ [styles[`tedi-separator--${variant}`]]: variant },
{ [styles[`tedi-separator--${display}`]]: display },
- { [styles[`tedi-separator--${variant}-${dotSize}`]]: variant && dotSize },
- { [styles[`tedi-separator--thickness-${thickness}`]]: thickness && !variant },
+ { [styles[`tedi-separator--${variant}-${dotSize}`]]: variant === 'dot-only' && dotSize },
+ { [styles[`tedi-separator--dot-style-${dotStyle}`]]: variant && dotStyle },
+ { [styles[`tedi-separator--dotted-${dotSize}`]]: variant === 'dotted' && dotSize },
+ { [styles[`tedi-separator--dot-position-${resolvedDotPosition}`]]: resolvedDotPosition && variant !== 'dot-only' },
+ { [styles['tedi-separator--dot-position-custom']]: isNumericDotPosition },
+ {
+ [styles[`tedi-separator--thickness-${thickness}`]]: thickness || dotStyle === 'outlined' ? thickness : undefined,
+ },
{ [styles['tedi-separator--is-stretched']]: isStretched },
- { [styles[`tedi-separator--spacing-${spacing}`.replace('.', '-')]]: spacing },
- { [styles[`tedi-separator--top-${topSpacing}`.replace('.', '-')]]: !spacing && topSpacing },
- { [styles[`tedi-separator--bottom-${bottomSpacing}`.replace('.', '-')]]: !spacing && bottomSpacing }
+ { [styles[`tedi-separator--top-${top}`.replace('.', '-')]]: top },
+ { [styles[`tedi-separator--bottom-${bottom}`.replace('.', '-')]]: bottom },
+ { [styles[`tedi-separator--left-${left}`.replace('.', '-')]]: left },
+ { [styles[`tedi-separator--right-${right}`.replace('.', '-')]]: right }
);
const getCssVars = () => {
const cssvars: CSSProperties = {};
-
if (height) cssvars['--vertical-separator-height'] = `${height}rem`;
+ if (thickness) {
+ cssvars['--separator-thickness'] = `${thickness}px`;
+ }
+
+ if (variant === 'dotted' && isNumericDotPosition) {
+ cssvars['--separator-dot-position'] = `${dotPosition}rem`;
+ }
+
return cssvars;
};
From abd15927725bedba73f5abde8988b6545d446645 Mon Sep 17 00:00:00 2001
From: semantic-release-bot
Date: Wed, 25 Feb 2026 13:36:24 +0000
Subject: [PATCH 41/46] chore(release): 16.0.0-rc.18
# [16.0.0-rc.18](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.17...react-16.0.0-rc.18) (2026-02-25)
### Features
* **separator:** redesign with new spacing API, dotPosition and dotStyle support [#30](https://github.com/TEDI-Design-System/react/issues/30) ([#525](https://github.com/TEDI-Design-System/react/issues/525)) ([93e9e11](https://github.com/TEDI-Design-System/react/commit/93e9e118aab73d40347029089c5370851a7b551c))
### BREAKING CHANGES
* **separator:** legacy spacing props removed, dotSize enum changed, variant values simplified
---
CHANGELOG.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 772692d48..e102a9e69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+# [16.0.0-rc.18](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.17...react-16.0.0-rc.18) (2026-02-25)
+
+
+### Features
+
+* **separator:** redesign with new spacing API, dotPosition and dotStyle support [#30](https://github.com/TEDI-Design-System/react/issues/30) ([#525](https://github.com/TEDI-Design-System/react/issues/525)) ([93e9e11](https://github.com/TEDI-Design-System/react/commit/93e9e118aab73d40347029089c5370851a7b551c))
+
+
+### BREAKING CHANGES
+
+* **separator:** legacy spacing props removed, dotSize enum changed, variant values simplified
+
# [16.0.0-rc.17](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.16...react-16.0.0-rc.17) (2026-02-25)
From bd8bd1640c40be40199d881efead665ce45bd0a3 Mon Sep 17 00:00:00 2001
From: Airike Jaska <95303654+airikej@users.noreply.github.com>
Date: Wed, 25 Feb 2026 15:38:07 +0200
Subject: [PATCH 42/46] fix(text-field): fix small textfield right area
padding, fix small textfield font size #527 (#528)
---
.../form/textfield/textfield.module.scss | 131 +++++++++---------
1 file changed, 63 insertions(+), 68 deletions(-)
diff --git a/src/tedi/components/form/textfield/textfield.module.scss b/src/tedi/components/form/textfield/textfield.module.scss
index 850f10a8f..fa91f068c 100644
--- a/src/tedi/components/form/textfield/textfield.module.scss
+++ b/src/tedi/components/form/textfield/textfield.module.scss
@@ -1,7 +1,32 @@
@use '@tedi-design-system/core/bootstrap-utility/breakpoints';
@use '@tedi-design-system/core/mixins';
+@use 'sass:map';
$input-height-large: 3.5rem;
+$input-padding-right-map: (
+ default: (
+ normal: 2rem,
+ both: 4rem,
+ ),
+ small: (
+ normal: 2rem,
+ both: 4rem,
+ ),
+ large: (
+ normal: 3.5rem,
+ both: 6rem,
+ ),
+);
+
+@function get-padding-right($size, $clearable, $icon) {
+ @if $clearable and $icon {
+ @return map.get(map.get($input-padding-right-map, $size), both);
+ } @else if $clearable or $icon {
+ @return map.get(map.get($input-padding-right-map, $size), normal);
+ } @else {
+ @return null;
+ }
+}
@mixin textfield-focus($border-color: null) {
@if $border-color {
@@ -69,29 +94,45 @@ $input-height-large: 3.5rem;
@include textfield-focus(var(--form-general-feedback-success-border));
}
- .tedi-textfield--clearable &,
- .tedi-textfield--with-icon & {
- padding-right: 2rem;
- }
-
- .tedi-textfield--clearable.tedi-textfield--with-icon & {
- padding-right: 4rem;
- }
-
&::placeholder {
color: var(--form-input-text-placeholder);
opacity: 1;
}
}
-// hide arrows on number inputs
-.tedi-textfield__input--hidden-arrows[type='number'] {
- appearance: textfield; // for Firefox
+@each $size in default, small, large {
+ $selector: if($size == default, '.tedi-textfield', '.tedi-textfield--#{$size}');
+ #{$selector} {
+ $padding: get-padding-right($size, true, false);
- &::-webkit-outer-spin-button,
- &::-webkit-inner-spin-button {
- margin: 0;
- appearance: none;
+ &.tedi-textfield--clearable .tedi-textfield__input {
+ padding-right: get-padding-right($size, true, false);
+ }
+
+ &.tedi-textfield--with-icon .tedi-textfield__input {
+ padding-right: get-padding-right($size, false, true);
+ }
+
+ &.tedi-textfield--clearable.tedi-textfield--with-icon .tedi-textfield__input {
+ padding-right: get-padding-right($size, true, true);
+ }
+
+ @if $size == small {
+ .tedi-textfield__input {
+ height: var(--form-field-height-sm);
+ padding: var(--form-field-padding-y-sm) var(--form-field-padding-x-md-default);
+ font-size: var(--body-regular-size);
+ }
+ } @else if $size == large {
+ .tedi-textfield__input {
+ height: $input-height-large;
+ padding: var(--form-field-padding-y-lg) var(--form-field-padding-x-lg);
+
+ @include breakpoints.media-breakpoint-down(md) {
+ height: var(--form-field-height);
+ }
+ }
+ }
}
}
@@ -100,26 +141,24 @@ $input-height-large: 3.5rem;
top: 0;
right: 0;
display: flex;
+ gap: var(--layout-grid-gutters-04);
align-items: center;
height: 100%;
- padding: 0.75rem 0.5rem;
+ padding: var(--form-field-padding-y-md-default) var(--form-field-padding-x-md-default);
.tedi-textfield--small & {
- padding: 0.25rem 0.5rem;
+ padding: var(--form-field-padding-y-sm) var(--form-field-padding-x-md-default);
}
.tedi-textfield--large & {
- padding: 1rem;
+ padding: var(--form-field-padding-y-lg) var(--form-field-padding-x-lg);
}
}
-.tedi-textfield__separator {
- margin-right: 0.5rem;
- margin-left: 0.25rem;
-}
-
.tedi-textfield__icon-wrapper {
display: flex;
+ justify-content: center;
+ width: var(--icon-04);
color: var(--form-input-text-filled);
transition: color 0.2s ease;
@@ -150,50 +189,6 @@ div.tedi-textfield__icon-wrapper {
vertical-align: text-top;
}
-/* Small */
-.tedi-textfield--small {
- .tedi-textfield__input {
- height: var(--form-field-height-sm);
- padding: var(--form-field-padding-y-sm) var(--form-field-padding-x-md-default);
- font-size: var(--body-small-regular-size);
- }
-
- &.tedi-textfield--clearable &,
- &.tedi-textfield--with-icon & {
- padding-right: 2rem;
- }
-
- &.tedi-textfield--clearable.tedi-textfield--with-icon & {
- padding-right: 4rem;
- }
-}
-
-/* Large */
-.tedi-textfield--large {
- .tedi-textfield__input {
- height: $input-height-large;
- padding: 1rem;
-
- @include breakpoints.media-breakpoint-down(md) {
- height: var(--form-field-height);
- }
- }
-
- .tedi-textfield__separator {
- margin-right: 0.5rem;
- margin-left: 0.5rem;
- }
-
- &.tedi-textfield--clearable .tedi-textfield__input,
- &.tedi-textfield--with-icon .tedi-textfield__input {
- padding-right: 3.5rem;
- }
-
- &.tedi-textfield--clearable.tedi-textfield--with-icon .tedi-textfield__input {
- padding-right: 6rem;
- }
-}
-
.tedi-textfield__feedback-wrapper {
display: flex;
}
From 8f1f7f634f002a13c10c2cfeffbeabf27759d7ed Mon Sep 17 00:00:00 2001
From: semantic-release-bot
Date: Wed, 25 Feb 2026 13:42:23 +0000
Subject: [PATCH 43/46] chore(release): 16.0.0-rc.19
# [16.0.0-rc.19](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.18...react-16.0.0-rc.19) (2026-02-25)
### Bug Fixes
* **text-field:** fix small textfield right area padding, fix small textfield font size [#527](https://github.com/TEDI-Design-System/react/issues/527) ([#528](https://github.com/TEDI-Design-System/react/issues/528)) ([bd8bd16](https://github.com/TEDI-Design-System/react/commit/bd8bd1640c40be40199d881efead665ce45bd0a3))
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e102a9e69..bc9a964cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# [16.0.0-rc.19](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.18...react-16.0.0-rc.19) (2026-02-25)
+
+
+### Bug Fixes
+
+* **text-field:** fix small textfield right area padding, fix small textfield font size [#527](https://github.com/TEDI-Design-System/react/issues/527) ([#528](https://github.com/TEDI-Design-System/react/issues/528)) ([bd8bd16](https://github.com/TEDI-Design-System/react/commit/bd8bd1640c40be40199d881efead665ce45bd0a3))
+
# [16.0.0-rc.18](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.17...react-16.0.0-rc.18) (2026-02-25)
From 9d23abfb289ca1fd5c259827102744be74c39ac6 Mon Sep 17 00:00:00 2001
From: Airike Jaska <95303654+airikej@users.noreply.github.com>
Date: Thu, 26 Feb 2026 08:08:21 +0200
Subject: [PATCH 44/46] chore: move grid stories under Layout folder #526
(#529)
* chore: move grid stories under Layout folder #526
* chore: move VerticalSpacing story to Layout as well #526
* chore: fix bootstrap typo #526
---
.../docs/scale-layout/development.mdx | 12 --
.../components/layout/grid/col.stories.tsx | 59 +++++++++
.../components/layout/grid/grid.stories.tsx | 120 ------------------
.../components/layout/grid/row.stories.tsx | 59 +++++++++
.../vertical-spacing.stories.tsx | 2 +-
.../docs/scale-layout/breaking-points.tsx | 4 +-
.../docs/scale-layout/grid.mdx | 2 +-
.../docs/scale-layout/grid.tsx | 8 +-
.../docs/scale-layout/spacing.mdx | 2 +-
.../docs/scale-layout/spacing.tsx | 10 +-
10 files changed, 132 insertions(+), 146 deletions(-)
delete mode 100644 src/community/docs/scale-layout/development.mdx
create mode 100644 src/tedi/components/layout/grid/col.stories.tsx
delete mode 100644 src/tedi/components/layout/grid/grid.stories.tsx
create mode 100644 src/tedi/components/layout/grid/row.stories.tsx
rename src/{community => tedi}/docs/scale-layout/breaking-points.tsx (96%)
rename src/{community => tedi}/docs/scale-layout/grid.mdx (59%)
rename src/{community => tedi}/docs/scale-layout/grid.tsx (92%)
rename src/{community => tedi}/docs/scale-layout/spacing.mdx (60%)
rename src/{community => tedi}/docs/scale-layout/spacing.tsx (88%)
diff --git a/src/community/docs/scale-layout/development.mdx b/src/community/docs/scale-layout/development.mdx
deleted file mode 100644
index a413dfb5c..000000000
--- a/src/community/docs/scale-layout/development.mdx
+++ /dev/null
@@ -1,12 +0,0 @@
-import { Meta, Title, Subtitle, Unstyled } from '@storybook/blocks';
-
-
-
-# Grid in development
-
-Every layout in design is makeable with `` and `` components.
-All examples of Grid usage are under [Grid docs](/docs/components-grid--docs)
-
-To create vertical spacing between elements use `` [component](/docs/components-vertical-spacing--docs).
-
-{/* TODO: Need more information how to use Row, Col, VerticalSpacing and Card correctly */}
diff --git a/src/tedi/components/layout/grid/col.stories.tsx b/src/tedi/components/layout/grid/col.stories.tsx
new file mode 100644
index 000000000..8f7925529
--- /dev/null
+++ b/src/tedi/components/layout/grid/col.stories.tsx
@@ -0,0 +1,59 @@
+import { Meta, StoryFn, StoryObj } from '@storybook/react';
+
+import { Heading } from '../../base/typography/heading/heading';
+import { VerticalSpacing } from '../vertical-spacing';
+import { Col } from './col';
+import { Row } from './row';
+
+/**
+ * Zeroheight ↗
+ * Bootstrap docs ↗
+ * Row and Col components are inspired by Bootstrap V5 Grid System.
You can use different Bootstrap grid classes
+ * through component props.
+ */
+
+const meta: Meta = {
+ title: 'Tedi-Ready/Layout/Grid/Col',
+ component: Col,
+ subcomponents: { Row } as never,
+ parameters: {
+ status: { type: 'devComponent' },
+ },
+};
+
+export default meta;
+type Story = StoryObj;
+
+export const Default: StoryFn = () => (
+
+
+ Label/Value pairs
+
+
+
+
+
+ Label
+
+ Value
+
+
+
+ Label
+
+ Value
+
+
+
+
+
+
+
+ Lists
+
+ Item 1
+ Item 2
+
+
+
+);
diff --git a/src/tedi/components/layout/grid/grid.stories.tsx b/src/tedi/components/layout/grid/grid.stories.tsx
deleted file mode 100644
index 78ec8ed9d..000000000
--- a/src/tedi/components/layout/grid/grid.stories.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import { Meta, StoryFn, StoryObj } from '@storybook/react';
-
-import { Heading } from '../../base/typography/heading/heading';
-import { VerticalSpacing } from '../vertical-spacing';
-import { Col } from './col';
-import { Row, RowProps } from './row';
-
-/**
- * Zeroheight ↗
- * Boostrap docs ↗
- * Row and Col components are inspired by Bootstrap V5 Grid System.
You can use different Bootstrap grid classes
- * through component props.
- */
-const meta: Meta = {
- title: 'Tedi-Ready/Components/Helpers/Grid',
- component: Row,
- subcomponents: { Col: Col } as never,
- parameters: {
- status: {
- type: 'devComponent',
- },
- },
-};
-
-export default meta;
-type Story = StoryObj;
-
-const Template: StoryFn = (args) => (
-
-
- Col-1
- Col-2
- Col-3
-
-
-
- Col-1
-
-
- Col-2
-
-
- Col-3
-
-
-
-
- Col-1
-
-
- Col-2
-
-
- Col-3
-
-
-
- Col-1
- Col-2
- Col-3
-
-
-);
-
-export const Default: Story = {
- render: Template,
-};
-
-export const CustomTags: StoryFn = () => (
-
-
- Label/Value pairs
-
-
- {/* Grouped rows */}
-
-
-
- Label
-
- Value
-
-
-
- Label
-
- Value
-
-
-
-
- {/* Non grouped rows */}
-
-
-
- Label
-
-
- Value
-
-
- Label
-
-
- Value
-
-
-
-
-
-
-
- Lists
-
- Item 1
- Item 2
-
-
-
-);
diff --git a/src/tedi/components/layout/grid/row.stories.tsx b/src/tedi/components/layout/grid/row.stories.tsx
new file mode 100644
index 000000000..8fb61400d
--- /dev/null
+++ b/src/tedi/components/layout/grid/row.stories.tsx
@@ -0,0 +1,59 @@
+import { Meta, StoryFn, StoryObj } from '@storybook/react';
+
+import { Col } from './col';
+import { Row, RowProps } from './row';
+
+/**
+ * Zeroheight ↗
+ * Bootstrap docs ↗
+ * Row and Col components are inspired by Bootstrap V5 Grid System.
You can use different Bootstrap grid classes
+ * through component props.
+ */
+
+const meta: Meta = {
+ title: 'Tedi-Ready/Layout/Grid/Row',
+ component: Row,
+ subcomponents: { Col } as never,
+ parameters: {
+ status: { type: 'devComponent' },
+ },
+};
+
+export default meta;
+type Story = StoryObj;
+
+const Template: StoryFn = (args) => (
+
+
+ Col-1
+ Col-2
+ Col-3
+
+
+
+
+ Col-1
+
+
+ Col-2
+
+
+ Col-3
+
+
+
+
+
+ Col-1
+
+
+ Col-2
+
+
+ Col-3
+
+
+
+);
+
+export const Default: Story = { render: Template };
diff --git a/src/tedi/components/layout/vertical-spacing/vertical-spacing.stories.tsx b/src/tedi/components/layout/vertical-spacing/vertical-spacing.stories.tsx
index 4af447580..a3fcaffe9 100644
--- a/src/tedi/components/layout/vertical-spacing/vertical-spacing.stories.tsx
+++ b/src/tedi/components/layout/vertical-spacing/vertical-spacing.stories.tsx
@@ -11,7 +11,7 @@ import { VerticalSpacing, VerticalSpacingProps } from './vertical-spacing';
const meta: Meta = {
component: VerticalSpacing,
- title: 'Tedi-Ready/Components/Helpers/VerticalSpacing',
+ title: 'Tedi-Ready/Layout/VerticalSpacing',
subcomponents: {
'VerticalSpacing.Item': VerticalSpacing.Item,
} as never,
diff --git a/src/community/docs/scale-layout/breaking-points.tsx b/src/tedi/docs/scale-layout/breaking-points.tsx
similarity index 96%
rename from src/community/docs/scale-layout/breaking-points.tsx
rename to src/tedi/docs/scale-layout/breaking-points.tsx
index 174567782..ccb5c4244 100644
--- a/src/community/docs/scale-layout/breaking-points.tsx
+++ b/src/tedi/docs/scale-layout/breaking-points.tsx
@@ -1,7 +1,7 @@
import { ColumnDef, createColumnHelper } from '@tanstack/react-table';
-import { Text } from '../../../tedi/components/base/typography/text/text';
-import { Breakpoint, CustomizeTableCell, getBackgroundColorClass, Table } from '../../index';
+import { Breakpoint, CustomizeTableCell, getBackgroundColorClass, Table } from '../../../community/index';
+import { Text } from '../../components/base/typography/text/text';
interface BreakpointRow {
type: 'mobile' | 'tablet' | 'desktop';
diff --git a/src/community/docs/scale-layout/grid.mdx b/src/tedi/docs/scale-layout/grid.mdx
similarity index 59%
rename from src/community/docs/scale-layout/grid.mdx
rename to src/tedi/docs/scale-layout/grid.mdx
index 907fc622f..6d4bb22fd 100644
--- a/src/community/docs/scale-layout/grid.mdx
+++ b/src/tedi/docs/scale-layout/grid.mdx
@@ -1,7 +1,7 @@
import { Meta, Title, Subtitle, Unstyled } from '@storybook/blocks';
import Grid from './grid.tsx';
-
+
diff --git a/src/community/docs/scale-layout/grid.tsx b/src/tedi/docs/scale-layout/grid.tsx
similarity index 92%
rename from src/community/docs/scale-layout/grid.tsx
rename to src/tedi/docs/scale-layout/grid.tsx
index e89db1d09..04998c322 100644
--- a/src/community/docs/scale-layout/grid.tsx
+++ b/src/tedi/docs/scale-layout/grid.tsx
@@ -1,9 +1,9 @@
import { Title } from '@storybook/blocks';
-import { Heading } from '../../../tedi/components/base/typography/heading/heading';
-import { Col, Row } from '../../../tedi/components/layout/grid';
-import { VerticalSpacing } from '../../../tedi/components/layout/vertical-spacing';
-import { Separator } from '../../../tedi/components/misc/separator/separator';
+import { Heading } from '../../components/base/typography/heading/heading';
+import { Col, Row } from '../../components/layout/grid';
+import { VerticalSpacing } from '../../components/layout/vertical-spacing';
+import { Separator } from '../../components/misc/separator/separator';
import BreakingpointsTable from './breaking-points';
const Grid = () => {
diff --git a/src/community/docs/scale-layout/spacing.mdx b/src/tedi/docs/scale-layout/spacing.mdx
similarity index 60%
rename from src/community/docs/scale-layout/spacing.mdx
rename to src/tedi/docs/scale-layout/spacing.mdx
index 547603667..4dd24520b 100644
--- a/src/community/docs/scale-layout/spacing.mdx
+++ b/src/tedi/docs/scale-layout/spacing.mdx
@@ -2,7 +2,7 @@ import { Meta, Unstyled } from '@storybook/blocks';
import Spacing from './spacing.tsx';
-
+
diff --git a/src/community/docs/scale-layout/spacing.tsx b/src/tedi/docs/scale-layout/spacing.tsx
similarity index 88%
rename from src/community/docs/scale-layout/spacing.tsx
rename to src/tedi/docs/scale-layout/spacing.tsx
index f22458635..03fe96afa 100644
--- a/src/community/docs/scale-layout/spacing.tsx
+++ b/src/tedi/docs/scale-layout/spacing.tsx
@@ -1,11 +1,11 @@
import { Title } from '@storybook/blocks';
import { ColumnDef, createColumnHelper } from '@tanstack/react-table';
-import { Heading } from '../../../tedi/components/base/typography/heading/heading';
-import { Col, Row } from '../../../tedi/components/layout/grid';
-import { VerticalSpacing } from '../../../tedi/components/layout/vertical-spacing';
-import { Separator } from '../../../tedi/components/misc/separator/separator';
-import { Table } from '../../index';
+import { Table } from '../../../community/index';
+import { Heading } from '../../components/base/typography/heading/heading';
+import { Col, Row } from '../../components/layout/grid';
+import { VerticalSpacing } from '../../components/layout/vertical-spacing';
+import { Separator } from '../../components/misc/separator/separator';
const Spacing = () => {
return (
From 130edcd158944b90c62788e76fc97e015f1f228c Mon Sep 17 00:00:00 2001
From: Airike Jaska <95303654+airikej@users.noreply.github.com>
Date: Thu, 26 Feb 2026 12:27:54 +0200
Subject: [PATCH 45/46] fix(separator): fix custom size application #535 (#536)
* fix(separator): fix custom size application #535
* chore: fix grid stories typo #535
* fix(separator): removed unnecessary zeros #535
---
.../components/layout/grid/col.stories.tsx | 2 +-
.../components/layout/grid/row.stories.tsx | 2 +-
.../misc/separator/separator.module.scss | 40 +---------
.../misc/separator/separator.spec.tsx | 21 +++--
.../components/misc/separator/separator.tsx | 77 ++++++++++---------
5 files changed, 57 insertions(+), 85 deletions(-)
diff --git a/src/tedi/components/layout/grid/col.stories.tsx b/src/tedi/components/layout/grid/col.stories.tsx
index 8f7925529..b2ea48bf9 100644
--- a/src/tedi/components/layout/grid/col.stories.tsx
+++ b/src/tedi/components/layout/grid/col.stories.tsx
@@ -7,7 +7,7 @@ import { Row } from './row';
/**
* Zeroheight ↗
- * Bootstrap docs ↗
+ * Bootstrap docs ↗
* Row and Col components are inspired by Bootstrap V5 Grid System.
You can use different Bootstrap grid classes
* through component props.
*/
diff --git a/src/tedi/components/layout/grid/row.stories.tsx b/src/tedi/components/layout/grid/row.stories.tsx
index 8fb61400d..1904bb382 100644
--- a/src/tedi/components/layout/grid/row.stories.tsx
+++ b/src/tedi/components/layout/grid/row.stories.tsx
@@ -5,7 +5,7 @@ import { Row, RowProps } from './row';
/**
* Zeroheight ↗
- * Bootstrap docs ↗
+ * Bootstrap docs ↗
* Row and Col components are inspired by Bootstrap V5 Grid System.
You can use different Bootstrap grid classes
* through component props.
*/
diff --git a/src/tedi/components/misc/separator/separator.module.scss b/src/tedi/components/misc/separator/separator.module.scss
index 6d648458d..85741e1e7 100644
--- a/src/tedi/components/misc/separator/separator.module.scss
+++ b/src/tedi/components/misc/separator/separator.module.scss
@@ -1,18 +1,5 @@
@use '@tedi-design-system/core/mixins';
-$sizes: (
- '0': 0,
- '0-25': 0.25rem,
- '0-5': 0.5rem,
- '0-75': 0.75rem,
- '1': 1rem,
- '1-25': 1.25rem,
- '1-5': 1.5rem,
- '1-75': 1.75rem,
- '2': 2rem,
- '2-5': 2.5rem,
- '5': 5rem,
-);
$thicknesses: (
'1': 1px,
'2': 2px,
@@ -27,7 +14,8 @@ $dot-colors: (
--vertical-separator-height: 100%;
position: relative;
- margin: 0;
+ margin: var(--separator-margin-top) var(--separator-margin-right) var(--separator-margin-bottom)
+ var(--separator-margin-left);
border: 0;
border-top: 1px solid var(--general-border-primary);
@@ -172,30 +160,6 @@ $dot-colors: (
bottom: auto;
}
-@each $size, $value in $sizes {
- .tedi-separator--spacing-#{$size}:not(.tedi-separator--dot-only) {
- margin: #{$value} 0;
- }
-
- .tedi-separator--dot-only.tedi-separator--spacing-#{$size} {
- &.tedi-separator--horizontal {
- margin-right: $value;
- margin-left: $value;
- }
-
- &.tedi-separator--vertical {
- margin-top: $value;
- margin-bottom: $value;
- }
- }
-
- @each $side in (top, bottom, left, right) {
- .tedi-separator--#{$side}-#{$size} {
- margin-#{$side}: $value;
- }
- }
-}
-
@each $thickness, $value in $thicknesses {
.tedi-separator--thickness-#{$thickness} {
border-top-width: $value;
diff --git a/src/tedi/components/misc/separator/separator.spec.tsx b/src/tedi/components/misc/separator/separator.spec.tsx
index 694961d9a..0f465e37e 100644
--- a/src/tedi/components/misc/separator/separator.spec.tsx
+++ b/src/tedi/components/misc/separator/separator.spec.tsx
@@ -57,24 +57,31 @@ describe('Separator Component', () => {
expect(el).toHaveStyle('--vertical-separator-height: 5.5rem');
});
- it('applies spacing classes — number value', () => {
+ it('applies spacing — number value', () => {
const { getByTestId } = renderComponent({ spacing: 1.5 });
const el = getByTestId('separator');
- expect(el).toHaveClass(styles['tedi-separator--top-1-5']);
- expect(el).toHaveClass(styles['tedi-separator--bottom-1-5']);
+ expect(el).toHaveStyle({
+ '--separator-margin-top': '1.5rem',
+ '--separator-margin-bottom': '1.5rem',
+ '--separator-margin-left': '0rem',
+ '--separator-margin-right': '0rem',
+ });
});
- it('applies spacing classes — object value', () => {
+ it('applies spacing — object value', () => {
const { getByTestId } = renderComponent({
spacing: { top: 2, bottom: 0.5, left: 1 },
axis: 'horizontal',
});
const el = getByTestId('separator');
- expect(el).toHaveClass(styles['tedi-separator--top-2']);
- expect(el).toHaveClass(styles['tedi-separator--bottom-0-5']);
- expect(el).toHaveClass(styles['tedi-separator--left-1']);
+ expect(el).toHaveStyle({
+ '--separator-margin-top': '2rem',
+ '--separator-margin-bottom': '0.5rem',
+ '--separator-margin-left': '1rem',
+ '--separator-margin-right': '0rem',
+ });
});
it('applies isStretched class', () => {
diff --git a/src/tedi/components/misc/separator/separator.tsx b/src/tedi/components/misc/separator/separator.tsx
index cabe5bd3c..d343f08b3 100644
--- a/src/tedi/components/misc/separator/separator.tsx
+++ b/src/tedi/components/misc/separator/separator.tsx
@@ -140,64 +140,65 @@ export const Separator = (props: SeparatorProps): JSX.Element => {
const isNumericDotPosition = typeof dotPosition === 'number';
const resolvedDotPosition = variant !== 'dot-only' && !isNumericDotPosition ? dotPosition : undefined;
- let top: number | undefined;
- let bottom: number | undefined;
- let left: number | undefined;
- let right: number | undefined;
+ let top = 0;
+ let bottom = 0;
+ let left = 0;
+ let right = 0;
if (typeof spacing === 'number') {
if (axis === 'horizontal') {
top = bottom = spacing;
- left = right = 0;
} else {
left = right = spacing;
- top = bottom = 0;
}
- } else if (typeof spacing === 'object' && spacing !== null) {
- top = spacing.top ?? (axis === 'horizontal' ? spacing.top ?? spacing.bottom ?? 0 : 0);
- bottom = spacing.bottom ?? (axis === 'horizontal' ? spacing.top ?? spacing.bottom ?? 0 : 0);
- left = spacing.left ?? (axis === 'vertical' ? spacing.left ?? spacing.right ?? 0 : 0);
- right = spacing.right ?? (axis === 'vertical' ? spacing.left ?? spacing.right ?? 0 : 0);
+ }
+
+ if (typeof spacing === 'object' && spacing !== null) {
+ top = spacing.top ?? top;
+ bottom = spacing.bottom ?? bottom;
+ left = spacing.left ?? left;
+ right = spacing.right ?? right;
}
const SeparatorBEM = cn(
styles['tedi-separator'],
className,
- { [styles[`tedi-separator--${color}`]]: color },
- { [styles[`tedi-separator--${axis}`]]: axis },
- { [styles[`tedi-separator--${variant}`]]: variant },
- { [styles[`tedi-separator--${display}`]]: display },
- { [styles[`tedi-separator--${variant}-${dotSize}`]]: variant === 'dot-only' && dotSize },
- { [styles[`tedi-separator--dot-style-${dotStyle}`]]: variant && dotStyle },
- { [styles[`tedi-separator--dotted-${dotSize}`]]: variant === 'dotted' && dotSize },
- { [styles[`tedi-separator--dot-position-${resolvedDotPosition}`]]: resolvedDotPosition && variant !== 'dot-only' },
- { [styles['tedi-separator--dot-position-custom']]: isNumericDotPosition },
+ styles[`tedi-separator--${axis}`],
+ styles[`tedi-separator--${color}`],
{
+ [styles[`tedi-separator--${variant}`]]: variant,
+ [styles[`tedi-separator--${display}`]]: display,
+ [styles[`tedi-separator--dotted-${dotSize}`]]: variant === 'dotted',
+ [styles[`tedi-separator--dot-only-${dotSize}`]]: variant === 'dot-only',
+ [styles[`tedi-separator--dot-style-${dotStyle}`]]: variant,
+ [styles[`tedi-separator--dot-position-${resolvedDotPosition}`]]:
+ typeof resolvedDotPosition === 'string' && variant !== 'dot-only',
+ [styles['tedi-separator--dot-position-custom']]: isNumericDotPosition,
+ [styles['tedi-separator--is-stretched']]: isStretched,
[styles[`tedi-separator--thickness-${thickness}`]]: thickness || dotStyle === 'outlined' ? thickness : undefined,
- },
- { [styles['tedi-separator--is-stretched']]: isStretched },
- { [styles[`tedi-separator--top-${top}`.replace('.', '-')]]: top },
- { [styles[`tedi-separator--bottom-${bottom}`.replace('.', '-')]]: bottom },
- { [styles[`tedi-separator--left-${left}`.replace('.', '-')]]: left },
- { [styles[`tedi-separator--right-${right}`.replace('.', '-')]]: right }
+ }
);
- const getCssVars = () => {
- const cssvars: CSSProperties = {};
- if (height) cssvars['--vertical-separator-height'] = `${height}rem`;
+ const cssVars: CSSProperties = {
+ '--separator-margin-top': `${top}rem`,
+ '--separator-margin-bottom': `${bottom}rem`,
+ '--separator-margin-left': `${left}rem`,
+ '--separator-margin-right': `${right}rem`,
+ } as CSSProperties;
- if (thickness) {
- cssvars['--separator-thickness'] = `${thickness}px`;
- }
+ if (height) {
+ cssVars['--vertical-separator-height'] = `${height}rem`;
+ }
- if (variant === 'dotted' && isNumericDotPosition) {
- cssvars['--separator-dot-position'] = `${dotPosition}rem`;
- }
+ if (thickness) {
+ cssVars['--separator-thickness'] = `${thickness}px`;
+ }
- return cssvars;
- };
+ if (variant === 'dotted' && isNumericDotPosition) {
+ cssVars['--separator-dot-position'] = `${dotPosition}rem`;
+ }
- return ;
+ return ;
};
export default Separator;
From 8fc49d6aa9c27140254072eb43d618e2a6a3438c Mon Sep 17 00:00:00 2001
From: semantic-release-bot
Date: Thu, 26 Feb 2026 10:32:15 +0000
Subject: [PATCH 46/46] chore(release): 16.0.0-rc.20
# [16.0.0-rc.20](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.19...react-16.0.0-rc.20) (2026-02-26)
### Bug Fixes
* **separator:** fix custom size application [#535](https://github.com/TEDI-Design-System/react/issues/535) ([#536](https://github.com/TEDI-Design-System/react/issues/536)) ([130edcd](https://github.com/TEDI-Design-System/react/commit/130edcd158944b90c62788e76fc97e015f1f228c))
---
CHANGELOG.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc9a964cb..3d8e36d2b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# [16.0.0-rc.20](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.19...react-16.0.0-rc.20) (2026-02-26)
+
+
+### Bug Fixes
+
+* **separator:** fix custom size application [#535](https://github.com/TEDI-Design-System/react/issues/535) ([#536](https://github.com/TEDI-Design-System/react/issues/536)) ([130edcd](https://github.com/TEDI-Design-System/react/commit/130edcd158944b90c62788e76fc97e015f1f228c))
+
# [16.0.0-rc.19](https://github.com/TEDI-Design-System/react/compare/react-16.0.0-rc.18...react-16.0.0-rc.19) (2026-02-25)