rmr-util 1.1.126 → 1.1.129
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/docs/index.html +1 -1
- package/index.js +77 -77
- package/package.json +6 -6
- package/src/styles/_rmr-mixins.scss +2 -1
- package/src/styles/_rmr-reset.scss +10 -2
- package/webpack.config.js +8 -24
package/docs/index.html
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
<button class="">Submit</button>
|
|
106
106
|
</form>
|
|
107
107
|
|
|
108
|
-
<img data-rmr-srcset="https://im.vsco.co/aws-us-west-2/5d508d/2222331/5e478e7de6e0db2b1ea8fbbd/vsco5e478e87283a5.jpg?w=1184&dpr=2"
|
|
108
|
+
<img data-rmr-srcset="https://im.vsco.co/aws-us-west-2/5d508d/2222331/5e478e7de6e0db2b1ea8fbbd/vsco5e478e87283a5.jpg?w=1184&dpr=2">
|
|
109
109
|
|
|
110
110
|
<form class="xhr" action="xhr/form.php" method="post">
|
|
111
111
|
<input type="checkbox" name="check" value="rmr">
|
package/index.js
CHANGED
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
|
|
439
439
|
animateScroll();
|
|
440
440
|
},
|
|
441
|
-
|
|
441
|
+
|
|
442
442
|
/**
|
|
443
443
|
*
|
|
444
444
|
*
|
|
@@ -681,66 +681,66 @@
|
|
|
681
681
|
return n;
|
|
682
682
|
},
|
|
683
683
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
*/
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
// return svg;
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
684
|
+
// *
|
|
685
|
+
// * Make loader
|
|
686
|
+
// *
|
|
687
|
+
// * @return {String} SVG element
|
|
688
|
+
// */
|
|
689
|
+
// loader = function() {
|
|
690
|
+
//
|
|
691
|
+
//
|
|
692
|
+
// const svg = makeElement('svg', {
|
|
693
|
+
// version: '1.1',
|
|
694
|
+
// class: 'rmr-loader',
|
|
695
|
+
// xmlns: 'http://www.w3.org/2000/svg',
|
|
696
|
+
// 'xmlns:xlink': 'http://www.w3.org/1999/xlink',
|
|
697
|
+
// x: '0px',
|
|
698
|
+
// y: '0px',
|
|
699
|
+
// width: '40px',
|
|
700
|
+
// height: '40px',
|
|
701
|
+
// viewBox: '0 0 40 40',
|
|
702
|
+
// 'enable-background': 'new 0 0 40 40',
|
|
703
|
+
// 'xml:space': 'preserve'
|
|
704
|
+
// });
|
|
705
|
+
//
|
|
706
|
+
// svg.innerHTML =
|
|
707
|
+
// '<path opacity="0.2" fill="#000" d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"></path>' +
|
|
708
|
+
// '<path fill="#000" d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0 C22.32,8.481,24.301,9.057,26.013,10.047z">' +
|
|
709
|
+
// '<animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="0.8s" repeatCount="indefinite"></animateTransform>' +
|
|
710
|
+
// '</path>';
|
|
711
|
+
// */
|
|
712
|
+
//
|
|
713
|
+
// return '<svg version="1.1" class="rmr-loader" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 40 40" xml:space="preserve">' +
|
|
714
|
+
// '<path opacity="0.2" fill="#000" d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"></path>' +
|
|
715
|
+
// '<path fill="#000" d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0 C22.32,8.481,24.301,9.057,26.013,10.047z">' +
|
|
716
|
+
// '<animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="0.8s" repeatCount="indefinite"></animateTransform>' +
|
|
717
|
+
// '</path>' +
|
|
718
|
+
// '</svg>';
|
|
719
|
+
//
|
|
720
|
+
// // return svg;
|
|
721
|
+
// },
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
// *
|
|
725
|
+
// * Bind variables to placeholders in a string
|
|
726
|
+
// *
|
|
727
|
+
// * @param {String} subject
|
|
728
|
+
// * @param {Object} lookup table containing key/value pairs
|
|
729
|
+
// * @return {String} string
|
|
730
|
+
// */
|
|
731
|
+
// bindString = function(subject, lookup) {
|
|
732
|
+
//
|
|
733
|
+
// let str = subject;
|
|
734
|
+
//
|
|
735
|
+
// for (const key in lookup) {
|
|
736
|
+
// if (! objectHas(lookup, key)) {
|
|
737
|
+
// continue;
|
|
738
|
+
// }
|
|
739
|
+
// str = str.replace(key, lookup[key])
|
|
740
|
+
// }
|
|
741
|
+
//
|
|
742
|
+
// return str;
|
|
743
|
+
// },
|
|
744
744
|
|
|
745
745
|
/**
|
|
746
746
|
* Localize a string
|
|
@@ -1013,7 +1013,7 @@
|
|
|
1013
1013
|
}
|
|
1014
1014
|
|
|
1015
1015
|
while ( (parent = parent.parentNode) !== null) {
|
|
1016
|
-
if (parent === ancestor) {
|
|
1016
|
+
if (parent === ancestor) {
|
|
1017
1017
|
return parent;
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
@@ -1106,7 +1106,7 @@
|
|
|
1106
1106
|
}
|
|
1107
1107
|
|
|
1108
1108
|
return true;
|
|
1109
|
-
|
|
1109
|
+
|
|
1110
1110
|
},
|
|
1111
1111
|
|
|
1112
1112
|
/**
|
|
@@ -1226,14 +1226,14 @@
|
|
|
1226
1226
|
|
|
1227
1227
|
// for notifications
|
|
1228
1228
|
const subs = {
|
|
1229
|
-
|
|
1229
|
+
|
|
1230
1230
|
};
|
|
1231
1231
|
|
|
1232
1232
|
/**
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
@param w {Int} -
|
|
1236
|
-
@return {String} -
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
@param w {Int} -
|
|
1236
|
+
@return {String} -
|
|
1237
1237
|
*/
|
|
1238
1238
|
const breakpointUp = (w) => {
|
|
1239
1239
|
const arg = parseInt(w ? w : window.innerWidth, 10);
|
|
@@ -1248,8 +1248,8 @@
|
|
|
1248
1248
|
|
|
1249
1249
|
/**
|
|
1250
1250
|
|
|
1251
|
-
@param w {Int} -
|
|
1252
|
-
@return {String} -
|
|
1251
|
+
@param w {Int} -
|
|
1252
|
+
@return {String} -
|
|
1253
1253
|
*/
|
|
1254
1254
|
const breakpointDown = (w) => {
|
|
1255
1255
|
const
|
|
@@ -1265,7 +1265,7 @@
|
|
|
1265
1265
|
};
|
|
1266
1266
|
|
|
1267
1267
|
/**
|
|
1268
|
-
|
|
1268
|
+
|
|
1269
1269
|
@return {Object} - { names : widths }
|
|
1270
1270
|
*/
|
|
1271
1271
|
const breakpointGet = (name) => {
|
|
@@ -1280,7 +1280,7 @@
|
|
|
1280
1280
|
|
|
1281
1281
|
|
|
1282
1282
|
/**
|
|
1283
|
-
|
|
1283
|
+
|
|
1284
1284
|
@return {Object} - { names : widths }
|
|
1285
1285
|
*/
|
|
1286
1286
|
const breakpointAll = () => {
|
|
@@ -1369,7 +1369,7 @@
|
|
|
1369
1369
|
if (a.host !== location.host && obj.exclude.indexOf(a.host) < 0) {
|
|
1370
1370
|
a.classList.add('rmr-external');
|
|
1371
1371
|
a.setAttribute('target', '_blank');
|
|
1372
|
-
}
|
|
1372
|
+
}
|
|
1373
1373
|
}
|
|
1374
1374
|
},
|
|
1375
1375
|
loader: function(options) {
|
|
@@ -1526,7 +1526,7 @@
|
|
|
1526
1526
|
Breakpoint: {
|
|
1527
1527
|
|
|
1528
1528
|
/**
|
|
1529
|
-
|
|
1529
|
+
|
|
1530
1530
|
*/
|
|
1531
1531
|
up: breakpointUp,
|
|
1532
1532
|
down: breakpointDown,
|
|
@@ -1539,7 +1539,7 @@
|
|
|
1539
1539
|
isURL: isURL,
|
|
1540
1540
|
guid: guid,
|
|
1541
1541
|
localize: localize,
|
|
1542
|
-
bind: bindString,
|
|
1542
|
+
// bind: bindString,
|
|
1543
1543
|
formatSeconds: (seconds) => {
|
|
1544
1544
|
|
|
1545
1545
|
seconds = parseInt(seconds);
|
|
@@ -1572,7 +1572,7 @@
|
|
|
1572
1572
|
},
|
|
1573
1573
|
Notify: {
|
|
1574
1574
|
post: notifyPost,
|
|
1575
|
-
subscribe: notifySubscribe
|
|
1575
|
+
subscribe: notifySubscribe
|
|
1576
1576
|
},
|
|
1577
1577
|
Object: {
|
|
1578
1578
|
keys: objectKeys,
|
|
@@ -1597,7 +1597,7 @@
|
|
|
1597
1597
|
ancestor: ancestor,
|
|
1598
1598
|
matches: selectorMatches,
|
|
1599
1599
|
remove: removeNode,
|
|
1600
|
-
loader: loader,
|
|
1600
|
+
// loader: loader,
|
|
1601
1601
|
get: getElement,
|
|
1602
1602
|
getAll: getElements,
|
|
1603
1603
|
prune: pruneElement,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rmr-util",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.129",
|
|
4
4
|
"description": "JS & CSS for your browser",
|
|
5
5
|
"url": "https://davidfmiller.github.io/rmr-util/",
|
|
6
6
|
"license": "ISC",
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"babel-loader": "^7.1.2",
|
|
24
24
|
"babel-preset-es2015": "^6.24.1",
|
|
25
25
|
"chai": "^4.2.0",
|
|
26
|
-
"eslint": "^
|
|
26
|
+
"eslint": "^8.8.0",
|
|
27
27
|
"eslint-config-standard": "^14.1.1",
|
|
28
28
|
"eslint-plugin-import": "^2.22.0",
|
|
29
29
|
"eslint-plugin-node": "^11.1.0",
|
|
30
30
|
"eslint-plugin-promise": "^4.2.1",
|
|
31
31
|
"eslint-plugin-standard": "^4.0.1",
|
|
32
32
|
"grunt": "^1.3.0",
|
|
33
|
-
"grunt-contrib-compass": "^
|
|
34
|
-
"grunt-contrib-jshint": "^1.1
|
|
33
|
+
"grunt-contrib-compass": "^0.8.0",
|
|
34
|
+
"grunt-contrib-jshint": "^3.1.1",
|
|
35
35
|
"grunt-contrib-uglify": "^3.3.0",
|
|
36
36
|
"grunt-contrib-watch": "^1.1.0",
|
|
37
|
-
"mocha": "^
|
|
37
|
+
"mocha": "^9.2.0",
|
|
38
38
|
"terser-webpack-plugin": "^4.2.1",
|
|
39
39
|
"uglify-es": "^3.3.4",
|
|
40
|
-
"webpack": "^
|
|
40
|
+
"webpack": "^5.68.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
html{/*color:#000;background:#FFF*/}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}input,textarea,select{*font-size:100%}legend{color:#000}
|
|
4
4
|
fieldset { margin: 0; padding: 0; border: none; }
|
|
5
5
|
iframe { border: 0; display: block; margin: 0; padding: 0; }
|
|
6
|
-
body { font-family: $rmr-fonts; }
|
|
6
|
+
body { font-family: $rmr-fonts; }
|
|
7
7
|
legend { display: none; }
|
|
8
|
+
figure { margin: 0; padding: 0; }
|
|
8
9
|
|
|
9
10
|
script {
|
|
10
11
|
display: none !important;
|
|
@@ -39,4 +40,11 @@ canvas {
|
|
|
39
40
|
padding: 0;
|
|
40
41
|
margin: 0;
|
|
41
42
|
display: block;
|
|
42
|
-
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
button, select {
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
&[disabled] {
|
|
48
|
+
cursor: default;
|
|
49
|
+
}
|
|
50
|
+
}
|
package/webpack.config.js
CHANGED
|
@@ -1,38 +1,22 @@
|
|
|
1
|
+
/* globals require, __dirname, module, webpack */
|
|
1
2
|
|
|
2
3
|
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
terser = require('terser-webpack-plugin');
|
|
4
|
+
path = require('path');
|
|
5
|
+
webpack = require('webpack');
|
|
6
6
|
|
|
7
7
|
const config = {
|
|
8
8
|
entry: './build.js',
|
|
9
|
+
// mode: 'development',
|
|
10
|
+
mode: 'production',
|
|
9
11
|
output: {
|
|
10
|
-
path: path.resolve(__dirname, 'docs/build
|
|
12
|
+
path: path.resolve(__dirname, 'docs/build'),
|
|
11
13
|
filename: 'rmr-util.bundle.js'
|
|
12
14
|
},
|
|
13
|
-
|
|
14
|
-
// mode: 'development',
|
|
15
|
-
watch: true,
|
|
16
|
-
plugins : [
|
|
17
|
-
new terser({
|
|
18
|
-
extractComments: false,
|
|
19
|
-
test: /\.js(\?.*)?$/i
|
|
20
|
-
})
|
|
15
|
+
plugins: [
|
|
21
16
|
],
|
|
17
|
+
watch: true,
|
|
22
18
|
module: {
|
|
23
19
|
rules: [
|
|
24
|
-
{
|
|
25
|
-
test: /\.js$/,
|
|
26
|
-
// include: path.resolve(__dirname, 'src'),
|
|
27
|
-
use: [{
|
|
28
|
-
loader: 'babel-loader',
|
|
29
|
-
options: {
|
|
30
|
-
presets: [
|
|
31
|
-
['es2015']
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
}]
|
|
35
|
-
}
|
|
36
20
|
]
|
|
37
21
|
}
|
|
38
22
|
};
|