@appartmint/mint 0.13.3 → 0.13.4

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.
Files changed (43) hide show
  1. package/README.md +3 -3
  2. package/dist/css/mint.css +3 -1
  3. package/dist/css/mint.css.map +1 -1
  4. package/dist/css/mint.min.css +1 -1
  5. package/dist/css/mint.min.css.map +1 -1
  6. package/dist/js/imports/components/header.d.ts +122 -122
  7. package/dist/js/imports/enum.d.ts +9 -9
  8. package/dist/js/imports/models/color.d.ts +31 -31
  9. package/dist/js/imports/models/item.d.ts +69 -69
  10. package/dist/js/imports/util/display.d.ts +6 -6
  11. package/dist/js/imports/util/event.d.ts +6 -6
  12. package/dist/js/imports/util/icon.d.ts +28 -28
  13. package/dist/js/imports/util/list.d.ts +12 -12
  14. package/dist/js/imports/util/math.d.ts +13 -13
  15. package/dist/js/imports/util/object.d.ts +58 -58
  16. package/dist/js/imports/util/selectors.d.ts +145 -145
  17. package/dist/js/imports/util/settings.d.ts +52 -52
  18. package/dist/js/imports/util/text.d.ts +16 -16
  19. package/dist/js/imports/util/window.d.ts +6 -6
  20. package/dist/js/index.d.ts +23 -23
  21. package/dist/js/index.js +329 -329
  22. package/dist/js/index.js.map +1 -1
  23. package/dist/js/index.min.js.map +1 -1
  24. package/dist/js/util.d.ts +77 -77
  25. package/dist/js/util.js +150 -150
  26. package/dist/js/util.js.map +1 -1
  27. package/dist/js/util.min.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/scss/imports/_index.scss +8 -8
  30. package/src/scss/imports/components/_embed.scss +63 -63
  31. package/src/scss/imports/components/_header.scss +1 -0
  32. package/src/scss/imports/components/_index.scss +7 -7
  33. package/src/scss/imports/global/_icons.scss +6 -6
  34. package/src/scss/imports/global/_structure.scss +2 -1
  35. package/src/scss/imports/util/_index.scss +8 -8
  36. package/src/ts/imports/enum.ts +9 -9
  37. package/src/ts/imports/models/color.ts +96 -96
  38. package/src/ts/imports/util/display.ts +6 -6
  39. package/src/ts/imports/util/event.ts +7 -7
  40. package/src/ts/imports/util/list.ts +19 -19
  41. package/src/ts/imports/util/math.ts +17 -17
  42. package/src/ts/imports/util/window.ts +6 -6
  43. package/src/ts/index.ts +33 -33
