@record-evolution/widget-navbar 1.0.11 → 1.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/dist/widget-navbar.js
CHANGED
|
@@ -12,7 +12,7 @@ var b = Object.defineProperty, n = (c, t, e, i) => {
|
|
|
12
12
|
};
|
|
13
13
|
const h = class h extends u {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.version = "1.0.
|
|
15
|
+
super(...arguments), this.version = "1.0.12";
|
|
16
16
|
}
|
|
17
17
|
update(t) {
|
|
18
18
|
t.has("theme") && this.registerTheme(this.theme), super.update(t);
|
|
@@ -145,7 +145,7 @@ n([
|
|
|
145
145
|
n([
|
|
146
146
|
d()
|
|
147
147
|
], r.prototype, "themeTitleColor");
|
|
148
|
-
window.customElements.define("widget-navbar-1.0.
|
|
148
|
+
window.customElements.define("widget-navbar-1.0.12", r);
|
|
149
149
|
export {
|
|
150
150
|
r as WidgetNavbar
|
|
151
151
|
};
|
package/package.json
CHANGED
|
@@ -5,38 +5,53 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The main title/brand text displayed in the navigation bar, typically on the left side. Often used for logo text or application name.
|
|
10
|
+
*/
|
|
8
11
|
export type TitleSettings = string;
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
13
|
+
* The route to navigate to when the title is clicked. Use relative paths (e.g., 'home', 'dashboard') that append to the current base URL, or use leadingSlash for absolute paths.
|
|
11
14
|
*/
|
|
12
15
|
export type TitleNavigation = string;
|
|
13
16
|
/**
|
|
14
|
-
*
|
|
17
|
+
* When enabled, prepends '/' to the navigation route making it absolute from the root. When disabled, routes are relative to the current location.
|
|
15
18
|
*/
|
|
16
19
|
export type AddLeadingSlash = boolean;
|
|
17
20
|
/**
|
|
18
|
-
*
|
|
21
|
+
* When enabled, appends '/' to the end of the navigation route. Some routing systems require trailing slashes for proper page matching.
|
|
19
22
|
*/
|
|
20
23
|
export type AddTraillingSlash = boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Font size in pixels for navigation item labels.
|
|
26
|
+
*/
|
|
21
27
|
export type FontSize = number;
|
|
28
|
+
/**
|
|
29
|
+
* Font weight for navigation items (100=thin, 400=normal, 700=bold, 900=black).
|
|
30
|
+
*/
|
|
22
31
|
export type FontWeight = number;
|
|
32
|
+
/**
|
|
33
|
+
* The text displayed for this navigation item. Should be short and descriptive (e.g., 'Dashboard', 'Settings', 'Reports').
|
|
34
|
+
*/
|
|
23
35
|
export type Label = string;
|
|
24
36
|
/**
|
|
25
|
-
*
|
|
37
|
+
* Material icon name to display alongside the label. Find icon names at https://fonts.google.com/icons (e.g., 'home', 'settings', 'dashboard', 'analytics').
|
|
26
38
|
*/
|
|
27
39
|
export type IconName = string;
|
|
28
40
|
/**
|
|
29
|
-
*
|
|
41
|
+
* The destination path when this item is clicked. Use relative paths that append to the current URL, or enable leadingSlash for absolute paths.
|
|
30
42
|
*/
|
|
31
43
|
export type NavigationRoute = string;
|
|
32
44
|
/**
|
|
33
|
-
*
|
|
45
|
+
* When enabled, prepends '/' to this item's route making it absolute from the root.
|
|
34
46
|
*/
|
|
35
47
|
export type AddLeadingSlash1 = boolean;
|
|
36
48
|
/**
|
|
37
|
-
*
|
|
49
|
+
* When enabled, appends '/' to the end of this item's route.
|
|
38
50
|
*/
|
|
39
51
|
export type AddTraillingSlash1 = boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Array of clickable navigation links displayed in the navigation bar. Each item can have a label, icon, and destination route.
|
|
54
|
+
*/
|
|
40
55
|
export type NavigationItems = {
|
|
41
56
|
label?: Label;
|
|
42
57
|
iconName?: IconName;
|
|
@@ -46,6 +61,9 @@ export type NavigationItems = {
|
|
|
46
61
|
[k: string]: unknown;
|
|
47
62
|
}[];
|
|
48
63
|
|
|
64
|
+
/**
|
|
65
|
+
* A horizontal navigation bar widget for creating top-level dashboard navigation. Use this widget to provide consistent navigation across dashboard pages with a clickable title and multiple navigation items. Each item can have an icon and routes to different dashboard sections. Supports customizable styling for font size, weight, and colors. Ideal for multi-page dashboards requiring clear navigation structure and branding.
|
|
66
|
+
*/
|
|
49
67
|
export interface InputData {
|
|
50
68
|
title?: TitleSettings;
|
|
51
69
|
route?: TitleNavigation;
|
|
@@ -55,6 +73,9 @@ export interface InputData {
|
|
|
55
73
|
navItems?: NavigationItems;
|
|
56
74
|
[k: string]: unknown;
|
|
57
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Global styling options applied to all navigation items in the bar.
|
|
78
|
+
*/
|
|
58
79
|
export interface ItemStyle {
|
|
59
80
|
fontSize?: FontSize;
|
|
60
81
|
fontWeight?: FontWeight;
|
|
@@ -62,9 +83,15 @@ export interface ItemStyle {
|
|
|
62
83
|
backgroundColor?: BackgroundColor;
|
|
63
84
|
[k: string]: unknown;
|
|
64
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Text color for navigation item labels.
|
|
88
|
+
*/
|
|
65
89
|
export interface FontColor {
|
|
66
90
|
[k: string]: unknown;
|
|
67
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Background color of the navigation bar.
|
|
94
|
+
*/
|
|
68
95
|
export interface BackgroundColor {
|
|
69
96
|
[k: string]: unknown;
|
|
70
97
|
}
|
|
@@ -1,57 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Input Data",
|
|
3
|
+
"description": "A horizontal navigation bar widget for creating top-level dashboard navigation. Use this widget to provide consistent navigation across dashboard pages with a clickable title and multiple navigation items. Each item can have an icon and routes to different dashboard sections. Supports customizable styling for font size, weight, and colors. Ideal for multi-page dashboards requiring clear navigation structure and branding.",
|
|
3
4
|
"type": "object",
|
|
4
5
|
"properties": {
|
|
5
6
|
"title": {
|
|
6
7
|
"title": "Title Settings",
|
|
8
|
+
"description": "The main title/brand text displayed in the navigation bar, typically on the left side. Often used for logo text or application name.",
|
|
7
9
|
"order": 1,
|
|
8
10
|
"type": "string"
|
|
9
11
|
},
|
|
10
12
|
"route": {
|
|
11
13
|
"title": "Title Navigation",
|
|
12
14
|
"order": 3,
|
|
13
|
-
"description": "
|
|
15
|
+
"description": "The route to navigate to when the title is clicked. Use relative paths (e.g., 'home', 'dashboard') that append to the current base URL, or use leadingSlash for absolute paths.",
|
|
14
16
|
"type": "string"
|
|
15
17
|
},
|
|
16
18
|
"leadingSlash": {
|
|
17
19
|
"title": "Add Leading Slash",
|
|
18
20
|
"order": 4,
|
|
19
|
-
"description": "
|
|
21
|
+
"description": "When enabled, prepends '/' to the navigation route making it absolute from the root. When disabled, routes are relative to the current location.",
|
|
20
22
|
"dataDrivenDisabled": true,
|
|
21
23
|
"type": "boolean"
|
|
22
24
|
},
|
|
23
25
|
"trailingSlash": {
|
|
24
26
|
"title": "Add Trailling Slash",
|
|
25
27
|
"order": 5,
|
|
26
|
-
"description": "
|
|
28
|
+
"description": "When enabled, appends '/' to the end of the navigation route. Some routing systems require trailing slashes for proper page matching.",
|
|
27
29
|
"dataDrivenDisabled": true,
|
|
28
30
|
"type": "boolean"
|
|
29
31
|
},
|
|
30
32
|
"style": {
|
|
31
33
|
"title": "Item Style",
|
|
34
|
+
"description": "Global styling options applied to all navigation items in the bar.",
|
|
32
35
|
"order": 6,
|
|
33
36
|
"type": "object",
|
|
34
37
|
"properties": {
|
|
35
38
|
"fontSize": {
|
|
36
39
|
"title": "Font Size",
|
|
40
|
+
"description": "Font size in pixels for navigation item labels.",
|
|
37
41
|
"order": 1,
|
|
38
42
|
"dataDrivenDisabled": true,
|
|
39
43
|
"type": "number"
|
|
40
44
|
},
|
|
41
45
|
"fontWeight": {
|
|
42
46
|
"title": "Font Weight",
|
|
47
|
+
"description": "Font weight for navigation items (100=thin, 400=normal, 700=bold, 900=black).",
|
|
43
48
|
"order": 3,
|
|
44
49
|
"dataDrivenDisabled": true,
|
|
45
50
|
"type": "number"
|
|
46
51
|
},
|
|
47
52
|
"color": {
|
|
48
53
|
"title": "Font Color",
|
|
54
|
+
"description": "Text color for navigation item labels.",
|
|
49
55
|
"order": 4,
|
|
50
56
|
"type": "color",
|
|
51
57
|
"dataDrivenDisabled": true
|
|
52
58
|
},
|
|
53
59
|
"backgroundColor": {
|
|
54
60
|
"title": "Background Color",
|
|
61
|
+
"description": "Background color of the navigation bar.",
|
|
55
62
|
"order": 4,
|
|
56
63
|
"type": "color",
|
|
57
64
|
"dataDrivenDisabled": true
|
|
@@ -60,6 +67,7 @@
|
|
|
60
67
|
},
|
|
61
68
|
"navItems": {
|
|
62
69
|
"title": "Navigation Items",
|
|
70
|
+
"description": "Array of clickable navigation links displayed in the navigation bar. Each item can have a label, icon, and destination route.",
|
|
63
71
|
"order": 7,
|
|
64
72
|
"type": "array",
|
|
65
73
|
"items": {
|
|
@@ -67,33 +75,34 @@
|
|
|
67
75
|
"properties": {
|
|
68
76
|
"label": {
|
|
69
77
|
"title": "Label",
|
|
78
|
+
"description": "The text displayed for this navigation item. Should be short and descriptive (e.g., 'Dashboard', 'Settings', 'Reports').",
|
|
70
79
|
"order": 1,
|
|
71
80
|
"type": "string"
|
|
72
81
|
},
|
|
73
82
|
"iconName": {
|
|
74
83
|
"title": "Icon Name",
|
|
75
84
|
"order": 2,
|
|
76
|
-
"description": "
|
|
85
|
+
"description": "Material icon name to display alongside the label. Find icon names at https://fonts.google.com/icons (e.g., 'home', 'settings', 'dashboard', 'analytics').",
|
|
77
86
|
"dataDrivenDisabled": true,
|
|
78
87
|
"type": "string"
|
|
79
88
|
},
|
|
80
89
|
"route": {
|
|
81
90
|
"title": "Navigation Route",
|
|
82
91
|
"order": 3,
|
|
83
|
-
"description": "
|
|
92
|
+
"description": "The destination path when this item is clicked. Use relative paths that append to the current URL, or enable leadingSlash for absolute paths.",
|
|
84
93
|
"type": "string"
|
|
85
94
|
},
|
|
86
95
|
"leadingSlash": {
|
|
87
96
|
"title": "Add Leading Slash",
|
|
88
97
|
"order": 4,
|
|
89
|
-
"description": "
|
|
98
|
+
"description": "When enabled, prepends '/' to this item's route making it absolute from the root.",
|
|
90
99
|
"dataDrivenDisabled": true,
|
|
91
100
|
"type": "boolean"
|
|
92
101
|
},
|
|
93
102
|
"trailingSlash": {
|
|
94
103
|
"title": "Add Trailling Slash",
|
|
95
104
|
"order": 5,
|
|
96
|
-
"description": "
|
|
105
|
+
"description": "When enabled, appends '/' to the end of this item's route.",
|
|
97
106
|
"dataDrivenDisabled": true,
|
|
98
107
|
"type": "boolean"
|
|
99
108
|
}
|