Skip to content

Commit 082edcd

Browse files
mfranzkenmergetgithub-actions[bot]
authored
feat: added playground page (#4551)
* feat: align how to use a DBCard as button or anchor * auto update snapshots (#4507) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: update interactive card * auto update snapshots (#4525) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update docs/migration/v2.x.x-to-v3.0.0.md Co-authored-by: Maximilian Franzke <[email protected]> * Update docs/migration/v2.x.x-to-v3.0.0.md Co-authored-by: Maximilian Franzke <[email protected]> * Update showcases/vue-showcase/src/components/card/Card.vue Co-authored-by: Maximilian Franzke <[email protected]> * Update showcases/react-showcase/src/components/card/index.tsx Co-authored-by: Maximilian Franzke <[email protected]> * Update showcases/angular-showcase/src/app/components/card/card.component.html Co-authored-by: Maximilian Franzke <[email protected]> * feat: add auto interactive mode when wrapping card in button or anchor * fix: linting issue * feat: added playground page (#4543) * Revert "feat: added playground page (#4543)" This reverts commit 9c5665e. * Revert "chore: update lint-staged config (#4500)" (#4550) This reverts commit f6baa38. * docs: added playground page * chore: run format * fix: linting issue * auto update snapshots (#4558) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestions from code review * Update index.mdx * refactor: restructured the pages structure * refactor: more contents * style: optimizations * Update v2.x.x-to-v3.0.0.md * refactor: prettier * refactor: running prettier * Update .jscpd.json * Update playgrounds.scss * auto update snapshots (#4563) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: issue with vue showcase * refactor: some optimizations * refactor: further optimizations * style: added general tokens * style: optimization * refactor: reformatting * refactor: using a variable * auto update snapshots (#4584) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Nicolas Merget <[email protected]> Co-authored-by: Nicolas Merget <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent ebdbfa6 commit 082edcd

File tree

16 files changed

+522
-2
lines changed

16 files changed

+522
-2
lines changed

.config/.jscpd.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"reporters": ["console"],
44
"minTokens": 65,
55
"ignore": [
6+
"showcases/patternhub/public/assets/images/*.svg",
67
"**/.angular/**",
78
".history/**",
89
"**/__snapshots__/**",

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ body:
99
value: |
1010
Thank you for taking the time to fill out this bug report! Feedback from the community is highly valuable to us, as it helps improve our work and benefits all users. 🙂
1111
12+
We would be more than happy if you could share a URL if the problem occurs in our [documentation](https://design-system.deutschebahn.com/core-web/), or at least some code. Even better would be a [working example on StackBlitz or CodeSandbox](https://design-system.deutschebahn.com/core-web/version/latest/foundations/playgrounds). Please keep in mind not to share any internal information or data this way. This includes internal URLs. Only use sample material.
13+
1214
- type: checkboxes
1315
id: component
1416
attributes:

packages/foundations/scss/defaults/default-code.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pre:not([class]):has(code) {
1616
}
1717
}
1818

19-
a:has(code:not([class])) {
19+
a:has(code:not([class]):only-child) {
2020
background-color: colors.$db-adaptive-bg-inverted-contrast-max-default;
2121
color: colors.$db-adaptive-on-bg-inverted-default;
2222

showcases/patternhub/data/routes.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ export const ROUTES: NavigationItem[] = [
291291
]
292292
}
293293
]
294-
}
294+
},
295+
{ label: 'Playgrounds', path: '/foundations/playgrounds' }
295296
];
296297

