@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.
- package/.babelrc.json +14 -0
- package/.github/pull_request_template.md +1 -0
- package/.github/workflows/publish-storybook.yml +1 -1
- package/.prettierignore +2 -0
- package/README.md +10 -14
- package/dist/css/optics.css +961 -446
- package/dist/css/optics.css.map +1 -1
- package/dist/scss/addons/tom-select.scss +1 -4
- package/dist/scss/components/alert.scss +56 -38
- package/dist/scss/components/avatar.scss +96 -0
- package/dist/scss/components/badge.scss +8 -3
- package/dist/scss/components/button.scss +168 -97
- package/dist/scss/components/button_group.scss +23 -5
- package/dist/scss/components/confirm-dialog.scss +88 -0
- package/dist/scss/components/divider.scss +59 -0
- package/dist/scss/components/form.scss +180 -49
- package/dist/scss/components/index.scss +6 -1
- package/dist/scss/components/modal.scss +156 -0
- package/dist/scss/components/pagination.scss +28 -0
- package/dist/scss/components/sidebar.scss +83 -159
- package/dist/scss/components/table.scss +22 -17
- package/dist/scss/components/tooltip.scss +136 -0
- package/dist/scss/core/tokens/base_tokens.scss +10 -5
- package/dist/scss/recipes/16six-sidebar.scss +32 -61
- package/dist/scss/recipes/domains-sidebar.scss +24 -44
- package/dist/tokens/tokens.json +9 -8
- package/package.json +30 -24
- package/.storybook/ModeSwitcher.jsx +0 -98
- package/.storybook/documentation.scss +0 -93
- package/.storybook/main.js +0 -11
- package/.storybook/manager.js +0 -22
- package/.storybook/preview.js +0 -12
- package/.storybook/rolemodelTheme.js +0 -10
- package/dist/scss/addons/rails-modal-and-panel/index.scss +0 -2
- package/dist/scss/addons/rails-modal-and-panel/modal.scss +0 -111
- package/dist/scss/components/flash.scss +0 -58
- /package/dist/scss/addons/{rails-modal-and-panel/panel.scss → panel.scss} +0 -0
package/.babelrc.json
ADDED
|
@@ -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:
|
|
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
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)
|