@rt-tools/ui-kit-v2 0.23.3 → 0.24.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/fesm2022/rt-tools-ui-kit-v2-accordion.mjs +142 -71
- package/fesm2022/rt-tools-ui-kit-v2-accordion.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs +467 -231
- package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-ai-run-status.mjs +260 -91
- package/fesm2022/rt-tools-ui-kit-v2-ai-run-status.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs +80 -46
- package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-aside.mjs +984 -697
- package/fesm2022/rt-tools-ui-kit-v2-aside.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs +452 -210
- package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs +143 -52
- package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs +158 -83
- package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-breadcrumbs.mjs +335 -0
- package/fesm2022/rt-tools-ui-kit-v2-breadcrumbs.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-button.mjs +437 -363
- package/fesm2022/rt-tools-ui-kit-v2-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs +430 -149
- package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-card.mjs +155 -71
- package/fesm2022/rt-tools-ui-kit-v2-card.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-carousel.mjs +155 -0
- package/fesm2022/rt-tools-ui-kit-v2-carousel.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs +215 -110
- package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs +158 -75
- package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-color-palette.mjs +769 -0
- package/fesm2022/rt-tools-ui-kit-v2-color-palette.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs +462 -253
- package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-container.mjs +1276 -1316
- package/fesm2022/rt-tools-ui-kit-v2-container.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-copy-value.mjs +185 -80
- package/fesm2022/rt-tools-ui-kit-v2-copy-value.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs +2321 -2619
- package/fesm2022/rt-tools-ui-kit-v2-core.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs +100 -44
- package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-counter.mjs +290 -155
- package/fesm2022/rt-tools-ui-kit-v2-counter.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs +2097 -858
- package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs +2247 -1176
- package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs +1043 -705
- package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs +810 -525
- package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs +158 -138
- package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs +177 -67
- package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs +550 -477
- package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs +185 -168
- package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs +116 -43
- package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-draggable-tree.mjs +585 -0
- package/fesm2022/rt-tools-ui-kit-v2-draggable-tree.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs +755 -259
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs +3266 -1115
- package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs +190 -55
- package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs +283 -103
- package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-field.mjs +393 -177
- package/fesm2022/rt-tools-ui-kit-v2-field.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs +399 -207
- package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs +288 -212
- package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs +262 -116
- package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs +57 -31
- package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs +258 -90
- package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs +249 -215
- package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-header.mjs +199 -71
- package/fesm2022/rt-tools-ui-kit-v2-header.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree-selector.mjs +231 -0
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree-selector.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree.mjs +336 -0
- package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs +451 -162
- package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-icon.mjs +931 -686
- package/fesm2022/rt-tools-ui-kit-v2-icon.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs +664 -491
- package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs +574 -222
- package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs +150 -36
- package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-inline-edit.mjs +606 -0
- package/fesm2022/rt-tools-ui-kit-v2-inline-edit.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs +461 -355
- package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-input.mjs +338 -143
- package/fesm2022/rt-tools-ui-kit-v2-input.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs +135 -48
- package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-logo.mjs +166 -92
- package/fesm2022/rt-tools-ui-kit-v2-logo.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs +118 -56
- package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-menu.mjs +1054 -527
- package/fesm2022/rt-tools-ui-kit-v2-menu.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-message.mjs +230 -104
- package/fesm2022/rt-tools-ui-kit-v2-message.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs +210 -70
- package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs +532 -311
- package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs +125 -50
- package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-note.mjs +73 -43
- package/fesm2022/rt-tools-ui-kit-v2-note.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs +161 -53
- package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs +491 -310
- package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs +374 -174
- package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs +202 -159
- package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-popover.mjs +438 -309
- package/fesm2022/rt-tools-ui-kit-v2-popover.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-profile-menu.mjs +295 -0
- package/fesm2022/rt-tools-ui-kit-v2-profile-menu.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs +135 -45
- package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs +293 -171
- package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-radius.mjs +62 -55
- package/fesm2022/rt-tools-ui-kit-v2-radius.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs +3379 -1466
- package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs +114 -116
- package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs +406 -299
- package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs +137 -36
- package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-select.mjs +687 -468
- package/fesm2022/rt-tools-ui-kit-v2-select.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs +2195 -1569
- package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs +187 -48
- package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs +242 -122
- package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs +439 -0
- package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs +218 -69
- package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs +292 -91
- package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs +225 -138
- package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs +150 -116
- package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs +2462 -1583
- package/fesm2022/rt-tools-ui-kit-v2-table.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs +647 -346
- package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tag.mjs +335 -121
- package/fesm2022/rt-tools-ui-kit-v2-tag.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs +217 -84
- package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs +151 -72
- package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs +697 -226
- package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs +92 -38
- package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toast.mjs +752 -338
- package/fesm2022/rt-tools-ui-kit-v2-toast.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs +310 -129
- package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs +286 -158
- package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs +270 -134
- package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs +322 -202
- package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs +908 -0
- package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-tree.mjs +785 -0
- package/fesm2022/rt-tools-ui-kit-v2-tree.mjs.map +1 -0
- package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs +118 -63
- package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs +783 -262
- package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs +633 -294
- package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs.map +1 -1
- package/fesm2022/rt-tools-ui-kit-v2.mjs +100 -103
- package/package.json +45 -1
- package/src/assets/icons/collapse-all.svg +9 -0
- package/src/assets/icons/expand-all.svg +9 -0
- package/src/assets/icons-material/collapse-all.fill.svg +5 -0
- package/src/assets/icons-material/collapse-all.svg +5 -0
- package/src/assets/icons-material/expand-all.fill.svg +5 -0
- package/src/assets/icons-material/expand-all.svg +5 -0
- package/src/assets/icons-material/undo.fill.svg +5 -0
- package/src/assets/icons-material/undo.svg +5 -0
- package/src/lib/components/bottom-sheet/CONTEXT.md +20 -2
- package/src/lib/components/bottom-sheet/rt-bottom-sheet.component.scss +36 -1
- package/src/lib/components/breadcrumbs/CONTEXT.md +37 -0
- package/src/lib/components/breadcrumbs/rt-breadcrumbs.component.scss +205 -0
- package/src/lib/components/carousel/CONTEXT.md +42 -0
- package/src/lib/components/carousel/rt-carousel.component.scss +117 -0
- package/src/lib/components/checkbox/CONTEXT.md +3 -0
- package/src/lib/components/checkbox/rt-checkbox.component.scss +9 -3
- package/src/lib/components/color-palette/CONTEXT.md +49 -0
- package/src/lib/components/color-palette/picker/rt-color-picker.component.scss +161 -0
- package/src/lib/components/color-palette/rt-color-palette.component.scss +132 -0
- package/src/lib/components/draggable-tree/CONTEXT.md +54 -0
- package/src/lib/components/draggable-tree/rt-draggable-tree.component.scss +219 -0
- package/src/lib/components/hybrid-tree/CONTEXT.md +31 -0
- package/src/lib/components/hybrid-tree-selector/CONTEXT.md +25 -0
- package/src/lib/components/icon-button/CONTEXT.md +3 -0
- package/src/lib/components/inline-edit/CONTEXT.md +41 -0
- package/src/lib/components/inline-edit/rt-inline-edit.component.scss +274 -0
- package/src/lib/components/popover/CONTEXT.md +3 -0
- package/src/lib/components/profile-menu/CONTEXT.md +32 -0
- package/src/lib/components/profile-menu/rt-profile-menu.component.scss +104 -0
- package/src/lib/components/speed-menu/CONTEXT.md +34 -0
- package/src/lib/components/speed-menu/rt-speed-menu.component.scss +118 -0
- package/src/lib/components/tag/rt-tag.component.scss +12 -0
- package/src/lib/components/thread-list/CONTEXT.md +1 -0
- package/src/lib/components/thread-list/rt-thread-list.component.scss +2 -1
- package/src/lib/components/toolbar/CONTEXT.md +9 -4
- package/src/lib/components/toolbar/rt-toolbar.component.scss +10 -2
- package/src/lib/components/tooltip/CONTEXT.md +8 -1
- package/src/lib/components/tree/CONTEXT.md +66 -0
- package/src/lib/components/tree/rt-tree.component.scss +313 -0
- package/src/lib/components/tree-selector/CONTEXT.md +47 -0
- package/src/lib/components/tree-selector/rt-tree-selector.component.scss +121 -0
- package/src/styles/_primitives.scss +4 -0
- package/src/styles/_semantic.scss +5 -0
- package/styles/tokens.css +43 -0
- package/types/rt-tools-ui-kit-v2-accordion.d.ts +31 -24
- package/types/rt-tools-ui-kit-v2-action-bar.d.ts +112 -91
- package/types/rt-tools-ui-kit-v2-ai-run-status.d.ts +64 -40
- package/types/rt-tools-ui-kit-v2-aside-section.d.ts +13 -10
- package/types/rt-tools-ui-kit-v2-aside.d.ts +268 -206
- package/types/rt-tools-ui-kit-v2-autocomplete.d.ts +102 -61
- package/types/rt-tools-ui-kit-v2-bar-list.d.ts +39 -27
- package/types/rt-tools-ui-kit-v2-bottom-sheet.d.ts +31 -20
- package/types/rt-tools-ui-kit-v2-breadcrumbs.d.ts +89 -0
- package/types/rt-tools-ui-kit-v2-button.d.ts +119 -59
- package/types/rt-tools-ui-kit-v2-calendar.d.ts +151 -86
- package/types/rt-tools-ui-kit-v2-card.d.ts +42 -21
- package/types/rt-tools-ui-kit-v2-carousel.d.ts +76 -0
- package/types/rt-tools-ui-kit-v2-checkbox.d.ts +48 -24
- package/types/rt-tools-ui-kit-v2-collapsible-text.d.ts +28 -20
- package/types/rt-tools-ui-kit-v2-color-palette.d.ts +208 -0
- package/types/rt-tools-ui-kit-v2-confirm-popover.d.ts +104 -47
- package/types/rt-tools-ui-kit-v2-container.d.ts +278 -221
- package/types/rt-tools-ui-kit-v2-copy-value.d.ts +39 -24
- package/types/rt-tools-ui-kit-v2-core.d.ts +862 -865
- package/types/rt-tools-ui-kit-v2-counter-row.d.ts +20 -12
- package/types/rt-tools-ui-kit-v2-counter.d.ts +70 -38
- package/types/rt-tools-ui-kit-v2-data-list.d.ts +429 -264
- package/types/rt-tools-ui-kit-v2-data-table.d.ts +500 -351
- package/types/rt-tools-ui-kit-v2-date-picker.d.ts +164 -138
- package/types/rt-tools-ui-kit-v2-date-range.d.ts +102 -84
- package/types/rt-tools-ui-kit-v2-delta-view.d.ts +16 -13
- package/types/rt-tools-ui-kit-v2-detail-list.d.ts +23 -16
- package/types/rt-tools-ui-kit-v2-dialog.d.ts +130 -101
- package/types/rt-tools-ui-kit-v2-dot-field.d.ts +10 -13
- package/types/rt-tools-ui-kit-v2-download-link.d.ts +22 -17
- package/types/rt-tools-ui-kit-v2-draggable-tree.d.ts +132 -0
- package/types/rt-tools-ui-kit-v2-dynamic-list.d.ts +185 -96
- package/types/rt-tools-ui-kit-v2-dynamic-selector.d.ts +904 -404
- package/types/rt-tools-ui-kit-v2-empty-state.d.ts +48 -19
- package/types/rt-tools-ui-kit-v2-expansion-panel.d.ts +67 -39
- package/types/rt-tools-ui-kit-v2-field.d.ts +90 -49
- package/types/rt-tools-ui-kit-v2-file-card.d.ts +115 -75
- package/types/rt-tools-ui-kit-v2-file-drop.d.ts +75 -48
- package/types/rt-tools-ui-kit-v2-file-input.d.ts +53 -36
- package/types/rt-tools-ui-kit-v2-file-list.d.ts +5 -8
- package/types/rt-tools-ui-kit-v2-filter-control.d.ts +83 -49
- package/types/rt-tools-ui-kit-v2-form-control.d.ts +102 -74
- package/types/rt-tools-ui-kit-v2-header.d.ts +40 -22
- package/types/rt-tools-ui-kit-v2-hybrid-tree-selector.d.ts +14 -0
- package/types/rt-tools-ui-kit-v2-hybrid-tree.d.ts +72 -0
- package/types/rt-tools-ui-kit-v2-icon-button.d.ts +190 -90
- package/types/rt-tools-ui-kit-v2-icon.d.ts +160 -129
- package/types/rt-tools-ui-kit-v2-image-cropper.d.ts +151 -111
- package/types/rt-tools-ui-kit-v2-image-upload.d.ts +159 -85
- package/types/rt-tools-ui-kit-v2-info-item.d.ts +26 -13
- package/types/rt-tools-ui-kit-v2-inline-edit.d.ts +194 -0
- package/types/rt-tools-ui-kit-v2-input-number.d.ts +102 -53
- package/types/rt-tools-ui-kit-v2-input.d.ts +82 -43
- package/types/rt-tools-ui-kit-v2-live-badge.d.ts +30 -17
- package/types/rt-tools-ui-kit-v2-logo.d.ts +49 -32
- package/types/rt-tools-ui-kit-v2-markdown-text.d.ts +26 -17
- package/types/rt-tools-ui-kit-v2-menu.d.ts +272 -155
- package/types/rt-tools-ui-kit-v2-message.d.ts +59 -33
- package/types/rt-tools-ui-kit-v2-money-list.d.ts +36 -18
- package/types/rt-tools-ui-kit-v2-multiselect.d.ts +114 -80
- package/types/rt-tools-ui-kit-v2-night-grid.d.ts +34 -25
- package/types/rt-tools-ui-kit-v2-note.d.ts +12 -9
- package/types/rt-tools-ui-kit-v2-notifications-bell.d.ts +37 -16
- package/types/rt-tools-ui-kit-v2-page-header.d.ts +218 -150
- package/types/rt-tools-ui-kit-v2-pagination.d.ts +99 -63
- package/types/rt-tools-ui-kit-v2-photo-viewer.d.ts +61 -66
- package/types/rt-tools-ui-kit-v2-popover.d.ts +116 -55
- package/types/rt-tools-ui-kit-v2-profile-menu.d.ts +103 -0
- package/types/rt-tools-ui-kit-v2-prompt-suggestion.d.ts +26 -16
- package/types/rt-tools-ui-kit-v2-radio-button.d.ts +85 -43
- package/types/rt-tools-ui-kit-v2-radius.d.ts +18 -15
- package/types/rt-tools-ui-kit-v2-rich-editor.d.ts +931 -590
- package/types/rt-tools-ui-kit-v2-ripple.d.ts +28 -25
- package/types/rt-tools-ui-kit-v2-scroll-area.d.ts +60 -58
- package/types/rt-tools-ui-kit-v2-section-nav.d.ts +32 -22
- package/types/rt-tools-ui-kit-v2-select.d.ts +182 -139
- package/types/rt-tools-ui-kit-v2-side-menu.d.ts +452 -349
- package/types/rt-tools-ui-kit-v2-skeleton-wrapper.d.ts +53 -20
- package/types/rt-tools-ui-kit-v2-skeleton.d.ts +55 -26
- package/types/rt-tools-ui-kit-v2-speed-menu.d.ts +131 -0
- package/types/rt-tools-ui-kit-v2-spinner.d.ts +56 -28
- package/types/rt-tools-ui-kit-v2-split-button.d.ts +96 -55
- package/types/rt-tools-ui-kit-v2-stat-tile.d.ts +88 -60
- package/types/rt-tools-ui-kit-v2-stepper.d.ts +50 -37
- package/types/rt-tools-ui-kit-v2-table.d.ts +631 -480
- package/types/rt-tools-ui-kit-v2-tabs.d.ts +198 -113
- package/types/rt-tools-ui-kit-v2-tag.d.ts +106 -53
- package/types/rt-tools-ui-kit-v2-textarea.d.ts +48 -25
- package/types/rt-tools-ui-kit-v2-theme-toggle.d.ts +28 -26
- package/types/rt-tools-ui-kit-v2-thread-list.d.ts +154 -94
- package/types/rt-tools-ui-kit-v2-timeline.d.ts +30 -28
- package/types/rt-tools-ui-kit-v2-toast.d.ts +174 -98
- package/types/rt-tools-ui-kit-v2-toggle-button-group.d.ts +132 -86
- package/types/rt-tools-ui-kit-v2-toggle-switch.d.ts +88 -50
- package/types/rt-tools-ui-kit-v2-toolbar.d.ts +30 -27
- package/types/rt-tools-ui-kit-v2-tooltip.d.ts +65 -41
- package/types/rt-tools-ui-kit-v2-tree-selector.d.ts +257 -0
- package/types/rt-tools-ui-kit-v2-tree.d.ts +282 -0
- package/types/rt-tools-ui-kit-v2-welcome-dialog.d.ts +21 -24
- package/types/rt-tools-ui-kit-v2-workspace-details.d.ts +195 -124
- package/types/rt-tools-ui-kit-v2-workspace.d.ts +122 -79
- package/types/rt-tools-ui-kit-v2.d.ts +100 -90
- package/fesm2022/rt-tools-ui-kit-v2.mjs.map +0 -1
|
@@ -1,214 +1,456 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { BlockDirective, ElemDirective, ModDirective } from
|
|
5
|
-
import { RT_KIT_LABELS } from
|
|
6
|
-
import { RtFormControlBase } from
|
|
7
|
-
import { RtIconComponent } from
|
|
8
|
-
import { RtIconButtonComponent } from
|
|
9
|
-
import { RtPopoverDirective } from
|
|
10
|
-
import * as i1 from
|
|
11
|
-
import { RtRadiusDirective } from
|
|
12
|
-
import { rtScrollActiveOptionIntoView } from
|
|
13
|
-
|
|
14
|
-
const BEM_BLOCK = 'rt-autocomplete';
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, ViewEncapsulation, booleanAttribute, computed, forwardRef, inject, input, output, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { BlockDirective, ElemDirective, ModDirective } from "@rt-tools/core";
|
|
5
|
+
import { RT_KIT_LABELS } from "@rt-tools/ui-kit-v2/core";
|
|
6
|
+
import { RtFormControlBase } from "@rt-tools/ui-kit-v2/form-control";
|
|
7
|
+
import { RtIconComponent } from "@rt-tools/ui-kit-v2/icon";
|
|
8
|
+
import { RtIconButtonComponent } from "@rt-tools/ui-kit-v2/icon-button";
|
|
9
|
+
import { RtPopoverDirective } from "@rt-tools/ui-kit-v2/popover";
|
|
10
|
+
import * as i1 from "@rt-tools/ui-kit-v2/radius";
|
|
11
|
+
import { RtRadiusDirective } from "@rt-tools/ui-kit-v2/radius";
|
|
12
|
+
import { rtScrollActiveOptionIntoView } from "@rt-tools/ui-kit-v2/select";
|
|
13
|
+
const BEM_BLOCK = "rt-autocomplete";
|
|
15
14
|
let panelIdSeed = 0;
|
|
16
15
|
function nextPanelId() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Typeahead/autocomplete с server-side filter через `(complete)` event.
|
|
22
|
-
*
|
|
23
|
-
* Panel рендерится через CDK Overlay (`[rtPopover]` trigger="manual" на input'е)
|
|
24
|
-
* — открывается по набору текста (не click/hover), не обрезается overflow.
|
|
25
|
-
* Подписчик получает `(complete)` с текущей строкой и сам грузит подсказки.
|
|
26
|
-
*
|
|
27
|
-
* CVA через общий `RtFormControlBase`. Generic `TItem` — тип подсказки и
|
|
28
|
-
* selected value. Крестик (`clearable`) виден при непустом тексте — очищает и
|
|
29
|
-
* текст, и выбранный объект. Keyboard-nav (activedescendant): ArrowUp/Down —
|
|
30
|
-
* highlight, Enter — выбрать активную, Escape — закрыть. Home/End — deferred.
|
|
31
|
-
*/
|
|
32
|
-
class RtAutocompleteComponent extends RtFormControlBase {
|
|
33
|
-
constructor() {
|
|
34
|
-
super();
|
|
35
|
-
this.t = inject(RT_KIT_LABELS);
|
|
36
|
-
this.panelId = `rt-autocomplete-panel-${nextPanelId()}`;
|
|
37
|
-
this.popover = viewChild.required(RtPopoverDirective, /* @ts-ignore */
|
|
38
|
-
...(ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []));
|
|
39
|
-
this.fieldEl = viewChild('fieldEl', /* @ts-ignore */
|
|
40
|
-
...(ngDevMode ? [{ debugName: "fieldEl" }] : /* istanbul ignore next */ []));
|
|
41
|
-
this.inputText = signal('', /* @ts-ignore */
|
|
42
|
-
...(ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []));
|
|
43
|
-
this.activeIndex = signal(-1, /* @ts-ignore */
|
|
44
|
-
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
45
|
-
this.isOpen = computed(() => this.popover().isOpen(), /* @ts-ignore */
|
|
46
|
-
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
47
|
-
/** Идентификатор подсвеченной опции — тот же, что уходит в `aria-activedescendant`. */
|
|
48
|
-
this.activeOptionId = computed(() => this.isOpen() && this.activeIndex() >= 0 ? `${this.panelId}-opt-${this.activeIndex()}` : null, /* @ts-ignore */
|
|
49
|
-
...(ngDevMode ? [{ debugName: "activeOptionId" }] : /* istanbul ignore next */ []));
|
|
50
|
-
this.hasValue = computed(() => this.inputText() !== '', /* @ts-ignore */
|
|
51
|
-
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
52
|
-
this.displayText = computed(() => this.displayWith()(this.value()), /* @ts-ignore */
|
|
53
|
-
...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
|
|
54
|
-
this.suggestions = input([], /* @ts-ignore */
|
|
55
|
-
...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
|
|
56
|
-
this.displayWith = input((item) => String(item ?? ''), /* @ts-ignore */
|
|
57
|
-
...(ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []));
|
|
58
|
-
this.placeholder = input('', /* @ts-ignore */
|
|
59
|
-
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
60
|
-
this.minLength = input(1, /* @ts-ignore */
|
|
61
|
-
...(ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []));
|
|
62
|
-
/** Префикс-иконка слева в поле (например, `map` для поиска). */
|
|
63
|
-
this.iconLeft = input(null, /* @ts-ignore */
|
|
64
|
-
...(ngDevMode ? [{ debugName: "iconLeft" }] : /* istanbul ignore next */ []));
|
|
65
|
-
this.openOnFocus = input(false, { ...(ngDevMode ? { debugName: "openOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
66
|
-
this.itemTemplate = input(null, /* @ts-ignore */
|
|
67
|
-
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
68
|
-
this.complete = output();
|
|
69
|
-
this.itemSelect = output();
|
|
70
|
-
// Подсветка, сдвинутая клавишами, не уходит за край панели с пределом высоты.
|
|
71
|
-
rtScrollActiveOptionIntoView(this.activeOptionId);
|
|
72
|
-
}
|
|
73
|
-
writeValue(value) {
|
|
74
|
-
super.writeValue(value);
|
|
75
|
-
this.inputText.set(this.displayWith()(this.value()));
|
|
76
|
-
}
|
|
77
|
-
setDisabledState(disabled) {
|
|
78
|
-
super.setDisabledState(disabled);
|
|
79
|
-
if (disabled) {
|
|
80
|
-
this.popover().close();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
getEmptyValue() {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
focusAfterClear() {
|
|
87
|
-
this.fieldEl()?.nativeElement.focus();
|
|
88
|
-
}
|
|
89
|
-
clearValue() {
|
|
90
|
-
super.clearValue();
|
|
91
|
-
this.inputText.set('');
|
|
92
|
-
}
|
|
93
|
-
onInput(event) {
|
|
94
|
-
const target = event.target;
|
|
95
|
-
const query = target.value;
|
|
96
|
-
this.inputText.set(query);
|
|
97
|
-
this.activeIndex.set(-1);
|
|
98
|
-
if (query.length >= this.minLength()) {
|
|
99
|
-
this.complete.emit({ query, originalEvent: event });
|
|
100
|
-
this.popover().open();
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
this.popover().close();
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
onFocus() {
|
|
107
|
-
if (!this.openOnFocus()) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
this.complete.emit({ query: this.inputText(), originalEvent: new Event('focus') });
|
|
111
|
-
this.popover().open();
|
|
112
|
-
}
|
|
113
|
-
onBlur() {
|
|
114
|
-
this.markTouched();
|
|
115
|
-
}
|
|
116
|
-
onClosed() {
|
|
117
|
-
this.activeIndex.set(-1);
|
|
118
|
-
}
|
|
119
|
-
onSelect(item) {
|
|
120
|
-
this.value.set(item);
|
|
121
|
-
this.inputText.set(this.displayWith()(item));
|
|
122
|
-
this.emitChange(item);
|
|
123
|
-
this.itemSelect.emit(item);
|
|
124
|
-
this.popover().close();
|
|
125
|
-
}
|
|
126
|
-
onInputKeydown(event) {
|
|
127
|
-
if (this.isDisabled()) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
const key = event.key;
|
|
131
|
-
if (!this.isOpen()) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
switch (key) {
|
|
135
|
-
case 'ArrowDown':
|
|
136
|
-
event.preventDefault();
|
|
137
|
-
this.#moveActive(1);
|
|
138
|
-
break;
|
|
139
|
-
case 'ArrowUp':
|
|
140
|
-
event.preventDefault();
|
|
141
|
-
this.#moveActive(-1);
|
|
142
|
-
break;
|
|
143
|
-
case 'Enter':
|
|
144
|
-
event.preventDefault();
|
|
145
|
-
this.#selectActive();
|
|
146
|
-
break;
|
|
147
|
-
case 'Escape':
|
|
148
|
-
event.preventDefault();
|
|
149
|
-
this.popover().close();
|
|
150
|
-
break;
|
|
151
|
-
default:
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
#moveActive(delta) {
|
|
156
|
-
const items = this.suggestions();
|
|
157
|
-
if (items.length === 0) {
|
|
158
|
-
this.activeIndex.set(-1);
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
const index = this.activeIndex();
|
|
162
|
-
const next = (index + delta + items.length) % items.length;
|
|
163
|
-
this.activeIndex.set(next);
|
|
164
|
-
}
|
|
165
|
-
#selectActive() {
|
|
166
|
-
const items = this.suggestions();
|
|
167
|
-
const index = this.activeIndex();
|
|
168
|
-
if (index >= 0 && index < items.length) {
|
|
169
|
-
this.onSelect(items[index]);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
173
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtAutocompleteComponent, isStandalone: true, selector: "rt-autocomplete", inputs: { suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, openOnFocus: { classPropertyName: "openOnFocus", publicName: "openOnFocus", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { complete: "complete", itemSelect: "itemSelect" }, host: { properties: { "class.rt-autocomplete--open": "isOpen()", "class.rt-autocomplete--disabled": "isDisabled()", "class.rt-autocomplete--readonly": "isReadonly()", "class.rt-autocomplete--invalid": "isInvalid()", "class.rt-autocomplete--borderless": "!bordered()", "class.rt-autocomplete--size--sm": "size() === 'sm'", "class.rt-autocomplete--size--lg": "size() === 'lg'" }, classAttribute: "rt-autocomplete" }, providers: [
|
|
174
|
-
// Алиас базового токена — для contentChild(RtFormControlBase) в rt-field.
|
|
175
|
-
{ provide: RtFormControlBase, useExisting: forwardRef(() => RtAutocompleteComponent) },
|
|
176
|
-
], viewQueries: [{ propertyName: "popover", first: true, predicate: RtPopoverDirective, descendants: true, isSignal: true }, { propertyName: "fieldEl", first: true, predicate: ["fieldEl"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.RtRadiusDirective, inputs: ["radius", "radius"] }], ngImport: i0, template: "<ng-container rtBlock=\"rt-autocomplete\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"autocomplete-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '\u2014' }}</span>\n }\n <div rtElem=\"field\" rtPopoverTrigger=\"manual\" rtPopoverWidth=\"trigger\" [rtPopover]=\"panelTpl\" (rtPopoverClosed)=\"onClosed()\">\n @if (iconLeft(); as left) {\n <rt-icon rtElem=\"icon-left\" size=\"sm\" color=\"muted\" [name]=\"left\" />\n }\n <input\n #fieldEl\n rtElem=\"input\"\n qa-dataid=\"autocomplete-input\"\n type=\"text\"\n autocomplete=\"off\"\n role=\"combobox\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [placeholder]=\"placeholder()\"\n [value]=\"inputText()\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onInputKeydown($event)\" />\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"autocomplete-clear\"\n icon=\"ico-close\"\n size=\"sm\"\n variant=\"ghost\"\n iconColor=\"muted\"\n [ariaLabel]=\"t().uiClear\"\n [tabIndex]=\"-1\"\n (clicked)=\"clear($event)\" />\n }\n </div>\n\n <ng-template #panelTpl>\n <!--\n \u041E\u043F\u0446\u0438\u0438 \u0432\u044B\u0431\u0438\u0440\u0430\u044E\u0442\u0441\u044F \u043C\u044B\u0448\u044C\u044E \u0447\u0435\u0440\u0435\u0437 (click); keyboard-nav \u2014 \u043D\u0430 input'\u0435\n (activedescendant), \u043E\u043F\u0446\u0438\u0438 \u043D\u0435 focusable \u0438\u043D\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043B\u044C\u043D\u043E.\n -->\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <ul rtElem=\"panel\" qa-dataid=\"autocomplete-panel\" role=\"listbox\" [id]=\"panelId\">\n @for (item of suggestions(); track $index; let i = $index) {\n <li\n rtElem=\"option\"\n qa-dataid=\"autocomplete-option\"\n role=\"option\"\n [id]=\"panelId + '-opt-' + i\"\n [rtMod]=\"{ active: i === activeIndex() }\"\n [attr.aria-selected]=\"item === value()\"\n (click)=\"onSelect(item)\">\n @if (itemTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: item }\" />\n } @else {\n {{ displayWith()(item) }}\n }\n </li>\n } @empty {\n <li rtElem=\"empty\" qa-dataid=\"autocomplete-empty\">{{ t().uiNothingFound }}</li>\n }\n </ul>\n </ng-template>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-autocomplete{--rt-autocomplete-radius: var(--rt-input-radius);position:relative;display:block;width:100%}.rt-autocomplete__field{display:inline-flex;width:100%;min-height:var(--rt-input-height);box-sizing:border-box;align-items:center;padding:var(--rt-input-padding-y) var(--rt-input-padding-x);border:var(--rt-input-border-width) solid var(--rt-input-color-border);border-radius:var(--rt-autocomplete-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:text;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);transition:var(--rt-input-transition)}.rt-autocomplete__field:focus-within{border-color:var(--rt-input-color-border-focus);box-shadow:var(--rt-input-focus-shadow);outline:2px solid transparent;outline-offset:var(--rt-input-focus-outline-offset)}.rt-autocomplete--borderless .rt-autocomplete__field{border-color:transparent}.rt-autocomplete--open .rt-autocomplete__field{border-color:var(--rt-input-color-border-focus)}.rt-autocomplete--invalid .rt-autocomplete__field{border-color:var(--rt-input-color-border-error)}.rt-autocomplete--invalid .rt-autocomplete__field:focus-within{box-shadow:var(--rt-input-focus-shadow-error)}.rt-autocomplete--disabled .rt-autocomplete__field{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-autocomplete--size--sm .rt-autocomplete__field{min-height:var(--rt-input-height-sm)}.rt-autocomplete--size--lg .rt-autocomplete__field{min-height:var(--rt-input-height-lg)}.rt-autocomplete--readonly .rt-autocomplete__field{display:none}.rt-autocomplete__readonly{display:inline-flex;min-height:var(--rt-input-height);align-items:center;color:var(--rt-field-value-color);font-size:var(--rt-field-value-font-size)}.rt-autocomplete__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-autocomplete__input{min-width:0;flex:1 1 auto;padding:0;border:none;background:transparent;color:inherit;font:inherit;outline:none}.rt-autocomplete__input::placeholder{color:var(--rt-input-color-text-placeholder);opacity:1}.rt-autocomplete__input:disabled{cursor:not-allowed}.rt-autocomplete__icon-left,.rt-autocomplete__clear{flex-shrink:0}.rt-autocomplete__panel{--rt-autocomplete-panel-shadow: var(--rt-shadow-md);width:100%;max-height:var(--rt-input-panel-max-height);box-sizing:border-box;padding:var(--rt-space-2xs) 0;border:var(--rt-input-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-input-radius);margin:0;background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-autocomplete-panel-shadow);list-style:none;overflow-y:auto}.rt-autocomplete__option{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-input-font-size)}.rt-autocomplete__option:hover,.rt-autocomplete__option--active{background-color:var(--rt-color-bg-hover)}.rt-autocomplete__empty{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-input-color-text-placeholder);font-style:italic}.rt-autocomplete[data-rt-radius=none]{--rt-autocomplete-radius: var(--rt-radius-none)}.rt-autocomplete[data-rt-radius=xs]{--rt-autocomplete-radius: var(--rt-radius-xs)}.rt-autocomplete[data-rt-radius=sm]{--rt-autocomplete-radius: var(--rt-radius-sm)}.rt-autocomplete[data-rt-radius=ms]{--rt-autocomplete-radius: var(--rt-radius-ms)}.rt-autocomplete[data-rt-radius=md]{--rt-autocomplete-radius: var(--rt-radius-md)}.rt-autocomplete[data-rt-radius=lg]{--rt-autocomplete-radius: var(--rt-radius-lg)}.rt-autocomplete[data-rt-radius=xl]{--rt-autocomplete-radius: var(--rt-radius-xl)}.rt-autocomplete[data-rt-radius=\"2xl\"]{--rt-autocomplete-radius: var(--rt-radius-2xl)}.rt-autocomplete[data-rt-radius=full]{--rt-autocomplete-radius: var(--rt-radius-full)}}\n"], dependencies: [{ kind: "directive", type:
|
|
177
|
-
// Angular
|
|
178
|
-
NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type:
|
|
179
|
-
// standalone components / directives
|
|
180
|
-
RtIconButtonComponent, selector: "rt-icon-button", inputs: ["icon", "glyph", "ariaLabel", "variant", "iconColor", "iconFill", "size", "iconSize", "type", "tooltip", "tabIndex", "loading", "disabled", "active", "indicator"], outputs: ["clicked"] }, { kind: "component", type: RtIconComponent, selector: "rt-icon", inputs: ["name", "glyph", "glyphStrategy", "size", "color", "fill", "spin", "rotate"] }, { kind: "directive", type: RtPopoverDirective, selector: "[rtPopover]", inputs: ["rtPopover", "rtPopoverTrigger", "rtPopoverWidth", "rtPopoverAlign", "rtPopoverFitViewport", "rtPopoverContext", "rtPopoverPanelClass", "rtPopoverDisabled", "rtPopoverOffsetY", "rtPopoverOffsetX"], outputs: ["rtPopoverOpened", "rtPopoverClosed"], exportAs: ["rtPopover"] }, { kind: "directive", type: BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }, { kind: "directive", type: ModDirective, selector: "[rtMod]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
16
|
+
panelIdSeed += 1;
|
|
17
|
+
return panelIdSeed;
|
|
181
18
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
19
|
+
var RtAutocompleteComponent = class RtAutocompleteComponent extends RtFormControlBase {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.t = inject(RT_KIT_LABELS);
|
|
23
|
+
this.panelId = `rt-autocomplete-panel-${nextPanelId()}`;
|
|
24
|
+
this.popover = viewChild.required(RtPopoverDirective, ...ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []);
|
|
25
|
+
this.fieldEl = viewChild("fieldEl", ...ngDevMode ? [{ debugName: "fieldEl" }] : /* istanbul ignore next */ []);
|
|
26
|
+
this.inputText = signal("", ...ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []);
|
|
27
|
+
this.activeIndex = signal(-1, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this.isOpen = computed(() => this.popover().isOpen(), ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
29
|
+
this.activeOptionId = computed(() => this.isOpen() && this.activeIndex() >= 0 ? `${this.panelId}-opt-${this.activeIndex()}` : null, ...ngDevMode ? [{ debugName: "activeOptionId" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.hasValue = computed(() => this.inputText() !== "", ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.displayText = computed(() => this.displayWith()(this.value()), ...ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.suggestions = input([], ...ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.displayWith = input((item) => String(item ?? ""), ...ngDevMode ? [{ debugName: "displayWith" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.minLength = input(1, ...ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.iconLeft = input(null, ...ngDevMode ? [{ debugName: "iconLeft" }] : /* istanbul ignore next */ []);
|
|
37
|
+
this.openOnFocus = input(false, {
|
|
38
|
+
...ngDevMode ? { debugName: "openOnFocus" } : /* istanbul ignore next */ {},
|
|
39
|
+
transform: booleanAttribute
|
|
40
|
+
});
|
|
41
|
+
this.itemTemplate = input(null, ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
|
|
42
|
+
this.complete = output();
|
|
43
|
+
this.itemSelect = output();
|
|
44
|
+
rtScrollActiveOptionIntoView(this.activeOptionId);
|
|
45
|
+
}
|
|
46
|
+
writeValue(value) {
|
|
47
|
+
super.writeValue(value);
|
|
48
|
+
this.inputText.set(this.displayWith()(this.value()));
|
|
49
|
+
}
|
|
50
|
+
setDisabledState(disabled) {
|
|
51
|
+
super.setDisabledState(disabled);
|
|
52
|
+
if (disabled) this.popover().close();
|
|
53
|
+
}
|
|
54
|
+
getEmptyValue() {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
focusAfterClear() {
|
|
58
|
+
this.fieldEl()?.nativeElement.focus();
|
|
59
|
+
}
|
|
60
|
+
clearValue() {
|
|
61
|
+
super.clearValue();
|
|
62
|
+
this.inputText.set("");
|
|
63
|
+
}
|
|
64
|
+
onInput(event) {
|
|
65
|
+
const query = event.target.value;
|
|
66
|
+
this.inputText.set(query);
|
|
67
|
+
this.activeIndex.set(-1);
|
|
68
|
+
if (query.length >= this.minLength()) {
|
|
69
|
+
this.complete.emit({
|
|
70
|
+
query,
|
|
71
|
+
originalEvent: event
|
|
72
|
+
});
|
|
73
|
+
this.popover().open();
|
|
74
|
+
} else this.popover().close();
|
|
75
|
+
}
|
|
76
|
+
onFocus() {
|
|
77
|
+
if (!this.openOnFocus()) return;
|
|
78
|
+
this.complete.emit({
|
|
79
|
+
query: this.inputText(),
|
|
80
|
+
originalEvent: new Event("focus")
|
|
81
|
+
});
|
|
82
|
+
this.popover().open();
|
|
83
|
+
}
|
|
84
|
+
onBlur() {
|
|
85
|
+
this.markTouched();
|
|
86
|
+
}
|
|
87
|
+
onClosed() {
|
|
88
|
+
this.activeIndex.set(-1);
|
|
89
|
+
}
|
|
90
|
+
onSelect(item) {
|
|
91
|
+
this.value.set(item);
|
|
92
|
+
this.inputText.set(this.displayWith()(item));
|
|
93
|
+
this.emitChange(item);
|
|
94
|
+
this.itemSelect.emit(item);
|
|
95
|
+
this.popover().close();
|
|
96
|
+
}
|
|
97
|
+
onInputKeydown(event) {
|
|
98
|
+
if (this.isDisabled()) return;
|
|
99
|
+
const key = event.key;
|
|
100
|
+
if (!this.isOpen()) return;
|
|
101
|
+
switch (key) {
|
|
102
|
+
case "ArrowDown":
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
this.#moveActive(1);
|
|
105
|
+
break;
|
|
106
|
+
case "ArrowUp":
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
this.#moveActive(-1);
|
|
109
|
+
break;
|
|
110
|
+
case "Enter":
|
|
111
|
+
event.preventDefault();
|
|
112
|
+
this.#selectActive();
|
|
113
|
+
break;
|
|
114
|
+
case "Escape":
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
this.popover().close();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
#moveActive(delta) {
|
|
120
|
+
const items = this.suggestions();
|
|
121
|
+
if (items.length === 0) {
|
|
122
|
+
this.activeIndex.set(-1);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const next = (this.activeIndex() + delta + items.length) % items.length;
|
|
126
|
+
this.activeIndex.set(next);
|
|
127
|
+
}
|
|
128
|
+
#selectActive() {
|
|
129
|
+
const items = this.suggestions();
|
|
130
|
+
const index = this.activeIndex();
|
|
131
|
+
if (index >= 0 && index < items.length) this.onSelect(items[index]);
|
|
132
|
+
}
|
|
133
|
+
static {
|
|
134
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
135
|
+
minVersion: "12.0.0",
|
|
136
|
+
version: "22.2.2",
|
|
137
|
+
ngImport: i0,
|
|
138
|
+
type: RtAutocompleteComponent,
|
|
139
|
+
deps: [],
|
|
140
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
static {
|
|
144
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
145
|
+
minVersion: "17.0.0",
|
|
146
|
+
version: "22.2.2",
|
|
147
|
+
type: RtAutocompleteComponent,
|
|
148
|
+
isStandalone: true,
|
|
149
|
+
selector: "rt-autocomplete",
|
|
150
|
+
inputs: {
|
|
151
|
+
suggestions: {
|
|
152
|
+
classPropertyName: "suggestions",
|
|
153
|
+
publicName: "suggestions",
|
|
154
|
+
isSignal: true,
|
|
155
|
+
isRequired: false,
|
|
156
|
+
transformFunction: null
|
|
157
|
+
},
|
|
158
|
+
displayWith: {
|
|
159
|
+
classPropertyName: "displayWith",
|
|
160
|
+
publicName: "displayWith",
|
|
161
|
+
isSignal: true,
|
|
162
|
+
isRequired: false,
|
|
163
|
+
transformFunction: null
|
|
164
|
+
},
|
|
165
|
+
placeholder: {
|
|
166
|
+
classPropertyName: "placeholder",
|
|
167
|
+
publicName: "placeholder",
|
|
168
|
+
isSignal: true,
|
|
169
|
+
isRequired: false,
|
|
170
|
+
transformFunction: null
|
|
171
|
+
},
|
|
172
|
+
minLength: {
|
|
173
|
+
classPropertyName: "minLength",
|
|
174
|
+
publicName: "minLength",
|
|
175
|
+
isSignal: true,
|
|
176
|
+
isRequired: false,
|
|
177
|
+
transformFunction: null
|
|
178
|
+
},
|
|
179
|
+
iconLeft: {
|
|
180
|
+
classPropertyName: "iconLeft",
|
|
181
|
+
publicName: "iconLeft",
|
|
182
|
+
isSignal: true,
|
|
183
|
+
isRequired: false,
|
|
184
|
+
transformFunction: null
|
|
185
|
+
},
|
|
186
|
+
openOnFocus: {
|
|
187
|
+
classPropertyName: "openOnFocus",
|
|
188
|
+
publicName: "openOnFocus",
|
|
189
|
+
isSignal: true,
|
|
190
|
+
isRequired: false,
|
|
191
|
+
transformFunction: null
|
|
192
|
+
},
|
|
193
|
+
itemTemplate: {
|
|
194
|
+
classPropertyName: "itemTemplate",
|
|
195
|
+
publicName: "itemTemplate",
|
|
196
|
+
isSignal: true,
|
|
197
|
+
isRequired: false,
|
|
198
|
+
transformFunction: null
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
outputs: {
|
|
202
|
+
complete: "complete",
|
|
203
|
+
itemSelect: "itemSelect"
|
|
204
|
+
},
|
|
205
|
+
host: {
|
|
206
|
+
properties: {
|
|
207
|
+
"class.rt-autocomplete--open": "isOpen()",
|
|
208
|
+
"class.rt-autocomplete--disabled": "isDisabled()",
|
|
209
|
+
"class.rt-autocomplete--readonly": "isReadonly()",
|
|
210
|
+
"class.rt-autocomplete--invalid": "isInvalid()",
|
|
211
|
+
"class.rt-autocomplete--borderless": "!bordered()",
|
|
212
|
+
"class.rt-autocomplete--size--sm": "size() === 'sm'",
|
|
213
|
+
"class.rt-autocomplete--size--lg": "size() === 'lg'"
|
|
214
|
+
},
|
|
215
|
+
classAttribute: "rt-autocomplete"
|
|
216
|
+
},
|
|
217
|
+
providers: [{
|
|
218
|
+
provide: RtFormControlBase,
|
|
219
|
+
useExisting: forwardRef(() => RtAutocompleteComponent)
|
|
220
|
+
}],
|
|
221
|
+
viewQueries: [{
|
|
222
|
+
propertyName: "popover",
|
|
223
|
+
first: true,
|
|
224
|
+
predicate: RtPopoverDirective,
|
|
225
|
+
descendants: true,
|
|
226
|
+
isSignal: true
|
|
227
|
+
}, {
|
|
228
|
+
propertyName: "fieldEl",
|
|
229
|
+
first: true,
|
|
230
|
+
predicate: ["fieldEl"],
|
|
231
|
+
descendants: true,
|
|
232
|
+
isSignal: true
|
|
233
|
+
}],
|
|
234
|
+
usesInheritance: true,
|
|
235
|
+
hostDirectives: [{
|
|
236
|
+
directive: i1.RtRadiusDirective,
|
|
237
|
+
inputs: ["radius", "radius"]
|
|
238
|
+
}],
|
|
239
|
+
ngImport: i0,
|
|
240
|
+
template: "<ng-container rtBlock=\"rt-autocomplete\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"autocomplete-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '—' }}</span>\n }\n <div rtElem=\"field\" rtPopoverTrigger=\"manual\" rtPopoverWidth=\"trigger\" [rtPopover]=\"panelTpl\" (rtPopoverClosed)=\"onClosed()\">\n @if (iconLeft(); as left) {\n <rt-icon rtElem=\"icon-left\" size=\"sm\" color=\"muted\" [name]=\"left\" />\n }\n <input\n #fieldEl\n rtElem=\"input\"\n qa-dataid=\"autocomplete-input\"\n type=\"text\"\n autocomplete=\"off\"\n role=\"combobox\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [placeholder]=\"placeholder()\"\n [value]=\"inputText()\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onInputKeydown($event)\" />\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"autocomplete-clear\"\n icon=\"ico-close\"\n size=\"sm\"\n variant=\"ghost\"\n iconColor=\"muted\"\n [ariaLabel]=\"t().uiClear\"\n [tabIndex]=\"-1\"\n (clicked)=\"clear($event)\" />\n }\n </div>\n\n <ng-template #panelTpl>\n <!--\n Опции выбираются мышью через (click); keyboard-nav — на input'е\n (activedescendant), опции не focusable индивидуально.\n -->\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <ul rtElem=\"panel\" qa-dataid=\"autocomplete-panel\" role=\"listbox\" [id]=\"panelId\">\n @for (item of suggestions(); track $index; let i = $index) {\n <li\n rtElem=\"option\"\n qa-dataid=\"autocomplete-option\"\n role=\"option\"\n [id]=\"panelId + '-opt-' + i\"\n [rtMod]=\"{ active: i === activeIndex() }\"\n [attr.aria-selected]=\"item === value()\"\n (click)=\"onSelect(item)\">\n @if (itemTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: item }\" />\n } @else {\n {{ displayWith()(item) }}\n }\n </li>\n } @empty {\n <li rtElem=\"empty\" qa-dataid=\"autocomplete-empty\">{{ t().uiNothingFound }}</li>\n }\n </ul>\n </ng-template>\n</ng-container>\n",
|
|
241
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-autocomplete{--rt-autocomplete-radius: var(--rt-input-radius);position:relative;display:block;width:100%}.rt-autocomplete__field{display:inline-flex;width:100%;min-height:var(--rt-input-height);box-sizing:border-box;align-items:center;padding:var(--rt-input-padding-y) var(--rt-input-padding-x);border:var(--rt-input-border-width) solid var(--rt-input-color-border);border-radius:var(--rt-autocomplete-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:text;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);transition:var(--rt-input-transition)}.rt-autocomplete__field:focus-within{border-color:var(--rt-input-color-border-focus);box-shadow:var(--rt-input-focus-shadow);outline:2px solid transparent;outline-offset:var(--rt-input-focus-outline-offset)}.rt-autocomplete--borderless .rt-autocomplete__field{border-color:transparent}.rt-autocomplete--open .rt-autocomplete__field{border-color:var(--rt-input-color-border-focus)}.rt-autocomplete--invalid .rt-autocomplete__field{border-color:var(--rt-input-color-border-error)}.rt-autocomplete--invalid .rt-autocomplete__field:focus-within{box-shadow:var(--rt-input-focus-shadow-error)}.rt-autocomplete--disabled .rt-autocomplete__field{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-autocomplete--size--sm .rt-autocomplete__field{min-height:var(--rt-input-height-sm)}.rt-autocomplete--size--lg .rt-autocomplete__field{min-height:var(--rt-input-height-lg)}.rt-autocomplete--readonly .rt-autocomplete__field{display:none}.rt-autocomplete__readonly{display:inline-flex;min-height:var(--rt-input-height);align-items:center;color:var(--rt-field-value-color);font-size:var(--rt-field-value-font-size)}.rt-autocomplete__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-autocomplete__input{min-width:0;flex:1 1 auto;padding:0;border:none;background:transparent;color:inherit;font:inherit;outline:none}.rt-autocomplete__input::placeholder{color:var(--rt-input-color-text-placeholder);opacity:1}.rt-autocomplete__input:disabled{cursor:not-allowed}.rt-autocomplete__icon-left,.rt-autocomplete__clear{flex-shrink:0}.rt-autocomplete__panel{--rt-autocomplete-panel-shadow: var(--rt-shadow-md);width:100%;max-height:var(--rt-input-panel-max-height);box-sizing:border-box;padding:var(--rt-space-2xs) 0;border:var(--rt-input-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-input-radius);margin:0;background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-autocomplete-panel-shadow);list-style:none;overflow-y:auto}.rt-autocomplete__option{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-input-font-size)}.rt-autocomplete__option:hover,.rt-autocomplete__option--active{background-color:var(--rt-color-bg-hover)}.rt-autocomplete__empty{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-input-color-text-placeholder);font-style:italic}.rt-autocomplete[data-rt-radius=none]{--rt-autocomplete-radius: var(--rt-radius-none)}.rt-autocomplete[data-rt-radius=xs]{--rt-autocomplete-radius: var(--rt-radius-xs)}.rt-autocomplete[data-rt-radius=sm]{--rt-autocomplete-radius: var(--rt-radius-sm)}.rt-autocomplete[data-rt-radius=ms]{--rt-autocomplete-radius: var(--rt-radius-ms)}.rt-autocomplete[data-rt-radius=md]{--rt-autocomplete-radius: var(--rt-radius-md)}.rt-autocomplete[data-rt-radius=lg]{--rt-autocomplete-radius: var(--rt-radius-lg)}.rt-autocomplete[data-rt-radius=xl]{--rt-autocomplete-radius: var(--rt-radius-xl)}.rt-autocomplete[data-rt-radius=\"2xl\"]{--rt-autocomplete-radius: var(--rt-radius-2xl)}.rt-autocomplete[data-rt-radius=full]{--rt-autocomplete-radius: var(--rt-radius-full)}}\n"],
|
|
242
|
+
dependencies: [
|
|
243
|
+
{
|
|
244
|
+
kind: "directive",
|
|
245
|
+
type: NgTemplateOutlet,
|
|
246
|
+
selector: "[ngTemplateOutlet]",
|
|
247
|
+
inputs: [
|
|
248
|
+
"ngTemplateOutletContext",
|
|
249
|
+
"ngTemplateOutlet",
|
|
250
|
+
"ngTemplateOutletInjector"
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
kind: "component",
|
|
255
|
+
type: RtIconButtonComponent,
|
|
256
|
+
selector: "rt-icon-button",
|
|
257
|
+
inputs: [
|
|
258
|
+
"icon",
|
|
259
|
+
"glyph",
|
|
260
|
+
"ariaLabel",
|
|
261
|
+
"variant",
|
|
262
|
+
"iconColor",
|
|
263
|
+
"iconFill",
|
|
264
|
+
"size",
|
|
265
|
+
"iconSize",
|
|
266
|
+
"type",
|
|
267
|
+
"tooltip",
|
|
268
|
+
"tooltipHideOnClick",
|
|
269
|
+
"tabIndex",
|
|
270
|
+
"loading",
|
|
271
|
+
"disabled",
|
|
272
|
+
"active",
|
|
273
|
+
"expanded",
|
|
274
|
+
"indicator"
|
|
275
|
+
],
|
|
276
|
+
outputs: ["clicked"]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
kind: "component",
|
|
280
|
+
type: RtIconComponent,
|
|
281
|
+
selector: "rt-icon",
|
|
282
|
+
inputs: [
|
|
283
|
+
"name",
|
|
284
|
+
"glyph",
|
|
285
|
+
"glyphStrategy",
|
|
286
|
+
"size",
|
|
287
|
+
"color",
|
|
288
|
+
"fill",
|
|
289
|
+
"spin",
|
|
290
|
+
"rotate"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
kind: "directive",
|
|
295
|
+
type: RtPopoverDirective,
|
|
296
|
+
selector: "[rtPopover]",
|
|
297
|
+
inputs: [
|
|
298
|
+
"rtPopover",
|
|
299
|
+
"rtPopoverTrigger",
|
|
300
|
+
"rtPopoverWidth",
|
|
301
|
+
"rtPopoverAlign",
|
|
302
|
+
"rtPopoverFitViewport",
|
|
303
|
+
"rtPopoverContext",
|
|
304
|
+
"rtPopoverPanelClass",
|
|
305
|
+
"rtPopoverDisabled",
|
|
306
|
+
"rtPopoverOffsetY",
|
|
307
|
+
"rtPopoverOffsetX",
|
|
308
|
+
"rtPopoverPositions"
|
|
309
|
+
],
|
|
310
|
+
outputs: ["rtPopoverOpened", "rtPopoverClosed"],
|
|
311
|
+
exportAs: ["rtPopover"]
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
kind: "directive",
|
|
315
|
+
type: BlockDirective,
|
|
316
|
+
selector: "[rtBlock]",
|
|
317
|
+
inputs: ["rtMod"]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
kind: "directive",
|
|
321
|
+
type: ElemDirective,
|
|
322
|
+
selector: "[rtElem]",
|
|
323
|
+
inputs: ["rtMod"]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
kind: "directive",
|
|
327
|
+
type: ModDirective,
|
|
328
|
+
selector: "[rtMod]"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
332
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
337
|
+
minVersion: "12.0.0",
|
|
338
|
+
version: "22.2.2",
|
|
339
|
+
ngImport: i0,
|
|
340
|
+
type: RtAutocompleteComponent,
|
|
341
|
+
decorators: [{
|
|
342
|
+
type: Component,
|
|
343
|
+
args: [{
|
|
344
|
+
selector: "rt-autocomplete",
|
|
345
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
346
|
+
encapsulation: ViewEncapsulation.None,
|
|
347
|
+
imports: [
|
|
348
|
+
NgTemplateOutlet,
|
|
349
|
+
RtIconButtonComponent,
|
|
350
|
+
RtIconComponent,
|
|
351
|
+
RtPopoverDirective,
|
|
352
|
+
BlockDirective,
|
|
353
|
+
ElemDirective,
|
|
354
|
+
ModDirective
|
|
355
|
+
],
|
|
356
|
+
providers: [{
|
|
357
|
+
provide: RtFormControlBase,
|
|
358
|
+
useExisting: forwardRef(() => RtAutocompleteComponent)
|
|
359
|
+
}],
|
|
360
|
+
hostDirectives: [{
|
|
361
|
+
directive: RtRadiusDirective,
|
|
362
|
+
inputs: ["radius"]
|
|
363
|
+
}],
|
|
364
|
+
host: {
|
|
365
|
+
class: BEM_BLOCK,
|
|
366
|
+
"[class.rt-autocomplete--open]": "isOpen()",
|
|
367
|
+
"[class.rt-autocomplete--disabled]": "isDisabled()",
|
|
368
|
+
"[class.rt-autocomplete--readonly]": "isReadonly()",
|
|
369
|
+
"[class.rt-autocomplete--invalid]": "isInvalid()",
|
|
370
|
+
"[class.rt-autocomplete--borderless]": "!bordered()",
|
|
371
|
+
"[class.rt-autocomplete--size--sm]": "size() === 'sm'",
|
|
372
|
+
"[class.rt-autocomplete--size--lg]": "size() === 'lg'"
|
|
373
|
+
},
|
|
374
|
+
template: "<ng-container rtBlock=\"rt-autocomplete\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"autocomplete-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '—' }}</span>\n }\n <div rtElem=\"field\" rtPopoverTrigger=\"manual\" rtPopoverWidth=\"trigger\" [rtPopover]=\"panelTpl\" (rtPopoverClosed)=\"onClosed()\">\n @if (iconLeft(); as left) {\n <rt-icon rtElem=\"icon-left\" size=\"sm\" color=\"muted\" [name]=\"left\" />\n }\n <input\n #fieldEl\n rtElem=\"input\"\n qa-dataid=\"autocomplete-input\"\n type=\"text\"\n autocomplete=\"off\"\n role=\"combobox\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [placeholder]=\"placeholder()\"\n [value]=\"inputText()\"\n [disabled]=\"isDisabled()\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n (keydown)=\"onInputKeydown($event)\" />\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"autocomplete-clear\"\n icon=\"ico-close\"\n size=\"sm\"\n variant=\"ghost\"\n iconColor=\"muted\"\n [ariaLabel]=\"t().uiClear\"\n [tabIndex]=\"-1\"\n (clicked)=\"clear($event)\" />\n }\n </div>\n\n <ng-template #panelTpl>\n <!--\n Опции выбираются мышью через (click); keyboard-nav — на input'е\n (activedescendant), опции не focusable индивидуально.\n -->\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <ul rtElem=\"panel\" qa-dataid=\"autocomplete-panel\" role=\"listbox\" [id]=\"panelId\">\n @for (item of suggestions(); track $index; let i = $index) {\n <li\n rtElem=\"option\"\n qa-dataid=\"autocomplete-option\"\n role=\"option\"\n [id]=\"panelId + '-opt-' + i\"\n [rtMod]=\"{ active: i === activeIndex() }\"\n [attr.aria-selected]=\"item === value()\"\n (click)=\"onSelect(item)\">\n @if (itemTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: item }\" />\n } @else {\n {{ displayWith()(item) }}\n }\n </li>\n } @empty {\n <li rtElem=\"empty\" qa-dataid=\"autocomplete-empty\">{{ t().uiNothingFound }}</li>\n }\n </ul>\n </ng-template>\n</ng-container>\n",
|
|
375
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-autocomplete{--rt-autocomplete-radius: var(--rt-input-radius);position:relative;display:block;width:100%}.rt-autocomplete__field{display:inline-flex;width:100%;min-height:var(--rt-input-height);box-sizing:border-box;align-items:center;padding:var(--rt-input-padding-y) var(--rt-input-padding-x);border:var(--rt-input-border-width) solid var(--rt-input-color-border);border-radius:var(--rt-autocomplete-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:text;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);transition:var(--rt-input-transition)}.rt-autocomplete__field:focus-within{border-color:var(--rt-input-color-border-focus);box-shadow:var(--rt-input-focus-shadow);outline:2px solid transparent;outline-offset:var(--rt-input-focus-outline-offset)}.rt-autocomplete--borderless .rt-autocomplete__field{border-color:transparent}.rt-autocomplete--open .rt-autocomplete__field{border-color:var(--rt-input-color-border-focus)}.rt-autocomplete--invalid .rt-autocomplete__field{border-color:var(--rt-input-color-border-error)}.rt-autocomplete--invalid .rt-autocomplete__field:focus-within{box-shadow:var(--rt-input-focus-shadow-error)}.rt-autocomplete--disabled .rt-autocomplete__field{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-autocomplete--size--sm .rt-autocomplete__field{min-height:var(--rt-input-height-sm)}.rt-autocomplete--size--lg .rt-autocomplete__field{min-height:var(--rt-input-height-lg)}.rt-autocomplete--readonly .rt-autocomplete__field{display:none}.rt-autocomplete__readonly{display:inline-flex;min-height:var(--rt-input-height);align-items:center;color:var(--rt-field-value-color);font-size:var(--rt-field-value-font-size)}.rt-autocomplete__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-autocomplete__input{min-width:0;flex:1 1 auto;padding:0;border:none;background:transparent;color:inherit;font:inherit;outline:none}.rt-autocomplete__input::placeholder{color:var(--rt-input-color-text-placeholder);opacity:1}.rt-autocomplete__input:disabled{cursor:not-allowed}.rt-autocomplete__icon-left,.rt-autocomplete__clear{flex-shrink:0}.rt-autocomplete__panel{--rt-autocomplete-panel-shadow: var(--rt-shadow-md);width:100%;max-height:var(--rt-input-panel-max-height);box-sizing:border-box;padding:var(--rt-space-2xs) 0;border:var(--rt-input-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-input-radius);margin:0;background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-autocomplete-panel-shadow);list-style:none;overflow-y:auto}.rt-autocomplete__option{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-input-font-size)}.rt-autocomplete__option:hover,.rt-autocomplete__option--active{background-color:var(--rt-color-bg-hover)}.rt-autocomplete__empty{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-input-color-text-placeholder);font-style:italic}.rt-autocomplete[data-rt-radius=none]{--rt-autocomplete-radius: var(--rt-radius-none)}.rt-autocomplete[data-rt-radius=xs]{--rt-autocomplete-radius: var(--rt-radius-xs)}.rt-autocomplete[data-rt-radius=sm]{--rt-autocomplete-radius: var(--rt-radius-sm)}.rt-autocomplete[data-rt-radius=ms]{--rt-autocomplete-radius: var(--rt-radius-ms)}.rt-autocomplete[data-rt-radius=md]{--rt-autocomplete-radius: var(--rt-radius-md)}.rt-autocomplete[data-rt-radius=lg]{--rt-autocomplete-radius: var(--rt-radius-lg)}.rt-autocomplete[data-rt-radius=xl]{--rt-autocomplete-radius: var(--rt-radius-xl)}.rt-autocomplete[data-rt-radius=\"2xl\"]{--rt-autocomplete-radius: var(--rt-radius-2xl)}.rt-autocomplete[data-rt-radius=full]{--rt-autocomplete-radius: var(--rt-radius-full)}}\n"]
|
|
376
|
+
}]
|
|
377
|
+
}],
|
|
378
|
+
ctorParameters: () => [],
|
|
379
|
+
propDecorators: {
|
|
380
|
+
popover: [{
|
|
381
|
+
type: i0.ViewChild,
|
|
382
|
+
args: [i0.forwardRef(() => RtPopoverDirective), { isSignal: true }]
|
|
383
|
+
}],
|
|
384
|
+
fieldEl: [{
|
|
385
|
+
type: i0.ViewChild,
|
|
386
|
+
args: ["fieldEl", { isSignal: true }]
|
|
387
|
+
}],
|
|
388
|
+
suggestions: [{
|
|
389
|
+
type: i0.Input,
|
|
390
|
+
args: [{
|
|
391
|
+
isSignal: true,
|
|
392
|
+
alias: "suggestions",
|
|
393
|
+
required: false
|
|
394
|
+
}]
|
|
395
|
+
}],
|
|
396
|
+
displayWith: [{
|
|
397
|
+
type: i0.Input,
|
|
398
|
+
args: [{
|
|
399
|
+
isSignal: true,
|
|
400
|
+
alias: "displayWith",
|
|
401
|
+
required: false
|
|
402
|
+
}]
|
|
403
|
+
}],
|
|
404
|
+
placeholder: [{
|
|
405
|
+
type: i0.Input,
|
|
406
|
+
args: [{
|
|
407
|
+
isSignal: true,
|
|
408
|
+
alias: "placeholder",
|
|
409
|
+
required: false
|
|
410
|
+
}]
|
|
411
|
+
}],
|
|
412
|
+
minLength: [{
|
|
413
|
+
type: i0.Input,
|
|
414
|
+
args: [{
|
|
415
|
+
isSignal: true,
|
|
416
|
+
alias: "minLength",
|
|
417
|
+
required: false
|
|
418
|
+
}]
|
|
419
|
+
}],
|
|
420
|
+
iconLeft: [{
|
|
421
|
+
type: i0.Input,
|
|
422
|
+
args: [{
|
|
423
|
+
isSignal: true,
|
|
424
|
+
alias: "iconLeft",
|
|
425
|
+
required: false
|
|
426
|
+
}]
|
|
427
|
+
}],
|
|
428
|
+
openOnFocus: [{
|
|
429
|
+
type: i0.Input,
|
|
430
|
+
args: [{
|
|
431
|
+
isSignal: true,
|
|
432
|
+
alias: "openOnFocus",
|
|
433
|
+
required: false
|
|
434
|
+
}]
|
|
435
|
+
}],
|
|
436
|
+
itemTemplate: [{
|
|
437
|
+
type: i0.Input,
|
|
438
|
+
args: [{
|
|
439
|
+
isSignal: true,
|
|
440
|
+
alias: "itemTemplate",
|
|
441
|
+
required: false
|
|
442
|
+
}]
|
|
443
|
+
}],
|
|
444
|
+
complete: [{
|
|
445
|
+
type: i0.Output,
|
|
446
|
+
args: ["complete"]
|
|
447
|
+
}],
|
|
448
|
+
itemSelect: [{
|
|
449
|
+
type: i0.Output,
|
|
450
|
+
args: ["itemSelect"]
|
|
451
|
+
}]
|
|
452
|
+
}
|
|
453
|
+
});
|
|
213
454
|
export { RtAutocompleteComponent };
|
|
214
|
-
|
|
455
|
+
|
|
456
|
+
//# sourceMappingURL=rt-tools-ui-kit-v2-autocomplete.mjs.map
|