@rolemodel/optics 0.3.1 → 0.4.1

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 (37) hide show
  1. package/.babelrc.json +14 -0
  2. package/.github/pull_request_template.md +1 -0
  3. package/.github/workflows/publish-storybook.yml +1 -1
  4. package/.prettierignore +2 -0
  5. package/README.md +10 -14
  6. package/dist/css/optics.css +961 -446
  7. package/dist/css/optics.css.map +1 -1
  8. package/dist/scss/addons/tom-select.scss +1 -4
  9. package/dist/scss/components/alert.scss +56 -38
  10. package/dist/scss/components/avatar.scss +96 -0
  11. package/dist/scss/components/badge.scss +8 -3
  12. package/dist/scss/components/button.scss +168 -97
  13. package/dist/scss/components/button_group.scss +23 -5
  14. package/dist/scss/components/confirm-dialog.scss +88 -0
  15. package/dist/scss/components/divider.scss +59 -0
  16. package/dist/scss/components/form.scss +180 -49
  17. package/dist/scss/components/index.scss +6 -1
  18. package/dist/scss/components/modal.scss +156 -0
  19. package/dist/scss/components/pagination.scss +28 -0
  20. package/dist/scss/components/sidebar.scss +83 -159
  21. package/dist/scss/components/table.scss +22 -17
  22. package/dist/scss/components/tooltip.scss +136 -0
  23. package/dist/scss/core/tokens/base_tokens.scss +10 -5
  24. package/dist/scss/recipes/16six-sidebar.scss +32 -61
  25. package/dist/scss/recipes/domains-sidebar.scss +24 -44
  26. package/dist/tokens/tokens.json +9 -8
  27. package/package.json +30 -24
  28. package/.storybook/ModeSwitcher.jsx +0 -98
  29. package/.storybook/documentation.scss +0 -93
  30. package/.storybook/main.js +0 -11
  31. package/.storybook/manager.js +0 -22
  32. package/.storybook/preview.js +0 -12
  33. package/.storybook/rolemodelTheme.js +0 -10
  34. package/dist/scss/addons/rails-modal-and-panel/index.scss +0 -2
  35. package/dist/scss/addons/rails-modal-and-panel/modal.scss +0 -111
  36. package/dist/scss/components/flash.scss +0 -58
  37. /package/dist/scss/addons/{rails-modal-and-panel/panel.scss → panel.scss} +0 -0
package/.babelrc.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "sourceType": "unambiguous",
3
+ "presets": [
4
+ [
5
+ "@babel/preset-env",
6
+ {
7
+ "targets": {
8
+ "chrome": 100
9
+ }
10
+ }
11
+ ]
12
+ ],
13
+ "plugins": []
14
+ }
@@ -19,6 +19,7 @@ What changed in this PR?
19
19
 
20
20
  - [ ] Have you updated any usage of changed tokens?
21
21
  - [ ] Have you updated the docs with any component changes?
22
+ - [ ] Have you updated the dependency graph with any component changes?
22
23
  - [ ] Have you run linters?
23
24
  - [ ] Have you run prettier?
24
25
  - [ ] Have you tried building the css?
@@ -29,6 +29,6 @@ jobs:
29
29
  with:
30
30
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31
31
  BRANCH: gh-pages # The branch the action should deploy to.
32
- FOLDER: docs-build # The folder that the build-storybook script generates files.
32
+ FOLDER: storybook-static # The folder that the build-storybook script generates files.
33
33
  CLEAN: true # Automatically remove deleted files from the deploy branch
34
34
  TARGET_FOLDER: docs # The folder that we serve our Storybook files from
package/.prettierignore CHANGED
@@ -0,0 +1,2 @@
1
+ # Tools
2
+ tools/templates
package/README.md CHANGED
@@ -38,20 +38,6 @@ We use [Storybook](https://storybook.js.org/docs/html/get-started/introduction)
38
38
 
39
39
  It can be found here [Optics Documentation](https://docs.optics.rolemodel.design/)
40
40
 
41
- ## Tokens
42
-
43
- Tokens are defined in `src/core/tokens`
44
-
45
- - All core tokens are defined in `src/core/tokens/base_tokens.scss`
46
- - Basic color tokens are defined in `src/core/tokens/example_color_tokens.scss`
47
- - Color scale tokens are defined in `src/core/tokens/scale_color_tokens.scss`
48
- - Alert color tokens are defined in `src/core/tokens/alert_color_tokens.scss`
49
- - Dark mode tokens are defined in `src/core/tokens/dark_mode_tokens.scss`
50
-
51
- There are also a few component specific tokens that are defined in their respective component file, but those are not indented to be global or used outside of that file.
52
-
53
- There is a JSON file in `docs/token_structure.json` that lists all the current tokens in one place and shows how the names indicate organization.
54
-
55
41
  ### Token Documentation
56
42
 
57
43
  We use the Storybook Design Token for showing design tokens in the documentation. This allows us to tag groups of tokens with a category and a presenter.
@@ -67,6 +53,16 @@ Add the following above a group to categorize the tokens.
67
53
  */
68
54
  ```
69
55
 
56
+ ### Component Documentation
57
+
58
+ Additional stories can be added using the following command, or copying an existing story.
59
+
60
+ ```sh
61
+ npm run generate
62
+ ```
63
+
64
+ The visual graphic found on the Selective Imports page in the documentation is generated from the `tools/generate-graph.dot` file. You can preview and export a newer svg version of the graphic by using the `tintinweb.graphviz-interactive-preview` VSCode extension.
65
+
70
66
  ## License
71
67
 
72
68
  [MIT](LICENSE)