shirkasoft-ui-components 1.3.15 → 1.4.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.
- package/README.md +447 -71
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +11 -11
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +914 -0
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +901 -753
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +5 -5
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +16 -9
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +646 -0
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-knob.mjs +44 -17
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +16 -16
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +42 -31
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +8 -8
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +79 -29
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +7 -7
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +50 -23
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +4 -4
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +163 -102
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +21 -23
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +9 -9
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +63 -30
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +280 -0
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs +180 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +10 -22
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +60 -53
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +29 -11
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +22 -11
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +9 -10
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/package.json +33 -3
- package/src/baseline.css +2472 -0
- package/src/theme.css +15 -543
- package/src/themes/ocean.css +56 -0
- package/src/themes/sunset.css +55 -0
- package/src/themes/violet.css +25 -0
- package/src/tokens.css +612 -0
- package/types/shirkasoft-ui-components-button.d.ts +1 -1
- package/types/shirkasoft-ui-components-config.d.ts +368 -0
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +2 -1
- package/types/shirkasoft-ui-components-date-picker.d.ts +276 -224
- package/types/shirkasoft-ui-components-fieldset.d.ts +2 -1
- package/types/shirkasoft-ui-components-file-upload.d.ts +11 -5
- package/types/shirkasoft-ui-components-icons.d.ts +1422 -0
- package/types/shirkasoft-ui-components-knob.d.ts +28 -7
- package/types/shirkasoft-ui-components-modal.d.ts +11 -7
- package/types/shirkasoft-ui-components-notification.d.ts +2 -1
- package/types/shirkasoft-ui-components-price-input.d.ts +37 -9
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +3 -3
- package/types/shirkasoft-ui-components-select.d.ts +24 -8
- package/types/shirkasoft-ui-components-sidebar.d.ts +2 -1
- package/types/shirkasoft-ui-components-table.d.ts +91 -80
- package/types/shirkasoft-ui-components-tag.d.ts +1 -1
- package/types/shirkasoft-ui-components-text-field.d.ts +29 -13
- package/types/shirkasoft-ui-components-theme-picker.d.ts +83 -0
- package/types/shirkasoft-ui-components-theme.d.ts +88 -0
- package/types/shirkasoft-ui-components-timeline.d.ts +5 -4
- package/types/shirkasoft-ui-components-toggle.d.ts +20 -13
- package/types/shirkasoft-ui-components-tooltip.d.ts +6 -0
- package/types/shirkasoft-ui-components-utils.d.ts +16 -6
- package/types/shirkasoft-ui-components-wizard.d.ts +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirkasoft-ui-components-timeline.mjs","sources":["../../../projects/ui-components/timeline/timeline.component.ts","../../../projects/ui-components/timeline/timeline.component.html","../../../projects/ui-components/timeline/shirkasoft-ui-components-timeline.ts"],"sourcesContent":["import { Component, input, output, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n LucideDynamicIcon,\n LucideCircleQuestionMark,\n LucideBus,\n LucideCar,\n LucideHotel,\n LucideMapPin,\n LucideMountain,\n LucidePackage,\n LucideShield,\n LucideShip,\n LucideTag,\n LucideTicket,\n LucideUserRound,\n LucideUtensils,\n} from '@lucide/angular';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\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/** A chip shown under a sub item (time, pricing model, quantity, etc). */\nexport interface TimelineMeta {\n icon: string | any;\n label?: string;\n value: string;\n}\n\n/** A row inside a timeline item (e.g. an activity of a tour day). */\nexport interface TimelineSubItem {\n id: string | number;\n title: string;\n subtitle?: string;\n /** Used to look up icon / color in `iconMap` and `iconColors`. */\n type?: string;\n /** Overrides the resolved icon (name or component). */\n icon?: string | any;\n /** Hex background for the icon box (fallback). */\n color?: string;\n /** Hex text color for the icon (fallback). */\n colorText?: string;\n /** Custom CSS classes for the icon box (takes precedence over inline colors). */\n iconClass?: string;\n optional?: boolean;\n optionalLabel?: string;\n meta?: TimelineMeta[];\n price?: string | number;\n}\n\n/** A single event in the timeline (e.g. a tour day). */\nexport interface TimelineItem {\n id: string | number;\n /** Text shown inside the marker (falls back to the auto index). */\n markerText?: string | number;\n title?: string;\n subtitle?: string;\n description?: string;\n /** Small pill shown above the title (e.g. \"Día 1\"). */\n badge?: string | number;\n badgeIcon?: string | any;\n /** CSS classes for the marker (falls back to the cycled gradient palette). */\n color?: string;\n subItems?: TimelineSubItem[];\n}\n\n/** A button rendered in the header. */\nexport interface TimelineAction {\n label: string;\n icon: string | any;\n onClick: () => void;\n class?: string;\n isVisible?: () => boolean;\n isDisabled?: () => boolean;\n}\n\n/** An action rendered in the item card footer. */\nexport interface TimelineItemAction {\n label: string | ((item: TimelineItem) => string);\n icon: string | any | ((item: TimelineItem) => string | any);\n onClick: (item: TimelineItem) => void;\n class?: string | ((item: TimelineItem) => string);\n isVisible?: (item: TimelineItem) => boolean;\n isDisabled?: (item: TimelineItem) => boolean;\n}\n\n/** An action rendered on hover over a sub item. */\nexport interface TimelineSubItemAction {\n label: string | ((item: TimelineItem, subItem: TimelineSubItem) => string);\n icon: string | any | ((item: TimelineItem, subItem: TimelineSubItem) => string | any);\n onClick: (item: TimelineItem, subItem: TimelineSubItem) => void;\n isVisible?: (item: TimelineItem, subItem: TimelineSubItem) => boolean;\n isDisabled?: (item: TimelineItem, subItem: TimelineSubItem) => boolean;\n}\n\nexport type TimelineAlignment = 'left' | 'alternate' | 'split';\nexport type TimelineMarkerSize = 'sm' | 'md' | 'lg';\n\nexport const DEFAULT_MARKER_GRADIENTS: string[] = [\n 'bg-gradient-to-br from-blue-500 to-blue-600',\n 'bg-gradient-to-br from-emerald-500 to-emerald-600',\n 'bg-gradient-to-br from-violet-500 to-violet-600',\n 'bg-gradient-to-br from-orange-500 to-orange-600',\n 'bg-gradient-to-br from-rose-500 to-rose-600',\n 'bg-gradient-to-br from-cyan-500 to-cyan-600',\n 'bg-gradient-to-br from-amber-500 to-amber-600',\n 'bg-gradient-to-br from-indigo-500 to-indigo-600',\n 'bg-gradient-to-br from-teal-500 to-teal-600',\n 'bg-gradient-to-br from-pink-500 to-pink-600',\n];\n\n/** Supplier-type style palette used by the original wac-app timeline. */\nexport const DEFAULT_SUPPLIER_ICON_COLORS: Record<\n string,\n { bg: string; text: string }\n> = {\n accommodation: { bg: '#3d5a80', text: '#ffffff' },\n air_tickets: { bg: '#98c1d9', text: '#293241' },\n rent_a_car: { bg: '#ee6c4d', text: '#ffffff' },\n excursion: { bg: '#e0fbfc', text: '#293241' },\n transfer: { bg: '#293241', text: '#ffffff' },\n cruise: { bg: '#3d5a80', text: '#ffffff' },\n insurance: { bg: '#98c1d9', text: '#293241' },\n restaurant: { bg: '#6b7280', text: '#ffffff' },\n visit: { bg: '#14b8a6', text: '#ffffff' },\n guide: { bg: '#06b6d4', text: '#ffffff' },\n package: { bg: '#84cc16', text: '#ffffff' },\n other: { bg: '#e0fbfc', text: '#293241' },\n};\n\n/** Maps a sub-item `type` to a lucide icon component. */\nexport const DEFAULT_SUPPLIER_TYPE_ICONS: Record<string, any> = {\n accommodation: LucideHotel,\n air_tickets: LucideTicket,\n rent_a_car: LucideCar,\n excursion: LucideMountain,\n transfer: LucideBus,\n cruise: LucideShip,\n insurance: LucideShield,\n restaurant: LucideUtensils,\n visit: LucideMapPin,\n guide: LucideUserRound,\n package: LucidePackage,\n other: LucideTag,\n};\n\n@Component({\n selector: 'shk-timeline',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, LucideDynamicIcon],\n templateUrl: './timeline.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n .timeline-icon-btn {\n padding: 0.375rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 0.5rem;\n color: var(--shk-primary-600);\n transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out,\n opacity 0.15s ease-in-out;\n }\n .timeline-icon-btn:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--shk-primary-50) 60%, transparent);\n color: var(--shk-primary-700);\n }\n .timeline-icon-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n .timeline-icon-btn svg {\n width: 0.875rem !important;\n height: 0.875rem !important;\n }\n .shk-timeline-card {\n animation: shk-timeline-fade-in 0.3s ease-out;\n }\n @keyframes shk-timeline-fade-in {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n `,\n ],\n})\nexport class TimelineComponent {\n protected getIcon = (name: any) => getIconFromCentral(name, LucideCircleQuestionMark);\n\n /** Timeline data. */\n items = input<TimelineItem[]>([]);\n\n // ---------- Layout ----------\n /** 'left' = line and markers on the left; 'alternate' = cards alternate around a centered line on lg+; 'split' = markers centered with days on the left and activities on the right. */\n alignment = input<TimelineAlignment>('alternate');\n /** Shows/hides the vertical connector line. */\n showLine = input<boolean>(true);\n /** Marker diameter. */\n markerSize = input<TimelineMarkerSize>('md');\n /** Gradient classes cycled across markers when the item has no `color`. */\n markerGradients = input<string[]>(DEFAULT_MARKER_GRADIENTS);\n /** Shows the info column on the opposite side of the card (alternate mode, lg+). */\n showOpposite = input<boolean>(true);\n /** Shows the item description. */\n showDescription = input<boolean>(true);\n /** Shows meta chips inside sub items. */\n showSubItemMeta = input<boolean>(true);\n /** Shows the price of each sub item. */\n showSubItemPrice = input<boolean>(true);\n /** Auto-append \"N {subItemCountLabel}\" under the title when the item has no subtitle. */\n showSubItemCount = input<boolean>(false);\n subItemCountLabel = input<string>('elementos');\n\n // ---------- Header ----------\n showHeader = input<boolean>(true);\n headerTitle = input<string>('');\n /** Convenience \"add\" button in the header. */\n showAddItem = input<boolean>(false);\n addItemLabel = input<string>('Añadir');\n addItemIcon = input<string>('plus');\n addItemTooltip = input<string>('Añadir elemento');\n headerActions = input<TimelineAction[]>([]);\n\n // ---------- Actions ----------\n /** Renders \"+ Añadir sub-elemento\" in each card footer. */\n showAddSubItem = input<boolean>(false);\n addSubItemLabel = input<string>('Añadir');\n addSubItemTooltip = input<string>('Añadir sub-elemento');\n itemActions = input<TimelineItemAction[]>([]);\n subItemActions = input<TimelineSubItemAction[]>([]);\n\n // ---------- Sub-item icon mapping ----------\n /** Maps a sub-item `type` to a lucide icon (name or component). */\n iconMap = input<{ [type: string]: string | any }>({});\n /** Maps a sub-item `type` to its icon-box colors. */\n iconColors = input<{ [type: string]: { bg: string; text: string } }>({});\n /** Icon used when nothing matches. */\n fallbackIcon = input<string | any>('circle-help');\n\n // ---------- Empty state ----------\n showEmptyState = input<boolean>(true);\n emptyMessage = input<string>('Sin elementos');\n emptyIcon = input<string | any>('calendar-days');\n\n // ---------- Labels ----------\n editTooltip = input<string>('Editar');\n deleteTooltip = input<string>('Eliminar');\n optionalLabel = input<string>('Opcional');\n noSubItemsMessage = input<string>('');\n\n /** Custom content templates: keys 'marker', 'opposite', 'content', 'description', 'subItem', 'empty'. */\n customTemplates = input<{ [key: string]: any }>({});\n\n // ---------- Outputs ----------\n addItem = output<void>();\n addSubItem = output<TimelineItem>();\n itemClick = output<TimelineItem>();\n subItemClick = output<{ item: TimelineItem; subItem: TimelineSubItem }>();\n\n // ---------- Helpers ----------\n markerText(item: TimelineItem, index: number): string | number {\n return item.markerText ?? index + 1;\n }\n\n markerClass(item: TimelineItem, index: number): string {\n const base = 'flex items-center justify-center rounded-full text-white shadow-md';\n const size =\n this.markerSize() === 'sm'\n ? 'w-8 h-8 text-xs'\n : this.markerSize() === 'lg'\n ? 'w-12 h-12 text-base'\n : 'w-10 h-10 text-sm';\n const color = item.color || this.markerGradients()[index % this.markerGradients().length];\n return `${base} ${size} ${color}`;\n }\n\n markerColumnClass(): string {\n const size =\n this.markerSize() === 'sm' ? 'w-8' : this.markerSize() === 'lg' ? 'w-12' : 'w-10';\n return `relative z-10 flex justify-center shrink-0 ${size}`;\n }\n\n alternateMarkerColumnClass(): string {\n return `${this.markerColumnClass()} lg:absolute lg:left-1/2 lg:-translate-x-1/2 lg:top-0`;\n }\n\n lineClass(): string {\n const pos =\n this.markerSize() === 'sm' ? 'left-4' : this.markerSize() === 'lg' ? 'left-6' : 'left-5';\n const base = `absolute top-4 bottom-4 w-px _shk-bg-surface-200 dark:[background-color:var(--shk-surface-200)] ${pos}`;\n if (this.alignment() === 'alternate' || this.alignment() === 'split') {\n return `${base} lg:left-1/2 lg:-translate-x-1/2`;\n }\n return base;\n }\n\n subItemIconName(sub: TimelineSubItem): string {\n const type = sub.type || '';\n return sub.icon || this.iconMap()[type] || this.fallbackIcon();\n }\n\n subItemStyle(sub: TimelineSubItem): { [key: string]: string } | undefined {\n const palette = this.iconColors()[sub.type || ''];\n if (palette) return { 'background-color': palette.bg, color: palette.text };\n return {\n 'background-color': sub.color || '#6b7280',\n color: sub.colorText || '#ffffff',\n };\n }\n\n // ---------- Header actions ----------\n isHeaderActionVisible(action: TimelineAction): boolean {\n return action.isVisible ? action.isVisible() : true;\n }\n\n isHeaderActionDisabled(action: TimelineAction): boolean {\n return action.isDisabled ? action.isDisabled() : false;\n }\n\n // ---------- Item actions ----------\n getItemActionLabel(action: TimelineItemAction, item: TimelineItem): string {\n return typeof action.label === 'function' ? action.label(item) : action.label;\n }\n\n getItemActionIconName(action: TimelineItemAction, item: TimelineItem): any {\n const icon = action.icon;\n if (typeof icon === 'function') {\n if (icon.prototype === undefined) {\n return icon(item);\n }\n return icon;\n }\n return icon;\n }\n\n getItemActionClass(action: TimelineItemAction, item: TimelineItem): string {\n if (!action.class) return '';\n return typeof action.class === 'function' ? action.class(item) : action.class;\n }\n\n isItemActionVisible(action: TimelineItemAction, item: TimelineItem): boolean {\n return action.isVisible ? action.isVisible(item) : true;\n }\n\n isItemActionDisabled(action: TimelineItemAction, item: TimelineItem): boolean {\n return action.isDisabled ? action.isDisabled(item) : false;\n }\n\n // ---------- Sub-item actions ----------\n getSubItemActionLabel(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): string {\n return typeof action.label === 'function' ? action.label(item, sub) : action.label;\n }\n\n getSubItemActionIconName(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): any {\n const icon = action.icon;\n if (typeof icon === 'function') {\n if (icon.prototype === undefined) {\n return icon(item, sub);\n }\n return icon;\n }\n return icon;\n }\n\n isSubItemActionVisible(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): boolean {\n return action.isVisible ? action.isVisible(item, sub) : true;\n }\n\n isSubItemActionDisabled(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): boolean {\n return action.isDisabled ? action.isDisabled(item, sub) : false;\n }\n}\n","<div class=\"space-y-4\">\n\n <!-- ============ Header ============ -->\n @if (showHeader() && (headerTitle() || showAddItem() || headerActions().length > 0)) {\n <div class=\"flex flex-wrap items-center justify-between gap-2\">\n @if (headerTitle()) {\n <div class=\"text-sm font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">\n {{ headerTitle() }}\n </div>\n }\n <div class=\"flex items-center gap-1.5 ml-auto\">\n @if (showAddItem()) {\n <button\n type=\"button\"\n (click)=\"addItem.emit()\"\n [attr.aria-label]=\"addItemTooltip()\"\n class=\"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md _shk-bg-primary text-white hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n <svg [lucideIcon]=\"getIcon(addItemIcon())\" class=\"w-3.5 h-3.5\"></svg>\n {{ addItemLabel() }}\n </button>\n }\n @for (action of headerActions(); track $index) {\n @if (isHeaderActionVisible(action)) {\n <button\n type=\"button\"\n [class]=\"action.class || 'inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md _shk-bg-primary text-white hover:[background-color:var(--shk-primary-700)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed'\"\n [disabled]=\"isHeaderActionDisabled(action)\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <svg [lucideIcon]=\"getIcon(action.icon)\" class=\"w-3.5 h-3.5\"></svg>\n }\n {{ action.label }}\n </button>\n }\n }\n </div>\n </div>\n }\n\n <!-- ============ Timeline ============ -->\n @if (items().length > 0) {\n <div class=\"relative\">\n @if (showLine()) {\n <div [class]=\"lineClass()\" aria-hidden=\"true\"></div>\n }\n\n @for (item of items(); track item.id; let i = $index) {\n @if (alignment() === 'alternate') {\n <div class=\"relative flex items-start gap-4 lg:grid lg:grid-cols-2 lg:gap-0\">\n <!-- Marker (centered on desktop) -->\n <div [class]=\"alternateMarkerColumnClass()\">\n <span [class]=\"markerClass(item, i)\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['marker'] || defaultMarker; context: { $implicit: item, index: i }\"\n ></ng-container>\n </span>\n </div>\n\n <!-- Content card -->\n <div\n class=\"flex-1 min-w-0\"\n [class.lg:order-1]=\"$even\"\n [class.lg:order-2]=\"!$even\"\n [class.lg:pr-12]=\"$even\"\n [class.lg:pl-12]=\"!$even\"\n >\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['content'] || card; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n\n <!-- Opposite info -->\n @if (showOpposite()) {\n <div\n class=\"hidden lg:flex lg:items-center\"\n [class.lg:order-2]=\"$even\"\n [class.lg:order-1]=\"!$even\"\n [class.lg:pl-12]=\"$even\"\n [class.lg:justify-end]=\"!$even\"\n [class.lg:pr-12]=\"!$even\"\n >\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['opposite'] || itemInfo; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n }\n </div>\n } @else if (alignment() === 'split') {\n <!-- Split: markers centered, days on the left, activities on the right -->\n <div class=\"relative flex items-start gap-4 lg:grid lg:grid-cols-2 lg:gap-0\">\n <!-- Marker (centered on desktop) -->\n <div [class]=\"alternateMarkerColumnClass()\">\n <span [class]=\"markerClass(item, i)\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['marker'] || defaultMarker; context: { $implicit: item, index: i }\"\n ></ng-container>\n </span>\n </div>\n\n <!-- Day info (always left) -->\n @if (showOpposite()) {\n <div class=\"hidden lg:flex lg:items-center lg:justify-end lg:pr-12 lg:order-1 lg:text-right\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['opposite'] || itemInfo; context: { $implicit: item, index: i, showDescription: true }\"\n ></ng-container>\n </div>\n }\n\n <!-- Content card (always right) -->\n <div class=\"flex-1 min-w-0 lg:order-2 lg:pl-12\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['content'] || card; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n </div>\n } @else {\n <!-- Left alignment -->\n <div class=\"relative flex items-start gap-4\">\n <div [class]=\"markerColumnClass()\">\n <span [class]=\"markerClass(item, i)\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['marker'] || defaultMarker; context: { $implicit: item, index: i }\"\n ></ng-container>\n </span>\n </div>\n <div class=\"flex-1 min-w-0\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['content'] || card; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n </div>\n }\n }\n </div>\n } @else if (showEmptyState()) {\n <!-- ============ Empty state ============ -->\n <div class=\"text-center py-12\">\n @if (customTemplates()['empty']) {\n <ng-container *ngTemplateOutlet=\"customTemplates()['empty']\"></ng-container>\n } @else {\n <div class=\"w-16 h-16 mx-auto mb-4 _shk-bg-surface-100 dark:[background-color:var(--shk-surface-100)] rounded-full flex items-center justify-center\">\n <svg [lucideIcon]=\"getIcon(emptyIcon())\" class=\"w-8 h-8 _shk-text-surface-400 dark:[color:var(--shk-surface-500)]\"></svg>\n </div>\n <p class=\"text-sm _shk-text-surface-400 dark:[color:var(--shk-surface-500)]\">{{ emptyMessage() }}</p>\n }\n </div>\n }\n\n <!-- ============ Templates ============ -->\n\n <ng-template #defaultMarker let-item let-index=\"index\">\n <span class=\"font-bold\">{{ markerText(item, index) }}</span>\n </ng-template>\n\n <ng-template #itemInfo let-item let-showDescription=\"showDescription\">\n <div>\n @if (item.badge !== undefined && item.badge !== null && item.badge !== '') {\n <div class=\"mb-2\">\n <span class=\"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-semibold _shk-bg-surface-100 dark:[background-color:var(--shk-surface-200)] _shk-text-surface-600 dark:[color:var(--shk-surface-600)]\">\n @if (item.badgeIcon) {\n <svg [lucideIcon]=\"getIcon(item.badgeIcon)\" class=\"w-3 h-3\"></svg>\n }\n {{ item.badge }}\n </span>\n </div>\n }\n @if (item.title) {\n <div class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">{{ item.title }}</div>\n }\n @let subCount = (item.subItems?.length || 0);\n @if (item.subtitle || (showSubItemCount() && subCount > 0)) {\n <div class=\"text-xs _shk-text-surface-400 dark:[color:var(--shk-surface-500)] mt-1\">\n {{ item.subtitle || (subCount + ' ' + subItemCountLabel()) }}\n </div>\n }\n @if (showDescription && item.description) {\n <div class=\"text-xs _shk-text-surface-400 dark:[color:var(--shk-surface-500)] mt-1 leading-relaxed\">{{ item.description }}</div>\n }\n </div>\n </ng-template>\n\n <ng-template #card let-item>\n @let subItems = item.subItems || [];\n <div class=\"shk-timeline-card mb-4 bg-white dark:[background-color:var(--shk-surface-50)] rounded-xl border _shk-border dark:[border-color:var(--shk-surface-200)] shadow-sm\">\n <!-- Header (mobile in alternate/split, always in left) -->\n <div class=\"flex items-center gap-2 px-4 pt-4 pb-2\" [class.lg:hidden]=\"alignment() === 'alternate' || alignment() === 'split'\">\n <ng-container *ngTemplateOutlet=\"itemInfo; context: { $implicit: item }\"></ng-container>\n </div>\n\n <!-- Description -->\n @if (showDescription() && item.description) {\n <div class=\"px-4 pt-3\">\n @if (customTemplates()['description']) {\n <ng-container *ngTemplateOutlet=\"customTemplates()['description']; context: { $implicit: item }\"></ng-container>\n } @else {\n <p class=\"text-sm _shk-text-surface-600 dark:[color:var(--shk-surface-600)] leading-relaxed\">{{ item.description }}</p>\n }\n </div>\n }\n\n <!-- Sub items -->\n @if (subItems.length > 0) {\n <div class=\"mt-2\">\n @for (sub of subItems; track sub.id) {\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['subItem'] || defaultSubItem; context: { $implicit: item, subItem: sub, last: $last, hasFooter: showAddSubItem() || itemActions().length > 0 }\"\n ></ng-container>\n }\n </div>\n } @else if (noSubItemsMessage()) {\n <div class=\"px-4 py-6 text-center\">\n <div class=\"inline-flex items-center gap-2 text-sm _shk-text-surface-400 dark:[color:var(--shk-surface-500)]\">\n <svg [lucideIcon]=\"getIcon('info')\" class=\"w-4 h-4\"></svg>\n <span class=\"italic\">{{ noSubItemsMessage() }}</span>\n </div>\n </div>\n }\n\n <!-- Footer actions -->\n @if (showAddSubItem() || itemActions().length > 0) {\n <div class=\"flex items-center gap-1 px-4 py-2 rounded-b-xl _shk-bg-surface-50 dark:[background-color:var(--shk-surface-100)] border-t _shk-border dark:[border-color:var(--shk-surface-100)]\">\n @if (showAddSubItem()) {\n <button\n type=\"button\"\n (click)=\"addSubItem.emit(item)\"\n class=\"relative group inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium _shk-text-primary hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] rounded-lg transition-colors\"\n >\n <svg [lucideIcon]=\"getIcon('circle-plus')\" class=\"w-3.5 h-3.5\"></svg>\n {{ addSubItemLabel() }}\n <span class=\"absolute bottom-full left-1/2 -translate-x-1/2 mb-1 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 {{ addSubItemTooltip() }}\n </span>\n </button>\n }\n <div class=\"flex-1\"></div>\n @for (action of itemActions(); track $index) {\n @if (isItemActionVisible(action, item)) {\n <div class=\"relative group\">\n <button\n type=\"button\"\n (click)=\"action.onClick(item)\"\n [class]=\"'timeline-icon-btn ' + getItemActionClass(action, item)\"\n [disabled]=\"isItemActionDisabled(action, item)\"\n [attr.aria-label]=\"getItemActionLabel(action, item)\"\n >\n <svg [lucideIcon]=\"getIcon(getItemActionIconName(action, item))\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n <span class=\"absolute bottom-full left-1/2 -translate-x-1/2 mb-1 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 {{ getItemActionLabel(action, item) }}\n </span>\n </div>\n }\n }\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #defaultSubItem let-item let-sub=\"subItem\" let-last=\"last\" let-hasFooter=\"hasFooter\">\n <div class=\"px-4 py-3 border-t [border-color:var(--shk-surface-100)] dark:[border-color:var(--shk-surface-700)] hover:[background-color:color-mix(in srgb,var(--shk-primary-50)30%,transparent)] dark:hover:[background-color:color-mix(in srgb,var(--shk-primary-900)10%,transparent)] transition-colors duration-200 group\" [class.rounded-b-xl]=\"last && !hasFooter\">\n <div class=\"flex items-start gap-3\">\n <span\n [class]=\"sub.iconClass || 'flex items-center justify-center w-9 h-9 rounded-lg shrink-0 mt-0.5'\"\n [style]=\"sub.iconClass ? undefined : subItemStyle(sub)\"\n >\n <svg [lucideIcon]=\"getIcon(subItemIconName(sub))\" class=\"w-4 h-4\"></svg>\n </span>\n\n <div class=\"flex-1 min-w-0\">\n <div class=\"flex items-center gap-2 flex-wrap\">\n @if (sub.optional) {\n <span class=\"text-[10px] font-semibold uppercase tracking-wide px-1.5 py-0.5 rounded _shk-bg-amber-soft _shk-text-amber-600 dark:[color:var(--shk-amber-400)]\">\n {{ sub.optionalLabel || optionalLabel() }}\n </span>\n }\n <span class=\"font-medium _shk-text-surface-800 dark:[color:var(--shk-surface-800)] text-sm truncate\">{{ sub.title }}</span>\n @if (sub.subtitle) {\n <span class=\"text-xs _shk-text-surface-400 dark:[color:var(--shk-surface-500)] truncate\">· {{ sub.subtitle }}</span>\n }\n </div>\n\n @if (showSubItemMeta() && (sub.meta?.length || 0) > 0) {\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 mt-1.5 text-xs _shk-text-surface-500 dark:[color:var(--shk-surface-500)]\">\n @for (m of sub.meta!; track $index) {\n <span class=\"flex items-center gap-1\">\n <svg [lucideIcon]=\"getIcon(m.icon)\" class=\"w-3 h-3\"></svg>\n @if (m.label) {\n <span class=\"font-medium\">{{ m.label }}:</span>\n }\n {{ m.value }}\n </span>\n }\n </div>\n }\n </div>\n\n <div class=\"flex items-center gap-0.5 shrink-0\">\n @if (showSubItemPrice() && sub.price !== undefined && sub.price !== null && sub.price !== '') {\n <span class=\"font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)] text-xs mr-1\">{{ sub.price }}</span>\n }\n @for (action of subItemActions(); track $index) {\n @if (isSubItemActionVisible(action, item, sub)) {\n <div class=\"relative group/action\">\n <button\n type=\"button\"\n (click)=\"action.onClick(item, sub)\"\n class=\"timeline-icon-btn opacity-100 lg:opacity-0 lg:group-hover:opacity-100 transition-opacity\"\n [disabled]=\"isSubItemActionDisabled(action, item, sub)\"\n [attr.aria-label]=\"getSubItemActionLabel(action, item, sub)\"\n >\n <svg [lucideIcon]=\"getIcon(getSubItemActionIconName(action, item, sub))\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n <span class=\"absolute top-full left-1/2 -translate-x-1/2 mt-1 px-2 py-1 text-xs _shk-bg-tooltip _shk-text-tooltip rounded whitespace-nowrap opacity-0 group-hover/action:opacity-100 transition pointer-events-none z-[9999] shadow-lg\">\n {{ getSubItemActionLabel(action, item, sub) }}\n </span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n </ng-template>\n\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AAsGO,MAAM,wBAAwB,GAAa;IAChD,6CAA6C;IAC7C,mDAAmD;IACnD,iDAAiD;IACjD,iDAAiD;IACjD,6CAA6C;IAC7C,6CAA6C;IAC7C,+CAA+C;IAC/C,iDAAiD;IACjD,6CAA6C;IAC7C,6CAA6C;;AAG/C;AACO,MAAM,4BAA4B,GAGrC;IACF,aAAa,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IACjD,WAAW,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/C,UAAU,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9C,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC7C,QAAQ,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5C,MAAM,EAAE,EAAE,EAAE,EAAE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","../../../projects/ui-components/timeline/timeline.component.html","../../../projects/ui-components/timeline/shirkasoft-ui-components-timeline.ts"],"sourcesContent":["import { Component, input, output, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n ShkIconDirective,\n LucideCircleQuestionMark,\n LucideBus,\n LucideCar,\n LucideHotel,\n LucideMapPin,\n LucideMountain,\n LucidePackage,\n LucideShield,\n LucideShip,\n LucideTag,\n LucideTicket,\n LucideUserRound,\n LucideUtensils,\n} from 'shirkasoft-ui-components/icons';\nimport { getIcon as getIconFromCentral, isIconResolver } from 'shirkasoft-ui-components/utils';\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/** A chip shown under a sub item (time, pricing model, quantity, etc). */\nexport interface TimelineMeta {\n icon: string | any;\n label?: string;\n value: string;\n}\n\n/** A row inside a timeline item (e.g. an activity of a tour day). */\nexport interface TimelineSubItem {\n id: string | number;\n title: string;\n subtitle?: string;\n /** Used to look up icon / color in `iconMap` and `iconColors`. */\n type?: string;\n /** Overrides the resolved icon (registered name or `IconNode` data). */\n icon?: string | any;\n /** Hex background for the icon box (fallback). */\n color?: string;\n /** Hex text color for the icon (fallback). */\n colorText?: string;\n /** Custom CSS classes for the icon box (takes precedence over inline colors). */\n iconClass?: string;\n optional?: boolean;\n optionalLabel?: string;\n meta?: TimelineMeta[];\n price?: string | number;\n}\n\n/** A single event in the timeline (e.g. a tour day). */\nexport interface TimelineItem {\n id: string | number;\n /** Text shown inside the marker (falls back to the auto index). */\n markerText?: string | number;\n title?: string;\n subtitle?: string;\n description?: string;\n /** Small pill shown above the title (e.g. \"Día 1\"). */\n badge?: string | number;\n badgeIcon?: string | any;\n /** CSS classes for the marker (falls back to the cycled gradient palette). */\n color?: string;\n subItems?: TimelineSubItem[];\n}\n\n/** A button rendered in the header. */\nexport interface TimelineAction {\n label: string;\n icon: string | any;\n onClick: () => void;\n class?: string;\n isVisible?: () => boolean;\n isDisabled?: () => boolean;\n}\n\n/** An action rendered in the item card footer. */\nexport interface TimelineItemAction {\n label: string | ((item: TimelineItem) => string);\n icon: string | any | ((item: TimelineItem) => string | any);\n onClick: (item: TimelineItem) => void;\n class?: string | ((item: TimelineItem) => string);\n isVisible?: (item: TimelineItem) => boolean;\n isDisabled?: (item: TimelineItem) => boolean;\n}\n\n/** An action rendered on hover over a sub item. */\nexport interface TimelineSubItemAction {\n label: string | ((item: TimelineItem, subItem: TimelineSubItem) => string);\n icon: string | any | ((item: TimelineItem, subItem: TimelineSubItem) => string | any);\n onClick: (item: TimelineItem, subItem: TimelineSubItem) => void;\n isVisible?: (item: TimelineItem, subItem: TimelineSubItem) => boolean;\n isDisabled?: (item: TimelineItem, subItem: TimelineSubItem) => boolean;\n}\n\nexport type TimelineAlignment = 'left' | 'alternate' | 'split';\nexport type TimelineMarkerSize = 'sm' | 'md' | 'lg';\n\nexport const DEFAULT_MARKER_GRADIENTS: string[] = [\n 'bg-gradient-to-br from-blue-500 to-blue-600',\n 'bg-gradient-to-br from-emerald-500 to-emerald-600',\n 'bg-gradient-to-br from-violet-500 to-violet-600',\n 'bg-gradient-to-br from-orange-500 to-orange-600',\n 'bg-gradient-to-br from-rose-500 to-rose-600',\n 'bg-gradient-to-br from-cyan-500 to-cyan-600',\n 'bg-gradient-to-br from-amber-500 to-amber-600',\n 'bg-gradient-to-br from-indigo-500 to-indigo-600',\n 'bg-gradient-to-br from-teal-500 to-teal-600',\n 'bg-gradient-to-br from-pink-500 to-pink-600',\n];\n\n/** Supplier-type style palette used by the original wac-app timeline. */\nexport const DEFAULT_SUPPLIER_ICON_COLORS: Record<\n string,\n { bg: string; text: string }\n> = {\n accommodation: { bg: '#3d5a80', text: '#ffffff' },\n air_tickets: { bg: '#98c1d9', text: '#293241' },\n rent_a_car: { bg: '#ee6c4d', text: '#ffffff' },\n excursion: { bg: '#e0fbfc', text: '#293241' },\n transfer: { bg: '#293241', text: '#ffffff' },\n cruise: { bg: '#3d5a80', text: '#ffffff' },\n insurance: { bg: '#98c1d9', text: '#293241' },\n restaurant: { bg: '#6b7280', text: '#ffffff' },\n visit: { bg: '#14b8a6', text: '#ffffff' },\n guide: { bg: '#06b6d4', text: '#ffffff' },\n package: { bg: '#84cc16', text: '#ffffff' },\n other: { bg: '#e0fbfc', text: '#293241' },\n};\n\n/** Maps a sub-item `type` to its icon data (`IconNode`). */\nexport const DEFAULT_SUPPLIER_TYPE_ICONS: Record<string, any> = {\n accommodation: LucideHotel,\n air_tickets: LucideTicket,\n rent_a_car: LucideCar,\n excursion: LucideMountain,\n transfer: LucideBus,\n cruise: LucideShip,\n insurance: LucideShield,\n restaurant: LucideUtensils,\n visit: LucideMapPin,\n guide: LucideUserRound,\n package: LucidePackage,\n other: LucideTag,\n};\n\n@Component({\n selector: 'shk-timeline',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, ShkIconDirective],\n templateUrl: './timeline.component.html',\n styles: [\n `\n :host {\n display: block;\n }\n .timeline-icon-btn {\n padding: 0.375rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 0.5rem;\n color: var(--shk-primary-600);\n transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out,\n opacity 0.15s ease-in-out;\n }\n .timeline-icon-btn:hover:not(:disabled) {\n background-color: color-mix(in srgb, var(--shk-primary-50) 60%, transparent);\n color: var(--shk-primary-700);\n }\n .timeline-icon-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n }\n .timeline-icon-btn svg {\n width: 0.875rem !important;\n height: 0.875rem !important;\n }\n .shk-timeline-card {\n animation: shk-timeline-fade-in 0.3s ease-out;\n }\n @keyframes shk-timeline-fade-in {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n `,\n ],\n})\nexport class TimelineComponent {\n protected getIcon = (name: any) => getIconFromCentral(name, LucideCircleQuestionMark);\n\n /** Timeline data. */\n items = input<TimelineItem[]>([]);\n\n // ---------- Layout ----------\n /** 'left' = line and markers on the left; 'alternate' = cards alternate around a centered line on lg+; 'split' = markers centered with days on the left and activities on the right. */\n alignment = input<TimelineAlignment>('alternate');\n /** Shows/hides the vertical connector line. */\n showLine = input<boolean>(true);\n /** Marker diameter. */\n markerSize = input<TimelineMarkerSize>('md');\n /** Gradient classes cycled across markers when the item has no `color`. */\n markerGradients = input<string[]>(DEFAULT_MARKER_GRADIENTS);\n /** Shows the info column on the opposite side of the card (alternate mode, lg+). */\n showOpposite = input<boolean>(true);\n /** Shows the item description. */\n showDescription = input<boolean>(true);\n /** Shows meta chips inside sub items. */\n showSubItemMeta = input<boolean>(true);\n /** Shows the price of each sub item. */\n showSubItemPrice = input<boolean>(true);\n /** Auto-append \"N {subItemCountLabel}\" under the title when the item has no subtitle. */\n showSubItemCount = input<boolean>(false);\n subItemCountLabel = input<string>('elementos');\n\n // ---------- Header ----------\n showHeader = input<boolean>(true);\n headerTitle = input<string>('');\n /** Convenience \"add\" button in the header. */\n showAddItem = input<boolean>(false);\n addItemLabel = input<string>('Añadir');\n addItemIcon = input<string>('plus');\n addItemTooltip = input<string>('Añadir elemento');\n headerActions = input<TimelineAction[]>([]);\n\n // ---------- Actions ----------\n /** Renders \"+ Añadir sub-elemento\" in each card footer. */\n showAddSubItem = input<boolean>(false);\n addSubItemLabel = input<string>('Añadir');\n addSubItemTooltip = input<string>('Añadir sub-elemento');\n itemActions = input<TimelineItemAction[]>([]);\n subItemActions = input<TimelineSubItemAction[]>([]);\n\n // ---------- Sub-item icon mapping ----------\n /** Maps a sub-item `type` to an icon (registered name or `IconNode` data). */\n iconMap = input<{ [type: string]: string | any }>({});\n /** Maps a sub-item `type` to its icon-box colors. */\n iconColors = input<{ [type: string]: { bg: string; text: string } }>({});\n /** Icon used when nothing matches. */\n fallbackIcon = input<string | any>('circle-help');\n\n // ---------- Empty state ----------\n showEmptyState = input<boolean>(true);\n emptyMessage = input<string>('Sin elementos');\n emptyIcon = input<string | any>('calendar-days');\n\n // ---------- Labels ----------\n editTooltip = input<string>('Editar');\n deleteTooltip = input<string>('Eliminar');\n optionalLabel = input<string>('Opcional');\n noSubItemsMessage = input<string>('');\n\n /** Custom content templates: keys 'marker', 'opposite', 'content', 'description', 'subItem', 'empty'. */\n customTemplates = input<{ [key: string]: any }>({});\n\n // ---------- Outputs ----------\n addItem = output<void>();\n addSubItem = output<TimelineItem>();\n itemClick = output<TimelineItem>();\n subItemClick = output<{ item: TimelineItem; subItem: TimelineSubItem }>();\n\n // ---------- Helpers ----------\n markerText(item: TimelineItem, index: number): string | number {\n return item.markerText ?? index + 1;\n }\n\n markerClass(item: TimelineItem, index: number): string {\n const base = 'flex items-center justify-center rounded-full text-white shadow-md';\n const size =\n this.markerSize() === 'sm'\n ? 'w-8 h-8 text-xs'\n : this.markerSize() === 'lg'\n ? 'w-12 h-12 text-base'\n : 'w-10 h-10 text-sm';\n const color = item.color || this.markerGradients()[index % this.markerGradients().length];\n return `${base} ${size} ${color}`;\n }\n\n markerColumnClass(): string {\n const size =\n this.markerSize() === 'sm' ? 'w-8' : this.markerSize() === 'lg' ? 'w-12' : 'w-10';\n return `relative z-10 flex justify-center shrink-0 ${size}`;\n }\n\n alternateMarkerColumnClass(): string {\n return `${this.markerColumnClass()} lg:absolute lg:left-1/2 lg:-translate-x-1/2 lg:top-0`;\n }\n\n lineClass(): string {\n const pos =\n this.markerSize() === 'sm' ? 'left-4' : this.markerSize() === 'lg' ? 'left-6' : 'left-5';\n const base = `absolute top-4 bottom-4 w-px _shk-bg-surface-200 dark:[background-color:var(--shk-surface-200)] ${pos}`;\n if (this.alignment() === 'alternate' || this.alignment() === 'split') {\n return `${base} lg:left-1/2 lg:-translate-x-1/2`;\n }\n return base;\n }\n\n subItemIconName(sub: TimelineSubItem): string {\n const type = sub.type || '';\n return sub.icon || this.iconMap()[type] || this.fallbackIcon();\n }\n\n subItemStyle(sub: TimelineSubItem): { [key: string]: string } | undefined {\n const palette = this.iconColors()[sub.type || ''];\n if (palette) return { 'background-color': palette.bg, color: palette.text };\n return {\n 'background-color': sub.color || '#6b7280',\n color: sub.colorText || '#ffffff',\n };\n }\n\n // ---------- Header actions ----------\n isHeaderActionVisible(action: TimelineAction): boolean {\n return action.isVisible ? action.isVisible() : true;\n }\n\n isHeaderActionDisabled(action: TimelineAction): boolean {\n return action.isDisabled ? action.isDisabled() : false;\n }\n\n // ---------- Item actions ----------\n getItemActionLabel(action: TimelineItemAction, item: TimelineItem): string {\n return typeof action.label === 'function' ? action.label(item) : action.label;\n }\n\n getItemActionIconName(action: TimelineItemAction, item: TimelineItem): any {\n const icon = action.icon;\n return isIconResolver(icon) ? icon(item) : icon;\n }\n\n getItemActionClass(action: TimelineItemAction, item: TimelineItem): string {\n if (!action.class) return '';\n return typeof action.class === 'function' ? action.class(item) : action.class;\n }\n\n isItemActionVisible(action: TimelineItemAction, item: TimelineItem): boolean {\n return action.isVisible ? action.isVisible(item) : true;\n }\n\n isItemActionDisabled(action: TimelineItemAction, item: TimelineItem): boolean {\n return action.isDisabled ? action.isDisabled(item) : false;\n }\n\n // ---------- Sub-item actions ----------\n getSubItemActionLabel(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): string {\n return typeof action.label === 'function' ? action.label(item, sub) : action.label;\n }\n\n getSubItemActionIconName(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): any {\n const icon = action.icon;\n return isIconResolver(icon) ? icon(item, sub) : icon;\n }\n\n isSubItemActionVisible(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): boolean {\n return action.isVisible ? action.isVisible(item, sub) : true;\n }\n\n isSubItemActionDisabled(action: TimelineSubItemAction, item: TimelineItem, sub: TimelineSubItem): boolean {\n return action.isDisabled ? action.isDisabled(item, sub) : false;\n }\n}\n","<div class=\"space-y-4\">\n\n <!-- ============ Header ============ -->\n @if (showHeader() && (headerTitle() || showAddItem() || headerActions().length > 0)) {\n <div class=\"flex flex-wrap items-center justify-between gap-2\">\n @if (headerTitle()) {\n <div class=\"text-sm font-semibold _shk-text-surface-700\">\n {{ headerTitle() }}\n </div>\n }\n <div class=\"flex items-center gap-1.5 ml-auto\">\n @if (showAddItem()) {\n <button\n type=\"button\"\n (click)=\"addItem.emit()\"\n [attr.aria-label]=\"addItemTooltip()\"\n class=\"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md _shk-bg-primary text-white hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n <svg [shkIcon]=\"getIcon(addItemIcon())\" class=\"w-3.5 h-3.5\"></svg>\n {{ addItemLabel() }}\n </button>\n }\n @for (action of headerActions(); track $index) {\n @if (isHeaderActionVisible(action)) {\n <button\n type=\"button\"\n [class]=\"action.class || 'inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md _shk-bg-primary text-white hover:[background-color:var(--shk-primary-700)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed'\"\n [disabled]=\"isHeaderActionDisabled(action)\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <svg [shkIcon]=\"getIcon(action.icon)\" class=\"w-3.5 h-3.5\"></svg>\n }\n {{ action.label }}\n </button>\n }\n }\n </div>\n </div>\n }\n\n <!-- ============ Timeline ============ -->\n @if (items().length > 0) {\n <div class=\"relative\">\n @if (showLine()) {\n <div [class]=\"lineClass()\" aria-hidden=\"true\"></div>\n }\n\n @for (item of items(); track item.id; let i = $index) {\n @if (alignment() === 'alternate') {\n <div class=\"relative flex items-start gap-4 lg:grid lg:grid-cols-2 lg:gap-0\">\n <!-- Marker (centered on desktop) -->\n <div [class]=\"alternateMarkerColumnClass()\">\n <span [class]=\"markerClass(item, i)\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['marker'] || defaultMarker; context: { $implicit: item, index: i }\"\n ></ng-container>\n </span>\n </div>\n\n <!-- Content card -->\n <div\n class=\"flex-1 min-w-0\"\n [class.lg:order-1]=\"$even\"\n [class.lg:order-2]=\"!$even\"\n [class.lg:pr-12]=\"$even\"\n [class.lg:pl-12]=\"!$even\"\n >\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['content'] || card; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n\n <!-- Opposite info -->\n @if (showOpposite()) {\n <div\n class=\"hidden lg:flex lg:items-center\"\n [class.lg:order-2]=\"$even\"\n [class.lg:order-1]=\"!$even\"\n [class.lg:pl-12]=\"$even\"\n [class.lg:justify-end]=\"!$even\"\n [class.lg:pr-12]=\"!$even\"\n >\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['opposite'] || itemInfo; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n }\n </div>\n } @else if (alignment() === 'split') {\n <!-- Split: markers centered, days on the left, activities on the right -->\n <div class=\"relative flex items-start gap-4 lg:grid lg:grid-cols-2 lg:gap-0\">\n <!-- Marker (centered on desktop) -->\n <div [class]=\"alternateMarkerColumnClass()\">\n <span [class]=\"markerClass(item, i)\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['marker'] || defaultMarker; context: { $implicit: item, index: i }\"\n ></ng-container>\n </span>\n </div>\n\n <!-- Day info (always left) -->\n @if (showOpposite()) {\n <div class=\"hidden lg:flex lg:items-center lg:justify-end lg:pr-12 lg:order-1 lg:text-right\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['opposite'] || itemInfo; context: { $implicit: item, index: i, showDescription: true }\"\n ></ng-container>\n </div>\n }\n\n <!-- Content card (always right) -->\n <div class=\"flex-1 min-w-0 lg:order-2 lg:pl-12\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['content'] || card; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n </div>\n } @else {\n <!-- Left alignment -->\n <div class=\"relative flex items-start gap-4\">\n <div [class]=\"markerColumnClass()\">\n <span [class]=\"markerClass(item, i)\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['marker'] || defaultMarker; context: { $implicit: item, index: i }\"\n ></ng-container>\n </span>\n </div>\n <div class=\"flex-1 min-w-0\">\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['content'] || card; context: { $implicit: item, index: i }\"\n ></ng-container>\n </div>\n </div>\n }\n }\n </div>\n } @else if (showEmptyState()) {\n <!-- ============ Empty state ============ -->\n <div class=\"text-center py-12\">\n @if (customTemplates()['empty']) {\n <ng-container *ngTemplateOutlet=\"customTemplates()['empty']\"></ng-container>\n } @else {\n <div class=\"w-16 h-16 mx-auto mb-4 _shk-bg-surface-100 rounded-full flex items-center justify-center\">\n <svg [shkIcon]=\"getIcon(emptyIcon())\" class=\"w-8 h-8 _shk-text-surface-400\"></svg>\n </div>\n <p class=\"text-sm _shk-text-surface-400\">{{ emptyMessage() }}</p>\n }\n </div>\n }\n\n <!-- ============ Templates ============ -->\n\n <ng-template #defaultMarker let-item let-index=\"index\">\n <span class=\"font-bold\">{{ markerText(item, index) }}</span>\n </ng-template>\n\n <ng-template #itemInfo let-item let-showDescription=\"showDescription\">\n <div>\n @if (item.badge !== undefined && item.badge !== null && item.badge !== '') {\n <div class=\"mb-2\">\n <span class=\"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-semibold _shk-bg-surface-100 _shk-text-surface-600\">\n @if (item.badgeIcon) {\n <svg [shkIcon]=\"getIcon(item.badgeIcon)\" class=\"w-3 h-3\"></svg>\n }\n {{ item.badge }}\n </span>\n </div>\n }\n @if (item.title) {\n <div class=\"text-sm font-medium _shk-text-surface-700\">{{ item.title }}</div>\n }\n @let subCount = (item.subItems?.length || 0);\n @if (item.subtitle || (showSubItemCount() && subCount > 0)) {\n <div class=\"text-xs _shk-text-surface-400 mt-1\">\n {{ item.subtitle || (subCount + ' ' + subItemCountLabel()) }}\n </div>\n }\n @if (showDescription && item.description) {\n <div class=\"text-xs _shk-text-surface-400 mt-1 leading-relaxed\">{{ item.description }}</div>\n }\n </div>\n </ng-template>\n\n <ng-template #card let-item>\n @let subItems = item.subItems || [];\n <div class=\"shk-timeline-card mb-4 bg-white dark:[background-color:var(--shk-surface-50)] rounded-xl border _shk-border shadow-sm\">\n <!-- Header (mobile in alternate/split, always in left) -->\n <div class=\"flex items-center gap-2 px-4 pt-4 pb-2\" [class.lg:hidden]=\"alignment() === 'alternate' || alignment() === 'split'\">\n <ng-container *ngTemplateOutlet=\"itemInfo; context: { $implicit: item }\"></ng-container>\n </div>\n\n <!-- Description -->\n @if (showDescription() && item.description) {\n <div class=\"px-4 pt-3\">\n @if (customTemplates()['description']) {\n <ng-container *ngTemplateOutlet=\"customTemplates()['description']; context: { $implicit: item }\"></ng-container>\n } @else {\n <p class=\"text-sm _shk-text-surface-600 leading-relaxed\">{{ item.description }}</p>\n }\n </div>\n }\n\n <!-- Sub items -->\n @if (subItems.length > 0) {\n <div class=\"mt-2\">\n @for (sub of subItems; track sub.id) {\n <ng-container\n *ngTemplateOutlet=\"customTemplates()['subItem'] || defaultSubItem; context: { $implicit: item, subItem: sub, last: $last, hasFooter: showAddSubItem() || itemActions().length > 0 }\"\n ></ng-container>\n }\n </div>\n } @else if (noSubItemsMessage()) {\n <div class=\"px-4 py-6 text-center\">\n <div class=\"inline-flex items-center gap-2 text-sm _shk-text-surface-400\">\n <svg [shkIcon]=\"getIcon('info')\" class=\"w-4 h-4\"></svg>\n <span class=\"italic\">{{ noSubItemsMessage() }}</span>\n </div>\n </div>\n }\n\n <!-- Footer actions -->\n @if (showAddSubItem() || itemActions().length > 0) {\n <div class=\"flex items-center gap-1 px-4 py-2 rounded-b-xl _shk-bg-surface-50 border-t _shk-border\">\n @if (showAddSubItem()) {\n <button\n type=\"button\"\n (click)=\"addSubItem.emit(item)\"\n class=\"relative group inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium _shk-text-primary hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] rounded-lg transition-colors\"\n >\n <svg [shkIcon]=\"getIcon('circle-plus')\" class=\"w-3.5 h-3.5\"></svg>\n {{ addSubItemLabel() }}\n <span class=\"absolute bottom-full left-1/2 -translate-x-1/2 mb-1 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 {{ addSubItemTooltip() }}\n </span>\n </button>\n }\n <div class=\"flex-1\"></div>\n @for (action of itemActions(); track $index) {\n @if (isItemActionVisible(action, item)) {\n <div class=\"relative group\">\n <button\n type=\"button\"\n (click)=\"action.onClick(item)\"\n [class]=\"'timeline-icon-btn ' + getItemActionClass(action, item)\"\n [disabled]=\"isItemActionDisabled(action, item)\"\n [attr.aria-label]=\"getItemActionLabel(action, item)\"\n >\n <svg [shkIcon]=\"getIcon(getItemActionIconName(action, item))\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n <span class=\"absolute bottom-full left-1/2 -translate-x-1/2 mb-1 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 {{ getItemActionLabel(action, item) }}\n </span>\n </div>\n }\n }\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #defaultSubItem let-item let-sub=\"subItem\" let-last=\"last\" let-hasFooter=\"hasFooter\">\n <div class=\"px-4 py-3 border-t [border-color:var(--shk-surface-100)] dark:[border-color:var(--shk-surface-700)] hover:[background-color:color-mix(in_srgb,var(--shk-primary-50)_30%,transparent)] dark:hover:[background-color:color-mix(in_srgb,var(--shk-primary-900)_10%,transparent)] transition-colors duration-200 group\" [class.rounded-b-xl]=\"last && !hasFooter\">\n <div class=\"flex items-start gap-3\">\n <span\n [class]=\"sub.iconClass || 'flex items-center justify-center w-9 h-9 rounded-lg shrink-0 mt-0.5'\"\n [style]=\"sub.iconClass ? undefined : subItemStyle(sub)\"\n >\n <svg [shkIcon]=\"getIcon(subItemIconName(sub))\" class=\"w-4 h-4\"></svg>\n </span>\n\n <div class=\"flex-1 min-w-0\">\n <div class=\"flex items-center gap-2 flex-wrap\">\n @if (sub.optional) {\n <span class=\"text-[10px] font-semibold uppercase tracking-wide px-1.5 py-0.5 rounded _shk-bg-amber-soft _shk-text-amber-600 dark:[color:var(--shk-amber-400)]\">\n {{ sub.optionalLabel || optionalLabel() }}\n </span>\n }\n <span class=\"font-medium _shk-text-surface-800 text-sm truncate\">{{ sub.title }}</span>\n @if (sub.subtitle) {\n <span class=\"text-xs _shk-text-surface-400 truncate\">· {{ sub.subtitle }}</span>\n }\n </div>\n\n @if (showSubItemMeta() && (sub.meta?.length || 0) > 0) {\n <div class=\"flex flex-wrap items-center gap-x-3 gap-y-1 mt-1.5 text-xs _shk-text-surface-500\">\n @for (m of sub.meta!; track $index) {\n <span class=\"flex items-center gap-1\">\n <svg [shkIcon]=\"getIcon(m.icon)\" class=\"w-3 h-3\"></svg>\n @if (m.label) {\n <span class=\"font-medium\">{{ m.label }}:</span>\n }\n {{ m.value }}\n </span>\n }\n </div>\n }\n </div>\n\n <div class=\"flex items-center gap-0.5 shrink-0\">\n @if (showSubItemPrice() && sub.price !== undefined && sub.price !== null && sub.price !== '') {\n <span class=\"font-semibold _shk-text-surface-700 text-xs mr-1\">{{ sub.price }}</span>\n }\n @for (action of subItemActions(); track $index) {\n @if (isSubItemActionVisible(action, item, sub)) {\n <div class=\"relative group/action\">\n <button\n type=\"button\"\n (click)=\"action.onClick(item, sub)\"\n class=\"timeline-icon-btn opacity-100 lg:opacity-0 lg:group-hover:opacity-100 transition-opacity\"\n [disabled]=\"isSubItemActionDisabled(action, item, sub)\"\n [attr.aria-label]=\"getSubItemActionLabel(action, item, sub)\"\n >\n <svg [shkIcon]=\"getIcon(getSubItemActionIconName(action, item, sub))\" class=\"w-3.5 h-3.5\"></svg>\n </button>\n <span class=\"absolute top-full left-1/2 -translate-x-1/2 mt-1 px-2 py-1 text-xs _shk-bg-tooltip _shk-text-tooltip rounded whitespace-nowrap opacity-0 group-hover/action:opacity-100 transition pointer-events-none z-[9999] shadow-lg\">\n {{ getSubItemActionLabel(action, item, sub) }}\n </span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n </ng-template>\n\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["getIconFromCentral"],"mappings":";;;;;;;AAsGO,MAAM,wBAAwB,GAAa;IAChD,6CAA6C;IAC7C,mDAAmD;IACnD,iDAAiD;IACjD,iDAAiD;IACjD,6CAA6C;IAC7C,6CAA6C;IAC7C,+CAA+C;IAC/C,iDAAiD;IACjD,6CAA6C;IAC7C,6CAA6C;;AAG/C;AACO,MAAM,4BAA4B,GAGrC;IACF,aAAa,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IACjD,WAAW,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/C,UAAU,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9C,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC7C,QAAQ,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5C,MAAM,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1C,SAAS,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC7C,UAAU,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9C,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IACzC,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IACzC,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;;AAG3C;AACO,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gBAAgB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,aAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FA6C7B,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhD7B,SAAS;+BACE,cAAc,EAAA,eAAA,EACP,uBAAuB,CAAC,MAAM,WACtC,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,mkeAAA,EAAA,MAAA,EAAA,CAAA,osBAAA,CAAA,EAAA;;;AEzJ3C;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, signal, computed,
|
|
2
|
+
import { input, model, output, signal, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
|
|
@@ -11,6 +11,9 @@ import { CommonModule } from '@angular/common';
|
|
|
11
11
|
/**
|
|
12
12
|
* Switch / checkbox component that implements ControlValueAccessor so it can
|
|
13
13
|
* be used with reactive and template-driven forms.
|
|
14
|
+
*
|
|
15
|
+
* It also implements the Angular Signal Forms `FormCheckboxControl` contract
|
|
16
|
+
* through its `checked` model, so it works with `[formField]` as well.
|
|
14
17
|
*/
|
|
15
18
|
class ToggleComponent {
|
|
16
19
|
constructor() {
|
|
@@ -18,14 +21,16 @@ class ToggleComponent {
|
|
|
18
21
|
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
19
22
|
/** Visual style: 'toggle' (switch) or 'checkbox'. Defaults to 'toggle'. */
|
|
20
23
|
this.mode = input('toggle', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Checked state. Two-way bindable with `[(checked)]`; also the model that
|
|
26
|
+
* Signal Forms binds to. The implicit `checkedChange` output fires with the
|
|
27
|
+
* new value whenever the user toggles the control.
|
|
28
|
+
*/
|
|
29
|
+
this.checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
25
30
|
/** Disables the control (also settable through reactive forms). */
|
|
26
31
|
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
27
|
-
/**
|
|
28
|
-
this.
|
|
32
|
+
/** Emitted on blur so Signal Forms can mark the field as touched. */
|
|
33
|
+
this.touch = output();
|
|
29
34
|
/** Reactive disabled state. */
|
|
30
35
|
this._disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
31
36
|
/** Disabled through the `disabled` input or the form control. */
|
|
@@ -34,16 +39,10 @@ class ToggleComponent {
|
|
|
34
39
|
this.onChange = () => { };
|
|
35
40
|
/** Callback notified when the control loses focus or is touched. */
|
|
36
41
|
this.onTouched = () => { };
|
|
37
|
-
effect(() => {
|
|
38
|
-
const manual = this.checked();
|
|
39
|
-
if (manual !== undefined) {
|
|
40
|
-
this._value.set(manual);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
42
|
}
|
|
44
43
|
/** Sets the value from the form control. */
|
|
45
44
|
writeValue(value) {
|
|
46
|
-
this.
|
|
45
|
+
this.checked.set(!!value);
|
|
47
46
|
}
|
|
48
47
|
/** Registers the callback invoked on value changes (ControlValueAccessor). */
|
|
49
48
|
registerOnChange(fn) {
|
|
@@ -57,10 +56,11 @@ class ToggleComponent {
|
|
|
57
56
|
setDisabledState(isDisabled) {
|
|
58
57
|
this._disabled.set(isDisabled);
|
|
59
58
|
}
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
/** Marks the control as touched when focus leaves it. */
|
|
60
|
+
onBlur() {
|
|
61
|
+
this.onTouched();
|
|
62
|
+
this.touch.emit();
|
|
63
|
+
}
|
|
64
64
|
/** Space/Enter toggles the focused switch or checkbox. */
|
|
65
65
|
onKeydown(event) {
|
|
66
66
|
if (event.key === ' ' || event.key === 'Enter') {
|
|
@@ -68,17 +68,20 @@ class ToggleComponent {
|
|
|
68
68
|
this.toggle();
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Inverts the current value (unless disabled), notifies the form control and
|
|
73
|
+
* marks the control as touched. The `checked` model emits `checkedChange`.
|
|
74
|
+
*/
|
|
71
75
|
toggle() {
|
|
72
76
|
if (this.isDisabled())
|
|
73
77
|
return;
|
|
74
|
-
const newValue = !this.
|
|
75
|
-
this.
|
|
78
|
+
const newValue = !this.checked();
|
|
79
|
+
this.checked.set(newValue);
|
|
76
80
|
this.onChange(newValue);
|
|
77
81
|
this.onTouched();
|
|
78
|
-
this.checkedChange.emit(newValue);
|
|
79
82
|
}
|
|
80
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
81
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: ToggleComponent, isStandalone: true, selector: "shk-toggle", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touch: "touch" }, providers: [
|
|
82
85
|
{
|
|
83
86
|
provide: NG_VALUE_ACCESSOR,
|
|
84
87
|
useExisting: forwardRef(() => ToggleComponent),
|
|
@@ -86,8 +89,10 @@ class ToggleComponent {
|
|
|
86
89
|
},
|
|
87
90
|
], ngImport: i0, template: `
|
|
88
91
|
<div class="relative">
|
|
92
|
+
<!-- El click va en el label: responde el control y tambien el texto. -->
|
|
89
93
|
<label
|
|
90
94
|
class="inline-flex items-center gap-3 cursor-pointer select-none"
|
|
95
|
+
(click)="toggle()"
|
|
91
96
|
[class.opacity-50]="isDisabled()"
|
|
92
97
|
[class.cursor-not-allowed]="isDisabled()"
|
|
93
98
|
[class.shk-toggle-disabled]="isDisabled()"
|
|
@@ -96,40 +101,40 @@ class ToggleComponent {
|
|
|
96
101
|
<div
|
|
97
102
|
class="shk-toggle-control relative flex-shrink-0 rounded-full"
|
|
98
103
|
role="switch"
|
|
99
|
-
[attr.aria-checked]="
|
|
104
|
+
[attr.aria-checked]="checked()"
|
|
100
105
|
[attr.aria-disabled]="isDisabled() || null"
|
|
101
106
|
[attr.aria-label]="label() || null"
|
|
102
107
|
[attr.tabindex]="isDisabled() ? -1 : 0"
|
|
103
108
|
(keydown)="onKeydown($event)"
|
|
104
|
-
(
|
|
109
|
+
(blur)="onBlur()"
|
|
105
110
|
>
|
|
106
111
|
<div
|
|
107
112
|
class="w-10 h-6 rounded-full transition-colors duration-200"
|
|
108
|
-
[class._shk-bg-primary]="
|
|
109
|
-
[class._shk-bg-surface-300]="!
|
|
110
|
-
[class._shk-dark-bg-surface-600]="!
|
|
113
|
+
[class._shk-bg-primary]="checked()"
|
|
114
|
+
[class._shk-bg-surface-300]="!checked()"
|
|
115
|
+
[class._shk-dark-bg-surface-600]="!checked()"
|
|
111
116
|
></div>
|
|
112
117
|
<div
|
|
113
118
|
class="shk-toggle-thumb absolute top-0.5 left-0.5 w-5 h-5 _shk-bg-white rounded-full shadow transition-transform duration-200"
|
|
114
|
-
[class.translate-x-4]="
|
|
119
|
+
[class.translate-x-4]="checked()"
|
|
115
120
|
></div>
|
|
116
121
|
</div>
|
|
117
122
|
} @else {
|
|
118
123
|
<div
|
|
119
124
|
class="shk-toggle-control shk-toggle-box flex-shrink-0 w-4 h-4 rounded border-2 transition-colors duration-200 flex items-center justify-center"
|
|
120
125
|
role="checkbox"
|
|
121
|
-
[attr.aria-checked]="
|
|
126
|
+
[attr.aria-checked]="checked()"
|
|
122
127
|
[attr.aria-disabled]="isDisabled() || null"
|
|
123
128
|
[attr.aria-label]="label() || null"
|
|
124
129
|
[attr.tabindex]="isDisabled() ? -1 : 0"
|
|
125
130
|
(keydown)="onKeydown($event)"
|
|
126
|
-
|
|
127
|
-
[class._shk-
|
|
128
|
-
[class._shk-border-
|
|
129
|
-
[class._shk-
|
|
130
|
-
|
|
131
|
+
(blur)="onBlur()"
|
|
132
|
+
[class._shk-bg-primary]="checked()"
|
|
133
|
+
[class._shk-border-primary]="checked()"
|
|
134
|
+
[class._shk-border-surface-300]="!checked()"
|
|
135
|
+
[class._shk-dark-border-surface-600]="!checked()"
|
|
131
136
|
>
|
|
132
|
-
@if (
|
|
137
|
+
@if (checked()) {
|
|
133
138
|
<svg class="w-3 h-3 text-white" viewBox="0 0 12 12" fill="none">
|
|
134
139
|
<path d="M2 6l3 3 5-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
135
140
|
</svg>
|
|
@@ -143,14 +148,16 @@ class ToggleComponent {
|
|
|
143
148
|
}
|
|
144
149
|
</label>
|
|
145
150
|
</div>
|
|
146
|
-
`, isInline: true, styles: [".shk-toggle-control{outline:none;transition:box-shadow .15s ease}.shk-toggle-control:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--shk-primary-500) 30%,transparent)}.shk-toggle-box{border-radius:.3rem}label:not(.shk-toggle-disabled):hover .shk-toggle-box[aria-checked=false]{border-color:var(--shk-primary-400)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
151
|
+
`, isInline: true, styles: [".shk-toggle-control{outline:none;transition:box-shadow .15s ease}.shk-toggle-control:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--shk-primary-500) 30%,transparent)}.shk-toggle-box{border-radius:.3rem}label:not(.shk-toggle-disabled):hover .shk-toggle-box[aria-checked=false]{border-color:var(--shk-primary-400)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
147
152
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
149
154
|
type: Component,
|
|
150
|
-
args: [{ selector: 'shk-toggle',
|
|
155
|
+
args: [{ selector: 'shk-toggle', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], template: `
|
|
151
156
|
<div class="relative">
|
|
157
|
+
<!-- El click va en el label: responde el control y tambien el texto. -->
|
|
152
158
|
<label
|
|
153
159
|
class="inline-flex items-center gap-3 cursor-pointer select-none"
|
|
160
|
+
(click)="toggle()"
|
|
154
161
|
[class.opacity-50]="isDisabled()"
|
|
155
162
|
[class.cursor-not-allowed]="isDisabled()"
|
|
156
163
|
[class.shk-toggle-disabled]="isDisabled()"
|
|
@@ -159,40 +166,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
159
166
|
<div
|
|
160
167
|
class="shk-toggle-control relative flex-shrink-0 rounded-full"
|
|
161
168
|
role="switch"
|
|
162
|
-
[attr.aria-checked]="
|
|
169
|
+
[attr.aria-checked]="checked()"
|
|
163
170
|
[attr.aria-disabled]="isDisabled() || null"
|
|
164
171
|
[attr.aria-label]="label() || null"
|
|
165
172
|
[attr.tabindex]="isDisabled() ? -1 : 0"
|
|
166
173
|
(keydown)="onKeydown($event)"
|
|
167
|
-
(
|
|
174
|
+
(blur)="onBlur()"
|
|
168
175
|
>
|
|
169
176
|
<div
|
|
170
177
|
class="w-10 h-6 rounded-full transition-colors duration-200"
|
|
171
|
-
[class._shk-bg-primary]="
|
|
172
|
-
[class._shk-bg-surface-300]="!
|
|
173
|
-
[class._shk-dark-bg-surface-600]="!
|
|
178
|
+
[class._shk-bg-primary]="checked()"
|
|
179
|
+
[class._shk-bg-surface-300]="!checked()"
|
|
180
|
+
[class._shk-dark-bg-surface-600]="!checked()"
|
|
174
181
|
></div>
|
|
175
182
|
<div
|
|
176
183
|
class="shk-toggle-thumb absolute top-0.5 left-0.5 w-5 h-5 _shk-bg-white rounded-full shadow transition-transform duration-200"
|
|
177
|
-
[class.translate-x-4]="
|
|
184
|
+
[class.translate-x-4]="checked()"
|
|
178
185
|
></div>
|
|
179
186
|
</div>
|
|
180
187
|
} @else {
|
|
181
188
|
<div
|
|
182
189
|
class="shk-toggle-control shk-toggle-box flex-shrink-0 w-4 h-4 rounded border-2 transition-colors duration-200 flex items-center justify-center"
|
|
183
190
|
role="checkbox"
|
|
184
|
-
[attr.aria-checked]="
|
|
191
|
+
[attr.aria-checked]="checked()"
|
|
185
192
|
[attr.aria-disabled]="isDisabled() || null"
|
|
186
193
|
[attr.aria-label]="label() || null"
|
|
187
194
|
[attr.tabindex]="isDisabled() ? -1 : 0"
|
|
188
195
|
(keydown)="onKeydown($event)"
|
|
189
|
-
|
|
190
|
-
[class._shk-
|
|
191
|
-
[class._shk-border-
|
|
192
|
-
[class._shk-
|
|
193
|
-
|
|
196
|
+
(blur)="onBlur()"
|
|
197
|
+
[class._shk-bg-primary]="checked()"
|
|
198
|
+
[class._shk-border-primary]="checked()"
|
|
199
|
+
[class._shk-border-surface-300]="!checked()"
|
|
200
|
+
[class._shk-dark-border-surface-600]="!checked()"
|
|
194
201
|
>
|
|
195
|
-
@if (
|
|
202
|
+
@if (checked()) {
|
|
196
203
|
<svg class="w-3 h-3 text-white" viewBox="0 0 12 12" fill="none">
|
|
197
204
|
<path d="M2 6l3 3 5-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
198
205
|
</svg>
|
|
@@ -213,7 +220,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
213
220
|
multi: true,
|
|
214
221
|
},
|
|
215
222
|
], styles: [".shk-toggle-control{outline:none;transition:box-shadow .15s ease}.shk-toggle-control:focus-visible{box-shadow:0 0 0 3px color-mix(in srgb,var(--shk-primary-500) 30%,transparent)}.shk-toggle-box{border-radius:.3rem}label:not(.shk-toggle-disabled):hover .shk-toggle-box[aria-checked=false]{border-color:var(--shk-primary-400)}\n"] }]
|
|
216
|
-
}],
|
|
223
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
|
|
217
224
|
|
|
218
225
|
/**
|
|
219
226
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirkasoft-ui-components-toggle.mjs","sources":["../../../projects/ui-components/toggle/toggle.component.ts","../../../projects/ui-components/toggle/shirkasoft-ui-components-toggle.ts"],"sourcesContent":["import { Component, forwardRef, input, output, signal, effect, computed } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\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 * Switch / checkbox component that implements ControlValueAccessor so it can\n * be used with reactive and template-driven forms.\n */\n@Component({\n selector: 'shk-toggle',\n standalone: true,\n imports: [CommonModule],\n template: `\n <div class=\"relative\">\n <label\n class=\"inline-flex items-center gap-3 cursor-pointer select-none\"\n [class.opacity-50]=\"isDisabled()\"\n [class.cursor-not-allowed]=\"isDisabled()\"\n [class.shk-toggle-disabled]=\"isDisabled()\"\n >\n @if (mode() === 'toggle') {\n <div\n class=\"shk-toggle-control relative flex-shrink-0 rounded-full\"\n role=\"switch\"\n [attr.aria-checked]=\"_value()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (keydown)=\"onKeydown($event)\"\n (click)=\"toggle()\"\n >\n <div\n class=\"w-10 h-6 rounded-full transition-colors duration-200\"\n [class._shk-bg-primary]=\"_value()\"\n [class._shk-bg-surface-300]=\"!_value()\"\n [class._shk-dark-bg-surface-600]=\"!_value()\"\n ></div>\n <div\n class=\"shk-toggle-thumb absolute top-0.5 left-0.5 w-5 h-5 _shk-bg-white rounded-full shadow transition-transform duration-200\"\n [class.translate-x-4]=\"_value()\"\n ></div>\n </div>\n } @else {\n <div\n class=\"shk-toggle-control shk-toggle-box flex-shrink-0 w-4 h-4 rounded border-2 transition-colors duration-200 flex items-center justify-center\"\n role=\"checkbox\"\n [attr.aria-checked]=\"_value()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (keydown)=\"onKeydown($event)\"\n [class._shk-bg-primary]=\"_value()\"\n [class._shk-border-primary]=\"_value()\"\n [class._shk-border-surface-300]=\"!_value()\"\n [class._shk-dark-border-surface-600]=\"!_value()\"\n (click)=\"toggle()\"\n >\n @if (_value()) {\n <svg class=\"w-3 h-3 text-white\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M2 6l3 3 5-5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n </div>\n }\n @if (label()) {\n <span class=\"text-sm _shk-text-surface-700 _shk-dark-text-surface-300\">\n {{ label() }}\n </span>\n }\n </label>\n </div>\n `,\n styles: [\n `\n .shk-toggle-control {\n outline: none;\n transition: box-shadow 0.15s ease;\n }\n .shk-toggle-control:focus-visible {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--shk-primary-500) 30%, transparent);\n }\n .shk-toggle-box {\n border-radius: 0.3rem;\n }\n label:not(.shk-toggle-disabled):hover .shk-toggle-box[aria-checked='false'] {\n border-color: var(--shk-primary-400);\n }\n `,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n})\nexport class ToggleComponent implements ControlValueAccessor {\n /** Text displayed next to the control. */\n label = input<string>('');\n /** Visual style: 'toggle' (switch) or 'checkbox'. Defaults to 'toggle'. */\n mode = input<'toggle' | 'checkbox'>('toggle');\n /** Manually controlled checked state (supports one-way binding). */\n checked = input<boolean | undefined>(undefined);\n /** Emitted with the new value when the user toggles the control. */\n checkedChange = output<boolean>();\n /** Disables the control (also settable through reactive forms). */\n disabled = input<boolean>(false);\n\n /** Internal controlled/reactive value. */\n _value = signal(false);\n /** Reactive disabled state. */\n _disabled = signal(false);\n /** Disabled through the `disabled` input or the form control. */\n isDisabled = computed(() => this.disabled() || this._disabled());\n\n /** Callback notified with the new value on change (ControlValueAccessor). */\n private onChange: (value: boolean) => void = () => {};\n\n /** Callback notified when the control loses focus or is touched. */\n private onTouched: () => void = () => {};\n\n constructor() {\n effect(() => {\n const manual = this.checked();\n if (manual !== undefined) {\n this._value.set(manual);\n }\n });\n }\n\n /** Sets the value from the form control. */\n writeValue(value: any): void {\n this._value.set(!!value);\n }\n\n /** Registers the callback invoked on value changes (ControlValueAccessor). */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** Registers the callback invoked when the control is touched. */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /** Reflects the disabled state of the form control. */\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n\n /**\n * Inverts the current value (unless disabled), notifies the form control,\n * marks the control as touched and emits `checkedChange`.\n */\n /** Space/Enter toggles the focused switch or checkbox. */\n onKeydown(event: KeyboardEvent): void {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.toggle();\n }\n }\n\n toggle(): void {\n if (this.isDisabled()) return;\n const newValue = !this._value();\n this._value.set(newValue);\n this.onChange(newValue);\n this.onTouched();\n this.checkedChange.emit(newValue);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA;;;;AAIG;AAEH;;;AAGG;MA0FU,eAAe,CAAA;AAyB1B,IAAA,WAAA,GAAA;;AAvBA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,QAAQ,2EAAC;;AAE7C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAsB,SAAS,8EAAC;;QAE/C,IAAA,CAAA,aAAa,GAAG,MAAM,EAAW;;AAEjC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAGhC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK,6EAAC;;AAEtB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,KAAK,gFAAC;;AAEzB,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE,iFAAC;;AAGxD,QAAA,IAAA,CAAA,QAAQ,GAA6B,MAAK,EAAE,CAAC;;AAG7C,QAAA,IAAA,CAAA,SAAS,GAAe,MAAK,EAAE,CAAC;QAGtC,MAAM,CAAC,MAAK;AACV,YAAA,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,IAAA,EAAA,UAAA,EAAA,IAAA,EA5DS,YAAY,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAsFX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAzF3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,cACV,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,CAAC,EAAA,QAAA,EACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DT,EAAA,SAAA,EAkBU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,MAAA,EAAA,CAAA,wUAAA,CAAA,EAAA;;;ACrGH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-toggle.mjs","sources":["../../../projects/ui-components/toggle/toggle.component.ts","../../../projects/ui-components/toggle/shirkasoft-ui-components-toggle.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, forwardRef, input, model, output, signal, computed } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { FormCheckboxControl } from '@angular/forms/signals';\nimport { CommonModule } from '@angular/common';\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 * Switch / checkbox component that implements ControlValueAccessor so it can\n * be used with reactive and template-driven forms.\n *\n * It also implements the Angular Signal Forms `FormCheckboxControl` contract\n * through its `checked` model, so it works with `[formField]` as well.\n */\n@Component({\n selector: 'shk-toggle',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule],\n template: `\n <div class=\"relative\">\n <!-- El click va en el label: responde el control y tambien el texto. -->\n <label\n class=\"inline-flex items-center gap-3 cursor-pointer select-none\"\n (click)=\"toggle()\"\n [class.opacity-50]=\"isDisabled()\"\n [class.cursor-not-allowed]=\"isDisabled()\"\n [class.shk-toggle-disabled]=\"isDisabled()\"\n >\n @if (mode() === 'toggle') {\n <div\n class=\"shk-toggle-control relative flex-shrink-0 rounded-full\"\n role=\"switch\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n >\n <div\n class=\"w-10 h-6 rounded-full transition-colors duration-200\"\n [class._shk-bg-primary]=\"checked()\"\n [class._shk-bg-surface-300]=\"!checked()\"\n [class._shk-dark-bg-surface-600]=\"!checked()\"\n ></div>\n <div\n class=\"shk-toggle-thumb absolute top-0.5 left-0.5 w-5 h-5 _shk-bg-white rounded-full shadow transition-transform duration-200\"\n [class.translate-x-4]=\"checked()\"\n ></div>\n </div>\n } @else {\n <div\n class=\"shk-toggle-control shk-toggle-box flex-shrink-0 w-4 h-4 rounded border-2 transition-colors duration-200 flex items-center justify-center\"\n role=\"checkbox\"\n [attr.aria-checked]=\"checked()\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-label]=\"label() || null\"\n [attr.tabindex]=\"isDisabled() ? -1 : 0\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n [class._shk-bg-primary]=\"checked()\"\n [class._shk-border-primary]=\"checked()\"\n [class._shk-border-surface-300]=\"!checked()\"\n [class._shk-dark-border-surface-600]=\"!checked()\"\n >\n @if (checked()) {\n <svg class=\"w-3 h-3 text-white\" viewBox=\"0 0 12 12\" fill=\"none\">\n <path d=\"M2 6l3 3 5-5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n }\n </div>\n }\n @if (label()) {\n <span class=\"text-sm _shk-text-surface-700 _shk-dark-text-surface-300\">\n {{ label() }}\n </span>\n }\n </label>\n </div>\n `,\n styles: [\n `\n .shk-toggle-control {\n outline: none;\n transition: box-shadow 0.15s ease;\n }\n .shk-toggle-control:focus-visible {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--shk-primary-500) 30%, transparent);\n }\n .shk-toggle-box {\n border-radius: 0.3rem;\n }\n label:not(.shk-toggle-disabled):hover .shk-toggle-box[aria-checked='false'] {\n border-color: var(--shk-primary-400);\n }\n `,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n})\nexport class ToggleComponent implements ControlValueAccessor, FormCheckboxControl {\n /** Text displayed next to the control. */\n label = input<string>('');\n /** Visual style: 'toggle' (switch) or 'checkbox'. Defaults to 'toggle'. */\n mode = input<'toggle' | 'checkbox'>('toggle');\n /**\n * Checked state. Two-way bindable with `[(checked)]`; also the model that\n * Signal Forms binds to. The implicit `checkedChange` output fires with the\n * new value whenever the user toggles the control.\n */\n checked = model<boolean>(false);\n /** Disables the control (also settable through reactive forms). */\n disabled = input<boolean>(false);\n /** Emitted on blur so Signal Forms can mark the field as touched. */\n touch = output<void>();\n\n /** Reactive disabled state. */\n _disabled = signal(false);\n /** Disabled through the `disabled` input or the form control. */\n isDisabled = computed(() => this.disabled() || this._disabled());\n\n /** Callback notified with the new value on change (ControlValueAccessor). */\n private onChange: (value: boolean) => void = () => {};\n\n /** Callback notified when the control loses focus or is touched. */\n private onTouched: () => void = () => {};\n\n /** Sets the value from the form control. */\n writeValue(value: any): void {\n this.checked.set(!!value);\n }\n\n /** Registers the callback invoked on value changes (ControlValueAccessor). */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** Registers the callback invoked when the control is touched. */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /** Reflects the disabled state of the form control. */\n setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n\n /** Marks the control as touched when focus leaves it. */\n onBlur(): void {\n this.onTouched();\n this.touch.emit();\n }\n\n /** Space/Enter toggles the focused switch or checkbox. */\n onKeydown(event: KeyboardEvent): void {\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.toggle();\n }\n }\n\n /**\n * Inverts the current value (unless disabled), notifies the form control and\n * marks the control as touched. The `checked` model emits `checkedChange`.\n */\n toggle(): void {\n if (this.isDisabled()) return;\n const newValue = !this.checked();\n this.checked.set(newValue);\n this.onChange(newValue);\n this.onTouched();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAKA;;;;AAIG;AAEH;;;;;;AAMG;MA4FU,eAAe,CAAA;AA3F5B,IAAA,WAAA,GAAA;;AA6FE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAwB,QAAQ,2EAAC;AAC7C;;;;AAIG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;;AAE/B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;QAEhC,IAAA,CAAA,KAAK,GAAG,MAAM,EAAQ;;AAGtB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,KAAK,gFAAC;;AAEzB,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE,iFAAC;;AAGxD,QAAA,IAAA,CAAA,QAAQ,GAA6B,MAAK,EAAE,CAAC;;AAG7C,QAAA,IAAA,CAAA,SAAS,GAAe,MAAK,EAAE,CAAC;AA+CzC,IAAA;;AA5CC,IAAA,UAAU,CAAC,KAAU,EAAA;QACnB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IAC3B;;AAGA,IAAA,gBAA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Y,CAAC,EAAA,QAAA,EACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DT,EAAA,SAAA,EAkBU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,MAAA,EAAA,CAAA,wUAAA,CAAA,EAAA;;;AC3GH;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, ElementRef, HostListener, Component } from '@angular/core';
|
|
2
|
+
import { input, inject, ElementRef, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { DOCUMENT } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
const TOOLTIP_Z_INDEX = '2147483647';
|
|
@@ -32,6 +32,22 @@ class TooltipComponent {
|
|
|
32
32
|
}
|
|
33
33
|
/** Shows the tooltip over the host trigger on mouseenter. */
|
|
34
34
|
onMouseEnter() {
|
|
35
|
+
this.open();
|
|
36
|
+
}
|
|
37
|
+
/** Hides the tooltip on mouseleave. */
|
|
38
|
+
onMouseLeave() {
|
|
39
|
+
this.hide();
|
|
40
|
+
}
|
|
41
|
+
/** Also opens on keyboard focus, so icon-only triggers are readable. */
|
|
42
|
+
onFocusIn() {
|
|
43
|
+
this.open();
|
|
44
|
+
}
|
|
45
|
+
/** Closes when the focus leaves the trigger. */
|
|
46
|
+
onFocusOut() {
|
|
47
|
+
this.hide();
|
|
48
|
+
}
|
|
49
|
+
/** Opens the tooltip when there is text to show. */
|
|
50
|
+
open() {
|
|
35
51
|
if (!this.text())
|
|
36
52
|
return;
|
|
37
53
|
const trigger = this.host.nativeElement.querySelector('.shk-tooltip-trigger');
|
|
@@ -39,10 +55,6 @@ class TooltipComponent {
|
|
|
39
55
|
return;
|
|
40
56
|
this.show(trigger);
|
|
41
57
|
}
|
|
42
|
-
/** Hides the tooltip on mouseleave. */
|
|
43
|
-
onMouseLeave() {
|
|
44
|
-
this.hide();
|
|
45
|
-
}
|
|
46
58
|
/** Creates and positions the tooltip element on `document.body`. */
|
|
47
59
|
show(trigger) {
|
|
48
60
|
this.removeTooltip();
|
|
@@ -58,7 +70,7 @@ class TooltipComponent {
|
|
|
58
70
|
borderRadius: '6px',
|
|
59
71
|
fontSize: '12px',
|
|
60
72
|
lineHeight: '1.4',
|
|
61
|
-
whiteSpace: '
|
|
73
|
+
whiteSpace: 'pre-line',
|
|
62
74
|
maxWidth: 'min(80vw, 22rem)',
|
|
63
75
|
boxShadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
|
|
64
76
|
pointerEvents: 'none',
|
|
@@ -135,18 +147,18 @@ class TooltipComponent {
|
|
|
135
147
|
ngOnDestroy() {
|
|
136
148
|
this.removeTooltip();
|
|
137
149
|
}
|
|
138
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
139
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.27", type: TooltipComponent, isStandalone: true, selector: "shk-tooltip", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focusin": "onFocusIn()", "focusout": "onFocusOut()" } }, ngImport: i0, template: `
|
|
140
152
|
<div class="shk-tooltip-trigger inline-flex">
|
|
141
153
|
<ng-content></ng-content>
|
|
142
154
|
</div>
|
|
143
|
-
`, isInline: true }); }
|
|
155
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
144
156
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.27", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
146
158
|
type: Component,
|
|
147
159
|
args: [{
|
|
148
160
|
selector: 'shk-tooltip',
|
|
149
|
-
|
|
161
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
150
162
|
template: `
|
|
151
163
|
<div class="shk-tooltip-trigger inline-flex">
|
|
152
164
|
<ng-content></ng-content>
|
|
@@ -159,6 +171,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
159
171
|
}], onMouseLeave: [{
|
|
160
172
|
type: HostListener,
|
|
161
173
|
args: ['mouseleave']
|
|
174
|
+
}], onFocusIn: [{
|
|
175
|
+
type: HostListener,
|
|
176
|
+
args: ['focusin']
|
|
177
|
+
}], onFocusOut: [{
|
|
178
|
+
type: HostListener,
|
|
179
|
+
args: ['focusout']
|
|
162
180
|
}] } });
|
|
163
181
|
|
|
164
182
|
/**
|