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.
Files changed (35) hide show
  1. package/README.md +51 -74
  2. package/dist/favicon.ico +0 -0
  3. package/dist/img/icons/android-chrome-192x192.png +0 -0
  4. package/dist/img/icons/android-chrome-512x512.png +0 -0
  5. package/dist/img/icons/android-chrome-maskable-192x192.png +0 -0
  6. package/dist/img/icons/android-chrome-maskable-512x512.png +0 -0
  7. package/dist/img/icons/apple-touch-icon-120x120.png +0 -0
  8. package/dist/img/icons/apple-touch-icon-152x152.png +0 -0
  9. package/dist/img/icons/apple-touch-icon-180x180.png +0 -0
  10. package/dist/img/icons/apple-touch-icon-60x60.png +0 -0
  11. package/dist/img/icons/apple-touch-icon-76x76.png +0 -0
  12. package/dist/img/icons/apple-touch-icon.png +0 -0
  13. package/dist/img/icons/favicon-16x16.png +0 -0
  14. package/dist/img/icons/favicon-32x32.png +0 -0
  15. package/dist/img/icons/msapplication-icon-144x144.png +0 -0
  16. package/dist/img/icons/mstile-150x150.png +0 -0
  17. package/dist/img/icons/safari-pinned-tab.svg +3 -0
  18. package/dist/index.html +17 -0
  19. package/dist/lux-styleguidist.mjs +5985 -0
  20. package/dist/lux-styleguidist.umd.js +31 -0
  21. package/dist/robots.txt +2 -0
  22. package/dist/style.css +1 -0
  23. package/package.json +55 -207
  24. package/LICENSE +0 -21
  25. package/dist/system/icons/deprecated.svg +0 -1
  26. package/dist/system/icons/prototype.svg +0 -1
  27. package/dist/system/icons/ready.svg +0 -1
  28. package/dist/system/icons/review.svg +0 -1
  29. package/dist/system/system.css +0 -1
  30. package/dist/system/system.js +0 -20
  31. package/dist/system/system.utils.scss +0 -359
  32. package/dist/system/tokens/tokens.json +0 -93
  33. package/dist/system/tokens/tokens.map.scss +0 -94
  34. package/dist/system/tokens/tokens.raw.json +0 -670
  35. package/dist/system/tokens/tokens.scss +0 -92
package/README.md CHANGED
@@ -1,95 +1,72 @@
1
- [![CircleCI](https://circleci.com/gh/pulibrary/lux.svg?style=svg)](https://circleci.com/gh/pulibrary/lux) [![npm version](https://badge.fury.io/js/lux-design-system.svg)](https://badge.fury.io/js/lux-design-system) ![Dependencies status](https://david-dm.org/pulibrary/lux.svg) ![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)
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
- # this will add the latest official release
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
- ### To use an older version, add pin the npm version you want to your package.json dependencies:
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
- yarn build:static
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
- Then use `<script/>` and `<link/>` tags to include to the js and css files in the `static/system` directory in your HTML. Then include any LUX components in a wrapper with `class="lux"`.
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
- yarn install
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
- yarn start
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
- ### To run all unit tests:
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
- ### To develop LUX locally as a dependency in a project
73
-
74
- You might want to develop LUX while developing on a project that uses LUX as a dependency. For example, you might want to develop LUX components while developing the Approvals app. NOTE: You will need to have both LUX and the project using it as a dependency running on your machine.
75
-
76
- 1. Install [yalc](https://github.com/whitecolor/yalc)
77
- 1. In the LUX root directory, run `yarn build:system && yalc publish`
78
- 1. In the Project (e.g., Approvals) root directory, run `yalc add lux-design-system`
79
- 1. Each time that you are ready to view the LUX work in progress, run the last 2 steps:
80
- 1. In the LUX root directory, run `yarn build:system && yalc publish`
81
- 1. In the Project (e.g., Approvals) root directory, run `yalc update`
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
- ## To publish a new version to npm:
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
- 1. If you don't already have np installed, `yarn global add np`. If you are running an old version of node (e.g. Node 12), you may need to install an older version of np (e.g. `yarn global add np@5.0.0`)
93
- 1. Pull latest main with merged changes.
94
- 2. Run `yarn release`
95
- 3. :tada:
71
+ ### Customize configuration
72
+ See [Configuration Reference](https://cli.vuejs.org/config/).
Binary file
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
3
+ </svg>
@@ -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>