@medyll/cssfabric 0.1.12 → 0.2.2
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/.github/workflows/main.yml +33 -0
- package/.idea/cssfabric.iml +4 -1
- package/README.md +38 -240
- package/bin/index.js +2 -1
- package/{cssfabric.json → cssfabric.sass.js} +3 -3
- package/gulpfile.js +77 -143
- package/package.json +69 -69
- package/src/app.css +107 -0
- package/src/app.d.ts +15 -0
- package/src/app.html +13 -0
- package/src/components/Header.svelte +17 -0
- package/src/components/HeaderSiteTitle.svelte +12 -0
- package/src/components/InnerMenu.svelte +27 -0
- package/src/components/SubHeader.svelte +10 -0
- package/src/components/SubHeaderH.svelte +3 -0
- package/src/components/SubSubHeader.svelte +22 -0
- package/src/components/demo/DemoElement.svelte +86 -0
- package/src/components/demo/elements/DemoElementBackgroundColor.svelte +7 -0
- package/src/components/demo/elements/DemoElementBorder.svelte +8 -0
- package/src/components/demo/elements/DemoElementBorderColor.svelte +8 -0
- package/src/components/demo/elements/DemoElementColor.svelte +8 -0
- package/src/components/demo/elements/DemoElementGrid.svelte +53 -0
- package/src/components/demo/elements/DemoElementMargin.svelte +8 -0
- package/src/components/demo/elements/DemoElementPadding.svelte +10 -0
- package/src/components/demo/elements/DemoElementScale.svelte +9 -0
- package/src/components/demo/elements/DemoElementTable.svelte +34 -0
- package/src/components/demo/elements/DemoElementText.svelte +10 -0
- package/src/components/demo/proxy/ProxyDsp.svelte +12 -0
- package/src/components/demo/proxy/ProxyDspArray.svelte +19 -0
- package/src/components/demo/proxy/ProxyDspObject.svelte +17 -0
- package/src/components/docs/Docs.svelte +97 -0
- package/src/components/docs/DocsClassNames.svelte +34 -0
- package/src/components/docs/DocsDemo.svelte +84 -0
- package/src/components/header/Header.svelte +105 -0
- package/src/components/header/svelte-logo.svg +1 -0
- package/src/cssfabric/modules/_cssfabric-config.scss +15 -5
- package/src/cssfabric/modules/base/base.scss +1 -6
- package/src/cssfabric/modules/box/_box-build.scss +20 -3
- package/src/cssfabric/modules/box/_box-vars.scss +1 -1
- package/src/cssfabric/modules/css-fabric.scss +1 -1
- package/src/cssfabric/modules/menu/_menu-build.scss +9 -8
- package/src/cssfabric/modules/vars.scss +3 -2
- package/src/hooks.ts +27 -0
- package/src/index.ts +1 -1
- package/src/lib/_generated/cssFabric.vars.json +13 -0
- package/src/{_generated → lib/_generated}/export.variables.md +0 -0
- package/src/{_generated → lib/_generated}/index.d.ts +0 -0
- package/src/{_generated → lib/_generated}/readme.md +0 -0
- package/src/lib/init/importCssVars.ts +3 -0
- package/src/{scripts → lib/scripts}/cssfabric.ts +1 -1
- package/src/{scripts → lib/scripts}/cssfabricClassNames.ts +0 -0
- package/src/{scripts → lib/scripts}/index.d.ts +0 -0
- package/src/{scripts → lib/scripts}/index.ts +0 -0
- package/src/lib/scripts/utils.ts +37 -0
- package/{lib/styles/core → src/lib/styles}/animation/animation.css +0 -0
- package/{lib/styles/core → src/lib/styles}/animation/animation.min.css +0 -0
- package/{lib/styles/core → src/lib/styles}/base/base.css +0 -7
- package/src/lib/styles/base/base.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/box/box.css +127 -111
- package/src/lib/styles/box/box.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/box/box.responsive.css +508 -444
- package/src/lib/styles/box/box.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/color/color.css +0 -0
- package/src/lib/styles/color/color.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/color/color.responsive.css +0 -0
- package/src/lib/styles/color/color.responsive.min.css +1 -0
- package/src/lib/styles/cssfabric.css +61792 -0
- package/src/lib/styles/cssfabric.min.css +168 -0
- package/src/lib/styles/cssfabric.responsive.css +200596 -0
- package/src/lib/styles/cssfabric.responsive.min.css +108 -0
- package/{lib/styles/core → src/lib/styles}/flex/flex.css +0 -0
- package/src/lib/styles/flex/flex.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/flex/flex.responsive.css +0 -0
- package/src/lib/styles/flex/flex.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/grid/grid.css +0 -0
- package/src/lib/styles/grid/grid.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/grid/grid.responsive.css +0 -0
- package/src/lib/styles/grid/grid.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/menu/menu.css +16 -12
- package/src/lib/styles/menu/menu.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/menu/menu.responsive.css +64 -48
- package/src/lib/styles/menu/menu.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/overflow/overflow.css +0 -0
- package/{lib/styles/core → src/lib/styles}/overflow/overflow.min.css +0 -0
- package/{lib/styles/core → src/lib/styles}/overflow/overflow.responsive.css +0 -0
- package/src/lib/styles/overflow/overflow.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/scale/scale.css +0 -0
- package/{lib/styles/core → src/lib/styles}/scale/scale.min.css +0 -0
- package/{lib/styles/core → src/lib/styles}/scale/scale.responsive.css +0 -0
- package/src/lib/styles/scale/scale.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/table/table.css +0 -0
- package/src/lib/styles/table/table.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/table/table.responsive.css +0 -0
- package/src/lib/styles/table/table.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/text/text.css +0 -0
- package/src/lib/styles/text/text.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/text/text.responsive.css +0 -0
- package/src/lib/styles/text/text.responsive.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/theme/theme.css +0 -0
- package/{lib/styles/core → src/lib/styles}/theme/theme.min.css +0 -0
- package/{lib/styles/core → src/lib/styles}/vars.css +6 -2
- package/src/lib/styles/vars.min.css +1 -0
- package/{lib/styles/core → src/lib/styles}/zindex/zindex.css +0 -0
- package/{lib/styles/core → src/lib/styles}/zindex/zindex.min.css +0 -0
- package/src/routes/__layout.svelte +91 -0
- package/src/routes/cssfabric-modules/[module]/__layout.svelte +75 -0
- package/src/routes/cssfabric-modules/[module]/classnames/index.svelte +24 -0
- package/src/routes/cssfabric-modules/[module]/demo/index.svelte +24 -0
- package/src/routes/cssfabric-modules/[module]/docs/index.svelte +30 -0
- package/src/routes/cssfabric-modules/[module]/index.svelte +3 -0
- package/src/routes/cssfabric-modules/__layout.svelte +26 -0
- package/src/routes/cssfabric-modules/index.svelte +0 -0
- package/src/routes/index.svelte +62 -0
- package/src/routes/installation/__layout.svelte +1 -0
- package/src/routes/installation/index.svelte +28 -0
- package/src/scripts/utils.ts +26 -37
- package/src/utils.ts +71 -0
- package/static/favicon.png +0 -0
- package/static/robots.txt +3 -0
- package/svelte.config.js +25 -0
- package/tsconfig.json +3 -46
- package/cssfabric.config.js +0 -3
- 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.d.ts +0 -24
- package/lib/scripts/cssfabric.js +0 -48
- package/lib/scripts/cssfabricClassNames.d.ts +0 -14
- package/lib/scripts/cssfabricClassNames.js +0 -150
- package/lib/scripts/index.d.ts +0 -2
- package/lib/scripts/index.js +0 -6
- package/lib/scripts/utils.d.ts +0 -5
- package/lib/scripts/utils.js +0 -40
- 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
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import logo from './svelte-logo.svg';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<header>
|
|
6
|
+
<div class="corner">
|
|
7
|
+
<a href="https://kit.svelte.dev">
|
|
8
|
+
<img src={logo} alt="SvelteKit" />
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<nav>
|
|
13
|
+
</nav>
|
|
14
|
+
|
|
15
|
+
</header>
|
|
16
|
+
|
|
17
|
+
<style>
|
|
18
|
+
header {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.corner {
|
|
24
|
+
width: 3em;
|
|
25
|
+
height: 3em;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.corner a {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.corner img {
|
|
37
|
+
width: 2em;
|
|
38
|
+
height: 2em;
|
|
39
|
+
object-fit: contain;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
nav {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
--background: rgba(255, 255, 255, 0.7);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
svg {
|
|
49
|
+
width: 2em;
|
|
50
|
+
height: 3em;
|
|
51
|
+
display: block;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
path {
|
|
55
|
+
fill: var(--background);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
ul {
|
|
59
|
+
position: relative;
|
|
60
|
+
padding: 0;
|
|
61
|
+
margin: 0;
|
|
62
|
+
height: 3em;
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
list-style: none;
|
|
67
|
+
background: var(--background);
|
|
68
|
+
background-size: contain;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
li {
|
|
72
|
+
position: relative;
|
|
73
|
+
height: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
li.active::before {
|
|
77
|
+
--size: 6px;
|
|
78
|
+
content: '';
|
|
79
|
+
width: 0;
|
|
80
|
+
height: 0;
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: calc(50% - var(--size));
|
|
84
|
+
border: var(--size) solid transparent;
|
|
85
|
+
border-top: var(--size) solid var(--accent-color);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
nav a {
|
|
89
|
+
display: flex;
|
|
90
|
+
height: 100%;
|
|
91
|
+
align-items: center;
|
|
92
|
+
padding: 0 1em;
|
|
93
|
+
color: var(--heading-color);
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
font-size: 0.8rem;
|
|
96
|
+
text-transform: uppercase;
|
|
97
|
+
letter-spacing: 0.1em;
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
transition: color 0.2s linear;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
a:hover {
|
|
103
|
+
color: var(--accent-color);
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.1566,22.8189c-10.4-14.8851-30.94-19.2971-45.7914-9.8348L22.2825,29.6078A29.9234,29.9234,0,0,0,8.7639,49.6506a31.5136,31.5136,0,0,0,3.1076,20.2318A30.0061,30.0061,0,0,0,7.3953,81.0653a31.8886,31.8886,0,0,0,5.4473,24.1157c10.4022,14.8865,30.9423,19.2966,45.7914,9.8348L84.7167,98.3921A29.9177,29.9177,0,0,0,98.2353,78.3493,31.5263,31.5263,0,0,0,95.13,58.117a30,30,0,0,0,4.4743-11.1824,31.88,31.88,0,0,0-5.4473-24.1157" style="fill:#ff3e00"/><path d="M45.8171,106.5815A20.7182,20.7182,0,0,1,23.58,98.3389a19.1739,19.1739,0,0,1-3.2766-14.5025,18.1886,18.1886,0,0,1,.6233-2.4357l.4912-1.4978,1.3363.9815a33.6443,33.6443,0,0,0,10.203,5.0978l.9694.2941-.0893.9675a5.8474,5.8474,0,0,0,1.052,3.8781,6.2389,6.2389,0,0,0,6.6952,2.485,5.7449,5.7449,0,0,0,1.6021-.7041L69.27,76.281a5.4306,5.4306,0,0,0,2.4506-3.631,5.7948,5.7948,0,0,0-.9875-4.3712,6.2436,6.2436,0,0,0-6.6978-2.4864,5.7427,5.7427,0,0,0-1.6.7036l-9.9532,6.3449a19.0329,19.0329,0,0,1-5.2965,2.3259,20.7181,20.7181,0,0,1-22.2368-8.2427,19.1725,19.1725,0,0,1-3.2766-14.5024,17.9885,17.9885,0,0,1,8.13-12.0513L55.8833,23.7472a19.0038,19.0038,0,0,1,5.3-2.3287A20.7182,20.7182,0,0,1,83.42,29.6611a19.1739,19.1739,0,0,1,3.2766,14.5025,18.4,18.4,0,0,1-.6233,2.4357l-.4912,1.4978-1.3356-.98a33.6175,33.6175,0,0,0-10.2037-5.1l-.9694-.2942.0893-.9675a5.8588,5.8588,0,0,0-1.052-3.878,6.2389,6.2389,0,0,0-6.6952-2.485,5.7449,5.7449,0,0,0-1.6021.7041L37.73,51.719a5.4218,5.4218,0,0,0-2.4487,3.63,5.7862,5.7862,0,0,0,.9856,4.3717,6.2437,6.2437,0,0,0,6.6978,2.4864,5.7652,5.7652,0,0,0,1.602-.7041l9.9519-6.3425a18.978,18.978,0,0,1,5.2959-2.3278,20.7181,20.7181,0,0,1,22.2368,8.2427,19.1725,19.1725,0,0,1,3.2766,14.5024,17.9977,17.9977,0,0,1-8.13,12.0532L51.1167,104.2528a19.0038,19.0038,0,0,1-5.3,2.3287" style="fill:#fff"/></svg>
|
|
@@ -35,18 +35,24 @@ $has-color-bg: true;
|
|
|
35
35
|
$has-color-bg-themed: true;
|
|
36
36
|
$has-color-border: true;
|
|
37
37
|
|
|
38
|
+
|
|
38
39
|
$theme-color-primary: rgb(32, 23, 0) !default;
|
|
39
40
|
$theme-color-secondary: #D14B02 !default;
|
|
40
41
|
$theme-color-tertiary: #88D102 !default;
|
|
41
|
-
|
|
42
|
+
//light theme
|
|
42
43
|
$theme-color-foreground: #282230 !default;
|
|
43
44
|
$theme-color-background: #ffffff !default;
|
|
44
45
|
$theme-color-paper: #f1f1f1 !default;
|
|
45
46
|
|
|
47
|
+
$theme-color-shadow: green !default;
|
|
48
|
+
// dark theme
|
|
46
49
|
$theme-dark-color-foreground: #f1f1f1 !default;
|
|
47
50
|
$theme-dark-color-background: #27323a !default;
|
|
48
51
|
$theme-dark-color-paper: #3a3b3b !default;
|
|
49
52
|
|
|
53
|
+
$theme-dark-color-shadow: black !default;
|
|
54
|
+
|
|
55
|
+
// grays
|
|
50
56
|
$gray-start: #f4f4f4 !default;
|
|
51
57
|
$gray-end: #999 !default;
|
|
52
58
|
$gray-steps: 5 !default;
|
|
@@ -59,12 +65,13 @@ $box-shadow-shorthand: shad !default;
|
|
|
59
65
|
$box-border-shorthand: border !default;
|
|
60
66
|
$box-padding-shorthand: pad !default;
|
|
61
67
|
$box-margin-shorthand: marg !default;
|
|
68
|
+
$box-gap-shorthand: gap !default;
|
|
62
69
|
|
|
63
70
|
$box-unit-presets: (tiny:0.5, small:1, medium:3, large:4) !default;
|
|
64
71
|
$box-radius: (tiny:4px, small:8px, medium:16px) !default;
|
|
65
72
|
|
|
66
|
-
$scale-tag-width-shorthand: w!default;
|
|
67
|
-
$scale-tag-height-shorthand: h!default
|
|
73
|
+
$scale-tag-width-shorthand: w !default;
|
|
74
|
+
$scale-tag-height-shorthand: h !default;
|
|
68
75
|
|
|
69
76
|
$cssfabric-metadata: (
|
|
70
77
|
title: "cssfabric",
|
|
@@ -73,8 +80,11 @@ $cssfabric-metadata: (
|
|
|
73
80
|
);
|
|
74
81
|
|
|
75
82
|
// vars
|
|
76
|
-
$vars-box-density: --box-density!default;
|
|
77
|
-
$vars-box-density-preset: --box-density-preset!default;
|
|
83
|
+
$vars-box-density: --box-density !default;
|
|
84
|
+
$vars-box-density-preset: --box-density-preset !default;
|
|
85
|
+
|
|
86
|
+
$vars-theme-color-shadow: --theme-color-shadow !default;
|
|
87
|
+
$vars-theme-dark-color-shadow: --theme-dark-color-shadow !default;
|
|
78
88
|
|
|
79
89
|
$cssfabric-config: (
|
|
80
90
|
cfg-has-dimension-strict: true,
|
|
@@ -27,6 +27,8 @@ $box-border-shorthand-config: cssfabric-config.$box-border-shorthand !default;
|
|
|
27
27
|
$box-padding-shorthand-config: cssfabric-config.$box-padding-shorthand !default;
|
|
28
28
|
$box-margin-shorthand-config: cssfabric-config.$box-margin-shorthand !default;
|
|
29
29
|
|
|
30
|
+
$box-gap-shorthand: cssfabric-config.$box-gap-shorthand !default;
|
|
31
|
+
|
|
30
32
|
$box-shadows-steps: box.$box-shadows-steps !default;
|
|
31
33
|
$box-shadows-step-multiplier: box.$box-shadows-step-multiplier !default;
|
|
32
34
|
|
|
@@ -59,6 +61,11 @@ $densities-ratios : cssfabric-config.$densities-ratios;
|
|
|
59
61
|
--box-density-preset-#{$preset}: #{$value};
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
// radius
|
|
65
|
+
@each $radius, $value in $box-radius{
|
|
66
|
+
--radius-#{$radius}: #{$value};
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
// $ratios: tiny small medium large full
|
|
63
70
|
@each $ratio, $val in $densities-ratios {
|
|
64
71
|
[density=#{$ratio}] {
|
|
@@ -88,7 +95,7 @@ $densities-ratios : cssfabric-config.$densities-ratios;
|
|
|
88
95
|
$css_size_value: ($grid_size_value * $box-unit-border-size-config) + $box-border-unit-config;
|
|
89
96
|
// css property name is aggregated with size value $i
|
|
90
97
|
|
|
91
|
-
$computed_value: $css_size_value + " solid
|
|
98
|
+
$computed_value: $css_size_value + " solid var(--theme-color-border)";
|
|
92
99
|
|
|
93
100
|
#{raw_size_tag_rule($grid_size_value)} &-#{$grid_size_value} {
|
|
94
101
|
@if length($rule) == 4 {
|
|
@@ -116,7 +123,7 @@ $densities-ratios : cssfabric-config.$densities-ratios;
|
|
|
116
123
|
// presets
|
|
117
124
|
@each $preset, $preset-value in $box-unit-presets{
|
|
118
125
|
.#{$fabric_box_position_prop_short}#{$shorthand}-#{$preset}{
|
|
119
|
-
#{$fabric_box_position_prop}: --box-density-preset-#{$preset};
|
|
126
|
+
#{$fabric_box_position_prop}: var(--box-density-preset-#{$preset});
|
|
120
127
|
}
|
|
121
128
|
}
|
|
122
129
|
|
|
@@ -140,6 +147,15 @@ $densities-ratios : cssfabric-config.$densities-ratios;
|
|
|
140
147
|
}
|
|
141
148
|
}
|
|
142
149
|
|
|
150
|
+
@mixin box-gap($mq_key) {
|
|
151
|
+
$shorthand: if($mq_key, #{$box-gap-shorthand}-#{$mq_key}, #{$box-gap-shorthand});
|
|
152
|
+
// presets
|
|
153
|
+
@each $preset, $preset-value in $box-unit-presets{
|
|
154
|
+
.#{$shorthand}-#{$preset}{
|
|
155
|
+
#{$shorthand}: var(--box-density-preset-#{$preset});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
143
159
|
// pmb as padding margin border property
|
|
144
160
|
// padding-tiny padding-small padding
|
|
145
161
|
@mixin padding-margin-border($mq_key) {
|
|
@@ -236,7 +252,7 @@ $densities-ratios : cssfabric-config.$densities-ratios;
|
|
|
236
252
|
}
|
|
237
253
|
}
|
|
238
254
|
|
|
239
|
-
@function buildShadowsValues($shadows_step:0) {
|
|
255
|
+
@function buildShadowsValues($shadows_step:0,$shadow-color: null) {
|
|
240
256
|
$v_fact: 2.4;
|
|
241
257
|
$h_fact: 1.16;
|
|
242
258
|
|
|
@@ -284,4 +300,5 @@ $densities-ratios : cssfabric-config.$densities-ratios;
|
|
|
284
300
|
@include placement($mq_key);
|
|
285
301
|
@include radius($mq_key);
|
|
286
302
|
@include shadows($mq_key);
|
|
303
|
+
@include box-gap($mq_key);
|
|
287
304
|
}
|
|
@@ -87,7 +87,6 @@ $box-config: (
|
|
|
87
87
|
)
|
|
88
88
|
);
|
|
89
89
|
|
|
90
|
-
|
|
91
90
|
$box-docs: (
|
|
92
91
|
attributes:(
|
|
93
92
|
padding: (
|
|
@@ -111,6 +110,7 @@ $box-docs: (
|
|
|
111
110
|
levels: ("_":utils.getObjectKeys(utils.getBoxIterator($box-sizes-border-config, $box-border-unit-config, $box-unit-border-size-config))),
|
|
112
111
|
about: "border properties for html elements"
|
|
113
112
|
),
|
|
113
|
+
radius : (tag: radiusGuy),
|
|
114
114
|
shadow: (
|
|
115
115
|
tag: cssfabric-config.$box-shadow-shorthand,
|
|
116
116
|
values: utils.getShadowIterator($shadow-factors, $box-shadows-steps),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@use '../../../src/vendor/normalize/normalize.min.css';
|
|
2
|
-
|
|
2
|
+
// old name css-fabric.scss
|
|
@@ -32,25 +32,26 @@ $menu_dropdown_close: map-get($menu-config, menu_dropdown_close);
|
|
|
32
32
|
&-#{$orientation_key} {
|
|
33
33
|
padding: 0;
|
|
34
34
|
margin: 0;
|
|
35
|
-
line-height:
|
|
35
|
+
line-height: var(--box-density-2);
|
|
36
36
|
|
|
37
37
|
& li.#{$menu_item_class_name},
|
|
38
38
|
li {
|
|
39
39
|
display: block;
|
|
40
|
-
margin: 0
|
|
40
|
+
margin: 0;
|
|
41
41
|
width: auto;
|
|
42
42
|
transition-property: all;
|
|
43
|
-
transition-duration: 0.
|
|
44
|
-
padding:
|
|
43
|
+
transition-duration: 0.15s;
|
|
44
|
+
padding: var(--box-density-1);
|
|
45
|
+
border-left: 1px solid var( --theme-color-border );
|
|
45
46
|
|
|
46
47
|
&:hover {
|
|
47
|
-
border-radius:
|
|
48
|
+
border-radius: var(--radius-small);
|
|
48
49
|
background-color: #ededed;
|
|
49
|
-
|
|
50
|
+
border-left: 1px solid var(--theme-color-primary);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
&.active {
|
|
53
|
-
border-radius:
|
|
54
|
+
border-radius: var(--radius-small);
|
|
54
55
|
background-color: #ededed;
|
|
55
56
|
font-weight: bold;
|
|
56
57
|
}
|
|
@@ -76,6 +77,7 @@ $menu_dropdown_close: map-get($menu-config, menu_dropdown_close);
|
|
|
76
77
|
|
|
77
78
|
}
|
|
78
79
|
}
|
|
80
|
+
|
|
79
81
|
&-h {
|
|
80
82
|
max-width: 100%;
|
|
81
83
|
display: inline-flex;
|
|
@@ -98,7 +100,6 @@ $menu_dropdown_close: map-get($menu-config, menu_dropdown_close);
|
|
|
98
100
|
$menu-border-color: red;
|
|
99
101
|
|
|
100
102
|
|
|
101
|
-
|
|
102
103
|
/* & li.#{$menu_item_class_name}{
|
|
103
104
|
dsp: none;
|
|
104
105
|
}
|
|
@@ -27,17 +27,18 @@ $theme-dark: map-get($themes, dark) !default;
|
|
|
27
27
|
/* themes */
|
|
28
28
|
@include themeBuild.themeBaseVars($theme-light);
|
|
29
29
|
|
|
30
|
+
--theme-color-border: #{color.change($theme-color-foreground,$alpha:0.2)};
|
|
30
31
|
&,[data-theme="light"] {
|
|
31
32
|
@include themeBuild.themeBaseVars($theme-light);
|
|
32
33
|
|
|
33
|
-
--theme-color-border:
|
|
34
|
+
--theme-color-border: #{color.change($theme-color-foreground,$alpha:0.2)};
|
|
34
35
|
--theme-color-overlay: rgba(208, 191, 151, 0.2);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
[data-theme="dark"] {
|
|
38
39
|
@include themeBuild.themeBaseVars($theme-dark);
|
|
39
40
|
|
|
40
|
-
--theme-color-border: #{color.change(
|
|
41
|
+
--theme-color-border: #{color.change($theme-dark-color-foreground,$alpha:0.3)};
|
|
41
42
|
--theme-color-overlay: rgba(255, 255, 255, 0.1);
|
|
42
43
|
}
|
|
43
44
|
}
|
package/src/hooks.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import cookie from 'cookie';
|
|
2
|
+
import {v4 as uuid} from '@lukeed/uuid';
|
|
3
|
+
import type {Handle} from '@sveltejs/kit';
|
|
4
|
+
|
|
5
|
+
export const handle: Handle = async ({event, resolve}) => {
|
|
6
|
+
const cookies = cookie.parse(event.request.headers.get('cookie') || '');
|
|
7
|
+
event.locals.userid = cookies.userid || uuid();
|
|
8
|
+
|
|
9
|
+
const response = await resolve(event, {
|
|
10
|
+
ssr : false,
|
|
11
|
+
transformPage: ({html}) => html.replace('old', 'new')
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
if (!cookies.userid) {
|
|
15
|
+
// if this is the first time the user has visited this app,
|
|
16
|
+
// set a cookie so that we recognise them when they return
|
|
17
|
+
response.headers.set(
|
|
18
|
+
'set-cookie',
|
|
19
|
+
cookie.serialize('userid', event.locals.userid, {
|
|
20
|
+
path : '/',
|
|
21
|
+
httpOnly: true
|
|
22
|
+
})
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return response;
|
|
27
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{"cssfabric":{"modules":{"animation":{"_data": {"attention_props": [], "in_out_props": {"back": []}}, "_metadata": {"title": "animation", "description": "cssfabric simplest animation module"}, "_docs": {"attention_props": "", "in_out_props": ""}},
|
|
2
|
+
"box":{"_data": {"unit-config": "rem", "border-unit-config": "px", "unit-size-config": 0.5, "unit-border-size-config": 1, "sizes-config": 12, "border-sizes-px-config": 3, "shadows-steps": 5, "shadows_step_multiplier": 2, "position-shorthand-config": "pos", "display-shorthand-config": "dsp", "shadow-shorthand-config": "shad", "border-shorthand-config": "border", "padding-shorthand-config": "pad", "margin-shorthand-config": "marg", "cssProps": {"borderShorthands": {"_": ["top", "bottom", "left", "right"], "t": "top", "b": "bottom", "l": "left", "r": "right", "all": ["top", "bottom", "left", "right"], "u": ["bottom", "left", "right"], "ii": ["left", "right"], "tb": ["top", "bottom"]}, "positionProps": {"abs": "absolute", "rel": "relative", "stat": "static", "fix": "fixed", "sticky": "sticky"}, "displayProps": {"block": "block", "none": "none", "inline": "inline", "block-inline": "inline-block", "flex-inline": "inline-flex", "tbl": "table", "tbl-row": "table-row", "tbl-cell": "table-cell", "tbl-column": "table-column"}}}, "_metadata": {"title": "box", "tag": "box", "description": "cssfabric box module to set heights, paddings, margins and shadows on all html elements"}, "_docs": {"attributes": {"padding": {"tag": "pad", "keys": ["_", "t", "b", "l", "r", "all", "u", "ii", "tb"], "values": {"_": "_", "1": "0.5rem", "2": "1rem", "3": "1.5rem", "4": "2rem", "5": "2.5rem", "6": "3rem", "7": "3.5rem", "8": "4rem", "9": "4.5rem", "10": "5rem", "11": "5.5rem", "12": "6rem"}, "levels": {"_": ["_", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]}, "about": "padding properties for html elements"}, "margin": {"tag": "marg", "keys": ["_", "t", "b", "l", "r", "all", "u", "ii", "tb"], "values": {"_": "_", "1": "0.5rem", "2": "1rem", "3": "1.5rem", "4": "2rem", "5": "2.5rem", "6": "3rem", "7": "3.5rem", "8": "4rem", "9": "4.5rem", "10": "5rem", "11": "5.5rem", "12": "6rem"}, "levels": {"_": ["_", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]}, "about": "margin properties for html elements"}, "border": {"tag": "border", "keys": ["_", "t", "b", "l", "r", "all", "u", "ii", "tb"], "values": {"_": "_", "1": "1px", "2": "2px", "3": "3px"}, "levels": {"_": ["_", 1, 2, 3]}, "about": "border properties for html elements"}, "radius": {"tag": "radiusGuy"}, "shadow": {"tag": "shad", "values": {"2": "0.83333333331.724137931", "4": "1.66666666673.4482758621", "8": "3.33333333336.8965517241", "16": "6.666666666713.7931034483", "32": "13.333333333327.5862068966"}, "levels": {"_": [2, 4, 8, 16, 32]}, "about": "applying shadows give depth and levels to your design"}}}},
|
|
3
|
+
"base":{"_data": {"cfg-has-dimension-strict": true, "CFG_HAS_DIMENSION_MIN": true, "CFG_HAS_DIMENSION_MAX": true, "size_step": "0.5rem", "sizes": {"tiny": 32, "small": 64, "medium": 128, "large": 256, "full": "100%"}}, "_metadata": {"title": "base", "tag": "base", "description": "cssfabric base config variables"}, "_docs": []},
|
|
4
|
+
"color":{"_data": {"gray-config": {"start": "#f4f4f4", "end": "#999", "steps": 5}, "color-types-config": ["color", "bg", "bg-themed", "border-color"], "theme": {"primary": "#201700", "secondary": "#D14B02", "tertiary": "#88D102", "foreground": "#282230", "background": "#ffffff", "paper": "#f1f1f1"}, "scheme": {"discrete": "#ccc", "success": "green", "info": "#FFDD57FF", "warning": "#e6b905", "alert": "#ff7300", "error": "red"}, "palette": {"yellow": "#ffb900", "orange": "#d83b01", "red": "#d13438", "magenta": "#b4009e", "purple": "#5c2d91", "green": "#107c10", "teal": "#008272", "blue": "#0078d4", "dark": "#323232"}, "gray": "getGraySteps(5, #f4f4f4, #999)"}, "_metadata": {"title": "color", "title_tag": "its about colors", "description": "cssfabric color system: its about colors"}, "_docs": {"attributes": {"color": {"tag": "color", "keys": ["scheme", "palette", "gray"], "levelsLinked": {"scheme": ["discrete", "success", "info", "warning", "alert", "error"], "palette": ["yellow", "orange", "red", "magenta", "purple", "green", "teal", "blue", "dark"], "gray": ["getGraySteps(5, #f4f4f4, #999)"]}, "levelsDeclin": {"palette": ["_", "lighter", "light", "dark", "darker", "complement"]}, "about": "color for text level html elements"}, "background-color": {"tag": "bg", "keys": ["scheme", "palette", "gray"], "levelsLinked": {"scheme": ["discrete", "success", "info", "warning", "alert", "error"], "palette": ["yellow", "orange", "red", "magenta", "purple", "green", "teal", "blue", "dark"], "gray": ["getGraySteps(5, #f4f4f4, #999)"]}, "levelsDeclin": {"palette": ["_", "lighter", "light", "dark", "darker", "complement"]}, "about": "background colors"}, "background-themed": {"tag": "bg-themed", "keys": ["scheme", "palette", "gray"], "levelsLinked": {"gray": ["getGraySteps(5, #f4f4f4, #999)"], "scheme": ["discrete", "success", "info", "warning", "alert", "error"], "palette": ["yellow", "orange", "red", "magenta", "purple", "green", "teal", "blue", "dark"]}, "levelsDeclin": {"palette": ["_", "lighter", "light", "dark", "darker", "complement"]}, "about": "same as background-color, but with added contrasted color to text"}, "border-color": {"tag": "border-color", "keys": ["palette", "gray"], "levelsLinked": {"gray": ["getGraySteps(5, #f4f4f4, #999)"], "scheme": ["discrete", "success", "info", "warning", "alert", "error"], "palette": ["yellow", "orange", "red", "magenta", "purple", "green", "teal", "blue", "dark"]}, "about": "border colors are slightly darker to maximize surrounding effect"}}}},
|
|
5
|
+
"flex":{"_data": {"moduleName": "flex", "moduleNameShort": "flex", "horCode": "h", "vertCode": "v", "gridFullWidth": "main", "grow-shrink-steps": 2, "cssProps": {"flexWrap": {"wrap": "wrap", "wrap-reverse": "wrap-reverse"}, "grid-justify": {"start": "flex-start", "end": "flex-end", "between": "space-between", "stretch": "stretch", "center": "flex-center"}, "grid-items": {"baseline": "baseline", "stretch": "stretch", "start": "flex-start", "center": "center", "end": "flex-end"}, "grid-content": {"start": "flex-start", "center": "center", "end": "flex-end", "between": "space-between", "equal": "space-evenly"}}, "cssItemsProps": {"self": {"start": "flex-start", "end": "flex-end", "stretch": "stretch"}}}, "_metadata": {"title": "flex", "tag": "flex", "description": "cssfabric flex system module"}, "_docs": {"attributes": {"grid": {"tag": "flex", "keys": ["v", "h"], "classNames": {"align": ["top", "middle", "bottom", "left", "right", "center", "middle-center", "stretch"], "grid": ["wrap", "wrap-reverse"]}, "about": "a classic flex grid system, and hey, it gets height !"}, "self": {"tag": "self", "keys": ["start", "end", "stretch"], "about": "flex children specific classnames"}}}},
|
|
6
|
+
"grid":{"_data": {"moduleName": "grid", "moduleNameShort": "grid", "horCode": "h", "vertCode": "v", "gridFullWidth": "main", "grow-shrink-steps": 4, "cssProps": {"flexWrap": {"wrap": "wrap", "wrap-reverse": "wrap-reverse"}, "grid-justify": {"start": "flex-start", "end": "flex-end", "between": "space-between", "stretch": "stretch", "center": "flex-center"}, "grid-items": {"baseline": "baseline", "stretch": "stretch", "start": "flex-start", "center": "center", "end": "flex-end"}, "grid-content": {"start": "flex-start", "center": "center", "end": "flex-end", "between": "space-between", "equal": "space-evenly"}}, "cssItemsProps": {"self": {"start": "flex-start", "end": "flex-end", "stretch": "stretch"}}, "grid-max-rows": 8, "grid-max-cols": 12}, "_metadata": {"title": "grid", "tag": "grid", "description": "cssfabric flex grid system module"}, "_docs": {"attributes": {"grid": {"tag": "grid", "keys": ["v", "h"], "classNames": {"align": ["top", "middle", "bottom", "left", "right", "center", "middle-center", "stretch"], "grid": ["wrap", "wrap-reverse"]}, "about": "a classic grid system"}, "self": {"tag": "self", "keys": ["start", "end", "stretch"], "about": "grid children specific classnames"}}}},
|
|
7
|
+
"menu":{"_data": {"menu_class_name": "menu", "menu_class_name_short": "ul", "orientations": {"v": "vertical", "h": "horizontal"}, "menu_item_class_name": "menu-item", "menu_item_class_name_short": "li", "menu_item_disabled_tag": "disabled", "menu_item_selected_tag": "selected", "menu_dropdown_tag": "drop", "menu_dropdown_open": "open", "menu_dropdown_close": "close"}, "_metadata": {"title": "menu", "tag": "ul", "description": "cssfabric menu module to set menu style"}, "_docs": {"attributes": {"menu": {"tag": "menu", "keys": ["h", "v"]}}}},
|
|
8
|
+
"overflow":{"_data": {"overflow_props": ["overflow", "overflow-x", "overflow-y"], "overflow_values": ["visible", "hidden", "clip", "scroll", "auto"], "cssProps": {"overflow": {"visible": "visible", "hidden": "hidden", "clip": "clip", "scroll": "scroll", "_": "auto"}}}, "_metadata": {"title": "overflow", "tag": "flow", "description": "cssfabric overflow module to set overflow styles on all html elements"}, "_docs": {"attributes": {"overflow": {"tag": "flow", "keys": ["visible", "hidden", "clip", "scroll", "auto"]}, "overflowX": {"tag": "flowX", "keys": ["visible", "hidden", "clip", "scroll", "auto"]}, "overflowY": {"tag": "flowY", "keys": ["visible", "hidden", "clip", "scroll", "auto"]}}}},
|
|
9
|
+
"scale":{"_data": {"weight-config": "1em", "unit-tag-config": {"width": "w", "height": "h"}, "grid-ratios-config": 16, "defined-step-size": 2, "defined-step-unit": "rem", "defined-steps": [1, 2, 4, 8, 16, 24, 32, 48, 64], "cssProps": {"size": {"full": "100%", "mid": "50%", "quarter": "25%", "tiers": "33%"}, "content": {"content-max": "max-content", "content-min": "min-content"}, "defined-steps": [1, 2, 4, 8, 16, 24, 32, 48, 64]}}, "_metadata": {"title": "scale", "tag": "scale", "description": "cssfabric scale module to set dimensions and ratios on all html elements"}, "_docs": {"attributes": {"scale": {"tag": "scale", "keys": ["w", "h"], "levels": {"_size": ["full", "mid", "quarter", "tiers"], "_content": ["content-max", "content-min"], "_defined-steps": [1, 2, 4, 8, 16, 24, 32, 48, 64], "_grid-16": ["1-16", "2-16", "3-16", "4-16", "5-16", "6-16", "7-16", "8-16", "9-16", "10-16", "11-16", "12-16", "13-16", "14-16", "15-16", "16-16"]}}}}},
|
|
10
|
+
"table":{"_data": {"className": "table", "classNameShort": "tbl", "table_class_name": "table", "table_class_name_short": "tbl", "table-bg-color-head": "#f4f4f4", "table-bg-color-strip-main": "#ededed", "table-bg-color-strip-second": "#f5f5f5", "table-border-color-header": "#ccc", "table-border-color-main": "#ededed", "table-border-color-second": "#f5f5f5"}, "_metadata": {"title": "table", "tag": "table", "description": "cssfabric table module to set different table styles"}, "_docs": {"attributes": {"table": {"tag": "table", "classNames": {"_": ["bg-strip-2", "bg-strip-5"], "_pos": ["sticky", "layout"], "_deco": ["h-line", "v-line", "border"]}, "about": "is a table"}}}},
|
|
11
|
+
"text":{"_data": {"moduleName": "text", "moduleNameShort": "text", "title-size-declination-config": 6, "font-size-unit-config": "rem", "font-sizes-h1-rem-config": 3.1, "font-size-h-min-rem-config": 1, "text-ellipsis-tag-config": "ellipsis", "cssProps": {"textTransform": {"cap": "capitalize", "up": "uppercase", "low": "lowercase", "none": "none", "full": "full-width"}, "fontWeight": {"50": 50, "100": 100, "300": 400, "500": 500, "900": 900, "light": "lighter", "cap": "normal", "bold": "bold", "bolder": "bolder"}, "textAlign": {"l": "left", "r": "right", "center": "center", "justify": "justify"}}, "scheme": {"discrete": "#ccc", "success": "green", "info": "#FFDD57FF", "warning": "#e6b905", "alert": "#ff7300", "error": "red"}, "palette": {"yellow": "#ffb900", "orange": "#d83b01", "red": "#d13438", "magenta": "#b4009e", "purple": "#5c2d91", "green": "#107c10", "teal": "#008272", "blue": "#0078d4", "dark": "#323232"}, "gray": "getGraySteps(5, #f4f4f4, #999)"}, "_metadata": {"title": "text", "tag": "text", "description": "cssfabric text module to set text style on all html elements"}, "_docs": {"attributes": {"text-transform": {"tag": "text", "keys": ["cap", "up", "low", "none", "full"]}, "font-weight": {"tag": "text", "keys": [50, 100, 300, 500, 900, "light", "cap", "bold", "bolder"]}, "text-align": {"tag": "text", "keys": ["l", "r", "center", "justify"]}, "text-shadow": {"tag": "text-shad", "keys": ["palette"]}}, "classNames": {"_": {"et": "ellipsis"}}}},
|
|
12
|
+
"theme":{"_data": {"moduleName": "theme", "moduleNameShort": "theme", "color-default-config": {"primary": "#201700", "secondary": "#D14B02", "tertiary": "#88D102", "foreground": "#282230", "background": "#ffffff", "paper": "#f1f1f1"}, "declinations-config": ["primary", "secondary", "tertiary"], "theme-level-config": ["light", "lighter", "dark", "darker", "complement", "invert"], "theme-properties-apply-config": ["text", "bg", "border"], "color": {"primary": "#201700", "primary-light": "#6d4e00", "primary-lighter": "#b98500", "primary-dark": "black", "primary-darker": "black", "primary-complement": "#000920", "primary-invert": "#dfe8ff", "secondary": "#D14B02", "secondary-light": "#fd7023", "secondary-lighter": "#fea16e", "secondary-dark": "#9e3902", "secondary-darker": "#6c2701", "secondary-complement": "#0288d1", "secondary-invert": "#2eb4fd", "tertiary": "#88D102", "tertiary-light": "#b0fd23", "tertiary-lighter": "#cbfe6e", "tertiary-dark": "#679e02", "tertiary-darker": "#466c01", "tertiary-complement": "#4b02d1", "tertiary-invert": "#772efd"}}, "_metadata": {"title": "theme", "description": ""}, "_docs": {"attributes": {"theme": {"tag": "theme", "keys": ["text", "bg", "border"], "levels": {"primary": ["_", "light", "lighter", "dark", "darker", "complement", "invert"], "secondary": ["_", "light", "lighter", "dark", "darker", "complement", "invert"], "tertiary": ["_", "light", "lighter", "dark", "darker", "complement", "invert"]}}}}},
|
|
13
|
+
"zindex":{"_data": {"z_groups": ["a", "z"]}, "_metadata": {"title": "zindex", "tag": "zI", "description": "cssfabric zindex module to set z-index on all html elements"}, "_docs": {"z_groups": "_"}} }}}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const utils = {
|
|
2
|
+
|
|
3
|
+
isArrayOfTypes: (arr: any): any => {
|
|
4
|
+
let ret = '';
|
|
5
|
+
|
|
6
|
+
if (!Array.isArray(arr)) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
if (arr.every(x => Array.isArray(x))) ret = 'arrays'
|
|
10
|
+
if (arr.every(x => typeof x === 'number' || typeof x === 'string' ) ) ret = 'strings'
|
|
11
|
+
if (arr.every(x => typeof x === 'string')) ret = 'strings'
|
|
12
|
+
if (arr.every(x => typeof x === 'number')) ret = 'numbers'
|
|
13
|
+
if (arr.every(x => typeof x === 'object' && !Array.isArray(x))) ret = 'objects'
|
|
14
|
+
|
|
15
|
+
return ret;
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
isObjectOfTypes: (arr: any): any => {
|
|
19
|
+
|
|
20
|
+
if (Array.isArray(arr)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let ret = '';
|
|
25
|
+
let arrValues = Object.values(arr);
|
|
26
|
+
|
|
27
|
+
if (arrValues.every(x => typeof x === 'number' || typeof x === 'string' ) ) ret = 'strings'
|
|
28
|
+
if (arrValues.every(x => Array.isArray(x))) ret = 'arrays'
|
|
29
|
+
if (arrValues.every(x => typeof x === 'string')) ret = 'strings'
|
|
30
|
+
if (arrValues.every(x => typeof x === 'number')) ret = 'numbers'
|
|
31
|
+
if (arrValues.every(x => typeof x === 'object' && !Array.isArray(x))) ret = 'objects'
|
|
32
|
+
|
|
33
|
+
return ret;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default utils;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}p{margin:auto}.hover-parent .hover-show{display:none}.hover-parent .hover-hide{display:initial}.hover-parent:hover .hover-show{display:initial}.hover-parent:hover .hover-hide{display:none}.block:not(:last-child){margin-bottom:1.5rem}h1,h2,h3,h4,h5,h6{margin-block-start:0 !important;margin-block-end:0 !important;margin-inline-start:0 !important;margin-inline-end:0 !important}label,.label{padding:.125rem .5rem;border:1px solid #ccc;display:inline-block;border-radius:4px;background-color:#ededed;text-shadow:#fff}.box-content{padding:.25rem;margin:.25rem 0}.cell-padding>*{padding:.25em}.cell-spacing>*{margin:.25em}
|