Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
53c589e
test: ship logo as image with url paths
nmerget Jan 29, 2026
8889f8a
chore: update _default-images.scss
nmerget Feb 2, 2026
57fe1c0
chore: update from main
nmerget May 11, 2026
cb3b25a
chore: update brand image resolving
nmerget May 11, 2026
388807c
Merge remote-tracking branch 'origin/main' into test-logo-as-image
nmerget May 12, 2026
912bdf2
chore: update from main
nmerget May 12, 2026
8a94e58
chore: update ignore patterns for jscpd and stylelint
nmerget May 12, 2026
11cacff
Merge remote-tracking branch 'origin/main' into test-logo-as-image
nmerget May 12, 2026
5df7608
chore: display logo image in variant example
nmerget May 12, 2026
a48eaab
auto update snapshots (#6675)
github-actions[bot] May 12, 2026
4b77f91
chore: remove hideLogo option from brand argument types
nmerget May 12, 2026
ad3a981
chore: update _brand.arg.types.ts
nmerget May 12, 2026
a9783c2
Merge remote-tracking branch 'origin/main' into test-logo-as-image
nmerget May 12, 2026
3734680
chore: update db-theme to version 5.7.0 and add noText support to DBB…
nmerget May 13, 2026
2c0a8fa
auto update snapshots (#6692)
github-actions[bot] May 13, 2026
142b52e
chore: update snapshots
nmerget May 13, 2026
6ccd935
Merge remote-tracking branch 'origin/test-logo-as-image' into test-lo…
nmerget May 13, 2026
6d78484
Merge remote-tracking branch 'origin/main' into test-logo-as-image
nmerget May 13, 2026
81afed5
chore: update from main
nmerget May 18, 2026
a8ae185
auto update snapshots (#6721)
github-actions[bot] May 18, 2026
826dc7b
chore: update from main
nmerget May 22, 2026
944159d
fix: issues from PR
nmerget May 22, 2026
94fd157
Merge remote-tracking branch 'origin/main' into test-logo-as-image
nmerget Jun 1, 2026
45d9e2a
auto update snapshots (#6852)
github-actions[bot] Jun 1, 2026
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
3 changes: 2 additions & 1 deletion .config/.jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
"**/examples/**/*.example.lite.tsx",
"**/figma/**/*.figma.lite.tsx",
"**/figma/**/*.figma.ts",
"**/packages/eslint-plugin/src/rules/**"
"**/packages/eslint-plugin/src/rules/**",
"**/packages/foundations/assets/images/**"
],
"ignorePattern": ["<option value=\"test5\">Test5</option>"],
"absolute": true
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- link "Density"
- text: Functional (Default) Regular Expressive
- link "Variants"
- text: (Default) With Logo No Logo
- text: (Default) With Logo Logo Variant
- img "this is a fancy placeholder logo"
- text: Custom Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- link "Density"
- text: Functional (Default) Regular Expressive
- link "Variants"
- text: (Default) With Logo No Logo
- text: (Default) With Logo Logo Variant
- img "this is a fancy placeholder logo"
- text: Custom Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- link "Density"
- text: Functional (Default) Regular Expressive
- link "Variants"
- text: (Default) With Logo No Logo
- text: (Default) With Logo Logo Variant
- img "this is a fancy placeholder logo"
- text: Custom Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- link "Density"
- text: Functional (Default) Regular Expressive
- link "Variants"
- text: (Default) With Logo No Logo
- text: (Default) With Logo Logo Variant
- img "this is a fancy placeholder logo"
- text: Custom Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- link "Density"
- text: Functional (Default) Regular Expressive
- link "Variants"
- text: (Default) With Logo No Logo
- text: (Default) With Logo Logo Variant
- img "this is a fancy placeholder logo"
- text: Custom Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
- link "Density"
- text: Functional (Default) Regular Expressive
- link "Variants"
- text: (Default) With Logo No Logo
- text: (Default) With Logo Logo Variant
- img "this is a fancy placeholder logo"
- text: Custom Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Comment thread
nmerget marked this conversation as resolved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dev:angular": "nodemon --watch src --watch scripts --watch configs --ext tsx,ts,cjs --exec \"npm run compile:angular\"",
"dev:html": "pnpm run copy-assets && pnpm run build-assets && pnpm run build-style:01_sass && vite --open",
"dev:react": "nodemon --watch src --watch scripts --watch configs --ext tsx,ts,cjs --exec \"pnpm run compile:react\"",
"dev:scss": "pnpm run build-style:01_sass -- --watch --source-map",
"dev:scss": "sass src:build --load-path=node_modules --watch",
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.

Shouldn't we keep the --source-map flag for dev?

"dev:stencil": "nodemon --watch src --watch scripts --watch configs --ext tsx,ts,cjs --exec \"pnpm run compile:stencil\"",
"dev:vue": "nodemon --watch src --watch scripts --watch configs --ext tsx,ts,cjs --exec \"pnpm run compile:vue\"",
"generate:agent": "mitosis build --config=configs/mitosis.agent.config.cjs",
Expand Down
6 changes: 2 additions & 4 deletions packages/components/src/components/brand/brand.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
useRef,
useStore
} from '@builder.io/mitosis';
import { DEFAULT_ICON } from '../../shared/constants';
import { cls, getBooleanAsString } from '../../utils';
import { DBBrandProps, DBBrandState } from './model';

Expand All @@ -22,10 +21,9 @@ export default function DBBrand(props: DBBrandProps) {
return (
<div
ref={_ref}
data-icon={props.hideLogo ? 'none' : (props.icon ?? DEFAULT_ICON)}
data-show-icon={getBooleanAsString(props.showIcon)}
id={props.id ?? props.propOverrides?.id}
class={cls('db-brand', props.className)}>
class={cls('db-brand', props.className)}
data-no-text={getBooleanAsString(props.noText)}>
Comment thread
nmerget marked this conversation as resolved.
{props.children}
<Show when={props.text}>{props.text}</Show>
</div>
Expand Down
22 changes: 17 additions & 5 deletions packages/components/src/components/brand/brand.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@
@extend %db-overwrite-font-size-md;
@include helpers.display(flex);

gap: variables.$db-spacing-fixed-sm;
align-items: center;
font-weight: 700;

&::before {
--db-icon-font-size: #{variables.$db-sizing-md};
--db-icon-margin-end: 0;
--db-icon-color: #{colors.$db-brand-origin-default};
&:not(:has(img)) {
Comment thread
nmerget marked this conversation as resolved.
&::before {
content: "";
block-size: #{variables.$db-sizing-sm};
aspect-ratio: var(--db-logo-aspect-ratio);
background-image: var(--db-logo-url);
background-repeat: no-repeat;
background-size: auto #{variables.$db-sizing-sm};
Comment on lines +15 to +20
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.

Logo became $db-sizing-sm from $db-sizing-md. Is this intended?

}
}

&:not([data-no-text="true"]) {
gap: variables.$db-spacing-fixed-sm;
}

&[data-no-text="true"] {
font-size: 0;
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.

This might be an a11y issue. Screenreaders might skip texts with font-size 0.

"Do not size content to 0 pixels if you want the content to be read by a screen reader." (webaim)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This might be an a11y issue. Screenreaders might skip texts with font-size 0.

"Do not size content to 0 pixels if you want the content to be read by a screen reader." (webaim)

I even also already came to that thought, it's good that you remind me of this. We should check our codebase in general, as we're already using it at other places, and want to add the label by aria-label additionally.

}

img {
Expand Down
17 changes: 8 additions & 9 deletions packages/components/src/components/brand/docs/Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
> We removed all old properties, because brand hasn't a wrapping anchor tag (`<a>`) anymore.
> If you want to use a link around `db-brand`, do it by yourself.

| Before | Status | After | Description |
| ---------------- | :----: | :---: | ----------------------------------------------------------------------------------------------------- |
| `siteNameLink` | ❌ | ❌ | see Note |
| `alt` | ❌ | ❌ | see Note |
| `anchorRef` | ❌ | ❌ | see Note |
| `anchorTitle` | ❌ | ❌ | see Note |
| `anchorRelation` | ❌ | ❌ | see Note |
| `src` | ❌ | ❌ | see Note |
| `hideLogo` | 🆕 | ❌ | If you want a custom image, you can hide the default one and pass anything into the `children`/`slot` |
| Before | Status | After | Description |
| ---------------- | :----: | :---: | ----------- |
| `siteNameLink` | ❌ | ❌ | see Note |
| `alt` | ❌ | ❌ | see Note |
| `anchorRef` | ❌ | ❌ | see Note |
| `anchorTitle` | ❌ | ❌ | see Note |
| `anchorRelation` | ❌ | ❌ | see Note |
| `src` | ❌ | ❌ | see Note |
Comment thread
nmerget marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { InputType } from 'storybook/internal/csf';
import { StorybookIconArgTypes } from '../../../shared/examples/_icons.arg.types';

export const StorybookBrandArgTypes: Record<string, InputType> = {
hideLogo: { control: 'boolean' },
...StorybookIconArgTypes,
noText: { control: 'boolean' },
text: { control: 'text' },
id: { control: 'text' },
autofocus: { control: 'boolean' }
Comment on lines 3 to 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { StorybookBrandArgTypes } from './_brand.arg.types';

useMetadata({
storybookTitle: 'Variants',
storybookNames: ['(Default) With Logo', 'No Logo', 'Custom Logo'],
storybookNames: ['(Default) With Logo', 'Logo Variant', 'Custom Logo'],
storybookArgTypes: StorybookBrandArgTypes
});

Expand All @@ -34,8 +34,10 @@ export default function BrandVariants() {
return (
<Fragment>
<DBBrand>(Default) With Logo</DBBrand>
<DBBrand hideLogo={true}>No Logo</DBBrand>
<DBBrand hideLogo={true}>
<DBBrand data-logo="db-systel" noText>
Copy link
Copy Markdown
Contributor

@michaelmkraus michaelmkraus Jun 2, 2026

Choose a reason for hiding this comment

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

You added data-logo, but there is no CSS selector in brand.scss that overrides the --db-logo-url. Right now, this example will just render the default DB logo, right? I think we need to add the CSS logic and type the prop.

Logo Variant
Comment on lines 36 to +38
</DBBrand>
Comment thread
nmerget marked this conversation as resolved.
<DBBrand>
<img
src={state.getImage()}
alt="this is a fancy placeholder logo"
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/components/brand/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
GlobalProps,
GlobalState,
IconProps,
NoTextProps,
ShowIconProps,
TextProps
} from '../../shared/model';
Expand All @@ -15,9 +16,10 @@ export type DBBrandDefaultProps = {

export type DBBrandProps = DBBrandDefaultProps &
GlobalProps &
TextProps &
IconProps &
ShowIconProps &
Comment on lines 20 to 21
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.

Suggested change
IconProps &
ShowIconProps &

no more necessary

TextProps;
NoTextProps;
Comment thread
nmerget marked this conversation as resolved.
Outdated

export type DBBrandDefaultState = {};

Expand Down
7 changes: 7 additions & 0 deletions packages/foundations/assets/images/chevron_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/foundations/assets/images/chevron_up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/foundations/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/foundations/assets/images/resize_handle_corner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions packages/foundations/scss/colors/_default-color-icons.scss

This file was deleted.

16 changes: 0 additions & 16 deletions packages/foundations/scss/defaults/default-required.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,13 @@
@use "../helpers";
@use "../fonts";
@use "../screen-sizes";
@use "../colors/default-color-icons";
@forward "../colors/default-color-mappings";
@forward "../normalize";
@include screen-sizes.get-breakpoint-properties;

:root,
:host {
@extend %db-font-size-md;

/* COLORS */
@include default-color-icons.get-color-icons-light;

@media (prefers-color-scheme: dark) {
@include default-color-icons.get-color-icons-dark;
}

[data-mode="dark"] {
@include default-color-icons.get-color-icons-dark;
}

[data-mode="light"] {
@include default-color-icons.get-color-icons-light;
}
}

// We'll set the color scheme (https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) to light and dark if it's not already set as a meta tag in the head, which would be the recommended way.
Expand Down
3 changes: 2 additions & 1 deletion packages/foundations/scss/theme/_absolute.assets-paths.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// If you serve your assets and your css on root level you might need those paths.
@use "default.assets-paths" as assets-paths with (
$icons-path: "/assets/icons/",
$fonts-path: "/assets/fonts/"
$fonts-path: "/assets/fonts/",
$images-path: "/assets/images/"
);
9 changes: 9 additions & 0 deletions packages/foundations/scss/theme/_default-images.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@use "./default.assets-paths" as assets-paths;

@mixin get-images {
--db-textarea-resizer-image: url("#{assets-paths.$images-path}resize_handle_corner.svg");
--db-textarea-scrollbar-button-decrement: url("#{assets-paths.$images-path}chevron_down.svg");
--db-textarea-scrollbar-button-increment: url("#{assets-paths.$images-path}chevron_up.svg");
--db-logo-aspect-ratio: 1;
--db-logo-url: url("#{assets-paths.$images-path}logo.svg");
}
1 change: 1 addition & 0 deletions packages/foundations/scss/theme/_default.assets-paths.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
$icons-path: "../../assets/icons/" !default;
$fonts-path: "../../assets/fonts/" !default;
$images-path: "../../assets/images/" !default;
3 changes: 2 additions & 1 deletion packages/foundations/scss/theme/_rollup.assets-paths.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// If this library is used as an npm dependency, and the source files should be included rather than css, this corrects the paths.
@use "default.assets-paths" as assets-paths with (
$icons-path: "@db-ux/core-foundations/assets/icons/",
$fonts-path: "@db-ux/core-foundations/assets/fonts/"
$fonts-path: "@db-ux/core-foundations/assets/fonts/",
$images-path: "@db-ux/core-foundations/assets/images/"
);
3 changes: 2 additions & 1 deletion packages/foundations/scss/theme/_webpack.assets-paths.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// If this library is used as an npm dependency, and the source files should be included rather than css, this corrects the paths.
@use "default.assets-paths" as assets-paths with (
$icons-path: "~@db-ux/core-foundations/assets/icons/",
$fonts-path: "~@db-ux/core-foundations/assets/fonts/"
$fonts-path: "~@db-ux/core-foundations/assets/fonts/",
$images-path: "~@db-ux/core-foundations/assets/images/"
);
5 changes: 5 additions & 0 deletions packages/foundations/scss/theme/relative.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "../colors/placeholder";
@use "./default-images";
@forward "../defaults/default-properties";
@forward "../fonts/relative";
@forward "../icons/relative";
Expand All @@ -14,3 +15,7 @@
initial-value: "OpenSans Head", helvetica, arial, sans-serif;
inherits: true;
}

:is(:root, :host) {
@include default-images.get-images;
}
Loading
Loading