@@ -1,123 +1,123 @@
1
- /**
2
- * Main header functionality
3
- * @public
4
- */
5
- export declare class mintHeader {
6
- /**
7
- * Last-logged window width
8
- */
9
- lastWidth: number;
10
- /**
11
- * Frequently-referenced elements
12
- */
13
- el: {
14
- [key: string]: HTMLElement | null;
15
- };
16
- /**
17
- * Initializes and closes the menu
18
- */
19
- constructor(settings?: {
20
- [key: string]: any;
21
- });
22
- /**
23
- * Adds elements to {@link el | `this.el`}
24
- */
25
- attachElements(): void;
26
- /**
27
- * Adds events to the dom
28
- */
29
- attachEvents(): void;
30
- /**
31
- * Adds classes that inform the styles
32
- */
33
- addClasses(): void;
34
- /**
35
- * Sets the state of the mobile menu
36
- * @param open - `true` to open the menu or `false` to close it
37
- */
38
- setMobileMenu(open?: boolean): void;
39
- /**
40
- * Toggles the state of the mobile menu
41
- */
42
- toggleMobileMenu(): void;
43
- /**
44
- * Sets the state of the provided button's menu
45
- * @param button - Button element to set
46
- * @param open - `true` to open the menu or `false` to close it
47
- */
48
- setMenu(button?: HTMLElement | null, open?: boolean): void;
49
- /**
50
- * Toggles the state of the provided button's menu
51
- * @param button - Button element to toggle
52
- */
53
- toggleMenu(button?: HTMLElement | null): void;
54
- /**
55
- * Closes all submenus of the provided button's menu
56
- * @param button - Button element of the parent menu
57
- */
58
- closeSubMenus(button?: HTMLElement | null): void;
59
- /**
60
- * Closes all sibling menus of the provided button's menu
61
- * @param button - Button element of the sibling menus
62
- */
63
- closeSiblingMenus(button?: HTMLElement | null): void;
64
- /**
65
- * Closes all submenus of the n4vbar
66
- */
67
- closeAllMenus(): void;
68
- /**
69
- * Opens the menu closest to the document's focus
70
- */
71
- openClosestMenu(): void;
72
- /**
73
- * Closes the menu closest to the document's focus
74
- */
75
- closeClosestMenu(): void;
76
- /**
77
- * Toggles the menu closest to the document's focus
78
- */
79
- toggleClosestMenu(): void;
80
- /**
81
- * Closes the mobile menu when the window resizes
82
- */
83
- eHandleResize(e: Event): void;
84
- /**
85
- * Closes all submenus when the page is scrolled
86
- */
87
- eHandleScroll(): void;
88
- /**
89
- * Sends the focus to the menu button after tabbing past the last menu item
90
- * @param e - Keyboard event
91
- */
92
- eWrapTab(e: KeyboardEvent): void;
93
- /**
94
- * Handles keypresses on n4vbar buttons
95
- * @param e - Keyboard event
96
- */
97
- eHandleButtonKeypress(e: KeyboardEvent): void;
98
- /**
99
- * Handles keypresses on n4vbar links
100
- * @param e - Keyboard event
101
- */
102
- eHandleLinkKeypress(e: KeyboardEvent): void;
103
- /**
104
- * Handles keypresses on the n4vbar
105
- * @param e - Keyboard event
106
- */
107
- eHandleKeypress(e: KeyboardEvent): void;
108
- /**
109
- * Toggles the mobile menu
110
- */
111
- eToggleMobileMenu(): void;
112
- /**
113
- * Toggles the clicked submenu
114
- * @param e - Mouse event
115
- */
116
- eToggleMenu(e: MouseEvent): void;
117
- /**
118
- * Runs after the mobile menu transitions
119
- */
120
- eTransitionEnd(): void;
121
- }
122
- export default mintHeader;
1
+ /**
2
+ * Main header functionality
3
+ * @public
4
+ */
5
+ export declare class mintHeader {
6
+ /**
7
+ * Last-logged window width
8
+ */
9
+ lastWidth: number;
10
+ /**
11
+ * Frequently-referenced elements
12
+ */
13
+ el: {
14
+ [key: string]: HTMLElement | null;
15
+ };
16
+ /**
17
+ * Initializes and closes the menu
18
+ */
19
+ constructor(settings?: {
20
+ [key: string]: any;
21
+ });
22
+ /**
23
+ * Adds elements to {@link el | `this.el`}
24
+ */
25
+ attachElements(): void;
26
+ /**
27
+ * Adds events to the dom
28
+ */
29
+ attachEvents(): void;
30
+ /**
31
+ * Adds classes that inform the styles
32
+ */
33
+ addClasses(): void;
34
+ /**
35
+ * Sets the state of the mobile menu
36
+ * @param open - `true` to open the menu or `false` to close it
37
+ */
38
+ setMobileMenu(open?: boolean): void;
39
+ /**
40
+ * Toggles the state of the mobile menu
41
+ */
42
+ toggleMobileMenu(): void;
43
+ /**
44
+ * Sets the state of the provided button's menu
45
+ * @param button - Button element to set
46
+ * @param open - `true` to open the menu or `false` to close it
47
+ */
48
+ setMenu(button?: HTMLElement | null, open?: boolean): void;
49
+ /**
50
+ * Toggles the state of the provided button's menu
51
+ * @param button - Button element to toggle
52
+ */
53
+ toggleMenu(button?: HTMLElement | null): void;
54
+ /**
55
+ * Closes all submenus of the provided button's menu
56
+ * @param button - Button element of the parent menu
57
+ */
58
+ closeSubMenus(button?: HTMLElement | null): void;
59
+ /**
60
+ * Closes all sibling menus of the provided button's menu
61
+ * @param button - Button element of the sibling menus
62
+ */
63
+ closeSiblingMenus(button?: HTMLElement | null): void;
64
+ /**
65
+ * Closes all submenus of the n4vbar
66
+ */
67
+ closeAllMenus(): void;
68
+ /**
69
+ * Opens the menu closest to the document's focus
70
+ */
71
+ openClosestMenu(): void;
72
+ /**
73
+ * Closes the menu closest to the document's focus
74
+ */
75
+ closeClosestMenu(): void;
76
+ /**
77
+ * Toggles the menu closest to the document's focus
78
+ */
79
+ toggleClosestMenu(): void;
80
+ /**
81
+ * Closes the mobile menu when the window resizes
82
+ */
83
+ eHandleResize(e: Event): void;
84
+ /**
85
+ * Closes all submenus when the page is scrolled
86
+ */
87
+ eHandleScroll(): void;
88
+ /**
89
+ * Sends the focus to the menu button after tabbing past the last menu item
90
+ * @param e - Keyboard event
91
+ */
92
+ eWrapTab(e: KeyboardEvent): void;
93
+ /**
94
+ * Handles keypresses on n4vbar buttons
95
+ * @param e - Keyboard event
96
+ */
97
+ eHandleButtonKeypress(e: KeyboardEvent): void;
98
+ /**
99
+ * Handles keypresses on n4vbar links
100
+ * @param e - Keyboard event
101
+ */
102
+ eHandleLinkKeypress(e: KeyboardEvent): void;
103
+ /**
104
+ * Handles keypresses on the n4vbar
105
+ * @param e - Keyboard event
106
+ */
107
+ eHandleKeypress(e: KeyboardEvent): void;
108
+ /**
109
+ * Toggles the mobile menu
110
+ */
111
+ eToggleMobileMenu(): void;
112
+ /**
113
+ * Toggles the clicked submenu
114
+ * @param e - Mouse event
115
+ */
116
+ eToggleMenu(e: MouseEvent): void;
117
+ /**
118
+ * Runs after the mobile menu transitions
119
+ */
120
+ eTransitionEnd(): void;
121
+ }
122
+ export default mintHeader;
123
123
  //# sourceMappingURL=header.d.ts.map
