shirkasoft-ui-components 1.13.18 → 2.0.0

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 (98) hide show
  1. package/README.md +415 -42
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
  3. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/shirkasoft-ui-components-button.mjs +367 -73
  5. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
  7. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
  8. package/fesm2022/shirkasoft-ui-components-config.mjs +976 -0
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
  10. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
  11. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
  12. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1400
  13. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
  14. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
  15. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
  16. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -293
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +1141 -0
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +395 -180
  21. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
  22. package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
  23. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
  24. package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -303
  25. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
  26. package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
  27. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
  28. package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -277
  29. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
  30. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
  31. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
  32. package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -814
  33. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
  34. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
  35. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
  36. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
  37. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
  38. package/fesm2022/shirkasoft-ui-components-table.mjs +1918 -1676
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -177
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +177 -51
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -369
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +466 -0
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +147 -0
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -215
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +205 -128
  53. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
  54. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
  55. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/shirkasoft-ui-components-utils.mjs +97 -125
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -166
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/fesm2022/shirkasoft-ui-components.mjs +0 -9
  61. package/package.json +37 -7
  62. package/src/baseline.css +2472 -0
  63. package/src/theme.css +15 -543
  64. package/src/themes/ocean.css +56 -0
  65. package/src/themes/sunset.css +55 -0
  66. package/src/themes/violet.css +25 -0
  67. package/src/tokens.css +612 -0
  68. package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
  69. package/types/shirkasoft-ui-components-button.d.ts +142 -49
  70. package/types/shirkasoft-ui-components-chart.d.ts +59 -44
  71. package/types/shirkasoft-ui-components-config.d.ts +357 -0
  72. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -65
  73. package/types/shirkasoft-ui-components-date-picker.d.ts +527 -373
  74. package/types/shirkasoft-ui-components-fieldset.d.ts +135 -59
  75. package/types/shirkasoft-ui-components-file-upload.d.ts +176 -106
  76. package/types/shirkasoft-ui-components-icons.d.ts +1430 -0
  77. package/types/shirkasoft-ui-components-knob.d.ts +151 -64
  78. package/types/shirkasoft-ui-components-loading.d.ts +155 -64
  79. package/types/shirkasoft-ui-components-modal.d.ts +134 -132
  80. package/types/shirkasoft-ui-components-notification.d.ts +63 -58
  81. package/types/shirkasoft-ui-components-price-input.d.ts +198 -85
  82. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
  83. package/types/shirkasoft-ui-components-select.d.ts +301 -192
  84. package/types/shirkasoft-ui-components-sidebar.d.ts +198 -92
  85. package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
  86. package/types/shirkasoft-ui-components-table.d.ts +849 -649
  87. package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
  88. package/types/shirkasoft-ui-components-tag.d.ts +54 -23
  89. package/types/shirkasoft-ui-components-text-field.d.ts +231 -111
  90. package/types/shirkasoft-ui-components-theme-picker.d.ts +117 -0
  91. package/types/shirkasoft-ui-components-theme.d.ts +80 -0
  92. package/types/shirkasoft-ui-components-timeline.d.ts +326 -150
  93. package/types/shirkasoft-ui-components-toggle.d.ts +76 -45
  94. package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
  95. package/types/shirkasoft-ui-components-utils.d.ts +26 -17
  96. package/types/shirkasoft-ui-components-wizard.d.ts +236 -86
  97. package/types/shirkasoft-ui-components.d.ts +1 -2
  98. package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"shirkasoft-ui-components-sidebar.mjs","sources":["../../../projects/ui-components/sidebar/sidebar.component.ts","../../../projects/ui-components/sidebar/sidebar.component.html","../../../projects/ui-components/sidebar/shirkasoft-ui-components-sidebar.ts"],"sourcesContent":["import {\n Component,\n HostListener,\n PLATFORM_ID,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { LucideLayoutDashboard, LucideDynamicIcon, LucideMenu, LucideHouse, LucideWarehouse } from '@lucide/angular';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\nimport { TooltipComponent } from 'shirkasoft-ui-components/tooltip';\n\nexport interface SidebarItem {\n id: string;\n label: string;\n icon?: string | any;\n route?: string;\n children?: SidebarItem[];\n roles?: string[];\n badge?: string | number;\n disabled?: boolean;\n separator?: boolean;\n}\n\nexport interface SidebarGroup {\n id?: string;\n label?: string;\n items: SidebarItem[];\n}\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Collapsible vertical navigation sidebar with groups, icons, badges,\n * role-based filtering, responsive mobile drawer and tooltips.\n */\n@Component({\n selector: 'shk-sidebar',\n standalone: true,\n imports: [CommonModule, LucideDynamicIcon, TooltipComponent],\n templateUrl: './sidebar.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n\n .sidebar-transition {\n transition:\n width 0.3s cubic-bezier(0.4, 0, 0.2, 1),\n transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .sidebar-scroll {\n overflow-y: auto;\n overflow-x: visible;\n }\n\n @media (min-width: 1024px) {\n .sidebar-mobile-transform {\n transform: none !important;\n }\n }\n `,\n ],\n})\nexport class SidebarComponent {\n private platformId = inject(PLATFORM_ID);\n /** Flat list of navigation items (used when no groups are provided). */\n items = input<SidebarItem[]>([]);\n /** Grouped navigation items; takes precedence over `items`. */\n groups = input<SidebarGroup[]>([]);\n /** Brand title shown at the top of the sidebar. */\n title = input<string>('');\n /** Subtitle under the title. */\n subtitle = input<string>('');\n /** Brand logo image/url shown at the top. */\n logo = input<string>('');\n /** id of the item currently highlighted as active. */\n activeItemId = input<string>('');\n /** Role used to filter items that declare `roles`. */\n userRole = input<string>('');\n /** Whether the sidebar can collapse into a rail. */\n collapsible = input<boolean>(true);\n /** Shows the expand/collapse toggle button. */\n showToggle = input<boolean>(true);\n /** Enables the mobile drawer behaviour below lg breakpoint. */\n responsive = input<boolean>(true);\n /** Keeps the sidebar fixed while the page scrolls. */\n fixed = input<boolean>(false);\n /** Adds a drop shadow to the sidebar. */\n hasShadow = input<boolean>(true);\n /** Width in expanded state. */\n expandedWidth = input<string>('16rem');\n /** Width when collapsed. */\n collapsedWidth = input<string>('5rem');\n /** Group ids opened by default on load. */\n defaultExpanded = input<string[]>([]);\n /** Optional transform applied to item labels (e.g. i18n). */\n labelPipe = input<(label: string) => string>((label: string) => label);\n /** Tooltip for the expand action. */\n expandTooltip = input<string>('Expandir');\n /** Tooltip for the collapse action. */\n collapseTooltip = input<string>('Colapsar');\n\n /** Collapsed state, bindable with [(collapsed)]. */\n collapsed = model<boolean>(false);\n /** Mobile drawer open state, bindable with [(mobileOpen)]. */\n mobileOpen = model<boolean>(false);\n\n /** Emitted when a navigation item is clicked. */\n itemClick = output<SidebarItem>();\n /** Emitted with the new collapsed state after toggling. */\n toggle = output<boolean>();\n\n protected getIcon = (name: any) => getIconFromCentral(name, LucideMenu);\n /** Currently selected item id. */\n protected selectedId = signal('');\n /** Set of group ids currently expanded. */\n protected expandedGroups = signal<Set<string>>(new Set());\n\n private isBrowser = false;\n\n constructor() {\n if (isPlatformBrowser(this.platformId)) {\n this.isBrowser = isPlatformBrowser(this.platformId);\n }\n\n effect(() => {\n this.selectedId.set(this.activeItemId());\n });\n\n effect(() => {\n const active = this.activeItemId();\n if (!active) return;\n const parent = this.navItems().find((item) => item.children?.some((c) => c.id === active));\n if (parent) {\n this.expandedGroups.update((set) => {\n if (set.has(parent.id)) return set;\n const next = new Set(set);\n next.add(parent.id);\n return next;\n });\n }\n });\n\n effect(() => {\n const defs = this.defaultExpanded();\n if (!defs.length) return;\n this.expandedGroups.update((set) => {\n const next = new Set(set);\n defs.forEach((id) => next.add(id));\n return next;\n });\n });\n }\n\n /** Current sidebar width depending on the collapsed state. */\n protected width = computed(() =>\n this.collapsed() ? this.collapsedWidth() : this.expandedWidth(),\n );\n\n /** Navigation items after group flattening and role filtering. */\n protected navItems = computed<SidebarItem[]>(() => {\n const role = this.userRole();\n const base = this.groups().length ? this.groups().flatMap((g) => g.items) : this.items();\n return base.filter((item) => {\n if (!item.roles || item.roles.length === 0) return true;\n return role ? item.roles.includes(role) : false;\n });\n });\n\n /** Closes the mobile drawer when the window grows below lg. */\n @HostListener('window:resize', ['$event'])\n onResize(_event: Event): void {\n if (this.responsive() && this.isBrowser && window.innerWidth < 1024) {\n this.mobileOpen.set(false);\n }\n }\n\n /** Applies the `labelPipe` transform to an item label. */\n protected label(item: SidebarItem): string {\n return this.labelPipe()(item.label);\n }\n\n /** Whether the item matches the selected id. */\n protected isItemActive(item: SidebarItem): boolean {\n return !!item.id && item.id === this.selectedId();\n }\n\n /** Whether one of the item's children is currently active. */\n protected isGroupActive(item: SidebarItem): boolean {\n return item.children?.some((c) => c.id === this.selectedId()) ?? false;\n }\n\n /** Whether a group is expanded. */\n protected isGroupExpanded(item: SidebarItem): boolean {\n return this.expandedGroups().has(item.id);\n }\n\n /** Toggles the expanded state of a group. */\n protected toggleGroup(item: SidebarItem): void {\n this.expandedGroups.update((set) => {\n const next = new Set(set);\n if (next.has(item.id)) {\n next.delete(item.id);\n } else {\n next.add(item.id);\n }\n return next;\n });\n }\n\n /** Selects an item, emits `itemClick` and closes the mobile drawer when needed. */\n protected onItemClick(item: SidebarItem): void {\n if (item.disabled) return;\n this.selectedId.set(item.id);\n this.itemClick.emit(item);\n if (this.responsive() && this.isBrowser && window.innerWidth < 1024) {\n this.mobileOpen.set(false);\n }\n }\n\n /** Toggles collapse (desktop) or the mobile drawer (below lg). */\n protected onToggle(): void {\n if (this.responsive() && this.isBrowser && window.innerWidth < 1024) {\n this.mobileOpen.update((v) => !v);\n } else {\n this.collapsed.update((v) => !v);\n this.toggle.emit(this.collapsed());\n }\n }\n}\n","@if (responsive() && mobileOpen()) {\n <!-- Mobile overlay backdrop (sibling of aside: must NOT be inside the\n transformed aside, otherwise it becomes its containing block and\n only covers the sidebar, also blocking nav clicks on mobile) -->\n <div\n class=\"fixed inset-0 bg-black/50 z-30 lg:hidden\"\n (click)=\"mobileOpen.set(false)\"\n ></div>\n}\n\n<aside\n [class.fixed]=\"fixed()\"\n [class.relative]=\"!fixed()\"\n [class.h-screen]=\"fixed()\"\n [class.h-full]=\"!fixed()\"\n class=\"top-0 left-0 flex flex-col shrink-0 sidebar-transition sidebar-mobile-transform z-40 _shk-bg-white dark:[background-color:var(--shk-surface-50)] border-r _shk-border dark:[border-color:var(--shk-surface-100)]\"\n [class.shadow-sm]=\"hasShadow()\"\n [style.width]=\"width()\"\n [style.transform]=\"responsive() ? (mobileOpen() ? 'translateX(0)' : 'translateX(-100%)') : null\"\n>\n <!-- Logo / Brand -->\n @if (logo() || title() || subtitle()) {\n <div\n class=\"flex items-center h-20 px-4 border-b _shk-border dark:[border-color:var(--shk-surface-100)] shrink-0\"\n >\n <div class=\"flex items-center gap-3 overflow-hidden\">\n @if (logo()) {\n <img [src]=\"logo()\" alt=\"Logo\" class=\"h-16 w-16 shrink-0 object-contain\" />\n }\n @if (!collapsed() && (title() || subtitle())) {\n <div class=\"flex flex-col leading-tight whitespace-nowrap\">\n @if (title()) {\n <span class=\"text-lg font-bold _shk-text-surface-800 dark:[color:var(--shk-surface-800)]\">\n {{ title() }}\n </span>\n }\n @if (subtitle()) {\n <span class=\"text-sm _shk-text-surface-500 dark:[color:var(--shk-surface-500)]\">\n {{ subtitle() }}\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Toggle button -->\n @if (showToggle() && collapsible()) {\n <button\n type=\"button\"\n (click)=\"onToggle()\"\n class=\"group absolute -right-3 top-20 z-50 w-6 h-6 rounded-full bg-white dark:[background-color:var(--shk-surface-100)] border _shk-border dark:[border-color:var(--shk-surface-200)] shadow-md max-lg:hidden flex items-center justify-center _shk-text-surface-600 dark:[color:var(--shk-surface-600)] hover:[background-color:var(--shk-primary-50)] dark:hover:[background-color:var(--shk-surface-200)] hover:[color:var(--shk-primary-600)] dark:hover:[color:var(--shk-primary-400)] transition-colors\"\n >\n @if (collapsed()) {\n <svg [lucideIcon]=\"getIcon('chevron-right')\" class=\"w-3 h-3\"></svg>\n } @else {\n <svg [lucideIcon]=\"getIcon('chevron-left')\" class=\"w-3 h-3\"></svg>\n }\n <span\n class=\"absolute left-full ml-1 top-1/2 -translate-y-1/2 px-2 py-1 text-xs _shk-bg-tooltip _shk-text-tooltip rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition pointer-events-none z-[9999] shadow-lg\"\n >\n {{ collapsed() ? expandTooltip() : collapseTooltip() }}\n </span>\n </button>\n }\n\n <ng-content select=\"[sidebarHeader]\"></ng-content>\n\n <!-- Custom content between header and nav -->\n <ng-content select=\"[sidebarContent]\"></ng-content>\n\n <!-- Navigation -->\n <nav class=\"flex-1 sidebar-scroll _shk-scrollbar py-4 px-3\">\n <ul class=\"space-y-1\">\n @for (item of navItems(); track item.id) {\n @if (item.separator) {\n <li class=\"my-2 border-t _shk-border dark:[border-color:var(--shk-surface-200)]\"></li>\n }\n\n @if (item.children?.length) {\n <!-- Group -->\n <li>\n @if (collapsed()) {\n <shk-tooltip [text]=\"label(item)\" position=\"right\" mode=\"fixed\">\n <div\n class=\"flex items-center justify-center px-3 py-2.5 rounded-lg transition-all duration-200\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class._shk-text-surface-500]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [lucideIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n </div>\n </shk-tooltip>\n } @else {\n <button\n type=\"button\"\n (click)=\"toggleGroup(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200 group relative\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class.shadow-md]=\"isGroupActive(item)\"\n [class._shk-text-surface-700]=\"!isGroupActive(item)\"\n [class.dark:[color:var(--shk-surface-600)]]=\"!isGroupActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isGroupActive(item)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [lucideIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item) }}</span>\n <svg\n [lucideIcon]=\"getIcon('chevron-down')\"\n class=\"w-4 h-4 transition-transform duration-200 shrink-0\"\n [class.rotate-180]=\"isGroupExpanded(item)\"\n ></svg>\n </button>\n\n @if (isGroupExpanded(item)) {\n <ul class=\"ml-3 mt-1 space-y-1 border-l-2 _shk-border dark:[border-color:var(--shk-surface-200)] pl-2\">\n @for (child of item.children; track child.id) {\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(child)\"\n class=\"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary-soft]=\"isItemActive(child)\"\n [class._shk-bg-primary-soft-dark]=\"isItemActive(child)\"\n [class._shk-text-primary-700]=\"isItemActive(child)\"\n [class.dark:[color:var(--shk-primary-300)]]=\"isItemActive(child)\"\n [class._shk-text-surface-600]=\"!isItemActive(child)\"\n [class.dark:[color:var(--shk-surface-400)]]=\"!isItemActive(child)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(child)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(child)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(child)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(child)\"\n >\n @if (child.icon) {\n <svg [lucideIcon]=\"getIcon(child.icon)\" class=\"w-4 h-4 shrink-0\"></svg>\n }\n <span class=\"whitespace-nowrap overflow-hidden\">{{ label(child) }}</span>\n @if (isItemActive(child)) {\n <span class=\"w-1.5 h-1.5 rounded-full _shk-bg-primary shrink-0 ml-auto\"></span>\n }\n </button>\n </li>\n }\n </ul>\n }\n }\n </li>\n } @else {\n <!-- Standalone item -->\n <li>\n @if (collapsed()) {\n <shk-tooltip [text]=\"label(item)\" position=\"right\" mode=\"fixed\">\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center justify-center px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.dark:[color:var(--shk-surface-600)]]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(item)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [lucideIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n </button>\n </shk-tooltip>\n } @else {\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.dark:[color:var(--shk-surface-600)]]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(item)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [lucideIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item) }}</span>\n @if (item.badge !== undefined) {\n <span\n class=\"text-xs font-bold px-2 py-0.5 rounded-full _shk-bg-primary _shk-text-white shrink-0\"\n [class.hidden]=\"collapsed()\"\n >\n {{ item.badge }}\n </span>\n }\n @if (isItemActive(item)) {\n <span class=\"w-1.5 h-1.5 rounded-full bg-white shrink-0\"></span>\n }\n </button>\n }\n </li>\n }\n }\n </ul>\n </nav>\n\n <!-- Footer -->\n <div class=\"shrink-0 p-2 [&:empty]:hidden\">\n <ng-content select=\"[sidebarFooter]\"></ng-content>\n </div>\n</aside>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AAmCA;;;;AAIG;AAEH;;;AAGG;MA+BU,gBAAgB,CAAA;AAyD3B,IAAA,WAAA,GAAA;AAxDQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;;AAExC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,EAAE,4EAAC;;AAEhC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiB,EAAE,6EAAC;;AAElC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;;AAE5B,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,EAAE,mFAAC;;AAEhC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;;AAE5B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,IAAI,kFAAC;;AAElC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,IAAI,iFAAC;;AAEjC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,IAAI,iFAAC;;AAEjC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAU,KAAK,4EAAC;;AAE7B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,IAAI,gFAAC;;AAEhC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,OAAO,oFAAC;;AAEtC,QAAA,IAAA,CAAA,cAAc,GAAG,K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,KAAK,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACpC;IACF;+GArKW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,u3FC3E7B,8nWA8NA,EAAA,MAAA,EAAA,CAAA,+PAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED9KY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,oFAAE,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FA2BhD,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBA9B5B,SAAS;+BACE,aAAa,EAAA,UAAA,EACX,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,8nWAAA,EAAA,MAAA,EAAA,CAAA,+PAAA,CAAA,EAAA;;sBAsI3D,YAAY;uBAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;;;AEtL3C;;AAEG;;;;"}
