Skip to content

Commit

Permalink
Merge branch 'main' into feat/notification-size-s
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMenga committed Apr 24, 2024
2 parents e7e6eb6 + c9f0e0e commit 1a1947b
Show file tree
Hide file tree
Showing 258 changed files with 2,413 additions and 3,004 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ body:
attributes:
label: Preflight Checklist
options:
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/CONTRIBUTING.md) for this project.
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CONTRIBUTING.md) for this project.
required: true
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CODE_OF_CONDUCT.md) that this project adheres to.
required: true
- label: I have searched the [issue tracker](https://github.com/orgs/lyne-design-system/projects/4) for an issue that matches the one I want to file, without success.
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/contributing-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ body:
attributes:
label: Preflight Checklist
options:
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/CONTRIBUTING.md) for this project.
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CONTRIBUTING.md) for this project.
required: true
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CODE_OF_CONDUCT.md) that this project adheres to.
required: true
- label: I have searched the [issue tracker](https://github.com/orgs/lyne-design-system/projects/4) for an issue that matches the one I want to file, without success.
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature-request-or-enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ body:
attributes:
label: Preflight Checklist
options:
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/CONTRIBUTING.md) for this project.
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CONTRIBUTING.md) for this project.
required: true
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CODE_OF_CONDUCT.md) that this project adheres to.
required: true
- label: I have searched the [issue tracker](https://github.com/orgs/lyne-design-system/projects/4) for an issue that matches the one I want to file, without success.
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ body:
attributes:
label: Preflight Checklist
options:
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/CONTRIBUTING.md) for this project.
- label: I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CONTRIBUTING.md) for this project.
required: true
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- label: I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CODE_OF_CONDUCT.md) that this project adheres to.
required: true
- label: I have searched the [issue tracker](https://github.com/orgs/lyne-design-system/projects/4) for an issue that matches the one I want to file, without success.
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

- [ ] I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/CONTRIBUTING.md) for this project.
- [ ] I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [ ] I have read the [Contributing Guidelines](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CONTRIBUTING.md) for this project.
- [ ] I agree to follow the [Code of Conduct](https://github.com/lyne-design-system/lyne-components/blob/main/docs/CODE_OF_CONDUCT.md) that this project adheres to.
- [ ] I have searched the [pull request tracker](https://github.com/lyne-design-system/lyne-components/pulls) for a Pull Request (PR) that matches the one I want to submit, without success.

## Issue
Expand All @@ -17,7 +17,7 @@ Please check if your PR fulfills the following requirements:
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)

See [Review Guidelines](../REVIEW.md) for more information what is checked during review process.
See [Review Guidelines](../docs/REVIEW.md) for more information what is checked during review process.

## Changes

Expand Down
11 changes: 11 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
.sbdocs-content {
max-width: var(--sbb-breakpoint-medium-max) !important;
}

.sb-show-main.sb-main-padded {
padding: 2rem;
}
</style>

<script>
Expand Down Expand Up @@ -97,6 +101,13 @@
};
}

if (isChromatic()) {
const sheet = new CSSStyleSheet();
sheet.insertRule(`.sb-show-main.sb-main-padded { padding: 0rem; }`);

document.adoptedStyleSheets.push(sheet);
}

