@prolibu-suite/cobalt-core 0.11.8 → 0.11.9
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/custom-elements.json +31 -31
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +29 -8
- package/dist/cjs/index-bHoidDwv.js +4 -4
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-438cc876.entry.js +1 -0
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
- package/dist/collection/components/co-color-area/co-color-area.js +2 -2
- package/dist/collection/components/co-color-slider/co-color-slider.js +1 -1
- package/dist/collection/components/co-combobox/co-combobox.js +1 -1
- package/dist/collection/components/co-command-search/co-command-search.js +1 -1
- package/dist/collection/components/co-data-table/co-data-table.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +2 -2
- package/dist/collection/components/co-document-editor/co-document-editor.js +5 -5
- package/dist/collection/components/co-popover/co-popover.js +1 -1
- package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
- package/dist/collection/components/co-ref-field/co-ref-field.js +4 -4
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
- package/dist/collection/components/co-select/co-select.js +1 -1
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +6 -190
- package/dist/collection/components/co-sidebar-nav/sidebar-icon-map.js +205 -0
- package/dist/collection/components/co-toast/co-toast.js +2 -2
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
- package/dist/collection/components/co-tree-item/co-tree-item.js +2 -2
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/esm/co-sidebar-nav.entry.js +29 -8
- package/dist/esm/index-DJkaRtbb.js +4 -4
- package/dist/types/components/co-sidebar-nav/sidebar-icon-map.d.ts +6 -0
- package/package.json +3 -3
- package/dist/cobalt/p-99781b0b.entry.js +0 -1
|
@@ -1,190 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { normalizeText } from "../../utils/normalizeText";
|
|
3
|
-
|
|
4
|
-
const DEFAULT_ICON_MAP = {
|
|
5
|
-
// Directory
|
|
6
|
-
Home: 'house',
|
|
7
|
-
Contacts: 'address-book',
|
|
8
|
-
Companies: 'buildings',
|
|
9
|
-
// Sales
|
|
10
|
-
Presentations: 'presentation-chart',
|
|
11
|
-
Deals: 'handshake',
|
|
12
|
-
Invoices: 'receipt',
|
|
13
|
-
Payments: 'credit-card',
|
|
14
|
-
// Communications
|
|
15
|
-
Conversations: 'chat-circle',
|
|
16
|
-
Channels: 'broadcast',
|
|
17
|
-
ChannelProviders: 'plugs-connected',
|
|
18
|
-
ConversationFlows: 'flow-arrow',
|
|
19
|
-
PhoneNumbers: 'phone',
|
|
20
|
-
// Operations
|
|
21
|
-
Tasks: 'check-square',
|
|
22
|
-
TaskGroups: 'squares-four',
|
|
23
|
-
WorkOrders: 'clipboard-text',
|
|
24
|
-
// Support
|
|
25
|
-
Tickets: 'ticket',
|
|
26
|
-
CaseTypes: 'tag',
|
|
27
|
-
EmailHubs: 'at',
|
|
28
|
-
RoutingRules: 'path',
|
|
29
|
-
// Tools
|
|
30
|
-
Contracts: 'file-text',
|
|
31
|
-
Notes: 'note',
|
|
32
|
-
Meetings: 'video-camera',
|
|
33
|
-
Calls: 'phone-call',
|
|
34
|
-
CloudDrive: 'cloud',
|
|
35
|
-
// Libraries
|
|
36
|
-
Quotes: 'quotes',
|
|
37
|
-
ContentTemplates: 'article',
|
|
38
|
-
MessageTemplates: 'chat-text',
|
|
39
|
-
Skills: 'brain',
|
|
40
|
-
AiAgentProfiles: 'robot',
|
|
41
|
-
// Analytics
|
|
42
|
-
Insights: 'chart-line',
|
|
43
|
-
Dashboards: 'gauge',
|
|
44
|
-
Reports: 'chart-bar',
|
|
45
|
-
// Mailing
|
|
46
|
-
Emails: 'envelope',
|
|
47
|
-
ContactLists: 'users-three',
|
|
48
|
-
EmailCampaigns: 'megaphone',
|
|
49
|
-
// TourStudio
|
|
50
|
-
VirtualTours: 'cube',
|
|
51
|
-
Scenes: 'image',
|
|
52
|
-
Spots: 'map-pin',
|
|
53
|
-
FloorPlans: 'blueprint',
|
|
54
|
-
// Configuration
|
|
55
|
-
Users: 'user',
|
|
56
|
-
UserTeams: 'users',
|
|
57
|
-
UserGroups: 'user-circle-gear',
|
|
58
|
-
Roles: 'shield',
|
|
59
|
-
Workspaces: 'stack',
|
|
60
|
-
AuthenticationRules: 'lock-key',
|
|
61
|
-
OauthApps: 'key',
|
|
62
|
-
ServiceCredentials: 'certificate',
|
|
63
|
-
// Scheduling
|
|
64
|
-
Calendars: 'calendar',
|
|
65
|
-
CalendarPolicies: 'calendar-check',
|
|
66
|
-
CalendarGroups: 'calendar-dots',
|
|
67
|
-
CalendarEvents: 'calendar-plus',
|
|
68
|
-
// Wizards
|
|
69
|
-
ProposalWizards: 'magic-wand',
|
|
70
|
-
WizardGroups: 'folders',
|
|
71
|
-
// Advertising
|
|
72
|
-
AdHubs: 'storefront',
|
|
73
|
-
AdCampaigns: 'flag-banner',
|
|
74
|
-
// Pricing
|
|
75
|
-
Pricebooks: 'book-open',
|
|
76
|
-
PricebookEntries: 'list-numbers',
|
|
77
|
-
Products: 'package',
|
|
78
|
-
Taxes: 'percent',
|
|
79
|
-
ProductGroups: 'stack',
|
|
80
|
-
ProductFamilies: 'tree-structure',
|
|
81
|
-
ProductCategories: 'tag',
|
|
82
|
-
ProductRules: 'gear-six',
|
|
83
|
-
DiscountSchedules: 'piggy-bank',
|
|
84
|
-
// Notifications
|
|
85
|
-
LiveStreams: 'broadcast',
|
|
86
|
-
EventSubscriptions: 'bell-ringing',
|
|
87
|
-
// System
|
|
88
|
-
Stages: 'steps',
|
|
89
|
-
ContactFlows: 'flow-arrow',
|
|
90
|
-
Categories: 'folder-simple',
|
|
91
|
-
CustomFilters: 'funnel',
|
|
92
|
-
Logs: 'list-bullets',
|
|
93
|
-
// Iot
|
|
94
|
-
Devices: 'cpu',
|
|
95
|
-
// Development
|
|
96
|
-
Scripts: 'code',
|
|
97
|
-
Webhooks: 'webhooks-logo',
|
|
98
|
-
Endpoints: 'plug',
|
|
99
|
-
Sites: 'globe',
|
|
100
|
-
HealthChecks: 'heartbeat',
|
|
101
|
-
Plugins: 'puzzle-piece',
|
|
102
|
-
Cobs: 'cube',
|
|
103
|
-
CustomFields: 'textbox',
|
|
104
|
-
CustomUis: 'layout',
|
|
105
|
-
Documentation: 'book-open-text',
|
|
106
|
-
// Docs
|
|
107
|
-
Sections: 'article',
|
|
108
|
-
Articles: 'newspaper',
|
|
109
|
-
// Category-level icons
|
|
110
|
-
Directory: 'address-book',
|
|
111
|
-
Sales: 'currency-dollar',
|
|
112
|
-
Communications: 'chat-teardrop-text',
|
|
113
|
-
Operations: 'gear',
|
|
114
|
-
Support: 'lifebuoy',
|
|
115
|
-
Tools: 'wrench',
|
|
116
|
-
Configuration: 'sliders',
|
|
117
|
-
Analytics: 'chart-pie',
|
|
118
|
-
Mailing: 'envelope-simple',
|
|
119
|
-
Billing: 'money',
|
|
120
|
-
Libraries: 'books',
|
|
121
|
-
Scheduling: 'timer',
|
|
122
|
-
Pricing: 'tag',
|
|
123
|
-
Development: 'terminal',
|
|
124
|
-
AccessControl: 'shield-check',
|
|
125
|
-
Notifications: 'bell',
|
|
126
|
-
System: 'database',
|
|
127
|
-
Iot: 'wifi-high',
|
|
128
|
-
Advertising: 'megaphone',
|
|
129
|
-
Wizards: 'magic-wand',
|
|
130
|
-
TourStudio: 'cube',
|
|
131
|
-
Docs: 'file-text',
|
|
132
|
-
Setup: 'gear-six',
|
|
133
|
-
// Human Resources — Learning
|
|
134
|
-
Learning: 'graduation-cap',
|
|
135
|
-
Programs: 'path',
|
|
136
|
-
Courses: 'chalkboard-teacher',
|
|
137
|
-
Enrollments: 'student',
|
|
138
|
-
Certificates: 'certificate',
|
|
139
|
-
Assessments: 'exam',
|
|
140
|
-
// Human Resources — Recruitment
|
|
141
|
-
Recruitment: 'user-plus',
|
|
142
|
-
Vacancies: 'briefcase',
|
|
143
|
-
Candidates: 'user-list',
|
|
144
|
-
JobApplications: 'read-cv-logo',
|
|
145
|
-
Interviews: 'chats-circle',
|
|
146
|
-
// Human Resources — Asset Management
|
|
147
|
-
AssetManagement: 'package',
|
|
148
|
-
Assets: 'devices',
|
|
149
|
-
AssetAssignments: 'user-switch',
|
|
150
|
-
// Achievements / Recognition
|
|
151
|
-
Recognition: 'hands-clapping',
|
|
152
|
-
Achievements: 'trophy',
|
|
153
|
-
Rewards: 'gift',
|
|
154
|
-
Badges: 'medal',
|
|
155
|
-
BadgeNominations: 'star',
|
|
156
|
-
Prizes: 'trophy',
|
|
157
|
-
RewardsBudgets: 'wallet',
|
|
158
|
-
RedeemedPrizes: 'crown',
|
|
159
|
-
// Sales / Billing extras
|
|
160
|
-
PaymentReceipts: 'hand-coins',
|
|
161
|
-
Coupons: 'seal-percent',
|
|
162
|
-
// Events
|
|
163
|
-
EventManager: 'calendar-star',
|
|
164
|
-
EventProspects: 'users-four',
|
|
165
|
-
BusinessEvents: 'briefcase',
|
|
166
|
-
EventExpense: 'coins',
|
|
167
|
-
// Content
|
|
168
|
-
Content: 'folder-open',
|
|
169
|
-
Portals: 'app-window',
|
|
170
|
-
// Communication Center
|
|
171
|
-
CommunicationCenter: 'headset',
|
|
172
|
-
// Integrations
|
|
173
|
-
Integrations: 'plugs-connected',
|
|
174
|
-
Mcp: 'plug',
|
|
175
|
-
LifecycleHooks: 'arrows-clockwise',
|
|
176
|
-
PaymentProviders: 'credit-card',
|
|
177
|
-
Stripe: 'credit-card',
|
|
178
|
-
ThirdParty: 'plugs-connected',
|
|
179
|
-
Sendgrid: 'paper-plane-tilt',
|
|
180
|
-
Apollo: 'rocket-launch',
|
|
181
|
-
Kaspr: 'identification-card',
|
|
182
|
-
OpenAi: 'robot',
|
|
183
|
-
Ultramsg: 'whatsapp-logo',
|
|
184
|
-
Slack: 'slack-logo',
|
|
185
|
-
Telegram: 'telegram-logo',
|
|
186
|
-
Discord: 'discord-logo',
|
|
187
|
-
};
|
|
3
|
+
import { SIDEBAR_ICON_MAP } from "./sidebar-icon-map";
|
|
188
4
|
/** Ícono de un ítem en modo `min` (sin label): 18 (20 se veía pesado; 16 = el de full, se perdía). */
|
|
189
5
|
const MIN_ICON_SIZE = 18;
|
|
190
6
|
/**
|
|
@@ -257,10 +73,10 @@ export class CoSidebarNav {
|
|
|
257
73
|
}
|
|
258
74
|
parseIconMap() {
|
|
259
75
|
try {
|
|
260
|
-
this.parsedIconMap = Object.assign(Object.assign({},
|
|
76
|
+
this.parsedIconMap = Object.assign(Object.assign({}, SIDEBAR_ICON_MAP), JSON.parse(this.iconMap));
|
|
261
77
|
}
|
|
262
78
|
catch (_a) {
|
|
263
|
-
this.parsedIconMap = Object.assign({},
|
|
79
|
+
this.parsedIconMap = Object.assign({}, SIDEBAR_ICON_MAP);
|
|
264
80
|
}
|
|
265
81
|
}
|
|
266
82
|
parseTranslations() {
|
|
@@ -514,10 +330,10 @@ export class CoSidebarNav {
|
|
|
514
330
|
// `flyout-open` (min mode only) lets the CSS drop the host edge-fade mask
|
|
515
331
|
// while a flyout is shown — a host mask would otherwise clip AND
|
|
516
332
|
// mis-position the fixed flyout (mask makes the host a containing block).
|
|
517
|
-
h(Host, { key: '
|
|
333
|
+
h(Host, { key: 'a7c5661ad2613a6f2c45c37e6def2e4c8d7e9801', class: { 'flyout-open': !!this.flyoutKey } }, h("nav", { key: '597d59612958ab2014a7db0ad561abd1db15524f', class: {
|
|
518
334
|
'co-sidebar-nav': true,
|
|
519
335
|
'co-sidebar-nav--min': this.mode === 'min',
|
|
520
|
-
} }, this.renderSearch(), h("div", { key: '
|
|
336
|
+
} }, this.renderSearch(), h("div", { key: '55a5bb260444a26e3e2228fb08c30c15746994a9', class: "co-sidebar-nav__items" }, items.map(item => this.renderItem(item))))));
|
|
521
337
|
}
|
|
522
338
|
static get is() { return "co-sidebar-nav"; }
|
|
523
339
|
static get encapsulation() { return "shadow"; }
|
|
@@ -720,7 +536,7 @@ export class CoSidebarNav {
|
|
|
720
536
|
"references": {
|
|
721
537
|
"NavigateDetail": {
|
|
722
538
|
"location": "local",
|
|
723
|
-
"path": "/Users/agox/
|
|
539
|
+
"path": "/Users/agox/worktrees/cobalt-sidebar-icons/packages/core/src/components/co-sidebar-nav/co-sidebar-nav.tsx",
|
|
724
540
|
"id": "src/components/co-sidebar-nav/co-sidebar-nav.tsx::NavigateDetail"
|
|
725
541
|
}
|
|
726
542
|
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clave del menú de Prolibu → ícono Phosphor (lo usa `co-sidebar-nav`; el prop `icon-map`
|
|
3
|
+
* lo extiende). Una clave sin entrada cae a `circle`: `sidebar-icon-map.test.ts` cruza este
|
|
4
|
+
* mapa con las claves que manda el backend y verifica que cada ícono exista en Phosphor.
|
|
5
|
+
*/
|
|
6
|
+
export const SIDEBAR_ICON_MAP = {
|
|
7
|
+
// Directory
|
|
8
|
+
Home: 'house',
|
|
9
|
+
Contacts: 'address-book',
|
|
10
|
+
Companies: 'buildings',
|
|
11
|
+
Leads: 'user-focus',
|
|
12
|
+
// Sales
|
|
13
|
+
Presentations: 'presentation-chart',
|
|
14
|
+
Deals: 'handshake',
|
|
15
|
+
TestDrive: 'steering-wheel',
|
|
16
|
+
Invoices: 'receipt',
|
|
17
|
+
Payments: 'credit-card',
|
|
18
|
+
// Communications
|
|
19
|
+
Conversations: 'chat-circle',
|
|
20
|
+
Channels: 'broadcast',
|
|
21
|
+
ChannelProviders: 'plugs-connected',
|
|
22
|
+
ConversationFlows: 'flow-arrow',
|
|
23
|
+
PhoneNumbers: 'phone',
|
|
24
|
+
// Operations
|
|
25
|
+
Tasks: 'check-square',
|
|
26
|
+
TaskGroups: 'squares-four',
|
|
27
|
+
WorkOrders: 'clipboard-text',
|
|
28
|
+
// Support
|
|
29
|
+
Tickets: 'ticket',
|
|
30
|
+
CaseTypes: 'tag',
|
|
31
|
+
EmailHubs: 'at',
|
|
32
|
+
RoutingRules: 'path',
|
|
33
|
+
// Tools
|
|
34
|
+
Contracts: 'file-text',
|
|
35
|
+
Notes: 'note',
|
|
36
|
+
Meetings: 'video-camera',
|
|
37
|
+
Calls: 'phone-call',
|
|
38
|
+
CloudDrive: 'cloud',
|
|
39
|
+
Forms: 'note-pencil',
|
|
40
|
+
// Libraries
|
|
41
|
+
Quotes: 'quotes',
|
|
42
|
+
ContentTemplates: 'article',
|
|
43
|
+
MessageTemplates: 'chat-text',
|
|
44
|
+
Skills: 'brain',
|
|
45
|
+
AiAgentProfiles: 'robot',
|
|
46
|
+
// Analytics
|
|
47
|
+
Insights: 'chart-line',
|
|
48
|
+
Dashboards: 'gauge',
|
|
49
|
+
Reports: 'chart-bar',
|
|
50
|
+
// Mailing
|
|
51
|
+
Emails: 'envelope',
|
|
52
|
+
ContactLists: 'users-three',
|
|
53
|
+
EmailCampaigns: 'megaphone',
|
|
54
|
+
// TourStudio
|
|
55
|
+
VirtualTours: 'cube',
|
|
56
|
+
Scenes: 'image',
|
|
57
|
+
Spots: 'map-pin',
|
|
58
|
+
FloorPlans: 'blueprint',
|
|
59
|
+
// Configuration
|
|
60
|
+
Users: 'user',
|
|
61
|
+
UserTeams: 'users',
|
|
62
|
+
Teams: 'users',
|
|
63
|
+
UserGroups: 'user-circle-gear',
|
|
64
|
+
Roles: 'shield',
|
|
65
|
+
Workspaces: 'stack',
|
|
66
|
+
AuthenticationRules: 'lock-key',
|
|
67
|
+
OauthApps: 'key',
|
|
68
|
+
ServiceCredentials: 'certificate',
|
|
69
|
+
// Scheduling
|
|
70
|
+
Calendars: 'calendar',
|
|
71
|
+
CalendarPolicies: 'calendar-check',
|
|
72
|
+
CalendarGroups: 'calendar-dots',
|
|
73
|
+
CalendarEvents: 'calendar-plus',
|
|
74
|
+
// Wizards
|
|
75
|
+
ProposalWizards: 'magic-wand',
|
|
76
|
+
WizardGroups: 'folders',
|
|
77
|
+
ProposalWizardGroup: 'folders',
|
|
78
|
+
// Advertising
|
|
79
|
+
AdHubs: 'storefront',
|
|
80
|
+
AdCampaigns: 'flag-banner',
|
|
81
|
+
// Pricing
|
|
82
|
+
Pricebooks: 'book-open',
|
|
83
|
+
PricebookEntries: 'list-numbers',
|
|
84
|
+
Products: 'package',
|
|
85
|
+
Taxes: 'percent',
|
|
86
|
+
ProductGroups: 'stack',
|
|
87
|
+
ProductFamilies: 'tree-structure',
|
|
88
|
+
ProductCategories: 'tag',
|
|
89
|
+
ProductRules: 'gear-six',
|
|
90
|
+
DiscountSchedules: 'piggy-bank',
|
|
91
|
+
// Notifications
|
|
92
|
+
LiveStreams: 'broadcast',
|
|
93
|
+
EventSubscriptions: 'bell-ringing',
|
|
94
|
+
// System
|
|
95
|
+
Stages: 'steps',
|
|
96
|
+
ContactFlows: 'flow-arrow',
|
|
97
|
+
Categories: 'folder-simple',
|
|
98
|
+
CustomFilters: 'funnel',
|
|
99
|
+
Logs: 'list-bullets',
|
|
100
|
+
ContactProtocols: 'list-checks',
|
|
101
|
+
Scorings: 'chart-line-up',
|
|
102
|
+
// Iot
|
|
103
|
+
Devices: 'cpu',
|
|
104
|
+
// Development
|
|
105
|
+
Scripts: 'code',
|
|
106
|
+
Webhooks: 'webhooks-logo',
|
|
107
|
+
Endpoints: 'plug',
|
|
108
|
+
Sites: 'globe',
|
|
109
|
+
HealthChecks: 'heartbeat',
|
|
110
|
+
Plugins: 'puzzle-piece',
|
|
111
|
+
Cobs: 'cube',
|
|
112
|
+
CustomFields: 'textbox',
|
|
113
|
+
CustomUis: 'layout',
|
|
114
|
+
Documentation: 'book-open-text',
|
|
115
|
+
// Docs
|
|
116
|
+
Sections: 'article',
|
|
117
|
+
Articles: 'newspaper',
|
|
118
|
+
// Category-level icons
|
|
119
|
+
Directory: 'address-book',
|
|
120
|
+
Sales: 'currency-dollar',
|
|
121
|
+
Communications: 'chat-teardrop-text',
|
|
122
|
+
Operations: 'gear',
|
|
123
|
+
Support: 'lifebuoy',
|
|
124
|
+
Tools: 'wrench',
|
|
125
|
+
Configuration: 'sliders',
|
|
126
|
+
Analytics: 'chart-pie',
|
|
127
|
+
Mailing: 'envelope-simple',
|
|
128
|
+
Billing: 'money',
|
|
129
|
+
Libraries: 'books',
|
|
130
|
+
Scheduling: 'timer',
|
|
131
|
+
Pricing: 'tag',
|
|
132
|
+
Development: 'terminal',
|
|
133
|
+
AccessControl: 'shield-check',
|
|
134
|
+
Notifications: 'bell',
|
|
135
|
+
System: 'database',
|
|
136
|
+
Iot: 'wifi-high',
|
|
137
|
+
Advertising: 'megaphone',
|
|
138
|
+
Wizards: 'magic-wand',
|
|
139
|
+
TourStudio: 'cube',
|
|
140
|
+
Docs: 'file-text',
|
|
141
|
+
Setup: 'gear-six',
|
|
142
|
+
SalesAndMarketing: 'trend-up',
|
|
143
|
+
CustomerService: 'lifebuoy',
|
|
144
|
+
HumanResources: 'identification-badge',
|
|
145
|
+
TicketsSetup: 'ticket',
|
|
146
|
+
CommunicationCenterSetup: 'headset',
|
|
147
|
+
// Inventory
|
|
148
|
+
Inventory: 'warehouse',
|
|
149
|
+
Branches: 'building-office',
|
|
150
|
+
ItemStock: 'barcode',
|
|
151
|
+
// Human Resources — Learning
|
|
152
|
+
Learning: 'graduation-cap',
|
|
153
|
+
Programs: 'path',
|
|
154
|
+
Courses: 'chalkboard-teacher',
|
|
155
|
+
Enrollments: 'student',
|
|
156
|
+
Certificates: 'certificate',
|
|
157
|
+
Assessments: 'exam',
|
|
158
|
+
// Human Resources — Recruitment
|
|
159
|
+
Recruitment: 'user-plus',
|
|
160
|
+
Vacancies: 'briefcase',
|
|
161
|
+
Candidates: 'user-list',
|
|
162
|
+
JobApplications: 'read-cv-logo',
|
|
163
|
+
Interviews: 'chats-circle',
|
|
164
|
+
// Human Resources — Asset Management
|
|
165
|
+
AssetManagement: 'package',
|
|
166
|
+
Assets: 'devices',
|
|
167
|
+
AssetAssignments: 'user-switch',
|
|
168
|
+
// Achievements / Recognition
|
|
169
|
+
Recognition: 'hands-clapping',
|
|
170
|
+
Achievements: 'trophy',
|
|
171
|
+
Rewards: 'gift',
|
|
172
|
+
Badges: 'medal',
|
|
173
|
+
BadgeNominations: 'star',
|
|
174
|
+
Prizes: 'trophy',
|
|
175
|
+
RewardsBudgets: 'wallet',
|
|
176
|
+
RedeemedPrizes: 'crown',
|
|
177
|
+
// Sales / Billing extras
|
|
178
|
+
PaymentReceipts: 'hand-coins',
|
|
179
|
+
Coupons: 'seal-percent',
|
|
180
|
+
// Events
|
|
181
|
+
EventManager: 'calendar-star',
|
|
182
|
+
EventProspects: 'users-four',
|
|
183
|
+
BusinessEvents: 'briefcase',
|
|
184
|
+
EventExpense: 'coins',
|
|
185
|
+
// Content
|
|
186
|
+
Content: 'folder-open',
|
|
187
|
+
Portals: 'app-window',
|
|
188
|
+
// Communication Center
|
|
189
|
+
CommunicationCenter: 'headset',
|
|
190
|
+
// Integrations
|
|
191
|
+
Integrations: 'plugs-connected',
|
|
192
|
+
Mcp: 'plug',
|
|
193
|
+
LifecycleHooks: 'arrows-clockwise',
|
|
194
|
+
PaymentProviders: 'credit-card',
|
|
195
|
+
Stripe: 'credit-card',
|
|
196
|
+
ThirdParty: 'plugs-connected',
|
|
197
|
+
Sendgrid: 'paper-plane-tilt',
|
|
198
|
+
Apollo: 'rocket-launch',
|
|
199
|
+
Kaspr: 'identification-card',
|
|
200
|
+
OpenAi: 'robot',
|
|
201
|
+
Ultramsg: 'whatsapp-logo',
|
|
202
|
+
Slack: 'slack-logo',
|
|
203
|
+
Telegram: 'telegram-logo',
|
|
204
|
+
Discord: 'discord-logo',
|
|
205
|
+
};
|
|
@@ -189,7 +189,7 @@ export class CoToast {
|
|
|
189
189
|
"references": {
|
|
190
190
|
"CoToastActionsLayout": {
|
|
191
191
|
"location": "local",
|
|
192
|
-
"path": "/Users/agox/
|
|
192
|
+
"path": "/Users/agox/worktrees/cobalt-sidebar-icons/packages/core/src/components/co-toast/co-toast.tsx",
|
|
193
193
|
"id": "src/components/co-toast/co-toast.tsx::CoToastActionsLayout"
|
|
194
194
|
}
|
|
195
195
|
}
|
|
@@ -215,7 +215,7 @@ export class CoToast {
|
|
|
215
215
|
"references": {
|
|
216
216
|
"CoToastVariant": {
|
|
217
217
|
"location": "local",
|
|
218
|
-
"path": "/Users/agox/
|
|
218
|
+
"path": "/Users/agox/worktrees/cobalt-sidebar-icons/packages/core/src/components/co-toast/co-toast.tsx",
|
|
219
219
|
"id": "src/components/co-toast/co-toast.tsx::CoToastVariant"
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -214,7 +214,7 @@ export class CoTransferList {
|
|
|
214
214
|
"references": {
|
|
215
215
|
"TransferOption": {
|
|
216
216
|
"location": "local",
|
|
217
|
-
"path": "/Users/agox/
|
|
217
|
+
"path": "/Users/agox/worktrees/cobalt-sidebar-icons/packages/core/src/components/co-transfer-list/co-transfer-list.tsx",
|
|
218
218
|
"id": "src/components/co-transfer-list/co-transfer-list.tsx::TransferOption"
|
|
219
219
|
}
|
|
220
220
|
}
|
|
@@ -243,7 +243,7 @@ export class CoTreeItem {
|
|
|
243
243
|
"references": {
|
|
244
244
|
"TreeItemSelection": {
|
|
245
245
|
"location": "local",
|
|
246
|
-
"path": "/Users/agox/
|
|
246
|
+
"path": "/Users/agox/worktrees/cobalt-sidebar-icons/packages/core/src/components/co-tree-item/co-tree-item.tsx",
|
|
247
247
|
"id": "src/components/co-tree-item/co-tree-item.tsx::TreeItemSelection"
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -269,7 +269,7 @@ export class CoTreeItem {
|
|
|
269
269
|
"references": {
|
|
270
270
|
"TreeItemSize": {
|
|
271
271
|
"location": "local",
|
|
272
|
-
"path": "/Users/agox/
|
|
272
|
+
"path": "/Users/agox/worktrees/cobalt-sidebar-icons/packages/core/src/components/co-tree-item/co-tree-item.tsx",
|
|
273
273
|
"id": "src/components/co-tree-item/co-tree-item.tsx::TreeItemSize"
|
|
274
274
|
}
|
|
275
275
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as a,H as o,c as t,h as i,a as s}from"./index.js";import{n as r}from"./p-Ba_v-MzM.js";import{d as n}from"./p-qMNHMnvI.js";import{d as c}from"./p-DldA2IL3.js";import{d as l}from"./p-DRL-a5hO.js";const d={Home:"house",Contacts:"address-book",Companies:"buildings",Presentations:"presentation-chart",Deals:"handshake",Invoices:"receipt",Payments:"credit-card",Conversations:"chat-circle",Channels:"broadcast",ChannelProviders:"plugs-connected",ConversationFlows:"flow-arrow",PhoneNumbers:"phone",Tasks:"check-square",TaskGroups:"squares-four",WorkOrders:"clipboard-text",Tickets:"ticket",CaseTypes:"tag",EmailHubs:"at",RoutingRules:"path",Contracts:"file-text",Notes:"note",Meetings:"video-camera",Calls:"phone-call",CloudDrive:"cloud",Quotes:"quotes",ContentTemplates:"article",MessageTemplates:"chat-text",Skills:"brain",AiAgentProfiles:"robot",Insights:"chart-line",Dashboards:"gauge",Reports:"chart-bar",Emails:"envelope",ContactLists:"users-three",EmailCampaigns:"megaphone",VirtualTours:"cube",Scenes:"image",Spots:"map-pin",FloorPlans:"blueprint",Users:"user",UserTeams:"users",UserGroups:"user-circle-gear",Roles:"shield",Workspaces:"stack",AuthenticationRules:"lock-key",OauthApps:"key",ServiceCredentials:"certificate",Calendars:"calendar",CalendarPolicies:"calendar-check",CalendarGroups:"calendar-dots",CalendarEvents:"calendar-plus",ProposalWizards:"magic-wand",WizardGroups:"folders",AdHubs:"storefront",AdCampaigns:"flag-banner",Pricebooks:"book-open",PricebookEntries:"list-numbers",Products:"package",Taxes:"percent",ProductGroups:"stack",ProductFamilies:"tree-structure",ProductCategories:"tag",ProductRules:"gear-six",DiscountSchedules:"piggy-bank",LiveStreams:"broadcast",EventSubscriptions:"bell-ringing",Stages:"steps",ContactFlows:"flow-arrow",Categories:"folder-simple",CustomFilters:"funnel",Logs:"list-bullets",Devices:"cpu",Scripts:"code",Webhooks:"webhooks-logo",Endpoints:"plug",Sites:"globe",HealthChecks:"heartbeat",Plugins:"puzzle-piece",Cobs:"cube",CustomFields:"textbox",CustomUis:"layout",Documentation:"book-open-text",Sections:"article",Articles:"newspaper",Directory:"address-book",Sales:"currency-dollar",Communications:"chat-teardrop-text",Operations:"gear",Support:"lifebuoy",Tools:"wrench",Configuration:"sliders",Analytics:"chart-pie",Mailing:"envelope-simple",Billing:"money",Libraries:"books",Scheduling:"timer",Pricing:"tag",Development:"terminal",AccessControl:"shield-check",Notifications:"bell",System:"database",Iot:"wifi-high",Advertising:"megaphone",Wizards:"magic-wand",TourStudio:"cube",Docs:"file-text",Setup:"gear-six",Learning:"graduation-cap",Programs:"path",Courses:"chalkboard-teacher",Enrollments:"student",Certificates:"certificate",Assessments:"exam",Recruitment:"user-plus",Vacancies:"briefcase",Candidates:"user-list",JobApplications:"read-cv-logo",Interviews:"chats-circle",AssetManagement:"package",Assets:"devices",AssetAssignments:"user-switch",Recognition:"hands-clapping",Achievements:"trophy",Rewards:"gift",Badges:"medal",BadgeNominations:"star",Prizes:"trophy",RewardsBudgets:"wallet",RedeemedPrizes:"crown",PaymentReceipts:"hand-coins",Coupons:"seal-percent",EventManager:"calendar-star",EventProspects:"users-four",BusinessEvents:"briefcase",EventExpense:"coins",Content:"folder-open",Portals:"app-window",CommunicationCenter:"headset",Integrations:"plugs-connected",Mcp:"plug",LifecycleHooks:"arrows-clockwise",PaymentProviders:"credit-card",Stripe:"credit-card",ThirdParty:"plugs-connected",Sendgrid:"paper-plane-tilt",Apollo:"rocket-launch",Kaspr:"identification-card",OpenAi:"robot",Ultramsg:"whatsapp-logo",Slack:"slack-logo",Telegram:"telegram-logo",Discord:"discord-logo"},v=a(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coNavigate=t(this,"coNavigate",7),this.coSearch=t(this,"coSearch",7),this.items="{}",this.activeKey="",this.mode="full",this.searchable=!1,this.searchPlaceholder="Search",this.search="",this.iconMap="{}",this.translations="{}",this.searchText="",this.expandedKeys=new Set,this.flyoutKey=null,this.flyoutPosition={top:0,bottom:null,left:0},this.parsedIconMap={},this.parsedTranslations={},this.flyoutTimeout=null,this.handleSearchInput=e=>{this.searchText=e.target.value,this.coSearch.emit(this.searchText)}}onIconMapChange(){this.parseIconMap()}onTranslationsChange(){this.parseTranslations()}onSearchChange(){this.searchText=this.search}onActiveKeyChange(){this.autoExpandForActiveKey()}onItemsChange(){this.autoExpandForActiveKey()}componentWillLoad(){this.parseIconMap(),this.parseTranslations(),this.autoExpandForActiveKey()}componentDidLoad(){}parseIconMap(){try{this.parsedIconMap=Object.assign(Object.assign({},d),JSON.parse(this.iconMap))}catch(e){this.parsedIconMap=Object.assign({},d)}}parseTranslations(){try{this.parsedTranslations=JSON.parse(this.translations)}catch(e){this.parsedTranslations={}}}get parsedItems(){try{const e=JSON.parse(this.items);return Array.isArray(e)?e:this.transformMenuData(e,0)}catch(e){return[]}}transformMenuData(e,a){return Object.keys(e).map((o=>{const t=e[o],i=t.modelName||"object"==typeof t&&!Object.keys(t).some((e=>"object"==typeof t[e]&&"modelName"!==e));return{key:o,label:o,url:t.url,target:t.target,modelName:i?t.modelName:void 0,customIcon:t.customIcon,children:i?void 0:this.transformMenuData(t,a+1),level:a}}))}get filteredItems(){return this.searchText?this.filterRecursive(this.parsedItems,r(this.searchText)):this.parsedItems}filterRecursive(e,a){const o=[];for(const t of e)if(r(this.getLabel(t.key)).includes(a))o.push(t);else if(t.children){const e=this.filterRecursive(t.children,a);e.length>0&&o.push(Object.assign(Object.assign({},t),{children:e}))}return o}autoExpandForActiveKey(){if(!this.activeKey)return;const e=new Set(this.expandedKeys);this.findAndExpandParents(this.parsedItems,this.activeKey,e),this.expandedKeys=e}findAndExpandParents(e,a,o){for(const t of e){if(t.key===a)return!0;if(t.children&&this.findAndExpandParents(t.children,a,o))return o.add(t.key),!0}return!1}getLabel(e){return this.parsedTranslations[e]?this.parsedTranslations[e]:e.replace(/([a-z])([A-Z])/g,"$1 $2")}getIcon(e){return this.parsedIconMap[e]||"circle"}isLeaf(e){return!e.children||0===e.children.length}hasActiveDescendant(e){return e.key===this.activeKey||!!e.children&&e.children.some((e=>this.hasActiveDescendant(e)))}toggleExpand(e){const a=new Set(this.expandedKeys);a.has(e)?a.delete(e):a.add(e),this.expandedKeys=a}handleLeafClick(e){this.flyoutKey=null,this.coNavigate.emit({key:e.key,modelName:e.modelName,url:e.url,target:e.target,customIcon:e.customIcon})}renderSearch(){return this.searchable&&"min"!==this.mode?i("div",{class:"co-sidebar-nav__search"},i("co-icon",{name:"magnifying-glass",size:16}),i("input",{type:"text",class:"co-sidebar-nav__search-input",placeholder:this.searchPlaceholder,value:this.searchText,onInput:this.handleSearchInput}),this.searchText&&i("button",{class:"co-sidebar-nav__search-clear",onClick:()=>{this.searchText="",this.coSearch.emit("")}},i("co-icon",{name:"x",size:14}))):null}renderIcon(e,a=16){if(e.customIcon)return i("img",{class:"co-sidebar-nav__custom-icon",src:e.customIcon,alt:""});const o=e.icon||this.getIcon(e.key);return i("co-icon",{name:o,size:a})}renderHighlightedLabel(e){const a=this.getLabel(e);if(!this.searchText)return a;const o=this.searchText.toLowerCase(),t=a.toLowerCase().indexOf(o);if(-1===t)return a;const s=a.slice(0,t),r=a.slice(t,t+o.length),n=a.slice(t+o.length);return[s,i("mark",{class:"co-sidebar-nav__highlight"},r),n]}renderLeafItem(e,a=!1){const o=e.key===this.activeKey,t=this.getLabel(e.key),s="full"===this.mode||a,r=i("button",{class:{"co-sidebar-nav__item":!0,"co-sidebar-nav__item--active":o},onClick:()=>this.handleLeafClick(e),"aria-label":s?void 0:t},i("span",{class:"co-sidebar-nav__item-icon"},this.renderIcon(e,s?16:18)),s&&i("span",{class:"co-sidebar-nav__item-label"},this.renderHighlightedLabel(e.key)));return"min"!==this.mode||a?r:i("co-tooltip",{content:t,placement:"right",offset:12},r)}openFlyout(e,a,o=0){if(clearTimeout(this.flyoutTimeout),a){const e=a.getBoundingClientRect(),t=e.right+8,i=window.innerHeight;this.flyoutPosition=e.top+(28+32*o+24)>i-16?{top:null,bottom:i-e.bottom,left:t}:{top:e.top,bottom:null,left:t}}this.flyoutKey=e}closeFlyout(){this.flyoutTimeout=setTimeout((()=>{this.flyoutKey=null}),150)}renderExpansion(e){const a=this.expandedKeys.has(e.key)||this.searchText.length>0,o=this.hasActiveDescendant(e);if("min"===this.mode){const a=this.flyoutKey===e.key;return i("div",{class:"co-sidebar-nav__flyout-anchor",onMouseEnter:a=>{var o;return this.openFlyout(e.key,a.currentTarget,(null===(o=e.children)||void 0===o?void 0:o.length)||0)},onMouseLeave:()=>this.closeFlyout()},i("button",{class:{"co-sidebar-nav__item":!0,"co-sidebar-nav__item--active":o||a},title:this.getLabel(e.key),onClick:a=>{var o;a.stopPropagation();const t=a.currentTarget.closest(".co-sidebar-nav__flyout-anchor");this.flyoutKey===e.key?this.flyoutKey=null:this.openFlyout(e.key,t||void 0,(null===(o=e.children)||void 0===o?void 0:o.length)||0)}},i("span",{class:"co-sidebar-nav__item-icon"},this.renderIcon(e,18))),a&&i("div",{class:"co-sidebar-nav__flyout",style:Object.assign(Object.assign(Object.assign({},null!==this.flyoutPosition.top?{top:this.flyoutPosition.top+"px"}:{}),null!==this.flyoutPosition.bottom?{bottom:this.flyoutPosition.bottom+"px"}:{}),{left:this.flyoutPosition.left+"px"}),onMouseEnter:()=>clearTimeout(this.flyoutTimeout),onMouseLeave:()=>this.closeFlyout()},i("span",{class:"co-sidebar-nav__flyout-title"},this.renderHighlightedLabel(e.key)),e.children.map((e=>this.renderLeafItem(e,!0)))))}return i("div",{class:{"co-sidebar-nav__expansion":!0,"co-sidebar-nav__expansion--expanded":a,"co-sidebar-nav__expansion--active":o}},i("button",{class:"co-sidebar-nav__expansion-header",onClick:()=>this.toggleExpand(e.key)},i("span",{class:"co-sidebar-nav__item-icon"},this.renderIcon(e)),i("span",{class:"co-sidebar-nav__item-label"},this.renderHighlightedLabel(e.key)),i("co-icon",{name:"caret-right",size:14,class:"co-sidebar-nav__expansion-caret"})),i("div",{class:"co-sidebar-nav__expansion-body"},e.children.map((e=>this.renderItem(e)))))}renderCategory(e){return"min"===this.mode?i("div",{class:"co-sidebar-nav__category--min"},i("span",{class:"co-sidebar-nav__category-label co-sidebar-nav__category-spacer","aria-hidden":"true"}," "),e.children.map((e=>this.renderItem(e)))):i("div",{class:"co-sidebar-nav__category"},i("span",{class:"co-sidebar-nav__category-label"},this.renderHighlightedLabel(e.key)),i("div",{class:"co-sidebar-nav__category-items"},e.children.map((e=>this.renderItem(e)))))}renderItem(e){return this.isLeaf(e)?this.renderLeafItem(e):0!==e.level&&void 0!==e.level||e.modelName?this.renderExpansion(e):this.renderCategory(e)}render(){const e=this.filteredItems;return i(s,{key:"7e9637d98b9a2a698f6b82050b0f9cdadda66798",class:{"flyout-open":!!this.flyoutKey}},i("nav",{key:"c3ad14a4e294be4c2b803c93a4ddbf42daae5dd0",class:{"co-sidebar-nav":!0,"co-sidebar-nav--min":"min"===this.mode}},this.renderSearch(),i("div",{key:"2b2f5c39b6a529e1993695f4cda5ba5c5965c17e",class:"co-sidebar-nav__items"},e.map((e=>this.renderItem(e))))))}get el(){return this}static get watchers(){return{iconMap:[{onIconMapChange:0}],translations:[{onTranslationsChange:0}],search:[{onSearchChange:0}],activeKey:[{onActiveKeyChange:0}],items:[{onItemsChange:0}]}}static get style(){return'@property --co-sidebar-fade-top{syntax:"<length>";inherits:false;initial-value:0px}@property --co-sidebar-fade-bottom{syntax:"<length>";inherits:false;initial-value:0px}:host{display:block;height:100%;overflow-y:auto;overflow-x:hidden;font-family:var(--co-font-family-primary);scrollbar-width:thin;scrollbar-color:transparent transparent;--co-sidebar-fade-size:28px}:host(:not([mode="min"])),:host([mode="min"]:not(.flyout-open)){-webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 var(--co-sidebar-fade-top), #000 calc(100% - var(--co-sidebar-fade-bottom)), transparent 100%);mask-image:linear-gradient(to bottom, transparent 0, #000 var(--co-sidebar-fade-top), #000 calc(100% - var(--co-sidebar-fade-bottom)), transparent 100%)}@supports (animation-timeline: scroll()){:host(:not([mode="min"])),:host([mode="min"]:not(.flyout-open)){animation:co-sidebar-edge-fade linear both;animation-timeline:scroll(self block)}}@keyframes co-sidebar-edge-fade{0%{--co-sidebar-fade-top:0px;--co-sidebar-fade-bottom:var(--co-sidebar-fade-size)}8%{--co-sidebar-fade-top:var(--co-sidebar-fade-size);--co-sidebar-fade-bottom:var(--co-sidebar-fade-size)}92%{--co-sidebar-fade-top:var(--co-sidebar-fade-size);--co-sidebar-fade-bottom:var(--co-sidebar-fade-size)}100%{--co-sidebar-fade-top:var(--co-sidebar-fade-size);--co-sidebar-fade-bottom:0px}}:host(:hover){scrollbar-color:var(--co-color-opacity-blanco-16) transparent}:host::-webkit-scrollbar{width:6px}:host::-webkit-scrollbar-track{background:transparent}:host::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}:host(:hover)::-webkit-scrollbar-thumb{background:var(--co-color-opacity-blanco-16)}:host(:hover)::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-blanco-25)}:host(:hover)::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-blanco-50)}:host([mode="min"]){scrollbar-width:none !important}:host([mode="min"])::-webkit-scrollbar{width:0 !important}.co-sidebar-nav{display:flex;flex-direction:column;gap:var(--co-spacing-xs);padding:var(--co-spacing-xs)}.co-sidebar-nav--min{align-items:center;padding:var(--co-spacing-xs) 0}.co-sidebar-nav__search{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-xs) var(--co-spacing-sm);margin:0 var(--co-spacing-xs) var(--co-spacing-xs);border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);background:var(--co-semantic-surface-secondary);height:32px}.co-sidebar-nav__search co-icon{color:var(--co-semantic-text-muted);flex-shrink:0}.co-sidebar-nav__search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);letter-spacing:var(--co-font-letter-spacing-body);color:var(--co-semantic-text-default);min-width:0}.co-sidebar-nav__search-input::placeholder{color:var(--co-semantic-text-muted)}.co-sidebar-nav__search-clear{display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;padding:0;color:var(--co-semantic-text-muted);border-radius:var(--co-border-radius-xxs)}.co-sidebar-nav__search-clear:hover{color:var(--co-semantic-text-default)}.co-sidebar-nav__items{display:flex;flex-direction:column;gap:var(--co-spacing-xxs)}.co-sidebar-nav--min .co-sidebar-nav__items{align-items:center}.co-sidebar-nav__category{display:flex;flex-direction:column}.co-sidebar-nav__category+.co-sidebar-nav__category{margin-top:var(--co-spacing-sm)}.co-sidebar-nav__category-label{text-transform:uppercase;font-family:var(--co-font-family-mono);font-size:var(--co-font-size-10);font-weight:400;color:var(--co-semantic-text-muted);line-height:110%;letter-spacing:0.08em;padding:var(--co-spacing-lg) var(--co-spacing-sm) var(--co-spacing-xs);user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-sidebar-nav__category-items{display:flex;flex-direction:column;gap:var(--co-spacing-xxs)}.co-sidebar-nav__category--min{display:flex;flex-direction:column;align-items:center}.co-sidebar-nav__category--min+.co-sidebar-nav__category--min{margin-top:var(--co-spacing-sm)}.co-sidebar-nav__category-spacer{visibility:hidden;white-space:nowrap;padding-left:0;padding-right:0}.co-sidebar-nav__category--min>:not(.co-sidebar-nav__category-spacer)+*{margin-top:var(--co-spacing-xxs)}.co-sidebar-nav__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);border:none;background:none;cursor:pointer;width:100%;text-align:left;color:var(--co-semantic-text-default);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:var(--co-font-weight-medium);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-sidebar-nav__item:hover{background:var(--co-semantic-surface-hover);color:var(--co-semantic-text-default)}.co-sidebar-nav__item--active{background:var(--co-sidebar-nav-active-bg, var(--co-semantic-surface-hover));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)));font-weight:var(--co-font-weight-medium);--co-glass-blur:12px;--co-glass-saturate:1.3;-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-sidebar-nav__item--active:hover{background:var(--co-sidebar-nav-active-bg-min, var(--co-sidebar-nav-active-bg, var(--co-semantic-surface-hover)));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)))}.co-sidebar-nav__item-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:20px;height:20px}.co-sidebar-nav__item-icon co-icon{color:inherit}.co-sidebar-nav__item-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-sidebar-nav__custom-icon{width:18px;height:18px;object-fit:contain;border-radius:var(--co-border-radius-xxs)}.co-sidebar-nav--min co-tooltip{line-height:0}.co-sidebar-nav--min .co-sidebar-nav__item{width:36px;height:28px;padding:0;justify-content:center;border-radius:var(--co-border-radius-xs)}.co-sidebar-nav__flyout-anchor{position:relative}.co-sidebar-nav__flyout{position:fixed;min-width:180px;max-width:240px;background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-subtle);color:var(--co-semantic-text-default);border-radius:var(--co-border-radius-sm);box-shadow:var(--co-shadow-lg);padding:var(--co-spacing-md);display:flex;flex-direction:column;z-index:9999;animation:co-flyout-in var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-sidebar-nav__flyout-title{text-transform:uppercase;font-family:var(--co-font-family-mono);font-size:var(--co-font-size-10);font-weight:400;color:var(--co-semantic-text-muted);line-height:110%;letter-spacing:var(--co-font-letter-spacing-overline);padding:var(--co-spacing-xxs) var(--co-spacing-sm) var(--co-spacing-xs);user-select:none}.co-sidebar-nav__flyout .co-sidebar-nav__item{width:100%;height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);gap:var(--co-spacing-md);font-weight:var(--co-font-weight-regular);color:var(--co-semantic-text-default);line-height:var(--co-font-line-height-none);justify-content:flex-start}.co-sidebar-nav__flyout .co-sidebar-nav__item:hover{background:var(--co-semantic-surface-control)}.co-sidebar-nav__flyout .co-sidebar-nav__item--active{background:var(--co-sidebar-nav-active-bg-min, var(--co-semantic-surface-control));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)));font-weight:var(--co-font-weight-medium)}.co-sidebar-nav__flyout .co-sidebar-nav__item--active:hover{background:var(--co-sidebar-nav-active-bg-min, var(--co-semantic-surface-control));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)))}.co-sidebar-nav__flyout .co-sidebar-nav__item-icon{display:flex;width:24px;height:24px}.co-sidebar-nav__flyout .co-sidebar-nav__item-icon co-icon{color:var(--co-semantic-text-default)}.co-sidebar-nav__flyout .co-sidebar-nav__item--active .co-sidebar-nav__item-icon co-icon{color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)))}@keyframes co-flyout-in{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}.co-sidebar-nav__expansion{display:flex;flex-direction:column}.co-sidebar-nav__expansion-header{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);border:none;background:none;cursor:pointer;width:100%;text-align:left;color:var(--co-semantic-text-secondary);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:var(--co-font-weight-medium);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-sidebar-nav__expansion-header:hover{background:var(--co-semantic-surface-hover);color:var(--co-semantic-text-default)}.co-sidebar-nav__expansion--active>.co-sidebar-nav__expansion-header{color:var(--co-semantic-text-default)}.co-sidebar-nav__expansion-caret{margin-left:auto;flex-shrink:0;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out);color:var(--co-semantic-text-muted)}.co-sidebar-nav__expansion--expanded>.co-sidebar-nav__expansion-header .co-sidebar-nav__expansion-caret{transform:rotate(90deg)}.co-sidebar-nav__expansion-body{display:flex;flex-direction:column;gap:var(--co-spacing-xxs);overflow:hidden;max-height:0;opacity:0;transition:max-height var(--co-motion-duration-slow) var(--co-motion-ease-out), opacity var(--co-motion-duration-base) var(--co-motion-ease-out), padding var(--co-motion-duration-base) var(--co-motion-ease-out);padding-left:var(--co-spacing-xl)}.co-sidebar-nav__expansion--expanded>.co-sidebar-nav__expansion-body{max-height:1000px;opacity:1;padding-top:var(--co-spacing-xxs)}.co-sidebar-nav__highlight{all:unset;background-color:var(--co-color-primary-amarillo, #facc15);color:var(--co-color-base-negro, #000);border-radius:2px;padding:0 1px}'}},[1,"co-sidebar-nav",{items:[1],activeKey:[513,"active-key"],mode:[513],searchable:[4],searchPlaceholder:[1,"search-placeholder"],search:[1],iconMap:[1,"icon-map"],translations:[1],searchText:[32],expandedKeys:[32],flyoutKey:[32],flyoutPosition:[32]},void 0,{iconMap:[{onIconMapChange:0}],translations:[{onTranslationsChange:0}],search:[{onSearchChange:0}],activeKey:[{onActiveKeyChange:0}],items:[{onItemsChange:0}]}]);function h(){"undefined"!=typeof customElements&&["co-sidebar-nav","co-icon","co-kbd","co-tooltip"].forEach((a=>{switch(a){case"co-sidebar-nav":customElements.get(e(a))||customElements.define(e(a),v);break;case"co-icon":customElements.get(e(a))||n();break;case"co-kbd":customElements.get(e(a))||c();break;case"co-tooltip":customElements.get(e(a))||l()}}))}h();const p=v,m=h;export{p as CoSidebarNav,m as defineCustomElement}
|
|
1
|
+
import{t as e,p as a,H as o,c as t,h as i,a as s}from"./index.js";import{n as r}from"./p-Ba_v-MzM.js";import{d as n}from"./p-qMNHMnvI.js";import{d as c}from"./p-DldA2IL3.js";import{d as l}from"./p-DRL-a5hO.js";const d={Home:"house",Contacts:"address-book",Companies:"buildings",Leads:"user-focus",Presentations:"presentation-chart",Deals:"handshake",TestDrive:"steering-wheel",Invoices:"receipt",Payments:"credit-card",Conversations:"chat-circle",Channels:"broadcast",ChannelProviders:"plugs-connected",ConversationFlows:"flow-arrow",PhoneNumbers:"phone",Tasks:"check-square",TaskGroups:"squares-four",WorkOrders:"clipboard-text",Tickets:"ticket",CaseTypes:"tag",EmailHubs:"at",RoutingRules:"path",Contracts:"file-text",Notes:"note",Meetings:"video-camera",Calls:"phone-call",CloudDrive:"cloud",Forms:"note-pencil",Quotes:"quotes",ContentTemplates:"article",MessageTemplates:"chat-text",Skills:"brain",AiAgentProfiles:"robot",Insights:"chart-line",Dashboards:"gauge",Reports:"chart-bar",Emails:"envelope",ContactLists:"users-three",EmailCampaigns:"megaphone",VirtualTours:"cube",Scenes:"image",Spots:"map-pin",FloorPlans:"blueprint",Users:"user",UserTeams:"users",Teams:"users",UserGroups:"user-circle-gear",Roles:"shield",Workspaces:"stack",AuthenticationRules:"lock-key",OauthApps:"key",ServiceCredentials:"certificate",Calendars:"calendar",CalendarPolicies:"calendar-check",CalendarGroups:"calendar-dots",CalendarEvents:"calendar-plus",ProposalWizards:"magic-wand",WizardGroups:"folders",ProposalWizardGroup:"folders",AdHubs:"storefront",AdCampaigns:"flag-banner",Pricebooks:"book-open",PricebookEntries:"list-numbers",Products:"package",Taxes:"percent",ProductGroups:"stack",ProductFamilies:"tree-structure",ProductCategories:"tag",ProductRules:"gear-six",DiscountSchedules:"piggy-bank",LiveStreams:"broadcast",EventSubscriptions:"bell-ringing",Stages:"steps",ContactFlows:"flow-arrow",Categories:"folder-simple",CustomFilters:"funnel",Logs:"list-bullets",ContactProtocols:"list-checks",Scorings:"chart-line-up",Devices:"cpu",Scripts:"code",Webhooks:"webhooks-logo",Endpoints:"plug",Sites:"globe",HealthChecks:"heartbeat",Plugins:"puzzle-piece",Cobs:"cube",CustomFields:"textbox",CustomUis:"layout",Documentation:"book-open-text",Sections:"article",Articles:"newspaper",Directory:"address-book",Sales:"currency-dollar",Communications:"chat-teardrop-text",Operations:"gear",Support:"lifebuoy",Tools:"wrench",Configuration:"sliders",Analytics:"chart-pie",Mailing:"envelope-simple",Billing:"money",Libraries:"books",Scheduling:"timer",Pricing:"tag",Development:"terminal",AccessControl:"shield-check",Notifications:"bell",System:"database",Iot:"wifi-high",Advertising:"megaphone",Wizards:"magic-wand",TourStudio:"cube",Docs:"file-text",Setup:"gear-six",SalesAndMarketing:"trend-up",CustomerService:"lifebuoy",HumanResources:"identification-badge",TicketsSetup:"ticket",CommunicationCenterSetup:"headset",Inventory:"warehouse",Branches:"building-office",ItemStock:"barcode",Learning:"graduation-cap",Programs:"path",Courses:"chalkboard-teacher",Enrollments:"student",Certificates:"certificate",Assessments:"exam",Recruitment:"user-plus",Vacancies:"briefcase",Candidates:"user-list",JobApplications:"read-cv-logo",Interviews:"chats-circle",AssetManagement:"package",Assets:"devices",AssetAssignments:"user-switch",Recognition:"hands-clapping",Achievements:"trophy",Rewards:"gift",Badges:"medal",BadgeNominations:"star",Prizes:"trophy",RewardsBudgets:"wallet",RedeemedPrizes:"crown",PaymentReceipts:"hand-coins",Coupons:"seal-percent",EventManager:"calendar-star",EventProspects:"users-four",BusinessEvents:"briefcase",EventExpense:"coins",Content:"folder-open",Portals:"app-window",CommunicationCenter:"headset",Integrations:"plugs-connected",Mcp:"plug",LifecycleHooks:"arrows-clockwise",PaymentProviders:"credit-card",Stripe:"credit-card",ThirdParty:"plugs-connected",Sendgrid:"paper-plane-tilt",Apollo:"rocket-launch",Kaspr:"identification-card",OpenAi:"robot",Ultramsg:"whatsapp-logo",Slack:"slack-logo",Telegram:"telegram-logo",Discord:"discord-logo"},v=a(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.coNavigate=t(this,"coNavigate",7),this.coSearch=t(this,"coSearch",7),this.items="{}",this.activeKey="",this.mode="full",this.searchable=!1,this.searchPlaceholder="Search",this.search="",this.iconMap="{}",this.translations="{}",this.searchText="",this.expandedKeys=new Set,this.flyoutKey=null,this.flyoutPosition={top:0,bottom:null,left:0},this.parsedIconMap={},this.parsedTranslations={},this.flyoutTimeout=null,this.handleSearchInput=e=>{this.searchText=e.target.value,this.coSearch.emit(this.searchText)}}onIconMapChange(){this.parseIconMap()}onTranslationsChange(){this.parseTranslations()}onSearchChange(){this.searchText=this.search}onActiveKeyChange(){this.autoExpandForActiveKey()}onItemsChange(){this.autoExpandForActiveKey()}componentWillLoad(){this.parseIconMap(),this.parseTranslations(),this.autoExpandForActiveKey()}componentDidLoad(){}parseIconMap(){try{this.parsedIconMap=Object.assign(Object.assign({},d),JSON.parse(this.iconMap))}catch(e){this.parsedIconMap=Object.assign({},d)}}parseTranslations(){try{this.parsedTranslations=JSON.parse(this.translations)}catch(e){this.parsedTranslations={}}}get parsedItems(){try{const e=JSON.parse(this.items);return Array.isArray(e)?e:this.transformMenuData(e,0)}catch(e){return[]}}transformMenuData(e,a){return Object.keys(e).map((o=>{const t=e[o],i=t.modelName||"object"==typeof t&&!Object.keys(t).some((e=>"object"==typeof t[e]&&"modelName"!==e));return{key:o,label:o,url:t.url,target:t.target,modelName:i?t.modelName:void 0,customIcon:t.customIcon,children:i?void 0:this.transformMenuData(t,a+1),level:a}}))}get filteredItems(){return this.searchText?this.filterRecursive(this.parsedItems,r(this.searchText)):this.parsedItems}filterRecursive(e,a){const o=[];for(const t of e)if(r(this.getLabel(t.key)).includes(a))o.push(t);else if(t.children){const e=this.filterRecursive(t.children,a);e.length>0&&o.push(Object.assign(Object.assign({},t),{children:e}))}return o}autoExpandForActiveKey(){if(!this.activeKey)return;const e=new Set(this.expandedKeys);this.findAndExpandParents(this.parsedItems,this.activeKey,e),this.expandedKeys=e}findAndExpandParents(e,a,o){for(const t of e){if(t.key===a)return!0;if(t.children&&this.findAndExpandParents(t.children,a,o))return o.add(t.key),!0}return!1}getLabel(e){return this.parsedTranslations[e]?this.parsedTranslations[e]:e.replace(/([a-z])([A-Z])/g,"$1 $2")}getIcon(e){return this.parsedIconMap[e]||"circle"}isLeaf(e){return!e.children||0===e.children.length}hasActiveDescendant(e){return e.key===this.activeKey||!!e.children&&e.children.some((e=>this.hasActiveDescendant(e)))}toggleExpand(e){const a=new Set(this.expandedKeys);a.has(e)?a.delete(e):a.add(e),this.expandedKeys=a}handleLeafClick(e){this.flyoutKey=null,this.coNavigate.emit({key:e.key,modelName:e.modelName,url:e.url,target:e.target,customIcon:e.customIcon})}renderSearch(){return this.searchable&&"min"!==this.mode?i("div",{class:"co-sidebar-nav__search"},i("co-icon",{name:"magnifying-glass",size:16}),i("input",{type:"text",class:"co-sidebar-nav__search-input",placeholder:this.searchPlaceholder,value:this.searchText,onInput:this.handleSearchInput}),this.searchText&&i("button",{class:"co-sidebar-nav__search-clear",onClick:()=>{this.searchText="",this.coSearch.emit("")}},i("co-icon",{name:"x",size:14}))):null}renderIcon(e,a=16){if(e.customIcon)return i("img",{class:"co-sidebar-nav__custom-icon",src:e.customIcon,alt:""});const o=e.icon||this.getIcon(e.key);return i("co-icon",{name:o,size:a})}renderHighlightedLabel(e){const a=this.getLabel(e);if(!this.searchText)return a;const o=this.searchText.toLowerCase(),t=a.toLowerCase().indexOf(o);if(-1===t)return a;const s=a.slice(0,t),r=a.slice(t,t+o.length),n=a.slice(t+o.length);return[s,i("mark",{class:"co-sidebar-nav__highlight"},r),n]}renderLeafItem(e,a=!1){const o=e.key===this.activeKey,t=this.getLabel(e.key),s="full"===this.mode||a,r=i("button",{class:{"co-sidebar-nav__item":!0,"co-sidebar-nav__item--active":o},onClick:()=>this.handleLeafClick(e),"aria-label":s?void 0:t},i("span",{class:"co-sidebar-nav__item-icon"},this.renderIcon(e,s?16:18)),s&&i("span",{class:"co-sidebar-nav__item-label"},this.renderHighlightedLabel(e.key)));return"min"!==this.mode||a?r:i("co-tooltip",{content:t,placement:"right",offset:12},r)}openFlyout(e,a,o=0){if(clearTimeout(this.flyoutTimeout),a){const e=a.getBoundingClientRect(),t=e.right+8,i=window.innerHeight;this.flyoutPosition=e.top+(28+32*o+24)>i-16?{top:null,bottom:i-e.bottom,left:t}:{top:e.top,bottom:null,left:t}}this.flyoutKey=e}closeFlyout(){this.flyoutTimeout=setTimeout((()=>{this.flyoutKey=null}),150)}renderExpansion(e){const a=this.expandedKeys.has(e.key)||this.searchText.length>0,o=this.hasActiveDescendant(e);if("min"===this.mode){const a=this.flyoutKey===e.key;return i("div",{class:"co-sidebar-nav__flyout-anchor",onMouseEnter:a=>{var o;return this.openFlyout(e.key,a.currentTarget,(null===(o=e.children)||void 0===o?void 0:o.length)||0)},onMouseLeave:()=>this.closeFlyout()},i("button",{class:{"co-sidebar-nav__item":!0,"co-sidebar-nav__item--active":o||a},title:this.getLabel(e.key),onClick:a=>{var o;a.stopPropagation();const t=a.currentTarget.closest(".co-sidebar-nav__flyout-anchor");this.flyoutKey===e.key?this.flyoutKey=null:this.openFlyout(e.key,t||void 0,(null===(o=e.children)||void 0===o?void 0:o.length)||0)}},i("span",{class:"co-sidebar-nav__item-icon"},this.renderIcon(e,18))),a&&i("div",{class:"co-sidebar-nav__flyout",style:Object.assign(Object.assign(Object.assign({},null!==this.flyoutPosition.top?{top:this.flyoutPosition.top+"px"}:{}),null!==this.flyoutPosition.bottom?{bottom:this.flyoutPosition.bottom+"px"}:{}),{left:this.flyoutPosition.left+"px"}),onMouseEnter:()=>clearTimeout(this.flyoutTimeout),onMouseLeave:()=>this.closeFlyout()},i("span",{class:"co-sidebar-nav__flyout-title"},this.renderHighlightedLabel(e.key)),e.children.map((e=>this.renderLeafItem(e,!0)))))}return i("div",{class:{"co-sidebar-nav__expansion":!0,"co-sidebar-nav__expansion--expanded":a,"co-sidebar-nav__expansion--active":o}},i("button",{class:"co-sidebar-nav__expansion-header",onClick:()=>this.toggleExpand(e.key)},i("span",{class:"co-sidebar-nav__item-icon"},this.renderIcon(e)),i("span",{class:"co-sidebar-nav__item-label"},this.renderHighlightedLabel(e.key)),i("co-icon",{name:"caret-right",size:14,class:"co-sidebar-nav__expansion-caret"})),i("div",{class:"co-sidebar-nav__expansion-body"},e.children.map((e=>this.renderItem(e)))))}renderCategory(e){return"min"===this.mode?i("div",{class:"co-sidebar-nav__category--min"},i("span",{class:"co-sidebar-nav__category-label co-sidebar-nav__category-spacer","aria-hidden":"true"}," "),e.children.map((e=>this.renderItem(e)))):i("div",{class:"co-sidebar-nav__category"},i("span",{class:"co-sidebar-nav__category-label"},this.renderHighlightedLabel(e.key)),i("div",{class:"co-sidebar-nav__category-items"},e.children.map((e=>this.renderItem(e)))))}renderItem(e){return this.isLeaf(e)?this.renderLeafItem(e):0!==e.level&&void 0!==e.level||e.modelName?this.renderExpansion(e):this.renderCategory(e)}render(){const e=this.filteredItems;return i(s,{key:"a7c5661ad2613a6f2c45c37e6def2e4c8d7e9801",class:{"flyout-open":!!this.flyoutKey}},i("nav",{key:"597d59612958ab2014a7db0ad561abd1db15524f",class:{"co-sidebar-nav":!0,"co-sidebar-nav--min":"min"===this.mode}},this.renderSearch(),i("div",{key:"55a5bb260444a26e3e2228fb08c30c15746994a9",class:"co-sidebar-nav__items"},e.map((e=>this.renderItem(e))))))}get el(){return this}static get watchers(){return{iconMap:[{onIconMapChange:0}],translations:[{onTranslationsChange:0}],search:[{onSearchChange:0}],activeKey:[{onActiveKeyChange:0}],items:[{onItemsChange:0}]}}static get style(){return'@property --co-sidebar-fade-top{syntax:"<length>";inherits:false;initial-value:0px}@property --co-sidebar-fade-bottom{syntax:"<length>";inherits:false;initial-value:0px}:host{display:block;height:100%;overflow-y:auto;overflow-x:hidden;font-family:var(--co-font-family-primary);scrollbar-width:thin;scrollbar-color:transparent transparent;--co-sidebar-fade-size:28px}:host(:not([mode="min"])),:host([mode="min"]:not(.flyout-open)){-webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 var(--co-sidebar-fade-top), #000 calc(100% - var(--co-sidebar-fade-bottom)), transparent 100%);mask-image:linear-gradient(to bottom, transparent 0, #000 var(--co-sidebar-fade-top), #000 calc(100% - var(--co-sidebar-fade-bottom)), transparent 100%)}@supports (animation-timeline: scroll()){:host(:not([mode="min"])),:host([mode="min"]:not(.flyout-open)){animation:co-sidebar-edge-fade linear both;animation-timeline:scroll(self block)}}@keyframes co-sidebar-edge-fade{0%{--co-sidebar-fade-top:0px;--co-sidebar-fade-bottom:var(--co-sidebar-fade-size)}8%{--co-sidebar-fade-top:var(--co-sidebar-fade-size);--co-sidebar-fade-bottom:var(--co-sidebar-fade-size)}92%{--co-sidebar-fade-top:var(--co-sidebar-fade-size);--co-sidebar-fade-bottom:var(--co-sidebar-fade-size)}100%{--co-sidebar-fade-top:var(--co-sidebar-fade-size);--co-sidebar-fade-bottom:0px}}:host(:hover){scrollbar-color:var(--co-color-opacity-blanco-16) transparent}:host::-webkit-scrollbar{width:6px}:host::-webkit-scrollbar-track{background:transparent}:host::-webkit-scrollbar-thumb{background:transparent;border-radius:9999px}:host(:hover)::-webkit-scrollbar-thumb{background:var(--co-color-opacity-blanco-16)}:host(:hover)::-webkit-scrollbar-thumb:hover{background:var(--co-color-opacity-blanco-25)}:host(:hover)::-webkit-scrollbar-thumb:active{background:var(--co-color-opacity-blanco-50)}:host([mode="min"]){scrollbar-width:none !important}:host([mode="min"])::-webkit-scrollbar{width:0 !important}.co-sidebar-nav{display:flex;flex-direction:column;gap:var(--co-spacing-xs);padding:var(--co-spacing-xs)}.co-sidebar-nav--min{align-items:center;padding:var(--co-spacing-xs) 0}.co-sidebar-nav__search{display:flex;align-items:center;gap:var(--co-spacing-sm);padding:var(--co-spacing-xs) var(--co-spacing-sm);margin:0 var(--co-spacing-xs) var(--co-spacing-xs);border:1px solid var(--co-semantic-border-default);border-radius:var(--co-border-radius-xs);background:var(--co-semantic-surface-secondary);height:32px}.co-sidebar-nav__search co-icon{color:var(--co-semantic-text-muted);flex-shrink:0}.co-sidebar-nav__search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-12);letter-spacing:var(--co-font-letter-spacing-body);color:var(--co-semantic-text-default);min-width:0}.co-sidebar-nav__search-input::placeholder{color:var(--co-semantic-text-muted)}.co-sidebar-nav__search-clear{display:flex;align-items:center;justify-content:center;border:none;background:none;cursor:pointer;padding:0;color:var(--co-semantic-text-muted);border-radius:var(--co-border-radius-xxs)}.co-sidebar-nav__search-clear:hover{color:var(--co-semantic-text-default)}.co-sidebar-nav__items{display:flex;flex-direction:column;gap:var(--co-spacing-xxs)}.co-sidebar-nav--min .co-sidebar-nav__items{align-items:center}.co-sidebar-nav__category{display:flex;flex-direction:column}.co-sidebar-nav__category+.co-sidebar-nav__category{margin-top:var(--co-spacing-sm)}.co-sidebar-nav__category-label{text-transform:uppercase;font-family:var(--co-font-family-mono);font-size:var(--co-font-size-10);font-weight:400;color:var(--co-semantic-text-muted);line-height:110%;letter-spacing:0.08em;padding:var(--co-spacing-lg) var(--co-spacing-sm) var(--co-spacing-xs);user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-sidebar-nav__category-items{display:flex;flex-direction:column;gap:var(--co-spacing-xxs)}.co-sidebar-nav__category--min{display:flex;flex-direction:column;align-items:center}.co-sidebar-nav__category--min+.co-sidebar-nav__category--min{margin-top:var(--co-spacing-sm)}.co-sidebar-nav__category-spacer{visibility:hidden;white-space:nowrap;padding-left:0;padding-right:0}.co-sidebar-nav__category--min>:not(.co-sidebar-nav__category-spacer)+*{margin-top:var(--co-spacing-xxs)}.co-sidebar-nav__item{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);border:none;background:none;cursor:pointer;width:100%;text-align:left;color:var(--co-semantic-text-default);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:var(--co-font-weight-medium);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-sidebar-nav__item:hover{background:var(--co-semantic-surface-hover);color:var(--co-semantic-text-default)}.co-sidebar-nav__item--active{background:var(--co-sidebar-nav-active-bg, var(--co-semantic-surface-hover));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)));font-weight:var(--co-font-weight-medium);--co-glass-blur:12px;--co-glass-saturate:1.3;-webkit-backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)));backdrop-filter:var(--co-glass-filter, blur(var(--co-glass-blur)) saturate(var(--co-glass-saturate)))}.co-sidebar-nav__item--active:hover{background:var(--co-sidebar-nav-active-bg-min, var(--co-sidebar-nav-active-bg, var(--co-semantic-surface-hover)));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)))}.co-sidebar-nav__item-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:20px;height:20px}.co-sidebar-nav__item-icon co-icon{color:inherit}.co-sidebar-nav__item-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-sidebar-nav__custom-icon{width:18px;height:18px;object-fit:contain;border-radius:var(--co-border-radius-xxs)}.co-sidebar-nav--min co-tooltip{line-height:0}.co-sidebar-nav--min .co-sidebar-nav__item{width:36px;height:28px;padding:0;justify-content:center;border-radius:var(--co-border-radius-xs)}.co-sidebar-nav__flyout-anchor{position:relative}.co-sidebar-nav__flyout{position:fixed;min-width:180px;max-width:240px;background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-subtle);color:var(--co-semantic-text-default);border-radius:var(--co-border-radius-sm);box-shadow:var(--co-shadow-lg);padding:var(--co-spacing-md);display:flex;flex-direction:column;z-index:9999;animation:co-flyout-in var(--co-motion-duration-fast) var(--co-motion-ease-out)}.co-sidebar-nav__flyout-title{text-transform:uppercase;font-family:var(--co-font-family-mono);font-size:var(--co-font-size-10);font-weight:400;color:var(--co-semantic-text-muted);line-height:110%;letter-spacing:var(--co-font-letter-spacing-overline);padding:var(--co-spacing-xxs) var(--co-spacing-sm) var(--co-spacing-xs);user-select:none}.co-sidebar-nav__flyout .co-sidebar-nav__item{width:100%;height:32px;padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);gap:var(--co-spacing-md);font-weight:var(--co-font-weight-regular);color:var(--co-semantic-text-default);line-height:var(--co-font-line-height-none);justify-content:flex-start}.co-sidebar-nav__flyout .co-sidebar-nav__item:hover{background:var(--co-semantic-surface-control)}.co-sidebar-nav__flyout .co-sidebar-nav__item--active{background:var(--co-sidebar-nav-active-bg-min, var(--co-semantic-surface-control));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)));font-weight:var(--co-font-weight-medium)}.co-sidebar-nav__flyout .co-sidebar-nav__item--active:hover{background:var(--co-sidebar-nav-active-bg-min, var(--co-semantic-surface-control));color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)))}.co-sidebar-nav__flyout .co-sidebar-nav__item-icon{display:flex;width:24px;height:24px}.co-sidebar-nav__flyout .co-sidebar-nav__item-icon co-icon{color:var(--co-semantic-text-default)}.co-sidebar-nav__flyout .co-sidebar-nav__item--active .co-sidebar-nav__item-icon co-icon{color:var(--co-sidebar-nav-active-color, var(--co-semantic-text-link, var(--co-color-primary-azul)))}@keyframes co-flyout-in{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:translateX(0)}}.co-sidebar-nav__expansion{display:flex;flex-direction:column}.co-sidebar-nav__expansion-header{display:flex;align-items:center;gap:var(--co-spacing-sm2);padding:var(--co-spacing-xs) var(--co-spacing-sm);border-radius:var(--co-border-radius-xs);border:none;background:none;cursor:pointer;width:100%;text-align:left;color:var(--co-semantic-text-secondary);transition:background var(--co-motion-duration-fast) var(--co-motion-ease-out), color var(--co-motion-duration-fast) var(--co-motion-ease-out);font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);font-weight:var(--co-font-weight-medium);letter-spacing:var(--co-font-letter-spacing-body);line-height:1}.co-sidebar-nav__expansion-header:hover{background:var(--co-semantic-surface-hover);color:var(--co-semantic-text-default)}.co-sidebar-nav__expansion--active>.co-sidebar-nav__expansion-header{color:var(--co-semantic-text-default)}.co-sidebar-nav__expansion-caret{margin-left:auto;flex-shrink:0;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out);color:var(--co-semantic-text-muted)}.co-sidebar-nav__expansion--expanded>.co-sidebar-nav__expansion-header .co-sidebar-nav__expansion-caret{transform:rotate(90deg)}.co-sidebar-nav__expansion-body{display:flex;flex-direction:column;gap:var(--co-spacing-xxs);overflow:hidden;max-height:0;opacity:0;transition:max-height var(--co-motion-duration-slow) var(--co-motion-ease-out), opacity var(--co-motion-duration-base) var(--co-motion-ease-out), padding var(--co-motion-duration-base) var(--co-motion-ease-out);padding-left:var(--co-spacing-xl)}.co-sidebar-nav__expansion--expanded>.co-sidebar-nav__expansion-body{max-height:1000px;opacity:1;padding-top:var(--co-spacing-xxs)}.co-sidebar-nav__highlight{all:unset;background-color:var(--co-color-primary-amarillo, #facc15);color:var(--co-color-base-negro, #000);border-radius:2px;padding:0 1px}'}},[1,"co-sidebar-nav",{items:[1],activeKey:[513,"active-key"],mode:[513],searchable:[4],searchPlaceholder:[1,"search-placeholder"],search:[1],iconMap:[1,"icon-map"],translations:[1],searchText:[32],expandedKeys:[32],flyoutKey:[32],flyoutPosition:[32]},void 0,{iconMap:[{onIconMapChange:0}],translations:[{onTranslationsChange:0}],search:[{onSearchChange:0}],activeKey:[{onActiveKeyChange:0}],items:[{onItemsChange:0}]}]);function h(){"undefined"!=typeof customElements&&["co-sidebar-nav","co-icon","co-kbd","co-tooltip"].forEach((a=>{switch(a){case"co-sidebar-nav":customElements.get(e(a))||customElements.define(e(a),v);break;case"co-icon":customElements.get(e(a))||n();break;case"co-kbd":customElements.get(e(a))||c();break;case"co-tooltip":customElements.get(e(a))||l()}}))}h();const p=v,m=h;export{p as CoSidebarNav,m as defineCustomElement}
|