1
+ {"version":3,"file":"shirkasoft-ui-components-sidebar.mjs","names":["getIconFromCentral"],"sources":["../../../projects/ui-components/sidebar/sidebar.component.ts","../../../projects/ui-components/sidebar/sidebar.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n HostListener,\n PLATFORM_ID,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport { LucideLayoutDashboard, ShkIconDirective, LucideMenu, LucideHouse, LucideWarehouse } from 'shirkasoft-ui-components/icons';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\nimport { TooltipComponent } from 'shirkasoft-ui-components/tooltip';\n\nexport interface SidebarItem {\n id: string;\n label: string;\n icon?: string | any;\n route?: string;\n children?: SidebarItem[];\n roles?: string[];\n badge?: string | number;\n disabled?: boolean;\n separator?: boolean;\n}\n\nexport interface SidebarGroup {\n id?: string;\n label?: string;\n items: SidebarItem[];\n}\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Collapsible vertical navigation sidebar with groups, icons, badges,\n * role-based filtering, responsive mobile drawer and tooltips.\n */\n@Component({\n selector: 'shk-sidebar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, ShkIconDirective, TooltipComponent],\n templateUrl: './sidebar.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n\n .sidebar-transition {\n transition:\n width 0.3s cubic-bezier(0.4, 0, 0.2, 1),\n transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .sidebar-scroll {\n overflow-y: auto;\n overflow-x: visible;\n }\n\n @media (min-width: 1024px) {\n .sidebar-mobile-transform {\n transform: none !important;\n }\n }\n\n /* Closed off-canvas drawer (below lg): hide it once the slide-out ends so\n its z-index never paints over the host app and its links are not\n reachable with Tab while it is off screen. */\n @media (max-width: 1023.98px) {\n .sidebar-mobile-closed {\n visibility: hidden;\n transition:\n width 0.3s cubic-bezier(0.4, 0, 0.2, 1),\n transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),\n visibility 0s linear 0.3s;\n }\n }\n `,\n ],\n})\nexport class SidebarComponent {\n private platformId = inject(PLATFORM_ID);\n /** Flat list of navigation items (used when no groups are provided). */\n items = input<SidebarItem[]>([]);\n /** Grouped navigation items; takes precedence over `items`. */\n groups = input<SidebarGroup[]>([]);\n /** Brand title shown at the top of the sidebar. */\n title = input<string>('');\n /** Subtitle under the title. */\n subtitle = input<string>('');\n /** Brand logo image/url shown at the top. */\n logo = input<string>('');\n /** id of the item currently highlighted as active. */\n activeItemId = input<string>('');\n /** Role used to filter items that declare `roles`. */\n userRole = input<string>('');\n /** Whether the sidebar can collapse into a rail. */\n collapsible = input<boolean>(true);\n /** Shows the expand/collapse toggle button. */\n showToggle = input<boolean>(true);\n /** Enables the mobile drawer behaviour below lg breakpoint. */\n responsive = input<boolean>(true);\n /** Keeps the sidebar fixed while the page scrolls. */\n fixed = input<boolean>(false);\n /** Adds a drop shadow to the sidebar. */\n hasShadow = input<boolean>(true);\n /** Width in expanded state. */\n expandedWidth = input<string>('16rem');\n /** Width when collapsed. */\n collapsedWidth = input<string>('5rem');\n /** Group ids opened by default on load. */\n defaultExpanded = input<string[]>([]);\n /** Optional transform applied to item labels (e.g. i18n). */\n labelPipe = input<(label: string) => string>((label: string) => label);\n /** Tooltip for the expand action. */\n expandTooltip = input<string>('Expandir');\n /** Tooltip for the collapse action. */\n collapseTooltip = input<string>('Colapsar');\n\n /** Collapsed state, bindable with [(collapsed)]. */\n collapsed = model<boolean>(false);\n /** Mobile drawer open state, bindable with [(mobileOpen)]. */\n mobileOpen = model<boolean>(false);\n\n /** Emitted when a navigation item is clicked. */\n itemClick = output<SidebarItem>();\n /** Emitted with the new collapsed state after toggling. */\n toggle = output<boolean>();\n\n protected getIcon = (name: any) => getIconFromCentral(name, LucideMenu);\n /** Currently selected item id. */\n protected selectedId = signal('');\n /** Set of group ids currently expanded. */\n protected expandedGroups = signal<Set<string>>(new Set());\n\n private isBrowser = false;\n\n constructor() {\n if (isPlatformBrowser(this.platformId)) {\n this.isBrowser = isPlatformBrowser(this.platformId);\n }\n\n effect(() => {\n this.selectedId.set(this.activeItemId());\n });\n\n effect(() => {\n const active = this.activeItemId();\n if (!active) return;\n const parent = this.navItems().find((item) => item.children?.some((c) => c.id === active));\n if (parent) {\n this.expandedGroups.update((set) => {\n if (set.has(parent.id)) return set;\n const next = new Set(set);\n next.add(parent.id);\n return next;\n });\n }\n });\n\n effect(() => {\n const defs = this.defaultExpanded();\n if (!defs.length) return;\n this.expandedGroups.update((set) => {\n const next = new Set(set);\n defs.forEach((id) => next.add(id));\n return next;\n });\n });\n }\n\n /** Current sidebar width depending on the collapsed state. */\n protected width = computed(() =>\n this.collapsed() ? this.collapsedWidth() : this.expandedWidth(),\n );\n\n /** Navigation items after group flattening and role filtering. */\n protected navItems = computed<SidebarItem[]>(() => {\n const role = this.userRole();\n const base = this.groups().length ? this.groups().flatMap((g) => g.items) : this.items();\n return base.filter((item) => {\n if (!item.roles || item.roles.length === 0) return true;\n return role ? item.roles.includes(role) : false;\n });\n });\n\n /** Closes the mobile drawer when the window grows below lg. */\n @HostListener('window:resize', ['$event'])\n onResize(_event: Event): void {\n if (this.responsive() && this.isBrowser && window.innerWidth < 1024) {\n this.mobileOpen.set(false);\n }\n }\n\n /** Applies the `labelPipe` transform to an item label. */\n protected label(item: SidebarItem): string {\n return this.labelPipe()(item.label);\n }\n\n /** Whether the item matches the selected id. */\n protected isItemActive(item: SidebarItem): boolean {\n return !!item.id && item.id === this.selectedId();\n }\n\n /** Whether one of the item's children is currently active. */\n protected isGroupActive(item: SidebarItem): boolean {\n return item.children?.some((c) => c.id === this.selectedId()) ?? false;\n }\n\n /** Whether a group is expanded. */\n protected isGroupExpanded(item: SidebarItem): boolean {\n return this.expandedGroups().has(item.id);\n }\n\n /** Toggles the expanded state of a group. */\n protected toggleGroup(item: SidebarItem): void {\n this.expandedGroups.update((set) => {\n const next = new Set(set);\n if (next.has(item.id)) {\n next.delete(item.id);\n } else {\n next.add(item.id);\n }\n return next;\n });\n }\n\n /** Selects an item, emits `itemClick` and closes the mobile drawer when needed. */\n protected onItemClick(item: SidebarItem): void {\n if (item.disabled) return;\n this.selectedId.set(item.id);\n this.itemClick.emit(item);\n if (this.responsive() && this.isBrowser && window.innerWidth < 1024) {\n this.mobileOpen.set(false);\n }\n }\n\n /** Toggles collapse (desktop) or the mobile drawer (below lg). */\n protected onToggle(): void {\n if (this.responsive() && this.isBrowser && window.innerWidth < 1024) {\n this.mobileOpen.update((v) => !v);\n } else {\n this.collapsed.update((v) => !v);\n this.toggle.emit(this.collapsed());\n }\n }\n}\n","@if (responsive() && mobileOpen()) {\n <!-- Mobile overlay backdrop (sibling of aside: must NOT be inside the\n transformed aside, otherwise it becomes its containing block and\n only covers the sidebar, also blocking nav clicks on mobile) -->\n <div\n class=\"fixed inset-0 bg-black/50 z-30 lg:hidden\"\n (click)=\"mobileOpen.set(false)\"\n ></div>\n}\n\n<aside\n [class.fixed]=\"fixed()\"\n [class.relative]=\"!fixed()\"\n [class.h-screen]=\"fixed()\"\n [class.h-full]=\"!fixed()\"\n class=\"top-0 left-0 flex flex-col shrink-0 sidebar-transition sidebar-mobile-transform z-40 _shk-bg-panel border-r _shk-border\"\n [class.shadow-sm]=\"hasShadow()\"\n [style.width]=\"width()\"\n [style.transform]=\"responsive() ? (mobileOpen() ? 'translateX(0)' : 'translateX(-100%)') : null\"\n [class.sidebar-mobile-closed]=\"responsive() && !mobileOpen()\"\n>\n <!-- Logo / Brand -->\n @if (logo() || title() || subtitle()) {\n <div\n class=\"flex items-center h-20 px-4 border-b _shk-border shrink-0\"\n >\n <div class=\"flex items-center gap-3 overflow-hidden\">\n @if (logo()) {\n <img [src]=\"logo()\" alt=\"Logo\" class=\"h-16 w-16 shrink-0 object-contain\" />\n }\n @if (!collapsed() && (title() || subtitle())) {\n <div class=\"flex flex-col leading-tight whitespace-nowrap\">\n @if (title()) {\n <span class=\"text-lg font-bold _shk-text-surface-800\">\n {{ title() }}\n </span>\n }\n @if (subtitle()) {\n <span class=\"text-sm _shk-text-surface-500\">\n {{ subtitle() }}\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Toggle button -->\n @if (showToggle() && collapsible()) {\n <button\n type=\"button\"\n (click)=\"onToggle()\"\n class=\"group absolute -right-3 top-20 z-50 w-6 h-6 rounded-full bg-white dark:[background-color:var(--shk-surface-100)] border _shk-border shadow-md max-lg:hidden flex items-center justify-center _shk-text-surface-600 hover:[background-color:var(--shk-primary-50)] dark:hover:[background-color:var(--shk-surface-200)] hover:[color:var(--shk-primary-600)] dark:hover:[color:var(--shk-primary-400)] transition-colors\"\n >\n @if (collapsed()) {\n <svg [shkIcon]=\"getIcon('chevron-right')\" class=\"w-3 h-3\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('chevron-left')\" class=\"w-3 h-3\"></svg>\n }\n <span\n class=\"absolute left-full ml-1 top-1/2 -translate-y-1/2 px-2 py-1 text-xs _shk-bg-tooltip _shk-text-tooltip rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition pointer-events-none z-[9999] shadow-lg\"\n >\n {{ collapsed() ? expandTooltip() : collapseTooltip() }}\n </span>\n </button>\n }\n\n <ng-content select=\"[sidebarHeader]\"></ng-content>\n\n <!-- Custom content between header and nav -->\n <ng-content select=\"[sidebarContent]\"></ng-content>\n\n <!-- Navigation -->\n <nav class=\"flex-1 sidebar-scroll _shk-scrollbar py-4 px-3\">\n <ul class=\"space-y-1\">\n @for (item of navItems(); track item.id) {\n @if (item.separator) {\n <li class=\"my-2 border-t _shk-border\"></li>\n }\n\n @if (item.children?.length) {\n <!-- Group -->\n <li>\n @if (collapsed()) {\n <shk-tooltip [text]=\"label(item)\" position=\"right\" mode=\"fixed\">\n <div\n class=\"flex items-center justify-center px-3 py-2.5 rounded-lg transition-all duration-200\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class._shk-text-surface-500]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n </div>\n </shk-tooltip>\n } @else {\n <button\n type=\"button\"\n (click)=\"toggleGroup(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200 group relative\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class.shadow-md]=\"isGroupActive(item)\"\n [class._shk-text-surface-700]=\"!isGroupActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isGroupActive(item)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item) }}</span>\n <svg\n [shkIcon]=\"getIcon('chevron-down')\"\n class=\"w-4 h-4 transition-transform duration-200 shrink-0\"\n [class.rotate-180]=\"isGroupExpanded(item)\"\n ></svg>\n </button>\n\n @if (isGroupExpanded(item)) {\n <ul class=\"ml-3 mt-1 space-y-1 border-l-2 _shk-border pl-2\">\n @for (child of item.children; track child.id) {\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(child)\"\n class=\"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary-soft]=\"isItemActive(child)\"\n [class._shk-bg-primary-soft-dark]=\"isItemActive(child)\"\n [class._shk-text-primary-700]=\"isItemActive(child)\"\n [class.dark:[color:var(--shk-primary-300)]]=\"isItemActive(child)\"\n [class._shk-text-surface-600]=\"!isItemActive(child)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(child)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(child)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(child)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(child)\"\n >\n @if (child.icon) {\n <svg [shkIcon]=\"getIcon(child.icon)\" class=\"w-4 h-4 shrink-0\"></svg>\n }\n <span class=\"whitespace-nowrap overflow-hidden\">{{ label(child) }}</span>\n @if (isItemActive(child)) {\n <span class=\"w-1.5 h-1.5 rounded-full _shk-bg-primary shrink-0 ml-auto\"></span>\n }\n </button>\n </li>\n }\n </ul>\n }\n }\n </li>\n } @else {\n <!-- Standalone item -->\n <li>\n @if (collapsed()) {\n <shk-tooltip [text]=\"label(item)\" position=\"right\" mode=\"fixed\">\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center justify-center px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(item)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n </button>\n </shk-tooltip>\n } @else {\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(item)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item) }}</span>\n @if (item.badge !== undefined) {\n <span\n class=\"text-xs font-bold px-2 py-0.5 rounded-full _shk-bg-primary _shk-text-white shrink-0\"\n [class.hidden]=\"collapsed()\"\n >\n {{ item.badge }}\n </span>\n }\n @if (isItemActive(item)) {\n <span class=\"w-1.5 h-1.5 rounded-full bg-white shrink-0\"></span>\n }\n </button>\n }\n </li>\n }\n }\n </ul>\n </nav>\n\n <!-- Footer -->\n <div class=\"shrink-0 p-2 [&:empty]:hidden\">\n <ng-content select=\"[sidebarFooter]\"></ng-content>\n </div>\n</aside>\n"],"mappings":";;;;;;AAyFA,IAAa,mBAAb,MAAa,iBAAgB;CAyD3B,cAAA;EAxDQ,KAAA,aAAa,OAAO,WAAW;EAEvC,KAAA,QAAQ,MAAqB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEhC,KAAA,SAAS,MAAsB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAElC,KAAA,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEzB,KAAA,WAAW,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAE5B,KAAA,OAAO,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAExB,KAAA,eAAe,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EA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A;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAgB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAwC/C,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EA3C5B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,iBACN,wBAAwB;GAAM,SACtC;IAAC;IAAc;IAAkB;GAAgB;GAAC,UAAA;GAAA,QAAA,CAAA,ibAAA;EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmJ1D,MAAA;GAAa,MAAA,CAAA,iBAAiB,CAAC,QAAQ,CAAC"}
@@ -1,47 +1,109 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
-
4
- /**
5
- * Shirkasoft UI Components.
6
- * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
7
- * Belongs to Shirkasoft.
8
- */
9
- /** Placeholder block shown while content is loading. */
10
- class SkeletonComponent {
11
- constructor() {
12
- /** Shape of the skeleton: rectangle (default) or circle. */
13
- this.shape = input('rectangle', ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
14
- /** When shape is circle, sets both width and height. */
15
- this.size = input('', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
16
- /** Width of the rectangle skeleton. */
17
- this.width = input('100%', ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
18
- /** Height of the rectangle skeleton. */
19
- this.height = input('1rem', ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
20
- /** Custom border radius (rectangle only). */
21
- this.borderRadius = input('', ...(ngDevMode ? [{ debugName: "borderRadius" }] : /* istanbul ignore next */ []));
22
- /** Animation effect: 'wave' (default), 'pulse' or 'none'. */
23
- this.animation = input('wave', ...(ngDevMode ? [{ debugName: "animation" }] : /* istanbul ignore next */ []));
24
- /** Inline styles applied to the skeleton block. */
25
- this.style = input({}, ...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
26
- /** Extra CSS classes. */
27
- this.styleClass = input('', ...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
28
- this.rootStyle = computed(() => {
29
- const s = {};
30
- if (this.shape() === 'circle') {
31
- s['width'] = this.size() || this.width();
32
- s['height'] = this.size() || this.height();
33
- s['borderRadius'] = '9999px';
34
- }
35
- else {
36
- s['width'] = this.width();
37
- s['height'] = this.height();
38
- s['borderRadius'] = this.borderRadius() || '0.25rem';
39
- }
40
- return { ...s, ...this.style() };
41
- }, ...(ngDevMode ? [{ debugName: "rootStyle" }] : /* istanbul ignore next */ []));
42
- }
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
44
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.23", type: SkeletonComponent, isStandalone: true, selector: "shk-skeleton", inputs: { shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
3
+ var SkeletonComponent = class SkeletonComponent {
4
+ constructor() {
5
+ this.shape = input("rectangle", ...ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []);
6
+ this.size = input("", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
7
+ this.width = input("100%", ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
8
+ this.height = input("1rem", ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
9
+ this.borderRadius = input("", ...ngDevMode ? [{ debugName: "borderRadius" }] : /* istanbul ignore next */ []);
10
+ this.animation = input("wave", ...ngDevMode ? [{ debugName: "animation" }] : /* istanbul ignore next */ []);
11
+ this.style = input({}, ...ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []);
12
+ this.styleClass = input("", ...ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []);
13
+ this.rootStyle = computed(() => {
14
+ const s = {};
15
+ if (this.shape() === "circle") {
16
+ s["width"] = this.size() || this.width();
17
+ s["height"] = this.size() || this.height();
18
+ s["borderRadius"] = "9999px";
19
+ } else {
20
+ s["width"] = this.width();
21
+ s["height"] = this.height();
22
+ s["borderRadius"] = this.borderRadius() || "0.25rem";
23
+ }
24
+ return {
25
+ ...s,
26
+ ...this.style()
27
+ };
28
+ }, ...ngDevMode ? [{ debugName: "rootStyle" }] : /* istanbul ignore next */ []);
29
+ }
30
+ static {
31
+ this.ɵfac = i0.ɵɵngDeclareFactory({
32
+ minVersion: "12.0.0",
33
+ version: "22.3.2",
34
+ ngImport: i0,
35
+ type: SkeletonComponent,
36
+ deps: [],
37
+ target: i0.ɵɵFactoryTarget.Component
38
+ });
39
+ }
40
+ static {
41
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
42
+ minVersion: "17.1.0",
43
+ version: "22.3.2",
44
+ type: SkeletonComponent,
45
+ isStandalone: true,
46
+ selector: "shk-skeleton",
47
+ inputs: {
48
+ shape: {
49
+ classPropertyName: "shape",
50
+ publicName: "shape",
51
+ isSignal: true,
52
+ isRequired: false,
53
+ transformFunction: null
54
+ },
55
+ size: {
56
+ classPropertyName: "size",
57
+ publicName: "size",
58
+ isSignal: true,
59
+ isRequired: false,
60
+ transformFunction: null
61
+ },
62
+ width: {
63
+ classPropertyName: "width",
64
+ publicName: "width",
65
+ isSignal: true,
66
+ isRequired: false,
67
+ transformFunction: null
68
+ },
69
+ height: {
70
+ classPropertyName: "height",
71
+ publicName: "height",
72
+ isSignal: true,
73
+ isRequired: false,
74
+ transformFunction: null
75
+ },
76
+ borderRadius: {
77
+ classPropertyName: "borderRadius",
78
+ publicName: "borderRadius",
79
+ isSignal: true,
80
+ isRequired: false,
81
+ transformFunction: null
82
+ },
83
+ animation: {
84
+ classPropertyName: "animation",
85
+ publicName: "animation",
86
+ isSignal: true,
87
+ isRequired: false,
88
+ transformFunction: null
89
+ },
90
+ style: {
91
+ classPropertyName: "style",
92
+ publicName: "style",
93
+ isSignal: true,
94
+ isRequired: false,
95
+ transformFunction: null
96
+ },
97
+ styleClass: {
98
+ classPropertyName: "styleClass",
99
+ publicName: "styleClass",
100
+ isSignal: true,
101
+ isRequired: false,
102
+ transformFunction: null
103
+ }
104
+ },
105
+ ngImport: i0,
106
+ template: `
45
107
  <div
46
108
  [class]="'shk-skeleton ' + styleClass()"
47
109
  [class.shk-skeleton-circle]="shape() === 'circle'"
@@ -50,11 +112,24 @@ class SkeletonComponent {
50
112
  [style]="rootStyle()"
51
113
  aria-hidden="true"
52
114
  ></div>
53
- `, isInline: true, styles: [":host{display:block}.shk-skeleton{position:relative;overflow:hidden;background-color:var(--shk-skeleton-bg)}.shk-skeleton-circle{border-radius:9999px}.shk-skeleton-animate-wave:after{content:\"\";position:absolute;inset:0;background-image:linear-gradient(90deg,transparent,var(--shk-skeleton-highlight) 50%,transparent);animation:shk-skeleton-wave 1.6s ease-in-out infinite}.shk-skeleton-animate-pulse{animation:shk-skeleton-pulse 2s ease-in-out infinite}@keyframes shk-skeleton-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shk-skeleton-pulse{0%,to{opacity:1}50%{opacity:.55}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
54
- }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: SkeletonComponent, decorators: [{
56
- type: Component,
57
- args: [{ selector: 'shk-skeleton', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
115
+ `,
116
+ isInline: true,
117
+ styles: [":host{display:block}.shk-skeleton{position:relative;overflow:hidden;background-color:var(--shk-skeleton-bg)}.shk-skeleton-circle{border-radius:9999px}.shk-skeleton-animate-wave:after{content:\"\";position:absolute;inset:0;background-image:linear-gradient(90deg,transparent,var(--shk-skeleton-highlight) 50%,transparent);animation:shk-skeleton-wave 1.6s ease-in-out infinite}.shk-skeleton-animate-pulse{animation:shk-skeleton-pulse 2s ease-in-out infinite}@keyframes shk-skeleton-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shk-skeleton-pulse{0%,to{opacity:1}50%{opacity:.55}}\n"],
118
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
119
+ });
120
+ }
121
+ };
122
+ i0.ɵɵngDeclareClassMetadata({
123
+ minVersion: "12.0.0",
124
+ version: "22.3.2",
125
+ ngImport: i0,
126
+ type: SkeletonComponent,
127
+ decorators: [{
128
+ type: Component,
129
+ args: [{
130
+ selector: "shk-skeleton",
131
+ changeDetection: ChangeDetectionStrategy.OnPush,
132
+ template: `
58
133
  <div
59
134
  [class]="'shk-skeleton ' + styleClass()"
60
135
  [class.shk-skeleton-circle]="shape() === 'circle'"
@@ -63,12 +138,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
63
138
  [style]="rootStyle()"
64
139
  aria-hidden="true"
65
140
  ></div>
66
- `, styles: [":host{display:block}.shk-skeleton{position:relative;overflow:hidden;background-color:var(--shk-skeleton-bg)}.shk-skeleton-circle{border-radius:9999px}.shk-skeleton-animate-wave:after{content:\"\";position:absolute;inset:0;background-image:linear-gradient(90deg,transparent,var(--shk-skeleton-highlight) 50%,transparent);animation:shk-skeleton-wave 1.6s ease-in-out infinite}.shk-skeleton-animate-pulse{animation:shk-skeleton-pulse 2s ease-in-out infinite}@keyframes shk-skeleton-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shk-skeleton-pulse{0%,to{opacity:1}50%{opacity:.55}}\n"] }]
67
- }], propDecorators: { shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadius", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }] } });
68
-
69
- /**
70
- * Generated bundle index. Do not edit.
71
- */
72
-
141
+ `,
142
+ styles: [":host{display:block}.shk-skeleton{position:relative;overflow:hidden;background-color:var(--shk-skeleton-bg)}.shk-skeleton-circle{border-radius:9999px}.shk-skeleton-animate-wave:after{content:\"\";position:absolute;inset:0;background-image:linear-gradient(90deg,transparent,var(--shk-skeleton-highlight) 50%,transparent);animation:shk-skeleton-wave 1.6s ease-in-out infinite}.shk-skeleton-animate-pulse{animation:shk-skeleton-pulse 2s ease-in-out infinite}@keyframes shk-skeleton-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes shk-skeleton-pulse{0%,to{opacity:1}50%{opacity:.55}}\n"]
143
+ }]
144
+ }],
145
+ propDecorators: {
146
+ shape: [{
147
+ type: i0.Input,
148
+ args: [{
149
+ isSignal: true,
150
+ alias: "shape",
151
+ required: false
152
+ }]
153
+ }],
154
+ size: [{
155
+ type: i0.Input,
156
+ args: [{
157
+ isSignal: true,
158
+ alias: "size",
159
+ required: false
160
+ }]
161
+ }],
162
+ width: [{
163
+ type: i0.Input,
164
+ args: [{
165
+ isSignal: true,
166
+ alias: "width",
167
+ required: false
168
+ }]
169
+ }],
170
+ height: [{
171
+ type: i0.Input,
172
+ args: [{
173
+ isSignal: true,
174
+ alias: "height",
175
+ required: false
176
+ }]
177
+ }],
178
+ borderRadius: [{
179
+ type: i0.Input,
180
+ args: [{
181
+ isSignal: true,
182
+ alias: "borderRadius",
183
+ required: false
184
+ }]
185
+ }],
186
+ animation: [{
187
+ type: i0.Input,
188
+ args: [{
189
+ isSignal: true,
190
+ alias: "animation",
191
+ required: false
192
+ }]
193
+ }],
194
+ style: [{
195
+ type: i0.Input,
196
+ args: [{
197
+ isSignal: true,
198
+ alias: "style",
199
+ required: false
200
+ }]
201
+ }],
202
+ styleClass: [{
203
+ type: i0.Input,
204
+ args: [{
205
+ isSignal: true,
206
+ alias: "styleClass",
207
+ required: false
208
+ }]
209
+ }]
210
+ }
211
+ });
73
212
  export { SkeletonComponent };
74
- //# sourceMappingURL=shirkasoft-ui-components-skeleton.mjs.map
213
+
214
+ //# sourceMappingURL=shirkasoft-ui-components-skeleton.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"shirkasoft-ui-components-skeleton.mjs","sources":["../../../projects/ui-components/skeleton/skeleton.component.ts","../../../projects/ui-components/skeleton/shirkasoft-ui-components-skeleton.ts"],"sourcesContent":["import { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\n\nexport type SkeletonShape = 'rectangle' | 'circle';\nexport type SkeletonAnimation = 'wave' | 'pulse' | 'none';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/** Placeholder block shown while content is loading. */\n@Component({\n selector: 'shk-skeleton',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n [class]=\"'shk-skeleton ' + styleClass()\"\n [class.shk-skeleton-circle]=\"shape() === 'circle'\"\n [class.shk-skeleton-animate-wave]=\"animation() === 'wave'\"\n [class.shk-skeleton-animate-pulse]=\"animation() === 'pulse'\"\n [style]=\"rootStyle()\"\n aria-hidden=\"true\"\n ></div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n .shk-skeleton {\n position: relative;\n overflow: hidden;\n background-color: var(--shk-skeleton-bg);\n }\n .shk-skeleton-circle {\n border-radius: 9999px;\n }\n .shk-skeleton-animate-wave::after {\n content: '';\n position: absolute;\n inset: 0;\n background-image: linear-gradient(\n 90deg,\n transparent,\n var(--shk-skeleton-highlight) 50%,\n transparent\n );\n animation: shk-skeleton-wave 1.6s ease-in-out infinite;\n }\n .shk-skeleton-animate-pulse {\n animation: shk-skeleton-pulse 2s ease-in-out infinite;\n }\n @keyframes shk-skeleton-wave {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n @keyframes shk-skeleton-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.55;\n }\n }\n `,\n ],\n})\nexport class SkeletonComponent {\n /** Shape of the skeleton: rectangle (default) or circle. */\n shape = input<SkeletonShape>('rectangle');\n /** When shape is circle, sets both width and height. */\n size = input<string>('');\n /** Width of the rectangle skeleton. */\n width = input<string>('100%');\n /** Height of the rectangle skeleton. */\n height = input<string>('1rem');\n /** Custom border radius (rectangle only). */\n borderRadius = input<string>('');\n /** Animation effect: 'wave' (default), 'pulse' or 'none'. */\n animation = input<SkeletonAnimation>('wave');\n /** Inline styles applied to the skeleton block. */\n style = input<Record<string, string | number>>({});\n /** Extra CSS classes. */\n styleClass = input<string>('');\n\n protected rootStyle = computed(() => {\n const s: Record<string, string | number> = {};\n if (this.shape() === 'circle') {\n s['width'] = this.size() || this.width();\n s['height'] = this.size() || this.height();\n s['borderRadius'] = '9999px';\n } else {\n s['width'] = this.width();\n s['height'] = this.height();\n s['borderRadius'] = this.borderRadius() || '0.25rem';\n }\n return { ...s, ...this.style() };\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAKA;;;;AAIG;AAEH;MA+Da,iBAAiB,CAAA;AA9D9B,IAAA,WAAA,GAAA;;AAgEE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,WAAW,4EAAC;;AAEzC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,2EAAC;;AAExB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,MAAM,4EAAC;;AAE7B,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,MAAM,6EAAC;;AAE9B,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,EAAE,mFAAC;;AAEhC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAoB,MAAM,gFAAC;;AAE5C,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAkC,EAAE,4EAAC;;AAElD,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,iFAAC;AAEpB,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAK;YAClC,MAAM,CAAC,GAAoC,EAAE;AAC7C,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,QAAQ,EAAE;AAC7B,gBAAA,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE;AACxC,gBAA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components-skeleton.mjs","names":[],"sources":["../../../projects/ui-components/skeleton/skeleton.component.ts"],"sourcesContent":["import { Component, computed, input, ChangeDetectionStrategy } from '@angular/core';\n\nexport type SkeletonShape = 'rectangle' | 'circle';\nexport type SkeletonAnimation = 'wave' | 'pulse' | 'none';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/** Placeholder block shown while content is loading. */\n@Component({\n selector: 'shk-skeleton',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div\n [class]=\"'shk-skeleton ' + styleClass()\"\n [class.shk-skeleton-circle]=\"shape() === 'circle'\"\n [class.shk-skeleton-animate-wave]=\"animation() === 'wave'\"\n [class.shk-skeleton-animate-pulse]=\"animation() === 'pulse'\"\n [style]=\"rootStyle()\"\n aria-hidden=\"true\"\n ></div>\n `,\n styles: [\n `\n :host {\n display: block;\n }\n .shk-skeleton {\n position: relative;\n overflow: hidden;\n background-color: var(--shk-skeleton-bg);\n }\n .shk-skeleton-circle {\n border-radius: 9999px;\n }\n .shk-skeleton-animate-wave::after {\n content: '';\n position: absolute;\n inset: 0;\n background-image: linear-gradient(\n 90deg,\n transparent,\n var(--shk-skeleton-highlight) 50%,\n transparent\n );\n animation: shk-skeleton-wave 1.6s ease-in-out infinite;\n }\n .shk-skeleton-animate-pulse {\n animation: shk-skeleton-pulse 2s ease-in-out infinite;\n }\n @keyframes shk-skeleton-wave {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(100%);\n }\n }\n @keyframes shk-skeleton-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.55;\n }\n }\n `,\n ],\n})\nexport class SkeletonComponent {\n /** Shape of the skeleton: rectangle (default) or circle. */\n shape = input<SkeletonShape>('rectangle');\n /** When shape is circle, sets both width and height. */\n size = input<string>('');\n /** Width of the rectangle skeleton. */\n width = input<string>('100%');\n /** Height of the rectangle skeleton. */\n height = input<string>('1rem');\n /** Custom border radius (rectangle only). */\n borderRadius = input<string>('');\n /** Animation effect: 'wave' (default), 'pulse' or 'none'. */\n animation = input<SkeletonAnimation>('wave');\n /** Inline styles applied to the skeleton block. */\n style = input<Record<string, string | number>>({});\n /** Extra CSS classes. */\n styleClass = input<string>('');\n\n protected rootStyle = computed(() => {\n const s: Record<string, string | number> = {};\n if (this.shape() === 'circle') {\n s['width'] = this.size() || this.width();\n s['height'] = this.size() || this.height();\n s['borderRadius'] = '9999px';\n } else {\n s['width'] = this.width();\n s['height'] = this.height();\n s['borderRadius'] = this.borderRadius() || '0.25rem';\n }\n return { ...s, ...this.style() };\n });\n}\n"],"mappings":";;AAyEA,IAAa,oBAAb,MAAa,kBAAiB;CA7D9B,cAAA;EA+DE,KAAA,QAAQ,MAAqB,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEzC,KAAA,OAAO,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAExB,KAAA,QAAQ,MAAc,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAE7B,KAAA,SAAS,MAAc,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAE9B,KAAA,eAAe,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EAEhC,KAAA,YAAY,MAAyB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAE5C,KAAA,QAAQ,MAAuC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAElD,KAAA,aAAa,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CA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