@uqds/side-nav 0.0.5-alpha.0 → 0.0.8-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 CHANGED
@@ -1,28 +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
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
28
  ```
@@ -0,0 +1 @@
1
+ .uq-side-nav{color:#2b2a29;border-top:.25rem solid #51247a;box-sizing:border-box;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5}.uq-side-nav *,.uq-side-nav *::before,.uq-side-nav *::after{box-sizing:border-box}.uq-side-nav__title{margin:0;padding:1rem 1.5rem}.uq-side-nav__title-link{font-size:1.25rem;color:#51247a;text-decoration:none}.uq-side-nav__title-link:hover,.uq-side-nav__title-link:focus{color:#51247a;text-decoration:underline}.uq-side-nav__list{border-top:1px solid #e7e3e0;display:block;list-style-type:none;margin:0;padding:0}.uq-side-nav__list--level-2{background-color:#f7f6f5;display:block;visibility:hidden;position:relative;height:0;left:0;width:100%;opacity:0;transform:translateY(-0.5rem)}.uq-side-nav__list--level-2 .uq-side-nav__list-item:last-child{border-bottom:none}.uq-side-nav__list--level-2 .uq-side-nav__link{padding:1rem 1rem 1rem 3rem !important}.uq-side-nav__list--level-2 .uq-side-nav__link:hover,.uq-side-nav__list--level-2 .uq-side-nav__link:focus{background-color:#e7e3e0 !important}.uq-side-nav__list-item{border-bottom:1px solid #e7e3e0;display:block;margin:0;padding:0;position:relative}.uq-side-nav__list-item .uq-side-nav__link{display:block;padding:1rem 1.5rem;color:#2b2a29;text-decoration:none}.uq-side-nav__list-item .uq-side-nav__link:hover,.uq-side-nav__list-item .uq-side-nav__link:focus{text-decoration:underline}.uq-side-nav__list-item .uq-side-nav__list-item--active .uq-side-nav__link{font-weight:500}.uq-side-nav__list-item__sub-toggle{position:absolute;top:0;right:0;display:none;width:3rem;height:3.5rem;padding:1rem 1rem;text-indent:-100vw;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2351247A'%3e%3cpath d='m14.285 5.145-6 6.167a.41.41 0 0 1-.598 0L1.715 5.145' fill='none' stroke='%2351247A' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e");background-size:1.2rem;background-position:center center;background-repeat:no-repeat;overflow:hidden}.uq-side-nav__list-item--open .uq-side-nav__list-item__sub-toggle,.uq-side-nav__list-item--has-subnav:focus .uq-side-nav__list-item__sub-toggle{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2351247A'%3e%3cpath d='m1.715 10.855 6-6.168a.41.41 0 0 1 .597 0l5.973 6.168' fill='none' stroke='%2351247A' stroke-width='.75' stroke-linecap='round' stroke-linejoin='round'%3e%3c/path%3e%3c/svg%3e")}.uq-side-nav__list-item--open .uq-side-nav__list--level-2,.uq-side-nav__list-item--has-subnav:focus .uq-side-nav__list--level-2{opacity:1;height:auto;visibility:visible;transform:translateY(0);z-index:20}.uq-side-nav__list-item--active .uq-side-nav__link,.uq-side-nav__list-item:focus .uq-side-nav__link{background-color:#f7f6f5}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uqds/side-nav",
3
- "version": "0.0.5-alpha.0",
3
+ "version": "0.0.8-alpha.0",
4
4
  "description": "Side nav (title, side navigation)",
5
5
  "keywords": [
6
6
  "uqds",
@@ -26,8 +26,12 @@
26
26
  "lib": "src"
27
27
  },
28
28
  "files": [
29
- "src/*"
29
+ "src/*",
30
+ "dist/*"
30
31
  ],
32
+ "scripts": {
33
+ "prepare": "gulp -f ../../gulpfile.js --cwd=. prepare"
34
+ },
31
35
  "repository": {
32
36
  "type": "git",
33
37
  "url": "git+https://github.com/uq-its-ss/design-system.git"
@@ -36,8 +40,8 @@
36
40
  "url": "https://github.com/uq-its-ss/design-system/issues"
37
41
  },
38
42
  "dependencies": {
39
- "@uqds/core": "^0.0.5-alpha.0",
40
- "@uqds/icon": "^0.0.5-alpha.0"
43
+ "@uqds/core": "^0.0.8-alpha.0",
44
+ "@uqds/icon": "^0.0.8-alpha.0"
41
45
  },
42
- "gitHead": "0d2250c3ff44460d2902ea08102e6423b3fcc3aa"
46
+ "gitHead": "ec1e27ff2c58ae9bdcd0eef7516ad5d57a00bafb"
43
47
  }
@@ -1,138 +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
- }
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
+ }
@@ -1,6 +1,6 @@
1
- @use "@uqds/core/src/scss/global" as core;
2
-
3
- $sidenav-list-item-bg: core.$uq-neutral-light80;
4
- $sidenav-list-item-active-bg: core.$uq-neutral-light40;
5
- $sidenav-list-item-divider: core.$uq-neutral-light40;
6
- $sidenav-list-item-animation-distance: core.$space-s;
1
+ @use "@uqds/core/src/scss/global" as core;
2
+
3
+ $sidenav-list-item-bg: core.$uq-neutral-light80;
4
+ $sidenav-list-item-active-bg: core.$uq-neutral-light40;
5
+ $sidenav-list-item-divider: core.$uq-neutral-light40;
6
+ $sidenav-list-item-animation-distance: core.$space-s;
@@ -0,0 +1 @@
1
+ @use 'component';