function inIframe() {
try {
return windowRef.self !== windowRef.top;
Expand Down
25 changes: 25 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import * as tokens from '@sbb-esta/lyne-design-tokens';
import type { StoryContext } from '@storybook/types';
import type { Decorator } from '@storybook/web-components';
import isChromatic from 'chromatic/isChromatic';
import { html } from 'lit';

import { withBackgroundDecorator } from '../src/storybook/testing/with-background-decorator.js';

import '../src/components/core/styles/global.scss';

const getViewportName = (key: string): string =>
Expand All @@ -8,6 +15,7 @@ const breakpoints = Object.entries(tokens)
.filter(([key]) => key.startsWith('SbbBreakpoint') && key.endsWith('Min'))
.map(([key, value]) => ({ key: getViewportName(key), value: value as number }))
.sort((a, b) => a.value - b.value);

/**
* https://www.chromatic.com/docs/viewports/
* CHROMATIC RESTRICTIONS:
Expand Down Expand Up @@ -44,7 +52,15 @@ export const parameters = {
breakpointNames,
debounceTimeout: 10,
},
docs: {
toc: {
ignoreSelector: '.docs-story h2',
headingSelector: 'h2',
},
source: { format: 'html' },
},
viewport: { viewports: storybookViewports },
backgrounds: { disable: true },
options: {
storySort: {
// Story section order.
Expand All @@ -61,3 +77,12 @@ export const parameters = {
},
},
};

export const decorators: Decorator[] = [
(story, context: StoryContext) =>
isChromatic() && context.parameters.layout !== 'fullscreen'
? html`<div style="padding: 2rem;min-height: 100vh">${story()}</div>`
: story(),
withBackgroundDecorator,
(story) => (isChromatic() ? html`<div class="sbb-disable-animation">${story()}</div>` : story()),
];
4 changes: 0 additions & 4 deletions CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2023, SBB AG
Copyright (c) 2018-2024, SBB AG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
55 changes: 25 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
<h1 align="center">
Lyne Components
</h1>
# Lyne Components

> _Lyne Components_ are the building blocks of the [Lyne Design System](https://github.com/lyne-design-system/lyne/blob/main/docs/TERMINOLOGY.md#lyne)
> and are based on standard compliant [Web Components](https://github.com/lyne-design-system/lyne/blob/main/docs/TERMINOLOGY.md#web-components)
> created using [Lit](https://github.com/lyne-design-system/lyne/blob/main/docs/TERMINOLOGY.md#lit) and
> browsable through [Storybook](https://github.com/lyne-design-system/lyne/blob/main/docs/TERMINOLOGY.md#storybook)
> Lyne Components are the building blocks of the Lyne Design System
> and are based on standard compliant Web Components
> created using [Lit](https://lit.dev/) and
> browsable through [Storybook](https://lyne-storybook.app.sbb.ch/)
<br>
## 🎯 Our aim

## ⚠️ Notice
To fulfill our [Vision](./docs/VISION.md), we are building and maintaining Lyne, our Design System, which is and acts
as our common language — our Single Source of Truth.
For this purpose we use [Design Tokens](https://github.com/lyne-design-system/lyne-design-tokens) as our design abstractions.
Those [Design Tokens](https://github.com/lyne-design-system/lyne-design-tokens) are consumed by Lyne Components and are integrated within our documentation.

**_Lyne Components_ are 🧪experimental at the moment — with enthusiasm.<br>Don't use the project until it has left infancy.**
Lyne Design Tokens and Lyne Components are available for developers and designers.

<br>
## 📚 Documentation

- General docs: [digital.sbb.ch](https://digital.sbb.ch)
- Component docs: [Storybook](https://lyne-storybook.app.sbb.ch)
- [Getting started guide](./docs/GETTING_STARTED.md)

## 💻 What we're working on right now
## 🔗 Packages

Check the current tasks we're working on over [here](https://github.com/lyne-design-system/lyne-components/projects/4) but since the project is still **🧪 experimental** and in rapid development not all tasks we're working on are reflected as issues (or tickets) since this would be too cumbersome at the current development stage. Also check out over [TODOS](./TODOS.md) what all needs to be done (at some point).
- [NPM Packages](https://www.npmjs.com/search?q=%40sbb-esta%2Flyne-)

## Browser and screen reader support
## 🖥 Browser and screen reader support

This library supports the most recent two versions of all major browsers: Chrome (including Android), Firefox, Safari (including iOS), and Edge.

Expand All @@ -30,24 +35,14 @@ macOS: VoiceOver with Safari / Chrome.
iOS: VoiceOver with Safari
Android: Android Accessibility Suite (formerly TalkBack) with Chrome.

## ⛩️ Storybook

The latest still **🧪 experimental** version of the Storybook component browser for _Lyne Components_ can be found [here](https://lyne-storybook.app.sbb.ch/).

## 🍱 npm

The current **🧪 experimental** build of Lyne Components can be found on [npm](https://www.npmjs.com/package/@sbb-esta/lyne-components).

## 📚 Documentation

Check the [docs](docs/README.md) directory for our documentation which we will continuously enhance.
Component specific docs are available on our [storybook](https://lyne-storybook.app.sbb.ch).
General docs can be read on [digital.sbb.ch](https://digital.sbb.ch).

## 🙌 Contributing

See our [contributing guide](CONTRIBUTING.md) and check also our [code of conduct](CODE_OF_CONDUCT.md) 👀.
- [General contribution guide](./docs/CONTRIBUTING.md)
- [Developer guide](./docs/DEVELOPER.md) for developers to get started working with this repo.
- [Coding standards](./docs/CODING_STANDARDS.md) for developers.
- [Code of conduct](./docs/CODE_OF_CONDUCT.md)

## 📝 License

This software is published by SBB-CFF-FFS under the [MIT](/LICENSE) licence and unsupported unless otherwise clearly stated. Use at your own risk.
This software is published by SBB-CFF-FFS under the [MIT](/LICENSE) licence and unsupported unless otherwise clearly stated.
Use at your own risk.
45 changes: 0 additions & 45 deletions STORYBOOK.md

This file was deleted.

27 changes: 0 additions & 27 deletions docs/CICD.md

This file was deleted.

Loading

0 comments on commit 1a1947b

Please sign in to comment.