@ulu/frontend 0.0.10 → 0.0.12
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/CHANGELOG.md +6 -0
- package/README.md +2 -0
- package/js/events/index.js +1 -1
- package/js/helpers/css-breakpoint.js +4 -5
- package/js/ui/modals.js +1 -1
- package/js/ui/slider.js +1 -1
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ Front end development library (SCSS, JS, Vue)
|
|
|
4
4
|
|
|
5
5
|
[Documentation](https://jscherbe.github.io/frontend/)
|
|
6
6
|
|
|
7
|
+
[Change Log](CHANGELOG.md)
|
|
8
|
+
|
|
7
9
|
## SCSS Library
|
|
8
10
|
|
|
9
11
|
This is the sass library. Set up for packaged use (under on namespace) and individual module use (importing modules directly
|
package/js/events/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// Pass breakpoints from CSS to stylesheet, use this to attach behaviors on breakpoints
|
|
6
|
-
import { removeArrayElement } from "@ulu/utils/array";
|
|
6
|
+
import { removeArrayElement } from "@ulu/utils/array.js";
|
|
7
7
|
import { getName } from "../events/index.js";
|
|
8
8
|
import { log, logError } from "../utils/logger.js";
|
|
9
9
|
|
|
@@ -25,20 +25,18 @@ export class CssBreakpoints {
|
|
|
25
25
|
valueFromPsuedo: false,
|
|
26
26
|
customProperty: "--breakpoint",
|
|
27
27
|
psuedoSelector: ':before',
|
|
28
|
+
order: ["small", "medium", "large"],
|
|
28
29
|
debug: false
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* @param {Object} config Configruation object
|
|
32
|
-
* @param {Array} config.order
|
|
33
|
+
* @param {Array} config.order Array of strings that correspond to the breakpoints setup in the styles, Breakpoints from smallest to largest, defaults to [small, medium, large]
|
|
33
34
|
* @param {Array} config.customProperty Property to grab breakpoint from (default is --breakpoint)
|
|
34
35
|
* @param {Array} config.valueFromPsuedo Use the legacy method of grabbing breakpoint from psuedo element, default uses custom property
|
|
35
36
|
* @param {Node} config.element The element to retrieve active breakpoint from stylesheet. (default is html) For using the old psuedo method, adjust this to document.body
|
|
36
37
|
* @param {String} config.psuedoSelector Change psuedo selector used to get the breakpoint from the psuedo's content property
|
|
37
38
|
*/
|
|
38
39
|
constructor(config) {
|
|
39
|
-
if (!config.order) {
|
|
40
|
-
logError(this, 'Missing order (required)!');
|
|
41
|
-
}
|
|
42
40
|
Object.assign(this, CssBreakpoints.defaults, config);
|
|
43
41
|
this.active = null;
|
|
44
42
|
this.previous = null;
|
|
@@ -119,6 +117,7 @@ export class CssBreakpoints {
|
|
|
119
117
|
/**
|
|
120
118
|
* Get a breakpoint by key
|
|
121
119
|
* @param {String} name The name of the breakpoint to get
|
|
120
|
+
* @return {Breakpoint} Breakpoint to act on (see BreakpointDirection)
|
|
122
121
|
*/
|
|
123
122
|
at(name) {
|
|
124
123
|
const bp = this.breakpoints[name];
|
package/js/ui/modals.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// interface in the future we don't need to change/update markup.
|
|
18
18
|
import MicroModal from 'micromodal';
|
|
19
19
|
import Resizer from './resizer.js';
|
|
20
|
-
import { createElementFromHtml } from '@ulu/utils/dom.js';
|
|
20
|
+
import { createElementFromHtml } from '@ulu/utils/browser/dom.js';
|
|
21
21
|
import { pauseVideos, prepVideos } from '../helpers/pause-youtube-video.js';
|
|
22
22
|
const classes = {
|
|
23
23
|
open: 'site-modal--open',
|
package/js/ui/slider.js
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
// * Will Change use
|
|
29
29
|
|
|
30
30
|
import maintain from 'ally.js/maintain/_maintain';
|
|
31
|
-
import { log, logError, logWarning } from "
|
|
31
|
+
import { log, logError, logWarning } from "../utils/logger.js";
|
|
32
32
|
import { hasRequiredProps } from '@ulu/utils/object.js';
|
|
33
33
|
import { trimWhitespace } from "@ulu/utils/string.js";
|
|
34
34
|
import { debounce } from "@ulu/utils/performance.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulu/frontend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Theming library",
|
|
5
5
|
"browser": "js/index.js",
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
"./scss": "./scss/index.scss"
|
|
14
14
|
},
|
|
15
15
|
"typesVersions": {
|
|
16
|
-
"*"
|
|
17
|
-
"js/*"
|
|
16
|
+
"*": {
|
|
17
|
+
"js/*": [
|
|
18
|
+
"./types/*"
|
|
19
|
+
]
|
|
18
20
|
}
|
|
19
21
|
},
|
|
20
22
|
"type": "module",
|
|
@@ -25,7 +27,7 @@
|
|
|
25
27
|
"docs:update:scss": "node ./docs-src/.vitepress/sassdoc.js",
|
|
26
28
|
"docs:update:scss:debug": "node --inspect-brk ./docs-src/.vitepress/sassdoc.js",
|
|
27
29
|
"docs:build:js": "node ./docs-src/.vitepress/jsdoc.js",
|
|
28
|
-
"types"
|
|
30
|
+
"types": "npx tsc"
|
|
29
31
|
},
|
|
30
32
|
"repository": {
|
|
31
33
|
"type": "git",
|
|
@@ -47,7 +49,6 @@
|
|
|
47
49
|
},
|
|
48
50
|
"homepage": "https://github.com/Jscherbe/frontend#readme",
|
|
49
51
|
"devDependencies": {
|
|
50
|
-
"@ulu/utils": "^0.0.4",
|
|
51
52
|
"@ulu/vitepress-auto-menus": "^0.0.3",
|
|
52
53
|
"@ulu/vitepress-sassdoc": "^0.0.6",
|
|
53
54
|
"clean-jsdoc-theme": "^4.2.17",
|
|
@@ -57,5 +58,8 @@
|
|
|
57
58
|
"sass": "^1.51.0",
|
|
58
59
|
"typescript": "^5.3.3",
|
|
59
60
|
"vitepress": "^1.0.0-rc.27"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@ulu/utils": "^0.0.6"
|
|
60
64
|
}
|
|
61
65
|
}
|