-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tooltip' of https://github.com/swisspost/design-system …
…into tooltip
- Loading branch information
Showing
31 changed files
with
734 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Internalized bootstrap border utility classes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Updated header button styles to match the header anchor styles. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': patch | ||
--- | ||
|
||
Added documentation for developing and designing accessible webpages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Cleaned up \_button.scss by moving button-specific variables to button.scss. Redefined cross-referenced variables in respective component files. Removed unused variables. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/documentation/cypress/snapshots/utilities/borders.snapshot.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
describe('Borders', () => { | ||
it('borders', () => { | ||
cy.visit('/iframe.html?id=snapshots--borders'); | ||
cy.get('.border-example', { timeout: 30000 }).should('be.visible'); | ||
cy.percySnapshot('Borders', { widths: [1440] }); | ||
}); | ||
|
||
it('rounded', () => { | ||
cy.visit('/iframe.html?id=snapshots--rounded'); | ||
cy.get('.border-example', { timeout: 30000 }).should('be.visible'); | ||
cy.percySnapshot('Rounded', { widths: [1440] }); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"siteId": "916313b9-cc34-4291-bb7f-6463df07598d", | ||
"siteUrl": "temp-next-design-system-post.netlify.app" | ||
"siteId": "edc7287b-ec63-423c-84aa-c2a1cffbcf87", | ||
"siteUrl": "swisspost-design-system-next.netlify.app" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packages/documentation/src/stories/utilities/borders/borders.docs.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { Canvas, Controls, Meta } from '@storybook/blocks'; | ||
import * as BordersStories from './borders.stories'; | ||
|
||
<Meta of={BordersStories} /> | ||
|
||
# Borders & Radius | ||
|
||
<div className="lead"> | ||
Use border utilities to define and style the `border` and `border-radius` of an element. | ||
</div> | ||
|
||
## Border | ||
|
||
The `border` utility provides the ability to add, remove, or style borders using predefined classes. | ||
|
||
- `border`: Applies a border on all sides of an element. | ||
|
||
- `border-{side}`: Sets the border on a specific side. Supports `border-top` (top edge), `border-end` (inline end, mapped to right in LTR), `border-bottom` (bottom edge), and `border-start` (inline start, mapped to left in LTR). | ||
|
||
- `border-width`: Defines the border width. | ||
|
||
### Examples | ||
|
||
#### Add borders to custom elements | ||
|
||
<Canvas sourceState="shown" of={BordersStories.BorderSides} /> | ||
<div className="hide-col-default"> | ||
<Controls of={BordersStories.BorderSides} /> | ||
</div> | ||
|
||
#### Remove specific borders | ||
|
||
Border subtraction can be achieved with the use of the `border-{side}-0` | ||
classes. | ||
|
||
<Canvas sourceState="shown" of={BordersStories.RemoveBorders} /> | ||
<div className="hide-col-default"> | ||
<Controls of={BordersStories.RemoveBorders} /> | ||
</div> | ||
|
||
## Border Radius | ||
|
||
Add the `rounded` class to an element to easily apply a border-radius on its corners. | ||
|
||
- `rounded-{side}-{scale}`: Αpplies a border-radius on all or specific sides and defines its scale. Predefined classes for the `side` are: `top`, `end` , `bottom` and `start` and for the `scale` are: `4`: 4px, `8`: 8px, `pill`: 50rem and `circle`: 50%. | ||
|
||
### Examples | ||
|
||
<Canvas sourceState="shown" of={BordersStories.BorderRounded} /> | ||
<div className="hide-col-default"> | ||
<Controls of={BordersStories.BorderRounded} /> | ||
</div> |
Oops, something went wrong.