@rolemodel/optics 0.2.4 → 0.3.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.
@@ -0,0 +1,53 @@
1
+ # .github/release.yml
2
+
3
+ changelog:
4
+ categories:
5
+ - title: Breaking Changes
6
+ labels:
7
+ - Breaking Change
8
+ - title: Base Token Changes
9
+ labels:
10
+ - Base Tokens
11
+ - title: Theme Token Changes
12
+ labels:
13
+ - Theme Tokens
14
+ - title: Base Reset Changes
15
+ labels:
16
+ - Base Reset
17
+ - title: Layout Changes
18
+ labels:
19
+ - Layout
20
+ - title: Component Changes
21
+ labels:
22
+ - Components
23
+ - title: Utility Changes
24
+ labels:
25
+ - Utilities
26
+ - title: Addon Changes
27
+ labels:
28
+ - Addons
29
+ - title: Dependencies
30
+ labels:
31
+ - dependencies
32
+ - title: Repository Changes
33
+ labels:
34
+ - Repository Change
35
+ - title: Documentation Changes
36
+ labels:
37
+ - documentation
38
+ - title: Unlabeled Changes (please categorize these)
39
+ labels:
40
+ - '*'
41
+ exclude:
42
+ labels:
43
+ - Breaking Change
44
+ - Base Tokens
45
+ - Theme Tokens
46
+ - Base Reset
47
+ - Layout
48
+ - Components
49
+ - Utilities
50
+ - Addons
51
+ - dependencies
52
+ - Repository Change
53
+ - documentation
@@ -1,6 +1,7 @@
1
1
  name: Build and Deploy Storybook Documentation
2
2
 
3
3
  on:
4
+ workflow_dispatch:
4
5
  release:
5
6
  types: [created]
6
7
 
@@ -12,9 +13,16 @@ jobs:
12
13
  uses: actions/checkout@v3
13
14
  with:
14
15
  persist-credentials: false
15
- - name: Install and Build 🔧
16
- run: | # Install npm packages and build the Storybook files
17
- npm install
16
+ - name: Setup Node
17
+ uses: actions/setup-node@v3
18
+ with:
19
+ node-version: '16.x'
20
+ registry-url: 'https://registry.npmjs.org'
21
+ - name: Install 🔧
22
+ run: | # Install npm packages
23
+ npm ci
24
+ - name: Build 🔧
25
+ run: | # build the Storybook files
18
26
  npm run build-storybook
19
27
  - name: Deploy 🚀
20
28
  uses: JamesIves/github-pages-deploy-action@3.6.2
@@ -1,65 +1,93 @@
1
1
  @import './src/optics.scss';
2
2
 
3
- @keyframes transitionDemo {
4
- from {
5
- background-color: var(--rm-color-white);
6
- color: var(--rm-color-black);
7
- }
3
+ @import './src/recipes/domains-sidebar.scss';
4
+ @import './src/recipes/16six-sidebar.scss';
8
5
 
9
- to {
10
- background-color: var(--rm-color-primary-base);
11
- color: var(--rm-color-primary-on-base);
12
- }
13
- }
6
+ @import 'https://fonts.googleapis.com/css2?family=Tilt+Neon&display=swap';
14
7
 
15
8
  .transition-demo {
16
9
  display: inline-block;
10
+ padding: var(--op-space-medium);
11
+ background-color: var(--op-color-primary-base);
12
+ color: var(--op-color-primary-on-base);
13
+ transition: var(--op-transition-input);
17
14
 
18
- background-color: var(--rm-color-primary-base);
19
- color: var(--rm-color-primary-on-base);
20
-
21
- padding: var(--rm-space-medium);
22
-
23
- animation-name: transitionDemo;
24
- animation-duration: var(--rm-transition-input);
25
- animation-iteration-count: 1;
15
+ &:hover {
16
+ background-color: var(--op-color-neutral-base);
17
+ color: var(--op-color-neutral-on-base);
18
+ }
26
19
  }
27
20
 
28
21
  .transition-demo--input {
29
- animation-duration: var(--rm-transition-input);
30
- }
31
- .transition-demo--navigation {
32
- animation-duration: var(--rm-transition-navigation);
22
+ transition: var(--op-transition-input);
33
23
  }