@@ -1,10 +1,10 @@
1
- /**
2
- * Side Enum
3
- */
4
- export declare enum mintSide {
5
- Top = 0,
6
- Right = 1,
7
- Bottom = 2,
8
- Left = 3
9
- }
1
+ /**
2
+ * Side Enum
3
+ */
4
+ export declare enum mintSide {
5
+ Top = 0,
6
+ Right = 1,
7
+ Bottom = 2,
8
+ Left = 3
9
+ }
10
10
  //# sourceMappingURL=enum.d.ts.map
@@ -1,32 +1,32 @@
1
- /**
2
- * Color
3
- */
4
- export declare class mintColor {
5
- protected static hexBase: number;
6
- protected static hexMax: string;
7
- r: number;
8
- g: number;
9
- b: number;
10
- a: number;
11
- constructor(args: {
12
- [key: string]: number | string;
13
- });
14
- /**
15
- * Constructor from a string argument
16
- */
17
- protected stringConstructor(str: string): void;
18
- /**
19
- * Constructor from a hex argument
20
- */
21
- protected hexConstructor(hex: string): void;
22
- /**
23
- * Constructor from an rgba argument
24
- */
25
- protected rgbConstructor(rgb: string): void;
26
- /**
27
- * Returns the perceived brightness of the color
28
- */
29
- getBrightness(): number;
30
- }
31
- export default mintColor;
1
+ /**
2
+ * Color
3
+ */
4
+ export declare class mintColor {
5
+ protected static hexBase: number;
6
+ protected static hexMax: string;
7
+ r: number;
8
+ g: number;
9
+ b: number;
10
+ a: number;
11
+ constructor(args: {
12
+ [key: string]: number | string;
13
+ });
14
+ /**
15
+ * Constructor from a string argument
16
+ */
17
+ protected stringConstructor(str: string): void;
18
+ /**
19
+ * Constructor from a hex argument
20
+ */
21
+ protected hexConstructor(hex: string): void;
22
+ /**
23
+ * Constructor from an rgba argument
24
+ */
25
+ protected rgbConstructor(rgb: string): void;
26
+ /**
27
+ * Returns the perceived brightness of the color
28
+ */
29
+ getBrightness(): number;
30
+ }
31
+ export default mintColor;
32
32
  //# sourceMappingURL=color.d.ts.map
