@esportsplus/ui 0.0.1 → 0.0.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/.gitattributes +2 -2
- package/components/accordion/scss/accordion.scss +16 -16
- package/components/accordion/scss/variables.scss +4 -4
- package/components/anchor/scss/anchor.scss +41 -41
- package/components/anchor/scss/anchors.scss +9 -9
- package/components/anchor/scss/variables.scss +5 -5
- package/components/banner/scss/banner.scss +13 -13
- package/components/border/scss/border.scss +10 -10
- package/components/border/scss/variables.scss +6 -6
- package/components/bubble/scss/bubble.scss +30 -30
- package/components/bubble/scss/variables.scss +19 -19
- package/components/button/scss/button.scss +93 -93
- package/components/button/scss/variables.scss +70 -70
- package/components/card/scss/card.scss +36 -36
- package/components/card/scss/variables.scss +42 -42
- package/components/container/scss/container.scss +10 -10
- package/components/container/scss/variables.scss +5 -5
- package/components/field/scss/_check.scss +225 -225
- package/components/field/scss/_normalize.scss +36 -36
- package/components/field/scss/_text.scss +103 -103
- package/components/field/scss/field.scss +137 -132
- package/components/field/scss/variables.scss +138 -133
- package/components/group/scss/group.scss +41 -41
- package/components/group/scss/variables.scss +25 -25
- package/components/icon/scss/icon.scss +18 -18
- package/components/icon/scss/variables.scss +8 -8
- package/components/link/scss/link.scss +29 -29
- package/components/link/scss/variables.scss +48 -48
- package/components/loading/scss/loading.scss +24 -24
- package/components/loading/scss/variables.scss +31 -31
- package/components/page/scss/page.scss +22 -22
- package/components/page/scss/variables.scss +19 -19
- package/components/root/scss/root.scss +93 -93
- package/components/root/scss/variables.scss +54 -54
- package/components/row/scss/row.scss +8 -8
- package/components/scrollbar/scss/scrollbar.scss +51 -51
- package/components/scrollbar/scss/variables.scss +8 -8
- package/components/sidebar/scss/sidebar.scss +50 -50
- package/components/sidebar/scss/sidebars.scss +13 -13
- package/components/sidebar/scss/variables.scss +25 -25
- package/components/text/scss/text.scss +12 -12
- package/components/text/scss/variables.scss +9 -9
- package/components/thumbnail/scss/thumbnail.scss +7 -7
- package/components/thumbnail/scss/variables.scss +7 -7
- package/components/tooltip/scss/_center.scss +13 -13
- package/components/tooltip/scss/_east.scss +34 -34
- package/components/tooltip/scss/_north.scss +34 -34
- package/components/tooltip/scss/_south.scss +35 -35
- package/components/tooltip/scss/_west.scss +34 -34
- package/components/tooltip/scss/tooltip.scss +107 -107
- package/components/tooltip/scss/variables.scss +25 -25
- package/css-utilities/[margin,padding]/scss/styles.scss +41 -41
- package/css-utilities/[margin,padding]/scss/variables.scss +52 -52
- package/css-utilities/[max,min]/scss/variables.scss +23 -23
- package/css-utilities/absolute/scss/absolute.scss +59 -59
- package/css-utilities/background/scss/variables.scss +28 -28
- package/css-utilities/border/scss/border.scss +21 -21
- package/css-utilities/border/scss/variables.scss +66 -66
- package/css-utilities/color/scss/variables.scss +32 -32
- package/css-utilities/flex/scss/flex.scss +67 -67
- package/css-utilities/hidden/scss/hidden.scss +28 -28
- package/css-utilities/index.scss +14 -14
- package/css-utilities/pointer/scss/pointer.scss +5 -5
- package/css-utilities/size/scss/variables.scss +12 -12
- package/css-utilities/slide/scss/slide.scss +20 -20
- package/css-utilities/slide/scss/variables.scss +6 -6
- package/css-utilities/text/scss/text.scss +93 -93
- package/css-utilities/text/scss/variables.scss +31 -31
- package/css-utilities/width/scss/variables.scss +12 -12
- package/lib/index.scss +7 -7
- package/lib/scss/color.scss +8 -8
- package/lib/scss/list.scss +112 -112
- package/lib/scss/string.scss +54 -54
- package/package.json +22 -22
- package/storage/fonts/Montserrat/montserrat.css +79 -79
- package/tokens/index.scss +11 -11
- package/tokens/scss/border-radius.scss +12 -12
- package/tokens/scss/border-width.scss +6 -6
- package/tokens/scss/box-shadow.scss +13 -13
- package/tokens/scss/breakpoints.scss +13 -13
- package/tokens/scss/color.scss +71 -71
- package/tokens/scss/font-size.scss +12 -12
- package/tokens/scss/font-weight.scss +6 -6
- package/tokens/scss/line-height.scss +6 -6
- package/tokens/scss/size.scss +13 -13
- package/tokens/scss/state.scss +93 -93
- package/tokens/scss/transition-duration.scss +5 -5
- package/webpack.sass.config.js +59 -59
package/tokens/scss/state.scss
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*------------------------------------------------------------------------------
|
|
3
|
-
*
|
|
4
|
-
* Buttons, Links, And Other Modules Display CSS Properties Based On Module
|
|
5
|
-
* 'State' ( :hover, :active, etc. )
|
|
6
|
-
*
|
|
7
|
-
* Desired Result:
|
|
8
|
-
* - Default Colors Assigned To Element;
|
|
9
|
-
* - On 'highlight' Or ':hover' Display A Slightly Brighter Version Of
|
|
10
|
-
* The Default Color;
|
|
11
|
-
* - On 'pressed' Or ':active' Display Slightly Darker Version Of The
|
|
12
|
-
* Default Color;
|
|
13
|
-
*
|
|
14
|
-
* End Product Gives Off The Illusion Of A Static -> Hovering -> Pressed
|
|
15
|
-
* Button Without Dealing With Transforms To Shift Elements.
|
|
16
|
-
*
|
|
17
|
-
* Mixin Also Handles Removing Duplicate List Keys
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
@use 'ui/lib';
|
|
22
|
-
|
|
23
|
-
$state: (
|
|
24
|
-
active: '&.--active',
|
|
25
|
-
inactive: '&:not(.--active)',
|
|
26
|
-
|
|
27
|
-
disabled: '&.--disabled',
|
|
28
|
-
enabled: '&:not(.--disabled)',
|
|
29
|
-
|
|
30
|
-
default: '&:not(.--active):not(:hover)',
|
|
31
|
-
hover: '&:not(.--active):hover',
|
|
32
|
-
pressed: '&:not(.--active):active'
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@function state($key, $replace: null) {
|
|
37
|
-
$selector: lib.map-get($state, $key);
|
|
38
|
-
|
|
39
|
-
// To Avoid Overcomplicating The Responsibility Of This Function Limit
|
|
40
|
-
// Replace Parameter To String Values Only
|
|
41
|
-
@if $replace {
|
|
42
|
-
@if type-of($replace) != 'string' or type-of($selector) != 'string' {
|
|
43
|
-
@error "'lib.string-replace' Cannot Be Used On A List!";
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
$selector: lib.string-replace('&', $replace, $selector);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@return $selector;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
@mixin state($states) {
|
|
54
|
-
$selector: ();
|
|
55
|
-
|
|
56
|
-
@each $s in lib.list-to-list($states) {
|
|
57
|
-
$section: state($s);
|
|
58
|
-
|
|
59
|
-
@if $section {
|
|
60
|
-
$selector: lib.list-append($selector, $section);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
#{lib.list-implode(',', lib.list-unique($selector))} {
|
|
65
|
-
@content;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
*------------------------------------------------------------------------------
|
|
71
|
-
*
|
|
72
|
-
* Generate State Based CSS Utility For List Of Colors
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
|
-
@mixin state-utility($class, $property, $values) {
|
|
77
|
-
$keys: $values;
|
|
78
|
-
|
|
79
|
-
@if type-of($keys) == 'map' {
|
|
80
|
-
$keys: lib.map-keys($keys);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
#{$class} {
|
|
84
|
-
@each $key in $keys {
|
|
85
|
-
&-#{$key} {
|
|
86
|
-
--#{$property}-active: var(--color-#{$key}-300);
|
|
87
|
-
--#{$property}-default: var(--color-#{$key}-400);
|
|
88
|
-
--#{$property}-hover: var(--color-#{$key}-300);
|
|
89
|
-
--#{$property}-pressed: var(--color-#{$key}-500);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
*------------------------------------------------------------------------------
|
|
3
|
+
*
|
|
4
|
+
* Buttons, Links, And Other Modules Display CSS Properties Based On Module
|
|
5
|
+
* 'State' ( :hover, :active, etc. )
|
|
6
|
+
*
|
|
7
|
+
* Desired Result:
|
|
8
|
+
* - Default Colors Assigned To Element;
|
|
9
|
+
* - On 'highlight' Or ':hover' Display A Slightly Brighter Version Of
|
|
10
|
+
* The Default Color;
|
|
11
|
+
* - On 'pressed' Or ':active' Display Slightly Darker Version Of The
|
|
12
|
+
* Default Color;
|
|
13
|
+
*
|
|
14
|
+
* End Product Gives Off The Illusion Of A Static -> Hovering -> Pressed
|
|
15
|
+
* Button Without Dealing With Transforms To Shift Elements.
|
|
16
|
+
*
|
|
17
|
+
* Mixin Also Handles Removing Duplicate List Keys
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
@use 'ui/lib';
|
|
22
|
+
|
|
23
|
+
$state: (
|
|
24
|
+
active: '&.--active',
|
|
25
|
+
inactive: '&:not(.--active)',
|
|
26
|
+
|
|
27
|
+
disabled: '&.--disabled',
|
|
28
|
+
enabled: '&:not(.--disabled)',
|
|
29
|
+
|
|
30
|
+
default: '&:not(.--active):not(:hover)',
|
|
31
|
+
hover: '&:not(.--active):hover',
|
|
32
|
+
pressed: '&:not(.--active):active'
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@function state($key, $replace: null) {
|
|
37
|
+
$selector: lib.map-get($state, $key);
|
|
38
|
+
|
|
39
|
+
// To Avoid Overcomplicating The Responsibility Of This Function Limit
|
|
40
|
+
// Replace Parameter To String Values Only
|
|
41
|
+
@if $replace {
|
|
42
|
+
@if type-of($replace) != 'string' or type-of($selector) != 'string' {
|
|
43
|
+
@error "'lib.string-replace' Cannot Be Used On A List!";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
$selector: lib.string-replace('&', $replace, $selector);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@return $selector;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@mixin state($states) {
|
|
54
|
+
$selector: ();
|
|
55
|
+
|
|
56
|
+
@each $s in lib.list-to-list($states) {
|
|
57
|
+
$section: state($s);
|
|
58
|
+
|
|
59
|
+
@if $section {
|
|
60
|
+
$selector: lib.list-append($selector, $section);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#{lib.list-implode(',', lib.list-unique($selector))} {
|
|
65
|
+
@content;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
*------------------------------------------------------------------------------
|
|
71
|
+
*
|
|
72
|
+
* Generate State Based CSS Utility For List Of Colors
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
@mixin state-utility($class, $property, $values) {
|
|
77
|
+
$keys: $values;
|
|
78
|
+
|
|
79
|
+
@if type-of($keys) == 'map' {
|
|
80
|
+
$keys: lib.map-keys($keys);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
#{$class} {
|
|
84
|
+
@each $key in $keys {
|
|
85
|
+
&-#{$key} {
|
|
86
|
+
--#{$property}-active: var(--color-#{$key}-300);
|
|
87
|
+
--#{$property}-default: var(--color-#{$key}-400);
|
|
88
|
+
--#{$property}-hover: var(--color-#{$key}-300);
|
|
89
|
+
--#{$property}-pressed: var(--color-#{$key}-500);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
$transition-duration: (
|
|
2
|
-
300: 0.08s,
|
|
3
|
-
400: 0.16s,
|
|
4
|
-
500: 0.24s
|
|
5
|
-
);
|
|
1
|
+
$transition-duration: (
|
|
2
|
+
300: 0.08s,
|
|
3
|
+
400: 0.16s,
|
|
4
|
+
500: 0.24s
|
|
5
|
+
);
|
package/webpack.sass.config.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
const autoprefixer = require('autoprefixer');
|
|
2
|
-
const cssnano = require('cssnano');
|
|
3
|
-
const glob = require('glob');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function scss(bundle, paths, scss = {}) {
|
|
8
|
-
return [
|
|
9
|
-
scss.prepend || [],
|
|
10
|
-
glob.sync(`{${paths.current}/components,${paths.input}/components,${paths.input}/pages,${paths.current}/css-utilities}/**/${bundle}`, { nosort: true }),
|
|
11
|
-
scss.append || []
|
|
12
|
-
].flat();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
module.exports = ({ filename, input, output, production, theme }) => {
|
|
17
|
-
let paths = {
|
|
18
|
-
current: path.resolve(process.cwd()).replace('\\', '/') + `/node_modules/@esportsplus/ui`,
|
|
19
|
-
input: path.resolve(process.cwd()).replace('\\', '/') + `/${input || ''}`,
|
|
20
|
-
output: path.resolve(process.cwd()).replace('\\', '/') + `/${output || ''}`
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
entry: {
|
|
25
|
-
[filename || 'app']: scss('!(variables).scss', paths, { prepend: ['modern-normalize/modern-normalize.css'] }),
|
|
26
|
-
[`themes/${theme || 'default'}`]: scss('variables.scss', paths, { append: [`${paths.current}/storage/fonts/Montserrat/montserrat.css`] })
|
|
27
|
-
},
|
|
28
|
-
mode: (production == false ? 'development' : 'production'),
|
|
29
|
-
module: {
|
|
30
|
-
rules: [
|
|
31
|
-
{
|
|
32
|
-
test: /\.(c|sc|sa)ss$/,
|
|
33
|
-
use: [
|
|
34
|
-
{
|
|
35
|
-
loader: 'css-loader',
|
|
36
|
-
options: {
|
|
37
|
-
// Prevents Following Urls To Fonts/Images
|
|
38
|
-
url: false,
|
|
39
|
-
importLoaders: 1
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
loader: 'postcss-loader',
|
|
44
|
-
options: {
|
|
45
|
-
postcssOptions: {
|
|
46
|
-
plugins: [autoprefixer(), cssnano()]
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
{ loader: 'sass-loader' },
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
output: {
|
|
56
|
-
path: paths.output
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
};
|
|
1
|
+
const autoprefixer = require('autoprefixer');
|
|
2
|
+
const cssnano = require('cssnano');
|
|
3
|
+
const glob = require('glob');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
function scss(bundle, paths, scss = {}) {
|
|
8
|
+
return [
|
|
9
|
+
scss.prepend || [],
|
|
10
|
+
glob.sync(`{${paths.current}/components,${paths.input}/components,${paths.input}/pages,${paths.current}/css-utilities}/**/${bundle}`, { nosort: true }),
|
|
11
|
+
scss.append || []
|
|
12
|
+
].flat();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
module.exports = ({ filename, input, output, production, theme }) => {
|
|
17
|
+
let paths = {
|
|
18
|
+
current: path.resolve(process.cwd()).replace('\\', '/') + `/node_modules/@esportsplus/ui`,
|
|
19
|
+
input: path.resolve(process.cwd()).replace('\\', '/') + `/${input || ''}`,
|
|
20
|
+
output: path.resolve(process.cwd()).replace('\\', '/') + `/${output || ''}`
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
entry: {
|
|
25
|
+
[filename || 'app']: scss('!(variables).scss', paths, { prepend: ['modern-normalize/modern-normalize.css'] }),
|
|
26
|
+
[`themes/${theme || 'default'}`]: scss('variables.scss', paths, { append: [`${paths.current}/storage/fonts/Montserrat/montserrat.css`] })
|
|
27
|
+
},
|
|
28
|
+
mode: (production == false ? 'development' : 'production'),
|
|
29
|
+
module: {
|
|
30
|
+
rules: [
|
|
31
|
+
{
|
|
32
|
+
test: /\.(c|sc|sa)ss$/,
|
|
33
|
+
use: [
|
|
34
|
+
{
|
|
35
|
+
loader: 'css-loader',
|
|
36
|
+
options: {
|
|
37
|
+
// Prevents Following Urls To Fonts/Images
|
|
38
|
+
url: false,
|
|
39
|
+
importLoaders: 1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
loader: 'postcss-loader',
|
|
44
|
+
options: {
|
|
45
|
+
postcssOptions: {
|
|
46
|
+
plugins: [autoprefixer(), cssnano()]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{ loader: 'sass-loader' },
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
output: {
|
|
56
|
+
path: paths.output
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|