@appartmint/mint 0.15.2 → 0.15.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 (45) hide show
  1. package/README.md +3 -3
  2. package/dist/css/mint.css +70 -2
  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 +124 -124
  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 +22 -22
  14. package/dist/js/imports/util/math.d.ts +13 -13
  15. package/dist/js/imports/util/object.d.ts +73 -73
  16. package/dist/js/imports/util/scroll.d.ts +18 -18
  17. package/dist/js/imports/util/selectors.d.ts +121 -121
  18. package/dist/js/imports/util/settings.d.ts +38 -38
  19. package/dist/js/imports/util/text.d.ts +20 -20
  20. package/dist/js/imports/util/window.d.ts +6 -6
  21. package/dist/js/index.d.ts +24 -24
  22. package/dist/js/index.js +344 -344
  23. package/dist/js/index.js.map +1 -1
  24. package/dist/js/index.min.js.map +1 -1
  25. package/dist/js/util.d.ts +77 -77
  26. package/dist/js/util.js +67 -67
  27. package/dist/js/util.js.map +1 -1
  28. package/dist/js/util.min.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/scss/imports/_index.scss +8 -8
  31. package/src/scss/imports/components/_header.scss +3 -1
  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/_index.scss +1 -0
  35. package/src/scss/imports/global/_inputs.scss +63 -0
  36. package/src/scss/imports/global/_structure.scss +8 -2
  37. package/src/scss/imports/global/_themes.scss +4 -0
  38. package/src/scss/imports/util/_index.scss +8 -8
  39. package/src/scss/imports/util/_vars.scss +1 -1
  40. package/src/ts/imports/enum.ts +9 -9
  41. package/src/ts/imports/models/color.ts +96 -96
  42. package/src/ts/imports/util/display.ts +6 -6
  43. package/src/ts/imports/util/event.ts +7 -7
  44. package/src/ts/imports/util/math.ts +17 -17
  45. package/src/ts/imports/util/window.ts +6 -6
