@medyll/cssfabric 0.2.0 → 0.2.3

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 (211) hide show
  1. package/.github/workflows/main.yml +33 -0
  2. package/.idea/cssfabric.iml +11 -0
  3. package/.idea/misc.xml +9 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/.vscode/settings.json +24 -0
  7. package/bin/index.js +8 -0
  8. package/cssfabric.sass.js +8 -0
  9. package/gulpfile.js +532 -0
  10. package/package.json +17 -61
  11. package/src/app.css +107 -0
  12. package/src/app.d.ts +15 -0
  13. package/src/app.html +13 -0
  14. package/src/components/Header.svelte +17 -0
  15. package/src/components/HeaderSiteTitle.svelte +12 -0
  16. package/src/components/InnerMenu.svelte +27 -0
  17. package/src/components/SubHeader.svelte +10 -0
  18. package/src/components/SubHeaderH.svelte +3 -0
  19. package/src/components/SubSubHeader.svelte +22 -0
  20. package/src/components/demo/DemoElement.svelte +86 -0
  21. package/src/components/demo/elements/DemoElementBackgroundColor.svelte +7 -0
  22. package/src/components/demo/elements/DemoElementBorder.svelte +8 -0
  23. package/src/components/demo/elements/DemoElementBorderColor.svelte +8 -0
  24. package/src/components/demo/elements/DemoElementColor.svelte +8 -0
  25. package/src/components/demo/elements/DemoElementGrid.svelte +53 -0
  26. package/src/components/demo/elements/DemoElementMargin.svelte +8 -0
  27. package/src/components/demo/elements/DemoElementPadding.svelte +10 -0
  28. package/src/components/demo/elements/DemoElementScale.svelte +9 -0
  29. package/src/components/demo/elements/DemoElementTable.svelte +34 -0
  30. package/src/components/demo/elements/DemoElementText.svelte +10 -0
  31. package/src/components/demo/proxy/ProxyDsp.svelte +12 -0
  32. package/src/components/demo/proxy/ProxyDspArray.svelte +19 -0
  33. package/src/components/demo/proxy/ProxyDspObject.svelte +17 -0
  34. package/src/components/docs/Docs.svelte +97 -0
  35. package/src/components/docs/DocsClassNames.svelte +34 -0
  36. package/src/components/docs/DocsDemo.svelte +84 -0
  37. package/src/components/header/Header.svelte +105 -0
  38. package/src/components/header/svelte-logo.svg +1 -0
  39. package/src/cssfabric/_utils.scss +203 -0
  40. package/{_generated → src/cssfabric}/index.d.ts +0 -0
  41. package/src/cssfabric/modules/_cssfabric-config.scss +173 -0
  42. package/src/cssfabric/modules/_mixins.scss +1 -0
  43. package/src/cssfabric/modules/animation/_animation-vars.scss +17 -0
  44. package/src/cssfabric/modules/animation/animation.scss +3 -0
  45. package/src/cssfabric/modules/base/_base-vars.scss +19 -0
  46. package/src/cssfabric/modules/base/base.scss +75 -0
  47. package/src/cssfabric/modules/box/_box-build.scss +304 -0
  48. package/src/cssfabric/modules/box/_box-vars.scss +121 -0
  49. package/src/cssfabric/modules/box/box-responsive.scss +18 -0
  50. package/src/cssfabric/modules/box/box.scss +3 -0
  51. package/src/cssfabric/modules/color/_color-build.scss +196 -0
  52. package/src/cssfabric/modules/color/_color-vars.scss +80 -0
  53. package/src/cssfabric/modules/color/color-responsive.scss +23 -0
  54. package/src/cssfabric/modules/color/color.scss +9 -0
  55. package/src/cssfabric/modules/css-fabric.scss +2 -0
  56. package/src/cssfabric/modules/flex/_flex-build.scss +150 -0
  57. package/src/cssfabric/modules/flex/_flex-vars.scss +84 -0
  58. package/src/cssfabric/modules/flex/flex-responsive.scss +25 -0
  59. package/src/cssfabric/modules/flex/flex.scss +3 -0
  60. package/src/cssfabric/modules/grid/_grid-build.scss +84 -0
  61. package/src/cssfabric/modules/grid/_grid-vars.scss +88 -0
  62. package/src/cssfabric/modules/grid/grid-responsive.scss +25 -0
  63. package/src/cssfabric/modules/grid/grid.scss +6 -0
  64. package/src/cssfabric/modules/menu/_menu-build.scss +120 -0
  65. package/src/cssfabric/modules/menu/_menu-vars.scss +29 -0
  66. package/src/cssfabric/modules/menu/menu-responsive.scss +19 -0
  67. package/src/cssfabric/modules/menu/menu.scss +6 -0
  68. package/src/cssfabric/modules/overflow/_overflow-build.scss +22 -0
  69. package/src/cssfabric/modules/overflow/_overflow-vars.scss +31 -0
  70. package/src/cssfabric/modules/overflow/overflow-responsive.scss +25 -0
  71. package/src/cssfabric/modules/overflow/overflow.scss +7 -0
  72. package/src/cssfabric/modules/scale/_scale-build.scss +142 -0
  73. package/src/cssfabric/modules/scale/_scale-vars.scss +84 -0
  74. package/src/cssfabric/modules/scale/scale-responsive.scss +23 -0
  75. package/src/cssfabric/modules/scale/scale.scss +8 -0
  76. package/src/cssfabric/modules/table/_table-build.scss +134 -0
  77. package/src/cssfabric/modules/table/_table-vars.scss +30 -0
  78. package/src/cssfabric/modules/table/table-responsive.scss +24 -0
  79. package/src/cssfabric/modules/table/table.scss +8 -0
  80. package/src/cssfabric/modules/text/_text-build.scss +166 -0
  81. package/src/cssfabric/modules/text/_text-vars.scss +87 -0
  82. package/src/cssfabric/modules/text/text-responsive.scss +26 -0
  83. package/src/cssfabric/modules/text/text.scss +6 -0
  84. package/src/cssfabric/modules/theme/_theme-build.scss +133 -0
  85. package/src/cssfabric/modules/theme/_theme-vars.scss +46 -0
  86. package/src/cssfabric/modules/theme/theme.scss +6 -0
  87. package/src/cssfabric/modules/vars.scss +49 -0
  88. package/src/cssfabric/modules/zindex/_zindex-vars.scss +14 -0
  89. package/src/cssfabric/modules/zindex/zindex.scss +15 -0
  90. package/src/hooks.ts +27 -0
  91. package/src/index.d.ts +3 -0
  92. package/src/index.ts +4 -0
  93. package/{_generated → src/lib/_generated}/cssFabric.vars.json +1 -1
  94. package/{_generated → src/lib/_generated}/export.variables.md +0 -0
  95. package/src/lib/_generated/index.d.ts +3 -0
  96. package/{_generated → src/lib/_generated}/readme.md +0 -0
  97. package/{init/importCssVars.js → src/lib/init/importCssVars.ts} +3 -2
  98. package/src/lib/scripts/cssfabric.ts +54 -0
  99. package/{scripts/cssfabricClassNames.js → src/lib/scripts/cssfabricClassNames.ts} +112 -42
  100. package/{scripts → src/lib/scripts}/index.d.ts +0 -0
  101. package/src/lib/scripts/index.ts +8 -0
  102. package/src/lib/scripts/utils.ts +37 -0
  103. package/{styles → src/lib/styles}/animation/animation.css +0 -0
  104. package/{styles → src/lib/styles}/animation/animation.min.css +0 -0
  105. package/{styles → src/lib/styles}/base/base.css +0 -0
  106. package/{styles → src/lib/styles}/base/base.min.css +0 -0
  107. package/{styles → src/lib/styles}/box/box.css +0 -0
  108. package/{styles → src/lib/styles}/box/box.min.css +0 -0
  109. package/{styles → src/lib/styles}/box/box.responsive.css +0 -0
  110. package/{styles → src/lib/styles}/box/box.responsive.min.css +0 -0
  111. package/{styles → src/lib/styles}/color/color.css +0 -0
  112. package/{styles → src/lib/styles}/color/color.min.css +0 -0
  113. package/{styles → src/lib/styles}/color/color.responsive.css +0 -0
  114. package/{styles → src/lib/styles}/color/color.responsive.min.css +0 -0
  115. package/src/lib/styles/cssfabric.css +129144 -0
  116. package/src/lib/styles/cssfabric.min.css +350 -0
  117. package/src/lib/styles/cssfabric.responsive.css +418463 -0
  118. package/src/lib/styles/cssfabric.responsive.min.css +225 -0
  119. package/{styles → src/lib/styles}/flex/flex.css +0 -0
  120. package/{styles → src/lib/styles}/flex/flex.min.css +0 -0
  121. package/{styles → src/lib/styles}/flex/flex.responsive.css +0 -0
  122. package/{styles → src/lib/styles}/flex/flex.responsive.min.css +0 -0
  123. package/{styles → src/lib/styles}/grid/grid.css +0 -0
  124. package/{styles → src/lib/styles}/grid/grid.min.css +0 -0
  125. package/{styles → src/lib/styles}/grid/grid.responsive.css +0 -0
  126. package/{styles → src/lib/styles}/grid/grid.responsive.min.css +0 -0
  127. package/{styles → src/lib/styles}/menu/menu.css +0 -0
  128. package/{styles → src/lib/styles}/menu/menu.min.css +0 -0
  129. package/{styles → src/lib/styles}/menu/menu.responsive.css +0 -0
  130. package/{styles → src/lib/styles}/menu/menu.responsive.min.css +0 -0
  131. package/{styles → src/lib/styles}/overflow/overflow.css +0 -0
  132. package/{styles → src/lib/styles}/overflow/overflow.min.css +0 -0
  133. package/{styles → src/lib/styles}/overflow/overflow.responsive.css +0 -0
  134. package/{styles → src/lib/styles}/overflow/overflow.responsive.min.css +0 -0
  135. package/{styles → src/lib/styles}/scale/scale.css +0 -0
  136. package/{styles → src/lib/styles}/scale/scale.min.css +0 -0
  137. package/{styles → src/lib/styles}/scale/scale.responsive.css +0 -0
  138. package/{styles → src/lib/styles}/scale/scale.responsive.min.css +0 -0
  139. package/{styles → src/lib/styles}/table/table.css +0 -0
  140. package/{styles → src/lib/styles}/table/table.min.css +0 -0
  141. package/{styles → src/lib/styles}/table/table.responsive.css +0 -0
  142. package/{styles → src/lib/styles}/table/table.responsive.min.css +0 -0
  143. package/{styles → src/lib/styles}/text/text.css +0 -0
  144. package/{styles → src/lib/styles}/text/text.min.css +0 -0
  145. package/{styles → src/lib/styles}/text/text.responsive.css +0 -0
  146. package/{styles → src/lib/styles}/text/text.responsive.min.css +0 -0
  147. package/{styles → src/lib/styles}/theme/theme.css +48 -0
  148. package/{styles → src/lib/styles}/theme/theme.min.css +1 -1
  149. package/{styles → src/lib/styles}/vars.css +1 -1
  150. package/{styles → src/lib/styles}/vars.min.css +0 -0
  151. package/{styles → src/lib/styles}/zindex/zindex.css +0 -0
  152. package/{styles → src/lib/styles}/zindex/zindex.min.css +0 -0
  153. package/src/routes/__layout.svelte +91 -0
  154. package/src/routes/cssfabric-modules/[module]/__layout.svelte +75 -0
  155. package/src/routes/cssfabric-modules/[module]/classnames/index.svelte +24 -0
  156. package/src/routes/cssfabric-modules/[module]/demo/index.svelte +24 -0
  157. package/src/routes/cssfabric-modules/[module]/docs/index.svelte +30 -0
  158. package/src/routes/cssfabric-modules/[module]/index.svelte +3 -0
  159. package/src/routes/cssfabric-modules/__layout.svelte +26 -0
  160. package/src/routes/cssfabric-modules/index.svelte +0 -0
  161. package/src/routes/index.svelte +62 -0
  162. package/src/routes/installation/__layout.svelte +1 -0
  163. package/src/routes/installation/index.svelte +28 -0
  164. package/src/scripts/utils.ts +26 -0
  165. package/src/utils.ts +71 -0
  166. package/src/vendor/index.d.ts +3 -0
  167. package/src/vendor/normalize/normalize.min.css +2 -0
  168. package/src/vendor/sass-json-export/CHANGELOG.md +26 -0
  169. package/src/vendor/sass-json-export/Gruntfile.js +60 -0
  170. package/src/vendor/sass-json-export/LICENSE +20 -0
  171. package/src/vendor/sass-json-export/README.md +90 -0
  172. package/src/vendor/sass-json-export/package.json +60 -0
  173. package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +26 -0
  174. package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +17 -0
  175. package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +9 -0
  176. package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +42 -0
  177. package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +7 -0
  178. package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +8 -0
  179. package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +14 -0
  180. package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +15 -0
  181. package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +7 -0
  182. package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +8 -0
  183. package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +8 -0
  184. package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +2 -0
  185. package/src/vendor/sass-json-export/test/encode/_index.scss +14 -0
  186. package/src/vendor/sass-json-export/test/encode/api/_json.scss +29 -0
  187. package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +6 -0
  188. package/src/vendor/sass-json-export/test/encode/types/_bool.scss +6 -0
  189. package/src/vendor/sass-json-export/test/encode/types/_color.scss +7 -0
  190. package/src/vendor/sass-json-export/test/encode/types/_list.scss +25 -0
  191. package/src/vendor/sass-json-export/test/encode/types/_map.scss +17 -0
  192. package/src/vendor/sass-json-export/test/encode/types/_null.scss +8 -0
  193. package/src/vendor/sass-json-export/test/encode/types/_number.scss +68 -0
  194. package/src/vendor/sass-json-export/test/encode/types/_string.scss +9 -0
  195. package/src/vendor/sass-json-export/test/test.scss +9 -0
  196. package/static/favicon.png +0 -0
  197. package/static/robots.txt +3 -0
  198. package/svelte.config.js +25 -0
  199. package/tsconfig.json +3 -0
  200. package/webpack.config.js +55 -0
  201. package/init/importCssVars.d.ts +0 -1
  202. package/scripts/cssfabric.d.ts +0 -24
  203. package/scripts/cssfabric.js +0 -43
  204. package/scripts/cssfabricClassNames.d.ts +0 -14
  205. package/scripts/index.js +0 -4
  206. package/scripts/utils.d.ts +0 -5
  207. package/scripts/utils.js +0 -38
  208. package/styles/cssfabric.css +0 -61792
  209. package/styles/cssfabric.min.css +0 -168
  210. package/styles/cssfabric.responsive.css +0 -200596
  211. package/styles/cssfabric.responsive.min.css +0 -108
