@uqds/side-nav 0.0.5-alpha.0
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 +28 -0
- package/package.json +43 -0
- package/src/scss/_component.scss +138 -0
- package/src/scss/_global.scss +6 -0
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# `@uqds/side-nav`
|
|
2
|
+
|
|
3
|
+
> side nav component
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### Installation
|
|
8
|
+
|
|
9
|
+
With Yarn:
|
|
10
|
+
```shell
|
|
11
|
+
yarn add @uqds/side-nav
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
With NPM:
|
|
15
|
+
```shell
|
|
16
|
+
npm i @uqds/side-nav
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Dependency graph
|
|
22
|
+
|
|
23
|
+
```shell
|
|
24
|
+
@uqds/side-nav
|
|
25
|
+
├─ @uqds/core
|
|
26
|
+
└─ @uqds/icon
|
|
27
|
+
└─ @uqds/core
|
|
28
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@uqds/side-nav",
|
|
3
|
+
"version": "0.0.5-alpha.0",
|
|
4
|
+
"description": "Side nav (title, side navigation)",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"uqds",
|
|
7
|
+
"uq",
|
|
8
|
+
"University of Queensland",
|
|
9
|
+
"design system",
|
|
10
|
+
"scss",
|
|
11
|
+
"sass",
|
|
12
|
+
"css",
|
|
13
|
+
"side nav"
|
|
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
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/uq-its-ss/design-system.git"
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/uq-its-ss/design-system/issues"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@uqds/core": "^0.0.5-alpha.0",
|
|
40
|
+
"@uqds/icon": "^0.0.5-alpha.0"
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "0d2250c3ff44460d2902ea08102e6423b3fcc3aa"
|
|
43
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "@uqds/icon/src/scss/global" as icon-constants;
|
|
3
|
+
@use 'global' as *;
|
|
4
|
+
|
|
5
|
+
.uq-side-nav {
|
|
6
|
+
color: core.$text;
|
|
7
|
+
border-top: core.$space-xs solid core.$uq-purple;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
font-family: core.$font-body;
|
|
10
|
+
font-size: core.$font-size;
|
|
11
|
+
font-weight: core.$font-weight-normal;
|
|
12
|
+
line-height: core.$line-height;
|
|
13
|
+
|
|
14
|
+
*, *::before, *::after {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__title {
|
|
19
|
+
margin: core.$space-none;
|
|
20
|
+
padding: core.$space core.$space-m;
|
|
21
|
+
|
|
22
|
+
&-link {
|
|
23
|
+
font-size: core.$font-size-l;
|
|
24
|
+
color: core.$uq-purple;
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
|
|
27
|
+
&:hover,
|
|
28
|
+
&:focus {
|
|
29
|
+
color: core.$uq-purple;
|
|
30
|
+
text-decoration: underline;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__list {
|
|
36
|
+
border-top: 1px solid $sidenav-list-item-divider;
|
|
37
|
+
display: block;
|
|
38
|
+
list-style-type: none;
|
|
39
|
+
margin: core.$space-none;
|
|
40
|
+
padding: core.$space-none;
|
|
41
|
+
|
|
42
|
+
&--level-2 {
|
|
43
|
+
background-color: $sidenav-list-item-bg;
|
|
44
|
+
display: block;
|
|
45
|
+
visibility: hidden;
|
|
46
|
+
position: relative;
|
|
47
|
+
height: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
width: 100%;
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transform: translateY(-($sidenav-list-item-animation-distance));
|
|
52
|
+
|
|
53
|
+
.uq-side-nav__list-item {
|
|
54
|
+
|
|
55
|
+
&:last-child {
|
|
56
|
+
border-bottom: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.uq-side-nav__link {
|
|
61
|
+
padding: core.$space core.$space core.$space core.$space-xxl !important;
|
|
62
|
+
|
|
63
|
+
&:hover,
|
|
64
|
+
&:focus {
|
|
65
|
+
background-color: $sidenav-list-item-active-bg !important;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&-item {
|
|
71
|
+
border-bottom: 1px solid $sidenav-list-item-divider;
|
|
72
|
+
display: block;
|
|
73
|
+
margin: core.$space-none;
|
|
74
|
+
padding: core.$space-none;
|
|
75
|
+
position: relative;
|
|
76
|
+
|
|
77
|
+
.uq-side-nav__link {
|
|
78
|
+
display: block;
|
|
79
|
+
padding: core.$space core.$space-m;
|
|
80
|
+
color: core.$text;
|
|
81
|
+
text-decoration: none;
|
|
82
|
+
|
|
83
|
+
&:hover,
|
|
84
|
+
&:focus {
|
|
85
|
+
text-decoration: underline;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.uq-side-nav__list-item {
|
|
90
|
+
&--active {
|
|
91
|
+
.uq-side-nav__link {
|
|
92
|
+
font-weight: core.$font-weight-medium;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// hidden for now until JS implementation
|
|
98
|
+
&__sub-toggle {
|
|
99
|
+
position: absolute;
|
|
100
|
+
top: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
display: none; //block
|
|
103
|
+
width: 3rem;
|
|
104
|
+
height: 3.5rem;
|
|
105
|
+
padding: core.$space core.$space;
|
|
106
|
+
text-indent: -100vw;
|
|
107
|
+
background-image: url(icon-constants.get-icon('standard--arrow-down-1', core.$uq-purple));
|
|
108
|
+
background-size: 1.2rem;
|
|
109
|
+
background-position: center center;
|
|
110
|
+
background-repeat: no-repeat;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--open,
|
|
115
|
+
&--has-subnav:focus {
|
|
116
|
+
.uq-side-nav__list-item__sub-toggle {
|
|
117
|
+
background-image: url(icon-constants.get-icon('standard--arrow-up-1', core.$uq-purple));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.uq-side-nav__list--level-2 {
|
|
121
|
+
opacity: 1;
|
|
122
|
+
height: auto;
|
|
123
|
+
visibility: visible;
|
|
124
|
+
transform: translateY(0);
|
|
125
|
+
z-index: 20;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&--active,
|
|
130
|
+
&:focus {
|
|
131
|
+
.uq-side-nav__link {
|
|
132
|
+
background-color: $sidenav-list-item-bg;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|