24
+
34
25
  .transition-demo--sidebar {
35
- animation-duration: var(--rm-transition-sidebar);
26
+ transition: var(--op-transition-sidebar);
36
27
  }
28
+
37
29
  .transition-demo--modal {
38
- animation-duration: var(--rm-transition-modal);
30
+ transition: var(--op-transition-modal);
39
31
  }
32
+
40
33
  .transition-demo--panel {
41
- animation-duration: var(--rm-transition-panel);
42
- }
43
- .transition-demo--flash {
44
- animation-duration: var(--rm-transition-flash);
34
+ transition: var(--op-transition-panel);
35
+ transition-property: all;
45
36
  }
46
37
 
47
38
  .flash--demo {
48
39
  position: relative;
49
- animation: none;
50
40
  top: 0;
51
41
  right: 0;
42
+ animation: none;
52
43
  }
53
44
 
54
- @import './src/recipes/domains-sidebar.scss';
55
- @import './src/recipes/16six-sidebar.scss';
56
-
57
45
  .background-primary-plus-four {
58
- background-color: var(--rm-color-primary-plus-four);
59
- color: var(--rm-color-primary-on-plus-four);
46
+ background-color: var(--op-color-primary-plus-four);
47
+ color: var(--op-color-primary-on-plus-four);
60
48
  }
61
49
 
62
50
  .background-primary-plus-seven {
63
- background-color: var(--rm-color-primary-plus-seven);
64
- color: var(--rm-color-primary-on-plus-seven);
51
+ background-color: var(--op-color-primary-plus-seven);
52
+ color: var(--op-color-primary-on-plus-seven);
53
+ }
54
+
55
+ .font-family-demo--alternative {
56
+ --op-font-family: 'Tilt Neon', sans-serif;
57
+
58
+ font-family: var(--op-font-family);
59
+ }
60
+
61
+ .design-token-container {
62
+ .design-token-card {
63
+ table {
64
+ td:nth-of-type(1),
65
+ th:nth-of-type(1) {
66
+ flex-basis: 40%;
67
+ }
68
+
69
+ td:nth-of-type(2),
70
+ th:nth-of-type(2) {
71
+ flex-basis: 35%;
72
+ }
73
+
74
+ td:nth-of-type(3),
75
+ th:nth-of-type(3) {
76
+ flex-basis: 25%;
77
+ }
78
+ }
79
+ }
80
+ }
81
+
82
+ .input-height-tokens {
83
+ .design-token-container {
84
+ div:nth-child(2) {
85
+ div {
86
+ div:last-child {
87
+ margin: var(--op-space-x-large);
88
+ transform: rotate(90deg);
89
+ }
90
+ }
91
+ }
92
+ }
65
93
  }
@@ -5,6 +5,7 @@ module.exports = {
5
5
  '@storybook/addon-essentials',
6
6
  '@storybook/addon-interactions',
7
7
  '@storybook/preset-scss',
8
+ { name: 'storybook-design-token', options: { preserveCSSVars: true } },
8
9
  ],
9
10
  framework: '@storybook/html',
10
11
  }
package/.stylelintrc.json CHANGED
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "rules": {
11
11
  "prettier/prettier": true,
12
- "custom-property-pattern": ["(?<=rm-)", { "message": "CSS variables should be prefixed with rm-" }],
12
+ "custom-property-pattern": ["(?<=op-)", { "message": "CSS variables should be prefixed with op-" }],
13
13
  "selector-class-pattern": null
14
14
  }
15
15
  }
package/README.md CHANGED
@@ -52,6 +52,21 @@ There are also a few component specific tokens that are defined in their respect
52
52
 
53
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
54
 
55
+ ### Token Documentation
56
+
57
+ 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.
58
+
59
+ [Available Presenters](https://github.com/UX-and-I/storybook-design-token#available-presenters)
60
+
61
+ Add the following above a group to categorize the tokens.
62
+
63
+ ```css
64
+ /**
65
+ * @tokens Basic Colors
66
+ * @presenter Color
67
+ */
68
+ ```
69
+
55
70
  ## License
56
71
 
57
72
  [MIT](LICENSE)