@uqds/layout 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/css/main.css +1 -0
- package/package.json +47 -0
- package/src/scss/_card-grid.scss +49 -0
- package/src/scss/_container.scss +8 -0
- package/src/scss/_custom-properties.scss +16 -0
- package/src/scss/_global.scss +9 -0
- package/src/scss/_sections.scss +5 -0
- package/src/scss/_sidebar-layout.scss +21 -0
- package/src/scss/main.scss +5 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# `@uqds/layout`
|
|
2
|
+
|
|
3
|
+
> layout component
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
|
|
9
|
+
With Yarn:
|
|
10
|
+
|
|
11
|
+
```shell
|
|
12
|
+
yarn add @uqds/layout
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
With NPM:
|
|
16
|
+
|
|
17
|
+
```shell
|
|
18
|
+
npm i @uqds/layout
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### CSS
|
|
22
|
+
|
|
23
|
+
Sass:
|
|
24
|
+
|
|
25
|
+
```scss
|
|
26
|
+
@import "@uqds/layout/src/scss/main.scss";
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Postcss:
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
@import "@uqds/layout";
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Dependency graph
|
|
38
|
+
|
|
39
|
+
```shell
|
|
40
|
+
@uqds/layout
|
|
41
|
+
├─ @uqds/core
|
|
42
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
html{font-size:100%;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5;color:#2b2a29;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root{--container-max-width: 1204px;--layout-gap: 2rem;--section-gap: 6rem}@media(max-width: 63.9375rem){:root{--layout-gap: 1.5rem;--section-gap: 4.5rem}}.uq-container{width:100%;max-width:var(--container-max-width);padding-left:var(--layout-gap);padding-right:var(--layout-gap);margin-left:auto;margin-right:auto}.uq-sections{display:flex;flex-direction:column;gap:var(--section-gap)}.uq-sidebar-layout{display:flex;flex-direction:column;gap:var(--section-gap)}@media(min-width: 64rem){.uq-sidebar-layout{display:grid;gap:0;grid-template-columns:261px minmax(32px, 80px) minmax(667px, 1fr)}}.uq-sidebar-layout__sidebar{grid-column:1/span 1}.uq-sidebar-layout__main{grid-column:3/span 1}.uq-card-grid{display:grid;gap:var(--layout-gap);grid-template-columns:repeat(12, 1fr);container-type:inline-size}.uq-card-grid>*{grid-column:auto/span 12}@container (width > 460px){.uq-card-grid--target-2x>*{grid-column:auto/span 6}}@container (width > 460px){.uq-card-grid--target-3x>*{grid-column:auto/span 6}}@container (width > 667px){.uq-card-grid--target-3x>*{grid-column:auto/span 4}}@container (width > 460px){.uq-card-grid--target-4x>*{grid-column:auto/span 6}}@container (width > 667px){.uq-card-grid--target-4x>*{grid-column:auto/span 4}}@container (width > 799px){.uq-card-grid--target-4x>*{grid-column:auto/span 3}}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uqds/layout",
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
|
+
"description": "Grid CSS",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"uqds",
|
|
7
|
+
"uq",
|
|
8
|
+
"University of Queensland",
|
|
9
|
+
"design system",
|
|
10
|
+
"scss",
|
|
11
|
+
"sass",
|
|
12
|
+
"css",
|
|
13
|
+
"grid"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"author": {
|
|
19
|
+
"name": "University of Queensland",
|
|
20
|
+
"email": "webservices@uq.edu.au",
|
|
21
|
+
"url": "https://uq.edu.au"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/uq-its-ss/design-system#readme",
|
|
24
|
+
"license": "ISC",
|
|
25
|
+
"directories": {
|
|
26
|
+
"lib": "src"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"src/*",
|
|
30
|
+
"dist/*"
|
|
31
|
+
],
|
|
32
|
+
"style": "dist/css/main.css",
|
|
33
|
+
"scripts": {
|
|
34
|
+
"prepare": "gulp -f ../../gulpfile.js --cwd=. prepare"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/uq-its-ss/design-system.git"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/uq-its-ss/design-system/issues"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@uqds/core": "^1.1.1"
|
|
45
|
+
},
|
|
46
|
+
"gitHead": "ed118d06dc24d9cf7f0a5e9d24b8da30591098b3"
|
|
47
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "global" as *;
|
|
3
|
+
|
|
4
|
+
.uq-card-grid {
|
|
5
|
+
display: grid;
|
|
6
|
+
gap: var(--layout-gap);
|
|
7
|
+
grid-template-columns: repeat(12, 1fr);
|
|
8
|
+
container-type: inline-size;
|
|
9
|
+
|
|
10
|
+
& > * {
|
|
11
|
+
grid-column: auto / span 12;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.uq-card-grid--target-2x {
|
|
16
|
+
& > * {
|
|
17
|
+
@container (width > #{$card-grid-container-sm}) {
|
|
18
|
+
grid-column: auto / span 6;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.uq-card-grid--target-3x {
|
|
24
|
+
& > * {
|
|
25
|
+
@container (width > #{$card-grid-container-sm}) {
|
|
26
|
+
grid-column: auto / span 6;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@container (width > #{$card-grid-container-md}) {
|
|
30
|
+
grid-column: auto / span 4;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.uq-card-grid--target-4x {
|
|
36
|
+
& > * {
|
|
37
|
+
@container (width > #{$card-grid-container-sm}) {
|
|
38
|
+
grid-column: auto / span 6;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@container (width > #{$card-grid-container-md}) {
|
|
42
|
+
grid-column: auto / span 4;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@container (width > #{$card-grid-container-lg}) {
|
|
46
|
+
grid-column: auto / span 3;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "global" as *;
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--container-max-width: #{$container-max-width};
|
|
6
|
+
--layout-gap: #{core.$space-xl};
|
|
7
|
+
--section-gap: 6rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Resize custom properties for tablet/mobile.
|
|
11
|
+
@media #{core.$screen-lg-down} {
|
|
12
|
+
:root {
|
|
13
|
+
--layout-gap: #{core.$space-l};
|
|
14
|
+
--section-gap: #{core.$space-uul};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
|
|
3
|
+
// The container max-width includes the desktop page gutters.
|
|
4
|
+
$container-max-width: 32px + 1140px + 32px;
|
|
5
|
+
|
|
6
|
+
// Container query sizes for card-grid.
|
|
7
|
+
$card-grid-container-sm: 460px;
|
|
8
|
+
$card-grid-container-md: 667px;
|
|
9
|
+
$card-grid-container-lg: 799px;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
|
|
3
|
+
.uq-sidebar-layout {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--section-gap);
|
|
7
|
+
|
|
8
|
+
@media #{core.$screen-lg-up} {
|
|
9
|
+
display: grid;
|
|
10
|
+
gap: 0;
|
|
11
|
+
grid-template-columns: 261px minmax(32px, 80px) minmax(667px, 1fr);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.uq-sidebar-layout__sidebar {
|
|
16
|
+
grid-column: 1 / span 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.uq-sidebar-layout__main {
|
|
20
|
+
grid-column: 3 / span 1;
|
|
21
|
+
}
|