@@ -0,0 +1,134 @@
1
+ @use 'table-vars';
2
+ @use '../../_utils';
3
+
4
+ $table-config: table-vars.$table-config;
5
+
6
+ $TABLE_PREFIX: map-get($table-config, table_class_name);
7
+ $TABLE_PREFIX_SHORT: map-get($table-config, table_class_name_short);
8
+
9
+ $table_bg_color_head: map-get($table-config, table-bg-color-head);
10
+ $table_bg_color_strip_main: map-get($table-config, table-bg-color-strip-main);
11
+ $table_bg_color_strip_second: map-get($table-config, table-bg-color-strip-second);
12
+
13
+ $table_border_color_header: map-get($table-config, table-border-color-header);
14
+ $table_border_color_main: map-get($table-config, table-border-color-main);
15
+ $table_border_color_second: map-get($table-config, table-border-color-second);
16
+
17
+ // .table-bg-strip-2
18
+ @mixin bg-strip($prefix_short,$nb_strips) {
19
+ &.#{$prefix_short}-bg-strip-#{$nb_strips} {
20
+ @for $nb_strip from 1 through $nb_strips {
21
+ tr:nth-child(#{$nb_strips}n + #{$nb_strip}) td {
22
+ @if ($nb_strip==$nb_strips) {
23
+ background-color: #{$table_bg_color_strip_main};
24
+ }
25
+
26
+ @if ($nb_strips%2==1 and $nb_strip%2==0 and $nb_strips > 2 and $nb_strip !=$nb_strips) {
27
+ // border-bottom: 10px solid black;
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ // .table-sticky
35
+ @mixin sticky($table_prefix_short) {
36
+ &.#{$table_prefix_short}-sticky {
37
+ position: relative;
38
+
39
+ thead tr,
40
+ .thead .tr {
41
+ position: static;
42
+
43
+ th,
44
+ .th {
45
+ background-color: #ededed;
46
+ position: sticky;
47
+ top: 0;
48
+ }
49
+ }
50
+ }
51
+ }
52
+ // -layout -h-line -v-line border
53
+ @mixin fabric_table($mq_size_key: null) {
54
+ /** cssfabric : #{$TABLE_PREFIX_SHORT}*/
55
+ $prefix_short: if($mq_size_key, #{$TABLE_PREFIX_SHORT}-#{$mq_size_key}, $TABLE_PREFIX_SHORT);
56
+
57
+ .#{$TABLE_PREFIX} {
58
+ border-collapse: collapse;
59
+ border-spacing: 0;
60
+
61
+ thead,
62
+ .thead {
63
+ position: relative;
64
+ margin-bottom:2rem;
65
+ }
66
+
67
+ &.#{$prefix_short}-head thead tr th {
68
+ background-color: #{table_bg_color_head};
69
+ }
70
+
71
+ thead tr th,
72
+ .thead .tr .th {
73
+ padding: 0.5rem 0.25rem;
74
+ font-weight: normal;
75
+ }
76
+
77
+ tbody tr td,
78
+ .tbody .tr .td {
79
+ padding: 0.25em;
80
+ }
81
+
82
+ &.#{$prefix_short}-layout {
83
+ table-layout: fixed;
84
+ }
85
+
86
+ &.#{$prefix_short}-h-line {
87
+
88
+ th,
89
+ td,
90
+ .th,
91
+ .td {
92
+ border-bottom: 1px solid #{$table_border_color_main};
93
+ }
94
+
95
+ &:last-child {
96
+ border-bottom: none;
97
+ }
98
+ }
99
+
100
+ &.#{$prefix_short}-v-line tr th,
101
+ &.#{$prefix_short}-v-line tr td {
102
+ border-right: 1px solid #{$table_border_color_main};
103
+
104
+ &:last-child {
105
+ border-right: none;
106
+ }
107
+ }
108
+
109
+ &.#{$prefix_short}-border {
110
+ border: 1px solid #{$table_border_color_main};
111
+ }
112
+
113
+ &.#{$prefix_short}-shad {
114
+ thead tr th {
115
+ box-shadow: 4px 4px 8px #ccc;
116
+ z-index: 11;
117
+
118
+ &:last-child {
119
+ box-shadow: 4px 4px 8px #ccc;
120
+ z-index: -1;
121
+ }
122
+ }
123
+ }
124
+
125
+ @include bg-strip($prefix_short, 2);
126
+ @include bg-strip($prefix_short, 5);
127
+
128
+ @include sticky($prefix_short);
129
+ }
130
+ }
131
+
132
+ @mixin buildTable($mq_size_key: null) {
133
+ @include fabric_table($mq_size_key);
134
+ }
@@ -0,0 +1,30 @@
1
+ $table-metadata: (
2
+ title: table,
3
+ tag: table,
4
+ description: "cssfabric table module to set different table styles"
5
+ );
6
+ $table-config: (
7
+ className: table,
8
+ classNameShort: tbl,
9
+ table_class_name: table,
10
+ table_class_name_short: tbl,
11
+ table-bg-color-head: #f4f4f4,
12
+ table-bg-color-strip-main: #ededed,
13
+ table-bg-color-strip-second: #f5f5f5,
14
+ table-border-color-header: #ccc,
15
+ table-border-color-main: #ededed,
16
+ table-border-color-second: #f5f5f5
17
+ );
18
+
19
+ $table-docs: (
20
+ attributes:(
21
+ table: (
22
+ tag: table,
23
+ classNames:(
24
+ "_": (bg-strip-2 bg-strip-5),
25
+ "_pos": (sticky layout),
26
+ "_deco": (h-line v-line border),
27
+ ),
28
+ about: "is a table"
29
+ )
30
+ ));
@@ -0,0 +1,24 @@
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
+
@@ -0,0 +1,8 @@
1
+
2
+
3
+ // load scss config file
4
+ @use '../../_utils';
5
+ @use '_table-build' as build;
6
+
7
+
8
+ @include build.buildTable(null);
@@ -0,0 +1,166 @@
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
+ }
@@ -0,0 +1,87 @@
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
+ );
@@ -0,0 +1,26 @@
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
+
@@ -0,0 +1,6 @@
1
+
2
+ @use '_text-build' as build;
3
+
4
+ @include build.buildText(null);
5
+
6
+
@@ -0,0 +1,133 @@
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
+ .theme-text-color, .theme-foreground-color {
43
+ color: var(--theme-color-text);
44
+ }
45
+
46
+ .theme-foreground-color-alpha {
47
+ color: var(--theme-color-foreground-alpha);
48
+ }
49
+ .theme-foreground-color-alpha-low {
50
+ color: var(--theme-color-foreground-alpha-low);
51
+ }
52
+ .theme-foreground-color-alpha-high {
53
+ color: var(--theme-color-foreground-alpha-high);
54
+ }
55
+
56
+ .theme-bg{
57
+ background-color: var(--theme-color-background);
58
+ }
59
+ .theme-bg-alpha{
60
+ background-color: var(--theme-color-background-alpha);
61
+ }
62
+ .theme-bg-alpha-low{
63
+ background-color: var(--theme-color-background-alpha-low);
64
+ }
65
+ .theme-bg-alpha-high{
66
+ background-color: var(--theme-color-background-alpha-high);
67
+ }
68
+
69
+ .theme-bg-paper{
70
+ background-color: var(--theme-color-paper);
71
+ }
72
+
73
+ .theme-bg-paper-alpha{
74
+ background-color: var(--theme-color-paper-alpha);
75
+ }
76
+
77
+ .theme-bg-paper-alpha-low{
78
+ background-color: var(--theme-color-paper-alpha-low);
79
+ }
80
+
81
+ .theme-bg-paper-alpha-high{
82
+ background-color: var(--theme-color-paper-alpha-high);
83
+ }
84
+
85
+ }
86
+
87
+ @mixin themeBaseVars($theme:$theme-light) {
88
+ /* theme base colors*/
89
+ --theme-color-text: #{map-get($theme, foreground)};
90
+ --theme-color-foreground: #{map-get($theme, foreground)};
91
+ @include utils.alphaTize(--theme-color-foreground, map-get($theme, foreground));
92
+ --theme-color-background: #{map-get($theme, background)};
93
+ @include utils.alphaTize(--theme-color-background, map-get($theme, foreground));
94
+ --theme-color-paper: #{map-get($theme-light, paper)};
95
+ @include utils.alphaTize(--theme-color-paper, map-get($theme, paper));
96
+ }
97
+
98
+
99
+ @mixin themeCssVars($theme-color-primary,$theme-color-secondary,$theme-color-tertiary) {
100
+
101
+ /* theme primary colors*/
102
+ --theme-color-primary: #{$theme-color-primary};
103
+ @each $theme-level in $theme-levels {
104
+ --theme-color-primary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-primary)};
105
+ }
106
+
107
+ --theme-color-primary-alpha-low: #{color.change($theme-color-primary,$alpha:0.8)};
108
+ --theme-color-primary-alpha: #{color.change($theme-color-primary,$alpha:0.3)};
109
+ --theme-color-primary-alpha-high: #{color.change($theme-color-primary,$alpha:0.1)};
110
+
111
+ /* theme secondary colors*/
112
+ --theme-color-secondary: #{$theme-color-secondary};
113
+ @each $theme-level in $theme-levels {
114
+ --theme-color-secondary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-secondary)};
115
+ }
116
+ --theme-color-secondary-alpha-low: #{color.change($theme-color-secondary,$alpha:0.8)};
117
+ --theme-color-secondary-alpha: #{color.change($theme-color-secondary,$alpha:0.3)};
118
+ --theme-color-secondary-alpha-high: #{color.change($theme-color-secondary,$alpha:0.1)};
119
+
120
+ /* theme tertiary colors*/
121
+ --theme-color-tertiary: #{$theme-color-tertiary};
122
+ @each $theme-level in $theme-levels {
123
+ --theme-color-tertiary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-tertiary)};
124
+ }
125
+ --theme-color-tertiary-alpha-low: #{color.change($theme-color-tertiary,$alpha:0.8)};
126
+ --theme-color-tertiary-alpha: #{color.change($theme-color-tertiary,$alpha:0.3)};
127
+ --theme-color-tertiary-alpha-high: #{color.change($theme-color-tertiary,$alpha:0.1)};
128
+ }
129
+
130
+ @mixin buildTheme($mq_size_key: null) {
131
+
132
+ @include fabric_theme($mq_size_key);
133
+ }
@@ -0,0 +1,46 @@
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
+ ));
@@ -0,0 +1,6 @@
1
+
2
+ @use '_theme-build' as build;
3
+
4
+ @include build.buildTheme(null);
5
+
6
+