@shival99/z-ui 1.8.13 → 1.9.1
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/assets/css/tailwind.css +7 -11
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +45 -71
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button.mjs +21 -11
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +61 -32
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-card.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +429 -0
- package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-code.mjs +51 -21
- package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +8 -3
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +169 -90
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +143 -360
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +131 -8
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +8 -3
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +31 -7
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +31 -29
- package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +131 -15
- package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +57 -13
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +5 -4
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +12 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-pipes.mjs +18 -0
- package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-providers.mjs +30 -13
- package/fesm2022/shival99-z-ui-providers.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-services.mjs +53 -29
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
- package/fesm2022/z-ui.mjs +0 -4
- package/fesm2022/z-ui.mjs.map +1 -1
- package/package.json +6 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +25 -38
- package/types/shival99-z-ui-components-z-breadcrumb.d.ts +4 -4
- package/types/shival99-z-ui-components-z-button.d.ts +5 -4
- package/types/shival99-z-ui-components-z-chat.d.ts +148 -0
- package/types/shival99-z-ui-components-z-drawer.d.ts +3 -1
- package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +2 -2
- package/types/shival99-z-ui-components-z-empty.d.ts +3 -3
- package/types/shival99-z-ui-components-z-filter.d.ts +2 -2
- package/types/shival99-z-ui-components-z-gallery.d.ts +6 -3
- package/types/shival99-z-ui-components-z-icon.d.ts +18 -304
- package/types/shival99-z-ui-components-z-input.d.ts +42 -1
- package/types/shival99-z-ui-components-z-modal.d.ts +4 -2
- package/types/shival99-z-ui-components-z-select.d.ts +5 -2
- package/types/shival99-z-ui-components-z-steps.d.ts +4 -4
- package/types/shival99-z-ui-components-z-switch.d.ts +25 -4
- package/types/shival99-z-ui-components-z-table.d.ts +2 -0
- package/types/shival99-z-ui-pipes.d.ts +2 -0
- package/types/shival99-z-ui-providers.d.ts +10 -16
- package/types/shival99-z-ui-services.d.ts +6 -1
- package/types/z-ui.d.ts +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shival99-z-ui-components-z-icon.mjs","sources":["../../../../libs/core-ui/components/z-icon/z-icon.variants.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.html","../../../../libs/core-ui/components/z-icon/z-icons.ts","../../../../libs/core-ui/components/z-icon/z-icon-loader.provider.ts","../../../../libs/core-ui/components/z-icon/shival99-z-ui-components-z-icon.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zIconVariants = cva('', {\n variants: {\n zSize: {\n '10': 'size-10',\n '11': 'size-11',\n '12': 'size-12',\n '13': 'size-13',\n '14': 'size-14',\n '15': 'size-15',\n '16': 'size-16',\n '17': 'size-17',\n '18': 'size-18',\n '19': 'size-19',\n '20': 'size-20',\n '21': 'size-21',\n '22': 'size-22',\n '23': 'size-23',\n '24': 'size-24',\n '25': 'size-25',\n '26': 'size-26',\n '27': 'size-27',\n '28': 'size-28',\n '29': 'size-29',\n '30': 'size-30',\n '31': 'size-31',\n '32': 'size-32',\n '33': 'size-33',\n '34': 'size-34',\n '35': 'size-35',\n '36': 'size-36',\n '37': 'size-37',\n '38': 'size-38',\n '39': 'size-39',\n '40': 'size-40',\n '41': 'size-41',\n '42': 'size-42',\n '43': 'size-43',\n '44': 'size-44',\n '45': 'size-45',\n '46': 'size-46',\n '47': 'size-47',\n '48': 'size-48',\n '49': 'size-49',\n '50': 'size-50',\n },\n },\n defaultVariants: {\n zSize: '16',\n },\n});\n\nexport type ZIconVariants = VariantProps<typeof zIconVariants>;\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { NgIconComponent as NgIcon } from '@ng-icons/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { zIconVariants, ZIconVariants } from './z-icon.variants';\nimport { type ZIcon } from './z-icons';\n\n@Component({\n selector: 'z-icon, [z-icon]',\n imports: [NgIcon],\n standalone: true,\n templateUrl: './z-icon.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n '[style.width]': 'zSize() + \"px\"',\n '[style.height]': 'zSize() + \"px\"',\n },\n})\nexport class ZIconComponent {\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZIcon>();\n public readonly zSize = input<ZIconVariants['zSize']>('16');\n public readonly zStrokeWidth = input<number>(2);\n public readonly zSvg = input<string>('');\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zIconVariants({ zSize: this.zSize() }),\n this.class(),\n this.zStrokeWidth() === 0 ? 'stroke-none' : '',\n 'inline-flex shrink-0'\n )\n );\n}\n","@if (zSvg()) {\n <ng-icon [svg]=\"zSvg()\" [size]=\"zSize() || '16'\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else {\n <ng-icon [name]=\"zType()\" [size]=\"zSize() || '16'\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n","import { type IconType } from '@ng-icons/core';\nimport { saxCloudChangeBold, saxPauseBold, saxRefreshBold } from '@ng-icons/iconsax/bold';\nimport { saxEditOutline } from '@ng-icons/iconsax/outline';\nimport {\n lucideTestTube,\n lucideCircle,\n lucideMoreVertical,\n lucideSearchX,\n lucidePin,\n lucideGripVertical,\n lucideSparkles,\n lucideList,\n lucideHash,\n lucideImage,\n lucideGripHorizontal,\n lucideHome,\n lucideFolderOpen,\n lucideGithub,\n lucideLifeBuoy,\n lucideCloud,\n lucideActivity,\n lucideAlarmClock,\n lucideAlertCircle,\n lucideAlertOctagon,\n lucideAlignJustify,\n lucideArrowDown,\n lucideArrowDownUp,\n lucideArrowLeft,\n lucideArrowRight,\n lucideArrowUp,\n lucideBadgeCheck,\n lucideBadgeInfo,\n lucideBadgeX,\n lucideBarcode,\n lucideBell,\n lucideBellMinus,\n lucideBellRing,\n lucideBookCheck,\n lucideBookOpen,\n lucideBookUp2,\n lucideBot,\n lucideBotMessageSquare,\n lucideBotOff,\n lucideBrain,\n lucideBrainCircuit,\n lucideBrainCog,\n lucideBox,\n lucideBriefcase,\n lucideBrushCleaning,\n lucideBuilding2,\n lucideCalculator,\n lucideCalendar,\n lucideCalendar1,\n lucideCalendarCheck,\n lucideCalendarFold,\n lucideCalendarRange,\n lucideCar,\n lucideChartBar,\n lucideChartBarStacked,\n lucideChartColumn,\n lucideChartColumnIncreasing,\n lucideChartLine,\n lucideChartPie,\n lucideCheck,\n lucideEllipsisVertical,\n lucideCheckCheck,\n lucideCheckCircle2,\n lucideCheckLine,\n lucideChevronDown,\n lucideChevronLeft,\n lucideChevronRight,\n lucideChevronsLeft,\n lucideChevronsRight,\n lucideChevronUp,\n lucideCircleAlert,\n lucideCircleCheck,\n lucideCircleCheckBig,\n lucideCircleX,\n lucideClipboardList,\n lucideClipboardPlus,\n lucideClock,\n lucideCloudCheck,\n lucideCode,\n lucideCog,\n lucideComponent,\n lucideCopy,\n lucideCreditCard,\n lucideCrown,\n lucideDatabase,\n lucideDatabaseBackup,\n lucideDollarSign,\n lucideEllipsis,\n lucideEye,\n lucideEyeOff,\n lucideFastForward,\n lucideFileCheck,\n lucideFileClock,\n lucideFileDown,\n lucideFilePenLine,\n lucideFilePlus,\n lucideFilePlus2,\n lucideFiles,\n lucideFileSpreadsheet,\n lucideFileSymlink,\n lucideFileText,\n lucideFileUp,\n lucideFlag,\n lucideFlagTriangleRight,\n lucideFilter,\n lucideFunnel,\n lucideFunnelX,\n lucideGlobe,\n lucideLanguages,\n lucideGraduationCap,\n lucideHardDriveDownload,\n lucideHeadphones,\n lucideHeart,\n lucideHospital,\n lucideHouse,\n lucideInbox,\n lucideInfo,\n lucideKey,\n lucideLayers,\n lucideLayers2,\n lucideLayoutDashboard,\n lucideLayoutGrid,\n lucideLightbulb,\n lucideLink,\n lucideListChecks,\n lucideListChevronsDownUp,\n lucideListChevronsUpDown,\n lucideListPlus,\n lucideLoader,\n lucideLoader2,\n lucideLoaderCircle,\n lucideLock,\n lucideLockKeyhole,\n lucideLockKeyholeOpen,\n lucideLogOut,\n lucideLogs,\n lucideMail,\n lucideMailCheck,\n lucideMailPlus,\n lucideMapPin,\n lucideMenu,\n lucideMessageCircle,\n lucideMessageCircleQuestion,\n lucideMessageSquareDot,\n lucideMessageSquareWarning,\n lucideMinus,\n lucideMonitor,\n lucideMoon,\n lucideMousePointer,\n lucideNetwork,\n lucideNotepadText,\n lucidePackage,\n lucidePackageOpen,\n lucidePalette,\n lucidePanelLeftClose,\n lucidePanelLeftOpen,\n lucidePanelRightOpen,\n lucidePaperclip,\n lucidePause,\n lucidePencil,\n lucidePhone,\n lucidePhoneCall,\n lucidePill,\n lucidePlus,\n lucidePrinter,\n lucideQrCode,\n lucideRadio,\n lucideRefreshCcw,\n lucideRefreshCwOff,\n lucideSave,\n lucideSaveAll,\n lucideScanLine,\n lucideScanQrCode,\n lucideSearch,\n lucideSend,\n lucideServer,\n lucideServerCrash,\n lucideSettings,\n lucideSettings2,\n lucideShield,\n lucideShieldCheck,\n lucideShoppingCart,\n lucideSlidersHorizontal,\n lucideSmartphone,\n lucideStar,\n lucideStethoscope,\n lucideStore,\n lucideSun,\n lucideTableOfContents,\n lucideTablet,\n lucideTarget,\n lucideTerminal,\n lucideTimer,\n lucideTrash2,\n lucideTrendingDown,\n lucideTrendingUp,\n lucideTriangleAlert,\n lucideTruck,\n lucideUser,\n lucideUserCheck,\n lucideUserLock,\n lucideUserPlus,\n lucideUserRoundPen,\n lucideUsers,\n lucideUsersRound,\n lucideVideo,\n lucideWallet,\n lucideWarehouse,\n lucideWifi,\n lucideWifiZero,\n lucideWorkflow,\n lucideWrench,\n lucideX,\n lucideXCircle,\n lucideZap,\n lucideBarChart,\n lucideFileOutput,\n lucideLayoutTemplate,\n lucideSquarePen,\n lucideCircleHelp,\n lucideMegaphone,\n lucideSquare,\n lucidePenTool,\n lucideRocket,\n lucideBarChart3,\n lucideCheckCircle,\n lucideFolderTree,\n lucideGrid3x3,\n lucideSliders,\n lucideUsers2,\n lucideFileEdit,\n lucideNavigation,\n lucideListFilter,\n lucideTextCursor,\n lucidePieChart,\n lucideFolders,\n lucideUserSearch,\n lucideSquareCheck,\n lucideCircleDot,\n lucideToggleLeft,\n lucideUpload,\n lucideUploadCloud,\n lucideDownload,\n lucideFile,\n lucideMusic,\n lucideFileCode,\n lucideFileJson,\n lucideFileArchive,\n lucideTable2,\n lucideGitBranch,\n lucideAlertTriangle,\n lucideBan,\n lucideBuilding,\n lucideType,\n lucidePercent,\n lucideReceipt,\n lucideClipboardPen,\n lucidePackageCheck,\n lucideShoppingBag,\n lucideTag,\n lucideTags,\n lucideTicket,\n lucideWand2,\n lucideZoomIn,\n lucideZoomOut,\n lucideBadge,\n lucideClipboardCopy,\n lucideContact,\n lucideIdCard,\n lucideRecycle,\n lucidePlug2,\n lucidePlug,\n lucideCpu,\n lucideDumbbell,\n lucideSparkle,\n lucideWandSparkles,\n lucideMessageSquareText,\n lucideMic,\n lucideAudioLines,\n lucidePlay,\n lucideSquarePlay,\n lucideUserSquare,\n lucideFolder,\n lucideHelpCircle,\n lucideMessageSquare,\n lucideHistory,\n lucideCalendarDays,\n lucideRefreshCw,\n lucideRotateCcw,\n lucideBanknote,\n lucideRedo,\n lucideUndo,\n lucidePackage2,\n} from '@ng-icons/lucide';\n\nexport const Z_ICONS = {\n lucideLayers2,\n lucideStore,\n lucideChartBarStacked,\n lucideBookCheck,\n lucideAlarmClock,\n lucideClipboardPlus,\n lucideSave,\n lucideSaveAll,\n lucideFlag,\n lucideFlagTriangleRight,\n lucideMessageSquareDot,\n lucideCheckCheck,\n lucideTriangleAlert,\n lucideMessageSquareWarning,\n lucideCheck,\n lucidePencil,\n lucideMail,\n lucideLayoutGrid,\n lucideArrowLeft,\n lucideArrowRight,\n lucideMenu,\n lucideLock,\n lucideLogOut,\n lucideUser,\n lucideSettings,\n lucidePill,\n lucideCalendarFold,\n lucideSettings2,\n lucideChevronLeft,\n lucideChevronRight,\n lucideChevronDown,\n lucidePlus,\n lucideSearch,\n lucideUsers,\n lucideEye,\n lucideEyeOff,\n lucideEllipsis,\n lucidePanelLeftClose,\n lucidePanelLeftOpen,\n lucideLayoutDashboard,\n lucideChartColumn,\n lucideUsersRound,\n lucideLogs,\n lucideChevronUp,\n lucideTrendingUp,\n lucidePackage,\n lucideShoppingCart,\n lucideUserCheck,\n lucideActivity,\n lucideZap,\n lucideMousePointer,\n lucideInfo,\n lucideLayers,\n lucideBriefcase,\n lucideTarget,\n lucideWorkflow,\n lucideWarehouse,\n lucideLoaderCircle,\n lucideChevronsLeft,\n lucideChevronsRight,\n lucideBellRing,\n lucideSlidersHorizontal,\n lucideTrash2,\n lucideFileDown,\n lucideFunnel,\n lucideAlignJustify,\n lucideX,\n lucideFiles,\n lucideCrown,\n lucideBadgeInfo,\n lucideMinus,\n lucideBox,\n lucideCog,\n lucideBellMinus,\n lucidePackageOpen,\n lucideInbox,\n lucideClock,\n lucideBookOpen,\n lucideCalendar,\n lucideCalculator,\n lucideClipboardList,\n lucideDatabase,\n lucideDollarSign,\n lucideFileText,\n lucideGraduationCap,\n lucideHeart,\n lucideHospital,\n lucideMapPin,\n lucideMonitor,\n lucidePhone,\n lucideShield,\n lucideStar,\n lucideStethoscope,\n lucideTimer,\n lucideTrendingDown,\n lucideUserPlus,\n lucideVideo,\n lucideWallet,\n lucideWrench,\n lucideBuilding2,\n lucideCar,\n lucideCreditCard,\n lucideFileSpreadsheet,\n lucideGlobe,\n lucideLanguages,\n lucideHeadphones,\n lucideKey,\n lucideLightbulb,\n lucideMailCheck,\n lucideNetwork,\n lucidePalette,\n lucidePhoneCall,\n lucidePrinter,\n lucideRadio,\n lucideServer,\n lucideServerCrash,\n lucideSmartphone,\n lucideTablet,\n lucideTerminal,\n lucideTruck,\n lucideWifi,\n lucideRefreshCcw,\n lucideLockKeyhole,\n lucideArrowDown,\n lucideArrowUp,\n lucideUserLock,\n lucideCircleCheck,\n lucideHouse,\n lucideChartBar,\n lucideChartPie,\n lucideChartLine,\n lucideCalendarRange,\n lucideCalendar1,\n lucideCalendarCheck,\n lucideNotepadText,\n lucideFileUp,\n lucideTableOfContents,\n lucideBot,\n lucideSend,\n lucidePause,\n lucidePaperclip,\n saxPauseBold,\n lucideCopy,\n lucideUserRoundPen,\n lucideFilePenLine,\n lucideArrowDownUp,\n lucideCircleX,\n lucideCheckLine,\n lucideBadgeCheck,\n lucideShieldCheck,\n lucideCircleCheckBig,\n lucideBadgeX,\n lucideLockKeyholeOpen,\n lucideFileSymlink,\n lucideWifiZero,\n lucideCloudCheck,\n lucideMailPlus,\n lucideHardDriveDownload,\n saxCloudChangeBold,\n saxRefreshBold,\n lucideBarcode,\n lucideCode,\n lucideScanQrCode,\n lucideQrCode,\n lucideScanLine,\n lucideListPlus,\n lucideFilePlus,\n lucideFilePlus2,\n lucideBookUp2,\n lucideFileClock,\n lucideRefreshCwOff,\n lucideListChecks,\n lucideFastForward,\n lucideBrushCleaning,\n lucideChartColumnIncreasing,\n lucideBell,\n lucideCheckCircle2,\n lucideAlertCircle,\n lucideXCircle,\n lucideLink,\n lucideDatabaseBackup,\n lucideFileCheck,\n lucideListChevronsDownUp,\n lucideListChevronsUpDown,\n lucideSun,\n lucideMoon,\n lucideLoader,\n lucideAlertOctagon,\n lucideMessageCircle,\n lucideCircleAlert,\n lucideMessageCircleQuestion,\n lucideComponent,\n lucidePanelRightOpen,\n lucideLoader2,\n lucideGithub,\n lucideLifeBuoy,\n lucideCloud,\n lucideBarChart,\n lucideHome,\n lucideFolderOpen,\n lucideSquarePen,\n lucideLayoutTemplate,\n lucideFileOutput,\n lucideCircleHelp,\n lucideGripHorizontal,\n lucideImage,\n lucideList,\n lucideHash,\n lucideMegaphone,\n lucidePenTool,\n lucideSquare,\n lucideRocket,\n lucideBarChart3,\n lucideUsers2,\n lucideGrid3x3,\n lucideFolderTree,\n lucideCheckCircle,\n lucideSliders,\n lucideFileEdit,\n lucideNavigation,\n lucideListFilter,\n lucideTextCursor,\n lucidePieChart,\n lucideUserSearch,\n lucideFolders,\n lucideSparkles,\n lucideSquareCheck,\n lucideCircleDot,\n lucideToggleLeft,\n lucideUpload,\n lucideUploadCloud,\n lucideDownload,\n lucideFile,\n lucideMusic,\n lucideFileCode,\n lucideFileJson,\n lucideFileArchive,\n lucideTable2,\n lucideGripVertical,\n lucidePin,\n lucideSearchX,\n lucideMoreVertical,\n lucideGitBranch,\n lucideAlertTriangle,\n lucideFilter,\n lucideFunnelX,\n lucideBan,\n lucideBuilding,\n lucideType,\n lucidePercent,\n lucideReceipt,\n lucideClipboardPen,\n lucidePackageCheck,\n lucideShoppingBag,\n lucideTag,\n lucideTags,\n lucideTicket,\n lucideWand2,\n lucideZoomIn,\n lucideZoomOut,\n lucideBadge,\n lucideClipboardCopy,\n lucideContact,\n lucideIdCard,\n lucideRecycle,\n lucidePlug,\n lucidePlug2,\n lucideBotMessageSquare,\n lucideBotOff,\n lucideBrain,\n lucideBrainCircuit,\n lucideBrainCog,\n lucideCpu,\n lucideDumbbell,\n lucideSparkle,\n lucideWandSparkles,\n lucideMessageSquareText,\n lucideMic,\n lucideAudioLines,\n lucidePlay,\n lucideSquarePlay,\n lucideEllipsisVertical,\n saxEditOutline,\n lucideUserSquare,\n lucideCircle,\n lucideFolder,\n lucideHelpCircle,\n lucideCalendarDays,\n lucideMessageSquare,\n lucideHistory,\n lucideRefreshCw,\n lucideRotateCcw,\n lucideBanknote,\n lucideRedo,\n lucideUndo,\n lucidePackage2,\n lucideTestTube,\n} as const satisfies Record<string, IconType>;\n\nexport declare type ZIcon = keyof typeof Z_ICONS;\n","import { HttpClient } from '@angular/common/http';\nimport { type EnvironmentProviders, inject, isDevMode, makeEnvironmentProviders } from '@angular/core';\nimport { provideNgIconLoader, withCaching } from '@ng-icons/core';\nimport { ZIndexDbService } from '@shival99/z-ui/services';\nimport { catchError, from, map, type Observable, of, switchMap, tap } from 'rxjs';\nimport { Z_ICONS } from './z-icons';\n\nconst iconCacheDb = new ZIndexDbService({\n dbName: 'ZIconCache',\n version: 1,\n stores: [{ name: 'zIcons', encrypt: !isDevMode() }],\n defaultStore: 'zIcons',\n});\n\n/**\n * Normalizes Sax SVG to use currentColor and CSS variable for stroke-width.\n * This allows the icon to inherit color and strokeWidth from ng-icon props.\n */\nfunction normalizeSaxSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n const normalized = svg.replace(/fill=\"#292D32\"/gi, 'fill=\"currentColor\"');\n return normalized.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\n/**\n * Normalizes Lucide SVG to use CSS variable for stroke-width.\n * This allows ng-icon strokeWidth prop to work correctly.\n * Replaces hardcoded stroke-width with var(--ng-icon__stroke-width, 2).\n */\nfunction normalizeLucideSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n return svg.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\nfunction getFallbackIcon(name: string): string {\n const icon = Z_ICONS[name as keyof typeof Z_ICONS];\n if (icon) {\n // console.warn(`[ZIcon] Using bundled fallback for \"${name}\"`);\n return icon;\n }\n return '';\n}\n\n/**\n * Converts ng-icons icon name to Lucide CDN format.\n * Examples:\n * - lucideArrowLeft -> arrow-left\n * - lucideAlertCircle -> alert-circle\n * - lucideTrash2 -> trash-2\n * - lucideGrid3x3 -> grid-3-x-3\n */\nfunction convertLucideIconName(name: string): string {\n return name\n .replace(/^lucide/, '')\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .replace(/(\\d)([a-z])/g, '$1-$2')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n}\n\n/**\n * Converts ng-icons Sax icon name to CDN format.\n * Examples:\n * - saxCloudChangeBold -> bold/cloud-change\n * - saxPauseBold -> bold/pause\n * - saxRefreshBold -> bold/refresh\n * - saxHomeOutline -> outline/home\n * - saxUserLinear -> linear/user\n */\nfunction convertIconSaxIconName(name: string): { style: string; iconName: string } | null {\n let iconPart = name.replace(/^sax/, '');\n // Extract style suffix (Bold, Outline, Linear, Bulk, Broken, TwoTone)\n const styleMatch = iconPart.match(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i);\n if (!styleMatch) {\n return null;\n }\n\n const style = styleMatch[1].toLowerCase();\n const styleFolder = style === 'twotone' ? 'twotone' : style;\n iconPart = iconPart.replace(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i, '');\n const iconName = iconPart\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n\n return { style: styleFolder, iconName };\n}\n\nconst LUCIDE_CDN_URL = 'https://cdn.jsdelivr.net/npm/lucide-static@latest/icons';\nconst SAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@main/src/Base';\n\n/**\n * Provides hybrid icon loading from CDN with fallback to bundled icons:\n * - Primary: Load icons from CDN (Lucide & Iconsax)\n * - Fallback: Use bundled icons from Z_ICONS if CDN fails\n *\n * @example\n * ```typescript\n * // app.config.ts\n * providers: [\n * provideHttpClient(),\n * provideZIconLoader(),\n * ]\n * ```\n */\nfunction loadWithCache(\n name: string,\n url: string,\n http: HttpClient,\n normalizer: (svg: string) => string\n): Observable<string> {\n return from(iconCacheDb.get<string>(name)).pipe(\n switchMap(cached => {\n if (cached) {\n return of(cached);\n }\n\n return http.get(url, { responseType: 'text' }).pipe(\n map(normalizer),\n tap(svg => {\n void iconCacheDb.set(name, svg);\n }),\n catchError(error => {\n console.error(`[ZIcon] Failed to load \"${name}\" from ${url}`, error);\n return of(getFallbackIcon(name));\n })\n );\n }),\n catchError(() => of(getFallbackIcon(name)))\n );\n}\n\nexport function provideZIconLoader(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideNgIconLoader(name => {\n const http = inject(HttpClient);\n if (name.startsWith('sax')) {\n const parsed = convertIconSaxIconName(name);\n if (!parsed) {\n console.warn(`[ZIcon] Invalid Sax icon name: \"${name}\"`);\n return of(getFallbackIcon(name));\n }\n\n const url = `${SAX_CDN_URL}/${parsed.style}/${parsed.iconName}.svg`;\n return loadWithCache(name, url, http, normalizeSaxSvg);\n }\n\n if (name.startsWith('lucide')) {\n const iconName = convertLucideIconName(name);\n const url = `${LUCIDE_CDN_URL}/${iconName}.svg`;\n return loadWithCache(name, url, http, normalizeLucideSvg);\n }\n\n // console.warn(`[ZIcon] Unknown icon: \"${name}\"`);\n return of(getFallbackIcon(name));\n }, withCaching()),\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgIcon"],"mappings":";;;;;;;;;;;;AAEO,MAAM,aAAa,GAAG,GAAG,CAAC,EAAE,EAAE;AACnC,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,E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IAAI,CAAC,CAAC;gBAClC;AAEA,gBAAA,MAAM,GAAG,GAAG,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,MAAM,CAAC,KAAK,CAAA,CAAA,EAAI,MAAM,CAAC,QAAQ,MAAM;gBACnE,OAAO,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,eAAe,CAAC;YACxD;AAEA,YAAA,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AAC7B,gBAAA,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC5C,gBAAA,MAAM,GAAG,GAAG,CAAA,EAAG,cAAc,CAAA,CAAA,EAAI,QAAQ,MAAM;gBAC/C,OAAO,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,kBAAkB,CAAC;YAC3D;;AAGA,YAAA,OAAO,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC,EAAE,WAAW,EAAE,CAAC;AAClB,KAAA,CAAC;AACJ;;ACjKA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-icon.mjs","sources":["../../../../libs/core-ui/components/z-icon/z-icon-cache.ts","../../../../libs/core-ui/components/z-icon/z-icon.variants.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.html","../../../../libs/core-ui/components/z-icon/z-icons.ts","../../../../libs/core-ui/components/z-icon/z-icon-loader.provider.ts","../../../../libs/core-ui/components/z-icon/shival99-z-ui-components-z-icon.ts"],"sourcesContent":["import { isDevMode } from '@angular/core';\nimport { ZIndexDbService } from '@shival99/z-ui/services';\n\nexport const Z_ICON_CACHE_DB_NAME = 'ZIconCache';\nexport const Z_ICON_CACHE_STORE = 'zIcons';\n\nexport const zIconCacheDb = new ZIndexDbService({\n dbName: Z_ICON_CACHE_DB_NAME,\n version: 1,\n stores: [{ name: Z_ICON_CACHE_STORE, encrypt: !isDevMode() }],\n defaultStore: Z_ICON_CACHE_STORE,\n});\n","import { cva, type VariantProps } from 'class-variance-authority';\n\nconst zIconSizeVariants = Object.fromEntries(\n Array.from({ length: 100 - 10 + 1 }, (_, index) => {\n const size = String(10 + index);\n return [size, `size-${size}`];\n })\n);\n\nexport const zIconVariants = cva('', {\n variants: {\n zSize: zIconSizeVariants,\n },\n defaultVariants: {\n zSize: '16',\n },\n});\n\nexport type ZIconSize = `${number}`;\nexport type ZIconVariants = VariantProps<typeof zIconVariants>;\n","import { ChangeDetectionStrategy, Component, computed, effect, input, signal, ViewEncapsulation } from '@angular/core';\nimport { NgIconComponent as NgIcon } from '@ng-icons/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { Z_ICON_CACHE_STORE, zIconCacheDb } from './z-icon-cache';\nimport { zIconVariants, type ZIconVariants } from './z-icon.variants';\nimport { type ZIcon } from './z-icons';\n\n@Component({\n selector: 'z-icon, [z-icon]',\n imports: [NgIcon],\n standalone: true,\n templateUrl: './z-icon.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n '[style.width]': 'normalizedSize() + \"px\"',\n '[style.height]': 'normalizedSize() + \"px\"',\n },\n})\nexport class ZIconComponent {\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZIcon>();\n public readonly zSize = input<ZIconVariants['zSize']>('16');\n public readonly zStrokeWidth = input<number>(2);\n public readonly zSvg = input<string>('');\n protected readonly resolvedSvg = signal('');\n protected readonly normalizedSize = computed(() => {\n const size = this.zSize();\n if (size === null || size === undefined || size === '') {\n return '16';\n }\n\n return String(size);\n });\n\n private readonly _svgFetchError = signal<string>('');\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zIconVariants({ zSize: this.zSize() }),\n this.class(),\n this.zStrokeWidth() === 0 ? 'stroke-none' : '',\n 'inline-flex shrink-0'\n )\n );\n\n constructor() {\n effect(onCleanup => {\n const svgInput = this.zSvg().trim();\n if (!svgInput) {\n this.resolvedSvg.set('');\n this._svgFetchError.set('');\n return;\n }\n\n if (this._isRawSvg(svgInput)) {\n this.resolvedSvg.set(this._normalizeCustomSvg(svgInput));\n this._svgFetchError.set('');\n return;\n }\n\n if (!this._isSvgPath(svgInput)) {\n this.resolvedSvg.set('');\n this._svgFetchError.set('Unsupported SVG input format.');\n return;\n }\n\n const controller = new AbortController();\n onCleanup(() => controller.abort());\n\n const cacheKey = `zsvg:path:${svgInput}`;\n void zIconCacheDb\n .get<string>(cacheKey, { storeName: Z_ICON_CACHE_STORE })\n .then(cachedSvg => {\n if (controller.signal.aborted) {\n return null;\n }\n if (cachedSvg && this._isRawSvg(cachedSvg.trim())) {\n this.resolvedSvg.set(this._normalizeCustomSvg(cachedSvg));\n this._svgFetchError.set('');\n return null;\n }\n\n return fetch(svgInput, { signal: controller.signal }).then(response => {\n if (!response.ok) {\n throw new Error(`Failed to fetch SVG from \"${svgInput}\"`);\n }\n return response.text();\n });\n })\n .then(svgContent => {\n if (controller.signal.aborted || !svgContent) {\n return;\n }\n\n if (!this._isRawSvg(svgContent.trim())) {\n throw new Error(`Invalid SVG content loaded from \"${svgInput}\"`);\n }\n\n const normalizedSvg = this._normalizeCustomSvg(svgContent);\n this.resolvedSvg.set(normalizedSvg);\n this._svgFetchError.set('');\n void zIconCacheDb.set(cacheKey, normalizedSvg, { storeName: Z_ICON_CACHE_STORE }).catch(console.error);\n })\n .catch(error => {\n if (controller.signal.aborted) {\n return;\n }\n console.error('[z-icon] Failed to load zSvg path:', error);\n this.resolvedSvg.set('');\n this._svgFetchError.set('Unable to load SVG path.');\n });\n });\n }\n\n private _isRawSvg(value: string): boolean {\n return value.startsWith('<svg');\n }\n\n private _isSvgPath(value: string): boolean {\n return value.endsWith('.svg') || value.includes('/');\n }\n\n private _normalizeCustomSvg(svg: string): string {\n try {\n const parser = new DOMParser();\n const doc = parser.parseFromString(svg, 'image/svg+xml');\n const svgEl = doc.documentElement;\n if (svgEl.tagName.toLowerCase() !== 'svg') {\n return svg;\n }\n\n const width = svgEl.getAttribute('width');\n const height = svgEl.getAttribute('height');\n if (\n !svgEl.getAttribute('viewBox') &&\n width &&\n height &&\n !Number.isNaN(Number(width)) &&\n !Number.isNaN(Number(height))\n ) {\n svgEl.setAttribute('viewBox', `0 0 ${width} ${height}`);\n }\n\n svgEl.removeAttribute('width');\n svgEl.removeAttribute('height');\n\n const allNodes = [svgEl, ...Array.from(svgEl.querySelectorAll('*'))];\n allNodes.forEach(node => {\n const fill = node.getAttribute('fill');\n if (fill && fill !== 'none' && fill !== 'currentColor') {\n node.setAttribute('fill', 'currentColor');\n }\n\n const stroke = node.getAttribute('stroke');\n if (stroke && stroke !== 'none' && stroke !== 'currentColor') {\n node.setAttribute('stroke', 'currentColor');\n }\n\n if (node.hasAttribute('stroke-width')) {\n node.removeAttribute('stroke-width');\n const currentStyle = node.getAttribute('style') ?? '';\n const normalizedStyle = currentStyle.trim();\n const strokeWidthStyle = 'stroke-width: var(--ng-icon__stroke-width, 2)';\n node.setAttribute('style', normalizedStyle ? `${normalizedStyle}; ${strokeWidthStyle}` : strokeWidthStyle);\n }\n });\n\n return svgEl.outerHTML;\n } catch {\n return svg;\n }\n }\n}\n","@if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n","import { type IconType } from '@ng-icons/core';\nimport type * as saxBoldIcons from '@ng-icons/iconsax/bold';\nimport type * as saxOutlineIcons from '@ng-icons/iconsax/outline';\nimport type * as lucideIcons from '@ng-icons/lucide';\n\ntype ZLucideIcon = Extract<keyof typeof lucideIcons, `lucide${string}`>;\ntype ZSaxIcon = Extract<keyof typeof saxBoldIcons | keyof typeof saxOutlineIcons, `sax${string}`>;\n\nexport const Z_ICONS = {} as const satisfies Record<string, IconType>;\n\nexport type ZIcon = ZLucideIcon | ZSaxIcon;\n","import { HttpClient } from '@angular/common/http';\nimport { type EnvironmentProviders, inject, makeEnvironmentProviders } from '@angular/core';\nimport { provideNgIconLoader, withCaching } from '@ng-icons/core';\nimport { catchError, from, map, type Observable, of, switchMap, tap } from 'rxjs';\nimport { Z_ICON_CACHE_STORE, zIconCacheDb } from './z-icon-cache';\nimport { Z_ICONS } from './z-icons';\n\n/**\n * Normalizes Sax SVG to use currentColor and CSS variable for stroke-width.\n * This allows the icon to inherit color and strokeWidth from ng-icon props.\n */\nfunction normalizeSaxSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n const normalized = svg.replace(/fill=\"#292D32\"/gi, 'fill=\"currentColor\"');\n return normalized.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\n/**\n * Normalizes Lucide SVG to use CSS variable for stroke-width.\n * This allows ng-icon strokeWidth prop to work correctly.\n * Replaces hardcoded stroke-width with var(--ng-icon__stroke-width, 2).\n */\nfunction normalizeLucideSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n return svg.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\nfunction getFallbackIcon(name: string): string {\n const icon = Z_ICONS[name as keyof typeof Z_ICONS];\n if (icon) {\n // console.warn(`[ZIcon] Using bundled fallback for \"${name}\"`);\n return icon;\n }\n return '';\n}\n\n/**\n * Converts ng-icons icon name to Lucide CDN format.\n * Examples:\n * - lucideArrowLeft -> arrow-left\n * - lucideAlertCircle -> alert-circle\n * - lucideTrash2 -> trash-2\n * - lucideGrid3x3 -> grid-3-x-3\n */\nfunction convertLucideIconName(name: string): string {\n return name\n .replace(/^lucide/, '')\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .replace(/(\\d)([a-z])/g, '$1-$2')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n}\n\n/**\n * Converts ng-icons Sax icon name to CDN format.\n * Examples:\n * - saxCloudChangeBold -> bold/cloud-change\n * - saxPauseBold -> bold/pause\n * - saxRefreshBold -> bold/refresh\n * - saxHomeOutline -> outline/home\n * - saxUserLinear -> linear/user\n */\nfunction convertIconSaxIconName(name: string): { style: string; iconName: string } | null {\n let iconPart = name.replace(/^sax/, '');\n // Extract style suffix (Bold, Outline, Linear, Bulk, Broken, TwoTone)\n const styleMatch = iconPart.match(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i);\n if (!styleMatch) {\n return null;\n }\n\n const style = styleMatch[1].toLowerCase();\n const styleFolder = style === 'twotone' ? 'twotone' : style;\n iconPart = iconPart.replace(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i, '');\n const iconName = iconPart\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n\n return { style: styleFolder, iconName };\n}\n\nconst LUCIDE_CDN_URL = 'https://cdn.jsdelivr.net/npm/lucide-static@latest/icons';\nconst SAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@main/src/Base';\n\n/**\n * Provides hybrid icon loading from CDN with fallback to bundled icons:\n * - Primary: Load icons from CDN (Lucide & Iconsax)\n * - Fallback: Use bundled icons from Z_ICONS if CDN fails\n *\n * @example\n * ```typescript\n * // app.config.ts\n * providers: [\n * provideHttpClient(),\n * provideZIconLoader(),\n * ]\n * ```\n */\nfunction loadWithCache(\n name: string,\n url: string,\n http: HttpClient,\n normalizer: (svg: string) => string\n): Observable<string> {\n return from(zIconCacheDb.get<string>(name, { storeName: Z_ICON_CACHE_STORE })).pipe(\n switchMap(cached => {\n if (cached) {\n return of(cached);\n }\n\n return http.get(url, { responseType: 'text' }).pipe(\n map(normalizer),\n tap(svg => {\n void zIconCacheDb.set(name, svg, { storeName: Z_ICON_CACHE_STORE });\n }),\n catchError(error => {\n console.error(`[ZIcon] Failed to load \"${name}\" from ${url}`, error);\n return of(getFallbackIcon(name));\n })\n );\n }),\n catchError(() => of(getFallbackIcon(name)))\n );\n}\n\nexport function provideZIconLoader(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideNgIconLoader(name => {\n const http = inject(HttpClient);\n if (name.startsWith('sax')) {\n const parsed = convertIconSaxIconName(name);\n if (!parsed) {\n console.warn(`[ZIcon] Invalid Sax icon name: \"${name}\"`);\n return of(getFallbackIcon(name));\n }\n\n const url = `${SAX_CDN_URL}/${parsed.style}/${parsed.iconName}.svg`;\n return loadWithCache(name, url, http, normalizeSaxSvg);\n }\n\n if (name.startsWith('lucide')) {\n const iconName = convertLucideIconName(name);\n const url = `${LUCIDE_CDN_URL}/${iconName}.svg`;\n return loadWithCache(name, url, http, normalizeLucideSvg);\n }\n\n // console.warn(`[ZIcon] Unknown icon: \"${name}\"`);\n return of(getFallbackIcon(name));\n }, withCaching()),\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgIcon"],"mappings":";;;;;;;;;AAGO,MAAM,oBAAoB,GAAG,YAAY;AACzC,MAAM,kBAAkB,GAAG,QAAQ;AAEnC,MAAM,YAAY,GAAG,IAAI,eAAe,CAAC;AAC9C,IAAA,MAAM,EAAE,oBAAoB;AAC5B,IAAA,OAAO,EAAE,CAAC;AACV,IAAA,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC;AAC7D,IAAA,YAAY,EAAE,kBAAkB;AACjC,CAAA,CAAC;;ACTF,MAAM,iBAAiB,GAAG,MAAM,CAAC,WAAW,CAC1C,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,KAAI;IAChD,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,GAAG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AAe,CAAC,IAAI,CAAC,CAAC;gBAClC;AAEA,gBAAA,MAAM,GAAG,GAAG,CAAA,EAAG,WAAW,CAAA,CAAA,EAAI,MAAM,CAAC,KAAK,CAAA,CAAA,EAAI,MAAM,CAAC,QAAQ,MAAM;gBACnE,OAAO,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,eAAe,CAAC;YACxD;AAEA,YAAA,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;AAC7B,gBAAA,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAC5C,gBAAA,MAAM,GAAG,GAAG,CAAA,EAAG,cAAc,CAAA,CAAA,EAAI,QAAQ,MAAM;gBAC/C,OAAO,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,kBAAkB,CAAC;YAC3D;;AAGA,YAAA,OAAO,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC,EAAE,WAAW,EAAE,CAAC;AAClB,KAAA,CAAC;AACJ;;AC1JA;;AAEG;;;;"}
|
|
@@ -4,6 +4,7 @@ import { inject, Injector, DestroyRef, viewChild, output, input, signal, compute
|
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { NgControl, NgModel, PristineChangeEvent, TouchedChangeEvent, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
+
import { hexToHsl, lightnessToSliderValue, DEFAULT_COLORS, BlossomColorPickerComponent } from '@dayflow/blossom-color-picker-angular';
|
|
7
8
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
8
9
|
import { ZIconComponent } from '@shival99/z-ui/components/z-icon';
|
|
9
10
|
import { ZToastService } from '@shival99/z-ui/components/z-toast';
|
|
@@ -25,7 +26,7 @@ const ERROR_HANDLERS = [
|
|
|
25
26
|
const getDefaultErrorInfo = (errors) => ERROR_HANDLERS.find(([key]) => errors[key])?.[1](errors) ?? { key: 'i18n_z_ui_input_pattern' };
|
|
26
27
|
|
|
27
28
|
const zInputVariants = cva([
|
|
28
|
-
'flex w-full rounded-[
|
|
29
|
+
'flex w-full rounded-[0.375rem] border border-input bg-white shadow-xs',
|
|
29
30
|
'transition-[border-color,box-shadow,background-color,color,opacity] duration-200',
|
|
30
31
|
'dark:bg-input/30 dark:border-input',
|
|
31
32
|
'file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',
|
|
@@ -51,7 +52,7 @@ const zInputVariants = cva([
|
|
|
51
52
|
},
|
|
52
53
|
});
|
|
53
54
|
const zTextareaVariants = cva([
|
|
54
|
-
'w-full rounded-[
|
|
55
|
+
'w-full rounded-[0.375rem] border border-input bg-white shadow-xs transition-colors duration-200',
|
|
55
56
|
'dark:bg-input/30 dark:border-input',
|
|
56
57
|
'outline-none',
|
|
57
58
|
'text-sm',
|
|
@@ -81,6 +82,7 @@ class ZInputComponent {
|
|
|
81
82
|
zOnFocus = output();
|
|
82
83
|
zOnKeydown = output();
|
|
83
84
|
zOnEnter = output();
|
|
85
|
+
zOnColorCollapse = output();
|
|
84
86
|
zControl = output();
|
|
85
87
|
zEvent = output();
|
|
86
88
|
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
@@ -119,6 +121,7 @@ class ZInputComponent {
|
|
|
119
121
|
zResize = input(true, { ...(ngDevMode ? { debugName: "zResize" } : {}), transform: zTransform });
|
|
120
122
|
zMaxLength = input(undefined, ...(ngDevMode ? [{ debugName: "zMaxLength" }] : []));
|
|
121
123
|
zAutoSuggest = input(undefined, ...(ngDevMode ? [{ debugName: "zAutoSuggest" }] : []));
|
|
124
|
+
zColorConfig = input({}, ...(ngDevMode ? [{ debugName: "zColorConfig" }] : []));
|
|
122
125
|
_value = signal(null, ...(ngDevMode ? [{ debugName: "_value" }] : []));
|
|
123
126
|
_disabled = signal(false, ...(ngDevMode ? [{ debugName: "_disabled" }] : []));
|
|
124
127
|
_formControl = signal(null, ...(ngDevMode ? [{ debugName: "_formControl" }] : []));
|
|
@@ -126,6 +129,12 @@ class ZInputComponent {
|
|
|
126
129
|
_isNgModel = signal(false, ...(ngDevMode ? [{ debugName: "_isNgModel" }] : []));
|
|
127
130
|
_asyncErrors = signal(new Map(), ...(ngDevMode ? [{ debugName: "_asyncErrors" }] : []));
|
|
128
131
|
_customError = signal(null, ...(ngDevMode ? [{ debugName: "_customError" }] : []));
|
|
132
|
+
_blossomColor = signal({
|
|
133
|
+
hue: 330,
|
|
134
|
+
saturation: 70,
|
|
135
|
+
alpha: 100,
|
|
136
|
+
layer: 'outer',
|
|
137
|
+
}, ...(ngDevMode ? [{ debugName: "_blossomColor" }] : []));
|
|
129
138
|
inputId = zUuid('z-input');
|
|
130
139
|
suggestHistory = signal([], ...(ngDevMode ? [{ debugName: "suggestHistory" }] : []));
|
|
131
140
|
suggestActiveIndex = signal(-1, ...(ngDevMode ? [{ debugName: "suggestActiveIndex" }] : []));
|
|
@@ -167,6 +176,51 @@ class ZInputComponent {
|
|
|
167
176
|
const val = this._value();
|
|
168
177
|
return val === null || val === undefined ? '' : String(val);
|
|
169
178
|
}, ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
|
|
179
|
+
normalizedColorValue = computed(() => this._normalizeHexColor(this._value()), ...(ngDevMode ? [{ debugName: "normalizedColorValue" }] : []));
|
|
180
|
+
blossomCoreBorderColor = computed(() => {
|
|
181
|
+
const color = this.normalizedColorValue();
|
|
182
|
+
if (color === '#FFFFFF' || color === '#000000') {
|
|
183
|
+
return 'var(--border)';
|
|
184
|
+
}
|
|
185
|
+
return color;
|
|
186
|
+
}, ...(ngDevMode ? [{ debugName: "blossomCoreBorderColor" }] : []));
|
|
187
|
+
blossomColor = this._blossomColor.asReadonly();
|
|
188
|
+
blossomCoreSize = computed(() => {
|
|
189
|
+
const size = this.zSize();
|
|
190
|
+
if (size === 'sm') {
|
|
191
|
+
return 22;
|
|
192
|
+
}
|
|
193
|
+
if (size === 'lg') {
|
|
194
|
+
return 30;
|
|
195
|
+
}
|
|
196
|
+
return 26;
|
|
197
|
+
}, ...(ngDevMode ? [{ debugName: "blossomCoreSize" }] : []));
|
|
198
|
+
blossomOptions = computed(() => {
|
|
199
|
+
const config = this.zColorConfig();
|
|
200
|
+
return {
|
|
201
|
+
defaultValue: config.defaultValue,
|
|
202
|
+
openOnHover: config.openOnHover ?? false,
|
|
203
|
+
initialExpanded: config.initialExpanded ?? false,
|
|
204
|
+
animationDuration: config.animationDuration ?? 300,
|
|
205
|
+
showAlphaSlider: config.showAlphaSlider ?? true,
|
|
206
|
+
showCoreColor: config.showCoreColor ?? true,
|
|
207
|
+
adaptivePositioning: config.adaptivePositioning ?? true,
|
|
208
|
+
sliderPosition: config.sliderPosition || 'bottom',
|
|
209
|
+
coreSize: config.coreSize ?? this.blossomCoreSize(),
|
|
210
|
+
petalSize: config.petalSize ?? 32,
|
|
211
|
+
};
|
|
212
|
+
}, ...(ngDevMode ? [{ debugName: "blossomOptions" }] : []));
|
|
213
|
+
blossomColors = computed(() => {
|
|
214
|
+
const customColors = this.zColorConfig().colors ?? [];
|
|
215
|
+
if (customColors.length > 0) {
|
|
216
|
+
return customColors;
|
|
217
|
+
}
|
|
218
|
+
const count = this.zColorConfig().count ?? 20;
|
|
219
|
+
if (!count || count < 1) {
|
|
220
|
+
return undefined;
|
|
221
|
+
}
|
|
222
|
+
return this._generateColorPalette(count);
|
|
223
|
+
}, ...(ngDevMode ? [{ debugName: "blossomColors" }] : []));
|
|
170
224
|
hasValue = computed(() => {
|
|
171
225
|
const value = this._value();
|
|
172
226
|
return value !== null && value !== undefined && value !== '';
|
|
@@ -325,6 +379,9 @@ class ZInputComponent {
|
|
|
325
379
|
}
|
|
326
380
|
writeValue(value) {
|
|
327
381
|
this._value.set(value);
|
|
382
|
+
if (this.zType() === 'color') {
|
|
383
|
+
this._syncBlossomColorFromHex(this._normalizeHexColor(value));
|
|
384
|
+
}
|
|
328
385
|
}
|
|
329
386
|
registerOnChange(fn) {
|
|
330
387
|
this._onChange = fn;
|
|
@@ -422,6 +479,10 @@ class ZInputComponent {
|
|
|
422
479
|
}
|
|
423
480
|
onModelChange(rawValue) {
|
|
424
481
|
let value = rawValue;
|
|
482
|
+
if (this.zType() === 'color' && typeof rawValue === 'string') {
|
|
483
|
+
value = this._normalizeHexColor(rawValue);
|
|
484
|
+
this._syncBlossomColorFromHex(value);
|
|
485
|
+
}
|
|
425
486
|
if (this.zType() === 'number' && typeof rawValue === 'string') {
|
|
426
487
|
const cleanValue = this._cleanNumberValue(rawValue);
|
|
427
488
|
value = cleanValue === '' ? null : parseFloat(cleanValue);
|
|
@@ -570,7 +631,7 @@ class ZInputComponent {
|
|
|
570
631
|
this.uiState.update(s => ({ ...s, passwordVisible: !s.passwordVisible }));
|
|
571
632
|
}
|
|
572
633
|
copyColorToClipboard() {
|
|
573
|
-
const colorValue =
|
|
634
|
+
const colorValue = this.normalizedColorValue();
|
|
574
635
|
void navigator.clipboard.writeText(colorValue).then(() => {
|
|
575
636
|
this.uiState.update(s => ({ ...s, colorCopied: true }));
|
|
576
637
|
this._toastService.success(`Copied ${colorValue}`);
|
|
@@ -579,6 +640,14 @@ class ZInputComponent {
|
|
|
579
640
|
}, 1500);
|
|
580
641
|
});
|
|
581
642
|
}
|
|
643
|
+
onBlossomColorChange(color) {
|
|
644
|
+
this._blossomColor.set(color);
|
|
645
|
+
this.onModelChange(color.hex);
|
|
646
|
+
}
|
|
647
|
+
onBlossomColorCollapse(color) {
|
|
648
|
+
this._blossomColor.set(color);
|
|
649
|
+
this.zOnColorCollapse.emit(color);
|
|
650
|
+
}
|
|
582
651
|
_emitControl() {
|
|
583
652
|
this.zControl.emit({
|
|
584
653
|
validate: () => this.validate(),
|
|
@@ -802,27 +871,81 @@ class ZInputComponent {
|
|
|
802
871
|
}
|
|
803
872
|
return errors;
|
|
804
873
|
}
|
|
874
|
+
_normalizeHexColor(value) {
|
|
875
|
+
const raw = String(value ?? '')
|
|
876
|
+
.trim()
|
|
877
|
+
.toUpperCase();
|
|
878
|
+
if (/^#[0-9A-F]{6}$/.test(raw)) {
|
|
879
|
+
return raw;
|
|
880
|
+
}
|
|
881
|
+
if (/^#[0-9A-F]{3}$/.test(raw)) {
|
|
882
|
+
const [r, g, b] = raw.slice(1).split('');
|
|
883
|
+
return `#${r}${r}${g}${g}${b}${b}`;
|
|
884
|
+
}
|
|
885
|
+
return '#000000';
|
|
886
|
+
}
|
|
887
|
+
_syncBlossomColorFromHex(hex) {
|
|
888
|
+
const { h, s, l } = hexToHsl(hex);
|
|
889
|
+
const current = this._blossomColor();
|
|
890
|
+
this._blossomColor.set({
|
|
891
|
+
hue: h,
|
|
892
|
+
saturation: lightnessToSliderValue(l),
|
|
893
|
+
lightness: l,
|
|
894
|
+
originalSaturation: s,
|
|
895
|
+
alpha: current.alpha,
|
|
896
|
+
layer: current.layer,
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
_generateColorPalette(count) {
|
|
900
|
+
const safeCount = Math.max(1, Math.floor(count));
|
|
901
|
+
const basePalette = [...DEFAULT_COLORS];
|
|
902
|
+
if (safeCount <= basePalette.length) {
|
|
903
|
+
if (safeCount === basePalette.length) {
|
|
904
|
+
return basePalette;
|
|
905
|
+
}
|
|
906
|
+
const step = basePalette.length / safeCount;
|
|
907
|
+
return Array.from({ length: safeCount }, (_, index) => basePalette[Math.floor(index * step)]);
|
|
908
|
+
}
|
|
909
|
+
const generated = [...basePalette];
|
|
910
|
+
const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
911
|
+
for (let index = basePalette.length; index < safeCount; index++) {
|
|
912
|
+
const phase = index - basePalette.length;
|
|
913
|
+
const hue = Math.round((phase * 137.508 + 17) % 360);
|
|
914
|
+
const saturation = clamp(Math.round(70 + 10 * Math.sin(phase * 0.7)), 58, 84);
|
|
915
|
+
const lightness = clamp(Math.round(55 + 8 * Math.cos(phase * 0.55)), 44, 66);
|
|
916
|
+
generated.push({ h: hue, s: saturation, l: lightness });
|
|
917
|
+
}
|
|
918
|
+
return generated.slice(0, safeCount);
|
|
919
|
+
}
|
|
805
920
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
806
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZInputComponent, isStandalone: true, selector: "z-input", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zAlign: { classPropertyName: "zAlign", publicName: "zAlign", isSignal: true, isRequired: false, transformFunction: null }, zLabel: { classPropertyName: "zLabel", publicName: "zLabel", isSignal: true, isRequired: false, transformFunction: null }, zLabelClass: { classPropertyName: "zLabelClass", publicName: "zLabelClass", isSignal: true, isRequired: false, transformFunction: null }, zPlaceholder: { classPropertyName: "zPlaceholder", publicName: "zPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zRequired: { classPropertyName: "zRequired", publicName: "zRequired", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zReadonly: { classPropertyName: "zReadonly", publicName: "zReadonly", isSignal: true, isRequired: false, transformFunction: null }, zPrefix: { classPropertyName: "zPrefix", publicName: "zPrefix", isSignal: true, isRequired: false, transformFunction: null }, zSuffix: { classPropertyName: "zSuffix", publicName: "zSuffix", isSignal: true, isRequired: false, transformFunction: null }, zMin: { classPropertyName: "zMin", publicName: "zMin", isSignal: true, isRequired: false, transformFunction: null }, zMax: { classPropertyName: "zMax", publicName: "zMax", isSignal: true, isRequired: false, transformFunction: null }, zStep: { classPropertyName: "zStep", publicName: "zStep", isSignal: true, isRequired: false, transformFunction: null }, zShowArrows: { classPropertyName: "zShowArrows", publicName: "zShowArrows", isSignal: true, isRequired: false, transformFunction: null }, zMask: { classPropertyName: "zMask", publicName: "zMask", isSignal: true, isRequired: false, transformFunction: null }, zDecimalPlaces: { classPropertyName: "zDecimalPlaces", publicName: "zDecimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, zAllowNegative: { classPropertyName: "zAllowNegative", publicName: "zAllowNegative", isSignal: true, isRequired: false, transformFunction: null }, zThousandSeparator: { classPropertyName: "zThousandSeparator", publicName: "zThousandSeparator", isSignal: true, isRequired: false, transformFunction: null }, zDecimalMarker: { classPropertyName: "zDecimalMarker", publicName: "zDecimalMarker", isSignal: true, isRequired: false, transformFunction: null }, zValidators: { classPropertyName: "zValidators", publicName: "zValidators", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidators: { classPropertyName: "zAsyncValidators", publicName: "zAsyncValidators", isSignal: true, isRequired: false, transformFunction: null }, zAsyncDebounce: { classPropertyName: "zAsyncDebounce", publicName: "zAsyncDebounce", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidateOn: { classPropertyName: "zAsyncValidateOn", publicName: "zAsyncValidateOn", isSignal: true, isRequired: false, transformFunction: null }, zShowPasswordToggle: { classPropertyName: "zShowPasswordToggle", publicName: "zShowPasswordToggle", isSignal: true, isRequired: false, transformFunction: null }, zSearch: { classPropertyName: "zSearch", publicName: "zSearch", isSignal: true, isRequired: false, transformFunction: null }, zDebounce: { classPropertyName: "zDebounce", publicName: "zDebounce", isSignal: true, isRequired: false, transformFunction: null }, zAutofocus: { classPropertyName: "zAutofocus", publicName: "zAutofocus", isSignal: true, isRequired: false, transformFunction: null }, zAutoComplete: { classPropertyName: "zAutoComplete", publicName: "zAutoComplete", isSignal: true, isRequired: false, transformFunction: null }, zAllowClear: { classPropertyName: "zAllowClear", publicName: "zAllowClear", isSignal: true, isRequired: false, transformFunction: null }, zAutoSizeContent: { classPropertyName: "zAutoSizeContent", publicName: "zAutoSizeContent", isSignal: true, isRequired: false, transformFunction: null }, zRows: { classPropertyName: "zRows", publicName: "zRows", isSignal: true, isRequired: false, transformFunction: null }, zResize: { classPropertyName: "zResize", publicName: "zResize", isSignal: true, isRequired: false, transformFunction: null }, zMaxLength: { classPropertyName: "zMaxLength", publicName: "zMaxLength", isSignal: true, isRequired: false, transformFunction: null }, zAutoSuggest: { classPropertyName: "zAutoSuggest", publicName: "zAutoSuggest", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnSearch: "zOnSearch", zOnChange: "zOnChange", zOnBlur: "zOnBlur", zOnFocus: "zOnFocus", zOnKeydown: "zOnKeydown", zOnEnter: "zOnEnter", zControl: "zControl", zEvent: "zEvent" }, providers: [
|
|
921
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZInputComponent, isStandalone: true, selector: "z-input", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zAlign: { classPropertyName: "zAlign", publicName: "zAlign", isSignal: true, isRequired: false, transformFunction: null }, zLabel: { classPropertyName: "zLabel", publicName: "zLabel", isSignal: true, isRequired: false, transformFunction: null }, zLabelClass: { classPropertyName: "zLabelClass", publicName: "zLabelClass", isSignal: true, isRequired: false, transformFunction: null }, zPlaceholder: { classPropertyName: "zPlaceholder", publicName: "zPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zRequired: { classPropertyName: "zRequired", publicName: "zRequired", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zReadonly: { classPropertyName: "zReadonly", publicName: "zReadonly", isSignal: true, isRequired: false, transformFunction: null }, zPrefix: { classPropertyName: "zPrefix", publicName: "zPrefix", isSignal: true, isRequired: false, transformFunction: null }, zSuffix: { classPropertyName: "zSuffix", publicName: "zSuffix", isSignal: true, isRequired: false, transformFunction: null }, zMin: { classPropertyName: "zMin", publicName: "zMin", isSignal: true, isRequired: false, transformFunction: null }, zMax: { classPropertyName: "zMax", publicName: "zMax", isSignal: true, isRequired: false, transformFunction: null }, zStep: { classPropertyName: "zStep", publicName: "zStep", isSignal: true, isRequired: false, transformFunction: null }, zShowArrows: { classPropertyName: "zShowArrows", publicName: "zShowArrows", isSignal: true, isRequired: false, transformFunction: null }, zMask: { classPropertyName: "zMask", publicName: "zMask", isSignal: true, isRequired: false, transformFunction: null }, zDecimalPlaces: { classPropertyName: "zDecimalPlaces", publicName: "zDecimalPlaces", isSignal: true, isRequired: false, transformFunction: null }, zAllowNegative: { classPropertyName: "zAllowNegative", publicName: "zAllowNegative", isSignal: true, isRequired: false, transformFunction: null }, zThousandSeparator: { classPropertyName: "zThousandSeparator", publicName: "zThousandSeparator", isSignal: true, isRequired: false, transformFunction: null }, zDecimalMarker: { classPropertyName: "zDecimalMarker", publicName: "zDecimalMarker", isSignal: true, isRequired: false, transformFunction: null }, zValidators: { classPropertyName: "zValidators", publicName: "zValidators", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidators: { classPropertyName: "zAsyncValidators", publicName: "zAsyncValidators", isSignal: true, isRequired: false, transformFunction: null }, zAsyncDebounce: { classPropertyName: "zAsyncDebounce", publicName: "zAsyncDebounce", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidateOn: { classPropertyName: "zAsyncValidateOn", publicName: "zAsyncValidateOn", isSignal: true, isRequired: false, transformFunction: null }, zShowPasswordToggle: { classPropertyName: "zShowPasswordToggle", publicName: "zShowPasswordToggle", isSignal: true, isRequired: false, transformFunction: null }, zSearch: { classPropertyName: "zSearch", publicName: "zSearch", isSignal: true, isRequired: false, transformFunction: null }, zDebounce: { classPropertyName: "zDebounce", publicName: "zDebounce", isSignal: true, isRequired: false, transformFunction: null }, zAutofocus: { classPropertyName: "zAutofocus", publicName: "zAutofocus", isSignal: true, isRequired: false, transformFunction: null }, zAutoComplete: { classPropertyName: "zAutoComplete", publicName: "zAutoComplete", isSignal: true, isRequired: false, transformFunction: null }, zAllowClear: { classPropertyName: "zAllowClear", publicName: "zAllowClear", isSignal: true, isRequired: false, transformFunction: null }, zAutoSizeContent: { classPropertyName: "zAutoSizeContent", publicName: "zAutoSizeContent", isSignal: true, isRequired: false, transformFunction: null }, zRows: { classPropertyName: "zRows", publicName: "zRows", isSignal: true, isRequired: false, transformFunction: null }, zResize: { classPropertyName: "zResize", publicName: "zResize", isSignal: true, isRequired: false, transformFunction: null }, zMaxLength: { classPropertyName: "zMaxLength", publicName: "zMaxLength", isSignal: true, isRequired: false, transformFunction: null }, zAutoSuggest: { classPropertyName: "zAutoSuggest", publicName: "zAutoSuggest", isSignal: true, isRequired: false, transformFunction: null }, zColorConfig: { classPropertyName: "zColorConfig", publicName: "zColorConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnSearch: "zOnSearch", zOnChange: "zOnChange", zOnBlur: "zOnBlur", zOnFocus: "zOnFocus", zOnKeydown: "zOnKeydown", zOnEnter: "zOnEnter", zOnColorCollapse: "zOnColorCollapse", zControl: "zControl", zEvent: "zEvent" }, providers: [
|
|
807
922
|
provideNgxMask(),
|
|
808
923
|
{
|
|
809
924
|
provide: NG_VALUE_ACCESSOR,
|
|
810
925
|
useExisting: forwardRef(() => ZInputComponent),
|
|
811
926
|
multi: true,
|
|
812
927
|
},
|
|
813
|
-
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], exportAs: ["zInput"], ngImport: i0, template: "<div class=\"z-input-wrapper flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"inputId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() | translate }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n @if (typeConfig().isTextarea) {\n <div class=\"relative w-full\" [class]=\"textareaClasses()\" [class.overflow-auto]=\"zAutoSizeContent()\">\n <textarea\n #inputEl\n [id]=\"inputId\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground m-0 block min-h-14 w-full resize-none bg-transparent p-2 text-sm outline-none\"\n [class.resize-y]=\"zResize() && !isDisabled() && !zReadonly()\"\n [class.field-sizing-content]=\"zAutoSizeContent()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"zReadonly()\"\n [autocomplete]=\"zAutoComplete()\"\n [rows]=\"zRows()\"\n [attr.maxlength]=\"zMaxLength()\"\n [ngModel]=\"displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"></textarea>\n @if (zMaxLength()) {\n <div class=\"flex justify-end pr-1 pb-1\">\n <span class=\"text-muted-foreground text-xs\">{{ displayValue().length }} / {{ zMaxLength() }}</span>\n </div>\n }\n @if (zResize() && !isDisabled() && !zReadonly() && !zMaxLength()) {\n <svg\n class=\"text-muted-foreground pointer-events-none absolute right-0.5 bottom-0.5 opacity-40\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\">\n <path d=\"M10 2L2 10\" />\n <path d=\"M10 6L6 10\" />\n </svg>\n }\n </div>\n } @else {\n <div class=\"relative w-full\">\n <div class=\"z-input-container flex w-full items-center\" [class]=\"inputClasses()\">\n <!-- Color picker square (prefix for color type) -->\n @if (typeConfig().isColor) {\n <label\n [for]=\"inputId\"\n class=\"border-input relative z-10 size-6 shrink-0 cursor-pointer overflow-hidden rounded border\">\n <input\n type=\"color\"\n [id]=\"inputId + '-picker'\"\n class=\"absolute -top-2 -left-2 size-12 cursor-pointer border-none bg-transparent p-0\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"displayValue() || '#000000'\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\" />\n </label>\n }\n\n @if (slotConfig().hasPrefix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground left-3 flex items-center justify-center\">\n @if (zSearch()) {\n <z-icon zType=\"lucideSearch\" zSize=\"16\" />\n } @else if (slotConfig().isPrefixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zPrefix())\" />\n } @else {\n {{ zPrefix() }}\n }\n </div>\n }\n\n <input\n #inputEl\n [id]=\"inputId\"\n [type]=\"typeConfig().isColor ? 'text' : maskConfig().effectiveType\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent text-sm outline-none\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"typeConfig().isColor ? true : zReadonly()\"\n [attr.min]=\"zMin()\"\n [attr.max]=\"zMax()\"\n [attr.step]=\"zStep()\"\n [autocomplete]=\"zAutoComplete()\"\n [ngModel]=\"typeConfig().isColor ? (displayValue() || '#000000').toUpperCase() : displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event); onSuggestKeydown($event)\"\n [mask]=\"maskConfig().effectiveMask\"\n [thousandSeparator]=\"zThousandSeparator()\"\n [decimalMarker]=\"maskConfig().effectiveDecimalMarker\"\n [allowNegativeNumbers]=\"zAllowNegative()\"\n [dropSpecialCharacters]=\"false\" />\n\n @if (slotConfig().hasSuffix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground flex items-center justify-center text-sm\">\n @if (slotConfig().isSuffixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zSuffix())\" />\n } @else {\n {{ zSuffix() }}\n }\n </div>\n }\n\n <!-- Async validation loading indicator -->\n @if (isValidating()) {\n <div class=\"text-muted-foreground flex items-center justify-center\">\n <z-icon zType=\"lucideLoader2\" zSize=\"16\" class=\"animate-spin\" />\n </div>\n }\n\n <!-- Clear button -->\n @if (showClearButton()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-5 shrink-0 cursor-pointer items-center justify-center rounded transition-colors\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearValue($event)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n }\n\n <!-- Copy button for color type -->\n @if (typeConfig().isColor) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-accent flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"copyColorToClipboard()\">\n <span class=\"relative flex size-4 items-center justify-center\">\n <z-icon\n zType=\"lucideCopy\"\n [class]=\"uiState().colorCopied ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100'\"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n <z-icon\n zType=\"lucideCheck\"\n [class]=\"\n uiState().colorCopied ? 'text-success scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'\n \"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n </span>\n </button>\n }\n\n @if (showArrows() && !isDisabled()) {\n <div class=\"-mr-1 flex h-[calc(100%-4px)] shrink-0 flex-col\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'up')\">\n <z-icon zType=\"lucideChevronUp\" zSize=\"12\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'down')\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" />\n </button>\n </div>\n }\n\n @if (typeConfig().isPassword && zShowPasswordToggle()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"togglePasswordVisibility()\">\n @if (uiState().passwordVisible) {\n <z-icon zType=\"lucideEyeOff\" zSize=\"16\" />\n } @else {\n <z-icon zType=\"lucideEye\" zSize=\"16\" />\n }\n </button>\n }\n </div>\n\n @if (hasAutoSuggest() && uiState().showSuggestPopover && suggestHistory().length > 0) {\n <div\n class=\"bg-popover text-popover-foreground border-border z-animate-in z-fade-in z-duration-200 z-slide-in-from-top-4 absolute top-full left-0 z-50 mt-1 flex w-full flex-col gap-[3px] rounded-[6px] border p-1 shadow-md\">\n @for (item of filteredSuggestHistory(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"hover:bg-primary/10 hover:text-foreground flex w-full cursor-pointer items-center gap-2 rounded-[4px] px-2 py-1.5 text-left text-sm transition-colors\"\n [class.bg-primary/15]=\"suggestActiveIndex() === i\"\n [class.text-primary]=\"suggestActiveIndex() === i\"\n (mousedown)=\"selectSuggestItem(item)\">\n <z-icon zType=\"lucideClock\" zSize=\"14\" class=\"text-muted-foreground shrink-0\" />\n <span class=\"truncate\">{{ item }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n</div>\n", styles: [".z-input-native{text-overflow:ellipsis;overflow:hidden}.z-input-native:-webkit-autofill,.z-input-native:-webkit-autofill:hover,.z-input-native:-webkit-autofill:focus,.z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px white inset!important;-webkit-text-fill-color:var(--color-foreground)!important;transition:background-color 9999s ease-in-out 0s!important;caret-color:var(--color-foreground)}:is(.dark,.dark *) .z-input-native:-webkit-autofill,:is(.dark,.dark *) .z-input-native:-webkit-autofill:hover,:is(.dark,.dark *) .z-input-native:-webkit-autofill:focus,:is(.dark,.dark *) .z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--input-autofill) inset!important;transition:background-color 9999s ease-in-out 0s!important}textarea.z-input-native::-webkit-resizer{display:none}input[type=number].z-input-native::-webkit-inner-spin-button,input[type=number].z-input-native::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].z-input-native{-moz-appearance:textfield;appearance:textfield}input[type=color]{cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:calc(var(--radius) - 2px)}input[type=color]::-moz-color-swatch{border:none;border-radius:calc(var(--radius) - 2px)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
928
|
+
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputEl"], descendants: true, isSignal: true }], exportAs: ["zInput"], ngImport: i0, template: "<div class=\"z-input-wrapper flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"inputId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() | translate }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n @if (typeConfig().isTextarea) {\n <div class=\"relative w-full\" [class]=\"textareaClasses()\" [class.overflow-auto]=\"zAutoSizeContent()\">\n <textarea\n #inputEl\n [id]=\"inputId\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground m-0 block min-h-14 w-full resize-none bg-transparent p-2 text-sm outline-none\"\n [class.resize-y]=\"zResize() && !isDisabled() && !zReadonly()\"\n [class.field-sizing-content]=\"zAutoSizeContent()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"zReadonly()\"\n [autocomplete]=\"zAutoComplete()\"\n [rows]=\"zRows()\"\n [attr.maxlength]=\"zMaxLength()\"\n [ngModel]=\"displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"></textarea>\n @if (zMaxLength()) {\n <div class=\"flex justify-end pr-1 pb-1\">\n <span class=\"text-muted-foreground text-xs\">{{ displayValue().length }} / {{ zMaxLength() }}</span>\n </div>\n }\n @if (zResize() && !isDisabled() && !zReadonly() && !zMaxLength()) {\n <svg\n class=\"text-muted-foreground pointer-events-none absolute right-0.5 bottom-0.5 opacity-40\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\">\n <path d=\"M10 2L2 10\" />\n <path d=\"M10 6L6 10\" />\n </svg>\n }\n </div>\n } @else {\n <div class=\"relative w-full\">\n <div class=\"z-input-container flex w-full items-center\" [class]=\"inputClasses()\">\n <!-- Color picker square (prefix for color type) -->\n @if (typeConfig().isColor) {\n <div class=\"z-[10] shrink-0\">\n <blossom-color-picker\n class=\"z-input-blossom flex items-center justify-center [&>div:first-child]:flex\"\n [style.--z-bcp-core-size.px]=\"blossomOptions().coreSize\"\n [style.--z-bcp-core-border-color]=\"blossomCoreBorderColor()\"\n [value]=\"blossomColor()\"\n [defaultValue]=\"blossomOptions().defaultValue\"\n [colors]=\"blossomColors()\"\n [disabled]=\"isDisabled() || zReadonly()\"\n [openOnHover]=\"blossomOptions().openOnHover\"\n [initialExpanded]=\"blossomOptions().initialExpanded\"\n [animationDuration]=\"blossomOptions().animationDuration\"\n [showAlphaSlider]=\"blossomOptions().showAlphaSlider\"\n [coreSize]=\"blossomOptions().coreSize\"\n [petalSize]=\"blossomOptions().petalSize\"\n [showCoreColor]=\"blossomOptions().showCoreColor\"\n [sliderPosition]=\"blossomOptions().sliderPosition\"\n [adaptivePositioning]=\"blossomOptions().adaptivePositioning\"\n (colorChange)=\"onBlossomColorChange($event)\"\n (colorCollapse)=\"onBlossomColorCollapse($event)\" />\n </div>\n }\n\n @if (slotConfig().hasPrefix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground left-3 flex items-center justify-center\">\n @if (zSearch()) {\n <z-icon zType=\"lucideSearch\" zSize=\"16\" />\n } @else if (slotConfig().isPrefixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zPrefix())\" />\n } @else {\n {{ zPrefix() }}\n }\n </div>\n }\n\n <input\n #inputEl\n [id]=\"inputId\"\n [type]=\"typeConfig().isColor ? 'text' : maskConfig().effectiveType\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent text-sm outline-none\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"typeConfig().isColor ? true : zReadonly()\"\n [attr.min]=\"zMin()\"\n [attr.max]=\"zMax()\"\n [attr.step]=\"zStep()\"\n [autocomplete]=\"zAutoComplete()\"\n [ngModel]=\"typeConfig().isColor ? normalizedColorValue() : displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event); onSuggestKeydown($event)\"\n [mask]=\"maskConfig().effectiveMask\"\n [thousandSeparator]=\"zThousandSeparator()\"\n [decimalMarker]=\"maskConfig().effectiveDecimalMarker\"\n [allowNegativeNumbers]=\"zAllowNegative()\"\n [dropSpecialCharacters]=\"false\" />\n\n @if (slotConfig().hasSuffix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground flex items-center justify-center text-sm\">\n @if (slotConfig().isSuffixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zSuffix())\" />\n } @else {\n {{ zSuffix() }}\n }\n </div>\n }\n\n <!-- Async validation loading indicator -->\n @if (isValidating()) {\n <div class=\"text-muted-foreground flex items-center justify-center\">\n <z-icon zType=\"lucideLoader2\" zSize=\"16\" class=\"animate-spin\" />\n </div>\n }\n\n <!-- Clear button -->\n @if (showClearButton()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-5 shrink-0 cursor-pointer items-center justify-center rounded transition-colors\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearValue($event)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n }\n\n <!-- Copy button for color type -->\n @if (typeConfig().isColor) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-accent flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"copyColorToClipboard()\">\n <span class=\"relative flex size-4 items-center justify-center\">\n <z-icon\n zType=\"lucideCopy\"\n [class]=\"uiState().colorCopied ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100'\"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n <z-icon\n zType=\"lucideCheck\"\n [class]=\"\n uiState().colorCopied ? 'text-success scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'\n \"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n </span>\n </button>\n }\n\n @if (showArrows() && !isDisabled()) {\n <div class=\"-mr-1 flex h-[calc(100%-0.25rem)] shrink-0 flex-col\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'up')\">\n <z-icon zType=\"lucideChevronUp\" zSize=\"12\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'down')\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" />\n </button>\n </div>\n }\n\n @if (typeConfig().isPassword && zShowPasswordToggle()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"togglePasswordVisibility()\">\n @if (uiState().passwordVisible) {\n <z-icon zType=\"lucideEyeOff\" zSize=\"16\" />\n } @else {\n <z-icon zType=\"lucideEye\" zSize=\"16\" />\n }\n </button>\n }\n </div>\n\n @if (hasAutoSuggest() && uiState().showSuggestPopover && suggestHistory().length > 0) {\n <div\n class=\"bg-popover text-popover-foreground border-border z-animate-in z-fade-in z-duration-200 z-slide-in-from-top-4 absolute top-full left-0 z-50 mt-1 flex w-full flex-col gap-[0.1875rem] rounded-[0.375rem] border p-1 shadow-md\">\n @for (item of filteredSuggestHistory(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"hover:bg-primary/10 hover:text-foreground flex w-full cursor-pointer items-center gap-2 rounded-[0.25rem] px-2 py-1.5 text-left text-sm transition-colors\"\n [class.bg-primary/15]=\"suggestActiveIndex() === i\"\n [class.text-primary]=\"suggestActiveIndex() === i\"\n (mousedown)=\"selectSuggestItem(item)\">\n <z-icon zType=\"lucideClock\" zSize=\"14\" class=\"text-muted-foreground shrink-0\" />\n <span class=\"truncate\">{{ item }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n</div>\n", styles: [".z-input-native{text-overflow:ellipsis;overflow:hidden}.z-input-native:-webkit-autofill,.z-input-native:-webkit-autofill:hover,.z-input-native:-webkit-autofill:focus,.z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px white inset!important;-webkit-text-fill-color:var(--color-foreground)!important;transition:background-color 9999s ease-in-out 0s!important;caret-color:var(--color-foreground)}:is(.dark,.dark *) .z-input-native:-webkit-autofill,:is(.dark,.dark *) .z-input-native:-webkit-autofill:hover,:is(.dark,.dark *) .z-input-native:-webkit-autofill:focus,:is(.dark,.dark *) .z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--input-autofill) inset!important;transition:background-color 9999s ease-in-out 0s!important}textarea.z-input-native::-webkit-resizer{display:none}input[type=number].z-input-native::-webkit-inner-spin-button,input[type=number].z-input-native::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].z-input-native{-moz-appearance:textfield;appearance:textfield}input[type=color]{cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:calc(var(--radius) - .125rem)}input[type=color]::-moz-color-swatch{border:none;border-radius:calc(var(--radius) - .125rem)}.z-input-container{position:relative;overflow:visible}.z-input-container:has(.z-input-blossom .bcp-core[aria-expanded=true]){z-index:40}.z-input-blossom,.z-input-blossom .bcp-root{position:relative;z-index:41;overflow:visible}.z-input-blossom .bcp-container{z-index:42!important}.z-input-blossom .bcp-core{width:var(--z-bcp-core-size, 1.125rem)!important;height:var(--z-bcp-core-size, 1.125rem)!important;min-width:var(--z-bcp-core-size, 1.125rem)!important;min-height:var(--z-bcp-core-size, 1.125rem)!important;border-radius:.1875rem!important;border:1px solid var(--z-bcp-core-border-color, rgba(0, 0, 0, .14))!important;box-shadow:none!important;transition:border-radius .18s cubic-bezier(.22,1,.36,1),border-color .16s ease,transform .18s cubic-bezier(.22,1,.36,1)!important}.z-input-blossom .bcp-core[aria-expanded=true]{border-radius:624.9375rem!important;border-color:transparent!important;box-shadow:0 3px 10px #00000029!important;transform:scale(1.03)!important}.z-input-blossom .bcp-core[aria-expanded=false]{transform:scale(1)!important}\n"], dependencies: [{ kind: "component", type: BlossomColorPickerComponent, selector: "blossom-color-picker", inputs: ["value", "defaultValue", "colors", "disabled", "openOnHover", "initialExpanded", "animationDuration", "showAlphaSlider", "coreSize", "petalSize", "showCoreColor", "sliderPosition", "adaptivePositioning"], outputs: ["colorChange", "colorCollapse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
814
929
|
}
|
|
815
930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZInputComponent, decorators: [{
|
|
816
931
|
type: Component,
|
|
817
|
-
args: [{ selector: 'z-input', imports: [
|
|
932
|
+
args: [{ selector: 'z-input', imports: [
|
|
933
|
+
BlossomColorPickerComponent,
|
|
934
|
+
FormsModule,
|
|
935
|
+
ReactiveFormsModule,
|
|
936
|
+
NgxMaskDirective,
|
|
937
|
+
ZIconComponent,
|
|
938
|
+
NgTemplateOutlet,
|
|
939
|
+
TranslatePipe,
|
|
940
|
+
], standalone: true, providers: [
|
|
818
941
|
provideNgxMask(),
|
|
819
942
|
{
|
|
820
943
|
provide: NG_VALUE_ACCESSOR,
|
|
821
944
|
useExisting: forwardRef(() => ZInputComponent),
|
|
822
945
|
multi: true,
|
|
823
946
|
},
|
|
824
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'zInput', template: "<div class=\"z-input-wrapper flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"inputId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() | translate }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n @if (typeConfig().isTextarea) {\n <div class=\"relative w-full\" [class]=\"textareaClasses()\" [class.overflow-auto]=\"zAutoSizeContent()\">\n <textarea\n #inputEl\n [id]=\"inputId\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground m-0 block min-h-14 w-full resize-none bg-transparent p-2 text-sm outline-none\"\n [class.resize-y]=\"zResize() && !isDisabled() && !zReadonly()\"\n [class.field-sizing-content]=\"zAutoSizeContent()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"zReadonly()\"\n [autocomplete]=\"zAutoComplete()\"\n [rows]=\"zRows()\"\n [attr.maxlength]=\"zMaxLength()\"\n [ngModel]=\"displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"></textarea>\n @if (zMaxLength()) {\n <div class=\"flex justify-end pr-1 pb-1\">\n <span class=\"text-muted-foreground text-xs\">{{ displayValue().length }} / {{ zMaxLength() }}</span>\n </div>\n }\n @if (zResize() && !isDisabled() && !zReadonly() && !zMaxLength()) {\n <svg\n class=\"text-muted-foreground pointer-events-none absolute right-0.5 bottom-0.5 opacity-40\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\">\n <path d=\"M10 2L2 10\" />\n <path d=\"M10 6L6 10\" />\n </svg>\n }\n </div>\n } @else {\n <div class=\"relative w-full\">\n <div class=\"z-input-container flex w-full items-center\" [class]=\"inputClasses()\">\n <!-- Color picker square (prefix for color type) -->\n @if (typeConfig().isColor) {\n <label\n [for]=\"inputId\"\n class=\"border-input relative z-10 size-6 shrink-0 cursor-pointer overflow-hidden rounded border\">\n <input\n type=\"color\"\n [id]=\"inputId + '-picker'\"\n class=\"absolute -top-2 -left-2 size-12 cursor-pointer border-none bg-transparent p-0\"\n [disabled]=\"isDisabled()\"\n [ngModel]=\"displayValue() || '#000000'\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\" />\n </label>\n }\n\n @if (slotConfig().hasPrefix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground left-3 flex items-center justify-center\">\n @if (zSearch()) {\n <z-icon zType=\"lucideSearch\" zSize=\"16\" />\n } @else if (slotConfig().isPrefixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zPrefix())\" />\n } @else {\n {{ zPrefix() }}\n }\n </div>\n }\n\n <input\n #inputEl\n [id]=\"inputId\"\n [type]=\"typeConfig().isColor ? 'text' : maskConfig().effectiveType\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent text-sm outline-none\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"typeConfig().isColor ? true : zReadonly()\"\n [attr.min]=\"zMin()\"\n [attr.max]=\"zMax()\"\n [attr.step]=\"zStep()\"\n [autocomplete]=\"zAutoComplete()\"\n [ngModel]=\"typeConfig().isColor ? (displayValue() || '#000000').toUpperCase() : displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event); onSuggestKeydown($event)\"\n [mask]=\"maskConfig().effectiveMask\"\n [thousandSeparator]=\"zThousandSeparator()\"\n [decimalMarker]=\"maskConfig().effectiveDecimalMarker\"\n [allowNegativeNumbers]=\"zAllowNegative()\"\n [dropSpecialCharacters]=\"false\" />\n\n @if (slotConfig().hasSuffix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground flex items-center justify-center text-sm\">\n @if (slotConfig().isSuffixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zSuffix())\" />\n } @else {\n {{ zSuffix() }}\n }\n </div>\n }\n\n <!-- Async validation loading indicator -->\n @if (isValidating()) {\n <div class=\"text-muted-foreground flex items-center justify-center\">\n <z-icon zType=\"lucideLoader2\" zSize=\"16\" class=\"animate-spin\" />\n </div>\n }\n\n <!-- Clear button -->\n @if (showClearButton()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-5 shrink-0 cursor-pointer items-center justify-center rounded transition-colors\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearValue($event)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n }\n\n <!-- Copy button for color type -->\n @if (typeConfig().isColor) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-accent flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"copyColorToClipboard()\">\n <span class=\"relative flex size-4 items-center justify-center\">\n <z-icon\n zType=\"lucideCopy\"\n [class]=\"uiState().colorCopied ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100'\"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n <z-icon\n zType=\"lucideCheck\"\n [class]=\"\n uiState().colorCopied ? 'text-success scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'\n \"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n </span>\n </button>\n }\n\n @if (showArrows() && !isDisabled()) {\n <div class=\"-mr-1 flex h-[calc(100%-4px)] shrink-0 flex-col\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'up')\">\n <z-icon zType=\"lucideChevronUp\" zSize=\"12\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'down')\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" />\n </button>\n </div>\n }\n\n @if (typeConfig().isPassword && zShowPasswordToggle()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"togglePasswordVisibility()\">\n @if (uiState().passwordVisible) {\n <z-icon zType=\"lucideEyeOff\" zSize=\"16\" />\n } @else {\n <z-icon zType=\"lucideEye\" zSize=\"16\" />\n }\n </button>\n }\n </div>\n\n @if (hasAutoSuggest() && uiState().showSuggestPopover && suggestHistory().length > 0) {\n <div\n class=\"bg-popover text-popover-foreground border-border z-animate-in z-fade-in z-duration-200 z-slide-in-from-top-4 absolute top-full left-0 z-50 mt-1 flex w-full flex-col gap-[3px] rounded-[6px] border p-1 shadow-md\">\n @for (item of filteredSuggestHistory(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"hover:bg-primary/10 hover:text-foreground flex w-full cursor-pointer items-center gap-2 rounded-[4px] px-2 py-1.5 text-left text-sm transition-colors\"\n [class.bg-primary/15]=\"suggestActiveIndex() === i\"\n [class.text-primary]=\"suggestActiveIndex() === i\"\n (mousedown)=\"selectSuggestItem(item)\">\n <z-icon zType=\"lucideClock\" zSize=\"14\" class=\"text-muted-foreground shrink-0\" />\n <span class=\"truncate\">{{ item }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n</div>\n", styles: [".z-input-native{text-overflow:ellipsis;overflow:hidden}.z-input-native:-webkit-autofill,.z-input-native:-webkit-autofill:hover,.z-input-native:-webkit-autofill:focus,.z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px white inset!important;-webkit-text-fill-color:var(--color-foreground)!important;transition:background-color 9999s ease-in-out 0s!important;caret-color:var(--color-foreground)}:is(.dark,.dark *) .z-input-native:-webkit-autofill,:is(.dark,.dark *) .z-input-native:-webkit-autofill:hover,:is(.dark,.dark *) .z-input-native:-webkit-autofill:focus,:is(.dark,.dark *) .z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--input-autofill) inset!important;transition:background-color 9999s ease-in-out 0s!important}textarea.z-input-native::-webkit-resizer{display:none}input[type=number].z-input-native::-webkit-inner-spin-button,input[type=number].z-input-native::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].z-input-native{-moz-appearance:textfield;appearance:textfield}input[type=color]{cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:calc(var(--radius) - 2px)}input[type=color]::-moz-color-swatch{border:none;border-radius:calc(var(--radius) - 2px)}\n"] }]
|
|
825
|
-
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], zOnSearch: [{ type: i0.Output, args: ["zOnSearch"] }], zOnChange: [{ type: i0.Output, args: ["zOnChange"] }], zOnBlur: [{ type: i0.Output, args: ["zOnBlur"] }], zOnFocus: [{ type: i0.Output, args: ["zOnFocus"] }], zOnKeydown: [{ type: i0.Output, args: ["zOnKeydown"] }], zOnEnter: [{ type: i0.Output, args: ["zOnEnter"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], zEvent: [{ type: i0.Output, args: ["zEvent"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAlign", required: false }] }], zLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabel", required: false }] }], zLabelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabelClass", required: false }] }], zPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPlaceholder", required: false }] }], zRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRequired", required: false }] }], zDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisabled", required: false }] }], zReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "zReadonly", required: false }] }], zPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPrefix", required: false }] }], zSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSuffix", required: false }] }], zMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMin", required: false }] }], zMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMax", required: false }] }], zStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "zStep", required: false }] }], zShowArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowArrows", required: false }] }], zMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMask", required: false }] }], zDecimalPlaces: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDecimalPlaces", required: false }] }], zAllowNegative: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAllowNegative", required: false }] }], zThousandSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "zThousandSeparator", required: false }] }], zDecimalMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDecimalMarker", required: false }] }], zValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "zValidators", required: false }] }], zAsyncValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncValidators", required: false }] }], zAsyncDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncDebounce", required: false }] }], zAsyncValidateOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncValidateOn", required: false }] }], zShowPasswordToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowPasswordToggle", required: false }] }], zSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSearch", required: false }] }], zDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDebounce", required: false }] }], zAutofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutofocus", required: false }] }], zAutoComplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutoComplete", required: false }] }], zAllowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAllowClear", required: false }] }], zAutoSizeContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutoSizeContent", required: false }] }], zRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRows", required: false }] }], zResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zResize", required: false }] }], zMaxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMaxLength", required: false }] }], zAutoSuggest: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutoSuggest", required: false }] }] } });
|
|
947
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'zInput', template: "<div class=\"z-input-wrapper flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"inputId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() | translate }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n @if (typeConfig().isTextarea) {\n <div class=\"relative w-full\" [class]=\"textareaClasses()\" [class.overflow-auto]=\"zAutoSizeContent()\">\n <textarea\n #inputEl\n [id]=\"inputId\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground m-0 block min-h-14 w-full resize-none bg-transparent p-2 text-sm outline-none\"\n [class.resize-y]=\"zResize() && !isDisabled() && !zReadonly()\"\n [class.field-sizing-content]=\"zAutoSizeContent()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"zReadonly()\"\n [autocomplete]=\"zAutoComplete()\"\n [rows]=\"zRows()\"\n [attr.maxlength]=\"zMaxLength()\"\n [ngModel]=\"displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event)\"></textarea>\n @if (zMaxLength()) {\n <div class=\"flex justify-end pr-1 pb-1\">\n <span class=\"text-muted-foreground text-xs\">{{ displayValue().length }} / {{ zMaxLength() }}</span>\n </div>\n }\n @if (zResize() && !isDisabled() && !zReadonly() && !zMaxLength()) {\n <svg\n class=\"text-muted-foreground pointer-events-none absolute right-0.5 bottom-0.5 opacity-40\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\">\n <path d=\"M10 2L2 10\" />\n <path d=\"M10 6L6 10\" />\n </svg>\n }\n </div>\n } @else {\n <div class=\"relative w-full\">\n <div class=\"z-input-container flex w-full items-center\" [class]=\"inputClasses()\">\n <!-- Color picker square (prefix for color type) -->\n @if (typeConfig().isColor) {\n <div class=\"z-[10] shrink-0\">\n <blossom-color-picker\n class=\"z-input-blossom flex items-center justify-center [&>div:first-child]:flex\"\n [style.--z-bcp-core-size.px]=\"blossomOptions().coreSize\"\n [style.--z-bcp-core-border-color]=\"blossomCoreBorderColor()\"\n [value]=\"blossomColor()\"\n [defaultValue]=\"blossomOptions().defaultValue\"\n [colors]=\"blossomColors()\"\n [disabled]=\"isDisabled() || zReadonly()\"\n [openOnHover]=\"blossomOptions().openOnHover\"\n [initialExpanded]=\"blossomOptions().initialExpanded\"\n [animationDuration]=\"blossomOptions().animationDuration\"\n [showAlphaSlider]=\"blossomOptions().showAlphaSlider\"\n [coreSize]=\"blossomOptions().coreSize\"\n [petalSize]=\"blossomOptions().petalSize\"\n [showCoreColor]=\"blossomOptions().showCoreColor\"\n [sliderPosition]=\"blossomOptions().sliderPosition\"\n [adaptivePositioning]=\"blossomOptions().adaptivePositioning\"\n (colorChange)=\"onBlossomColorChange($event)\"\n (colorCollapse)=\"onBlossomColorCollapse($event)\" />\n </div>\n }\n\n @if (slotConfig().hasPrefix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground left-3 flex items-center justify-center\">\n @if (zSearch()) {\n <z-icon zType=\"lucideSearch\" zSize=\"16\" />\n } @else if (slotConfig().isPrefixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zPrefix())\" />\n } @else {\n {{ zPrefix() }}\n }\n </div>\n }\n\n <input\n #inputEl\n [id]=\"inputId\"\n [type]=\"typeConfig().isColor ? 'text' : maskConfig().effectiveType\"\n [placeholder]=\"zPlaceholder() | translate\"\n class=\"z-input-native placeholder:text-muted-foreground h-full min-w-0 flex-1 bg-transparent text-sm outline-none\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"typeConfig().isColor ? true : zReadonly()\"\n [attr.min]=\"zMin()\"\n [attr.max]=\"zMax()\"\n [attr.step]=\"zStep()\"\n [autocomplete]=\"zAutoComplete()\"\n [ngModel]=\"typeConfig().isColor ? normalizedColorValue() : displayValue()\"\n (ngModelChange)=\"onModelChange($event)\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeydown($event); onSuggestKeydown($event)\"\n [mask]=\"maskConfig().effectiveMask\"\n [thousandSeparator]=\"zThousandSeparator()\"\n [decimalMarker]=\"maskConfig().effectiveDecimalMarker\"\n [allowNegativeNumbers]=\"zAllowNegative()\"\n [dropSpecialCharacters]=\"false\" />\n\n @if (slotConfig().hasSuffix && !typeConfig().isColor) {\n <div class=\"text-muted-foreground flex items-center justify-center text-sm\">\n @if (slotConfig().isSuffixTemplate) {\n <ng-container *ngTemplateOutlet=\"$any(zSuffix())\" />\n } @else {\n {{ zSuffix() }}\n }\n </div>\n }\n\n <!-- Async validation loading indicator -->\n @if (isValidating()) {\n <div class=\"text-muted-foreground flex items-center justify-center\">\n <z-icon zType=\"lucideLoader2\" zSize=\"16\" class=\"animate-spin\" />\n </div>\n }\n\n <!-- Clear button -->\n @if (showClearButton()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-5 shrink-0 cursor-pointer items-center justify-center rounded transition-colors\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clearValue($event)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n }\n\n <!-- Copy button for color type -->\n @if (typeConfig().isColor) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-accent flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"copyColorToClipboard()\">\n <span class=\"relative flex size-4 items-center justify-center\">\n <z-icon\n zType=\"lucideCopy\"\n [class]=\"uiState().colorCopied ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100'\"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n <z-icon\n zType=\"lucideCheck\"\n [class]=\"\n uiState().colorCopied ? 'text-success scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'\n \"\n class=\"absolute transition-all duration-200 ease-out\"\n zSize=\"14\" />\n </span>\n </button>\n }\n\n @if (showArrows() && !isDisabled()) {\n <div class=\"-mr-1 flex h-[calc(100%-0.25rem)] shrink-0 flex-col\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'up')\">\n <z-icon zType=\"lucideChevronUp\" zSize=\"12\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:bg-accent hover:text-foreground flex w-5 flex-1 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onArrowClick($event, 'down')\">\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" />\n </button>\n </div>\n }\n\n @if (typeConfig().isPassword && zShowPasswordToggle()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"text-muted-foreground hover:text-foreground flex size-6 shrink-0 cursor-pointer items-center justify-center rounded transition-all\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"togglePasswordVisibility()\">\n @if (uiState().passwordVisible) {\n <z-icon zType=\"lucideEyeOff\" zSize=\"16\" />\n } @else {\n <z-icon zType=\"lucideEye\" zSize=\"16\" />\n }\n </button>\n }\n </div>\n\n @if (hasAutoSuggest() && uiState().showSuggestPopover && suggestHistory().length > 0) {\n <div\n class=\"bg-popover text-popover-foreground border-border z-animate-in z-fade-in z-duration-200 z-slide-in-from-top-4 absolute top-full left-0 z-50 mt-1 flex w-full flex-col gap-[0.1875rem] rounded-[0.375rem] border p-1 shadow-md\">\n @for (item of filteredSuggestHistory(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"hover:bg-primary/10 hover:text-foreground flex w-full cursor-pointer items-center gap-2 rounded-[0.25rem] px-2 py-1.5 text-left text-sm transition-colors\"\n [class.bg-primary/15]=\"suggestActiveIndex() === i\"\n [class.text-primary]=\"suggestActiveIndex() === i\"\n (mousedown)=\"selectSuggestItem(item)\">\n <z-icon zType=\"lucideClock\" zSize=\"14\" class=\"text-muted-foreground shrink-0\" />\n <span class=\"truncate\">{{ item }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n</div>\n", styles: [".z-input-native{text-overflow:ellipsis;overflow:hidden}.z-input-native:-webkit-autofill,.z-input-native:-webkit-autofill:hover,.z-input-native:-webkit-autofill:focus,.z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px white inset!important;-webkit-text-fill-color:var(--color-foreground)!important;transition:background-color 9999s ease-in-out 0s!important;caret-color:var(--color-foreground)}:is(.dark,.dark *) .z-input-native:-webkit-autofill,:is(.dark,.dark *) .z-input-native:-webkit-autofill:hover,:is(.dark,.dark *) .z-input-native:-webkit-autofill:focus,:is(.dark,.dark *) .z-input-native:-webkit-autofill:active{-webkit-box-shadow:0 0 0 1000px var(--input-autofill) inset!important;transition:background-color 9999s ease-in-out 0s!important}textarea.z-input-native::-webkit-resizer{display:none}input[type=number].z-input-native::-webkit-inner-spin-button,input[type=number].z-input-native::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number].z-input-native{-moz-appearance:textfield;appearance:textfield}input[type=color]{cursor:pointer}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:calc(var(--radius) - .125rem)}input[type=color]::-moz-color-swatch{border:none;border-radius:calc(var(--radius) - .125rem)}.z-input-container{position:relative;overflow:visible}.z-input-container:has(.z-input-blossom .bcp-core[aria-expanded=true]){z-index:40}.z-input-blossom,.z-input-blossom .bcp-root{position:relative;z-index:41;overflow:visible}.z-input-blossom .bcp-container{z-index:42!important}.z-input-blossom .bcp-core{width:var(--z-bcp-core-size, 1.125rem)!important;height:var(--z-bcp-core-size, 1.125rem)!important;min-width:var(--z-bcp-core-size, 1.125rem)!important;min-height:var(--z-bcp-core-size, 1.125rem)!important;border-radius:.1875rem!important;border:1px solid var(--z-bcp-core-border-color, rgba(0, 0, 0, .14))!important;box-shadow:none!important;transition:border-radius .18s cubic-bezier(.22,1,.36,1),border-color .16s ease,transform .18s cubic-bezier(.22,1,.36,1)!important}.z-input-blossom .bcp-core[aria-expanded=true]{border-radius:624.9375rem!important;border-color:transparent!important;box-shadow:0 3px 10px #00000029!important;transform:scale(1.03)!important}.z-input-blossom .bcp-core[aria-expanded=false]{transform:scale(1)!important}\n"] }]
|
|
948
|
+
}], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['inputEl', { isSignal: true }] }], zOnSearch: [{ type: i0.Output, args: ["zOnSearch"] }], zOnChange: [{ type: i0.Output, args: ["zOnChange"] }], zOnBlur: [{ type: i0.Output, args: ["zOnBlur"] }], zOnFocus: [{ type: i0.Output, args: ["zOnFocus"] }], zOnKeydown: [{ type: i0.Output, args: ["zOnKeydown"] }], zOnEnter: [{ type: i0.Output, args: ["zOnEnter"] }], zOnColorCollapse: [{ type: i0.Output, args: ["zOnColorCollapse"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], zEvent: [{ type: i0.Output, args: ["zEvent"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAlign", required: false }] }], zLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabel", required: false }] }], zLabelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabelClass", required: false }] }], zPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPlaceholder", required: false }] }], zRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRequired", required: false }] }], zDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisabled", required: false }] }], zReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "zReadonly", required: false }] }], zPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPrefix", required: false }] }], zSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSuffix", required: false }] }], zMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMin", required: false }] }], zMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMax", required: false }] }], zStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "zStep", required: false }] }], zShowArrows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowArrows", required: false }] }], zMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMask", required: false }] }], zDecimalPlaces: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDecimalPlaces", required: false }] }], zAllowNegative: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAllowNegative", required: false }] }], zThousandSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "zThousandSeparator", required: false }] }], zDecimalMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDecimalMarker", required: false }] }], zValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "zValidators", required: false }] }], zAsyncValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncValidators", required: false }] }], zAsyncDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncDebounce", required: false }] }], zAsyncValidateOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncValidateOn", required: false }] }], zShowPasswordToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowPasswordToggle", required: false }] }], zSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSearch", required: false }] }], zDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDebounce", required: false }] }], zAutofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutofocus", required: false }] }], zAutoComplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutoComplete", required: false }] }], zAllowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAllowClear", required: false }] }], zAutoSizeContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutoSizeContent", required: false }] }], zRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRows", required: false }] }], zResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zResize", required: false }] }], zMaxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMaxLength", required: false }] }], zAutoSuggest: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAutoSuggest", required: false }] }], zColorConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "zColorConfig", required: false }] }] } });
|
|
826
949
|
|
|
827
950
|
/**
|
|
828
951
|
* Generated bundle index. Do not edit.
|