lux-design-system 4.5.4 → 5.0.0-alpha.10
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 +51 -74
- package/dist/favicon.ico +0 -0
- package/dist/img/icons/android-chrome-192x192.png +0 -0
- package/dist/img/icons/android-chrome-512x512.png +0 -0
- package/dist/img/icons/android-chrome-maskable-192x192.png +0 -0
- package/dist/img/icons/android-chrome-maskable-512x512.png +0 -0
- package/dist/img/icons/apple-touch-icon-120x120.png +0 -0
- package/dist/img/icons/apple-touch-icon-152x152.png +0 -0
- package/dist/img/icons/apple-touch-icon-180x180.png +0 -0
- package/dist/img/icons/apple-touch-icon-60x60.png +0 -0
- package/dist/img/icons/apple-touch-icon-76x76.png +0 -0
- package/dist/img/icons/apple-touch-icon.png +0 -0
- package/dist/img/icons/favicon-16x16.png +0 -0
- package/dist/img/icons/favicon-32x32.png +0 -0
- package/dist/img/icons/msapplication-icon-144x144.png +0 -0
- package/dist/img/icons/mstile-150x150.png +0 -0
- package/dist/img/icons/safari-pinned-tab.svg +3 -0
- package/dist/index.html +17 -0
- package/dist/lux-styleguidist.mjs +5985 -0
- package/dist/lux-styleguidist.umd.js +31 -0
- package/dist/robots.txt +2 -0
- package/dist/style.css +1 -0
- package/package.json +55 -207
- package/LICENSE +0 -21
- package/dist/system/icons/deprecated.svg +0 -1
- package/dist/system/icons/prototype.svg +0 -1
- package/dist/system/icons/ready.svg +0 -1
- package/dist/system/icons/review.svg +0 -1
- package/dist/system/system.css +0 -1
- package/dist/system/system.js +0 -20
- package/dist/system/system.utils.scss +0 -359
- package/dist/system/tokens/tokens.json +0 -93
- package/dist/system/tokens/tokens.map.scss +0 -94
- package/dist/system/tokens/tokens.raw.json +0 -670
- package/dist/system/tokens/tokens.scss +0 -92
package/README.md
CHANGED
|
@@ -1,95 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# LUX Design System
|
|
4
|
-
|
|
5
|
-
[View the docs](https://pulibrary.github.io/lux/docs/#/Getting%20Started)
|
|
6
|
-
|
|
7
|
-
## To add to your project:
|
|
1
|
+
# lux-styleguidist
|
|
8
2
|
|
|
3
|
+
## Project setup
|
|
9
4
|
```
|
|
10
|
-
|
|
11
|
-
yarn add lux-design-system
|
|
5
|
+
npm install
|
|
12
6
|
```
|
|
13
|
-
|
|
14
|
-
If you are looking to integrate LUX into an existing Rails, Drupal, or even JSFiddle, check out
|
|
15
|
-
our documentation for [How to Install LUX](https://pulibrary.github.io/lux/docs/#/Installing%20LUX).
|
|
16
|
-
|
|
17
|
-
### To ride the bleeding edge, pull directly from the GitHub in package.json dependencies:
|
|
7
|
+
### Serve the styleguide documentation locally
|
|
18
8
|
|
|
19
9
|
```
|
|
20
|
-
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"lux-design-system": "pulibrary/lux"
|
|
23
|
-
}
|
|
24
|
-
...
|
|
10
|
+
npm run styleguide
|
|
25
11
|
```
|
|
26
12
|
|
|
27
|
-
###
|
|
13
|
+
### Release a new version
|
|
28
14
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"lux-design-system": "^0.0.0"
|
|
33
|
-
}
|
|
34
|
-
...
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### To generate static asset files to use in a stand-alone HTML doc, run this command:
|
|
15
|
+
This requires you to have an account on npm with 2fa enabled. You will also
|
|
16
|
+
need to be part of the PULibrary organization on npm.
|
|
38
17
|
|
|
39
18
|
```
|
|
40
|
-
|
|
19
|
+
npm login
|
|
20
|
+
npm install --global np # don't add this as a devDependency, otherwise you won't be able to push to npm
|
|
21
|
+
npm run release
|
|
41
22
|
```
|
|
42
23
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## To contribute to lux:
|
|
46
|
-
|
|
47
|
-
- You will need Node v10.16.0+
|
|
48
|
-
- If you use a NVM, run `nvm install` or `nvm use` if you already know you have Node v10.16.0
|
|
49
|
-
|
|
24
|
+
### Deploy the styleguide to GitHub Pages
|
|
50
25
|
```
|
|
51
|
-
|
|
26
|
+
npm run deploy
|
|
52
27
|
```
|
|
28
|
+
This will update the docs at [https://pulibrary.github.io/lux-styleguidist/](https://pulibrary.github.io/lux-styleguidist/).
|
|
29
|
+
Please note: For informational purposes only. Don't do this outside of a release!
|
|
53
30
|
|
|
54
|
-
### To start development server:
|
|
55
31
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
## Copying Vue 2 components from lux
|
|
33
|
+
1. Copy a component from the lux repository into src/components
|
|
34
|
+
1. This repo uses CSS variables, rather than SCSS token variables. If the component
|
|
35
|
+
includes tokens:
|
|
36
|
+
1. Add `@import "../assets/styles/variables.css";` to the `<style>` section.
|
|
37
|
+
1. Replace any token references to use the CSS variable instead. For example,
|
|
38
|
+
`$font-family-text` can be changed to `var(--font-family-text)`.
|
|
39
|
+
1. If the component includes SCSS mixins, add `@import "../assets/styles/mixins.scss";`
|
|
40
|
+
to the `<style>` section. You may also need `../assets/styles/spacing.scss` if the
|
|
41
|
+
component uses spacing mixins.
|
|
42
|
+
1. Vue 3 no longer supports functional templates. If the component includes `<template functional>`,
|
|
43
|
+
you will need to refactor it back into a regular template.
|
|
44
|
+
1. Copy the test for the component from the lux test/unit/specs/components directory.
|
|
45
|
+
1. Revert any changes to the test that were needed for functional templates.
|
|
46
|
+
1. Modify the import for the test to point to the component's new path.
|
|
47
|
+
1. Remove any references to `localVue`, the new versions of vue-test-utils don't
|
|
48
|
+
support it or need it.
|
|
49
|
+
1. Change mount params in this format:
|
|
59
50
|
|
|
60
|
-
|
|
51
|
+
```
|
|
52
|
+
{context: { props: { my_data: "data" }}}
|
|
53
|
+
```
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
yarn test
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### To run a single test:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
yarn unit mytest.spec.js
|
|
70
|
-
```
|
|
55
|
+
to this format:
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
1.
|
|
77
|
-
1.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
## To deploy [docs](https://pulibrary.github.io/lux/docs/#/Getting%20Started):
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
# make sure git status is clean with no uncommitted modified files
|
|
87
|
-
yarn run deploy
|
|
88
|
-
```
|
|
57
|
+
```
|
|
58
|
+
{props: { my_data: "data" }}
|
|
59
|
+
```
|
|
60
|
+
1. Run the tests with `npm run test`. Make any necessary changes to get the tests to pass.
|
|
61
|
+
1. If a value is not updating correctly after a `wrapper.setProps` call, follow these steps to add a `nextTick()`, which will cause Vue to update the value:
|
|
62
|
+
1. If it's not already imported, add `import { nextTick } from "vue"`
|
|
63
|
+
2. Add `async` to the test arrow function.
|
|
64
|
+
3. Add `await nextTick()` between the `setProps` and the assertion.
|
|
65
|
+
1. Refer to the [vue-test-utils migration guide](https://test-utils.vuejs.org/migration/) for other breaking changes.
|
|
66
|
+
1. Running the tests will produce a snapshot file. Compare it to the original snapshot file. If there are no substantial changes, commit it. If there are substantial changes, make any necessary changes.
|
|
89
67
|
|
|
90
|
-
|
|
68
|
+
### Linting
|
|
69
|
+
We are using the eslint_plugin-prettier to lint our files. To adjust the lint format settings, please use the `.prettierrc` file. Code linting rules should be set in `eslintrc.js`.
|
|
91
70
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
2. Run `yarn release`
|
|
95
|
-
3. :tada:
|
|
71
|
+
### Customize configuration
|
|
72
|
+
See [Configuration Reference](https://cli.vuejs.org/config/).
|
package/dist/favicon.ico
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
|
+
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<noscript>
|
|
12
|
+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
13
|
+
</noscript>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<!-- built files will be auto injected -->
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|