Skip to content

Commit 74b9749

Browse files
Merge branch 'main' into feat-1941/filter-action-button-gap
2 parents d361928 + 984614d commit 74b9749

27 files changed

+1457
-1605
lines changed

.changeset/pre.json

+1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@
268268
"poor-pillows-fail",
269269
"poor-tigers-camp",
270270
"popular-garlics-accept",
271+
"pretty-schools-behave",
271272
"proud-bugs-compare",
272273
"proud-pianos-explode",
273274
"purple-goats-camp",

.changeset/pretty-schools-behave.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"sit-onyx": minor
3+
---
4+
5+
feat: add new `OnyxNotificationDot` component

apps/demo-app/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# demo-app
22

3+
## 1.0.0-beta.171
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [18bd03a]
8+
9+
310
## 1.0.0-beta.170
411

512
### Patch Changes

apps/demo-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "demo-app",
33
"private": true,
4-
"version": "1.0.0-beta.170",
4+
"version": "1.0.0-beta.171",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -13,7 +13,7 @@
1313
"@vueuse/core": "^12.8.2",
1414
"pinia": "^3.0.1",
1515
"sit-onyx": "workspace:^",
16-
"vue-i18n": "^11.1.1",
16+
"vue-i18n": "^11.1.2",
1717
"vue-router": "^4.5.0"
1818
},
1919
"devDependencies": {

apps/playground/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# playground
22

3+
## 1.0.0-beta.171
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [18bd03a]
8+
9+
310
## 1.0.0-beta.170
411

512
### Patch Changes

apps/playground/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "playground",
3-
"version": "1.0.0-beta.170",
3+
"version": "1.0.0-beta.171",
44
"description": "Playground for the onyx Vue components",
55
"type": "module",
66
"author": "Schwarz IT KG",

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
},
2323
"devDependencies": {
2424
"@changesets/cli": "^2.28.1",
25-
"@eslint-community/eslint-utils": "^4.4.1",
25+
"@eslint-community/eslint-utils": "^4.5.0",
2626
"@eslint/compat": "^1.2.7",
27-
"@eslint/js": "^9.21.0",
27+
"@eslint/js": "^9.22.0",
2828
"@fontsource-variable/source-code-pro": "^5.2.5",
2929
"@fontsource-variable/source-sans-3": "^5.2.5",
3030
"@microsoft/eslint-formatter-sarif": "^3.1.0",
@@ -37,14 +37,14 @@
3737
"@tsconfig/node22": "^22.0.0",
3838
"@types/eslint": "^9.6.1",
3939
"@types/jsdom": "^21.1.7",
40-
"@types/node": "^22.13.9",
40+
"@types/node": "^22.13.10",
4141
"@vitejs/plugin-vue": "^5.2.1",
4242
"@vitest/coverage-v8": "^3.0.8",
43-
"@vitest/eslint-plugin": "^1.1.36",
43+
"@vitest/eslint-plugin": "^1.1.37",
4444
"@vue/eslint-config-prettier": "^10.2.0",
4545
"@vue/eslint-config-typescript": "^14.5.0",
4646
"@vue/tsconfig": "~0.7.0",
47-
"eslint": "^9.21.0",
47+
"eslint": "^9.22.0",
4848
"eslint-plugin-compat": "^6.0.2",
4949
"eslint-plugin-playwright": "^2.2.0",
5050
"eslint-plugin-vue": "^10.0.0",
@@ -54,15 +54,15 @@
5454
"lint-staged": "^15.4.3",
5555
"prettier": "^3.5.3",
5656
"prettier-plugin-organize-imports": "^4.1.0",
57-
"publint": "^0.3.8",
57+
"publint": "^0.3.9",
5858
"rimraf": "^6.0.1",
5959
"simple-git-hooks": "^2.11.1",
6060
"storybook": "^8.6.4",
6161
"stylelint": "^16.15.0",
6262
"stylelint-no-unsupported-browser-features": "^8.0.4",
6363
"turbo": "^2.4.4",
6464
"typescript": "catalog:",
65-
"typescript-eslint": "^8.26.0",
65+
"typescript-eslint": "^8.26.1",
6666
"vite": "catalog:",
6767
"vitest": "^3.0.8",
6868
"vue-tsc": "^2.2.8"

packages/chartjs-plugin/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @sit-onyx/chartjs-plugin
22

3+
## 1.0.0-beta.171
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [18bd03a]
8+
9+
310
## 1.0.0-beta.170
411

512
### Patch Changes

packages/chartjs-plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sit-onyx/chartjs-plugin",
33
"description": "A Chart.js plugin for the onyx design system created by Schwarz IT",
4-
"version": "1.0.0-beta.170",
4+
"version": "1.0.0-beta.171",
55
"type": "module",
66
"author": "Schwarz IT KG",
77
"license": "Apache-2.0",

packages/nuxt/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @sit-onyx/nuxt
22

3+
## 1.0.0-beta.172
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [18bd03a]
8+
9+
310
## 1.0.0-beta.171
411

512
### Patch Changes

packages/nuxt/package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sit-onyx/nuxt",
3-
"version": "1.0.0-beta.171",
3+
"version": "1.0.0-beta.172",
44
"description": "A Nuxt module to easily integrate onyx into Nuxt projects",
55
"author": "Schwarz IT KG",
66
"license": "Apache-2.0",
@@ -34,19 +34,17 @@
3434
"test": "vitest",
3535
"test:coverage": "vitest run --coverage"
3636
},
37-
"dependencies": {
38-
"@nuxt/kit": "^3.15.4"
39-
},
4037
"devDependencies": {
4138
"@nuxt/devtools": "^2.2.1",
39+
"@nuxt/kit": "^3.16.0",
4240
"@nuxt/module-builder": "~0.8.4",
43-
"@nuxt/schema": "^3.15.4",
44-
"@nuxt/test-utils": "^3.17.1",
45-
"@nuxtjs/i18n": "^9.2.1",
46-
"nuxt": "^3.15.4",
41+
"@nuxt/schema": "^3.16.0",
42+
"@nuxt/test-utils": "^3.17.2",
43+
"@nuxtjs/i18n": "^9.3.1",
44+
"nuxt": "^3.16.0",
4745
"sit-onyx": "workspace:^",
4846
"typescript": "catalog:",
49-
"vue-i18n": "^11.1.1"
47+
"vue-i18n": "^11.1.2"
5048
},
5149
"peerDependencies": {
5250
"sit-onyx": "workspace:^"

packages/sit-onyx/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# sit-onyx
22

3+
## 1.0.0-beta.171
4+
5+
### Minor Changes
6+
7+
- 18bd03a: feat: add new `OnyxNotificationDot` component
8+
39
## 1.0.0-beta.170
410

511
### Patch Changes

packages/sit-onyx/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sit-onyx",
33
"description": "A design system and Vue.js component library created by Schwarz IT",
4-
"version": "1.0.0-beta.170",
4+
"version": "1.0.0-beta.171",
55
"type": "module",
66
"author": "Schwarz IT KG",
77
"license": "Apache-2.0",
@@ -64,7 +64,7 @@
6464
"storybook-dark-mode": "^4.0.2",
6565
"vue": "catalog:",
6666
"vue-component-type-helpers": "^2.2.8",
67-
"vue-i18n": "^11.1.1",
67+
"vue-i18n": "^11.1.2",
6868
"vue-router": "^4.5.0"
6969
}
7070
}

