@lifecorner/angular-ui-kit 3.4.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/fesm2022/lifecorner-angular-ui-kit-accordion.mjs +454 -0
- package/fesm2022/lifecorner-angular-ui-kit-accordion.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-alert.mjs +297 -0
- package/fesm2022/lifecorner-angular-ui-kit-alert.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-app-shell.mjs +190 -0
- package/fesm2022/lifecorner-angular-ui-kit-app-shell.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-area-chart.mjs +446 -0
- package/fesm2022/lifecorner-angular-ui-kit-area-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-avatar-group.mjs +158 -0
- package/fesm2022/lifecorner-angular-ui-kit-avatar-group.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-avatar.mjs +216 -0
- package/fesm2022/lifecorner-angular-ui-kit-avatar.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-badge.mjs +121 -0
- package/fesm2022/lifecorner-angular-ui-kit-badge.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-bar-chart.mjs +360 -0
- package/fesm2022/lifecorner-angular-ui-kit-bar-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs +344 -0
- package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-breadcrumbs.mjs +191 -0
- package/fesm2022/lifecorner-angular-ui-kit-breadcrumbs.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-button.mjs +423 -0
- package/fesm2022/lifecorner-angular-ui-kit-button.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-calendar.mjs +368 -0
- package/fesm2022/lifecorner-angular-ui-kit-calendar.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-callout.mjs +203 -0
- package/fesm2022/lifecorner-angular-ui-kit-callout.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-card.mjs +323 -0
- package/fesm2022/lifecorner-angular-ui-kit-card.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-chat.mjs +790 -0
- package/fesm2022/lifecorner-angular-ui-kit-chat.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-checkbox.mjs +325 -0
- package/fesm2022/lifecorner-angular-ui-kit-checkbox.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-chip.mjs +214 -0
- package/fesm2022/lifecorner-angular-ui-kit-chip.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-choice-prompt.mjs +375 -0
- package/fesm2022/lifecorner-angular-ui-kit-choice-prompt.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-code-block.mjs +518 -0
- package/fesm2022/lifecorner-angular-ui-kit-code-block.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-color-picker.mjs +278 -0
- package/fesm2022/lifecorner-angular-ui-kit-color-picker.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs +688 -0
- package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-confirm-dialog.mjs +494 -0
- package/fesm2022/lifecorner-angular-ui-kit-confirm-dialog.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-container.mjs +103 -0
- package/fesm2022/lifecorner-angular-ui-kit-container.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-copy-field.mjs +308 -0
- package/fesm2022/lifecorner-angular-ui-kit-copy-field.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-date-range-picker.mjs +466 -0
- package/fesm2022/lifecorner-angular-ui-kit-date-range-picker.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs +810 -0
- package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-dependency-viewer.mjs +1761 -0
- package/fesm2022/lifecorner-angular-ui-kit-dependency-viewer.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-description-list.mjs +165 -0
- package/fesm2022/lifecorner-angular-ui-kit-description-list.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-diff-viewer.mjs +356 -0
- package/fesm2022/lifecorner-angular-ui-kit-diff-viewer.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-divider.mjs +119 -0
- package/fesm2022/lifecorner-angular-ui-kit-divider.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-document-viewer.mjs +762 -0
- package/fesm2022/lifecorner-angular-ui-kit-document-viewer.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-donut-chart.mjs +255 -0
- package/fesm2022/lifecorner-angular-ui-kit-donut-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-drawer.mjs +308 -0
- package/fesm2022/lifecorner-angular-ui-kit-drawer.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-email-input.mjs +519 -0
- package/fesm2022/lifecorner-angular-ui-kit-email-input.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-empty-state.mjs +143 -0
- package/fesm2022/lifecorner-angular-ui-kit-empty-state.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-error-display.mjs +306 -0
- package/fesm2022/lifecorner-angular-ui-kit-error-display.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-field-group.mjs +154 -0
- package/fesm2022/lifecorner-angular-ui-kit-field-group.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-file-upload.mjs +281 -0
- package/fesm2022/lifecorner-angular-ui-kit-file-upload.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-filter-bar.mjs +258 -0
- package/fesm2022/lifecorner-angular-ui-kit-filter-bar.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-footer.mjs +200 -0
- package/fesm2022/lifecorner-angular-ui-kit-footer.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-funnel-chart.mjs +292 -0
- package/fesm2022/lifecorner-angular-ui-kit-funnel-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-gallery.mjs +563 -0
- package/fesm2022/lifecorner-angular-ui-kit-gallery.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-gantt-chart.mjs +314 -0
- package/fesm2022/lifecorner-angular-ui-kit-gantt-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-gauge.mjs +265 -0
- package/fesm2022/lifecorner-angular-ui-kit-gauge.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs +955 -0
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-heatmap.mjs +305 -0
- package/fesm2022/lifecorner-angular-ui-kit-heatmap.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-hero.mjs +168 -0
- package/fesm2022/lifecorner-angular-ui-kit-hero.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-icon-names.mjs +9 -0
- package/fesm2022/lifecorner-angular-ui-kit-icon-names.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-icon.mjs +1026 -0
- package/fesm2022/lifecorner-angular-ui-kit-icon.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-input.mjs +595 -0
- package/fesm2022/lifecorner-angular-ui-kit-input.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-internal-chart.mjs +105 -0
- package/fesm2022/lifecorner-angular-ui-kit-internal-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-internal-overlay.mjs +50 -0
- package/fesm2022/lifecorner-angular-ui-kit-internal-overlay.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-internal-url.mjs +22 -0
- package/fesm2022/lifecorner-angular-ui-kit-internal-url.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-kanban-board.mjs +319 -0
- package/fesm2022/lifecorner-angular-ui-kit-kanban-board.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-line-chart.mjs +413 -0
- package/fesm2022/lifecorner-angular-ui-kit-line-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-list.mjs +338 -0
- package/fesm2022/lifecorner-angular-ui-kit-list.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs +813 -0
- package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-logo.mjs +226 -0
- package/fesm2022/lifecorner-angular-ui-kit-logo.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-markdown.mjs +756 -0
- package/fesm2022/lifecorner-angular-ui-kit-markdown.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-menu.mjs +321 -0
- package/fesm2022/lifecorner-angular-ui-kit-menu.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-modal.mjs +329 -0
- package/fesm2022/lifecorner-angular-ui-kit-modal.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-models.mjs +0 -0
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs +419 -0
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs +644 -0
- package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-number-input.mjs +401 -0
- package/fesm2022/lifecorner-angular-ui-kit-number-input.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-page-header.mjs +266 -0
- package/fesm2022/lifecorner-angular-ui-kit-page-header.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-page-layout.mjs +127 -0
- package/fesm2022/lifecorner-angular-ui-kit-page-layout.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-pagination.mjs +343 -0
- package/fesm2022/lifecorner-angular-ui-kit-pagination.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-password-input.mjs +696 -0
- package/fesm2022/lifecorner-angular-ui-kit-password-input.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-pie-chart.mjs +162 -0
- package/fesm2022/lifecorner-angular-ui-kit-pie-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-pipeline.mjs +159 -0
- package/fesm2022/lifecorner-angular-ui-kit-pipeline.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-popover.mjs +190 -0
- package/fesm2022/lifecorner-angular-ui-kit-popover.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-progress-bar.mjs +190 -0
- package/fesm2022/lifecorner-angular-ui-kit-progress-bar.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-progress-ring.mjs +175 -0
- package/fesm2022/lifecorner-angular-ui-kit-progress-ring.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-provider-button.mjs +255 -0
- package/fesm2022/lifecorner-angular-ui-kit-provider-button.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-radar-chart.mjs +309 -0
- package/fesm2022/lifecorner-angular-ui-kit-radar-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-radio.mjs +708 -0
- package/fesm2022/lifecorner-angular-ui-kit-radio.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-rating.mjs +327 -0
- package/fesm2022/lifecorner-angular-ui-kit-rating.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-rich-text-editor.mjs +718 -0
- package/fesm2022/lifecorner-angular-ui-kit-rich-text-editor.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-scatter-plot.mjs +415 -0
- package/fesm2022/lifecorner-angular-ui-kit-scatter-plot.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-search-input.mjs +290 -0
- package/fesm2022/lifecorner-angular-ui-kit-search-input.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-section.mjs +127 -0
- package/fesm2022/lifecorner-angular-ui-kit-section.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-select.mjs +650 -0
- package/fesm2022/lifecorner-angular-ui-kit-select.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs +691 -0
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-skeleton.mjs +144 -0
- package/fesm2022/lifecorner-angular-ui-kit-skeleton.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-slider.mjs +204 -0
- package/fesm2022/lifecorner-angular-ui-kit-slider.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-spacer.mjs +73 -0
- package/fesm2022/lifecorner-angular-ui-kit-spacer.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-sparkline.mjs +318 -0
- package/fesm2022/lifecorner-angular-ui-kit-sparkline.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-spinner.mjs +95 -0
- package/fesm2022/lifecorner-angular-ui-kit-spinner.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-split-pane.mjs +298 -0
- package/fesm2022/lifecorner-angular-ui-kit-split-pane.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-stack.mjs +162 -0
- package/fesm2022/lifecorner-angular-ui-kit-stack.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-stacked-bar-chart.mjs +412 -0
- package/fesm2022/lifecorner-angular-ui-kit-stacked-bar-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-stage-list.mjs +186 -0
- package/fesm2022/lifecorner-angular-ui-kit-stage-list.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-stat-trend.mjs +224 -0
- package/fesm2022/lifecorner-angular-ui-kit-stat-trend.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-status-dot.mjs +122 -0
- package/fesm2022/lifecorner-angular-ui-kit-status-dot.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-stepper.mjs +209 -0
- package/fesm2022/lifecorner-angular-ui-kit-stepper.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-switch.mjs +249 -0
- package/fesm2022/lifecorner-angular-ui-kit-switch.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-table.mjs +1434 -0
- package/fesm2022/lifecorner-angular-ui-kit-table.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-tabs.mjs +407 -0
- package/fesm2022/lifecorner-angular-ui-kit-tabs.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-tag-input.mjs +380 -0
- package/fesm2022/lifecorner-angular-ui-kit-tag-input.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs +440 -0
- package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-theme.mjs +145 -0
- package/fesm2022/lifecorner-angular-ui-kit-theme.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-timeline.mjs +262 -0
- package/fesm2022/lifecorner-angular-ui-kit-timeline.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-toast.mjs +352 -0
- package/fesm2022/lifecorner-angular-ui-kit-toast.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-toggle-group.mjs +215 -0
- package/fesm2022/lifecorner-angular-ui-kit-toggle-group.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-tokens.mjs +134 -0
- package/fesm2022/lifecorner-angular-ui-kit-tokens.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-toolbar.mjs +225 -0
- package/fesm2022/lifecorner-angular-ui-kit-toolbar.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-tooltip.mjs +386 -0
- package/fesm2022/lifecorner-angular-ui-kit-tooltip.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-tree-view.mjs +509 -0
- package/fesm2022/lifecorner-angular-ui-kit-tree-view.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-typography.mjs +209 -0
- package/fesm2022/lifecorner-angular-ui-kit-typography.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-verification-code-input.mjs +365 -0
- package/fesm2022/lifecorner-angular-ui-kit-verification-code-input.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-waterfall-chart.mjs +371 -0
- package/fesm2022/lifecorner-angular-ui-kit-waterfall-chart.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit.mjs +109 -38925
- package/package.json +449 -1
- package/types/lifecorner-angular-ui-kit-accordion.d.ts +239 -0
- package/types/lifecorner-angular-ui-kit-alert.d.ts +189 -0
- package/types/lifecorner-angular-ui-kit-app-shell.d.ts +148 -0
- package/types/lifecorner-angular-ui-kit-area-chart.d.ts +180 -0
- package/types/lifecorner-angular-ui-kit-avatar-group.d.ts +62 -0
- package/types/lifecorner-angular-ui-kit-avatar.d.ts +131 -0
- package/types/lifecorner-angular-ui-kit-badge.d.ts +59 -0
- package/types/lifecorner-angular-ui-kit-bar-chart.d.ts +157 -0
- package/types/lifecorner-angular-ui-kit-bottom-nav.d.ts +184 -0
- package/types/lifecorner-angular-ui-kit-breadcrumbs.d.ts +55 -0
- package/types/lifecorner-angular-ui-kit-button.d.ts +181 -0
- package/types/lifecorner-angular-ui-kit-calendar.d.ts +136 -0
- package/types/lifecorner-angular-ui-kit-callout.d.ts +77 -0
- package/types/lifecorner-angular-ui-kit-card.d.ts +213 -0
- package/types/lifecorner-angular-ui-kit-chat.d.ts +379 -0
- package/types/lifecorner-angular-ui-kit-checkbox.d.ts +116 -0
- package/types/lifecorner-angular-ui-kit-chip.d.ts +104 -0
- package/types/lifecorner-angular-ui-kit-choice-prompt.d.ts +186 -0
- package/types/lifecorner-angular-ui-kit-code-block.d.ts +85 -0
- package/types/lifecorner-angular-ui-kit-color-picker.d.ts +88 -0
- package/types/lifecorner-angular-ui-kit-combobox.d.ts +222 -0
- package/types/lifecorner-angular-ui-kit-confirm-dialog.d.ts +211 -0
- package/types/lifecorner-angular-ui-kit-container.d.ts +47 -0
- package/types/lifecorner-angular-ui-kit-copy-field.d.ts +89 -0
- package/types/lifecorner-angular-ui-kit-date-range-picker.d.ts +126 -0
- package/types/lifecorner-angular-ui-kit-datepicker.d.ts +363 -0
- package/types/lifecorner-angular-ui-kit-dependency-viewer.d.ts +568 -0
- package/types/lifecorner-angular-ui-kit-description-list.d.ts +137 -0
- package/types/lifecorner-angular-ui-kit-diff-viewer.d.ts +93 -0
- package/types/lifecorner-angular-ui-kit-divider.d.ts +66 -0
- package/types/lifecorner-angular-ui-kit-document-viewer.d.ts +256 -0
- package/types/lifecorner-angular-ui-kit-donut-chart.d.ts +92 -0
- package/types/lifecorner-angular-ui-kit-drawer.d.ts +124 -0
- package/types/lifecorner-angular-ui-kit-email-input.d.ts +292 -0
- package/types/lifecorner-angular-ui-kit-empty-state.d.ts +81 -0
- package/types/lifecorner-angular-ui-kit-error-display.d.ts +157 -0
- package/types/lifecorner-angular-ui-kit-field-group.d.ts +69 -0
- package/types/lifecorner-angular-ui-kit-file-upload.d.ts +122 -0
- package/types/lifecorner-angular-ui-kit-filter-bar.d.ts +116 -0
- package/types/lifecorner-angular-ui-kit-footer.d.ts +97 -0
- package/types/lifecorner-angular-ui-kit-funnel-chart.d.ts +97 -0
- package/types/lifecorner-angular-ui-kit-gallery.d.ts +240 -0
- package/types/lifecorner-angular-ui-kit-gantt-chart.d.ts +133 -0
- package/types/lifecorner-angular-ui-kit-gauge.d.ts +94 -0
- package/types/lifecorner-angular-ui-kit-header.d.ts +496 -0
- package/types/lifecorner-angular-ui-kit-heatmap.d.ts +126 -0
- package/types/lifecorner-angular-ui-kit-hero.d.ts +121 -0
- package/types/lifecorner-angular-ui-kit-icon-names.d.ts +21 -0
- package/types/lifecorner-angular-ui-kit-icon.d.ts +260 -0
- package/types/lifecorner-angular-ui-kit-input.d.ts +346 -0
- package/types/lifecorner-angular-ui-kit-internal-chart.d.ts +86 -0
- package/types/lifecorner-angular-ui-kit-internal-overlay.d.ts +31 -0
- package/types/lifecorner-angular-ui-kit-internal-url.d.ts +22 -0
- package/types/lifecorner-angular-ui-kit-kanban-board.d.ts +111 -0
- package/types/lifecorner-angular-ui-kit-line-chart.d.ts +186 -0
- package/types/lifecorner-angular-ui-kit-list.d.ts +215 -0
- package/types/lifecorner-angular-ui-kit-log-viewer.d.ts +355 -0
- package/types/lifecorner-angular-ui-kit-logo.d.ts +182 -0
- package/types/lifecorner-angular-ui-kit-markdown.d.ts +278 -0
- package/types/lifecorner-angular-ui-kit-menu.d.ts +152 -0
- package/types/lifecorner-angular-ui-kit-modal.d.ts +207 -0
- package/types/lifecorner-angular-ui-kit-models.d.ts +62 -0
- package/types/lifecorner-angular-ui-kit-next-step-card.d.ts +262 -0
- package/types/lifecorner-angular-ui-kit-notification-center.d.ts +237 -0
- package/types/lifecorner-angular-ui-kit-number-input.d.ts +126 -0
- package/types/lifecorner-angular-ui-kit-page-header.d.ts +178 -0
- package/types/lifecorner-angular-ui-kit-page-layout.d.ts +61 -0
- package/types/lifecorner-angular-ui-kit-pagination.d.ts +141 -0
- package/types/lifecorner-angular-ui-kit-password-input.d.ts +361 -0
- package/types/lifecorner-angular-ui-kit-pie-chart.d.ts +58 -0
- package/types/lifecorner-angular-ui-kit-pipeline.d.ts +89 -0
- package/types/lifecorner-angular-ui-kit-popover.d.ts +104 -0
- package/types/lifecorner-angular-ui-kit-progress-bar.d.ts +116 -0
- package/types/lifecorner-angular-ui-kit-progress-ring.d.ts +67 -0
- package/types/lifecorner-angular-ui-kit-provider-button.d.ts +137 -0
- package/types/lifecorner-angular-ui-kit-radar-chart.d.ts +113 -0
- package/types/lifecorner-angular-ui-kit-radio.d.ts +297 -0
- package/types/lifecorner-angular-ui-kit-rating.d.ts +115 -0
- package/types/lifecorner-angular-ui-kit-rich-text-editor.d.ts +226 -0
- package/types/lifecorner-angular-ui-kit-scatter-plot.d.ts +190 -0
- package/types/lifecorner-angular-ui-kit-search-input.d.ts +137 -0
- package/types/lifecorner-angular-ui-kit-section.d.ts +34 -0
- package/types/lifecorner-angular-ui-kit-select.d.ts +274 -0
- package/types/lifecorner-angular-ui-kit-sidenav.d.ts +367 -0
- package/types/lifecorner-angular-ui-kit-skeleton.d.ts +61 -0
- package/types/lifecorner-angular-ui-kit-slider.d.ts +79 -0
- package/types/lifecorner-angular-ui-kit-spacer.d.ts +27 -0
- package/types/lifecorner-angular-ui-kit-sparkline.d.ts +113 -0
- package/types/lifecorner-angular-ui-kit-spinner.d.ts +50 -0
- package/types/lifecorner-angular-ui-kit-split-pane.d.ts +131 -0
- package/types/lifecorner-angular-ui-kit-stack.d.ts +49 -0
- package/types/lifecorner-angular-ui-kit-stacked-bar-chart.d.ts +171 -0
- package/types/lifecorner-angular-ui-kit-stage-list.d.ts +69 -0
- package/types/lifecorner-angular-ui-kit-stat-trend.d.ts +62 -0
- package/types/lifecorner-angular-ui-kit-status-dot.d.ts +62 -0
- package/types/lifecorner-angular-ui-kit-stepper.d.ts +113 -0
- package/types/lifecorner-angular-ui-kit-switch.d.ts +141 -0
- package/types/lifecorner-angular-ui-kit-table.d.ts +632 -0
- package/types/lifecorner-angular-ui-kit-tabs.d.ts +196 -0
- package/types/lifecorner-angular-ui-kit-tag-input.d.ts +123 -0
- package/types/lifecorner-angular-ui-kit-textarea.d.ts +225 -0
- package/types/lifecorner-angular-ui-kit-theme.d.ts +91 -0
- package/types/lifecorner-angular-ui-kit-timeline.d.ts +162 -0
- package/types/lifecorner-angular-ui-kit-toast.d.ts +204 -0
- package/types/lifecorner-angular-ui-kit-toggle-group.d.ts +100 -0
- package/types/lifecorner-angular-ui-kit-tokens.d.ts +134 -0
- package/types/lifecorner-angular-ui-kit-toolbar.d.ts +120 -0
- package/types/lifecorner-angular-ui-kit-tooltip.d.ts +120 -0
- package/types/lifecorner-angular-ui-kit-tree-view.d.ts +231 -0
- package/types/lifecorner-angular-ui-kit-typography.d.ts +126 -0
- package/types/lifecorner-angular-ui-kit-verification-code-input.d.ts +187 -0
- package/types/lifecorner-angular-ui-kit-waterfall-chart.d.ts +163 -0
- package/types/lifecorner-angular-ui-kit.d.ts +109 -17401
- package/fesm2022/lifecorner-angular-ui-kit.mjs.map +0 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, input } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
var TypographyComponent = class TypographyComponent {
|
|
5
|
+
variant = input("body1", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
6
|
+
align = input("left", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
|
|
7
|
+
color = input("primary", ...ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []);
|
|
8
|
+
weight = input(void 0, ...ngDevMode ? [{ debugName: "weight" }] : /* istanbul ignore next */ []);
|
|
9
|
+
transform = input("none", ...ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []);
|
|
10
|
+
noWrap = input(false, ...ngDevMode ? [{ debugName: "noWrap" }] : /* istanbul ignore next */ []);
|
|
11
|
+
lineClamp = input(void 0, ...ngDevMode ? [{ debugName: "lineClamp" }] : /* istanbul ignore next */ []);
|
|
12
|
+
gutterBottom = input(false, ...ngDevMode ? [{ debugName: "gutterBottom" }] : /* istanbul ignore next */ []);
|
|
13
|
+
elementTag = computed(() => {
|
|
14
|
+
const variantValue = this.variant();
|
|
15
|
+
if (variantValue.startsWith("h")) return variantValue;
|
|
16
|
+
if (variantValue === "caption" || variantValue === "overline") return "span";
|
|
17
|
+
return "p";
|
|
18
|
+
}, ...ngDevMode ? [{ debugName: "elementTag" }] : /* istanbul ignore next */ []);
|
|
19
|
+
typographyClasses = computed(() => {
|
|
20
|
+
const classes = ["typography"];
|
|
21
|
+
classes.push(`typography-${this.variant()}`);
|
|
22
|
+
classes.push(`lc-typography--align-${this.align()}`);
|
|
23
|
+
classes.push(`lc-typography--color-${this.color()}`);
|
|
24
|
+
const weightValue = this.weight();
|
|
25
|
+
if (weightValue) classes.push(`lc-typography--weight-${weightValue}`);
|
|
26
|
+
const transformValue = this.transform();
|
|
27
|
+
if (transformValue !== "none") classes.push(`lc-typography--${transformValue}`);
|
|
28
|
+
if (this.noWrap()) classes.push("lc-typography--nowrap");
|
|
29
|
+
const lineClampValue = this.lineClamp();
|
|
30
|
+
if (lineClampValue !== void 0 && lineClampValue >= 1 && lineClampValue <= 6) classes.push(`lc-typography--clamp-${lineClampValue}`);
|
|
31
|
+
if (this.gutterBottom()) classes.push("lc-typography--gutter-bottom");
|
|
32
|
+
return classes.join(" ");
|
|
33
|
+
}, ...ngDevMode ? [{ debugName: "typographyClasses" }] : /* istanbul ignore next */ []);
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
35
|
+
minVersion: "12.0.0",
|
|
36
|
+
version: "22.2.2",
|
|
37
|
+
ngImport: i0,
|
|
38
|
+
type: TypographyComponent,
|
|
39
|
+
deps: [],
|
|
40
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
41
|
+
});
|
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
43
|
+
minVersion: "17.0.0",
|
|
44
|
+
version: "22.2.2",
|
|
45
|
+
type: TypographyComponent,
|
|
46
|
+
isStandalone: true,
|
|
47
|
+
selector: "lc-typography",
|
|
48
|
+
inputs: {
|
|
49
|
+
variant: {
|
|
50
|
+
classPropertyName: "variant",
|
|
51
|
+
publicName: "variant",
|
|
52
|
+
isSignal: true,
|
|
53
|
+
isRequired: false,
|
|
54
|
+
transformFunction: null
|
|
55
|
+
},
|
|
56
|
+
align: {
|
|
57
|
+
classPropertyName: "align",
|
|
58
|
+
publicName: "align",
|
|
59
|
+
isSignal: true,
|
|
60
|
+
isRequired: false,
|
|
61
|
+
transformFunction: null
|
|
62
|
+
},
|
|
63
|
+
color: {
|
|
64
|
+
classPropertyName: "color",
|
|
65
|
+
publicName: "color",
|
|
66
|
+
isSignal: true,
|
|
67
|
+
isRequired: false,
|
|
68
|
+
transformFunction: null
|
|
69
|
+
},
|
|
70
|
+
weight: {
|
|
71
|
+
classPropertyName: "weight",
|
|
72
|
+
publicName: "weight",
|
|
73
|
+
isSignal: true,
|
|
74
|
+
isRequired: false,
|
|
75
|
+
transformFunction: null
|
|
76
|
+
},
|
|
77
|
+
transform: {
|
|
78
|
+
classPropertyName: "transform",
|
|
79
|
+
publicName: "transform",
|
|
80
|
+
isSignal: true,
|
|
81
|
+
isRequired: false,
|
|
82
|
+
transformFunction: null
|
|
83
|
+
},
|
|
84
|
+
noWrap: {
|
|
85
|
+
classPropertyName: "noWrap",
|
|
86
|
+
publicName: "noWrap",
|
|
87
|
+
isSignal: true,
|
|
88
|
+
isRequired: false,
|
|
89
|
+
transformFunction: null
|
|
90
|
+
},
|
|
91
|
+
lineClamp: {
|
|
92
|
+
classPropertyName: "lineClamp",
|
|
93
|
+
publicName: "lineClamp",
|
|
94
|
+
isSignal: true,
|
|
95
|
+
isRequired: false,
|
|
96
|
+
transformFunction: null
|
|
97
|
+
},
|
|
98
|
+
gutterBottom: {
|
|
99
|
+
classPropertyName: "gutterBottom",
|
|
100
|
+
publicName: "gutterBottom",
|
|
101
|
+
isSignal: true,
|
|
102
|
+
isRequired: false,
|
|
103
|
+
transformFunction: null
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
ngImport: i0,
|
|
107
|
+
template: "<!-- One <ng-content> only: Angular projects content into a single slot, and a\n slot that sits inside a non-rendered @switch branch swallows it (the h1 case\n used to render empty in the browser). The content lives in a template that\n each branch stamps into its element. -->\n<ng-template #content><ng-content /></ng-template>\n\n@switch (elementTag()) {\n @case ('h1') {\n <h1 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h1>\n }\n @case ('h2') {\n <h2 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h2>\n }\n @case ('h3') {\n <h3 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h3>\n }\n @case ('h4') {\n <h4 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h4>\n }\n @case ('h5') {\n <h5 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h5>\n }\n @case ('h6') {\n <h6 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h6>\n }\n @case ('span') {\n <span [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></span>\n }\n @default {\n <p [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></p>\n }\n}\n",
|
|
108
|
+
styles: [":host{display:block}.typography{margin:0;font-family:var(--font-family-base, inherit);color:var(--color-text-primary);transition:color .15s ease-in-out}lc-typography h1.typography-h1,h1.typography-h1{font-size:4.5rem;line-height:5rem;font-weight:700;letter-spacing:-.02em}lc-typography h2.typography-h2,h2.typography-h2{font-size:3rem;line-height:4.5rem;font-weight:700;letter-spacing:-.01em}lc-typography h3.typography-h3,h3.typography-h3{font-size:2.5rem;line-height:4rem;font-weight:600;letter-spacing:-.01em}lc-typography h4.typography-h4,h4.typography-h4{font-size:2rem;line-height:3.5rem;font-weight:600}lc-typography h5.typography-h5,h5.typography-h5{font-size:1.5rem;line-height:3rem;font-weight:600}lc-typography h6.typography-h6,h6.typography-h6{font-size:1rem;line-height:2rem;font-weight:600}lc-typography p.typography-body1,p.typography-body1,.typography-body1{font-size:1rem;line-height:1.5rem;font-weight:400}lc-typography p.typography-body2,p.typography-body2,.typography-body2{font-size:.875rem;line-height:1rem;font-weight:400}lc-typography p.typography-subtitle1,p.typography-subtitle1,.typography-subtitle1{font-size:1.125rem;line-height:1.75rem;font-weight:600}lc-typography p.typography-subtitle2,p.typography-subtitle2,.typography-subtitle2{font-size:.875rem;line-height:1.25rem;font-weight:600}lc-typography span.typography-caption,span.typography-caption,.typography-caption{font-size:.75rem;line-height:1rem;font-weight:400}lc-typography span.typography-overline,span.typography-overline,.typography-overline{font-size:.625rem;line-height:1rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em}.typography.lc-typography--color-primary{color:var(--color-text-primary)}.typography.lc-typography--color-secondary{color:var(--color-text-secondary)}.typography.lc-typography--color-disabled{color:var(--color-text-disabled)}.typography.lc-typography--color-error{color:var(--color-text-error)}.typography.lc-typography--color-success{color:var(--color-text-success)}.typography.lc-typography--color-warning{color:var(--color-text-warning)}.typography.lc-typography--color-info{color:var(--color-on-info-subtle)}.typography.lc-typography--weight-regular{font-weight:400}.typography.lc-typography--weight-medium{font-weight:500}.typography.lc-typography--weight-semibold{font-weight:600}.typography.lc-typography--weight-bold{font-weight:700}.typography.lc-typography--align-left{text-align:left}.typography.lc-typography--align-center{text-align:center}.typography.lc-typography--align-right{text-align:right}.typography.lc-typography--align-justify{text-align:justify}.typography.lc-typography--uppercase{text-transform:uppercase}.typography.lc-typography--lowercase{text-transform:lowercase}.typography.lc-typography--capitalize{text-transform:capitalize}.typography.lc-typography--nowrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.typography.lc-typography--clamp-1{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-2{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-3{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-4{display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-5{display:-webkit-box;-webkit-line-clamp:5;line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-6{display:-webkit-box;-webkit-line-clamp:6;line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--gutter-bottom{margin-bottom:var(--lc-density-gap-md, 1rem)}\n"],
|
|
109
|
+
dependencies: [{
|
|
110
|
+
kind: "directive",
|
|
111
|
+
type: NgTemplateOutlet,
|
|
112
|
+
selector: "[ngTemplateOutlet]",
|
|
113
|
+
inputs: [
|
|
114
|
+
"ngTemplateOutletContext",
|
|
115
|
+
"ngTemplateOutlet",
|
|
116
|
+
"ngTemplateOutletInjector"
|
|
117
|
+
]
|
|
118
|
+
}],
|
|
119
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
120
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
124
|
+
minVersion: "12.0.0",
|
|
125
|
+
version: "22.2.2",
|
|
126
|
+
ngImport: i0,
|
|
127
|
+
type: TypographyComponent,
|
|
128
|
+
decorators: [{
|
|
129
|
+
type: Component,
|
|
130
|
+
args: [{
|
|
131
|
+
selector: "lc-typography",
|
|
132
|
+
standalone: true,
|
|
133
|
+
imports: [NgTemplateOutlet],
|
|
134
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
135
|
+
encapsulation: ViewEncapsulation.None,
|
|
136
|
+
template: "<!-- One <ng-content> only: Angular projects content into a single slot, and a\n slot that sits inside a non-rendered @switch branch swallows it (the h1 case\n used to render empty in the browser). The content lives in a template that\n each branch stamps into its element. -->\n<ng-template #content><ng-content /></ng-template>\n\n@switch (elementTag()) {\n @case ('h1') {\n <h1 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h1>\n }\n @case ('h2') {\n <h2 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h2>\n }\n @case ('h3') {\n <h3 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h3>\n }\n @case ('h4') {\n <h4 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h4>\n }\n @case ('h5') {\n <h5 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h5>\n }\n @case ('h6') {\n <h6 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h6>\n }\n @case ('span') {\n <span [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></span>\n }\n @default {\n <p [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></p>\n }\n}\n",
|
|
137
|
+
styles: [":host{display:block}.typography{margin:0;font-family:var(--font-family-base, inherit);color:var(--color-text-primary);transition:color .15s ease-in-out}lc-typography h1.typography-h1,h1.typography-h1{font-size:4.5rem;line-height:5rem;font-weight:700;letter-spacing:-.02em}lc-typography h2.typography-h2,h2.typography-h2{font-size:3rem;line-height:4.5rem;font-weight:700;letter-spacing:-.01em}lc-typography h3.typography-h3,h3.typography-h3{font-size:2.5rem;line-height:4rem;font-weight:600;letter-spacing:-.01em}lc-typography h4.typography-h4,h4.typography-h4{font-size:2rem;line-height:3.5rem;font-weight:600}lc-typography h5.typography-h5,h5.typography-h5{font-size:1.5rem;line-height:3rem;font-weight:600}lc-typography h6.typography-h6,h6.typography-h6{font-size:1rem;line-height:2rem;font-weight:600}lc-typography p.typography-body1,p.typography-body1,.typography-body1{font-size:1rem;line-height:1.5rem;font-weight:400}lc-typography p.typography-body2,p.typography-body2,.typography-body2{font-size:.875rem;line-height:1rem;font-weight:400}lc-typography p.typography-subtitle1,p.typography-subtitle1,.typography-subtitle1{font-size:1.125rem;line-height:1.75rem;font-weight:600}lc-typography p.typography-subtitle2,p.typography-subtitle2,.typography-subtitle2{font-size:.875rem;line-height:1.25rem;font-weight:600}lc-typography span.typography-caption,span.typography-caption,.typography-caption{font-size:.75rem;line-height:1rem;font-weight:400}lc-typography span.typography-overline,span.typography-overline,.typography-overline{font-size:.625rem;line-height:1rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em}.typography.lc-typography--color-primary{color:var(--color-text-primary)}.typography.lc-typography--color-secondary{color:var(--color-text-secondary)}.typography.lc-typography--color-disabled{color:var(--color-text-disabled)}.typography.lc-typography--color-error{color:var(--color-text-error)}.typography.lc-typography--color-success{color:var(--color-text-success)}.typography.lc-typography--color-warning{color:var(--color-text-warning)}.typography.lc-typography--color-info{color:var(--color-on-info-subtle)}.typography.lc-typography--weight-regular{font-weight:400}.typography.lc-typography--weight-medium{font-weight:500}.typography.lc-typography--weight-semibold{font-weight:600}.typography.lc-typography--weight-bold{font-weight:700}.typography.lc-typography--align-left{text-align:left}.typography.lc-typography--align-center{text-align:center}.typography.lc-typography--align-right{text-align:right}.typography.lc-typography--align-justify{text-align:justify}.typography.lc-typography--uppercase{text-transform:uppercase}.typography.lc-typography--lowercase{text-transform:lowercase}.typography.lc-typography--capitalize{text-transform:capitalize}.typography.lc-typography--nowrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.typography.lc-typography--clamp-1{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-2{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-3{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-4{display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-5{display:-webkit-box;-webkit-line-clamp:5;line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--clamp-6{display:-webkit-box;-webkit-line-clamp:6;line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}.typography.lc-typography--gutter-bottom{margin-bottom:var(--lc-density-gap-md, 1rem)}\n"]
|
|
138
|
+
}]
|
|
139
|
+
}],
|
|
140
|
+
propDecorators: {
|
|
141
|
+
variant: [{
|
|
142
|
+
type: i0.Input,
|
|
143
|
+
args: [{
|
|
144
|
+
isSignal: true,
|
|
145
|
+
alias: "variant",
|
|
146
|
+
required: false
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
align: [{
|
|
150
|
+
type: i0.Input,
|
|
151
|
+
args: [{
|
|
152
|
+
isSignal: true,
|
|
153
|
+
alias: "align",
|
|
154
|
+
required: false
|
|
155
|
+
}]
|
|
156
|
+
}],
|
|
157
|
+
color: [{
|
|
158
|
+
type: i0.Input,
|
|
159
|
+
args: [{
|
|
160
|
+
isSignal: true,
|
|
161
|
+
alias: "color",
|
|
162
|
+
required: false
|
|
163
|
+
}]
|
|
164
|
+
}],
|
|
165
|
+
weight: [{
|
|
166
|
+
type: i0.Input,
|
|
167
|
+
args: [{
|
|
168
|
+
isSignal: true,
|
|
169
|
+
alias: "weight",
|
|
170
|
+
required: false
|
|
171
|
+
}]
|
|
172
|
+
}],
|
|
173
|
+
transform: [{
|
|
174
|
+
type: i0.Input,
|
|
175
|
+
args: [{
|
|
176
|
+
isSignal: true,
|
|
177
|
+
alias: "transform",
|
|
178
|
+
required: false
|
|
179
|
+
}]
|
|
180
|
+
}],
|
|
181
|
+
noWrap: [{
|
|
182
|
+
type: i0.Input,
|
|
183
|
+
args: [{
|
|
184
|
+
isSignal: true,
|
|
185
|
+
alias: "noWrap",
|
|
186
|
+
required: false
|
|
187
|
+
}]
|
|
188
|
+
}],
|
|
189
|
+
lineClamp: [{
|
|
190
|
+
type: i0.Input,
|
|
191
|
+
args: [{
|
|
192
|
+
isSignal: true,
|
|
193
|
+
alias: "lineClamp",
|
|
194
|
+
required: false
|
|
195
|
+
}]
|
|
196
|
+
}],
|
|
197
|
+
gutterBottom: [{
|
|
198
|
+
type: i0.Input,
|
|
199
|
+
args: [{
|
|
200
|
+
isSignal: true,
|
|
201
|
+
alias: "gutterBottom",
|
|
202
|
+
required: false
|
|
203
|
+
}]
|
|
204
|
+
}]
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
export { TypographyComponent };
|
|
208
|
+
|
|
209
|
+
//# sourceMappingURL=lifecorner-angular-ui-kit-typography.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecorner-angular-ui-kit-typography.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/typography/typography.component.ts","../../../../libs/angular-ui-kit/src/lib/typography/typography.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * Typography component for consistent text styling.\n *\n * Features:\n * - Semantic variants (h1–h6, body1, body2, caption, overline)\n * - Automatic HTML element mapping per variant\n * - Text alignment options (left, center, right, justify)\n * - Color variants (primary, secondary, success, warning, error, info)\n * - Font weight overrides (regular, medium, semibold, bold)\n * - Text transform (uppercase, lowercase, capitalize)\n * - Line clamping for text truncation\n * - Gutter bottom margin option\n *\n * @example\n * ```html\n * <lc-typography variant=\"h1\" color=\"primary\">Heading</lc-typography>\n * <lc-typography variant=\"body1\" [lineClamp]=\"2\">Truncated text...</lc-typography>\n * ```\n */\n@Component({\n selector: 'lc-typography',\n templateUrl: './typography.component.html',\n styleUrl: './typography.component.scss',\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None, // Required for global typography utilities\n})\nexport class TypographyComponent {\n /**\n * Typography variant determining the HTML element and default styles\n * - h1-h6: Heading elements with corresponding sizes\n * - body1: Default paragraph text (16px)\n * - body2: Smaller body text (14px)\n * - subtitle1: Larger subtitle (18px)\n * - subtitle2: Smaller subtitle (14px)\n * - caption: Small helper text (12px)\n * - overline: Uppercase accent text (10px)\n * @default 'body1'\n */\n variant = input<\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'body1'\n | 'body2'\n | 'subtitle1'\n | 'subtitle2'\n | 'caption'\n | 'overline'\n >('body1');\n\n /**\n * Text alignment\n * @default 'left'\n */\n align = input<'left' | 'center' | 'right' | 'justify'>('left');\n\n /**\n * Text color using semantic color tokens\n * @default 'primary'\n */\n color = input<'primary' | 'secondary' | 'disabled' | 'error' | 'success' | 'warning' | 'info'>(\n 'primary',\n );\n\n /**\n * Font weight override. When unset, the variant's own weight applies\n * (e.g. h1 is bold, body1 is regular); setting it wins over the variant.\n * @default undefined\n */\n weight = input<'regular' | 'medium' | 'semibold' | 'bold' | undefined>(undefined);\n\n /**\n * Text transform\n * @default 'none'\n */\n transform = input<'none' | 'uppercase' | 'lowercase' | 'capitalize'>('none');\n\n /**\n * Prevent text wrapping (applies ellipsis on overflow)\n * @default false\n */\n noWrap = input<boolean>(false);\n\n /**\n * Limit text to a specific number of lines (1-6)\n * Uses CSS line-clamp for multi-line truncation\n * @default undefined\n */\n lineClamp = input<number | undefined>(undefined);\n\n /**\n * Add bottom margin (1rem) for spacing between elements\n * @default false\n */\n gutterBottom = input<boolean>(false);\n\n /**\n * Compute the HTML element tag based on variant\n */\n readonly elementTag = computed<string>(() => {\n const variantValue = this.variant();\n if (variantValue.startsWith('h')) {\n return variantValue; // h1, h2, h3, h4, h5, h6\n }\n if (variantValue === 'caption' || variantValue === 'overline') {\n return 'span';\n }\n return 'p'; // body1, body2, subtitle1, subtitle2\n });\n\n /**\n * Compute all CSS classes based on inputs.\n *\n * Modifier classes are prefixed (`lc-typography--…`): the component renders\n * with `ViewEncapsulation.None`, so unprefixed names such as `.uppercase` or\n * `.mb-4` would become app-global rules that shadow Tailwind utilities.\n */\n readonly typographyClasses = computed<string>(() => {\n const classes: string[] = ['typography'];\n\n // Variant class\n classes.push(`typography-${this.variant()}`);\n\n // Alignment\n classes.push(`lc-typography--align-${this.align()}`);\n\n // Color\n classes.push(`lc-typography--color-${this.color()}`);\n\n // Weight (only when explicitly set — otherwise the variant's weight applies)\n const weightValue = this.weight();\n if (weightValue) {\n classes.push(`lc-typography--weight-${weightValue}`);\n }\n\n // Transform\n const transformValue = this.transform();\n if (transformValue !== 'none') {\n classes.push(`lc-typography--${transformValue}`);\n }\n\n // No wrap\n if (this.noWrap()) {\n classes.push('lc-typography--nowrap');\n }\n\n // Line clamp\n const lineClampValue = this.lineClamp();\n if (lineClampValue !== undefined && lineClampValue >= 1 && lineClampValue <= 6) {\n classes.push(`lc-typography--clamp-${lineClampValue}`);\n }\n\n // Gutter bottom\n if (this.gutterBottom()) {\n classes.push('lc-typography--gutter-bottom');\n }\n\n return classes.join(' ');\n });\n}\n","<!-- One <ng-content> only: Angular projects content into a single slot, and a\n slot that sits inside a non-rendered @switch branch swallows it (the h1 case\n used to render empty in the browser). The content lives in a template that\n each branch stamps into its element. -->\n<ng-template #content><ng-content /></ng-template>\n\n@switch (elementTag()) {\n @case ('h1') {\n <h1 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h1>\n }\n @case ('h2') {\n <h2 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h2>\n }\n @case ('h3') {\n <h3 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h3>\n }\n @case ('h4') {\n <h4 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h4>\n }\n @case ('h5') {\n <h5 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h5>\n }\n @case ('h6') {\n <h6 [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></h6>\n }\n @case ('span') {\n <span [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></span>\n }\n @default {\n <p [class]=\"typographyClasses()\"><ng-container [ngTemplateOutlet]=\"content\" /></p>\n }\n}\n"],"mappings":";;;AAqCA,IAAa,sBAAb,MAAa,oBAAmB;CAY9B,UAAU,MAaR,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAMV,QAAQ,MAA+C,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAM9D,QAAQ,MACN,WACD,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAOD,SAAS,MAA8D,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAMjF,YAAY,MAAyD,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAM5E,SAAS,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAO9B,YAAY,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAMhD,eAAe,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAK3B,aAAa,eAAsB;EAC1C,MAAM,eAAe,KAAK,QAAO;EACjC,IAAI,aAAa,WAAW,GAAG,GAC7B,OAAO;EAET,IAAI,iBAAiB,aAAa,iBAAiB,YACjD,OAAO;EAET,OAAO;CACT,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CASO,oBAAoB,eAAsB;EACjD,MAAM,UAAoB,CAAC,YAAY;EAGvC,QAAQ,KAAK,cAAc,KAAK,QAAO,GAAI;EAG3C,QAAQ,KAAK,wBAAwB,KAAK,MAA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AAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,cAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,UAAA;EAAA,UCrChC;EAgCA,QAAA,CAAA,wrHAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDCY;GAAgB,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;GAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAIf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAT/B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,YAGb;GAAI,SACP,CAAC,gBAAgB;GAAC,iBACV,wBAAwB;GAAM,eAChC,kBAAkB;GAAI,UAAA;GAAA,QAAA,CAAA,wrHAAA;EAAA,CAAA"}
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, afterNextRender, computed, forwardRef, input, linkedSignal, output, signal, viewChildren } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
let nextUniqueId = 0;
|
|
5
|
+
var VerificationCodeInputComponent = class VerificationCodeInputComponent {
|
|
6
|
+
label = input("Verification Code", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
7
|
+
length = input(6, ...ngDevMode ? [{ debugName: "length" }] : /* istanbul ignore next */ []);
|
|
8
|
+
disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
9
|
+
required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
10
|
+
requiredIndicator = input(true, ...ngDevMode ? [{ debugName: "requiredIndicator" }] : /* istanbul ignore next */ []);
|
|
11
|
+
gap = input("default", ...ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []);
|
|
12
|
+
error = input(void 0, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
13
|
+
autoSubmit = input(false, ...ngDevMode ? [{ debugName: "autoSubmit" }] : /* istanbul ignore next */ []);
|
|
14
|
+
hint = input(void 0, ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
15
|
+
autofocus = input(false, ...ngDevMode ? [{ debugName: "autofocus" }] : /* istanbul ignore next */ []);
|
|
16
|
+
digitAriaLabel = input("Digit {n} of {total}", ...ngDevMode ? [{ debugName: "digitAriaLabel" }] : /* istanbul ignore next */ []);
|
|
17
|
+
digitLabel(index) {
|
|
18
|
+
return this.digitAriaLabel().replace("{n}", String(index + 1)).replace("{total}", String(this.length()));
|
|
19
|
+
}
|
|
20
|
+
complete = output();
|
|
21
|
+
groupId = `lc-verification-code-${nextUniqueId++}`;
|
|
22
|
+
labelId = `${this.groupId}-label`;
|
|
23
|
+
hintId = `${this.groupId}-hint`;
|
|
24
|
+
errorId = `${this.groupId}-error`;
|
|
25
|
+
digitInputs = viewChildren("digitInput", ...ngDevMode ? [{ debugName: "digitInputs" }] : /* istanbul ignore next */ []);
|
|
26
|
+
digits = linkedSignal(() => Array(this.length()).fill(""), ...ngDevMode ? [{ debugName: "digits" }] : /* istanbul ignore next */ []);
|
|
27
|
+
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
28
|
+
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
29
|
+
code = computed(() => this.digits().join(""), ...ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []);
|
|
30
|
+
isComplete = computed(() => this.digits().every((digit) => digit !== ""), ...ngDevMode ? [{ debugName: "isComplete" }] : /* istanbul ignore next */ []);
|
|
31
|
+
hintText = computed(() => {
|
|
32
|
+
const hint = this.hint();
|
|
33
|
+
return hint === void 0 ? `Enter the ${this.length()}-digit code` : hint;
|
|
34
|
+
}, ...ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []);
|
|
35
|
+
describedBy = computed(() => {
|
|
36
|
+
const ids = [];
|
|
37
|
+
if (this.error()) ids.push(this.errorId);
|
|
38
|
+
if (this.hintText()) ids.push(this.hintId);
|
|
39
|
+
return ids.length ? ids.join(" ") : null;
|
|
40
|
+
}, ...ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []);
|
|
41
|
+
onChange = () => {};
|
|
42
|
+
onTouched = () => {};
|
|
43
|
+
constructor() {
|
|
44
|
+
afterNextRender(() => {
|
|
45
|
+
if (this.autofocus()) this.focusInput(0);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
writeValue(value) {
|
|
49
|
+
const chars = (value ?? "").replace(/\D/g, "").slice(0, this.length()).split("");
|
|
50
|
+
this.digits.set(Array.from({ length: this.length() }, (_, i) => chars[i] ?? ""));
|
|
51
|
+
}
|
|
52
|
+
registerOnChange(fn) {
|
|
53
|
+
this.onChange = fn;
|
|
54
|
+
}
|
|
55
|
+
registerOnTouched(fn) {
|
|
56
|
+
this.onTouched = fn;
|
|
57
|
+
}
|
|
58
|
+
setDisabledState(isDisabled) {
|
|
59
|
+
this.formDisabled.set(isDisabled);
|
|
60
|
+
}
|
|
61
|
+
clear() {
|
|
62
|
+
this.digits.set(Array(this.length()).fill(""));
|
|
63
|
+
for (const box of this.digitInputs()) box.nativeElement.value = "";
|
|
64
|
+
this.onChange("");
|
|
65
|
+
this.focusInput(0);
|
|
66
|
+
}
|
|
67
|
+
onDigitInput(event, index) {
|
|
68
|
+
const input = event.target;
|
|
69
|
+
const previous = this.digits()[index];
|
|
70
|
+
if (input.value === "") {
|
|
71
|
+
if (previous) this.setDigit(index, "");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let typed = input.value.replace(/\D/g, "");
|
|
75
|
+
if (previous && typed.length === 2 && typed.includes(previous)) typed = typed.replace(previous, "");
|
|
76
|
+
else if (typed === previous) typed = "";
|
|
77
|
+
if (!typed) {
|
|
78
|
+
input.value = previous;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.applyDigits(typed.split(""), index);
|
|
82
|
+
input.value = this.digits()[index];
|
|
83
|
+
}
|
|
84
|
+
onKeyDown(event, index) {
|
|
85
|
+
const input = event.target;
|
|
86
|
+
if (event.key === "Backspace") {
|
|
87
|
+
if (input.value) this.setDigit(index, "");
|
|
88
|
+
else if (index > 0) {
|
|
89
|
+
this.setDigit(index - 1, "");
|
|
90
|
+
this.focusInput(index - 1);
|
|
91
|
+
}
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
} else if (event.key === "ArrowLeft" && index > 0) {
|
|
94
|
+
this.focusInput(index - 1);
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
} else if (event.key === "ArrowRight" && index < this.length() - 1) {
|
|
97
|
+
this.focusInput(index + 1);
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
onPaste(event) {
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
if (this.isDisabled()) return;
|
|
104
|
+
const pasted = (event.clipboardData?.getData("text") || "").replace(/\D/g, "");
|
|
105
|
+
if (pasted) this.applyDigits(pasted.split(""), 0);
|
|
106
|
+
}
|
|
107
|
+
applyDigits(chars, start) {
|
|
108
|
+
const len = this.length();
|
|
109
|
+
const next = [...this.digits()];
|
|
110
|
+
const count = Math.min(chars.length, len - start);
|
|
111
|
+
for (let i = 0; i < count; i++) next[start + i] = chars[i];
|
|
112
|
+
this.digits.set(next);
|
|
113
|
+
this.onChange(this.code());
|
|
114
|
+
this.focusInput(Math.min(start + count, len - 1));
|
|
115
|
+
if (this.isComplete()) {
|
|
116
|
+
this.onTouched();
|
|
117
|
+
this.complete.emit(this.code());
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
setDigit(index, digit) {
|
|
121
|
+
this.digits.update((digits) => digits.map((d, i) => i === index ? digit : d));
|
|
122
|
+
this.onChange(this.code());
|
|
123
|
+
}
|
|
124
|
+
focusInput(index) {
|
|
125
|
+
const input = this.digitInputs()[index]?.nativeElement;
|
|
126
|
+
if (input) {
|
|
127
|
+
input.focus();
|
|
128
|
+
input.select();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
132
|
+
minVersion: "12.0.0",
|
|
133
|
+
version: "22.2.2",
|
|
134
|
+
ngImport: i0,
|
|
135
|
+
type: VerificationCodeInputComponent,
|
|
136
|
+
deps: [],
|
|
137
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
138
|
+
});
|
|
139
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
140
|
+
minVersion: "17.0.0",
|
|
141
|
+
version: "22.2.2",
|
|
142
|
+
type: VerificationCodeInputComponent,
|
|
143
|
+
isStandalone: true,
|
|
144
|
+
selector: "lc-verification-code-input",
|
|
145
|
+
inputs: {
|
|
146
|
+
label: {
|
|
147
|
+
classPropertyName: "label",
|
|
148
|
+
publicName: "label",
|
|
149
|
+
isSignal: true,
|
|
150
|
+
isRequired: false,
|
|
151
|
+
transformFunction: null
|
|
152
|
+
},
|
|
153
|
+
length: {
|
|
154
|
+
classPropertyName: "length",
|
|
155
|
+
publicName: "length",
|
|
156
|
+
isSignal: true,
|
|
157
|
+
isRequired: false,
|
|
158
|
+
transformFunction: null
|
|
159
|
+
},
|
|
160
|
+
disabled: {
|
|
161
|
+
classPropertyName: "disabled",
|
|
162
|
+
publicName: "disabled",
|
|
163
|
+
isSignal: true,
|
|
164
|
+
isRequired: false,
|
|
165
|
+
transformFunction: null
|
|
166
|
+
},
|
|
167
|
+
required: {
|
|
168
|
+
classPropertyName: "required",
|
|
169
|
+
publicName: "required",
|
|
170
|
+
isSignal: true,
|
|
171
|
+
isRequired: false,
|
|
172
|
+
transformFunction: null
|
|
173
|
+
},
|
|
174
|
+
requiredIndicator: {
|
|
175
|
+
classPropertyName: "requiredIndicator",
|
|
176
|
+
publicName: "requiredIndicator",
|
|
177
|
+
isSignal: true,
|
|
178
|
+
isRequired: false,
|
|
179
|
+
transformFunction: null
|
|
180
|
+
},
|
|
181
|
+
gap: {
|
|
182
|
+
classPropertyName: "gap",
|
|
183
|
+
publicName: "gap",
|
|
184
|
+
isSignal: true,
|
|
185
|
+
isRequired: false,
|
|
186
|
+
transformFunction: null
|
|
187
|
+
},
|
|
188
|
+
error: {
|
|
189
|
+
classPropertyName: "error",
|
|
190
|
+
publicName: "error",
|
|
191
|
+
isSignal: true,
|
|
192
|
+
isRequired: false,
|
|
193
|
+
transformFunction: null
|
|
194
|
+
},
|
|
195
|
+
autoSubmit: {
|
|
196
|
+
classPropertyName: "autoSubmit",
|
|
197
|
+
publicName: "autoSubmit",
|
|
198
|
+
isSignal: true,
|
|
199
|
+
isRequired: false,
|
|
200
|
+
transformFunction: null
|
|
201
|
+
},
|
|
202
|
+
hint: {
|
|
203
|
+
classPropertyName: "hint",
|
|
204
|
+
publicName: "hint",
|
|
205
|
+
isSignal: true,
|
|
206
|
+
isRequired: false,
|
|
207
|
+
transformFunction: null
|
|
208
|
+
},
|
|
209
|
+
autofocus: {
|
|
210
|
+
classPropertyName: "autofocus",
|
|
211
|
+
publicName: "autofocus",
|
|
212
|
+
isSignal: true,
|
|
213
|
+
isRequired: false,
|
|
214
|
+
transformFunction: null
|
|
215
|
+
},
|
|
216
|
+
digitAriaLabel: {
|
|
217
|
+
classPropertyName: "digitAriaLabel",
|
|
218
|
+
publicName: "digitAriaLabel",
|
|
219
|
+
isSignal: true,
|
|
220
|
+
isRequired: false,
|
|
221
|
+
transformFunction: null
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
outputs: { complete: "complete" },
|
|
225
|
+
providers: [{
|
|
226
|
+
provide: NG_VALUE_ACCESSOR,
|
|
227
|
+
useExisting: forwardRef(() => VerificationCodeInputComponent),
|
|
228
|
+
multi: true
|
|
229
|
+
}],
|
|
230
|
+
viewQueries: [{
|
|
231
|
+
propertyName: "digitInputs",
|
|
232
|
+
predicate: ["digitInput"],
|
|
233
|
+
descendants: true,
|
|
234
|
+
isSignal: true
|
|
235
|
+
}],
|
|
236
|
+
ngImport: i0,
|
|
237
|
+
template: "<div class=\"lc-verification-code-input\">\n <!-- The label names the whole group of digit inputs (aria-labelledby), not a single control -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"lc-label\">\n {{ label() }}\n @if (required() && requiredIndicator()) {\n <span class=\"lc-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n\n <div\n [id]=\"groupId\"\n class=\"lc-digit-inputs\"\n [class.lc-digit-inputs--compact]=\"gap() === 'compact'\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (paste)=\"onPaste($event)\"\n >\n @for (digit of digits(); track $index; let i = $index) {\n <input\n #digitInput\n type=\"text\"\n inputmode=\"numeric\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [value]=\"digit\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"digitLabel(i)\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() ? 'true' : null\"\n [attr.aria-describedby]=\"error() ? errorId : null\"\n (input)=\"onDigitInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n class=\"lc-digit-input\"\n [class.lc-digit-input-error]=\"error()\"\n [class.lc-digit-input-filled]=\"digit\"\n />\n }\n </div>\n\n @if (error()) {\n <div [id]=\"errorId\" class=\"lc-error\" role=\"alert\">\n {{ error() }}\n </div>\n }\n\n @if (hintText()) {\n <div [id]=\"hintId\" class=\"lc-hint\">\n {{ hintText() }}\n </div>\n }\n</div>\n",
|
|
238
|
+
styles: ["@charset \"UTF-8\";.lc-verification-code-input{display:flex;flex-direction:column;gap:.75rem;width:100%}.lc-label{font-size:.875rem;font-weight:500;color:var(--color-text-primary);text-align:center}.lc-required{color:var(--color-text-error);margin-left:.25rem}.lc-digit-inputs{display:flex;justify-content:center;gap:.75rem}.lc-digit-inputs--compact{gap:.5rem}.lc-digit-input{width:3rem;height:3.5rem;font-size:1.5rem;font-weight:600;text-align:center;border:2px solid var(--color-field-border);border-radius:var(--border-radius-md);background-color:var(--color-surface);color:var(--color-text-primary);transition:all .2s ease}.lc-digit-input:focus{outline:none;border-color:var(--color-primary-500);box-shadow:0 0 0 4px color-mix(in srgb,var(--color-primary-500) 20%,transparent)}.lc-digit-input:disabled{background-color:var(--color-surface-muted);color:var(--color-text-disabled);cursor:not-allowed}.lc-digit-input.lc-digit-input-error{border-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-error:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--color-error-600) 20%,transparent)}.lc-digit-input.lc-digit-input-filled{border-color:var(--color-primary-500);background-color:var(--color-primary-subtle)}.lc-error{font-size:.875rem;color:var(--color-text-error);text-align:center}.lc-hint{font-size:.875rem;color:var(--color-text-secondary);text-align:center}@media(max-width:480px){.lc-digit-inputs{gap:.5rem}.lc-digit-inputs--compact{gap:.25rem}.lc-digit-input{width:2.75rem;height:3rem;font-size:1.25rem}}\n"],
|
|
239
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
243
|
+
minVersion: "12.0.0",
|
|
244
|
+
version: "22.2.2",
|
|
245
|
+
ngImport: i0,
|
|
246
|
+
type: VerificationCodeInputComponent,
|
|
247
|
+
decorators: [{
|
|
248
|
+
type: Component,
|
|
249
|
+
args: [{
|
|
250
|
+
selector: "lc-verification-code-input",
|
|
251
|
+
standalone: true,
|
|
252
|
+
imports: [],
|
|
253
|
+
providers: [{
|
|
254
|
+
provide: NG_VALUE_ACCESSOR,
|
|
255
|
+
useExisting: forwardRef(() => VerificationCodeInputComponent),
|
|
256
|
+
multi: true
|
|
257
|
+
}],
|
|
258
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
259
|
+
template: "<div class=\"lc-verification-code-input\">\n <!-- The label names the whole group of digit inputs (aria-labelledby), not a single control -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"lc-label\">\n {{ label() }}\n @if (required() && requiredIndicator()) {\n <span class=\"lc-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n\n <div\n [id]=\"groupId\"\n class=\"lc-digit-inputs\"\n [class.lc-digit-inputs--compact]=\"gap() === 'compact'\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (paste)=\"onPaste($event)\"\n >\n @for (digit of digits(); track $index; let i = $index) {\n <input\n #digitInput\n type=\"text\"\n inputmode=\"numeric\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [value]=\"digit\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"digitLabel(i)\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() ? 'true' : null\"\n [attr.aria-describedby]=\"error() ? errorId : null\"\n (input)=\"onDigitInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n class=\"lc-digit-input\"\n [class.lc-digit-input-error]=\"error()\"\n [class.lc-digit-input-filled]=\"digit\"\n />\n }\n </div>\n\n @if (error()) {\n <div [id]=\"errorId\" class=\"lc-error\" role=\"alert\">\n {{ error() }}\n </div>\n }\n\n @if (hintText()) {\n <div [id]=\"hintId\" class=\"lc-hint\">\n {{ hintText() }}\n </div>\n }\n</div>\n",
|
|
260
|
+
styles: ["@charset \"UTF-8\";.lc-verification-code-input{display:flex;flex-direction:column;gap:.75rem;width:100%}.lc-label{font-size:.875rem;font-weight:500;color:var(--color-text-primary);text-align:center}.lc-required{color:var(--color-text-error);margin-left:.25rem}.lc-digit-inputs{display:flex;justify-content:center;gap:.75rem}.lc-digit-inputs--compact{gap:.5rem}.lc-digit-input{width:3rem;height:3.5rem;font-size:1.5rem;font-weight:600;text-align:center;border:2px solid var(--color-field-border);border-radius:var(--border-radius-md);background-color:var(--color-surface);color:var(--color-text-primary);transition:all .2s ease}.lc-digit-input:focus{outline:none;border-color:var(--color-primary-500);box-shadow:0 0 0 4px color-mix(in srgb,var(--color-primary-500) 20%,transparent)}.lc-digit-input:disabled{background-color:var(--color-surface-muted);color:var(--color-text-disabled);cursor:not-allowed}.lc-digit-input.lc-digit-input-error{border-color:var(--color-error-600)}.lc-digit-input.lc-digit-input-error:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--color-error-600) 20%,transparent)}.lc-digit-input.lc-digit-input-filled{border-color:var(--color-primary-500);background-color:var(--color-primary-subtle)}.lc-error{font-size:.875rem;color:var(--color-text-error);text-align:center}.lc-hint{font-size:.875rem;color:var(--color-text-secondary);text-align:center}@media(max-width:480px){.lc-digit-inputs{gap:.5rem}.lc-digit-inputs--compact{gap:.25rem}.lc-digit-input{width:2.75rem;height:3rem;font-size:1.25rem}}\n"]
|
|
261
|
+
}]
|
|
262
|
+
}],
|
|
263
|
+
ctorParameters: () => [],
|
|
264
|
+
propDecorators: {
|
|
265
|
+
label: [{
|
|
266
|
+
type: i0.Input,
|
|
267
|
+
args: [{
|
|
268
|
+
isSignal: true,
|
|
269
|
+
alias: "label",
|
|
270
|
+
required: false
|
|
271
|
+
}]
|
|
272
|
+
}],
|
|
273
|
+
length: [{
|
|
274
|
+
type: i0.Input,
|
|
275
|
+
args: [{
|
|
276
|
+
isSignal: true,
|
|
277
|
+
alias: "length",
|
|
278
|
+
required: false
|
|
279
|
+
}]
|
|
280
|
+
}],
|
|
281
|
+
disabled: [{
|
|
282
|
+
type: i0.Input,
|
|
283
|
+
args: [{
|
|
284
|
+
isSignal: true,
|
|
285
|
+
alias: "disabled",
|
|
286
|
+
required: false
|
|
287
|
+
}]
|
|
288
|
+
}],
|
|
289
|
+
required: [{
|
|
290
|
+
type: i0.Input,
|
|
291
|
+
args: [{
|
|
292
|
+
isSignal: true,
|
|
293
|
+
alias: "required",
|
|
294
|
+
required: false
|
|
295
|
+
}]
|
|
296
|
+
}],
|
|
297
|
+
requiredIndicator: [{
|
|
298
|
+
type: i0.Input,
|
|
299
|
+
args: [{
|
|
300
|
+
isSignal: true,
|
|
301
|
+
alias: "requiredIndicator",
|
|
302
|
+
required: false
|
|
303
|
+
}]
|
|
304
|
+
}],
|
|
305
|
+
gap: [{
|
|
306
|
+
type: i0.Input,
|
|
307
|
+
args: [{
|
|
308
|
+
isSignal: true,
|
|
309
|
+
alias: "gap",
|
|
310
|
+
required: false
|
|
311
|
+
}]
|
|
312
|
+
}],
|
|
313
|
+
error: [{
|
|
314
|
+
type: i0.Input,
|
|
315
|
+
args: [{
|
|
316
|
+
isSignal: true,
|
|
317
|
+
alias: "error",
|
|
318
|
+
required: false
|
|
319
|
+
}]
|
|
320
|
+
}],
|
|
321
|
+
autoSubmit: [{
|
|
322
|
+
type: i0.Input,
|
|
323
|
+
args: [{
|
|
324
|
+
isSignal: true,
|
|
325
|
+
alias: "autoSubmit",
|
|
326
|
+
required: false
|
|
327
|
+
}]
|
|
328
|
+
}],
|
|
329
|
+
hint: [{
|
|
330
|
+
type: i0.Input,
|
|
331
|
+
args: [{
|
|
332
|
+
isSignal: true,
|
|
333
|
+
alias: "hint",
|
|
334
|
+
required: false
|
|
335
|
+
}]
|
|
336
|
+
}],
|
|
337
|
+
autofocus: [{
|
|
338
|
+
type: i0.Input,
|
|
339
|
+
args: [{
|
|
340
|
+
isSignal: true,
|
|
341
|
+
alias: "autofocus",
|
|
342
|
+
required: false
|
|
343
|
+
}]
|
|
344
|
+
}],
|
|
345
|
+
digitAriaLabel: [{
|
|
346
|
+
type: i0.Input,
|
|
347
|
+
args: [{
|
|
348
|
+
isSignal: true,
|
|
349
|
+
alias: "digitAriaLabel",
|
|
350
|
+
required: false
|
|
351
|
+
}]
|
|
352
|
+
}],
|
|
353
|
+
complete: [{
|
|
354
|
+
type: i0.Output,
|
|
355
|
+
args: ["complete"]
|
|
356
|
+
}],
|
|
357
|
+
digitInputs: [{
|
|
358
|
+
type: i0.ViewChildren,
|
|
359
|
+
args: ["digitInput", { isSignal: true }]
|
|
360
|
+
}]
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
export { VerificationCodeInputComponent };
|
|
364
|
+
|
|
365
|
+
//# sourceMappingURL=lifecorner-angular-ui-kit-verification-code-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecorner-angular-ui-kit-verification-code-input.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/verification-code-input/verification-code-input.component.ts","../../../../libs/angular-ui-kit/src/lib/verification-code-input/verification-code-input.component.html"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n afterNextRender,\n computed,\n forwardRef,\n input,\n linkedSignal,\n output,\n signal,\n viewChildren,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet nextUniqueId = 0;\n\n/** Space between the boxes: `default` 12 px (8 px below 480 px), `compact` 8 px (4 px below 480 px). */\nexport type VerificationCodeInputGap = 'default' | 'compact';\n\n/**\n * Verification Code Input Component with one input per digit\n *\n * Features:\n * - Configurable number of digit fields (`length`, default 6)\n * - Automatic focus advancement after entering a digit\n * - Backspace moves to the previous input, arrow keys navigate\n * - Paste / autofill support (splits the code across the inputs); no\n * `maxlength`, so iOS and Android can put the whole `one-time-code` into box 1\n * - `clear()` empties the boxes after a wrong code and focuses box 1\n * - Phones (below 480 px): 44 × 48 px boxes, 8 px apart (6 boxes = 304 px)\n * - Accessible ARIA attributes (labelled group, linked hint and error)\n * - Reactive Forms ControlValueAccessor implementation\n * - `complete` emits exactly once when all digits are entered\n *\n * Usage:\n * ```html\n * <lc-verification-code-input\n * [formControl]=\"codeControl\"\n * label=\"Verification Code\"\n * [length]=\"6\"\n * (complete)=\"onCodeComplete($event)\"\n * ></lc-verification-code-input>\n * ```\n */\n@Component({\n selector: 'lc-verification-code-input',\n standalone: true,\n imports: [],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => VerificationCodeInputComponent),\n multi: true,\n },\n ],\n templateUrl: './verification-code-input.component.html',\n styleUrls: ['./verification-code-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VerificationCodeInputComponent implements ControlValueAccessor {\n /** Group label rendered above the digit inputs */\n readonly label = input<string>('Verification Code');\n\n /** Number of digits */\n readonly length = input<number>(6);\n\n /** Whether the inputs are disabled */\n readonly disabled = input<boolean>(false);\n\n /** Whether the code is required */\n readonly required = input<boolean>(false);\n\n /**\n * Show the `*` of a `required` code; `false` keeps `required` and\n * `aria-required` without the asterisk.\n * @default true\n */\n readonly requiredIndicator = input<boolean>(true);\n\n /** Space between the boxes: `default` (12 px, 8 px below 480 px) or `compact` (8 px, 4 px below 480 px). */\n readonly gap = input<VerificationCodeInputGap>('default');\n\n /** Error message displayed below the inputs (also sets aria-invalid) */\n readonly error = input<string | undefined>(undefined);\n\n /**\n * @deprecated `complete` always emits exactly once when the last digit is\n * entered — bind `(complete)` to auto-submit. Kept so existing bindings\n * keep compiling; it no longer changes behaviour.\n */\n readonly autoSubmit = input<boolean>(false);\n\n /**\n * Hint text below the inputs. Defaults to \"Enter the N-digit code\";\n * pass an empty string to hide the hint.\n */\n readonly hint = input<string | undefined>(undefined);\n\n /** Focus the first digit input once rendered (opt-in) */\n readonly autofocus = input<boolean>(false);\n\n /** Accessible name of each box; `{n}` and `{total}` are replaced. */\n readonly digitAriaLabel = input('Digit {n} of {total}');\n\n /** Accessible name of box `index` (zero-based). */\n protected digitLabel(index: number): string {\n return this.digitAriaLabel().replace('{n}', String(index + 1)).replace('{total}', String(this.length()));\n }\n\n /** Emitted once with the full code when all digits are entered */\n readonly complete = output<string>();\n\n /** Per-instance ids for the group label, hint and error linkage */\n readonly groupId = `lc-verification-code-${nextUniqueId++}`;\n readonly labelId = `${this.groupId}-label`;\n readonly hintId = `${this.groupId}-hint`;\n readonly errorId = `${this.groupId}-error`;\n\n private readonly digitInputs = viewChildren<ElementRef<HTMLInputElement>>('digitInput');\n\n /** One entry per digit; resets when `length` changes */\n readonly digits = linkedSignal<string[]>(() => Array<string>(this.length()).fill(''));\n\n // Internal disabled state (for ControlValueAccessor)\n private readonly formDisabled = signal<boolean>(false);\n\n /** Computed disabled state from both input and form control */\n readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n readonly code = computed(() => this.digits().join(''));\n\n readonly isComplete = computed(() => this.digits().every((digit) => digit !== ''));\n\n readonly hintText = computed(() => {\n const hint = this.hint();\n return hint === undefined ? `Enter the ${this.length()}-digit code` : hint;\n });\n\n readonly describedBy = computed(() => {\n const ids: string[] = [];\n if (this.error()) ids.push(this.errorId);\n if (this.hintText()) ids.push(this.hintId);\n return ids.length ? ids.join(' ') : null;\n });\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (value: string) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n constructor() {\n afterNextRender(() => {\n if (this.autofocus()) {\n this.focusInput(0);\n }\n });\n }\n\n /**\n * ControlValueAccessor: Write value from form control\n */\n writeValue(value: string | null | undefined): void {\n const chars = (value ?? '').replace(/\\D/g, '').slice(0, this.length()).split('');\n this.digits.set(Array.from({ length: this.length() }, (_, i) => chars[i] ?? ''));\n }\n\n /**\n * ControlValueAccessor: Register onChange callback\n */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /**\n * ControlValueAccessor: Register onTouched callback\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * ControlValueAccessor: Set disabled state\n */\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /**\n * Empty every box (e.g. after a wrong code), report `''` to the form and\n * focus box 1. Writing `''` through the form control empties the boxes too,\n * without moving the focus.\n */\n clear(): void {\n this.digits.set(Array<string>(this.length()).fill(''));\n for (const box of this.digitInputs()) {\n box.nativeElement.value = '';\n }\n this.onChange('');\n this.focusInput(0);\n }\n\n /**\n * Handle digit input\n */\n onDigitInput(event: Event, index: number): void {\n const input = event.target as HTMLInputElement;\n const previous = this.digits()[index];\n\n if (input.value === '') {\n // Emptied without a Backspace keydown (some Android keyboards send none)\n if (previous) this.setDigit(index, '');\n return;\n }\n\n let typed = input.value.replace(/\\D/g, '');\n // The boxes have no maxlength (it would cut an autofilled code to one\n // digit), so typing into a filled box briefly holds two characters: keep\n // the new digit.\n if (previous && typed.length === 2 && typed.includes(previous)) {\n typed = typed.replace(previous, '');\n } else if (typed === previous) {\n typed = '';\n }\n\n if (!typed) {\n // Only non-digits were added: the signal is unchanged, so restore the DOM here\n input.value = previous;\n return;\n }\n\n // One digit, or several at once (autofill / IME): distribute from this position\n this.applyDigits(typed.split(''), index);\n // Keep this box at one digit even when the signal did not change\n input.value = this.digits()[index];\n }\n\n /**\n * Handle keydown events (backspace, arrow keys)\n */\n onKeyDown(event: KeyboardEvent, index: number): void {\n const input = event.target as HTMLInputElement;\n\n if (event.key === 'Backspace') {\n if (input.value) {\n this.setDigit(index, '');\n } else if (index > 0) {\n // Move to previous input and clear it\n this.setDigit(index - 1, '');\n this.focusInput(index - 1);\n }\n event.preventDefault();\n } else if (event.key === 'ArrowLeft' && index > 0) {\n this.focusInput(index - 1);\n event.preventDefault();\n } else if (event.key === 'ArrowRight' && index < this.length() - 1) {\n this.focusInput(index + 1);\n event.preventDefault();\n }\n }\n\n /**\n * Handle paste event (split the pasted code across the inputs)\n */\n onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n if (this.isDisabled()) {\n return;\n }\n const pasted = (event.clipboardData?.getData('text') || '').replace(/\\D/g, '');\n if (pasted) {\n this.applyDigits(pasted.split(''), 0);\n }\n }\n\n /** Writes `chars` into consecutive slots from `start`, then advances focus and reports completion. */\n private applyDigits(chars: string[], start: number): void {\n const len = this.length();\n const next = [...this.digits()];\n const count = Math.min(chars.length, len - start);\n for (let i = 0; i < count; i++) {\n next[start + i] = chars[i];\n }\n this.digits.set(next);\n this.onChange(this.code());\n\n // Focus the slot after the last written digit (or stay on the last one)\n this.focusInput(Math.min(start + count, len - 1));\n\n if (this.isComplete()) {\n this.onTouched();\n this.complete.emit(this.code());\n }\n }\n\n private setDigit(index: number, digit: string): void {\n this.digits.update((digits) => digits.map((d, i) => (i === index ? digit : d)));\n this.onChange(this.code());\n }\n\n /**\n * Focus specific input by index\n */\n private focusInput(index: number): void {\n const input = this.digitInputs()[index]?.nativeElement;\n if (input) {\n input.focus();\n input.select();\n }\n }\n}\n","<div class=\"lc-verification-code-input\">\n <!-- The label names the whole group of digit inputs (aria-labelledby), not a single control -->\n @if (label()) {\n <span [id]=\"labelId\" class=\"lc-label\">\n {{ label() }}\n @if (required() && requiredIndicator()) {\n <span class=\"lc-required\" aria-hidden=\"true\">*</span>\n }\n </span>\n }\n\n <div\n [id]=\"groupId\"\n class=\"lc-digit-inputs\"\n [class.lc-digit-inputs--compact]=\"gap() === 'compact'\"\n role=\"group\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-describedby]=\"describedBy()\"\n (paste)=\"onPaste($event)\"\n >\n @for (digit of digits(); track $index; let i = $index) {\n <input\n #digitInput\n type=\"text\"\n inputmode=\"numeric\"\n [attr.autocomplete]=\"i === 0 ? 'one-time-code' : 'off'\"\n [value]=\"digit\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"digitLabel(i)\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-invalid]=\"error() ? 'true' : null\"\n [attr.aria-describedby]=\"error() ? errorId : null\"\n (input)=\"onDigitInput($event, i)\"\n (keydown)=\"onKeyDown($event, i)\"\n class=\"lc-digit-input\"\n [class.lc-digit-input-error]=\"error()\"\n [class.lc-digit-input-filled]=\"digit\"\n />\n }\n </div>\n\n @if (error()) {\n <div [id]=\"errorId\" class=\"lc-error\" role=\"alert\">\n {{ error() }}\n </div>\n }\n\n @if (hintText()) {\n <div [id]=\"hintId\" class=\"lc-hint\">\n {{ hintText() }}\n </div>\n }\n</div>\n"],"mappings":";;;AAeA,IAAI,eAAe;AA6CnB,IAAa,iCAAb,MAAa,+BAA8B;CAEhC,QAAQ,MAAc,qBAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAG1C,SAAS,MAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAGzB,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAGhC,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAOhC,oBAAoB,MAAe,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAGxC,MAAM,MAAgC,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;CAGhD,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAO5C,aAAa,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAMlC,OAAO,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAG3C,YAAY,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAGjC,iBAAiB,MAAM,wBAAuB,GA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