@ulu/frontend 0.0.9 → 0.0.11
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 +24 -5
- package/js/ui/modals.js +1 -1
- package/js/ui/slider.js +1 -1
- package/package.json +17 -6
- package/types/events/index.d.ts +17 -0
- package/types/events/index.d.ts.map +1 -0
- package/types/helpers/css-breakpoint.d.ts +59 -0
- package/types/helpers/css-breakpoint.d.ts.map +1 -0
- package/types/helpers/file-save.d.ts +17 -0
- package/types/helpers/file-save.d.ts.map +1 -0
- package/types/helpers/node-data-manager.d.ts +45 -0
- package/types/helpers/node-data-manager.d.ts.map +1 -0
- package/types/helpers/pause-youtube-video.d.ts +14 -0
- package/types/helpers/pause-youtube-video.d.ts.map +1 -0
- package/types/helpers/scrollbar-width-property.d.ts +11 -0
- package/types/helpers/scrollbar-width-property.d.ts.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.d.ts.map +1 -0
- package/types/ui/flipcard.d.ts +38 -0
- package/types/ui/flipcard.d.ts.map +1 -0
- package/types/ui/grid.d.ts +24 -0
- package/types/ui/grid.d.ts.map +1 -0
- package/types/ui/modals.d.ts +27 -0
- package/types/ui/modals.d.ts.map +1 -0
- package/types/ui/overflow-scroller-pager.d.ts +17 -0
- package/types/ui/overflow-scroller-pager.d.ts.map +1 -0
- package/types/ui/overflow-scroller.d.ts +37 -0
- package/types/ui/overflow-scroller.d.ts.map +1 -0
- package/types/ui/programmatic-modal.d.ts +2 -0
- package/types/ui/programmatic-modal.d.ts.map +1 -0
- package/types/ui/resizer.d.ts +28 -0
- package/types/ui/resizer.d.ts.map +1 -0
- package/types/ui/slider.d.ts +116 -0
- package/types/ui/slider.d.ts.map +1 -0
- package/types/ui/tabs.d.ts +2 -0
- package/types/ui/tabs.d.ts.map +1 -0
- package/types/ui/tooltip.d.ts +16 -0
- package/types/ui/tooltip.d.ts.map +1 -0
- package/types/utils/logger.d.ts +24 -0
- package/types/utils/logger.d.ts.map +1 -0
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,8 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// Pass breakpoints from CSS to stylesheet, use this to attach behaviors on breakpoints
|
|
6
|
-
import {
|
|
7
|
-
import { removeArrayElement } from "@ulu/utils/array";
|
|
6
|
+
import { removeArrayElement } from "@ulu/utils/array.js";
|
|
8
7
|
import { getName } from "../events/index.js";
|
|
9
8
|
import { log, logError } from "../utils/logger.js";
|
|
10
9
|
|
|
@@ -22,14 +21,18 @@ window.addEventListener(getName("pageResized"), () => {
|
|
|
22
21
|
export class CssBreakpoints {
|
|
23
22
|
static instances = [];
|
|
24
23
|
static defaults = {
|
|
25
|
-
element: document.
|
|
24
|
+
element: document.documentElement,
|
|
25
|
+
valueFromPsuedo: false,
|
|
26
|
+
customProperty: "--breakpoint",
|
|
26
27
|
psuedoSelector: ':before',
|
|
27
28
|
debug: false
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* @param {Object} config Configruation object
|
|
31
32
|
* @param {Array} config.order Required, Array of strings that correspond to the breakpoints setup in the styles, Breakpoints from smallest to largest
|
|
32
|
-
* @param {
|
|
33
|
+
* @param {Array} config.customProperty Property to grab breakpoint from (default is --breakpoint)
|
|
34
|
+
* @param {Array} config.valueFromPsuedo Use the legacy method of grabbing breakpoint from psuedo element, default uses custom property
|
|
35
|
+
* @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
|
|
33
36
|
* @param {String} config.psuedoSelector Change psuedo selector used to get the breakpoint from the psuedo's content property
|
|
34
37
|
*/
|
|
35
38
|
constructor(config) {
|
|
@@ -48,11 +51,27 @@ export class CssBreakpoints {
|
|
|
48
51
|
this.update(); // Run for the first time, then whenever browser resizes
|
|
49
52
|
CssBreakpoints.instances.push(this);
|
|
50
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Get breakpoint from a psuedo element
|
|
56
|
+
*/
|
|
57
|
+
getBreakpointInPsuedo() {
|
|
58
|
+
return window.getComputedStyle(this.element, this.psuedoSelector).content.replace(/^"|"$/g, '');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get breakpoint from a custom property
|
|
62
|
+
*/
|
|
63
|
+
getBreakpointInProperty() {
|
|
64
|
+
return getComputedStyle(this.element).getPropertyValue(this.customProperty);
|
|
65
|
+
}
|
|
51
66
|
/**
|
|
52
67
|
* Get breakpoint from element (design note: user could override prototype)
|
|
53
68
|
*/
|
|
54
69
|
getBreakpoint() {
|
|
55
|
-
|
|
70
|
+
if (this.valueFromPsuedo) {
|
|
71
|
+
return this.getBreakpointInPsuedo();
|
|
72
|
+
} else {
|
|
73
|
+
return this.getBreakpointInProperty();
|
|
74
|
+
}
|
|
56
75
|
}
|
|
57
76
|
/**
|
|
58
77
|
* Updates the active breakpoint by checking the element and executes handlers on change
|
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.11",
|
|
4
4
|
"description": "Theming library",
|
|
5
5
|
"browser": "js/index.js",
|
|
6
6
|
"main": "index.js",
|
|
@@ -8,9 +8,16 @@
|
|
|
8
8
|
".": "./index.js",
|
|
9
9
|
"./js/*.js": "./js/*.js",
|
|
10
10
|
"./js/*": "./js/*",
|
|
11
|
-
"./scss/*.scss"
|
|
12
|
-
"./scss/*"
|
|
13
|
-
"./scss"
|
|
11
|
+
"./scss/*.scss": "./scss/*.scss",
|
|
12
|
+
"./scss/*": "./scss/*",
|
|
13
|
+
"./scss": "./scss/index.scss"
|
|
14
|
+
},
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
"*": {
|
|
17
|
+
"js/*": [
|
|
18
|
+
"./types/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
14
21
|
},
|
|
15
22
|
"type": "module",
|
|
16
23
|
"scripts": {
|
|
@@ -19,7 +26,8 @@
|
|
|
19
26
|
"docs:preview": "vitepress preview docs-src",
|
|
20
27
|
"docs:update:scss": "node ./docs-src/.vitepress/sassdoc.js",
|
|
21
28
|
"docs:update:scss:debug": "node --inspect-brk ./docs-src/.vitepress/sassdoc.js",
|
|
22
|
-
"docs:build:js": "node ./docs-src/.vitepress/jsdoc.js"
|
|
29
|
+
"docs:build:js": "node ./docs-src/.vitepress/jsdoc.js",
|
|
30
|
+
"types": "npx tsc"
|
|
23
31
|
},
|
|
24
32
|
"repository": {
|
|
25
33
|
"type": "git",
|
|
@@ -41,7 +49,6 @@
|
|
|
41
49
|
},
|
|
42
50
|
"homepage": "https://github.com/Jscherbe/frontend#readme",
|
|
43
51
|
"devDependencies": {
|
|
44
|
-
"@ulu/utils": "^0.0.4",
|
|
45
52
|
"@ulu/vitepress-auto-menus": "^0.0.3",
|
|
46
53
|
"@ulu/vitepress-sassdoc": "^0.0.6",
|
|
47
54
|
"clean-jsdoc-theme": "^4.2.17",
|
|
@@ -49,6 +56,10 @@
|
|
|
49
56
|
"jsdoc": "^4.0.2",
|
|
50
57
|
"jsdoc-to-markdown": "^8.0.0",
|
|
51
58
|
"sass": "^1.51.0",
|
|
59
|
+
"typescript": "^5.3.3",
|
|
52
60
|
"vitepress": "^1.0.0-rc.27"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@ulu/utils": "^0.0.6"
|
|
53
64
|
}
|
|
54
65
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Triggers one of our custom events
|
|
3
|
+
* @param {String} type Type of event to dispatch
|
|
4
|
+
* @param {Node} context Element to trigger the event from
|
|
5
|
+
* @example
|
|
6
|
+
* if (updatedMarkup) {
|
|
7
|
+
* dispatch("pageModified", modalElement);
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export function dispatch(type: string, context: Node): void;
|
|
11
|
+
/**
|
|
12
|
+
* Handles the actual event names being used (future could namespace)
|
|
13
|
+
* @param {String} type Type of event to get the actual event name for
|
|
14
|
+
* @returns {String}
|
|
15
|
+
*/
|
|
16
|
+
export function getName(type: string): string;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../js/events/index.js"],"names":[],"mappings":"AAoBA;;;;;;;;GAQG;AACH,gDANW,IAAI,QAYd;AAED;;;;GAIG;AACH,8CAEC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class
|
|
3
|
+
* Class that provides method for retrieving and acting on breakpoints passed
|
|
4
|
+
* from CSS (using element psuedo content prop)
|
|
5
|
+
*/
|
|
6
|
+
export class CssBreakpoints {
|
|
7
|
+
static instances: any[];
|
|
8
|
+
static defaults: {
|
|
9
|
+
element: HTMLElement;
|
|
10
|
+
valueFromPsuedo: boolean;
|
|
11
|
+
customProperty: string;
|
|
12
|
+
psuedoSelector: string;
|
|
13
|
+
debug: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @param {Object} config Configruation object
|
|
17
|
+
* @param {Array} config.order Required, Array of strings that correspond to the breakpoints setup in the styles, Breakpoints from smallest to largest
|
|
18
|
+
* @param {Array} config.customProperty Property to grab breakpoint from (default is --breakpoint)
|
|
19
|
+
* @param {Array} config.valueFromPsuedo Use the legacy method of grabbing breakpoint from psuedo element, default uses custom property
|
|
20
|
+
* @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
|
|
21
|
+
* @param {String} config.psuedoSelector Change psuedo selector used to get the breakpoint from the psuedo's content property
|
|
22
|
+
*/
|
|
23
|
+
constructor(config: {
|
|
24
|
+
order: any[];
|
|
25
|
+
customProperty: any[];
|
|
26
|
+
valueFromPsuedo: any[];
|
|
27
|
+
element: Node;
|
|
28
|
+
psuedoSelector: string;
|
|
29
|
+
});
|
|
30
|
+
active: any;
|
|
31
|
+
previous: any;
|
|
32
|
+
activeIndex: any;
|
|
33
|
+
resizeDirection: string;
|
|
34
|
+
previousIndex: any;
|
|
35
|
+
breakpoints: {};
|
|
36
|
+
/**
|
|
37
|
+
* Get breakpoint from a psuedo element
|
|
38
|
+
*/
|
|
39
|
+
getBreakpointInPsuedo(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Get breakpoint from a custom property
|
|
42
|
+
*/
|
|
43
|
+
getBreakpointInProperty(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Get breakpoint from element (design note: user could override prototype)
|
|
46
|
+
*/
|
|
47
|
+
getBreakpoint(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Updates the active breakpoint by checking the element and executes handlers on change
|
|
50
|
+
*/
|
|
51
|
+
update(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Get a breakpoint by key
|
|
54
|
+
* @param {String} name The name of the breakpoint to get
|
|
55
|
+
*/
|
|
56
|
+
at(name: string): any;
|
|
57
|
+
}
|
|
58
|
+
export default CssBreakpoints;
|
|
59
|
+
//# sourceMappingURL=css-breakpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css-breakpoint.d.ts","sourceRoot":"","sources":["../../js/helpers/css-breakpoint.js"],"names":[],"mappings":"AAeA;;;;GAIG;AACH;IACE,wBAAsB;IACtB;;;;;;MAMC;IACD;;;;;;;OAOG;IACH;QANyB,KAAK;QACL,cAAc;QACd,eAAe;QAChB,OAAO,EAApB,IAAI;QACW,cAAc;OAiBvC;IAVC,YAAkB;IAClB,cAAoB;IACpB,iBAAuB;IACvB,wBAA2B;IAC3B,mBAAyB;IACzB,gBAAqB;IAMvB;;OAEG;IACH,gCAEC;IACD;;OAEG;IACH,kCAEC;IACD;;OAEG;IACH,wBAMC;IACD;;OAEG;IACH,eAuCC;IACD;;;OAGG;IACH,sBAMC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default FileSave;
|
|
2
|
+
/**
|
|
3
|
+
* @module helpers/file-save
|
|
4
|
+
*/
|
|
5
|
+
declare class FileSave {
|
|
6
|
+
static isBrowserSupported(): boolean;
|
|
7
|
+
constructor(data: any, options: any);
|
|
8
|
+
filename: string;
|
|
9
|
+
type: string;
|
|
10
|
+
data: any;
|
|
11
|
+
blob: Blob;
|
|
12
|
+
url: string;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
getUrl(): string;
|
|
15
|
+
createLink(text: any): any;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=file-save.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-save.d.ts","sourceRoot":"","sources":["../../js/helpers/file-save.js"],"names":[],"mappings":";AAAA;;GAEG;AAoBH;IAwBE,qCAEC;IAzBD,qCAQC;IAPC,iBAAmC;IACnC,aAAsC;IAGtC,UAAgB;IAChB,WAAiD;IACjD,YAAyC;IAE3C,gBAEC;IACD,iBAEC;IACD,2BAOC;CAIF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module helpers/node-data-manager
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Class that provides a method to store data based on node/element
|
|
6
|
+
*/
|
|
7
|
+
export default class NodeDataManager {
|
|
8
|
+
store: any[];
|
|
9
|
+
/**
|
|
10
|
+
* Get data for an element/node
|
|
11
|
+
* @param {Node} node Html Node/Element to get data for
|
|
12
|
+
* @param {String|Boolean} key If key is passed, return that key's data for the element, if falsey return elements complete dataset
|
|
13
|
+
*/
|
|
14
|
+
get(node: Node, key?: string | boolean): any;
|
|
15
|
+
/**
|
|
16
|
+
* Bind data to a specific Node/Element
|
|
17
|
+
* @param {Node} node Html Node/Element to get data for
|
|
18
|
+
* @param {String} key Key to save the data under
|
|
19
|
+
* @param {*} value Value to save
|
|
20
|
+
*/
|
|
21
|
+
set(node: Node, key: string, value: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* Return an elements store object
|
|
24
|
+
*/
|
|
25
|
+
find(node: any): any;
|
|
26
|
+
/**
|
|
27
|
+
* Destroy all references to data and nodes/elements
|
|
28
|
+
*/
|
|
29
|
+
destroy(): void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Child class that provides a store for one specific node/element
|
|
33
|
+
*/
|
|
34
|
+
export class NodeDataStore {
|
|
35
|
+
constructor(node: any, data: any);
|
|
36
|
+
node: any;
|
|
37
|
+
data: any;
|
|
38
|
+
set(key: any, value: any): void;
|
|
39
|
+
get(key?: boolean): any;
|
|
40
|
+
remove(key: any): void;
|
|
41
|
+
isNode(node: any): any;
|
|
42
|
+
clearData(): void;
|
|
43
|
+
destroy(): void;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=node-data-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-data-manager.d.ts","sourceRoot":"","sources":["../../js/helpers/node-data-manager.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH;IAEI,aAAe;IAEjB;;;;OAIG;IACH,UAHW,IAAI,QACJ,gBAAc,OAOxB;IACD;;;;;OAKG;IACH,UAJW,IAAI,iCAWd;IACD;;OAEG;IACH,qBAEC;IACD;;OAEG;IACH,gBAGC;CACF;AACD;;GAEG;AACH;IACE,kCAGC;IAFC,UAAgB;IAChB,UAAsB;IAExB,gCAEC;IACD,wBAEC;IACD,uBAEC;IACD,uBAEC;IACD,kBAEC;IACD,gBAGC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Somewhat hacky way to pause the video
|
|
3
|
+
* - https://www.digitalredpanther.com/blog/play-pause-stop-youtube-embed
|
|
4
|
+
* - Actual JS API documentation (Didn't follow this for now) (https://developers.google.com/youtube/iframe_api_reference)
|
|
5
|
+
* @param {Element|Node} context The DOM element to search for and pause videos within
|
|
6
|
+
*/
|
|
7
|
+
export function pauseVideos(context?: Element | Node): void;
|
|
8
|
+
/**
|
|
9
|
+
* Prep videos to be paused
|
|
10
|
+
* - Add query parameters for js API
|
|
11
|
+
* - Removes all other query parameters from iframe.src
|
|
12
|
+
*/
|
|
13
|
+
export function prepVideos(context?: Document): void;
|
|
14
|
+
//# sourceMappingURL=pause-youtube-video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pause-youtube-video.d.ts","sourceRoot":"","sources":["../../js/helpers/pause-youtube-video.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,sCAFW,OAAO,GAAC,IAAI,QAWtB;AACD;;;;GAIG;AACH,qDAQC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module helpers/scrollbar-width-property
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Sets a CSS custom property equal to the scrollbar width
|
|
6
|
+
* @param {Node} element The element that is the child of a scrollabel container
|
|
7
|
+
* @param {Node} container The container that can be scrolled
|
|
8
|
+
* @param {Stirng} propName Custom property to set
|
|
9
|
+
*/
|
|
10
|
+
export default function addScrollbarProperty(element?: Node, container?: Node, propName?: Stirng): void;
|
|
11
|
+
//# sourceMappingURL=scrollbar-width-property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollbar-width-property.d.ts","sourceRoot":"","sources":["../../js/helpers/scrollbar-width-property.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,uDAJW,IAAI,cACJ,IAAI,2BAMd"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../js/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export class Flipcard {
|
|
2
|
+
static instances: any[];
|
|
3
|
+
static defaults: {
|
|
4
|
+
namespace: string;
|
|
5
|
+
proxyClick: {
|
|
6
|
+
allowSelection: boolean;
|
|
7
|
+
selectionMin: number;
|
|
8
|
+
exclude: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
constructor(container: any, front: any, back: any, config: any, debug?: boolean);
|
|
12
|
+
options: any;
|
|
13
|
+
debug: boolean;
|
|
14
|
+
elements: {
|
|
15
|
+
container: any;
|
|
16
|
+
front: any;
|
|
17
|
+
back: any;
|
|
18
|
+
};
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
uid: string;
|
|
21
|
+
stateAttr: string;
|
|
22
|
+
toggle(): void;
|
|
23
|
+
setup(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Click handler on everything on container
|
|
26
|
+
* - Determines if click was something that should be ignored (link, etc)
|
|
27
|
+
*/
|
|
28
|
+
onProxyClick({ target }: {
|
|
29
|
+
target: any;
|
|
30
|
+
}): void;
|
|
31
|
+
getClass(child: any): any;
|
|
32
|
+
createControlContent(): string;
|
|
33
|
+
setVisiblity(visible: any): void;
|
|
34
|
+
containerCss(): string;
|
|
35
|
+
panelCss(zIndex?: number): string;
|
|
36
|
+
}
|
|
37
|
+
export default Flipcard;
|
|
38
|
+
//# sourceMappingURL=flipcard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flipcard.d.ts","sourceRoot":"","sources":["../../js/ui/flipcard.js"],"names":[],"mappings":"AAgBA;IACE,wBAAsB;IACtB;;;;;;;MAOC;IACD,iFAgBC;IAZC,aAA2D;IAI3D,eAA+B;IAC/B;;;;MAA0C;IAC1C,gBAAmB;IACnB,YAA6D;IAC7D,kBAA0D;IAK5D,eAEC;IACD,cAqCC;IACD;;;OAGG;IACH;;aAQC;IACD,0BAGC;IACD,+BAIC;IACD,iCASC;IACD,uBAWC;IACD,kCAKC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sets up document for grid position classes
|
|
3
|
+
* @param {String} selector The selector for the parent element
|
|
4
|
+
* @param {Object} classes Classes (optional) @see setPositionClasses
|
|
5
|
+
*/
|
|
6
|
+
export function init(selector: string, classes: any): void;
|
|
7
|
+
/**
|
|
8
|
+
* Goes through document and finds elements that need to have positioning classes
|
|
9
|
+
* @param {String} selector The selector for the parent element
|
|
10
|
+
* @param {Object} classes Classes (optional) @see setPositionClasses
|
|
11
|
+
*/
|
|
12
|
+
export function setup(selector: string, classes: any): void;
|
|
13
|
+
/**
|
|
14
|
+
* Sets up the positonal classes that would come from the equal
|
|
15
|
+
* height module. Needs to be rerun by user when layout changes
|
|
16
|
+
* or new instances are added to the screen
|
|
17
|
+
* - Used for gutter crops
|
|
18
|
+
* - Used for rule placement
|
|
19
|
+
* - **Devs** Remember that default classes should match sass defaults
|
|
20
|
+
* @param {Node} parent The grid parent <data-grid="">
|
|
21
|
+
* @param {Object} classes Override the default equal heights classes
|
|
22
|
+
*/
|
|
23
|
+
export function setPositionClasses(parent: Node, classes?: any): void;
|
|
24
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../js/ui/grid.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,2DAIC;AAED;;;;GAIG;AACH,4DAEC;AAED;;;;;;;;;GASG;AACH,2CAHa,IAAI,uBAqChB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export function attachTriggers(context?: Document): void;
|
|
2
|
+
/**
|
|
3
|
+
* Function to setup each modal
|
|
4
|
+
* - Creates structure
|
|
5
|
+
* - Gets settings from elements data attrite
|
|
6
|
+
* - Moves it to the end of the document
|
|
7
|
+
* - Adds resizer if position (left || right)
|
|
8
|
+
* @param {Node} modal Modal element ie. `[data-site-modal]`
|
|
9
|
+
* @param {Object} settings Custom settings object to merge, same interface as `[data-site-modal]` settings
|
|
10
|
+
*/
|
|
11
|
+
export function setupModal(modal: Node, settings: any): void;
|
|
12
|
+
/**
|
|
13
|
+
* Intialize all modals on the page
|
|
14
|
+
* - can be used after AJAX adds content
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Open a modal
|
|
18
|
+
* @param {String} id The id of the modal to open
|
|
19
|
+
*/
|
|
20
|
+
export function show(id: string, config: any): void;
|
|
21
|
+
/**
|
|
22
|
+
* Close a modal
|
|
23
|
+
* @param {String} id The id of the modal to open
|
|
24
|
+
*/
|
|
25
|
+
export function close(id: string): void;
|
|
26
|
+
export const triggerAttr: "data-site-modal-trigger";
|
|
27
|
+
//# sourceMappingURL=modals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modals.d.ts","sourceRoot":"","sources":["../../js/ui/modals.js"],"names":[],"mappings":"AA6DA,yDAeC;AAED;;;;;;;;GAQG;AACH,kCAHW,IAAI,uBAmFd;AACD;;;GAGG;AAIH;;;GAGG;AACH,oDAGC;AACD;;;GAGG;AACH,wCAEC;AAlKD,oDAA8C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ui/overflow-scroller-pager
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Function to be used in overflow scrollers "amount" option. This function will
|
|
6
|
+
* determine how many items can fit in the viewport, taking into account scroll padding left,
|
|
7
|
+
* and will set the scroll amount to paginate between items. Items size can be anything
|
|
8
|
+
* (ie. one per screen vs 3.5 per screen will both work). This seperated from the plugin
|
|
9
|
+
* for tree shaking incase it's unneeded. Currently this is only setup for horizontal scrolling
|
|
10
|
+
*
|
|
11
|
+
* Note: This is setup to return the function, incase configuration is needed in the future
|
|
12
|
+
* it can be passed to the create function
|
|
13
|
+
*
|
|
14
|
+
* @return {Function} A function to be used in overflow scrollers "amount" configuration property
|
|
15
|
+
*/
|
|
16
|
+
export default function create(): Function;
|
|
17
|
+
//# sourceMappingURL=overflow-scroller-pager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-scroller-pager.d.ts","sourceRoot":"","sources":["../../js/ui/overflow-scroller-pager.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AAEH,2CA4CC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class OverflowScroller {
|
|
2
|
+
static instances: any[];
|
|
3
|
+
static defaults: {
|
|
4
|
+
namespace: string;
|
|
5
|
+
events: {};
|
|
6
|
+
horizontal: boolean;
|
|
7
|
+
offsetStart: number;
|
|
8
|
+
offsetEnd: number;
|
|
9
|
+
amount: string;
|
|
10
|
+
};
|
|
11
|
+
constructor(elements: any, config: any);
|
|
12
|
+
options: any;
|
|
13
|
+
elements: any;
|
|
14
|
+
nextEnabled: boolean;
|
|
15
|
+
previousEnabled: boolean;
|
|
16
|
+
scrollHandler: (e: any) => void;
|
|
17
|
+
checkOverflow(): void;
|
|
18
|
+
hasOverflow: boolean;
|
|
19
|
+
createControls(context: any): {
|
|
20
|
+
controls: HTMLUListElement;
|
|
21
|
+
previousItem: HTMLLIElement;
|
|
22
|
+
nextItem: HTMLLIElement;
|
|
23
|
+
previous: HTMLButtonElement;
|
|
24
|
+
next: HTMLButtonElement;
|
|
25
|
+
};
|
|
26
|
+
createControlButton(action: any): HTMLButtonElement;
|
|
27
|
+
getControlContent(action: any): string;
|
|
28
|
+
onScroll(event: any): void;
|
|
29
|
+
onScrollHorizontal(): void;
|
|
30
|
+
setControlState(dir: any, enabled: any): void;
|
|
31
|
+
resolveAmount(dir: any): any;
|
|
32
|
+
next(): void;
|
|
33
|
+
previous(): void;
|
|
34
|
+
getClass(child: any): string;
|
|
35
|
+
}
|
|
36
|
+
export default OverflowScroller;
|
|
37
|
+
//# sourceMappingURL=overflow-scroller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-scroller.d.ts","sourceRoot":"","sources":["../../js/ui/overflow-scroller.js"],"names":[],"mappings":"AAkBA;IACE,wBAAsB;IACtB;;;;;;;MAOC;IACD,wCAeC;IAdC,aAAmE;IAInE,cAGC;IACD,qBAAuB;IACvB,yBAA2B;IAC3B,gCAA4C;IAK9C,sBAGC;IADC,qBAAwD;IAE1D;;;;;;MA2BC;IACD,oDAOC;IACD,uCAKC;IACD,2BAGC;IACD,2BAiBC;IACD,8CAeC;IACD,6BAaC;IACD,aAMC;IACD,iBAMC;IACD,6BAGC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"programmatic-modal.d.ts","sourceRoot":"","sources":["../../js/ui/programmatic-modal.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default class ElementResizer {
|
|
2
|
+
static defaults: {
|
|
3
|
+
debug: boolean;
|
|
4
|
+
overrideMaxWidth: boolean;
|
|
5
|
+
fromLeft: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {Node} container Container to be resize
|
|
10
|
+
* @param {Node} control Resize handle element
|
|
11
|
+
* @param {Object} options Defualt can be changed on class
|
|
12
|
+
* @param {Boolean} options.debug Enable non-essential debugging logs
|
|
13
|
+
* @param {Boolean} options.overrideMaxWidth When script is activated by handle remove the elements max-width and allow the width of the resize to exceed the max (default false)
|
|
14
|
+
* @param {Boolean} options.fromLeft The script should assume the handle is on the left side of the element
|
|
15
|
+
*/
|
|
16
|
+
constructor(container: Node, control: Node, options: {
|
|
17
|
+
debug: boolean;
|
|
18
|
+
overrideMaxWidth: boolean;
|
|
19
|
+
fromLeft: boolean;
|
|
20
|
+
});
|
|
21
|
+
options: any;
|
|
22
|
+
container: Node;
|
|
23
|
+
control: Node;
|
|
24
|
+
handlerMousedown: any;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
onMousedown(e: any): void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=resizer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizer.d.ts","sourceRoot":"","sources":["../../js/ui/resizer.js"],"names":[],"mappings":"AAeA;IACE;;;;MAIE;IACF;;;;;;;;OAQG;IACH,uBAPW,IAAI,WACJ,IAAI;QAEa,KAAK;QACL,gBAAgB;QAChB,QAAQ;OAWnC;IALC,aAAkE;IAClE,gBAA0B;IAC1B,cAAsB;IACtB,sBAAmD;IAGrD,gBAEC;IACD,0BAkBC;CACF"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export class Slider {
|
|
2
|
+
static instances: any[];
|
|
3
|
+
static defaults: {
|
|
4
|
+
classAccessiblyHidden: string;
|
|
5
|
+
namespace: string;
|
|
6
|
+
events: {};
|
|
7
|
+
transition: boolean;
|
|
8
|
+
transitionFade: boolean;
|
|
9
|
+
transitionDuration: number;
|
|
10
|
+
transitionDurationExit: number;
|
|
11
|
+
transitionTimingFunction: string;
|
|
12
|
+
};
|
|
13
|
+
constructor(elements: any, config: any, debug?: boolean);
|
|
14
|
+
debug: boolean;
|
|
15
|
+
options: any;
|
|
16
|
+
slide: {
|
|
17
|
+
element: any;
|
|
18
|
+
index: number;
|
|
19
|
+
number: number;
|
|
20
|
+
};
|
|
21
|
+
index: any;
|
|
22
|
+
transitioning: boolean;
|
|
23
|
+
slides: {
|
|
24
|
+
element: any;
|
|
25
|
+
index: number;
|
|
26
|
+
number: number;
|
|
27
|
+
}[];
|
|
28
|
+
elements: any;
|
|
29
|
+
transition: ({ slide, old }: {
|
|
30
|
+
slide: any;
|
|
31
|
+
old: any;
|
|
32
|
+
}) => any;
|
|
33
|
+
/**
|
|
34
|
+
* Sliding mechanism needs translate updated on resize
|
|
35
|
+
*/
|
|
36
|
+
handleResize(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Goto to the previous slide
|
|
39
|
+
*/
|
|
40
|
+
previous(event: any): void;
|
|
41
|
+
/**
|
|
42
|
+
* Goto to the next slide
|
|
43
|
+
*/
|
|
44
|
+
next(event: any): void;
|
|
45
|
+
/**
|
|
46
|
+
* Makes sure that no matter what the callback is called if transition event
|
|
47
|
+
* doesn't start or fails to finish/cancel
|
|
48
|
+
* @param {number} element
|
|
49
|
+
* @param {number} duration Duration to wait for complete
|
|
50
|
+
* @param {Function} beginTransition Css changes to begin/start transtion
|
|
51
|
+
*/
|
|
52
|
+
ensureTranstionEnds(element: number, duration: number, beginTransition: Function): any;
|
|
53
|
+
/**
|
|
54
|
+
* Translate the track to X
|
|
55
|
+
*/
|
|
56
|
+
translateTo(x: any, duration: any): any;
|
|
57
|
+
/**
|
|
58
|
+
* Show's a specifc slide and hides others, except when passing true to show all
|
|
59
|
+
* then all slides will visible
|
|
60
|
+
*/
|
|
61
|
+
setVisibility(activeSlide: any, showAll: any): void;
|
|
62
|
+
/**
|
|
63
|
+
* Perform a fade on a single slide
|
|
64
|
+
*/
|
|
65
|
+
fadeSlide(slide: any, visible: any): any;
|
|
66
|
+
/**
|
|
67
|
+
* Handler for the entire slide transtion
|
|
68
|
+
*/
|
|
69
|
+
slideTransition({ slide, index, old, oldIndex, triggerType }: {
|
|
70
|
+
slide: any;
|
|
71
|
+
index: any;
|
|
72
|
+
old: any;
|
|
73
|
+
oldIndex: any;
|
|
74
|
+
triggerType: any;
|
|
75
|
+
}): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Handler for the entire fade transtion
|
|
78
|
+
*/
|
|
79
|
+
fadeTransition({ slide, old }: {
|
|
80
|
+
slide: any;
|
|
81
|
+
old: any;
|
|
82
|
+
}): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Handler for the entire NO transtion
|
|
85
|
+
*/
|
|
86
|
+
noTransition({ slide, old }: {
|
|
87
|
+
slide: any;
|
|
88
|
+
old: any;
|
|
89
|
+
}): any;
|
|
90
|
+
goto(index: any, event: any, triggerType: any): void;
|
|
91
|
+
setup(): void;
|
|
92
|
+
trackContainerStyles(): string;
|
|
93
|
+
transitionCss(property: any): string;
|
|
94
|
+
trackCss(): string;
|
|
95
|
+
slideCss(): string;
|
|
96
|
+
getClass(child: any, modifier: any): any;
|
|
97
|
+
createControlButton(action: any): HTMLButtonElement;
|
|
98
|
+
createControls(context: any): {
|
|
99
|
+
controls: HTMLUListElement;
|
|
100
|
+
previousItem: HTMLLIElement;
|
|
101
|
+
nextItem: HTMLLIElement;
|
|
102
|
+
previous: HTMLButtonElement;
|
|
103
|
+
next: HTMLButtonElement;
|
|
104
|
+
};
|
|
105
|
+
createNav(container: any): {
|
|
106
|
+
nav: HTMLUListElement;
|
|
107
|
+
navButtons: any[];
|
|
108
|
+
navItems: HTMLLIElement[];
|
|
109
|
+
};
|
|
110
|
+
createNavButton(slide: any, index: any): HTMLButtonElement;
|
|
111
|
+
getControlContent(action: any): string;
|
|
112
|
+
getNavContent(number: any): string;
|
|
113
|
+
emit(name: any, args: any): void;
|
|
114
|
+
}
|
|
115
|
+
export default Slider;
|
|
116
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../js/ui/slider.js"],"names":[],"mappings":"AAoDA;IACE,wBAAsB;IACtB;;;;;;;;;MAWC;IAED,yDAiCC;IA/BC,eAA+B;IAC/B,aAAsB;IACtB;;;;MAAiB;IACjB,WAAiB;IACjB,uBAA0B;IAQ1B;;;;QAME;IACF,cAIC;IAED;;;cACuF;IAMzF;;OAEG;IACH,qBAKC;IACD;;OAEG;IACH,2BAOC;IACD;;OAEG;IACH,uBAMC;IACD;;;;;;OAMG;IACH,6BAJW,MAAM,YACN,MAAM,kCAqChB;IACD;;OAEG;IACH,wCASC;IACD;;;OAGG;IACH,oDASC;IACD;;OAEG;IACH,yCAOC;IACD;;OAEG;IACH;;;;;;sBAoDC;IACD;;OAEG;IACH;;;sBAUC;IACD;;OAEG;IACH;;;YAOC;IACD,qDA0CC;IACD,cAYC;IACD,+BAKC;IACD,qCAOC;IACD,mBAQC;IACD,mBASC;IACD,yCASC;IACD,oDAQC;IACD;;;;;;MAwBC;IACD;;;;MAmBC;IACD,2DAQC;IACD,uCAKC;IACD,mCAEC;IACD,iCAIC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../js/ui/tabs.js"],"names":[],"mappings":"AAmBA,8BAAqB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default class Tooltip {
|
|
2
|
+
static defaults: {
|
|
3
|
+
namespace: string;
|
|
4
|
+
describedBy: boolean;
|
|
5
|
+
arrowSize: number;
|
|
6
|
+
classes: any[];
|
|
7
|
+
};
|
|
8
|
+
constructor(context: any, markup: any, config: any);
|
|
9
|
+
options: any;
|
|
10
|
+
context: any;
|
|
11
|
+
element: HTMLDivElement;
|
|
12
|
+
create(markup: any): HTMLDivElement;
|
|
13
|
+
inPage: boolean;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../js/ui/tooltip.js"],"names":[],"mappings":"AAyCA;IACE;;;;;MAKC;IACD,oDAQC;IAJC,aAA0D;IAC1D,aAAsB;IACtB,wBAAkC;IAGpC,oCAkBC;IAHC,gBAAkB;IAIpB,gBAOC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Changes to make to configuration
|
|
3
|
+
* @param {Object} changes
|
|
4
|
+
*/
|
|
5
|
+
export function set(changes: any): void;
|
|
6
|
+
/**
|
|
7
|
+
* Proxy Console.log
|
|
8
|
+
* @param {Object} context Class instance (optional), will rely on classes (debug) property for output
|
|
9
|
+
* @param {...any} messages
|
|
10
|
+
*/
|
|
11
|
+
export function log(context: any, ...messages: any[]): void;
|
|
12
|
+
/**
|
|
13
|
+
* Proxy Console.warn
|
|
14
|
+
* @param {Object} context Class instance (optional), will rely on classes (debug) property for output
|
|
15
|
+
* @param {...any} messages
|
|
16
|
+
*/
|
|
17
|
+
export function logWarning(context: any, ...messages: any[]): void;
|
|
18
|
+
/**
|
|
19
|
+
* Proxy Console.error
|
|
20
|
+
* @param {Object} context Class instance (optional), will rely on classes (debug) property for output
|
|
21
|
+
* @param {...any} messages
|
|
22
|
+
*/
|
|
23
|
+
export function logError(context: any, ...messages: any[]): void;
|
|
24
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../js/utils/logger.js"],"names":[],"mappings":"AAgCA;;;GAGG;AACH,wCAEC;AAED;;;;GAIG;AACH,+CAFe,GAAG,UAMjB;AAED;;;;GAIG;AACH,sDAFe,GAAG,UAMjB;AAED;;;;GAIG;AACH,oDAFe,GAAG,UAMjB"}
|