@@ -1,125 +1,125 @@
1
- /**
2
- * Main header functionality
3
- * @public
4
- */
5
- export declare class mintHeader {
6
- /**
7
- * Navbar settings
8
- */
9
- settings: {
10
- [key: string]: any;
11
- };
12
- /**
13
- * Frequently-referenced elements
14
- */
15
- el: {
16
- [key: string]: HTMLElement | null;
17
- };
18
- /**
19
- * Initializes and closes the menu
20
- */
21
- constructor(settings?: {
22
- [key: string]: any;
23
- });
24
- /**
25
- * Adds elements to {@link el | `this.el`}
26
- */
27
- attachElements(): void;
28
- /**
29
- * Adds events to the dom
30
- */
31
- attachEvents(): void;
32
- /**
33
- * Adds classes that inform the styles based on settings
34
- */
35
- addClasses(): void;
36
- /**
37
- * Sets the state of the mobile menu
38
- * @param open - `true` to open the menu or `false` to close it
39
- */
40
- setMobileMenu(open?: boolean): void;
41
- /**
42
- * Toggles the state of the mobile menu
43
- */
44
- toggleMobileMenu(): void;
45
- /**
46
- * Sets the state of the provided button's menu
47
- * @param button - Button element to set
48
- * @param open - `true` to open the menu or `false` to close it
49
- */
50
- setMenu(button?: HTMLElement | null, open?: boolean): void;
51
- /**
52
- * Toggles the state of the provided button's menu
53
- * @param button - Button element to toggle
54
- */
55
- toggleMenu(button?: HTMLElement | null): void;
56
- /**
57
- * Closes all submenus of the provided button's menu
58
- * @param button - Button element of the parent menu
59
- */
60
- closeSubMenus(button?: HTMLElement | null): void;
61
- /**
62
- * Closes all sibling menus of the provided button's menu
63
- * @param button - Button element of the sibling menus
64
- */
65
- closeSiblingMenus(button?: HTMLElement | null): void;
66
- /**
67
- * Closes all submenus of the n4vbar
68
- */
69
- closeAllMenus(): void;
70
- /**
71
- * Opens the menu closest to the document's focus
72
- */
73
- openClosestMenu(): void;
74
- /**
75
- * Closes the menu closest to the document's focus
76
- */
77
- closeClosestMenu(): void;
78
- /**
79
- * Toggles the menu closest to the document's focus
80
- */
81
- toggleClosestMenu(): void;
82
- /**
83
- * Closes the mobile menu when the window resizes
84
- */
85
- eHandleResize(): void;
86
- /**
87
- * Closes all submenus when the page is scrolled
88
- */
89
- eHandleScroll(): void;
90
- /**
91
- * Sends the focus to the menu button after tabbing past the last menu item
92
- * @param e - Keyboard event
93
- */
94
- eWrapTab(e: KeyboardEvent): void;
95
- /**
96
- * Handles keypresses on n4vbar buttons
97
- * @param e - Keyboard event
98
- */
99
- eHandleButtonKeypress(e: KeyboardEvent): void;
100
- /**
101
- * Handles keypresses on n4vbar links
102
- * @param e - Keyboard event
103
- */
104
- eHandleLinkKeypress(e: KeyboardEvent): void;
105
- /**
106
- * Handles keypresses on the n4vbar
107
- * @param e - Keyboard event
108
- */
109
- eHandleKeypress(e: KeyboardEvent): void;
110
- /**
111
- * Toggles the mobile menu
112
- */
113
- eToggleMobileMenu(): void;
114
- /**
115
- * Toggles the clicked submenu
116
- * @param e - Mouse event
117
- */
118
- eToggleMenu(e: MouseEvent): void;
119
- /**
120
- * Runs after the mobile menu transitions
121
- */
122
- eTransitionEnd(): void;
123
- }
124
- export default mintHeader;
1
+ /**
2
+ * Main header functionality
3
+ * @public
4
+ */
5
+ export declare class mintHeader {
6
+ /**
7
+ * Navbar settings
8
+ */
9
+ settings: {
10
+ [key: string]: any;
11
+ };
12
+ /**
13
+ * Frequently-referenced elements
14
+ */
15
+ el: {
16
+ [key: string]: HTMLElement | null;
17
+ };
18
+ /**
19
+ * Initializes and closes the menu
20
+ */
21
+ constructor(settings?: {
22
+ [key: string]: any;
23
+ });
24
+ /**
25
+ * Adds elements to {@link el | `this.el`}
26
+ */
27
+ attachElements(): void;
28
+ /**
29
+ * Adds events to the dom
30
+ */
31
+ attachEvents(): void;
32
+ /**
33
+ * Adds classes that inform the styles based on settings
34
+ */
35
+ addClasses(): void;
36
+ /**
37
+ * Sets the state of the mobile menu
38
+ * @param open - `true` to open the menu or `false` to close it
39
+ */
40
+ setMobileMenu(open?: boolean): void;
41
+ /**
42
+ * Toggles the state of the mobile menu
43
+ */
44
+ toggleMobileMenu(): void;
45
+ /**
46
+ * Sets the state of the provided button's menu
47
+ * @param button - Button element to set
48
+ * @param open - `true` to open the menu or `false` to close it
49
+ */
50
+ setMenu(button?: HTMLElement | null, open?: boolean): void;
51
+ /**
52
+ * Toggles the state of the provided button's menu
53
+ * @param button - Button element to toggle
54
+ */
55
+ toggleMenu(button?: HTMLElement | null): void;
56
+ /**
57
+ * Closes all submenus of the provided button's menu
58
+ * @param button - Button element of the parent menu
59
+ */
60
+ closeSubMenus(button?: HTMLElement | null): void;
61
+ /**
62
+ * Closes all sibling menus of the provided button's menu
63
+ * @param button - Button element of the sibling menus
64
+ */
65
+ closeSiblingMenus(button?: HTMLElement | null): void;
66
+ /**
67
+ * Closes all submenus of the n4vbar
68
+ */
69
+ closeAllMenus(): void;
70
+ /**
71
+ * Opens the menu closest to the document's focus
72
+ */
73
+ openClosestMenu(): void;
74
+ /**
75
+ * Closes the menu closest to the document's focus
76
+ */
77
+ closeClosestMenu(): void;
78
+ /**
79
+ * Toggles the menu closest to the document's focus
80
+ */
81
+ toggleClosestMenu(): void;
82
+ /**
83
+ * Closes the mobile menu when the window resizes
84
+ */
85
+ eHandleResize(): void;
86
+ /**
87
+ * Closes all submenus when the page is scrolled
88
+ */
89
+ eHandleScroll(): void;
90
+ /**
91
+ * Sends the focus to the menu button after tabbing past the last menu item
92
+ * @param e - Keyboard event
93
+ */
94
+ eWrapTab(e: KeyboardEvent): void;
95
+ /**
96
+ * Handles keypresses on n4vbar buttons
97
+ * @param e - Keyboard event
98
+ */
99
+ eHandleButtonKeypress(e: KeyboardEvent): void;
100
+ /**
101
+ * Handles keypresses on n4vbar links
102
+ * @param e - Keyboard event
103
+ */
104
+ eHandleLinkKeypress(e: KeyboardEvent): void;
105
+ /**
106
+ * Handles keypresses on the n4vbar
107
+ * @param e - Keyboard event
108
+ */
109
+ eHandleKeypress(e: KeyboardEvent): void;
110
+ /**
111
+ * Toggles the mobile menu
112
+ */
113
+ eToggleMobileMenu(): void;
114
+ /**
115
+ * Toggles the clicked submenu
116
+ * @param e - Mouse event
117
+ */
118
+ eToggleMenu(e: MouseEvent): void;
119
+ /**
120
+ * Runs after the mobile menu transitions
121
+ */
122
+ eTransitionEnd(): void;
123
+ }
124
+ export default mintHeader;
125
125
  //# 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,23 +1,23 @@
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 shuffleCopy(list: any[]): any[];
11
- /**
12
- * Filters the array in place based on a test condition and returns the filtered array.
13
- * This method modifies the original array by removing elements that do not pass the test implemented by the provided function.
14
- *
15
- * @template T The type of elements in the array.
16
- * @param {T[]} list The array to filter, which will be modified in place.
17
- * @param {(item: T) => boolean} test A function that tests each element of the array. Return `true` to keep the element, `false` otherwise.
18
- * @returns {T[]} The original array with only the elements that passed the test.
19
- */
20
- static filter<T>(list: T[], test: (item: T) => boolean): T[];
21
- }
22
- 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 shuffleCopy(list: any[]): any[];
11
+ /**
12
+ * Filters the array in place based on a test condition and returns the filtered array.
13
+ * This method modifies the original array by removing elements that do not pass the test implemented by the provided function.
14
+ *
15
+ * @template T The type of elements in the array.
16
+ * @param {T[]} list The array to filter, which will be modified in place.
17
+ * @param {(item: T) => boolean} test A function that tests each element of the array. Return `true` to keep the element, `false` otherwise.
18
+ * @returns {T[]} The original array with only the elements that passed the test.
19
+ */
20
+ static filter<T>(list: T[], test: (item: T) => boolean): T[];
21
+ }
22
+ export default mintList;
23
23
  //# 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