igniteui-theming 1.0.0-beta.17 → 1.0.0-beta.18
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/LICENSE +21 -0
- package/json/colors/meta/multipliers.json +1 -0
- package/json/colors/meta/palette.json +1 -0
- package/json/colors/presets/palettes.json +1 -0
- package/json/elevations/elevations.json +1 -0
- package/json/typography/presets/typescales.json +1 -0
- package/package.json +6 -1
- package/.github/workflows/npm-publish.yml +0 -45
- package/.stylelintrc.json +0 -83
- package/scripts/buildJSON.mjs +0 -166
- package/test/_animations.spec.scss +0 -52
- package/test/_bem.spec.scss +0 -168
- package/test/_color.spec.scss +0 -251
- package/test/_elevations.spec.scss +0 -69
- package/test/_index.scss +0 -7
- package/test/_themes.spec.scss +0 -356
- package/test/_typography.spec.scss +0 -267
- package/test/_utils.spec.scss +0 -106
- package/test/e2e/theme.scss +0 -7
- package/test/test.js +0 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2022 INFRAGISTICS. All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"color":{"s":{"50":"1.23","100":".8","200":".64","300":".73","400":".875","500":"1","600":"1.26","700":"1.52","800":"1.5","900":"1.34","A100":"1.23","A200":"1.22","A400":"1.23","A700":"1.23"},"l":{"50":"1.78","100":"1.66","200":"1.43","300":"1.19","400":"1.08","500":"1","600":".89","700":".81","800":".73","900":".64","A100":"1.34","A200":"1.16","A400":".91","A700":".65"}},"grayscale":{"l":{"50":"13%","100":"26%","200":"38%","300":"54%","400":"62%","500":"74%","600":"88%","700":"93%","800":"96%","900":"98%"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"primary":["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],"secondary":["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],"gray":["50","100","200","300","400","500","600","700","800","900"],"surface":["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],"info":["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],"success":["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],"warn":["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],"error":["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"dark-bootstrap-palette":{"primary":"#0d6efd","secondary":"#6c757d","gray":"#adb5bd","surface":"#212529","info":"#0dcaf0","success":"#198754","warn":"#ffc107","error":"#dc3545"},"dark-green-palette":{"primary":"#09f","secondary":"#72da67","surface":"#222","info":"#1377d5","success":"#4eb862","warn":"#fbb13c","error":"#ff134a"},"dark-purple-palette":{"primary":"#00b4d6","secondary":"#514590","surface":"#333","info":"#1377d5","success":"#4eb862","warn":"#fbb13c","error":"#ff134a"},"dark-fluent-palette":{"primary":"#0078d4","secondary":"#0078d4","surface":"#222","info":"#1377d5","success":"#107c10","warn":"#797673","error":"#a80000"},"dark-fluent-word-palette":{"primary":"#2b579a","secondary":"#2b579a","surface":"#222","info":"#1377d5","success":"#107c10","warn":"#797673","error":"#a80000"},"dark-fluent-excel-palette":{"primary":"#217346","secondary":"#217346","surface":"#222","info":"#1377d5","success":"#107c10","warn":"#797673","error":"#a80000"},"dark-indigo-palette":{"primary":"#3f51b5","secondary":"#3f51b5","gray":"hsl(262deg 8% 98%)","surface":"#2a2b2f","info":"#9208bc","success":"#689f38","warn":"#ff9800","error":"#cf1a2b"},"dark-material-palette":{"primary":"#09f","secondary":"#e41c77","surface":"#222","info":"#1377d5","success":"#4eb862","warn":"#faa419","error":"#ff134a"},"light-bootstrap-palette":{"primary":"#0d6efd","secondary":"#6c757d","gray":"#adb5bd","surface":"#f8f9fa","info":"#0dcaf0","success":"#198754","warn":"#ffc107","error":"#dc3545"},"light-green-palette":{"primary":"#09f","secondary":"#72da67","surface":"#fff","info":"#1377d5","success":"#4eb862","warn":"#fbb13c","error":"#ff134a"},"light-purple-palette":{"primary":"#00b4d6","secondary":"#514590","surface":"#fff","info":"#1377d5","success":"#4eb862","warn":"#fbb13c","error":"#ff134a"},"light-fluent-palette":{"primary":"#0078d4","secondary":"#0078d4","surface":"#fff","info":"#1377d5","success":"#107c10","warn":"#797673","error":"#a80000"},"light-fluent-word-palette":{"primary":"#2b579a","secondary":"#2b579a","surface":"#fff","info":"#1377d5","success":"#107c10","warn":"#797673","error":"#a80000"},"light-fluent-excel-palette":{"primary":"#217346","secondary":"#217346","surface":"#fff","info":"#1377d5","success":"#107c10","warn":"#797673","error":"#a80000"},"light-indigo-palette":{"primary":"#3f51b5","secondary":"#3f51b5","gray":"hsl(236deg 8% 5%)","surface":"#fff","info":"#9208bc","success":"#689f38","warn":"#ff9800","error":"#cf1a2b"},"light-material-palette":{"primary":"#09f","secondary":"#e41c77","surface":"white","info":"#1377d5","success":"#4eb862","warn":"#faa419","error":"#ff134a"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"material":{"elevations":{"0":"none","1":"0 calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * 3px) 0 rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * 1px) 0 rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 2px) calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * -1px) rgba(0, 0, 0, 0.08)","2":"0 calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * 5px) 0 rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 2px) calc(var(--ig-elevation-factor, 1) * 2px) 0 rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * -2px) rgba(0, 0, 0, 0.08)","3":"0 calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * 8px) 0 rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * 4px) 0 rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * -2px) rgba(0, 0, 0, 0.08)","4":"0 calc(var(--ig-elevation-factor, 1) * 2px) calc(var(--ig-elevation-factor, 1) * 4px) calc(var(--ig-elevation-factor, 1) * -1px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 4px) calc(var(--ig-elevation-factor, 1) * 5px) 0 rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * 10px) 0 rgba(0, 0, 0, 0.08)","5":"0 calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * -1px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * 8px) 0 rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * 14px) 0 rgba(0, 0, 0, 0.08)","6":"0 calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * -1px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * 10px) 0 rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 1px) calc(var(--ig-elevation-factor, 1) * 18px) 0 rgba(0, 0, 0, 0.08)","7":"0 calc(var(--ig-elevation-factor, 1) * 4px) calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * -2px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 7px) calc(var(--ig-elevation-factor, 1) * 10px) calc(var(--ig-elevation-factor, 1) * 1px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 2px) calc(var(--ig-elevation-factor, 1) * 16px) calc(var(--ig-elevation-factor, 1) * 1px) rgba(0, 0, 0, 0.08)","8":"0 calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * -3px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * 10px) calc(var(--ig-elevation-factor, 1) * 1px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * 14px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.08)","9":"0 calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * -3px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 9px) calc(var(--ig-elevation-factor, 1) * 12px) calc(var(--ig-elevation-factor, 1) * 1px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 3px) calc(var(--ig-elevation-factor, 1) * 16px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.08)","10":"0 calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * -3px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 10px) calc(var(--ig-elevation-factor, 1) * 14px) calc(var(--ig-elevation-factor, 1) * 1px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 4px) calc(var(--ig-elevation-factor, 1) * 18px) calc(var(--ig-elevation-factor, 1) * 3px) rgba(0, 0, 0, 0.08)","11":"0 calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * 7px) calc(var(--ig-elevation-factor, 1) * -4px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 11px) calc(var(--ig-elevation-factor, 1) * 15px) calc(var(--ig-elevation-factor, 1) * 1px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 4px) calc(var(--ig-elevation-factor, 1) * 20px) calc(var(--ig-elevation-factor, 1) * 3px) rgba(0, 0, 0, 0.08)","12":"0 calc(var(--ig-elevation-factor, 1) * 7px) calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * -4px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 12px) calc(var(--ig-elevation-factor, 1) * 17px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * 22px) calc(var(--ig-elevation-factor, 1) * 4px) rgba(0, 0, 0, 0.08)","13":"0 calc(var(--ig-elevation-factor, 1) * 7px) calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * -4px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 13px) calc(var(--ig-elevation-factor, 1) * 19px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * 24px) calc(var(--ig-elevation-factor, 1) * 4px) rgba(0, 0, 0, 0.08)","14":"0 calc(var(--ig-elevation-factor, 1) * 7px) calc(var(--ig-elevation-factor, 1) * 9px) calc(var(--ig-elevation-factor, 1) * -4px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 14px) calc(var(--ig-elevation-factor, 1) * 21px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 5px) calc(var(--ig-elevation-factor, 1) * 26px) calc(var(--ig-elevation-factor, 1) * 4px) rgba(0, 0, 0, 0.08)","15":"0 calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * 9px) calc(var(--ig-elevation-factor, 1) * -5px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 15px) calc(var(--ig-elevation-factor, 1) * 22px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * 28px) calc(var(--ig-elevation-factor, 1) * 5px) rgba(0, 0, 0, 0.08)","16":"0 calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * 10px) calc(var(--ig-elevation-factor, 1) * -5px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 16px) calc(var(--ig-elevation-factor, 1) * 24px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * 30px) calc(var(--ig-elevation-factor, 1) * 5px) rgba(0, 0, 0, 0.08)","17":"0 calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * 11px) calc(var(--ig-elevation-factor, 1) * -5px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 17px) calc(var(--ig-elevation-factor, 1) * 26px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 6px) calc(var(--ig-elevation-factor, 1) * 32px) calc(var(--ig-elevation-factor, 1) * 5px) rgba(0, 0, 0, 0.08)","18":"0 calc(var(--ig-elevation-factor, 1) * 9px) calc(var(--ig-elevation-factor, 1) * 11px) calc(var(--ig-elevation-factor, 1) * -5px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 18px) calc(var(--ig-elevation-factor, 1) * 28px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 7px) calc(var(--ig-elevation-factor, 1) * 34px) calc(var(--ig-elevation-factor, 1) * 6px) rgba(0, 0, 0, 0.08)","19":"0 calc(var(--ig-elevation-factor, 1) * 9px) calc(var(--ig-elevation-factor, 1) * 12px) calc(var(--ig-elevation-factor, 1) * -6px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 19px) calc(var(--ig-elevation-factor, 1) * 29px) calc(var(--ig-elevation-factor, 1) * 2px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 7px) calc(var(--ig-elevation-factor, 1) * 36px) calc(var(--ig-elevation-factor, 1) * 6px) rgba(0, 0, 0, 0.08)","20":"0 calc(var(--ig-elevation-factor, 1) * 10px) calc(var(--ig-elevation-factor, 1) * 13px) calc(var(--ig-elevation-factor, 1) * -6px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 20px) calc(var(--ig-elevation-factor, 1) * 31px) calc(var(--ig-elevation-factor, 1) * 3px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * 38px) calc(var(--ig-elevation-factor, 1) * 7px) rgba(0, 0, 0, 0.08)","21":"0 calc(var(--ig-elevation-factor, 1) * 10px) calc(var(--ig-elevation-factor, 1) * 13px) calc(var(--ig-elevation-factor, 1) * -6px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 21px) calc(var(--ig-elevation-factor, 1) * 33px) calc(var(--ig-elevation-factor, 1) * 3px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * 40px) calc(var(--ig-elevation-factor, 1) * 7px) rgba(0, 0, 0, 0.08)","22":"0 calc(var(--ig-elevation-factor, 1) * 10px) calc(var(--ig-elevation-factor, 1) * 14px) calc(var(--ig-elevation-factor, 1) * -6px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 22px) calc(var(--ig-elevation-factor, 1) * 35px) calc(var(--ig-elevation-factor, 1) * 3px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 8px) calc(var(--ig-elevation-factor, 1) * 42px) calc(var(--ig-elevation-factor, 1) * 7px) rgba(0, 0, 0, 0.08)","23":"0 calc(var(--ig-elevation-factor, 1) * 11px) calc(var(--ig-elevation-factor, 1) * 14px) calc(var(--ig-elevation-factor, 1) * -7px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 23px) calc(var(--ig-elevation-factor, 1) * 36px) calc(var(--ig-elevation-factor, 1) * 3px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 9px) calc(var(--ig-elevation-factor, 1) * 44px) calc(var(--ig-elevation-factor, 1) * 8px) rgba(0, 0, 0, 0.08)","24":"0 calc(var(--ig-elevation-factor, 1) * 11px) calc(var(--ig-elevation-factor, 1) * 15px) calc(var(--ig-elevation-factor, 1) * -7px) rgba(0, 0, 0, 0.26), 0 calc(var(--ig-elevation-factor, 1) * 24px) calc(var(--ig-elevation-factor, 1) * 38px) calc(var(--ig-elevation-factor, 1) * 3px) rgba(0, 0, 0, 0.12), 0 calc(var(--ig-elevation-factor, 1) * 9px) calc(var(--ig-elevation-factor, 1) * 46px) calc(var(--ig-elevation-factor, 1) * 8px) rgba(0, 0, 0, 0.08)"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"bootstrap":{"typeface":"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'","h1":{"font-size":"2.5rem","font-weight":"500","letter-spacing":"-0.09375rem","line-height":"3rem","text-transform":"none","margin-top":"0","margin-bottom":"0.5rem"},"h2":{"font-size":"2rem","font-weight":"500","letter-spacing":"-0.03125rem","line-height":"2.4rem","text-transform":"none","margin-top":"0","margin-bottom":"0.5rem"},"h3":{"font-size":"1.75rem","font-weight":"500","letter-spacing":"0","line-height":"2.1rem","text-transform":"none","margin-top":"0","margin-bottom":"0.5rem"},"h4":{"font-size":"1.5rem","font-weight":"500","letter-spacing":"0.015625rem","line-height":"1.8rem","text-transform":"none","margin-top":"0","margin-bottom":"0.5rem"},"h5":{"font-size":"1.25rem","font-weight":"500","letter-spacing":"0","line-height":"1.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0.5rem"},"h6":{"font-size":"1rem","font-weight":"500","letter-spacing":"0.009375rem","line-height":"1.2rem","text-transform":"none","margin-top":"0","margin-bottom":"0.5rem"},"body-1":{"font-size":"1rem","font-weight":"400","letter-spacing":"0.03125rem","line-height":"1.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"body-2":{"font-size":"0.9rem","font-weight":"400","letter-spacing":"0.015625rem","line-height":"1.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"subtitle-1":{"font-size":"0.875rem","font-weight":"400","letter-spacing":"0.009375rem","line-height":"1.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"subtitle-2":{"font-size":"0.9rem","font-weight":"400","letter-spacing":"0.00625rem","line-height":"1.35rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"button":{"font-size":"1rem","font-weight":"500","letter-spacing":"0.046875rem","line-height":"1.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"caption":{"font-size":"0.75rem","font-weight":"400","letter-spacing":"0.025rem","line-height":"1rem","text-transform":"none"},"overline":{"font-size":"0.625rem","font-weight":"400","letter-spacing":"0.09375rem","line-height":"1rem","text-transform":"uppercase"},"bootstrap_weekday":{"font-size":"0.8125rem","font-weight":"400","line-height":"normal","text-transform":"none","margin-top":"0","margin-bottom":"0"}},"fluent":{"typeface":"'Open Sans', Helvetica, Arial, sans-serif","h1":{"font-size":"4.25rem","font-weight":"700","letter-spacing":"-0.09375rem","line-height":"4.75rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h2":{"font-size":"2.625rem","font-weight":"700","letter-spacing":"-0.03125rem","line-height":"3.25rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h3":{"font-size":"2rem","font-weight":"600","letter-spacing":"0","line-height":"2.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h4":{"font-size":"1.75rem","font-weight":"400","letter-spacing":"0.015625rem","line-height":"2.25rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h5":{"font-size":"1.5rem","font-weight":"400","letter-spacing":"0","line-height":"2rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h6":{"font-size":"1.25rem","font-weight":"400","letter-spacing":"0.009375rem","line-height":"1.75rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"body-1":{"font-size":"1rem","font-weight":"400","letter-spacing":"0.03125rem","line-height":"1.375rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"body-2":{"font-size":"0.875rem","font-weight":"400","letter-spacing":"0.015625rem","line-height":"1.25rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"subtitle-1":{"font-size":"1.125rem","font-weight":"400","letter-spacing":"0.009375rem","line-height":"1.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"subtitle-2":{"font-size":"0.875rem","font-weight":"600","letter-spacing":"0.00625rem","line-height":"1.25rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"button":{"font-size":"0.875rem","font-weight":"400","letter-spacing":"0.046875rem","line-height":"0.875rem","text-transform":"capitalize","margin-top":"0","margin-bottom":"0"},"caption":{"font-size":"0.75rem","font-weight":"400","font-style":"normal","letter-spacing":"0.025rem","line-height":"1rem","text-transform":"none"},"overline":{"font-size":"0.625rem","font-weight":"400","letter-spacing":"0.09375rem","line-height":"0.875rem","text-transform":"uppercase","margin-top":"0","margin-bottom":"0"}},"indigo":{"typeface":"'Nunito Sans', sans-serif","h1":{"font-size":"6rem","font-weight":"200","letter-spacing":"-0.09375rem","line-height":"7rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h2":{"font-size":"3.75rem","font-weight":"200","letter-spacing":"-0.03125rem","line-height":"4.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h3":{"font-size":"3rem","font-weight":"200","letter-spacing":"0","line-height":"3.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h4":{"font-size":"2.25rem","font-weight":"200","letter-spacing":"0.015625rem","line-height":"2.625rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h5":{"font-size":"1.5rem","font-weight":"200","letter-spacing":"0","line-height":"1.75rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"h6":{"font-size":"1.25rem","font-weight":"600","letter-spacing":"0.009375rem","line-height":"1.625rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"body-1":{"font-size":"1rem","font-weight":"400","letter-spacing":"0.03125rem","line-height":"1.25rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"body-2":{"font-size":"0.875rem","font-weight":"400","letter-spacing":"0.015625rem","line-height":"1.25rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"subtitle-1":{"font-size":"1rem","font-weight":"600","letter-spacing":"0.009375rem","line-height":"1.375rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"subtitle-2":{"font-size":"0.875rem","font-weight":"700","letter-spacing":"0.00625rem","line-height":"1.25rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"button":{"font-size":"0.75rem","font-weight":"700","letter-spacing":"0.046875rem","line-height":"normal","text-transform":"uppercase","margin-top":"0","margin-bottom":"0"},"caption":{"font-size":"0.75rem","font-weight":"400","letter-spacing":"0.025rem","line-height":"1rem","text-transform":"normal","margin-top":"0","margin-bottom":"0"},"overline":{"font-size":"0.625rem","font-weight":"700","letter-spacing":"0.0125rem","line-height":"0.875rem","text-transform":"uppercase","margin-top":"0","margin-bottom":"0"}},"material":{"typeface":"'Titillium Web', sans-serif","h1":{"font-size":"6rem","font-weight":"300","font-style":"normal","letter-spacing":"-0.09375rem","line-height":"7rem","text-transform":"none","margin-top":"1.75rem","margin-bottom":"3.5rem"},"h2":{"font-size":"3.75rem","font-weight":"300","font-style":"normal","letter-spacing":"-0.03125rem","line-height":"4.4375rem","text-transform":"none","margin-top":"1.75rem","margin-bottom":"1.75rem"},"h3":{"font-size":"3rem","font-weight":"400","font-style":"normal","letter-spacing":"0","line-height":"3.5625rem","text-transform":"none","margin-top":"1.75rem","margin-bottom":"0"},"h4":{"font-size":"2.125rem","font-weight":"400","font-style":"normal","letter-spacing":"0.015625rem","line-height":"2.5rem","text-transform":"none","margin-top":"1.75rem","margin-bottom":"0"},"h5":{"font-size":"1.5rem","font-weight":"400","font-style":"normal","letter-spacing":"0","line-height":"1.75rem","text-transform":"none","margin-top":"1.75rem","margin-bottom":"0"},"h6":{"font-size":"1.25rem","font-weight":"600","font-style":"normal","letter-spacing":"0.009375rem","line-height":"1.5rem","text-transform":"none","margin-top":"0","margin-bottom":"0"},"body-1":{"font-size":"1rem","font-weight":"400","font-style":"normal","letter-spacing":"0.03125rem","line-height":"1.75rem","text-transform":"none","margin-top":"1.75rem","margin-bottom":"1rem"},"body-2":{"font-size":"0.875rem","font-weight":"400","font-style":"normal","letter-spacing":"0.015625rem","line-height":"1.25rem","text-transform":"none"},"subtitle-1":{"font-size":"1rem","font-weight":"400","font-style":"normal","letter-spacing":"0.009375rem","line-height":"1.5rem","text-transform":"none"},"subtitle-2":{"font-size":"0.875rem","font-weight":"600","font-style":"normal","letter-spacing":"0.00625rem","line-height":"1.5rem","text-transform":"none"},"button":{"font-size":"0.875rem","font-weight":"600","font-style":"normal","letter-spacing":"0.046875rem","line-height":"1rem","text-transform":"uppercase"},"caption":{"font-size":"0.75rem","font-weight":"400","font-style":"normal","letter-spacing":"0.025rem","line-height":"1rem","text-transform":"none"},"overline":{"font-size":"0.625rem","font-weight":"400","font-style":"normal","letter-spacing":"0.09375rem","line-height":"1rem","text-transform":"uppercase"}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-theming",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.18",
|
|
4
4
|
"description": "A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"test": "jest",
|
|
14
14
|
"serve:docs": "npx http-server ./sassdoc"
|
|
15
15
|
},
|
|
16
|
+
"files": [
|
|
17
|
+
"/sass",
|
|
18
|
+
"/json",
|
|
19
|
+
"/_index.scss"
|
|
20
|
+
],
|
|
16
21
|
"repository": {
|
|
17
22
|
"type": "git",
|
|
18
23
|
"url": "git+https://github.com/IgniteUI/igniteui-theming.git"
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
name: Npm.js deploy
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [created]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v2
|
|
12
|
-
- uses: actions/setup-node@v2
|
|
13
|
-
with:
|
|
14
|
-
node-version: 16
|
|
15
|
-
cache: 'npm'
|
|
16
|
-
registry-url: 'https://registry.npmjs.org'
|
|
17
|
-
|
|
18
|
-
- run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
|
19
|
-
- run: echo ${VERSION}
|
|
20
|
-
|
|
21
|
-
- name: Install dependencies
|
|
22
|
-
run: npm ci
|
|
23
|
-
|
|
24
|
-
- name: Lint package
|
|
25
|
-
run: npm run lint
|
|
26
|
-
|
|
27
|
-
- name: Test package
|
|
28
|
-
run: npm test
|
|
29
|
-
|
|
30
|
-
- name: Build package
|
|
31
|
-
run: npm run build
|
|
32
|
-
|
|
33
|
-
- name: Define NPM tag
|
|
34
|
-
run: |
|
|
35
|
-
if [[ ${VERSION} == *"alpha"* || ${VERSION} == *"beta"* || ${VERSION} == *"rc"* ]]; then echo "NPM_TAG=next"; else echo "NPM_TAG=latest"; fi >> $GITHUB_ENV
|
|
36
|
-
echo ${NPM_TAG}
|
|
37
|
-
- name: Create package version
|
|
38
|
-
run: npm version ${VERSION} --no-git-tag-version --save --allow-same-version
|
|
39
|
-
working-directory: ./
|
|
40
|
-
|
|
41
|
-
- name: Publish igniteui-theming
|
|
42
|
-
run: npm publish --tag ${NPM_TAG}
|
|
43
|
-
working-directory: ./
|
|
44
|
-
env:
|
|
45
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/.stylelintrc.json
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "stylelint-config-standard-scss",
|
|
3
|
-
"plugins": ["stylelint-scss"],
|
|
4
|
-
"rules": {
|
|
5
|
-
"at-rule-disallowed-list": ["debug", {
|
|
6
|
-
"severity": "warning"
|
|
7
|
-
}],
|
|
8
|
-
"block-closing-brace-empty-line-before": "never",
|
|
9
|
-
"block-closing-brace-newline-after": "always-single-line",
|
|
10
|
-
"block-no-empty": true,
|
|
11
|
-
"color-hex-case": "lower",
|
|
12
|
-
"color-hex-length": "short",
|
|
13
|
-
"color-no-invalid-hex": true,
|
|
14
|
-
"comment-no-empty": true,
|
|
15
|
-
"custom-property-pattern": "(?:igc-)?.+",
|
|
16
|
-
"declaration-block-no-duplicate-properties": true,
|
|
17
|
-
"declaration-block-no-shorthand-property-overrides": true,
|
|
18
|
-
"declaration-block-single-line-max-declarations": 1,
|
|
19
|
-
"declaration-colon-space-after": "always-single-line",
|
|
20
|
-
"font-family-no-duplicate-names": true,
|
|
21
|
-
"font-family-no-missing-generic-family-keyword": true,
|
|
22
|
-
"font-weight-notation": "numeric",
|
|
23
|
-
"function-calc-no-unspaced-operator": true,
|
|
24
|
-
"function-comma-space-after": "always-single-line",
|
|
25
|
-
"indentation": 4,
|
|
26
|
-
"length-zero-no-unit": true,
|
|
27
|
-
"max-nesting-depth": [3, {
|
|
28
|
-
"severity": "warning"
|
|
29
|
-
}],
|
|
30
|
-
"no-descending-specificity": null,
|
|
31
|
-
"no-duplicate-at-import-rules": true,
|
|
32
|
-
"no-duplicate-selectors": true,
|
|
33
|
-
"no-extra-semicolons": true,
|
|
34
|
-
"no-invalid-double-slash-comments": true,
|
|
35
|
-
"no-missing-end-of-source-newline": true,
|
|
36
|
-
"number-leading-zero": "never",
|
|
37
|
-
"number-no-trailing-zeros": true,
|
|
38
|
-
"property-no-unknown": true,
|
|
39
|
-
"rule-empty-line-before": ["always-multi-line", {
|
|
40
|
-
"except": ["first-nested"],
|
|
41
|
-
"ignore": ["after-comment"]
|
|
42
|
-
}],
|
|
43
|
-
"selector-attribute-quotes": "always",
|
|
44
|
-
"selector-attribute-operator-space-after": "never",
|
|
45
|
-
"selector-attribute-operator-space-before": "never",
|
|
46
|
-
"selector-combinator-space-after": "always",
|
|
47
|
-
"selector-combinator-space-before": "always",
|
|
48
|
-
"selector-descendant-combinator-no-non-space": true,
|
|
49
|
-
"selector-list-comma-newline-after": "always",
|
|
50
|
-
"selector-pseudo-class-case": "lower",
|
|
51
|
-
"selector-pseudo-class-no-unknown": true,
|
|
52
|
-
"selector-pseudo-class-parentheses-space-inside": "never",
|
|
53
|
-
"selector-pseudo-element-case": "lower",
|
|
54
|
-
"selector-pseudo-element-colon-notation": "double",
|
|
55
|
-
"selector-pseudo-element-no-unknown": true,
|
|
56
|
-
"selector-type-case": "lower",
|
|
57
|
-
"selector-type-no-unknown": [true, {
|
|
58
|
-
"ignore": ["custom-elements"]
|
|
59
|
-
}],
|
|
60
|
-
"shorthand-property-no-redundant-values": true,
|
|
61
|
-
"string-quotes": "single",
|
|
62
|
-
"unit-case": "lower",
|
|
63
|
-
"value-keyword-case": "lower",
|
|
64
|
-
"value-list-comma-space-after": "always-single-line",
|
|
65
|
-
"value-no-vendor-prefix": true,
|
|
66
|
-
"scss/at-mixin-pattern": null,
|
|
67
|
-
"scss/at-function-pattern": null,
|
|
68
|
-
"scss/dollar-variable-pattern": null,
|
|
69
|
-
"scss/at-else-closing-brace-newline-after": "always-last-in-chain",
|
|
70
|
-
"scss/at-else-closing-brace-space-after": "always-intermediate",
|
|
71
|
-
"scss/at-else-empty-line-before": "never",
|
|
72
|
-
"scss/at-if-closing-brace-newline-after": "always-last-in-chain",
|
|
73
|
-
"scss/at-if-closing-brace-space-after": "always-intermediate",
|
|
74
|
-
"scss/at-import-no-partial-leading-underscore": true,
|
|
75
|
-
"scss/at-mixin-argumentless-call-parentheses": "always",
|
|
76
|
-
"scss/at-mixin-parentheses-space-before": "never",
|
|
77
|
-
"scss/at-rule-no-unknown": true,
|
|
78
|
-
"scss/double-slash-comment-inline": "never",
|
|
79
|
-
"scss/dollar-variable-colon-newline-after": null,
|
|
80
|
-
"scss/dollar-variable-colon-space-after": "always",
|
|
81
|
-
"scss/selector-no-redundant-nesting-selector": true
|
|
82
|
-
}
|
|
83
|
-
}
|
package/scripts/buildJSON.mjs
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { exporter } from "sass-export";
|
|
3
|
-
import { exec as _exec } from "child_process";
|
|
4
|
-
import { mkdirSync as makeDir } from "fs";
|
|
5
|
-
import { writeFile } from "fs/promises";
|
|
6
|
-
import { fileURLToPath } from "url";
|
|
7
|
-
import { promisify } from "util";
|
|
8
|
-
import { globby } from "globby";
|
|
9
|
-
|
|
10
|
-
const exec = promisify(_exec);
|
|
11
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
-
const PALETTE_PRESETS = "sass/color/presets";
|
|
13
|
-
const TYPOGRAPHY_PRESETS = "sass/typography/presets";
|
|
14
|
-
const ELEVATION_PRESETS = "sass/elevations/presets";
|
|
15
|
-
const DEST_DIR = path.join.bind(null, path.resolve(__dirname, "../json"));
|
|
16
|
-
|
|
17
|
-
async function palettesToJSON() {
|
|
18
|
-
const paths = await globby(`${PALETTE_PRESETS}/{light,dark}/*.scss`);
|
|
19
|
-
const palettes = {
|
|
20
|
-
inputFiles: paths,
|
|
21
|
-
includePaths: [`${PALETTE_PRESETS}/light/`, `${PALETTE_PRESETS}/dark/`],
|
|
22
|
-
};
|
|
23
|
-
const data = exporter(palettes).getStructured();
|
|
24
|
-
const outputFile = DEST_DIR("colors/presets/palettes.json");
|
|
25
|
-
const normalized = Object.entries(data).reduce((acc, next) => {
|
|
26
|
-
const [key, value] = next;
|
|
27
|
-
if (key !== "variables") {
|
|
28
|
-
value.forEach((palette) => {
|
|
29
|
-
acc[`${key}-${palette.name.substring(1)}`] = palette.mapValue.reduce((acc, color) => {
|
|
30
|
-
if (color.name === "variant") return acc;
|
|
31
|
-
acc[color.name] = color.value;
|
|
32
|
-
return acc;
|
|
33
|
-
}, {});
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return acc;
|
|
37
|
-
}, {});
|
|
38
|
-
makeDir(path.dirname(outputFile), { recursive: true });
|
|
39
|
-
writeFile(outputFile, JSON.stringify(normalized), "utf-8");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async function typographyToJSON() {
|
|
43
|
-
const paths = await globby(`${TYPOGRAPHY_PRESETS}/*.scss`);
|
|
44
|
-
const presets = {
|
|
45
|
-
inputFiles: paths,
|
|
46
|
-
includePaths: [`${TYPOGRAPHY_PRESETS}`],
|
|
47
|
-
};
|
|
48
|
-
const data = exporter(presets).getStructured();
|
|
49
|
-
const normalized = Object.entries(data).reduce((acc, next) => {
|
|
50
|
-
const [key, value] = next;
|
|
51
|
-
if (key !== "variables") {
|
|
52
|
-
acc[key] = value.reduce((styles, variable) => {
|
|
53
|
-
if (variable.name !== "$type-scale" && variable.name !== "$_base-scale") {
|
|
54
|
-
styles[variable.name.substring(1)] =
|
|
55
|
-
variable.mapValue?.reduce((acc, next) => {
|
|
56
|
-
acc[next.name] = next.compiledValue;
|
|
57
|
-
return acc;
|
|
58
|
-
}, {}) || variable.value;
|
|
59
|
-
}
|
|
60
|
-
return styles;
|
|
61
|
-
}, {});
|
|
62
|
-
}
|
|
63
|
-
return acc;
|
|
64
|
-
}, {});
|
|
65
|
-
const outputFile = DEST_DIR("typography/presets/typescales.json");
|
|
66
|
-
makeDir(path.dirname(outputFile), { recursive: true });
|
|
67
|
-
writeFile(outputFile, JSON.stringify(normalized), "utf-8");
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async function colorsToJSON() {
|
|
71
|
-
const options = {
|
|
72
|
-
inputFiles: ["sass/color/_types.scss", "sass/color/_multipliers.scss"],
|
|
73
|
-
};
|
|
74
|
-
const data = exporter(options).getArray();
|
|
75
|
-
const color = data.find((d) => d.name === "$color").mapValue;
|
|
76
|
-
const grayscale = data.find((d) => d.name === "$grayscale").mapValue;
|
|
77
|
-
const color_s = color.find((d) => d.name === "s").mapValue;
|
|
78
|
-
const color_l = color.find((d) => d.name === "l").mapValue;
|
|
79
|
-
const grayscale_l = grayscale.find((d) => d.name === "l").mapValue;
|
|
80
|
-
const gray_shades = data.find((d) => d.name === "$IGrayShades").compiledValue.split(/\s*,\s*/);
|
|
81
|
-
const color_shades = data.find((d) => d.name === "$IColorShades").compiledValue.split(/\s*,\s*/);
|
|
82
|
-
|
|
83
|
-
const multipliers = {
|
|
84
|
-
color: {
|
|
85
|
-
s: color_s.reduce((acc, next) => {
|
|
86
|
-
acc[next.name] = next.value;
|
|
87
|
-
return acc;
|
|
88
|
-
}, {}),
|
|
89
|
-
l: color_l.reduce((acc, next) => {
|
|
90
|
-
acc[next.name] = next.value;
|
|
91
|
-
return acc;
|
|
92
|
-
}, {}),
|
|
93
|
-
},
|
|
94
|
-
grayscale: {
|
|
95
|
-
l: grayscale_l.reduce((acc, next) => {
|
|
96
|
-
acc[next.name] = next.value;
|
|
97
|
-
return acc;
|
|
98
|
-
}, {}),
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
const palette = data
|
|
102
|
-
.find((d) => d.name === "$IPaletteColors")
|
|
103
|
-
.mapValue.reduce((acc, next) => {
|
|
104
|
-
if (next.name === "gray") {
|
|
105
|
-
acc[next.name] = gray_shades;
|
|
106
|
-
return acc;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
acc[next.name] = color_shades;
|
|
110
|
-
return acc;
|
|
111
|
-
}, {});
|
|
112
|
-
|
|
113
|
-
const multipliersFile = DEST_DIR("colors/meta/multipliers.json");
|
|
114
|
-
const paletteFile = DEST_DIR("colors/meta/palette.json");
|
|
115
|
-
|
|
116
|
-
makeDir(path.dirname(multipliersFile), { recursive: true });
|
|
117
|
-
makeDir(path.dirname(paletteFile), { recursive: true });
|
|
118
|
-
|
|
119
|
-
writeFile(multipliersFile, JSON.stringify(multipliers), "utf-8");
|
|
120
|
-
writeFile(paletteFile, JSON.stringify(palette), "utf-8");
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
async function elevationsToJSON() {
|
|
124
|
-
const paths = await globby(`${ELEVATION_PRESETS}/*.scss`);
|
|
125
|
-
const options = {
|
|
126
|
-
inputFiles: paths,
|
|
127
|
-
includePaths: [`${ELEVATION_PRESETS}`],
|
|
128
|
-
};
|
|
129
|
-
const presets = exporter(options).getStructured();
|
|
130
|
-
const data = Object.entries(presets).filter(([key]) => key !== "variables" && key !== "mixins");
|
|
131
|
-
const elevations = data.reduce((acc, [key, value]) => {
|
|
132
|
-
acc[key] = value.reduce((acc, next) => {
|
|
133
|
-
if(next.name === '$elevations') {
|
|
134
|
-
acc.elevations = next.mapValue.reduce((result, elevation) => {
|
|
135
|
-
result[elevation.name] = elevation.compiledValue;
|
|
136
|
-
return result;
|
|
137
|
-
}, {});
|
|
138
|
-
}
|
|
139
|
-
return acc;
|
|
140
|
-
}, {});
|
|
141
|
-
return acc;
|
|
142
|
-
}, {});
|
|
143
|
-
|
|
144
|
-
const outputFile = DEST_DIR("elevations/elevations.json");
|
|
145
|
-
makeDir(path.dirname(outputFile), { recursive: true });
|
|
146
|
-
|
|
147
|
-
writeFile(outputFile, JSON.stringify(elevations), "utf-8");
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
(async () => {
|
|
151
|
-
await exec("npm run clean");
|
|
152
|
-
|
|
153
|
-
console.info("Exporting palette presets to JSON...");
|
|
154
|
-
await palettesToJSON();
|
|
155
|
-
|
|
156
|
-
console.info("Exporting color metadata to JSON...");
|
|
157
|
-
await colorsToJSON();
|
|
158
|
-
|
|
159
|
-
console.info("Exporting typography presets to JSON...");
|
|
160
|
-
await typographyToJSON();
|
|
161
|
-
|
|
162
|
-
console.info("Exporting elevation presets to JSON...");
|
|
163
|
-
await elevationsToJSON();
|
|
164
|
-
|
|
165
|
-
console.log(`Done! 🎉`);
|
|
166
|
-
})();
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* stylelint-disable max-nesting-depth */
|
|
2
|
-
@use '../node_modules/sass-true/' as *;
|
|
3
|
-
@use '../sass/animations/mixins' as *;
|
|
4
|
-
@use 'sass:map';
|
|
5
|
-
|
|
6
|
-
@mixin test-keyframes {
|
|
7
|
-
@include keyframes('test-keyframes') {
|
|
8
|
-
0% {
|
|
9
|
-
color: red;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
100% {
|
|
13
|
-
color: blue;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@include describe('Animations') {
|
|
19
|
-
@include it('should include a keyframe animation only once at the root of the stylesheet') {
|
|
20
|
-
@include assert() {
|
|
21
|
-
@include output($selector: false) {
|
|
22
|
-
@include test-keyframes();
|
|
23
|
-
@include test-keyframes();
|
|
24
|
-
@include test-keyframes();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@include expect($selector: false) {
|
|
28
|
-
@keyframes test-keyframes {
|
|
29
|
-
0% {
|
|
30
|
-
color: red;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
100% {
|
|
34
|
-
color: blue;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@include it('should include a list of animations using the animation mixin') {
|
|
42
|
-
@include assert() {
|
|
43
|
-
@include output() {
|
|
44
|
-
@include animation('test-keyframes' 2s ease-out, 'bounce-out' 1s ease-out);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@include expect() {
|
|
48
|
-
animation: 'test-keyframes' 2s ease-out, 'bounce-out' 1s ease-out;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
package/test/_bem.spec.scss
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/* stylelint-disable selector-class-pattern */
|
|
2
|
-
/* stylelint-disable max-nesting-depth */
|
|
3
|
-
@use '../node_modules/sass-true/' as *;
|
|
4
|
-
@use '../sass/bem' as *;
|
|
5
|
-
|
|
6
|
-
@include describe('BEM') {
|
|
7
|
-
@include it('creates block__element classes using the respective mixins') {
|
|
8
|
-
@include assert() {
|
|
9
|
-
@include output($selector: false) {
|
|
10
|
-
@include b(block) {
|
|
11
|
-
background: black;
|
|
12
|
-
|
|
13
|
-
@include e(element) {
|
|
14
|
-
color: orange;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@include expect($selector: false) {
|
|
20
|
-
.block {
|
|
21
|
-
background: black;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.block__element {
|
|
25
|
-
color: orange;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@include it('creates block--modifier classes using the modifier mixins') {
|
|
32
|
-
@include assert() {
|
|
33
|
-
@include output($selector: false) {
|
|
34
|
-
@include b(block) {
|
|
35
|
-
background: black;
|
|
36
|
-
|
|
37
|
-
@include m(error) {
|
|
38
|
-
background: red;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@include mx(error, selected) {
|
|
42
|
-
background: darkred;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@include expect($selector: false) {
|
|
48
|
-
.block {
|
|
49
|
-
background: black;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.block--error {
|
|
53
|
-
background: red;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.block--error.block--selected {
|
|
57
|
-
background: darkred;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@include it('creates block__element--modifier classes using the element mixin') {
|
|
64
|
-
@include assert() {
|
|
65
|
-
@include output($selector: false) {
|
|
66
|
-
@include b(block) {
|
|
67
|
-
background: black;
|
|
68
|
-
|
|
69
|
-
@include e(element, $m: small) {
|
|
70
|
-
font-size: 12px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@include e(element, $m: medium) {
|
|
74
|
-
font-size: 14px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@include e(element, $m: large) {
|
|
78
|
-
font-size: 16px;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@include expect($selector: false) {
|
|
84
|
-
.block {
|
|
85
|
-
background: black;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.block__element--small {
|
|
89
|
-
font-size: 12px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.block__element--medium {
|
|
93
|
-
font-size: 14px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.block__element--large {
|
|
97
|
-
font-size: 16px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@include it('creates multiple element modifier classes using the element mixin') {
|
|
104
|
-
@include assert() {
|
|
105
|
-
@include output($selector: false) {
|
|
106
|
-
@include b(block) {
|
|
107
|
-
background: black;
|
|
108
|
-
|
|
109
|
-
@include e(element, $mods: (small, pink)) {
|
|
110
|
-
color: pink;
|
|
111
|
-
font-size: 12px;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@include expect($selector: false) {
|
|
117
|
-
.block {
|
|
118
|
-
background: black;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.block__element--small.block__element--pink {
|
|
122
|
-
color: pink;
|
|
123
|
-
font-size: 12px;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
@include it('overwrites element styles in a modified block') {
|
|
130
|
-
@include assert() {
|
|
131
|
-
@include output($selector: false) {
|
|
132
|
-
@include b(block) {
|
|
133
|
-
background: black;
|
|
134
|
-
|
|
135
|
-
@include e(element) {
|
|
136
|
-
color: wheat;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
@include m(error) {
|
|
140
|
-
background: red;
|
|
141
|
-
|
|
142
|
-
@include e(element) {
|
|
143
|
-
color: white;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@include expect($selector: false) {
|
|
150
|
-
.block {
|
|
151
|
-
background: black;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.block__element {
|
|
155
|
-
color: wheat;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.block--error {
|
|
159
|
-
background: red;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.block--error .block__element {
|
|
163
|
-
color: white;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|