297298
const fillNavigationRecursive = (

showcases/patternhub/pages/_app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import LinkHeader from '../components/link-header';
77
import '../styles/decision-tree.scss';
88
import '../styles/globals.scss';
99
import '../styles/highlight.scss';
10+
import '../styles/playgrounds.scss';
1011

1112
const App = ({ Component, pageProps }: AppProps) => (
1213
<MDXProvider
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import DefaultPage from "../../../components/default-page";
2+
import { DBCard } from "../../../../../output/react/src";
3+
4+
# Playgrounds
5+
6+
You can try out our components on StackBlitz or CodeSandbox without downloading or installing anything on your local machine.
7+
8+
We would also appreciate it if you could provide a working example when opening an issue in our repository. Please keep in mind not to share any internal information or data this way, not even in screenshots. This includes internal URLs. Only use sample material.
9+
10+
<section class="playground">
11+
12+
## CodeSandbox
13+
14+
<a href="https://codesandbox.io/s/github/db-ux-design-system/examples/tree/main/react-example">
15+
<DBCard behavior="interactive">
16+
![](/assets/images/react-showcase.svg)
17+
<strong>React 18</strong>
18+
React app including `@db-ux/react-core-components`
19+
</DBCard>
20+
</a>
21+
22+
<a href="https://codesandbox.io/s/github/db-ux-design-system/examples/tree/main/vue-example">
23+
<DBCard behavior="interactive">
24+
![](/assets/images/vue-showcase.svg)
25+
<strong>Vue 3</strong>
26+
Vue app including `@db-ux/v-core-components`
27+
</DBCard>
28+
</a>
29+
30+
<a href="https://codesandbox.io/s/github/db-ux-design-system/examples/tree/main/angular17-example">
31+
<DBCard behavior="interactive">
32+
![](/assets/images/angular-showcase.svg)
33+
<strong>Angular 17</strong>
34+
Angular app including `@db-ux/ngx-core-components`
35+
</DBCard>
36+
</a>
37+
38+
<a href="https://codesandbox.io/s/github/db-ux-design-system/examples/tree/main/react-tailwind-template">
39+
<DBCard behavior="interactive">
40+
![](/assets/images/react-wind-showcase.svg)
41+
<strong>React 18 + tailwind</strong>
42+
React + tailwind app including `@db-ux/react-core-components`
43+
</DBCard>
44+
</a>
45+
46+
</section>
47+
48+
<section class="playground">
49+
50+
## StackBlitz
51+
52+
<a href="https://stackblitz.com/fork/github/db-ux-design-system/examples/tree/main/react-example?file=index.html">
53+
<DBCard behavior="interactive">
54+
![](/assets/images/react-showcase.svg)
55+
<strong>React 18</strong>
56+
React app including `@db-ux/react-core-components`
57+
</DBCard>
58+
</a>
59+
60+
<a href="https://stackblitz.com/fork/github/db-ux-design-system/examples/tree/main/vue-example?file=index.html">
61+
<DBCard behavior="interactive">
62+
![](/assets/images/vue-showcase.svg)
63+
<strong>Vue 3</strong>
64+
Vue app including `@db-ux/v-core-components`
65+
</DBCard>
66+
</a>
67+
68+
<a href="https://stackblitz.com/fork/github/db-ux-design-system/examples/tree/main/angular17-example?file=index.html">
69+
<DBCard behavior="interactive">
70+
![](/assets/images/angular-showcase.svg)
71+
<strong>Angular 17</strong>
72+
Angular app including `@db-ux/ngx-core-components`
73+
</DBCard>
74+
</a>
75+
76+
<a href="https://stackblitz.com/fork/github/db-ux-design-system/examples/tree/main/react-tailwind-template?file=index.html">
77+
<DBCard behavior="interactive">
78+
![](/assets/images/react-wind-showcase.svg)
79+
<strong>React 18 + tailwind</strong>
80+
React + tailwind app including `@db-ux/react-core-components`
81+
</DBCard>
82+
</a>
83+
84+
</section>
85+
86+
export default ({ children }) => <DefaultPage>{children}</DefaultPage>;
Lines changed: 87 additions & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Angular logo retrieved from URL: https://angular.io/assets/images/logos/angular/angular.svg
Lines changed: 97 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)