@coopdigital/styles 0.0.7 → 0.1.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/LICENSE +21 -0
- package/README.md +159 -0
- package/dist/reset.css +81 -0
- package/dist/vars.css +5 -0
- package/package.json +3 -3
- package/src/reset.scss +81 -0
- package/src/vars.scss +6 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Co-operative Group Limited
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<nav>
|
|
2
|
+
<img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/logos/coopeng-logo.svg" alt="Co-op logo" width="100"/>
|
|
3
|
+
<br />
|
|
4
|
+
<br />
|
|
5
|
+
</nav>
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Experience Kit for Styles
|
|
10
|
+
|
|
11
|
+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
12
|
+
[all_contributors_badge]: https://img.shields.io/badge/all_contributors-15-C08A00.svg ''
|
|
13
|
+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
<a href="https://www.npmjs.com/package/@coopdigital/styles"><img src="https://img.shields.io/npm/v/%40coopdigital%2Fstyles?color=E85A00" alt="npm version" /></a>
|
|
17
|
+
<img alt="NPM Last Update" src="https://img.shields.io/npm/last-update/%40coopdigital%2Fstyles?label=published&color=6762F9">
|
|
18
|
+
<img alt="NPM Downloads" src="https://img.shields.io/npm/d18m/%40coopdigital%2Fstyles?color=819C00">
|
|
19
|
+
[![All Contributors][all_contributors_badge]](#contributors)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Getting started
|
|
24
|
+
|
|
25
|
+
Install the package from NPM:
|
|
26
|
+
```
|
|
27
|
+
npm install @coopdigital/styles
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Import styles in the format that you need:
|
|
31
|
+
```
|
|
32
|
+
@import "@coopdigital/styles/components/Button.css"
|
|
33
|
+
@use "@coopdigital/styles/components/Button.scss"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Developing
|
|
37
|
+
|
|
38
|
+
Refer to the [root README](https://gitlab.com/coopeng/sds/oneweb/experience-kit/-/blob/main/README.md) for general development setup and usage instructions (lint, formatting, etc).
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Package Scripts
|
|
42
|
+
|
|
43
|
+
The following scripts should be run inside the styles package folder.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
| Script | Action |
|
|
47
|
+
| -------------------- | ---------------------------------------- |
|
|
48
|
+
| `npm run test` | To run vitest |
|
|
49
|
+
| `npm run test:coverage` | To run vitest test coverage |
|
|
50
|
+
| `npm run build` | To run build script |
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## Contributors ✨
|
|
57
|
+
|
|
58
|
+
Thanks goes to these wonderful people:
|
|
59
|
+
|
|
60
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
61
|
+
<!-- prettier-ignore-start -->
|
|
62
|
+
<!-- markdownlint-disable -->
|
|
63
|
+
<table>
|
|
64
|
+
<tbody>
|
|
65
|
+
<tr>
|
|
66
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/aaronrleslie">
|
|
67
|
+
<div><img src="https://ca.slack-edge.com/T0C9E3ZF0-UKMP0F917-34a22da610d8-150" width="200px;" alt=""/></div>
|
|
68
|
+
<small>Aaron Leslie</small>
|
|
69
|
+
<div><a href="#infra-aaronrleslie" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></div>
|
|
70
|
+
</a></td>
|
|
71
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/catia.costa1">
|
|
72
|
+
<div><img src="https://gitlab.com/uploads/-/system/user/avatar/25728410/avatar.png" width="200px;" alt=""/></div>
|
|
73
|
+
<small>Catia Costa</small>
|
|
74
|
+
<div><a href="#a11y-catia.costa1" title="Accessibility">️️️️♿️</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Code">💻</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Documentation">📖</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Tests">⚠️</a></div>
|
|
75
|
+
</a></td>
|
|
76
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/chris.latimer">
|
|
77
|
+
<div><img src="https://gitlab.com/uploads/-/system/user/avatar/10570471/avatar.png" width="200px;" alt=""/></div>
|
|
78
|
+
<small>Chris Latimer</small>
|
|
79
|
+
<div><a href="#infra-chris.latimer" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Code">💻</a></div>
|
|
80
|
+
</a></td>
|
|
81
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/craig.mckay">
|
|
82
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
83
|
+
<small>Craig Mckay</small>
|
|
84
|
+
<div><a href="#projectManagement-craig.mckay" title="Project Management">📆</a></div>
|
|
85
|
+
</a></td>
|
|
86
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/daniel.lippross">
|
|
87
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
88
|
+
<small>Daniel Lippross</small>
|
|
89
|
+
<div><a href="#platform-daniel.lippross" title="Packaging/porting to new platform">📦</a></div>
|
|
90
|
+
</a></td>
|
|
91
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/emalin.matthews">
|
|
92
|
+
<div><img src="https://ca.slack-edge.com/T0C9E3ZF0-UMGDXU8JH-ade541a7f09e-150" width="200px;" alt=""/></div>
|
|
93
|
+
<small>Emalin Matthews</small>
|
|
94
|
+
<div><a href="#a11y-emalin.matthews" title="Accessibility">️️️️♿️</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Code">💻</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Documentation">📖</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Tests">⚠️</a></div>
|
|
95
|
+
</a></td>
|
|
96
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/jelena.milosevic">
|
|
97
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
98
|
+
<small>Jelena Milosevic</small>
|
|
99
|
+
<div><a href="#infra-jelena.milosevic" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></div>
|
|
100
|
+
</a></td>
|
|
101
|
+
</tr><br />
|
|
102
|
+
<tr>
|
|
103
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/kamini.pagare">
|
|
104
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
105
|
+
<small>Kamini Pagare</small>
|
|
106
|
+
<div><a href="#a11y-kamini.pagare" title="Accessibility">️️️️♿️</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Code">💻</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Documentation">📖</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Tests">⚠️</a></div>
|
|
107
|
+
</a></td>
|
|
108
|
+
<td align="center" valign="top" width="14.28%"><a href="">
|
|
109
|
+
<div><img src="https://ca.slack-edge.com/T0C9E3ZF0-U3AJ40BGS-ec515dc443cb-150" width="200px;" alt=""/></div>
|
|
110
|
+
<small>Lee Connolly</small>
|
|
111
|
+
<div><a href="#projectManagement-lee.connolly" title="Project Management">📆</a></div>
|
|
112
|
+
</a></td>
|
|
113
|
+
<td align="center" valign="top" width="14.28%"><a href="">
|
|
114
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
115
|
+
<small>Liam Hall</small>
|
|
116
|
+
<div><a href="#projectManagement-liam.hall" title="Project Management">📆</a></div>
|
|
117
|
+
</a></td>
|
|
118
|
+
<td align="center" valign="top" width="14.28%"><a href="">
|
|
119
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/meg.jpg" width="200px;" alt=""/></div>
|
|
120
|
+
<small>Meg White</small>
|
|
121
|
+
<div><a href="#projectManagement-meg.white" title="Project Management">📆</a></div>
|
|
122
|
+
</a></td>
|
|
123
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/omid.kashan">
|
|
124
|
+
<div><img src="https://secure.gravatar.com/avatar/faf90b70d749cf9460eb603fa1700add94fd7d3a32645b4be6fa12eb45c4ffa3?s=80&d=identicon" width="200px;" alt=""/></div>
|
|
125
|
+
<small>Omid Kashan</small>
|
|
126
|
+
<div><a href="#a11y-omid.kashan" title="Accessibility">️️️️♿️</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Code">💻</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Documentation">📖</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Tests">⚠️</a></div>
|
|
127
|
+
</a></td>
|
|
128
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/sam.harden">
|
|
129
|
+
<div><img src="https://ca.slack-edge.com/T0C9E3ZF0-U03NT7D39L6-2fc82e7f7c6e-150" width="200px;" alt=""/></div>
|
|
130
|
+
<small>Sam Harden</small>
|
|
131
|
+
<div><a href="#a11y-sam.harden" title="Accessibility">️️️️♿️</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Code">💻</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Documentation">📖</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Tests">⚠️</a></div>
|
|
132
|
+
</a></td>
|
|
133
|
+
<td align="center" valign="top" width="14.28%"><a href="">
|
|
134
|
+
<div><img src="https://s3.eu-west-1.amazonaws.com/assets.digital.coop.co.uk/oneweb/blank.jpg" width="200px;" alt=""/></div>
|
|
135
|
+
<small>Shweta Jaju</small>
|
|
136
|
+
<div><a href="#userTesting-shweta.jaju" title="User Testing">📓</a></div>
|
|
137
|
+
</a></td>
|
|
138
|
+
</tr><br />
|
|
139
|
+
<tr>
|
|
140
|
+
<td align="center" valign="top" width="14.28%"><a href="https://gitlab.com/theodore.kouzelis">
|
|
141
|
+
<div><img src="https://secure.gravatar.com/avatar/3988f940029d9053174ac68e7f5bfa8fd61f184872d46281f44e2e698711d37d?s=80&d=identicon" width="200px;" alt=""/></div>
|
|
142
|
+
<small>Theo Kouzelis</small>
|
|
143
|
+
<div><a href="#a11y-theodore.kouzelis" title="Accessibility">️️️️♿️</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Code">💻</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Documentation">📖</a> <a href="https://gitlab.com/coopeng/sds/oneweb/experience-kit/commits/master" title="Tests">⚠️</a></div>
|
|
144
|
+
</a></td>
|
|
145
|
+
</tr>
|
|
146
|
+
</tbody></table>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
<!-- markdownlint-restore -->
|
|
150
|
+
<!-- prettier-ignore-end -->
|
|
151
|
+
|
|
152
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
153
|
+
|
|
154
|
+
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Check out the [contributing guidelines](https://gitlab.com/coopeng/sds/oneweb/experience-kit/-/blob/main/CONTRIBUTING.md) to add new people. Contributions of any kind welcome!
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## Troubleshooting
|
|
158
|
+
|
|
159
|
+
This is still a work in progress, we appreciate feedback. If you have any issues, please get in touch via [tech query channel on slack](https://co-opdigital.slack.com/archives/C0167V69R8W).
|
package/dist/reset.css
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
html {
|
|
8
|
+
-moz-text-size-adjust: none;
|
|
9
|
+
-webkit-text-size-adjust: none;
|
|
10
|
+
text-size-adjust: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
body,
|
|
14
|
+
h1,
|
|
15
|
+
h2,
|
|
16
|
+
h3,
|
|
17
|
+
h4,
|
|
18
|
+
p,
|
|
19
|
+
figure,
|
|
20
|
+
blockquote,
|
|
21
|
+
dl,
|
|
22
|
+
dd {
|
|
23
|
+
margin-block-end: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
html,
|
|
27
|
+
body {
|
|
28
|
+
font-family: "Avenir Next", sans-serif;
|
|
29
|
+
font-size: var(--type-size-default);
|
|
30
|
+
color: var(--color-text);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
body {
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
border: 0;
|
|
37
|
+
min-height: 100vh;
|
|
38
|
+
line-height: var(--type-line-height);
|
|
39
|
+
-webkit-font-smoothing: antialiased;
|
|
40
|
+
-moz-osx-font-smoothing: grayscale;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
input,
|
|
44
|
+
button,
|
|
45
|
+
textarea,
|
|
46
|
+
select {
|
|
47
|
+
font-family: inherit;
|
|
48
|
+
font-size: inherit;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
button,
|
|
52
|
+
input,
|
|
53
|
+
label {
|
|
54
|
+
line-height: 1.1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
h1,
|
|
58
|
+
h2,
|
|
59
|
+
h3,
|
|
60
|
+
h4 {
|
|
61
|
+
text-wrap: balance;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
a:not([class]) {
|
|
65
|
+
text-decoration-skip-ink: auto;
|
|
66
|
+
color: currentcolor;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
img,
|
|
70
|
+
picture {
|
|
71
|
+
max-width: 100%;
|
|
72
|
+
display: block;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
textarea:not([rows]) {
|
|
76
|
+
min-height: 10rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:target {
|
|
80
|
+
scroll-margin-block: 5ex;
|
|
81
|
+
}
|
package/dist/vars.css
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coopdigital/styles",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"build": "tsx scripts build"
|
|
17
17
|
},
|
|
18
18
|
"author": "",
|
|
19
|
-
"license": "
|
|
19
|
+
"license": "MIT",
|
|
20
20
|
"description": "",
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"glob": "^11.0.1",
|
|
23
23
|
"sass-embedded": "^1.83.4"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "a8fc664a2f4931af694002d4fe3b7832cff99569"
|
|
26
26
|
}
|
package/src/reset.scss
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
html {
|
|
8
|
+
-moz-text-size-adjust: none;
|
|
9
|
+
-webkit-text-size-adjust: none;
|
|
10
|
+
text-size-adjust: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
body,
|
|
14
|
+
h1,
|
|
15
|
+
h2,
|
|
16
|
+
h3,
|
|
17
|
+
h4,
|
|
18
|
+
p,
|
|
19
|
+
figure,
|
|
20
|
+
blockquote,
|
|
21
|
+
dl,
|
|
22
|
+
dd {
|
|
23
|
+
margin-block-end: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
html,
|
|
27
|
+
body {
|
|
28
|
+
font-family: "Avenir Next", sans-serif;
|
|
29
|
+
font-size: var(--type-size-default);
|
|
30
|
+
color: var(--color-text);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
body {
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
border: 0;
|
|
37
|
+
min-height: 100vh;
|
|
38
|
+
line-height: var(--type-line-height);
|
|
39
|
+
-webkit-font-smoothing: antialiased;
|
|
40
|
+
-moz-osx-font-smoothing: grayscale;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
input,
|
|
44
|
+
button,
|
|
45
|
+
textarea,
|
|
46
|
+
select {
|
|
47
|
+
font-family: inherit;
|
|
48
|
+
font-size: inherit;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
button,
|
|
52
|
+
input,
|
|
53
|
+
label {
|
|
54
|
+
line-height: 1.1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
h1,
|
|
58
|
+
h2,
|
|
59
|
+
h3,
|
|
60
|
+
h4 {
|
|
61
|
+
text-wrap: balance;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
a:not([class]) {
|
|
65
|
+
text-decoration-skip-ink: auto;
|
|
66
|
+
color: currentcolor;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
img,
|
|
70
|
+
picture {
|
|
71
|
+
max-width: 100%;
|
|
72
|
+
display: block;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
textarea:not([rows]) {
|
|
76
|
+
min-height: 10rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:target {
|
|
80
|
+
scroll-margin-block: 5ex;
|
|
81
|
+
}
|