@medyll/cssfabric 0.1.12 → 0.2.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.
- package/README.md +38 -240
- package/_generated/cssFabric.vars.json +13 -0
- package/{src/_generated → _generated}/export.variables.md +0 -0
- package/{src/_generated → _generated}/index.d.ts +0 -0
- package/{src/_generated → _generated}/readme.md +0 -0
- package/init/importCssVars.d.ts +1 -0
- package/init/importCssVars.js +2 -0
- package/package.json +113 -69
- package/{lib/scripts → scripts}/cssfabric.d.ts +0 -0
- package/scripts/cssfabric.js +43 -0
- package/{lib/scripts → scripts}/cssfabricClassNames.d.ts +0 -0
- package/{lib/scripts → scripts}/cssfabricClassNames.js +5 -9
- package/{src/scripts → scripts}/index.d.ts +0 -0
- package/scripts/index.js +4 -0
- package/{lib/scripts → scripts}/utils.d.ts +0 -0
- package/{lib/scripts → scripts}/utils.js +1 -3
- package/{lib/styles/core → styles}/animation/animation.css +0 -0
- package/{lib/styles/core → styles}/animation/animation.min.css +0 -0
- package/{lib/styles/core → styles}/base/base.css +0 -7
- package/styles/base/base.min.css +1 -0
- package/{lib/styles/core → styles}/box/box.css +127 -111
- package/styles/box/box.min.css +1 -0
- package/{lib/styles/core → styles}/box/box.responsive.css +508 -444
- package/styles/box/box.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/color/color.css +0 -0
- package/styles/color/color.min.css +1 -0
- package/{lib/styles/core → styles}/color/color.responsive.css +0 -0
- package/styles/color/color.responsive.min.css +1 -0
- package/styles/cssfabric.css +61792 -0
- package/styles/cssfabric.min.css +168 -0
- package/styles/cssfabric.responsive.css +200596 -0
- package/styles/cssfabric.responsive.min.css +108 -0
- package/{lib/styles/core → styles}/flex/flex.css +0 -0
- package/styles/flex/flex.min.css +1 -0
- package/{lib/styles/core → styles}/flex/flex.responsive.css +0 -0
- package/styles/flex/flex.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/grid/grid.css +0 -0
- package/styles/grid/grid.min.css +1 -0
- package/{lib/styles/core → styles}/grid/grid.responsive.css +0 -0
- package/styles/grid/grid.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/menu/menu.css +16 -12
- package/styles/menu/menu.min.css +1 -0
- package/{lib/styles/core → styles}/menu/menu.responsive.css +64 -48
- package/styles/menu/menu.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/overflow/overflow.css +0 -0
- package/{lib/styles/core → styles}/overflow/overflow.min.css +0 -0
- package/{lib/styles/core → styles}/overflow/overflow.responsive.css +0 -0
- package/styles/overflow/overflow.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/scale/scale.css +0 -0
- package/{lib/styles/core → styles}/scale/scale.min.css +0 -0
- package/{lib/styles/core → styles}/scale/scale.responsive.css +0 -0
- package/styles/scale/scale.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/table/table.css +0 -0
- package/styles/table/table.min.css +1 -0
- package/{lib/styles/core → styles}/table/table.responsive.css +0 -0
- package/styles/table/table.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/text/text.css +0 -0
- package/styles/text/text.min.css +1 -0
- package/{lib/styles/core → styles}/text/text.responsive.css +0 -0
- package/styles/text/text.responsive.min.css +1 -0
- package/{lib/styles/core → styles}/theme/theme.css +0 -0
- package/{lib/styles/core → styles}/theme/theme.min.css +0 -0
- package/{lib/styles/core → styles}/vars.css +6 -2
- package/styles/vars.min.css +1 -0
- package/{lib/styles/core → styles}/zindex/zindex.css +0 -0
- package/{lib/styles/core → styles}/zindex/zindex.min.css +0 -0
- package/.idea/cssfabric.iml +0 -8
- package/.idea/misc.xml +0 -9
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.vscode/settings.json +0 -24
- package/bin/index.js +0 -7
- package/cssfabric.config.js +0 -3
- package/cssfabric.json +0 -8
- package/gulpfile.js +0 -598
- package/lib/_generated/export.variables.json +0 -583
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -7
- package/lib/scripts/cssfabric.js +0 -48
- package/lib/scripts/index.d.ts +0 -2
- package/lib/scripts/index.js +0 -6
- package/lib/styles/core/base/base.min.css +0 -1
- package/lib/styles/core/box/box.min.css +0 -1
- package/lib/styles/core/box/box.responsive.min.css +0 -1
- package/lib/styles/core/color/color.min.css +0 -1
- package/lib/styles/core/color/color.responsive.min.css +0 -1
- package/lib/styles/core/flex/flex.min.css +0 -1
- package/lib/styles/core/flex/flex.responsive.min.css +0 -1
- package/lib/styles/core/grid/grid.min.css +0 -1
- package/lib/styles/core/grid/grid.responsive.min.css +0 -1
- package/lib/styles/core/main.min.css +0 -1
- package/lib/styles/core/menu/menu.min.css +0 -1
- package/lib/styles/core/menu/menu.responsive.min.css +0 -1
- package/lib/styles/core/overflow/overflow.responsive.min.css +0 -1
- package/lib/styles/core/scale/scale.responsive.min.css +0 -1
- package/lib/styles/core/table/table.min.css +0 -1
- package/lib/styles/core/table/table.responsive.min.css +0 -1
- package/lib/styles/core/text/text.min.css +0 -1
- package/lib/styles/core/text/text.responsive.min.css +0 -1
- package/lib/styles/core/vars.min.css +0 -1
- package/lib/styles/core/vars2.css +0 -4
- package/lib/styles/core/vars2.min.css +0 -1
- package/lib/styles/cssfabric.css +0 -5147
- package/lib/styles/cssfabric.min.css +0 -16
- package/lib/styles/cssfabric.responsive.css +0 -16679
- package/lib/styles/cssfabric.responsive.min.css +0 -9
- package/src/_generated/export.variables.json +0 -759
- package/src/cssfabric/_utils.scss +0 -203
- package/src/cssfabric/index.d.ts +0 -3
- package/src/cssfabric/modules/_cssfabric-config.scss +0 -163
- package/src/cssfabric/modules/_mixins.scss +0 -1
- package/src/cssfabric/modules/animation/_animation-vars.scss +0 -17
- package/src/cssfabric/modules/animation/animation.scss +0 -3
- package/src/cssfabric/modules/base/_base-vars.scss +0 -19
- package/src/cssfabric/modules/base/base.scss +0 -80
- package/src/cssfabric/modules/box/_box-build.scss +0 -287
- package/src/cssfabric/modules/box/_box-vars.scss +0 -121
- package/src/cssfabric/modules/box/box-responsive.scss +0 -18
- package/src/cssfabric/modules/box/box.scss +0 -3
- package/src/cssfabric/modules/color/_color-build.scss +0 -196
- package/src/cssfabric/modules/color/_color-vars.scss +0 -80
- package/src/cssfabric/modules/color/color-responsive.scss +0 -23
- package/src/cssfabric/modules/color/color.scss +0 -9
- package/src/cssfabric/modules/css-fabric.scss +0 -2
- package/src/cssfabric/modules/flex/_flex-build.scss +0 -150
- package/src/cssfabric/modules/flex/_flex-vars.scss +0 -84
- package/src/cssfabric/modules/flex/flex-responsive.scss +0 -25
- package/src/cssfabric/modules/flex/flex.scss +0 -3
- package/src/cssfabric/modules/grid/_grid-build.scss +0 -84
- package/src/cssfabric/modules/grid/_grid-vars.scss +0 -88
- package/src/cssfabric/modules/grid/grid-responsive.scss +0 -25
- package/src/cssfabric/modules/grid/grid.scss +0 -6
- package/src/cssfabric/modules/menu/_menu-build.scss +0 -119
- package/src/cssfabric/modules/menu/_menu-vars.scss +0 -29
- package/src/cssfabric/modules/menu/menu-responsive.scss +0 -19
- package/src/cssfabric/modules/menu/menu.scss +0 -6
- package/src/cssfabric/modules/overflow/_overflow-build.scss +0 -22
- package/src/cssfabric/modules/overflow/_overflow-vars.scss +0 -31
- package/src/cssfabric/modules/overflow/overflow-responsive.scss +0 -25
- package/src/cssfabric/modules/overflow/overflow.scss +0 -7
- package/src/cssfabric/modules/scale/_scale-build.scss +0 -142
- package/src/cssfabric/modules/scale/_scale-vars.scss +0 -84
- package/src/cssfabric/modules/scale/scale-responsive.scss +0 -23
- package/src/cssfabric/modules/scale/scale.scss +0 -8
- package/src/cssfabric/modules/table/_table-build.scss +0 -134
- package/src/cssfabric/modules/table/_table-vars.scss +0 -30
- package/src/cssfabric/modules/table/table-responsive.scss +0 -24
- package/src/cssfabric/modules/table/table.scss +0 -8
- package/src/cssfabric/modules/text/_text-build.scss +0 -166
- package/src/cssfabric/modules/text/_text-vars.scss +0 -87
- package/src/cssfabric/modules/text/text-responsive.scss +0 -26
- package/src/cssfabric/modules/text/text.scss +0 -6
- package/src/cssfabric/modules/theme/_theme-build.scss +0 -90
- package/src/cssfabric/modules/theme/_theme-vars.scss +0 -46
- package/src/cssfabric/modules/theme/theme.scss +0 -6
- package/src/cssfabric/modules/vars.scss +0 -49
- package/src/cssfabric/modules/zindex/_zindex-vars.scss +0 -14
- package/src/cssfabric/modules/zindex/zindex.scss +0 -15
- package/src/index.d.ts +0 -3
- package/src/index.ts +0 -4
- package/src/scripts/cssfabric.ts +0 -54
- package/src/scripts/cssfabricClassNames.ts +0 -216
- package/src/scripts/index.ts +0 -8
- package/src/scripts/utils.ts +0 -37
- package/src/vendor/index.d.ts +0 -3
- package/src/vendor/normalize/normalize.min.css +0 -2
- package/src/vendor/sass-json-export/CHANGELOG.md +0 -26
- package/src/vendor/sass-json-export/Gruntfile.js +0 -60
- package/src/vendor/sass-json-export/LICENSE +0 -20
- package/src/vendor/sass-json-export/README.md +0 -90
- package/src/vendor/sass-json-export/package.json +0 -60
- package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +0 -26
- package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +0 -17
- package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +0 -9
- package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +0 -42
- package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +0 -7
- package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +0 -8
- package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +0 -14
- package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +0 -15
- package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +0 -7
- package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +0 -8
- package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +0 -8
- package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +0 -2
- package/src/vendor/sass-json-export/test/encode/_index.scss +0 -14
- package/src/vendor/sass-json-export/test/encode/api/_json.scss +0 -29
- package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +0 -6
- package/src/vendor/sass-json-export/test/encode/types/_bool.scss +0 -6
- package/src/vendor/sass-json-export/test/encode/types/_color.scss +0 -7
- package/src/vendor/sass-json-export/test/encode/types/_list.scss +0 -25
- package/src/vendor/sass-json-export/test/encode/types/_map.scss +0 -17
- package/src/vendor/sass-json-export/test/encode/types/_null.scss +0 -8
- package/src/vendor/sass-json-export/test/encode/types/_number.scss +0 -68
- package/src/vendor/sass-json-export/test/encode/types/_string.scss +0 -9
- package/src/vendor/sass-json-export/test/test.scss +0 -9
- package/tsconfig.json +0 -46
- package/webpack.config.js +0 -55
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// load scss config file
|
|
3
|
-
@use '../../_utils';
|
|
4
|
-
@use '_table-build' as build;
|
|
5
|
-
@use "../cssfabric-config";
|
|
6
|
-
// load general config variables
|
|
7
|
-
$config: cssfabric-config.$cssfabric-config;
|
|
8
|
-
|
|
9
|
-
// load general config variables
|
|
10
|
-
// media queries sizes, in rem
|
|
11
|
-
$_media_quey_sizes: map-get($config, media_quey_sizes);
|
|
12
|
-
|
|
13
|
-
// builder responsive
|
|
14
|
-
$min_value: 0;
|
|
15
|
-
|
|
16
|
-
@each $mq_size_key,
|
|
17
|
-
$mq_size_value in $_media_quey_sizes {
|
|
18
|
-
|
|
19
|
-
@include utils.fabricResponsiveEncloser($mq_size_value,$min_value) {
|
|
20
|
-
@include build.buildTable($mq_size_key);
|
|
21
|
-
}
|
|
22
|
-
$min_value: $mq_size_value;
|
|
23
|
-
}
|
|
24
|
-
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
@use 'text-vars';
|
|
2
|
-
@use "../cssfabric-config";
|
|
3
|
-
@use '../../_utils';
|
|
4
|
-
@use "sass:math";
|
|
5
|
-
|
|
6
|
-
// load general config variables
|
|
7
|
-
$cssfabric-config: cssfabric-config.$cssfabric-config;
|
|
8
|
-
$sep: map-get($cssfabric-config, sep);
|
|
9
|
-
|
|
10
|
-
$text-config: text-vars.$text-config;
|
|
11
|
-
$moduleName: map-get($text-config, moduleName);
|
|
12
|
-
$moduleNameShort: map-get($text-config, moduleNameShort);
|
|
13
|
-
|
|
14
|
-
$cssProps: map-get($text-config, cssProps);
|
|
15
|
-
$color-schemes: map-get($text-config, scheme);
|
|
16
|
-
$color-palette-props: map-get($text-config, palette);
|
|
17
|
-
|
|
18
|
-
$gray-list: map-get($text-config, gray);
|
|
19
|
-
|
|
20
|
-
$textTransform: map-get($cssProps, textTransform);
|
|
21
|
-
$fontWeight: map-get($cssProps, fontWeight);
|
|
22
|
-
$textAlign: map-get($cssProps, textAlign);
|
|
23
|
-
|
|
24
|
-
$font-size-unit-config: map-get($text-config, font-size-unit-config) !default;
|
|
25
|
-
$font-size-h-steps: map-get($text-config, title-size-declination-config) !default;
|
|
26
|
-
$font-size-h-max-config: map-get($text-config, font-sizes-h1-rem-config) !default;
|
|
27
|
-
$font-size-h-min-config: map-get($text-config, font-size-h-min-rem-config) !default;
|
|
28
|
-
|
|
29
|
-
$size-diff: $font-size-h-max-config - $font-size-h-min-config;
|
|
30
|
-
$steps: $font-size-h-steps - 1;
|
|
31
|
-
|
|
32
|
-
$step-size: math.div($size-diff, $steps);
|
|
33
|
-
|
|
34
|
-
@mixin fabric_text($tag_short) {
|
|
35
|
-
|
|
36
|
-
$acc: 1 - $step-size ;
|
|
37
|
-
|
|
38
|
-
.#{$tag_short}-ellipsis {
|
|
39
|
-
text-overflow: ellipsis;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
white-space: nowrap;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@for $size-index from 1 through $font-size-h-steps {
|
|
45
|
-
//
|
|
46
|
-
$acc: (( $font-size-h-steps - $size-index) * $step-size) + 1;
|
|
47
|
-
|
|
48
|
-
.h#{$size-index},
|
|
49
|
-
h#{$size-index} {
|
|
50
|
-
font-size: var(--font-size-h#{$size-index});
|
|
51
|
-
line-height: 1.2;
|
|
52
|
-
font-weight: 400;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@mixin textBuildTransform($tag_short) {
|
|
60
|
-
.#{$tag_short} {
|
|
61
|
-
@each $fabricRule, $value in $textTransform {
|
|
62
|
-
@include utils.fabricAttributes("&" + $sep, $fabricRule, "text-transform", $value);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@mixin textBuildAlign($tag_short) {
|
|
68
|
-
.#{$tag_short} {
|
|
69
|
-
@each $fabricRule, $value in $textAlign {
|
|
70
|
-
@include utils.fabricAttributes("&" + $sep, $fabricRule, "text-align", $value);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@mixin textBuildFontWeight($tag_short) {
|
|
76
|
-
.#{$tag_short} {
|
|
77
|
-
@each $fabricRule, $value in $fontWeight {
|
|
78
|
-
@include utils.fabricAttributes("&" + $sep, $fabricRule, "font-weight", var(--font-weight-#{$fabricRule}));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@mixin textBuildShadowColorScheme($tag_short) {
|
|
84
|
-
// text shadows color_schemes
|
|
85
|
-
.#{$tag_short} {
|
|
86
|
-
@each $fabricRule, $value in $color-schemes {
|
|
87
|
-
@include utils.fabricAttributes("&" + $sep + shad + $sep, $fabricRule, "text-shadow", var(--text-shadow-#{$fabricRule}));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@mixin textBuildShadowPalette($tag_short) {
|
|
93
|
-
// text shadows color_palette_props
|
|
94
|
-
.#{$tag_short} {
|
|
95
|
-
@each $fabricRule, $value in $color-palette-props {
|
|
96
|
-
@include utils.fabricAttributes("&" + $sep+ shad + $sep, $fabricRule, "text-shadow", var(--text-shadow-#{$fabricRule}));
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@mixin textCssVars() {
|
|
102
|
-
/*Hs*/
|
|
103
|
-
@for $size-index from 1 through $font-size-h-steps {
|
|
104
|
-
$acc: (( $font-size-h-steps - $size-index) * $step-size) + 1;
|
|
105
|
-
--font-size-h#{$size-index}: #{$acc + $font-size-unit-config};
|
|
106
|
-
}
|
|
107
|
-
/*weight*/
|
|
108
|
-
@each $fabricRule, $value in $fontWeight {
|
|
109
|
-
--font-weight-#{$fabricRule}: #{$value};
|
|
110
|
-
}
|
|
111
|
-
/*text shadows color_schemes*/
|
|
112
|
-
@each $fabricRule, $value in $color-schemes {
|
|
113
|
-
$cast-value: 0 0 0.125em #{$value};
|
|
114
|
-
--text-shadow-#{$fabricRule}: #{$cast-value};
|
|
115
|
-
}
|
|
116
|
-
/*text-shadows color_palette */
|
|
117
|
-
@each $fabricRule, $value in $color-palette-props {
|
|
118
|
-
$cast-value: 0 0 0.125em #{$value};
|
|
119
|
-
--text-shadow-#{$fabricRule}: #{$cast-value};
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
@mixin buildText($mq_size_key: null) {
|
|
125
|
-
|
|
126
|
-
$property_key: if($mq_size_key, #{$moduleNameShort}-#{$mq_size_key}, #{$moduleNameShort});
|
|
127
|
-
|
|
128
|
-
@include fabric_text($property_key);
|
|
129
|
-
|
|
130
|
-
@if ($mq_size_key == null) {
|
|
131
|
-
@if (cssfabric-config.$has-text-transform) {
|
|
132
|
-
@include textBuildTransform($property_key)
|
|
133
|
-
}
|
|
134
|
-
@if (cssfabric-config.$has-text-align) {
|
|
135
|
-
@include textBuildAlign($property_key)
|
|
136
|
-
}
|
|
137
|
-
@if (cssfabric-config.$has-text-font) {
|
|
138
|
-
@include textBuildFontWeight($property_key)
|
|
139
|
-
}
|
|
140
|
-
@if (cssfabric-config.$has-text-shadow-color-scheme) {
|
|
141
|
-
@include textBuildShadowColorScheme($property_key)
|
|
142
|
-
}
|
|
143
|
-
@if (cssfabric-config.$has-text-shadow-color-palette) {
|
|
144
|
-
@include textBuildShadowPalette($property_key)
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
@if ($mq_size_key != null) {
|
|
149
|
-
@if (cssfabric-config.$has-text-transform-responsive) {
|
|
150
|
-
@include textBuildTransform($property_key)
|
|
151
|
-
}
|
|
152
|
-
@if (cssfabric-config.$has-text-align-responsive) {
|
|
153
|
-
@include textBuildAlign($property_key)
|
|
154
|
-
}
|
|
155
|
-
@if (cssfabric-config.$has-text-font-responsive) {
|
|
156
|
-
@include textBuildFontWeight($property_key)
|
|
157
|
-
}
|
|
158
|
-
@if (cssfabric-config.$has-text-shadow-color-scheme-responsive) {
|
|
159
|
-
@include textBuildShadowColorScheme($property_key)
|
|
160
|
-
}
|
|
161
|
-
@if (cssfabric-config.$has-text-shadow-color-palette-responsive) {
|
|
162
|
-
@include textBuildShadowPalette($property_key)
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
@use '../../_utils';
|
|
2
|
-
|
|
3
|
-
$cssProps: (
|
|
4
|
-
text-transform: (
|
|
5
|
-
cap: capitalize,
|
|
6
|
-
up: uppercase,
|
|
7
|
-
low: lowercase,
|
|
8
|
-
none: none,
|
|
9
|
-
full: full-width
|
|
10
|
-
),
|
|
11
|
-
font-weight: (
|
|
12
|
-
50: 50,
|
|
13
|
-
100: 100,
|
|
14
|
-
300: 400,
|
|
15
|
-
500: 500,
|
|
16
|
-
900: 900,
|
|
17
|
-
light: lighter,
|
|
18
|
-
cap: normal,
|
|
19
|
-
bold: bold,
|
|
20
|
-
bolder: bolder
|
|
21
|
-
),
|
|
22
|
-
text-align: (
|
|
23
|
-
l: left,
|
|
24
|
-
r: right,
|
|
25
|
-
center: center,
|
|
26
|
-
justify: justify
|
|
27
|
-
),
|
|
28
|
-
text-shadow: (
|
|
29
|
-
palette:(primary, secondary)
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
$text-metadata: (
|
|
34
|
-
title: text,
|
|
35
|
-
tag: text,
|
|
36
|
-
description: "cssfabric text module to set text style on all html elements"
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
$text-config: (
|
|
40
|
-
moduleName: text,
|
|
41
|
-
moduleNameShort: text,
|
|
42
|
-
title-size-declination-config: 6,
|
|
43
|
-
font-size-unit-config: rem,
|
|
44
|
-
font-sizes-h1-rem-config: 3.1,
|
|
45
|
-
font-size-h-min-rem-config: 1,
|
|
46
|
-
text-ellipsis-tag-config: ellipsis,
|
|
47
|
-
cssProps: (
|
|
48
|
-
textTransform: (
|
|
49
|
-
cap: capitalize,
|
|
50
|
-
up: uppercase,
|
|
51
|
-
low: lowercase,
|
|
52
|
-
none: none,
|
|
53
|
-
full: full-width
|
|
54
|
-
),
|
|
55
|
-
fontWeight: map-get($cssProps, "font-weight"),
|
|
56
|
-
textAlign: map-get($cssProps, "text-align")
|
|
57
|
-
),
|
|
58
|
-
scheme: utils.get_fabric_conf(scheme),
|
|
59
|
-
palette: utils.get_fabric_conf(palette),
|
|
60
|
-
gray: utils.get_fabric_conf(gray)
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
$text-docs: (
|
|
64
|
-
attributes: (
|
|
65
|
-
text-transform: (
|
|
66
|
-
tag: text,
|
|
67
|
-
keys: utils.getObjectKeys(map-get($cssProps, text-transform))
|
|
68
|
-
),
|
|
69
|
-
font-weight: (
|
|
70
|
-
tag: text,
|
|
71
|
-
keys: utils.getObjectKeys(map-get($cssProps, font-weight))
|
|
72
|
-
),
|
|
73
|
-
text-align: (
|
|
74
|
-
tag: text,
|
|
75
|
-
keys: utils.getObjectKeys(map-get($cssProps, text-align))
|
|
76
|
-
),
|
|
77
|
-
text-shadow: (
|
|
78
|
-
tag: text-shad,
|
|
79
|
-
keys: utils.getObjectKeys(map-get($cssProps, text-shadow))
|
|
80
|
-
)
|
|
81
|
-
),
|
|
82
|
-
classNames: (
|
|
83
|
-
"_": (
|
|
84
|
-
et: "ellipsis"
|
|
85
|
-
)
|
|
86
|
-
)
|
|
87
|
-
);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
// load scss config file
|
|
4
|
-
@use '../../_utils';
|
|
5
|
-
@use '_text-build' as build;
|
|
6
|
-
@use "../cssfabric-config";
|
|
7
|
-
// load general config variables
|
|
8
|
-
$config: cssfabric-config.$cssfabric-config;
|
|
9
|
-
|
|
10
|
-
// load general config variables
|
|
11
|
-
// media queries sizes, in rem
|
|
12
|
-
$_media_quey_sizes: map-get($config, media_quey_sizes);
|
|
13
|
-
|
|
14
|
-
// builder responsive
|
|
15
|
-
$min_value: 0;
|
|
16
|
-
|
|
17
|
-
@each $mq_size_key,
|
|
18
|
-
$mq_size_value in $_media_quey_sizes {
|
|
19
|
-
|
|
20
|
-
@include utils.fabricResponsiveEncloser($mq_size_value,$min_value) {
|
|
21
|
-
@include build.buildText($mq_size_key);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
$min_value: $mq_size_value;
|
|
25
|
-
}
|
|
26
|
-
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
@use "../../_utils";
|
|
2
|
-
@use "sass:color";
|
|
3
|
-
@use "theme-vars";
|
|
4
|
-
|
|
5
|
-
@import "theme-vars";
|
|
6
|
-
@import "../cssfabric-config";
|
|
7
|
-
|
|
8
|
-
// COLOR THEME
|
|
9
|
-
$moduleNameShort: map-get($theme-config, moduleNameShort);
|
|
10
|
-
//
|
|
11
|
-
$color-themes: map-get($theme-config, color-default-config);
|
|
12
|
-
$theme-levels: map-get($theme-config, theme-level-config);
|
|
13
|
-
$theme-properties-apply-config: map-get($theme-config, theme-properties-apply-config);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
$declinations-config: map-get($theme-config, declinations-config);
|
|
17
|
-
|
|
18
|
-
$themes: map-get($cssfabric-config, themes) !default;
|
|
19
|
-
$theme-light: map-get($themes, light) !default;
|
|
20
|
-
$theme-dark: map-get($themes, dark) !default;
|
|
21
|
-
|
|
22
|
-
@mixin fabric_theme($mq_size_key: null) {
|
|
23
|
-
// loop on each color grades primary secondary tertiary
|
|
24
|
-
@each $color-grade in $declinations-config {
|
|
25
|
-
// text, bg, border
|
|
26
|
-
@each $text-or-bg-or-border in $theme-properties-apply-config {
|
|
27
|
-
$property_key: if($mq_size_key, #{$text-or-bg-or-border}-#{$mq_size_key}, #{$text-or-bg-or-border});
|
|
28
|
-
// font-size border-color background-color
|
|
29
|
-
$switch-tag-type: utils.getColorPropertyType($text-or-bg-or-border);
|
|
30
|
-
|
|
31
|
-
.#{$moduleNameShort}-#{$property_key}-#{$color-grade} {
|
|
32
|
-
#{$switch-tag-type}: var(--theme-color-#{$color-grade});
|
|
33
|
-
// light lighter dark ...
|
|
34
|
-
@each $theme-level in $theme-levels {
|
|
35
|
-
$newColor: var(--theme-color-#{$color-grade}-#{$theme-level});
|
|
36
|
-
|
|
37
|
-
@include utils.fabricAttributes("&-", $theme-level, #{$switch-tag-type}, $newColor);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@mixin themeBaseVars($theme:$theme-light) {
|
|
45
|
-
/* theme base colors*/
|
|
46
|
-
--theme-color-text: #{map-get($theme, foreground)};
|
|
47
|
-
--theme-color-foreground: #{map-get($theme, foreground)};
|
|
48
|
-
@include utils.alphaTize(--theme-color-foreground, map-get($theme, foreground));
|
|
49
|
-
--theme-color-background: #{map-get($theme, background)};
|
|
50
|
-
@include utils.alphaTize(--theme-color-background, map-get($theme, foreground));
|
|
51
|
-
--theme-color-paper: #{map-get($theme-light, paper)};
|
|
52
|
-
@include utils.alphaTize(--theme-color-paper, map-get($theme, paper));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@mixin themeCssVars($theme-color-primary,$theme-color-secondary,$theme-color-tertiary) {
|
|
57
|
-
|
|
58
|
-
/* theme primary colors*/
|
|
59
|
-
--theme-color-primary: #{$theme-color-primary};
|
|
60
|
-
@each $theme-level in $theme-levels {
|
|
61
|
-
--theme-color-primary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-primary)};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
--theme-color-primary-alpha-low: #{color.change($theme-color-primary,$alpha:0.8)};
|
|
65
|
-
--theme-color-primary-alpha: #{color.change($theme-color-primary,$alpha:0.3)};
|
|
66
|
-
--theme-color-primary-alpha-high: #{color.change($theme-color-primary,$alpha:0.1)};
|
|
67
|
-
|
|
68
|
-
/* theme secondary colors*/
|
|
69
|
-
--theme-color-secondary: #{$theme-color-secondary};
|
|
70
|
-
@each $theme-level in $theme-levels {
|
|
71
|
-
--theme-color-secondary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-secondary)};
|
|
72
|
-
}
|
|
73
|
-
--theme-color-secondary-alpha-low: #{color.change($theme-color-secondary,$alpha:0.8)};
|
|
74
|
-
--theme-color-secondary-alpha: #{color.change($theme-color-secondary,$alpha:0.3)};
|
|
75
|
-
--theme-color-secondary-alpha-high: #{color.change($theme-color-secondary,$alpha:0.1)};
|
|
76
|
-
|
|
77
|
-
/* theme tertiary colors*/
|
|
78
|
-
--theme-color-tertiary: #{$theme-color-tertiary};
|
|
79
|
-
@each $theme-level in $theme-levels {
|
|
80
|
-
--theme-color-tertiary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-tertiary)};
|
|
81
|
-
}
|
|
82
|
-
--theme-color-tertiary-alpha-low: #{color.change($theme-color-tertiary,$alpha:0.8)};
|
|
83
|
-
--theme-color-tertiary-alpha: #{color.change($theme-color-tertiary,$alpha:0.3)};
|
|
84
|
-
--theme-color-tertiary-alpha-high: #{color.change($theme-color-tertiary,$alpha:0.1)};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@mixin buildTheme($mq_size_key: null) {
|
|
88
|
-
|
|
89
|
-
@include fabric_theme($mq_size_key);
|
|
90
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
@use '../../utils' as utils;
|
|
2
|
-
@import "../cssfabric-config";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
$_declinations-config: (primary, secondary, tertiary);
|
|
7
|
-
$themeii : (primary: $theme-color-primary, secondary:$theme-color-secondary, tertiary:$theme-color-tertiary);
|
|
8
|
-
|
|
9
|
-
$_theme-levels: (light lighter dark darker complement invert);
|
|
10
|
-
$_theme-properties-apply: (text, bg, border);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
$theme-metadata: (
|
|
14
|
-
"title": "theme",
|
|
15
|
-
"description": ""
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
$_theme-levels-obj: (_ light lighter dark darker complement invert);
|
|
19
|
-
$_declinations-config-object: (primary:$_theme-levels-obj, secondary:$_theme-levels-obj, tertiary:$_theme-levels-obj);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
$theme-config: (
|
|
23
|
-
moduleName: theme,
|
|
24
|
-
moduleNameShort: theme,
|
|
25
|
-
color-default-config: (
|
|
26
|
-
primary: $theme-color-primary,
|
|
27
|
-
secondary: $theme-color-secondary,
|
|
28
|
-
tertiary: $theme-color-tertiary,
|
|
29
|
-
foreground: $theme-color-foreground,
|
|
30
|
-
background: $theme-color-background,
|
|
31
|
-
paper: $theme-color-paper,
|
|
32
|
-
),
|
|
33
|
-
declinations-config:$_declinations-config,
|
|
34
|
-
theme-level-config:$_theme-levels,
|
|
35
|
-
theme-properties-apply-config:$_theme-properties-apply,
|
|
36
|
-
// primary secondary tertiary
|
|
37
|
-
color: utils.getThemeLevels($themeii, $theme-color-primary)
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
$theme-docs: (attributes:(
|
|
41
|
-
theme:(
|
|
42
|
-
tag: theme,
|
|
43
|
-
keys: $_theme-properties-apply,
|
|
44
|
-
levels: $_declinations-config-object
|
|
45
|
-
)
|
|
46
|
-
));
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
@use "../_utils";
|
|
2
|
-
@use "sass:color";
|
|
3
|
-
@use '../../cssfabric/modules/color/color-vars';
|
|
4
|
-
@use '../../cssfabric/modules/color/color-build' as colorBuild;
|
|
5
|
-
@use "../../cssfabric/modules/box/box-vars" as box;
|
|
6
|
-
@use "../../cssfabric/modules/box/box-build" as boxBuild;
|
|
7
|
-
@use "../../cssfabric/modules/theme/theme-build" as themeBuild;
|
|
8
|
-
@use "../../cssfabric/modules/text/text-build" as textBuild;
|
|
9
|
-
|
|
10
|
-
@import 'cssfabric-config';
|
|
11
|
-
|
|
12
|
-
$themes: map-get($cssfabric-config, themes) !default;
|
|
13
|
-
$theme-light: map-get($themes, light) !default;
|
|
14
|
-
$theme-dark: map-get($themes, dark) !default;
|
|
15
|
-
|
|
16
|
-
/* cssFabric vars yes */
|
|
17
|
-
:root {
|
|
18
|
-
@include themeBuild.themeCssVars($theme-color-primary,$theme-color-secondary,$theme-color-tertiary);
|
|
19
|
-
@include colorBuild.buildColorCssVars();
|
|
20
|
-
/* boxes */
|
|
21
|
-
@include boxBuild.pmbCssVars();
|
|
22
|
-
/* text */
|
|
23
|
-
@include textBuild.textCssVars();
|
|
24
|
-
|
|
25
|
-
/* shadows */
|
|
26
|
-
@include boxBuild.shadowsCssVars();
|
|
27
|
-
/* themes */
|
|
28
|
-
@include themeBuild.themeBaseVars($theme-light);
|
|
29
|
-
|
|
30
|
-
&,[data-theme="light"] {
|
|
31
|
-
@include themeBuild.themeBaseVars($theme-light);
|
|
32
|
-
|
|
33
|
-
--theme-color-border: #{color.change(map-get($theme-light, paper),$alpha:0.2)};
|
|
34
|
-
--theme-color-overlay: rgba(208, 191, 151, 0.2);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[data-theme="dark"] {
|
|
38
|
-
@include themeBuild.themeBaseVars($theme-dark);
|
|
39
|
-
|
|
40
|
-
--theme-color-border: #{color.change(map-get($theme-dark, paper),$alpha:0.2)};
|
|
41
|
-
--theme-color-overlay: rgba(255, 255, 255, 0.1);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
@use 'zindex-vars';
|
|
3
|
-
$zindex-config: zindex-vars.$zindex-config;
|
|
4
|
-
// load scss config file
|
|
5
|
-
@use '../../_utils';
|
|
6
|
-
|
|
7
|
-
// read variables
|
|
8
|
-
$z_groups: map-get($zindex-config, z_groups);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@for $z_value from 0 through 10 {
|
|
12
|
-
.zI-#{$z_value} {
|
|
13
|
-
z-index: (($z_value) * 100);
|
|
14
|
-
}
|
|
15
|
-
}
|
package/src/index.d.ts
DELETED
package/src/index.ts
DELETED
package/src/scripts/cssfabric.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import jsonConfig from "../_generated/export.variables.json" ;
|
|
2
|
-
import cssfabricClassNames from "./cssfabricClassNames";
|
|
3
|
-
|
|
4
|
-
export type IFabricConfModulePart = Record<string, any>;
|
|
5
|
-
export type IFabricConfModuleDataPart = Record<string, any>;
|
|
6
|
-
export type IFabricConfModuleMetaDataPart = Record<string, any>;
|
|
7
|
-
export type IFabricConfModuleDocsPart = Record<string, any>;
|
|
8
|
-
export type TFabricConfModuleDocsAttributesPart = Record<string, any>;
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
const getModuleList = (): Record<string, any> => {
|
|
12
|
-
return jsonConfig["cssfabric"]?.["modules"] || {};
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const getModuleConfig = (module?: string): IFabricConfModulePart => {
|
|
16
|
-
if (module) return jsonConfig["cssfabric"]?.["modules"]?.[module] || {};
|
|
17
|
-
return jsonConfig;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const getModuleData = (module?: string): IFabricConfModuleDataPart => {
|
|
21
|
-
if (module) return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_data"] || {};
|
|
22
|
-
return jsonConfig;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const getModuleMetaData = (module?: string): IFabricConfModuleMetaDataPart => {
|
|
26
|
-
if (module)
|
|
27
|
-
return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_metadata"] || {};
|
|
28
|
-
return jsonConfig;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const getModuleDocs = (module?: string): IFabricConfModuleDocsPart => {
|
|
32
|
-
if (module)
|
|
33
|
-
return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_docs"] || {};
|
|
34
|
-
return jsonConfig;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const getModuleDocsAttributes = (module?: string): TFabricConfModuleDocsAttributesPart => {
|
|
38
|
-
if (module)
|
|
39
|
-
return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_docs"]?.["attributes"] || {};
|
|
40
|
-
return jsonConfig;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
getModuleList,
|
|
45
|
-
getModuleConfig,
|
|
46
|
-
getModuleData,
|
|
47
|
-
getModuleMetaData,
|
|
48
|
-
getModuleDocs,
|
|
49
|
-
getModuleDocsAttributes,
|
|
50
|
-
getClassNames: cssfabricClassNames,
|
|
51
|
-
getModuleClassNames: cssfabricClassNames,
|
|
52
|
-
getModuleTagClassNames: cssfabricClassNames.getModuleTagClassNames,
|
|
53
|
-
getModuleTagDebug: cssfabricClassNames.getModuleTagDebug,
|
|
54
|
-
};
|