@@ -1,70 +1,70 @@
1
- /**
2
- * A generic item
3
- * @note - this class must be convertable with JSON
4
- * - only add strings, numbers, booleans, arrays, and objects
5
- */
6
- export declare class mintItem {
7
- /**
8
- * Item settings
9
- */
10
- version?: number;
11
- priority?: number;
12
- price?: number;
13
- level?: number;
14
- size?: number;
15
- num?: number;
16
- width?: number;
17
- height?: number;
18
- centered?: boolean;
19
- disabled?: boolean;
20
- private?: boolean;
21
- /**
22
- * Item properties
23
- */
24
- id?: string;
25
- slug?: string;
26
- name?: string;
27
- title?: string;
28
- subtitle?: string;
29
- description?: string;
30
- category?: string;
31
- type?: string;
32
- unit?: string;
33
- logo?: mintItem;
34
- icon?: string;
35
- position?: string;
36
- transform?: string;
37
- date?: string;
38
- /**
39
- * Item links
40
- */
41
- src?: string;
42
- href?: string;
43
- target?: string;
44
- routerLink?: string[];
45
- /**
46
- * Item data
47
- */
48
- attr?: {
49
- [key: string]: string;
50
- };
51
- params?: {
52
- [key: string]: string;
53
- };
54
- options?: {
55
- [key: string]: string;
56
- };
57
- lists?: {
58
- [key: string]: string[];
59
- };
60
- /**
61
- * Item lists
62
- */
63
- paragraphs?: string[];
64
- classes?: string[];
65
- items?: mintItem[];
66
- images?: mintItem[];
67
- buttons?: mintItem[];
68
- }
69
- export default mintItem;
1
+ /**
2
+ * A generic item
3
+ * @note - this class must be convertable with JSON
4
+ * - only add strings, numbers, booleans, arrays, and objects
5
+ */
6
+ export declare class mintItem {
7
+ /**
8
+ * Item settings
9
+ */
10
+ version?: number;
11
+ priority?: number;
12
+ price?: number;
13
+ level?: number;
14
+ size?: number;
15
+ num?: number;
16
+ width?: number;
17
+ height?: number;
18
+ centered?: boolean;
19
+ disabled?: boolean;
20
+ private?: boolean;
21
+ /**
22
+ * Item properties
23
+ */
24
+ id?: string;
25
+ slug?: string;
26
+ name?: string;
27
+ title?: string;
28
+ subtitle?: string;
29
+ description?: string;
30
+ category?: string;
31
+ type?: string;
32
+ unit?: string;
33
+ logo?: mintItem;
34
+ icon?: string;
35
+ position?: string;
36
+ transform?: string;
37
+ date?: string;
38
+ /**
39
+ * Item links
40
+ */
41
+ src?: string;
42
+ href?: string;
43
+ target?: string;
44
+ routerLink?: string[];
45
+ /**
46
+ * Item data
47
+ */
48
+ attr?: {
49
+ [key: string]: string;
50
+ };
51
+ params?: {
52
+ [key: string]: string;
53
+ };
54
+ options?: {
55
+ [key: string]: string;
56
+ };
57
+ lists?: {
58
+ [key: string]: string[];
59
+ };
60
+ /**
61
+ * Item lists
62
+ */
63
+ paragraphs?: string[];
64
+ classes?: string[];
65
+ items?: mintItem[];
66
+ images?: mintItem[];
67
+ buttons?: mintItem[];
68
+ }
69
+ export default mintItem;
70
70
  //# sourceMappingURL=item.d.ts.map
