Skip to content

Commit 3ea4469

Browse files
committed
Merge dev into feature/uui-dialog-layout
2 parents d5a25c9 + b0f9e17 commit 3ea4469

15 files changed

+32587
-35287
lines changed

.storybook/preview-body.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<script>
2-
document.body.classList.add('uui-root');
2+
document.body.classList.add('uui-font');
33
document.body.classList.add('uui-text');
44
</script>

package-lock.json

Lines changed: 32350 additions & 35096 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
},
5959
"devDependencies": {
6060
"@babel/core": "7.15.0",
61-
"@open-wc/testing": "2.5.33",
61+
"@open-wc/testing": "3.0.4",
6262
"@rollup/plugin-node-resolve": "13.0.5",
6363
"@storybook/addon-a11y": "6.4.18",
6464
"@storybook/addon-actions": "6.4.18",
@@ -94,6 +94,7 @@
9494
"postcss-custom-properties-fallback": "1.0.1",
9595
"postcss-jsx": "0.36.4",
9696
"postcss-load-config": "3.1.0",
97+
"postcss-url": "^10.1.3",
9798
"postcss-values-parser": "6.0.0",
9899
"prettier": "2.5.1",
99100
"rimraf": "3.0.2",
@@ -102,12 +103,12 @@
102103
"rollup-plugin-import-css": "3.0.2",
103104
"rollup-plugin-minify-html-literals": "1.2.6",
104105
"rollup-plugin-postcss": "4.0.2",
105-
"storybook-builder-vite": "0.1.14",
106+
"storybook-builder-vite": "0.1.15",
106107
"tsc-files": "1.1.3",
107108
"turbo": "*",
108109
"typescript": "4.5.2",
109-
"vite": "2.7.13",
110-
"vite-tsconfig-paths": "3.3.17",
110+
"vite": "2.8.1",
111+
"vite-tsconfig-paths": "3.4.0",
111112
"web-component-analyzer": "1.1.6"
112113
},
113114
"workspaces": [

packages/uui-css/README.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,53 @@
55
UUI-CSS package contains css files which can be included in your project or components if needed
66

77
- **custom-properties.css** — use this if you like to include our custom properties in your project.
8-
- **local-typography.css** — use this if you like to declare styles for typography, this is needed when using ex.: H1 in a Shadow DOM.
9-
- **root.css** — If you like your project to be styled for Umbraco UI, then include this in the root of your project.
8+
- **uui-font.css** — use this if you like to import our font in your project. You must set the `uui-font` class on your root element.
9+
- **uui-text.css** — use this if you like to declare styles for typography, this is needed when using ex.: H1 in a Shadow DOM. You must set the `uui-text` class in your root element.
10+
11+
Bundle:
12+
13+
- **uui-css.css** — If you like your project to be styled for Umbraco UI, then include this in the root of your project. This contains all the previous files, so make sure to only include this file in your project if you need to style your project.
14+
15+
# Usage in your project
16+
17+
## CDN
18+
19+
For the best results you should include the `uui-css.css` bundle in your project, which contains all the css files and custom variables:
20+
21+
```html
22+
<!-- Latest Version -->
23+
<link
24+
rel="stylesheet"
25+
href="https://cdn.jsdelivr.net/npm/@umbraco-ui/uui-css@latest/dist/uui-css.css" />
26+
27+
<!-- Specific version -->
28+
<link
29+
rel="stylesheet"
30+
href="https://cdn.jsdelivr.net/npm/@umbraco-ui/[email protected]/dist/uui-css.css" />
31+
```
1032

1133
## Installation
1234

35+
If you want to have fine-grained control over the CSS files, you can install the `@umbraco-ui/uui-css` package.
36+
1337
```zsh
1438
npm i @umbraco-ui/uui-css
1539
```
1640

1741
## Usage
1842

19-
```html
20-
<style src="@umbraco-ui/uui-css/root.css"></style>
43+
For a build system like _Vite_, the styling could be included like this if you want to control the styling and variables with the build system:
44+
45+
```ts
46+
// app.ts
47+
import '@umbraco-ui/uui-css/dist/custom-properties.css';
48+
import '@umbraco-ui/uui-css/dist/uui-font.css';
49+
import '@umbraco-ui/uui-css/dist/uui-text.css';
50+
```
51+
52+
Or you can just import the compiled bundle at once:
53+
54+
```ts
55+
// app.ts
56+
import '@umbraco-ui/uui-css/dist/uui-css.css';
2157
```

packages/uui-css/lib/guidelines.story.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const Typography = () => html`
9292
<h2>Setup</h2>
9393
<p>
9494
The Umbraco Typography can be used on a full web application or on a
95-
dedicated spot. To set the font use the <b>uui-root</b> class on the root
95+
dedicated spot. To set the font use the <b>uui-font</b> class on the root
9696
element or a element of interest. Additionally the <b>uui-text</b> class
9797
must be set to expose the Umbraco Typography Styles. See the UUI-CSS
9898
package for more.

packages/uui-css/lib/typography/uui-text.css

Lines changed: 0 additions & 165 deletions
This file was deleted.

packages/uui-css/lib/uui-css.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
@import './custom-properties.css';
2-
@import './typography/lato.css';
3-
@import './typography/uui-root.css';
4-
@import './typography/uui-text.css';
2+
@import './uui-font.css';
3+
@import './uui-text.css';

packages/uui-css/lib/uui-css.story.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ export default {
99
docs: {
1010
source: {
1111
code: `
12-
<style src="@umbraco-ui/uui-css/root.css"></style>
12+
// Include each of the following:
13+
import '@umbraco-ui/uui-css/dist/custom-properties.css';
14+
import '@umbraco-ui/uui-css/dist/uui-font.css';
15+
import '@umbraco-ui/uui-css/dist/uui-text.css';
16+
17+
// Alternatively include the compiled bundle
18+
import '@umbraco-ui/uui-css/dist/uui-css.css';
1319
`,
1420
},
1521
},
@@ -28,12 +34,12 @@ export const Overview: Story = () => html` <article style="max-width:580px;">
2834
properties in your project.
2935
</li>
3036
<li>
31-
<b>uui-root.css</b> — use the .uui-root class if you like to declare the
37+
<b>uui-font.css</b> — use the .uui-font class if you like to declare the
3238
Umbraco typography, this is needed for getting the Umbraco typography.
3339
</li>
3440
<li>
3541
<b>uui-text.css</b> — use the .uui-text class if you like to declare
36-
styles for typography, must be used together with .uui-root. This is
42+
styles for typography, must be used together with .uui-font. This is
3743
needed for having proper styling for H1, H2, P etc.
3844
</li>
3945
<li>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
.uui-root {
1+
@import './typography/lato.css';
2+
3+
.uui-font {
24
font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
35
font-size: 15px;
46
line-height: calc(var(--uui-size-2) * 4);
57
-webkit-font-smoothing: antialiased;
6-
font-smoothing: antialiased;
78
}

packages/uui-css/lib/uui-root.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)