-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: changed the consumption how to import required styles (#2612)
* feat: changed the consumption how to import required styles * fix: wrong import * chore: add extra classes for foundation styling docs: improve documentation for foundations and components * fix: issue with wrong placeholder * fix: issue with wrong import * chore: update snapshots * chore: update snapshots
- Loading branch information
Showing
62 changed files
with
1,014 additions
and
531 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
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
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
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,17 @@ | ||
/* | ||
Use this file to add transitions for db-components. | ||
Adds color and border transitions for a smooth experience. | ||
*/ | ||
|
||
@use "@db-ui/foundations/build/scss/animation"; | ||
|
||
// transitions | ||
[class^="db-"], | ||
[class^="db-"] * { | ||
@extend %default-transition; | ||
|
||
::before, | ||
::after { | ||
@extend %default-transition; | ||
} | ||
} |
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,5 +1,12 @@ | ||
/* This is a predefined beginner friendly bundle with default asset-paths (../assets) */ | ||
|
||
@forward "./db-ui-components"; | ||
// Bundle default theme | ||
@forward "@db-ui/foundations/build/css/default-theme"; | ||
|
||
// Bundle optionals | ||
@forward "@db-ui/foundations/build/scss/icons/include"; | ||
@forward "@db-ui/foundations/build/scss/helpers/classes/all"; | ||
@forward "@db-ui/foundations/build/scss/density/classes/all"; | ||
@forward "@db-ui/foundations/build/scss/fonts/classes/all"; | ||
@forward "@db-ui/foundations/build/scss/colors/classes/all"; |
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
File renamed without changes.
43 changes: 43 additions & 0 deletions
43
packages/components/test/import-styles/simple-button/index.html
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,43 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
<!--<script type="module" src="./main.js"></script>--> | ||
<link rel="stylesheet" href="test.css" /> | ||
</head> | ||
<body> | ||
<div style="display: flex"> | ||
<button class="db-button">Button</button> | ||
<button class="db-button" data-icon="user">Icon Button</button> | ||
<div class="db-input"> | ||
<label for="OVERWRITE_DEFAULT_ID">Label</label> | ||
<input | ||
aria-invalid="false" | ||
id="OVERWRITE_DEFAULT_ID" | ||
type="text" | ||
placeholder=" " | ||
aria-describedby="" | ||
/> | ||
(Default) Regular | ||
<span | ||
id="OVERWRITE_DEFAULT_ID-valid-message" | ||
class="db-infotext" | ||
data-semantic="successful" | ||
data-size="small" | ||
> | ||
TODO: Add a validMessage | ||
</span> | ||
<span | ||
id="OVERWRITE_DEFAULT_ID-invalid-message" | ||
class="db-infotext" | ||
data-semantic="critical" | ||
data-size="small" | ||
> | ||
TODO: Add an invalidMessage | ||
</span> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
packages/components/test/import-styles/simple-button/main.js
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,17 @@ | ||
// The theme contains all prop required for components like spacings, colors, ... | ||
import '@db-ui/foundations/build/css/default-theme.css'; | ||
// The font include uses default font families based on your bundling paths (relative, absolute, webpack, rollup) | ||
import '@db-ui/foundations/build/css/fonts/include-rollup.css'; | ||
// The required styles will normalize css and add focus and default font to body | ||
import '@db-ui/foundations/build/css/init/required.css'; | ||
// The default root adds a default color space (neutral) and a density (regular) | ||
import '@db-ui/foundations/build/css/init/default-root.css'; | ||
|
||
// Optional: Add animations / transitions for components | ||
import '@db-ui/components/build/styles/component-animations.css'; | ||
// Optional: Add data-icon/data-icon-after to global attributes to enable icons for components | ||
import '@db-ui/foundations/build/css/icons/include-rollup.css'; | ||
|
||
// Optional: Add components | ||
import '@db-ui/components/build/components/button/button.css'; | ||
import '@db-ui/components/build/components/input/input.css'; |
15 changes: 15 additions & 0 deletions
15
packages/components/test/import-styles/simple-button/test.css
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,15 @@ | ||
/* The theme contains all prop required for components like spacings, colors, ... */ | ||
@import "@db-ui/foundations/build/css/default-theme.css"; | ||
/* The font include uses default font families based on your bundling paths (relative, absolute, webpack, rollup) */ | ||
@import "@db-ui/foundations/build/css/fonts/include-rollup.css"; | ||
/* The required styles will normalize css and add focus and default font to body */ | ||
@import "@db-ui/foundations/build/css/init/required.css"; | ||
/* The default root adds a default color space (neutral) and a density (regular) */ | ||
@import "@db-ui/foundations/build/css/init/default-root.css"; | ||
/* Optional: Add animations / transitions for components */ | ||
@import "@db-ui/components/build/styles/component-animations.css"; | ||
/* Optional: Add data-icon/data-icon-after to global attributes to enable icons for components */ | ||
@import "@db-ui/foundations/build/css/icons/include-rollup.css"; | ||
/* Optional: Add components */ | ||
@import "@db-ui/components/build/components/button/button.css"; | ||
@import "@db-ui/components/build/components/input/input.css"; |
Oops, something went wrong.