packages/sit-onyx/src/components/OnyxMiniSearch/OnyxMiniSearch.stories.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ const meta: Meta<typeof OnyxMiniSearch> = {
1212
export default meta;
1313
type Story = StoryObj<typeof OnyxMiniSearch>;
1414

15-
export const Default = { args: {} } satisfies Story;
15+
export const Default = {
16+
args: {
17+
label: "Search",
18+
},
19+
} satisfies Story;
1620

1721
export const WithValue = {
1822
args: {
23+
...Default.args,
1924
modelValue: "Test value",
2025
},
2126
} satisfies Story;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { test } from "../../playwright/a11y";
2+
import { executeMatrixScreenshotTest, mockPlaywrightIcon } from "../../playwright/screenshots";
3+
import { ONYX_COLORS } from "../../types";
4+
import OnyxIconButton from "../OnyxIconButton/OnyxIconButton.vue";
5+
import OnyxNotificationDot from "./OnyxNotificationDot.vue";
6+
7+
test.describe("Screenshot tests", () => {
8+
executeMatrixScreenshotTest({
9+
name: "Notification dot",
10+
columns: ["default", "icon-button", "hidden"],
11+
rows: ONYX_COLORS,
12+
component: (column, row) => (
13+
<OnyxNotificationDot color={row} hidden={column === "hidden"}>
14+
{column === "icon-button" ? (
15+
<OnyxIconButton icon={mockPlaywrightIcon} label="Label" color="neutral" />
16+
) : (
17+
<div
18+
style={{
19+
height: "1.5rem",
20+
width: "1.5rem",
21+
border: "1px solid var(--onyx-color-component-border-neutral)",
22+
}}
23+
></div>
24+
)}
25+
</OnyxNotificationDot>
26+
),
27+
hooks: {
28+
beforeEach: async (component, page, column) => {
29+
if (column === "icon-button") {
30+
await component.getByRole("button", { name: "Label" }).hover();
31+
}
32+
},
33+
},
34+
});
35+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import bell from "@sit-onyx/icons/bell.svg?raw";
2+
import type { Meta, StoryObj } from "@storybook/vue3";
3+
import { h } from "vue";
4+
import { textColorDecorator } from "../../utils/storybook";
5+
import OnyxIconButton from "../OnyxIconButton/OnyxIconButton.vue";
6+
import OnyxNotificationDot from "./OnyxNotificationDot.vue";
7+
8+
const meta: Meta<typeof OnyxNotificationDot> = {
9+
title: "Support/NotificationDot",
10+
component: OnyxNotificationDot,
11+
tags: ["new:component"],
12+
argTypes: {
13+
default: { control: { disable: true } },
14+
},
15+
decorators: [textColorDecorator],
16+
};
17+
18+
export default meta;
19+
type Story = StoryObj<typeof OnyxNotificationDot>;
20+
21+
export const Default = {
22+
args: {
23+
default: () => h(OnyxIconButton, { icon: bell, label: "Notifications", color: "neutral" }),
24+
},
25+
} satisfies Story;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<script lang="ts" setup>
2+
import OnyxBadge from "../OnyxBadge/OnyxBadge.vue";
3+
import type { OnyxNotificationDotProps } from "./types";
4+
5+
const props = withDefaults(defineProps<OnyxNotificationDotProps>(), {
6+
color: "warning",
7+
hidden: false,
8+
});
9+
10+
defineSlots<{
11+
/**
12+
* Main content where the dot will be positioned in relation to.
13+
*/
14+
default(): unknown;
15+
}>();
16+
</script>
17+
18+
<template>
19+
<div class="onyx-component onyx-notification-dot">
20+
<slot></slot>
21+
<OnyxBadge v-if="!props.hidden" class="onyx-notification-dot__badge" :color="props.color" dot />
22+
</div>
23+
</template>
24+
25+
<style lang="scss">
26+
@use "../../styles/mixins/layers.scss";
27+
28+
.onyx-notification-dot {
29+
@include layers.component() {
30+
--onyx-notification-dot-position: calc(
31+
var(--onyx-notification-dot-offset, 0rem) - var(--onyx-density-3xs)
32+
);
33+
position: relative;
34+
width: max-content;
35+
max-width: 100%;
36+
37+
&__badge {
38+
position: absolute;
39+
top: var(--onyx-notification-dot-position);
40+
right: var(--onyx-notification-dot-position);
41+
}
42+
43+
&:has(> .onyx-icon-button) {
44+
// density-xs = icon button padding
45+
--onyx-notification-dot-offset: var(--onyx-density-xs);
46+
}
47+
}
48+
}
49+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { OnyxBadgeProps } from "../OnyxBadge/types";
2+
3+
export type OnyxNotificationDotProps = {
4+
/**
5+
* If `true`, the dot will be hidden.
6+
*/
7+
hidden?: boolean;
8+
/**
9+
* Dot color.
10+
*/
11+
color?: OnyxBadgeProps["color"];
12+
};

packages/sit-onyx/src/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ export * from "./components/OnyxNavBar/modules";
104104
export { default as OnyxNavBar } from "./components/OnyxNavBar/OnyxNavBar.vue";
105105
export * from "./components/OnyxNavBar/types";
106106

107+
export { default as OnyxNotificationDot } from "./components/OnyxNotificationDot/OnyxNotificationDot.vue";
108+
export * from "./components/OnyxNotificationDot/types";
109+
107110
export { default as OnyxPageLayout } from "./components/OnyxPageLayout/OnyxPageLayout.vue";
108111
export * from "./components/OnyxPageLayout/types";
109112

packages/vitepress-theme/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @sit-onyx/vitepress-theme
22

3+
## 1.0.0-beta.172
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [18bd03a]
8+
9+
310
## 1.0.0-beta.171
411

512
### Patch Changes

packages/vitepress-theme/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sit-onyx/vitepress-theme",
33
"description": "VitePress theme that uses the onyx design system",
4-
"version": "1.0.0-beta.171",
4+
"version": "1.0.0-beta.172",
55
"type": "module",
66
"author": "Schwarz IT KG",
77
"license": "Apache-2.0",

0 commit comments

Comments
 (0)