@@ -1,7 +1,7 @@
1
- /**
2
- * Handles the display of elements
3
- */
4
- export declare abstract class mintDisplay {
5
- }
6
- export default mintDisplay;
1
+ /**
2
+ * Handles the display of elements
3
+ */
4
+ export declare abstract class mintDisplay {
5
+ }
6
+ export default mintDisplay;
7
7
  //# sourceMappingURL=display.d.ts.map
@@ -1,7 +1,7 @@
1
- /**
2
- * Event helper functions
3
- */
4
- export declare abstract class mintEvent {
5
- }
6
- export default mintEvent;
1
+ /**
2
+ * Event helper functions
3
+ */
4
+ export declare abstract class mintEvent {
5
+ }
6
+ export default mintEvent;
7
7
  //# sourceMappingURL=event.d.ts.map
@@ -1,29 +1,29 @@
1
- /**
2
- * Icon helper functions
3
- */
4
- export declare abstract class mintIcon {
5
- /**
6
- * Default icons
7
- */
8
- static icons: {
9
- [key: string]: string;
10
- };
11
- /**
12
- * Appends the given icon to the given selector if there is not already an icon appended
13
- */
14
- static append(icon: string, selector: string): void;
15
- /**
16
- * Updates the icons
17
- * @param icons - the icons to update
18
- */
19
- static update(icons?: {
20
- [key: string]: string | false;
21
- }): void;
22
- /**
23
- * Removes the given icon from the given selector
24
- * @param icon - the icon to remove
25
- */
26
- static remove(icon: string, selector: string): void;
27
- }
28
- export default mintIcon;
1
+ /**
2
+ * Icon helper functions
3
+ */
4
+ export declare abstract class mintIcon {
5
+ /**
6
+ * Default icons
7
+ */
8
+ static icons: {
9
+ [key: string]: string;
10
+ };
11
+ /**
12
+ * Appends the given icon to the given selector if there is not already an icon appended
13
+ */
14
+ static append(icon: string, selector: string): void;
15
+ /**
16
+ * Updates the icons
17
+ * @param icons - the icons to update
18
+ */
19
+ static update(icons?: {
20
+ [key: string]: string | false;
21
+ }): void;
22
+ /**
23
+ * Removes the given icon from the given selector
24
+ * @param icon - the icon to remove
25
+ */
26
+ static remove(icon: string, selector: string): void;
27
+ }
28
+ export default mintIcon;
29
29
  //# sourceMappingURL=icon.d.ts.map
@@ -1,13 +1,13 @@
1
- /**
2
- * List functions for the util library
3
- */
4
- export declare abstract class mintList {
5
- /**
6
- * Returns a copy of the provided list with the items in random order
7
- * @param list - the list to shuffle
8
- * @returns - the shuffled list
9
- */
10
- static shuffle(list: any[]): any[];
11
- }
12
- export default mintList;
1
+ /**
2
+ * List functions for the util library
3
+ */
4
+ export declare abstract class mintList {
5
+ /**
6
+ * Returns a copy of the provided list with the items in random order
7
+ * @param list - the list to shuffle
8
+ * @returns - the shuffled list
9
+ */
10
+ static shuffle(list: any[]): any[];
11
+ }
12
+ export default mintList;
13
13
  //# sourceMappingURL=list.d.ts.map
@@ -1,14 +1,14 @@
1
- /**
2
- * Math functions for the util library
3
- */
4
- export declare abstract class mintMath {
5
- /**
6
- * Get a random integer between min and max
7
- * @param max Maximum value to return
8
- * @param min Minimum value to return (default is 0)
9
- * @returns a random integer between min and max
10
- */
11
- static randomInt(max: number, min?: number): number;
12
- }
13
- export default mintMath;
1
+ /**
2
+ * Math functions for the util library
3
+ */
4
+ export declare abstract class mintMath {
5
+ /**
6
+ * Get a random integer between min and max
7
+ * @param max Maximum value to return
8
+ * @param min Minimum value to return (default is 0)
9
+ * @returns a random integer between min and max
10
+ */
11
+ static randomInt(max: number, min?: number): number;
12
+ }
13
+ export default mintMath;
14
14
  //# sourceMappingURL=math.d.ts.map