@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,315 +1,536 @@
|
|
|
1
|
-
import { NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { BlockDirective, ElemDirective, ModDirective } from
|
|
5
|
-
import {
|
|
6
|
-
import { RtFormControlBase } from
|
|
7
|
-
import { RtIconButtonComponent } from
|
|
8
|
-
import { RtIconComponent } from
|
|
9
|
-
import { RtPopoverDirective } from
|
|
10
|
-
import * as i1 from
|
|
11
|
-
import { RtRadiusDirective } from
|
|
12
|
-
import {
|
|
13
|
-
import { RtTagComponent } from
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, Pipe, ViewEncapsulation, computed, contentChild, forwardRef, inject, input, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { BlockDirective, ElemDirective, ModDirective } from "@rt-tools/core";
|
|
5
|
+
import { RT_KIT_LABELS, rtKitLabel } from "@rt-tools/ui-kit-v2/core";
|
|
6
|
+
import { RtFormControlBase } from "@rt-tools/ui-kit-v2/form-control";
|
|
7
|
+
import { RtIconButtonComponent } from "@rt-tools/ui-kit-v2/icon-button";
|
|
8
|
+
import { RtIconComponent } from "@rt-tools/ui-kit-v2/icon";
|
|
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 { RtSelectTriggerDirective, rtScrollActiveOptionIntoView, rtTreeBranchState, rtTreeFind, rtTreeIsTree, rtTreeLeaves, rtTreeOpenFor, rtTreeRows, rtTreeSideKey, rtTreeToggle } from "@rt-tools/ui-kit-v2/select";
|
|
13
|
+
import { RtTagComponent } from "@rt-tools/ui-kit-v2/tag";
|
|
14
|
+
var RtMultiselectLabelPipe = class RtMultiselectLabelPipe {
|
|
15
|
+
transform(value, options) {
|
|
16
|
+
return rtTreeFind(options, value)?.label ?? String(value);
|
|
17
|
+
}
|
|
18
|
+
static {
|
|
19
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
20
|
+
minVersion: "12.0.0",
|
|
21
|
+
version: "22.2.2",
|
|
22
|
+
ngImport: i0,
|
|
23
|
+
type: RtMultiselectLabelPipe,
|
|
24
|
+
deps: [],
|
|
25
|
+
target: i0.ɵɵFactoryTarget.Pipe
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
static {
|
|
29
|
+
this.ɵpipe = i0.ɵɵngDeclarePipe({
|
|
30
|
+
minVersion: "14.0.0",
|
|
31
|
+
version: "22.2.2",
|
|
32
|
+
ngImport: i0,
|
|
33
|
+
type: RtMultiselectLabelPipe,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
name: "rtMultiselectLabel"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
40
|
+
minVersion: "12.0.0",
|
|
41
|
+
version: "22.2.2",
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
type: RtMultiselectLabelPipe,
|
|
44
|
+
decorators: [{
|
|
45
|
+
type: Pipe,
|
|
46
|
+
args: [{ name: "rtMultiselectLabel" }]
|
|
47
|
+
}]
|
|
48
|
+
});
|
|
49
|
+
const BEM_BLOCK = "rt-multiselect";
|
|
50
|
+
const OPEN_KEYS = /* @__PURE__ */ new Set([
|
|
51
|
+
"ArrowDown",
|
|
52
|
+
"ArrowUp",
|
|
53
|
+
"Enter",
|
|
54
|
+
" "
|
|
55
|
+
]);
|
|
31
56
|
let panelIdSeed = 0;
|
|
32
57
|
function nextPanelId() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Multi-select с chip-rendering выбранных значений в trigger.
|
|
38
|
-
*
|
|
39
|
-
* Panel рендерится через CDK Overlay (`[rtPopover]`) — не обрезается overflow,
|
|
40
|
-
* авто-flip. Панель НЕ закрывается после выбора (multi vs single). CVA через
|
|
41
|
-
* общий `RtFormControlBase`. Reuses `IRtSelect.Option<TValue>` (type-import).
|
|
42
|
-
* Чипы закрываются поштучно; крестик (`clearable`) слева от шеврона очищает весь
|
|
43
|
-
* выбор.
|
|
44
|
-
*
|
|
45
|
-
* Keyboard-nav (activedescendant): фокус на trigger'е, ArrowUp/Down — highlight,
|
|
46
|
-
* Enter — toggle опции (panel остаётся открытой), Escape — закрыть. Home/End —
|
|
47
|
-
* deferred.
|
|
48
|
-
*/
|
|
49
|
-
class RtMultiselectComponent extends RtFormControlBase {
|
|
50
|
-
#t_uiSelectValues;
|
|
51
|
-
constructor() {
|
|
52
|
-
super();
|
|
53
|
-
this.#t_uiSelectValues = rtKitLabel('uiSelectValues');
|
|
54
|
-
this.t = inject(RT_KIT_LABELS);
|
|
55
|
-
this.panelId = `rt-multiselect-panel-${nextPanelId()}`;
|
|
56
|
-
this.placeholderText = computed(() => this.placeholder() || this.#t_uiSelectValues(), /* @ts-ignore */
|
|
57
|
-
...(ngDevMode ? [{ debugName: "placeholderText" }] : /* istanbul ignore next */ []));
|
|
58
|
-
this.popover = viewChild.required(RtPopoverDirective, /* @ts-ignore */
|
|
59
|
-
...(ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []));
|
|
60
|
-
this.triggerEl = viewChild('triggerEl', /* @ts-ignore */
|
|
61
|
-
...(ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []));
|
|
62
|
-
this.activeIndex = signal(-1, /* @ts-ignore */
|
|
63
|
-
...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
64
|
-
/** Раскрытые ветки дерева. Живут, пока открыта панель: при открытии раскрыты ветки над выбранным. */
|
|
65
|
-
this.openBranches = signal(new Set(), /* @ts-ignore */
|
|
66
|
-
...(ngDevMode ? [{ debugName: "openBranches" }] : /* istanbul ignore next */ []));
|
|
67
|
-
/** Дерево ли список: тогда у строк есть место под стрелку и отступ по уровню. */
|
|
68
|
-
this.isTree = computed(() => rtTreeIsTree(this.options()), /* @ts-ignore */
|
|
69
|
-
...(ngDevMode ? [{ debugName: "isTree" }] : /* istanbul ignore next */ []));
|
|
70
|
-
/** Видимые строки: плоский список — как прежде, дерево — по раскрытым веткам. */
|
|
71
|
-
this.rows = computed(() => rtTreeRows(this.options(), this.openBranches()), /* @ts-ignore */
|
|
72
|
-
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
73
|
-
/** Флажок каждой строки: у листа — выбран ли он, у ветки — выведен из её включённых листьев. */
|
|
74
|
-
this.rowChecks = computed(() => this.rows().map((row) => this.#checkOf(row)), /* @ts-ignore */
|
|
75
|
-
...(ngDevMode ? [{ debugName: "rowChecks" }] : /* istanbul ignore next */ []));
|
|
76
|
-
this.isOpen = computed(() => this.popover().isOpen(), /* @ts-ignore */
|
|
77
|
-
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
78
|
-
/** Идентификатор подсвеченной опции — тот же, что уходит в `aria-activedescendant`. */
|
|
79
|
-
this.activeOptionId = computed(() => this.isOpen() && this.activeIndex() >= 0 ? `${this.panelId}-opt-${this.activeIndex()}` : null, /* @ts-ignore */
|
|
80
|
-
...(ngDevMode ? [{ debugName: "activeOptionId" }] : /* istanbul ignore next */ []));
|
|
81
|
-
/**
|
|
82
|
-
* Своя разметка указателя, если потребитель её объявил. Маркер тот же, что у выбора одного
|
|
83
|
-
* значения: семьи отличаются только разметкой внутри кнопки.
|
|
84
|
-
*/
|
|
85
|
-
this.triggerTpl = contentChild(RtSelectTriggerDirective, /* @ts-ignore */
|
|
86
|
-
...(ngDevMode ? [{ debugName: "triggerTpl" }] : /* istanbul ignore next */ []));
|
|
87
|
-
this.hasValue = computed(() => this.value().length > 0, /* @ts-ignore */
|
|
88
|
-
...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
|
|
89
|
-
this.visibleChips = computed(() => this.value().slice(0, this.maxChips()), /* @ts-ignore */
|
|
90
|
-
...(ngDevMode ? [{ debugName: "visibleChips" }] : /* istanbul ignore next */ []));
|
|
91
|
-
this.extraChipsCount = computed(() => Math.max(0, this.value().length - this.maxChips()), /* @ts-ignore */
|
|
92
|
-
...(ngDevMode ? [{ debugName: "extraChipsCount" }] : /* istanbul ignore next */ []));
|
|
93
|
-
/** Три значения, которые кит отдаёт своей разметке указателя, и не больше. */
|
|
94
|
-
this.triggerState = computed(() => ({
|
|
95
|
-
isOpen: this.isOpen(),
|
|
96
|
-
value: this.value(),
|
|
97
|
-
label: this.displayText(),
|
|
98
|
-
isDisabled: this.isDisabled(),
|
|
99
|
-
}), /* @ts-ignore */
|
|
100
|
-
...(ngDevMode ? [{ debugName: "triggerState" }] : /* istanbul ignore next */ []));
|
|
101
|
-
this.displayText = computed(() => this.value()
|
|
102
|
-
.map((v) => this.labelOf(v))
|
|
103
|
-
.join(', '), /* @ts-ignore */
|
|
104
|
-
...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
|
|
105
|
-
this.options = input([], /* @ts-ignore */
|
|
106
|
-
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
107
|
-
/** Пусто — берётся переведённая подпись по умолчанию */
|
|
108
|
-
this.placeholder = input('', /* @ts-ignore */
|
|
109
|
-
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
110
|
-
this.maxChips = input(3, /* @ts-ignore */
|
|
111
|
-
...(ngDevMode ? [{ debugName: "maxChips" }] : /* istanbul ignore next */ []));
|
|
112
|
-
/** Иконка слева в указателе — та же, что у `rt-select`: перед подсказкой или чипами. */
|
|
113
|
-
this.iconLeft = input(null, /* @ts-ignore */
|
|
114
|
-
...(ngDevMode ? [{ debugName: "iconLeft" }] : /* istanbul ignore next */ []));
|
|
115
|
-
/**
|
|
116
|
-
* Чем мерится панель. По умолчанию она не уже кнопки и дальше растёт по содержимому:
|
|
117
|
-
* со своим указателем кнопка бывает узкой, и панель по её ширине давила бы содержимое.
|
|
118
|
-
* `trigger` возвращает прежнее — ровно по кнопке, `auto` пускает панель по содержимому
|
|
119
|
-
* целиком. Предел высоты назначается входом `panelMaxHeight`.
|
|
120
|
-
*/
|
|
121
|
-
this.panelWidth = input('trigger-min', /* @ts-ignore */
|
|
122
|
-
...(ngDevMode ? [{ debugName: "panelWidth" }] : /* istanbul ignore next */ []));
|
|
123
|
-
/**
|
|
124
|
-
* Предел высоты панели — длина как в стилях, например `20rem`. Пусто — предел кита
|
|
125
|
-
* `--rt-input-panel-max-height`, и длинный список прокручивается внутри панели: без предела
|
|
126
|
-
* он уходил за нижний край экрана, и пункты за краем были недостижимы. `none` снимает предел —
|
|
127
|
-
* для короткого списка, который должен открываться целиком, без прокрутки. Значение ставится
|
|
128
|
-
* на саму панель: она рисуется в наложении, вне поддерева блока.
|
|
129
|
-
*/
|
|
130
|
-
this.panelMaxHeight = input(null, /* @ts-ignore */
|
|
131
|
-
...(ngDevMode ? [{ debugName: "panelMaxHeight" }] : /* istanbul ignore next */ []));
|
|
132
|
-
// Подсветка, сдвинутая клавишами, не уходит за край панели с пределом высоты.
|
|
133
|
-
rtScrollActiveOptionIntoView(this.activeOptionId);
|
|
134
|
-
}
|
|
135
|
-
setDisabledState(disabled) {
|
|
136
|
-
super.setDisabledState(disabled);
|
|
137
|
-
if (disabled) {
|
|
138
|
-
this.popover().close();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
getEmptyValue() {
|
|
142
|
-
return [];
|
|
143
|
-
}
|
|
144
|
-
focusAfterClear() {
|
|
145
|
-
this.triggerEl()?.nativeElement.focus();
|
|
146
|
-
}
|
|
147
|
-
labelOf(value) {
|
|
148
|
-
return rtTreeFind(this.options(), value)?.label ?? String(value);
|
|
149
|
-
}
|
|
150
|
-
isSelected(value) {
|
|
151
|
-
return this.value().includes(value);
|
|
152
|
-
}
|
|
153
|
-
onOpened() {
|
|
154
|
-
this.openBranches.set(rtTreeOpenFor(this.options(), this.value()));
|
|
155
|
-
}
|
|
156
|
-
toggleBranch(event, value) {
|
|
157
|
-
event.stopPropagation();
|
|
158
|
-
this.openBranches.update((open) => rtTreeToggle(open, value));
|
|
159
|
-
}
|
|
160
|
-
onClosed() {
|
|
161
|
-
this.activeIndex.set(-1);
|
|
162
|
-
this.markTouched();
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Лист переключается сам. Ветка выбирает все свои включённые листья или снимает их, когда
|
|
166
|
-
* выбраны все; своё значение ветки в выбор не пишется.
|
|
167
|
-
*/
|
|
168
|
-
toggleOption(opt) {
|
|
169
|
-
if (opt.disabled || this.isDisabled()) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
const leaves = rtTreeLeaves(opt);
|
|
173
|
-
const current = this.value();
|
|
174
|
-
const clearing = rtTreeBranchState(opt, current) === 'all';
|
|
175
|
-
const next = clearing
|
|
176
|
-
? current.filter((v) => !leaves.includes(v))
|
|
177
|
-
: [...current, ...leaves.filter((leaf) => !current.includes(leaf))];
|
|
178
|
-
this.value.set(next);
|
|
179
|
-
this.emitChange([...next]);
|
|
180
|
-
}
|
|
181
|
-
removeChip(value, event) {
|
|
182
|
-
event.stopPropagation();
|
|
183
|
-
if (this.isDisabled()) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
const next = this.value().filter((v) => v !== value);
|
|
187
|
-
this.value.set(next);
|
|
188
|
-
this.emitChange([...next]);
|
|
189
|
-
}
|
|
190
|
-
onTriggerKeydown(event) {
|
|
191
|
-
if (this.isDisabled()) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
if (!this.isOpen()) {
|
|
195
|
-
if (OPEN_KEYS.has(event.key)) {
|
|
196
|
-
event.preventDefault();
|
|
197
|
-
this.popover().open();
|
|
198
|
-
this.#moveActive(1);
|
|
199
|
-
}
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
this.#handleOpenKeydown(event);
|
|
203
|
-
}
|
|
204
|
-
#handleOpenKeydown(event) {
|
|
205
|
-
switch (event.key) {
|
|
206
|
-
case 'ArrowDown':
|
|
207
|
-
event.preventDefault();
|
|
208
|
-
this.#moveActive(1);
|
|
209
|
-
break;
|
|
210
|
-
case 'ArrowUp':
|
|
211
|
-
event.preventDefault();
|
|
212
|
-
this.#moveActive(-1);
|
|
213
|
-
break;
|
|
214
|
-
case 'Enter':
|
|
215
|
-
case ' ':
|
|
216
|
-
event.preventDefault();
|
|
217
|
-
this.#toggleActive();
|
|
218
|
-
break;
|
|
219
|
-
case 'Escape':
|
|
220
|
-
event.preventDefault();
|
|
221
|
-
this.popover().close();
|
|
222
|
-
break;
|
|
223
|
-
case 'ArrowRight':
|
|
224
|
-
case 'ArrowLeft':
|
|
225
|
-
event.preventDefault();
|
|
226
|
-
this.#sideKey(event.key);
|
|
227
|
-
break;
|
|
228
|
-
default:
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
#checkOf(row) {
|
|
233
|
-
if (row.branch) {
|
|
234
|
-
return rtTreeBranchState(row.option, this.value());
|
|
235
|
-
}
|
|
236
|
-
return this.value().includes(row.option.value) ? 'all' : 'none';
|
|
237
|
-
}
|
|
238
|
-
#sideKey(key) {
|
|
239
|
-
const answer = rtTreeSideKey(this.rows(), this.activeIndex(), key);
|
|
240
|
-
const toggle = answer.toggle;
|
|
241
|
-
if (toggle !== null) {
|
|
242
|
-
this.openBranches.update((open) => rtTreeToggle(open, toggle));
|
|
243
|
-
}
|
|
244
|
-
this.activeIndex.set(answer.index);
|
|
245
|
-
}
|
|
246
|
-
#moveActive(delta) {
|
|
247
|
-
const opts = this.rows().map((row) => row.option);
|
|
248
|
-
if (opts.length === 0) {
|
|
249
|
-
this.activeIndex.set(-1);
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
let index = this.activeIndex();
|
|
253
|
-
for (let step = 0; step < opts.length; step += 1) {
|
|
254
|
-
index = (index + delta + opts.length) % opts.length;
|
|
255
|
-
if (!opts[index].disabled) {
|
|
256
|
-
this.activeIndex.set(index);
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
#toggleActive() {
|
|
262
|
-
const opts = this.rows().map((row) => row.option);
|
|
263
|
-
const index = this.activeIndex();
|
|
264
|
-
if (index >= 0 && index < opts.length) {
|
|
265
|
-
this.toggleOption(opts[index]);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
269
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtMultiselectComponent, isStandalone: true, selector: "rt-multiselect", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, maxChips: { classPropertyName: "maxChips", publicName: "maxChips", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null }, panelMaxHeight: { classPropertyName: "panelMaxHeight", publicName: "panelMaxHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.rt-multiselect--open": "isOpen()", "class.rt-multiselect--disabled": "isDisabled()", "class.rt-multiselect--readonly": "isReadonly()", "class.rt-multiselect--invalid": "isInvalid()", "class.rt-multiselect--borderless": "!bordered()", "class.rt-multiselect--size--sm": "size() === 'sm'", "class.rt-multiselect--size--lg": "size() === 'lg'" }, classAttribute: "rt-multiselect" }, providers: [
|
|
270
|
-
// Алиас базового токена — для contentChild(RtFormControlBase) в rt-field.
|
|
271
|
-
{ provide: RtFormControlBase, useExisting: forwardRef(() => RtMultiselectComponent) },
|
|
272
|
-
], queries: [{ propertyName: "triggerTpl", first: true, predicate: RtSelectTriggerDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popover", first: true, predicate: RtPopoverDirective, descendants: true, isSignal: true }, { propertyName: "triggerEl", first: true, predicate: ["triggerEl"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.RtRadiusDirective, inputs: ["radius", "radius"] }], ngImport: i0, template: "<ng-container rtBlock=\"rt-multiselect\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"multiselect-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '\u2014' }}</span>\n }\n <button\n #triggerEl\n rtElem=\"trigger\"\n qa-dataid=\"multiselect-trigger\"\n type=\"button\"\n [rtPopoverWidth]=\"panelWidth()\"\n [rtMod]=\"{ own: !!triggerTpl() }\"\n [rtPopover]=\"panelTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\">\n <!--\n \u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F: \u0441\u0432\u043E\u044F, \u0435\u0441\u043B\u0438 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u044C \u0435\u0451 \u043E\u0431\u044A\u044F\u0432\u0438\u043B, \u0438\u043D\u0430\u0447\u0435 \u0437\u0430\u0448\u0438\u0442\u0430\u044F \u043A\u0438\u0442\u043E\u043C. \u041E\u043D\u0430 \u0432\u0441\u0442\u0430\u0451\u0442\n \u0432\u043D\u0443\u0442\u0440\u044C \u043A\u043D\u043E\u043F\u043A\u0438, \u0430 \u043D\u0435 \u0432\u043C\u0435\u0441\u0442\u043E \u043D\u0435\u0451: \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u2014 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u0430\u043D\u0435\u043B\u0438, \u043F\u0440\u0438\u043C\u0435\u0442\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u0438,\n \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u0441\u0442\u044C, \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0435 \u2014 \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435 \u043A\u0438\u0442\u0430.\n -->\n @if (triggerTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: triggerState() }\" />\n } @else {\n @if (iconLeft(); as left) {\n <rt-icon rtElem=\"icon-left\" qa-dataid=\"multiselect-icon-left\" size=\"sm\" color=\"muted\" [name]=\"left\" />\n }\n @if (value().length === 0) {\n <span rtElem=\"placeholder\" qa-dataid=\"multiselect-placeholder\">{{ placeholderText() }}</span>\n } @else {\n <span rtElem=\"chips\">\n @for (val of visibleChips(); track val) {\n <span rtElem=\"chip\" qa-dataid=\"multiselect-chip\" [attr.data-value]=\"val\">\n <rt-tag\n severity=\"info\"\n [value]=\"val | rtMultiselectLabel: options()\"\n [closable]=\"true\"\n (closed)=\"removeChip(val, $event)\" />\n </span>\n }\n @if (extraChipsCount() > 0) {\n <span rtElem=\"chip-more\" qa-dataid=\"multiselect-chip-more\">+{{ extraChipsCount() }}</span>\n }\n </span>\n }\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"multiselect-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 <rt-icon rtElem=\"chevron\" name=\"chevron-down\" size=\"sm\" color=\"muted\" />\n }\n </button>\n\n <ng-template #panelTpl>\n <div\n rtElem=\"panel\"\n qa-dataid=\"multiselect-panel\"\n role=\"listbox\"\n [style.--rt-multiselect-panel-max-height]=\"panelMaxHeight()\"\n [attr.aria-label]=\"ariaLabel()\">\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 trigger'\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=\"list\">\n @for (row of rows(); track row.option.value; let i = $index) {\n <li\n rtElem=\"option\"\n qa-dataid=\"multiselect-option\"\n role=\"option\"\n [id]=\"panelId + '-opt-' + i\"\n [attr.data-value]=\"row.option.value\"\n [attr.aria-level]=\"isTree() ? row.level + 1 : null\"\n [style.--rt-multiselect-tree-level]=\"row.level\"\n [rtMod]=\"{\n selected: rowChecks()[i] === 'all',\n active: i === activeIndex(),\n disabled: !!row.option.disabled,\n }\"\n [attr.aria-selected]=\"rowChecks()[i] === 'all'\"\n [attr.aria-disabled]=\"!!row.option.disabled\"\n (click)=\"toggleOption(row.option)\">\n @if (isTree()) {\n @if (row.branch) {\n <button\n rtElem=\"toggle\"\n qa-dataid=\"multiselect-option-toggle\"\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"row.open ? t().uiCollapse : t().uiExpand\"\n [attr.aria-expanded]=\"row.open\"\n (click)=\"toggleBranch($event, row.option.value)\">\n <rt-icon size=\"sm\" color=\"muted\" [name]=\"row.open ? 'chevron-down' : 'chevron-right'\" />\n </button>\n } @else {\n <span rtElem=\"toggle-space\"></span>\n }\n }\n <input\n rtElem=\"checkbox\"\n qa-dataid=\"multiselect-option-checkbox\"\n type=\"checkbox\"\n tabindex=\"-1\"\n [checked]=\"rowChecks()[i] === 'all'\"\n [indeterminate]=\"rowChecks()[i] === 'some'\" />\n <span rtElem=\"option-label\" qa-dataid=\"multiselect-option-label\">{{ row.option.label }}</span>\n </li>\n } @empty {\n <li rtElem=\"empty\" qa-dataid=\"multiselect-empty\">{{ t().uiNoOptions }}</li>\n }\n </ul>\n </div>\n </ng-template>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-multiselect{--rt-multiselect-radius: var(--rt-input-radius);--rt-multiselect-caret-transition-duration: var(--rt-duration-fast);--rt-multiselect-own-outline-width: var(--rt-border-width-medium);position:relative;display:block;width:100%}.rt-multiselect--borderless .rt-multiselect__trigger{border-color:transparent}.rt-multiselect__trigger{display: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-multiselect-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:pointer;font-family:inherit;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);text-align:start;transition:var(--rt-input-transition)}.rt-multiselect__trigger:focus{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-multiselect__trigger:disabled{cursor:not-allowed}.rt-multiselect__trigger--own{width:auto;min-height:0;padding:0;border-color:transparent;background-color:transparent}.rt-multiselect__trigger--own:focus{border-color:transparent;box-shadow:none}.rt-multiselect__trigger--own:focus-visible{outline:var(--rt-multiselect-own-outline-width) solid var(--rt-input-color-border-focus);outline-offset:var(--rt-input-focus-outline-offset)}.rt-multiselect--open .rt-multiselect__trigger{border-color:var(--rt-input-color-border-focus)}.rt-multiselect--open .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger{border-color:var(--rt-input-color-border-error)}.rt-multiselect--invalid .rt-multiselect__trigger:focus{box-shadow:var(--rt-input-focus-shadow-error)}.rt-multiselect--invalid .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger--own:focus{box-shadow:none}.rt-multiselect--disabled{opacity:var(--rt-input-disabled-opacity)}.rt-multiselect--readonly .rt-multiselect__trigger{display:none}.rt-multiselect__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-multiselect__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-multiselect--size--sm .rt-multiselect__trigger{min-height:var(--rt-input-height-sm)}.rt-multiselect--size--lg .rt-multiselect__trigger{min-height:var(--rt-input-height-lg)}.rt-multiselect__placeholder{overflow:hidden;min-width:0;flex:1 1 auto;color:var(--rt-input-color-text-placeholder);text-overflow:ellipsis;white-space:nowrap}.rt-multiselect__chips{display:flex;min-width:0;flex:1 1 auto;flex-wrap:wrap;gap:var(--rt-space-2xs)}.rt-multiselect__chip{display:inline-flex;align-items:center}.rt-multiselect__chip-more{display:inline-flex;align-items:center;padding:0 var(--rt-space-xs);color:var(--rt-input-color-text-placeholder);font-size:var(--rt-input-font-size)}.rt-multiselect__icon-left,.rt-multiselect__clear{flex-shrink:0}.rt-multiselect__chevron{flex-shrink:0;transition:transform var(--rt-multiselect-caret-transition-duration) ease}.rt-multiselect--open .rt-multiselect__chevron{transform:rotate(180deg)}.rt-multiselect__panel{--rt-multiselect-panel-shadow: var(--rt-shadow-md);--rt-multiselect-tree-indent: var(--rt-space-lg);--rt-multiselect-panel-max-height: var(--rt-input-panel-max-height);width:100%;max-height:var(--rt-multiselect-panel-max-height);box-sizing:border-box;border:var(--rt-input-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-input-radius);background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-multiselect-panel-shadow);overflow-y:auto}.rt-multiselect__list{padding:var(--rt-space-2xs) 0;margin:0;list-style:none}.rt-multiselect__option{--rt-multiselect-tree-level: 0;display:flex;align-items:center;padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);padding-inline-start:calc(var(--rt-space-md) + var(--rt-multiselect-tree-indent) * var(--rt-multiselect-tree-level))}.rt-multiselect__option:hover,.rt-multiselect__option--active{background-color:var(--rt-color-bg-hover)}.rt-multiselect__option--selected{background-color:var(--rt-color-action-primary-subtle);font-weight:var(--rt-font-weight-semibold)}.rt-multiselect__option--disabled{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-multiselect__option--disabled:hover{background-color:transparent}.rt-multiselect__toggle,.rt-multiselect__toggle-space{display:inline-flex;flex-shrink:0;block-size:var(--rt-input-icon-size);inline-size:var(--rt-input-icon-size)}.rt-multiselect__toggle{align-items:center;justify-content:center;padding:0;border:0;background:transparent;cursor:pointer}.rt-multiselect__checkbox{flex-shrink:0;margin:0;pointer-events:none}.rt-multiselect__option-label{min-width:0;flex:1 1 auto}.rt-multiselect__empty{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-input-color-text-placeholder);font-style:italic}.rt-multiselect[data-rt-radius=none]{--rt-multiselect-radius: var(--rt-radius-none)}.rt-multiselect[data-rt-radius=xs]{--rt-multiselect-radius: var(--rt-radius-xs)}.rt-multiselect[data-rt-radius=sm]{--rt-multiselect-radius: var(--rt-radius-sm)}.rt-multiselect[data-rt-radius=ms]{--rt-multiselect-radius: var(--rt-radius-ms)}.rt-multiselect[data-rt-radius=md]{--rt-multiselect-radius: var(--rt-radius-md)}.rt-multiselect[data-rt-radius=lg]{--rt-multiselect-radius: var(--rt-radius-lg)}.rt-multiselect[data-rt-radius=xl]{--rt-multiselect-radius: var(--rt-radius-xl)}.rt-multiselect[data-rt-radius=\"2xl\"]{--rt-multiselect-radius: var(--rt-radius-2xl)}.rt-multiselect[data-rt-radius=full]{--rt-multiselect-radius: var(--rt-radius-full)}}\n"], dependencies: [{ kind: "directive", type:
|
|
273
|
-
// Angular
|
|
274
|
-
NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type:
|
|
275
|
-
// standalone components / directives
|
|
276
|
-
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: "component", type: RtTagComponent, selector: "rt-tag", inputs: ["value", "severity", "size", "appearance", "icon", "iconEnd", "closable"], outputs: ["closed"] }, { kind: "directive", type: BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }, { kind: "directive", type: ModDirective, selector: "[rtMod]" }, { kind: "pipe", type:
|
|
277
|
-
// pipes
|
|
278
|
-
RtMultiselectLabelPipe, name: "rtMultiselectLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
58
|
+
panelIdSeed += 1;
|
|
59
|
+
return panelIdSeed;
|
|
279
60
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}, template: "<ng-container rtBlock=\"rt-multiselect\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"multiselect-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '\u2014' }}</span>\n }\n <button\n #triggerEl\n rtElem=\"trigger\"\n qa-dataid=\"multiselect-trigger\"\n type=\"button\"\n [rtPopoverWidth]=\"panelWidth()\"\n [rtMod]=\"{ own: !!triggerTpl() }\"\n [rtPopover]=\"panelTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\">\n <!--\n \u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F: \u0441\u0432\u043E\u044F, \u0435\u0441\u043B\u0438 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u044C \u0435\u0451 \u043E\u0431\u044A\u044F\u0432\u0438\u043B, \u0438\u043D\u0430\u0447\u0435 \u0437\u0430\u0448\u0438\u0442\u0430\u044F \u043A\u0438\u0442\u043E\u043C. \u041E\u043D\u0430 \u0432\u0441\u0442\u0430\u0451\u0442\n \u0432\u043D\u0443\u0442\u0440\u044C \u043A\u043D\u043E\u043F\u043A\u0438, \u0430 \u043D\u0435 \u0432\u043C\u0435\u0441\u0442\u043E \u043D\u0435\u0451: \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u2014 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u0430\u043D\u0435\u043B\u0438, \u043F\u0440\u0438\u043C\u0435\u0442\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u0438,\n \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u0441\u0442\u044C, \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0435 \u2014 \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0435 \u043A\u0438\u0442\u0430.\n -->\n @if (triggerTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: triggerState() }\" />\n } @else {\n @if (iconLeft(); as left) {\n <rt-icon rtElem=\"icon-left\" qa-dataid=\"multiselect-icon-left\" size=\"sm\" color=\"muted\" [name]=\"left\" />\n }\n @if (value().length === 0) {\n <span rtElem=\"placeholder\" qa-dataid=\"multiselect-placeholder\">{{ placeholderText() }}</span>\n } @else {\n <span rtElem=\"chips\">\n @for (val of visibleChips(); track val) {\n <span rtElem=\"chip\" qa-dataid=\"multiselect-chip\" [attr.data-value]=\"val\">\n <rt-tag\n severity=\"info\"\n [value]=\"val | rtMultiselectLabel: options()\"\n [closable]=\"true\"\n (closed)=\"removeChip(val, $event)\" />\n </span>\n }\n @if (extraChipsCount() > 0) {\n <span rtElem=\"chip-more\" qa-dataid=\"multiselect-chip-more\">+{{ extraChipsCount() }}</span>\n }\n </span>\n }\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"multiselect-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 <rt-icon rtElem=\"chevron\" name=\"chevron-down\" size=\"sm\" color=\"muted\" />\n }\n </button>\n\n <ng-template #panelTpl>\n <div\n rtElem=\"panel\"\n qa-dataid=\"multiselect-panel\"\n role=\"listbox\"\n [style.--rt-multiselect-panel-max-height]=\"panelMaxHeight()\"\n [attr.aria-label]=\"ariaLabel()\">\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 trigger'\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=\"list\">\n @for (row of rows(); track row.option.value; let i = $index) {\n <li\n rtElem=\"option\"\n qa-dataid=\"multiselect-option\"\n role=\"option\"\n [id]=\"panelId + '-opt-' + i\"\n [attr.data-value]=\"row.option.value\"\n [attr.aria-level]=\"isTree() ? row.level + 1 : null\"\n [style.--rt-multiselect-tree-level]=\"row.level\"\n [rtMod]=\"{\n selected: rowChecks()[i] === 'all',\n active: i === activeIndex(),\n disabled: !!row.option.disabled,\n }\"\n [attr.aria-selected]=\"rowChecks()[i] === 'all'\"\n [attr.aria-disabled]=\"!!row.option.disabled\"\n (click)=\"toggleOption(row.option)\">\n @if (isTree()) {\n @if (row.branch) {\n <button\n rtElem=\"toggle\"\n qa-dataid=\"multiselect-option-toggle\"\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"row.open ? t().uiCollapse : t().uiExpand\"\n [attr.aria-expanded]=\"row.open\"\n (click)=\"toggleBranch($event, row.option.value)\">\n <rt-icon size=\"sm\" color=\"muted\" [name]=\"row.open ? 'chevron-down' : 'chevron-right'\" />\n </button>\n } @else {\n <span rtElem=\"toggle-space\"></span>\n }\n }\n <input\n rtElem=\"checkbox\"\n qa-dataid=\"multiselect-option-checkbox\"\n type=\"checkbox\"\n tabindex=\"-1\"\n [checked]=\"rowChecks()[i] === 'all'\"\n [indeterminate]=\"rowChecks()[i] === 'some'\" />\n <span rtElem=\"option-label\" qa-dataid=\"multiselect-option-label\">{{ row.option.label }}</span>\n </li>\n } @empty {\n <li rtElem=\"empty\" qa-dataid=\"multiselect-empty\">{{ t().uiNoOptions }}</li>\n }\n </ul>\n </div>\n </ng-template>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-multiselect{--rt-multiselect-radius: var(--rt-input-radius);--rt-multiselect-caret-transition-duration: var(--rt-duration-fast);--rt-multiselect-own-outline-width: var(--rt-border-width-medium);position:relative;display:block;width:100%}.rt-multiselect--borderless .rt-multiselect__trigger{border-color:transparent}.rt-multiselect__trigger{display: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-multiselect-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:pointer;font-family:inherit;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);text-align:start;transition:var(--rt-input-transition)}.rt-multiselect__trigger:focus{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-multiselect__trigger:disabled{cursor:not-allowed}.rt-multiselect__trigger--own{width:auto;min-height:0;padding:0;border-color:transparent;background-color:transparent}.rt-multiselect__trigger--own:focus{border-color:transparent;box-shadow:none}.rt-multiselect__trigger--own:focus-visible{outline:var(--rt-multiselect-own-outline-width) solid var(--rt-input-color-border-focus);outline-offset:var(--rt-input-focus-outline-offset)}.rt-multiselect--open .rt-multiselect__trigger{border-color:var(--rt-input-color-border-focus)}.rt-multiselect--open .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger{border-color:var(--rt-input-color-border-error)}.rt-multiselect--invalid .rt-multiselect__trigger:focus{box-shadow:var(--rt-input-focus-shadow-error)}.rt-multiselect--invalid .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger--own:focus{box-shadow:none}.rt-multiselect--disabled{opacity:var(--rt-input-disabled-opacity)}.rt-multiselect--readonly .rt-multiselect__trigger{display:none}.rt-multiselect__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-multiselect__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-multiselect--size--sm .rt-multiselect__trigger{min-height:var(--rt-input-height-sm)}.rt-multiselect--size--lg .rt-multiselect__trigger{min-height:var(--rt-input-height-lg)}.rt-multiselect__placeholder{overflow:hidden;min-width:0;flex:1 1 auto;color:var(--rt-input-color-text-placeholder);text-overflow:ellipsis;white-space:nowrap}.rt-multiselect__chips{display:flex;min-width:0;flex:1 1 auto;flex-wrap:wrap;gap:var(--rt-space-2xs)}.rt-multiselect__chip{display:inline-flex;align-items:center}.rt-multiselect__chip-more{display:inline-flex;align-items:center;padding:0 var(--rt-space-xs);color:var(--rt-input-color-text-placeholder);font-size:var(--rt-input-font-size)}.rt-multiselect__icon-left,.rt-multiselect__clear{flex-shrink:0}.rt-multiselect__chevron{flex-shrink:0;transition:transform var(--rt-multiselect-caret-transition-duration) ease}.rt-multiselect--open .rt-multiselect__chevron{transform:rotate(180deg)}.rt-multiselect__panel{--rt-multiselect-panel-shadow: var(--rt-shadow-md);--rt-multiselect-tree-indent: var(--rt-space-lg);--rt-multiselect-panel-max-height: var(--rt-input-panel-max-height);width:100%;max-height:var(--rt-multiselect-panel-max-height);box-sizing:border-box;border:var(--rt-input-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-input-radius);background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-multiselect-panel-shadow);overflow-y:auto}.rt-multiselect__list{padding:var(--rt-space-2xs) 0;margin:0;list-style:none}.rt-multiselect__option{--rt-multiselect-tree-level: 0;display:flex;align-items:center;padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);padding-inline-start:calc(var(--rt-space-md) + var(--rt-multiselect-tree-indent) * var(--rt-multiselect-tree-level))}.rt-multiselect__option:hover,.rt-multiselect__option--active{background-color:var(--rt-color-bg-hover)}.rt-multiselect__option--selected{background-color:var(--rt-color-action-primary-subtle);font-weight:var(--rt-font-weight-semibold)}.rt-multiselect__option--disabled{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-multiselect__option--disabled:hover{background-color:transparent}.rt-multiselect__toggle,.rt-multiselect__toggle-space{display:inline-flex;flex-shrink:0;block-size:var(--rt-input-icon-size);inline-size:var(--rt-input-icon-size)}.rt-multiselect__toggle{align-items:center;justify-content:center;padding:0;border:0;background:transparent;cursor:pointer}.rt-multiselect__checkbox{flex-shrink:0;margin:0;pointer-events:none}.rt-multiselect__option-label{min-width:0;flex:1 1 auto}.rt-multiselect__empty{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-input-color-text-placeholder);font-style:italic}.rt-multiselect[data-rt-radius=none]{--rt-multiselect-radius: var(--rt-radius-none)}.rt-multiselect[data-rt-radius=xs]{--rt-multiselect-radius: var(--rt-radius-xs)}.rt-multiselect[data-rt-radius=sm]{--rt-multiselect-radius: var(--rt-radius-sm)}.rt-multiselect[data-rt-radius=ms]{--rt-multiselect-radius: var(--rt-radius-ms)}.rt-multiselect[data-rt-radius=md]{--rt-multiselect-radius: var(--rt-radius-md)}.rt-multiselect[data-rt-radius=lg]{--rt-multiselect-radius: var(--rt-radius-lg)}.rt-multiselect[data-rt-radius=xl]{--rt-multiselect-radius: var(--rt-radius-xl)}.rt-multiselect[data-rt-radius=\"2xl\"]{--rt-multiselect-radius: var(--rt-radius-2xl)}.rt-multiselect[data-rt-radius=full]{--rt-multiselect-radius: var(--rt-radius-full)}}\n"] }]
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
*/
|
|
313
|
-
|
|
61
|
+
var RtMultiselectComponent = class RtMultiselectComponent extends RtFormControlBase {
|
|
62
|
+
#t_uiSelectValues;
|
|
63
|
+
constructor() {
|
|
64
|
+
super();
|
|
65
|
+
this.#t_uiSelectValues = rtKitLabel("uiSelectValues");
|
|
66
|
+
this.t = inject(RT_KIT_LABELS);
|
|
67
|
+
this.panelId = `rt-multiselect-panel-${nextPanelId()}`;
|
|
68
|
+
this.placeholderText = computed(() => this.placeholder() || this.#t_uiSelectValues(), ...ngDevMode ? [{ debugName: "placeholderText" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.popover = viewChild.required(RtPopoverDirective, ...ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []);
|
|
70
|
+
this.triggerEl = viewChild("triggerEl", ...ngDevMode ? [{ debugName: "triggerEl" }] : /* istanbul ignore next */ []);
|
|
71
|
+
this.activeIndex = signal(-1, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
72
|
+
this.openBranches = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "openBranches" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.isTree = computed(() => rtTreeIsTree(this.options()), ...ngDevMode ? [{ debugName: "isTree" }] : /* istanbul ignore next */ []);
|
|
74
|
+
this.rows = computed(() => rtTreeRows(this.options(), this.openBranches()), ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
75
|
+
this.rowChecks = computed(() => this.rows().map((row) => this.#checkOf(row)), ...ngDevMode ? [{ debugName: "rowChecks" }] : /* istanbul ignore next */ []);
|
|
76
|
+
this.isOpen = computed(() => this.popover().isOpen(), ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
77
|
+
this.activeOptionId = computed(() => this.isOpen() && this.activeIndex() >= 0 ? `${this.panelId}-opt-${this.activeIndex()}` : null, ...ngDevMode ? [{ debugName: "activeOptionId" }] : /* istanbul ignore next */ []);
|
|
78
|
+
this.triggerTpl = contentChild(RtSelectTriggerDirective, ...ngDevMode ? [{ debugName: "triggerTpl" }] : /* istanbul ignore next */ []);
|
|
79
|
+
this.hasValue = computed(() => this.value().length > 0, ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
|
|
80
|
+
this.visibleChips = computed(() => this.value().slice(0, this.maxChips()), ...ngDevMode ? [{ debugName: "visibleChips" }] : /* istanbul ignore next */ []);
|
|
81
|
+
this.extraChipsCount = computed(() => Math.max(0, this.value().length - this.maxChips()), ...ngDevMode ? [{ debugName: "extraChipsCount" }] : /* istanbul ignore next */ []);
|
|
82
|
+
this.triggerState = computed(() => ({
|
|
83
|
+
isOpen: this.isOpen(),
|
|
84
|
+
value: this.value(),
|
|
85
|
+
label: this.displayText(),
|
|
86
|
+
isDisabled: this.isDisabled()
|
|
87
|
+
}), ...ngDevMode ? [{ debugName: "triggerState" }] : /* istanbul ignore next */ []);
|
|
88
|
+
this.displayText = computed(() => this.value().map((v) => this.labelOf(v)).join(", "), ...ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []);
|
|
89
|
+
this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
90
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
91
|
+
this.maxChips = input(3, ...ngDevMode ? [{ debugName: "maxChips" }] : /* istanbul ignore next */ []);
|
|
92
|
+
this.iconLeft = input(null, ...ngDevMode ? [{ debugName: "iconLeft" }] : /* istanbul ignore next */ []);
|
|
93
|
+
this.panelWidth = input("trigger-min", ...ngDevMode ? [{ debugName: "panelWidth" }] : /* istanbul ignore next */ []);
|
|
94
|
+
this.panelMaxHeight = input(null, ...ngDevMode ? [{ debugName: "panelMaxHeight" }] : /* istanbul ignore next */ []);
|
|
95
|
+
rtScrollActiveOptionIntoView(this.activeOptionId);
|
|
96
|
+
}
|
|
97
|
+
setDisabledState(disabled) {
|
|
98
|
+
super.setDisabledState(disabled);
|
|
99
|
+
if (disabled) this.popover().close();
|
|
100
|
+
}
|
|
101
|
+
getEmptyValue() {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
focusAfterClear() {
|
|
105
|
+
this.triggerEl()?.nativeElement.focus();
|
|
106
|
+
}
|
|
107
|
+
labelOf(value) {
|
|
108
|
+
return rtTreeFind(this.options(), value)?.label ?? String(value);
|
|
109
|
+
}
|
|
110
|
+
isSelected(value) {
|
|
111
|
+
return this.value().includes(value);
|
|
112
|
+
}
|
|
113
|
+
onOpened() {
|
|
114
|
+
this.openBranches.set(rtTreeOpenFor(this.options(), this.value()));
|
|
115
|
+
}
|
|
116
|
+
toggleBranch(event, value) {
|
|
117
|
+
event.stopPropagation();
|
|
118
|
+
this.openBranches.update((open) => rtTreeToggle(open, value));
|
|
119
|
+
}
|
|
120
|
+
onClosed() {
|
|
121
|
+
this.activeIndex.set(-1);
|
|
122
|
+
this.markTouched();
|
|
123
|
+
}
|
|
124
|
+
toggleOption(opt) {
|
|
125
|
+
if (opt.disabled || this.isDisabled()) return;
|
|
126
|
+
const leaves = rtTreeLeaves(opt);
|
|
127
|
+
const current = this.value();
|
|
128
|
+
const next = rtTreeBranchState(opt, current) === "all" ? current.filter((v) => !leaves.includes(v)) : [...current, ...leaves.filter((leaf) => !current.includes(leaf))];
|
|
129
|
+
this.value.set(next);
|
|
130
|
+
this.emitChange([...next]);
|
|
131
|
+
}
|
|
132
|
+
removeChip(value, event) {
|
|
133
|
+
event.stopPropagation();
|
|
134
|
+
if (this.isDisabled()) return;
|
|
135
|
+
const next = this.value().filter((v) => v !== value);
|
|
136
|
+
this.value.set(next);
|
|
137
|
+
this.emitChange([...next]);
|
|
138
|
+
}
|
|
139
|
+
onTriggerKeydown(event) {
|
|
140
|
+
if (this.isDisabled()) return;
|
|
141
|
+
if (!this.isOpen()) {
|
|
142
|
+
if (OPEN_KEYS.has(event.key)) {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
this.popover().open();
|
|
145
|
+
this.#moveActive(1);
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.#handleOpenKeydown(event);
|
|
150
|
+
}
|
|
151
|
+
#handleOpenKeydown(event) {
|
|
152
|
+
switch (event.key) {
|
|
153
|
+
case "ArrowDown":
|
|
154
|
+
event.preventDefault();
|
|
155
|
+
this.#moveActive(1);
|
|
156
|
+
break;
|
|
157
|
+
case "ArrowUp":
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
this.#moveActive(-1);
|
|
160
|
+
break;
|
|
161
|
+
case "Enter":
|
|
162
|
+
case " ":
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
this.#toggleActive();
|
|
165
|
+
break;
|
|
166
|
+
case "Escape":
|
|
167
|
+
event.preventDefault();
|
|
168
|
+
this.popover().close();
|
|
169
|
+
break;
|
|
170
|
+
case "ArrowRight":
|
|
171
|
+
case "ArrowLeft":
|
|
172
|
+
event.preventDefault();
|
|
173
|
+
this.#sideKey(event.key);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
#checkOf(row) {
|
|
177
|
+
if (row.branch) return rtTreeBranchState(row.option, this.value());
|
|
178
|
+
return this.value().includes(row.option.value) ? "all" : "none";
|
|
179
|
+
}
|
|
180
|
+
#sideKey(key) {
|
|
181
|
+
const answer = rtTreeSideKey(this.rows(), this.activeIndex(), key);
|
|
182
|
+
const toggle = answer.toggle;
|
|
183
|
+
if (toggle !== null) this.openBranches.update((open) => rtTreeToggle(open, toggle));
|
|
184
|
+
this.activeIndex.set(answer.index);
|
|
185
|
+
}
|
|
186
|
+
#moveActive(delta) {
|
|
187
|
+
const opts = this.rows().map((row) => row.option);
|
|
188
|
+
if (opts.length === 0) {
|
|
189
|
+
this.activeIndex.set(-1);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
let index = this.activeIndex();
|
|
193
|
+
for (let step = 0; step < opts.length; step += 1) {
|
|
194
|
+
index = (index + delta + opts.length) % opts.length;
|
|
195
|
+
if (!opts[index].disabled) {
|
|
196
|
+
this.activeIndex.set(index);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
#toggleActive() {
|
|
202
|
+
const opts = this.rows().map((row) => row.option);
|
|
203
|
+
const index = this.activeIndex();
|
|
204
|
+
if (index >= 0 && index < opts.length) this.toggleOption(opts[index]);
|
|
205
|
+
}
|
|
206
|
+
static {
|
|
207
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
208
|
+
minVersion: "12.0.0",
|
|
209
|
+
version: "22.2.2",
|
|
210
|
+
ngImport: i0,
|
|
211
|
+
type: RtMultiselectComponent,
|
|
212
|
+
deps: [],
|
|
213
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
static {
|
|
217
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
218
|
+
minVersion: "17.0.0",
|
|
219
|
+
version: "22.2.2",
|
|
220
|
+
type: RtMultiselectComponent,
|
|
221
|
+
isStandalone: true,
|
|
222
|
+
selector: "rt-multiselect",
|
|
223
|
+
inputs: {
|
|
224
|
+
options: {
|
|
225
|
+
classPropertyName: "options",
|
|
226
|
+
publicName: "options",
|
|
227
|
+
isSignal: true,
|
|
228
|
+
isRequired: false,
|
|
229
|
+
transformFunction: null
|
|
230
|
+
},
|
|
231
|
+
placeholder: {
|
|
232
|
+
classPropertyName: "placeholder",
|
|
233
|
+
publicName: "placeholder",
|
|
234
|
+
isSignal: true,
|
|
235
|
+
isRequired: false,
|
|
236
|
+
transformFunction: null
|
|
237
|
+
},
|
|
238
|
+
maxChips: {
|
|
239
|
+
classPropertyName: "maxChips",
|
|
240
|
+
publicName: "maxChips",
|
|
241
|
+
isSignal: true,
|
|
242
|
+
isRequired: false,
|
|
243
|
+
transformFunction: null
|
|
244
|
+
},
|
|
245
|
+
iconLeft: {
|
|
246
|
+
classPropertyName: "iconLeft",
|
|
247
|
+
publicName: "iconLeft",
|
|
248
|
+
isSignal: true,
|
|
249
|
+
isRequired: false,
|
|
250
|
+
transformFunction: null
|
|
251
|
+
},
|
|
252
|
+
panelWidth: {
|
|
253
|
+
classPropertyName: "panelWidth",
|
|
254
|
+
publicName: "panelWidth",
|
|
255
|
+
isSignal: true,
|
|
256
|
+
isRequired: false,
|
|
257
|
+
transformFunction: null
|
|
258
|
+
},
|
|
259
|
+
panelMaxHeight: {
|
|
260
|
+
classPropertyName: "panelMaxHeight",
|
|
261
|
+
publicName: "panelMaxHeight",
|
|
262
|
+
isSignal: true,
|
|
263
|
+
isRequired: false,
|
|
264
|
+
transformFunction: null
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
host: {
|
|
268
|
+
properties: {
|
|
269
|
+
"class.rt-multiselect--open": "isOpen()",
|
|
270
|
+
"class.rt-multiselect--disabled": "isDisabled()",
|
|
271
|
+
"class.rt-multiselect--readonly": "isReadonly()",
|
|
272
|
+
"class.rt-multiselect--invalid": "isInvalid()",
|
|
273
|
+
"class.rt-multiselect--borderless": "!bordered()",
|
|
274
|
+
"class.rt-multiselect--size--sm": "size() === 'sm'",
|
|
275
|
+
"class.rt-multiselect--size--lg": "size() === 'lg'"
|
|
276
|
+
},
|
|
277
|
+
classAttribute: "rt-multiselect"
|
|
278
|
+
},
|
|
279
|
+
providers: [{
|
|
280
|
+
provide: RtFormControlBase,
|
|
281
|
+
useExisting: forwardRef(() => RtMultiselectComponent)
|
|
282
|
+
}],
|
|
283
|
+
queries: [{
|
|
284
|
+
propertyName: "triggerTpl",
|
|
285
|
+
first: true,
|
|
286
|
+
predicate: RtSelectTriggerDirective,
|
|
287
|
+
descendants: true,
|
|
288
|
+
isSignal: true
|
|
289
|
+
}],
|
|
290
|
+
viewQueries: [{
|
|
291
|
+
propertyName: "popover",
|
|
292
|
+
first: true,
|
|
293
|
+
predicate: RtPopoverDirective,
|
|
294
|
+
descendants: true,
|
|
295
|
+
isSignal: true
|
|
296
|
+
}, {
|
|
297
|
+
propertyName: "triggerEl",
|
|
298
|
+
first: true,
|
|
299
|
+
predicate: ["triggerEl"],
|
|
300
|
+
descendants: true,
|
|
301
|
+
isSignal: true
|
|
302
|
+
}],
|
|
303
|
+
usesInheritance: true,
|
|
304
|
+
hostDirectives: [{
|
|
305
|
+
directive: i1.RtRadiusDirective,
|
|
306
|
+
inputs: ["radius", "radius"]
|
|
307
|
+
}],
|
|
308
|
+
ngImport: i0,
|
|
309
|
+
template: "<ng-container rtBlock=\"rt-multiselect\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"multiselect-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '—' }}</span>\n }\n <button\n #triggerEl\n rtElem=\"trigger\"\n qa-dataid=\"multiselect-trigger\"\n type=\"button\"\n [rtPopoverWidth]=\"panelWidth()\"\n [rtMod]=\"{ own: !!triggerTpl() }\"\n [rtPopover]=\"panelTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\">\n <!--\n Разметка указателя: своя, если потребитель её объявил, иначе зашитая китом. Она встаёт\n внутрь кнопки, а не вместо неё: поведение — открытие панели, приметы доступности,\n отключённость, клавиши и закрытие — остаётся на кнопке кита.\n -->\n @if (triggerTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: triggerState() }\" />\n } @else {\n @if (iconLeft(); as left) {\n <rt-icon rtElem=\"icon-left\" qa-dataid=\"multiselect-icon-left\" size=\"sm\" color=\"muted\" [name]=\"left\" />\n }\n @if (value().length === 0) {\n <span rtElem=\"placeholder\" qa-dataid=\"multiselect-placeholder\">{{ placeholderText() }}</span>\n } @else {\n <span rtElem=\"chips\">\n @for (val of visibleChips(); track val) {\n <span rtElem=\"chip\" qa-dataid=\"multiselect-chip\" [attr.data-value]=\"val\">\n <rt-tag\n severity=\"info\"\n [value]=\"val | rtMultiselectLabel: options()\"\n [closable]=\"true\"\n (closed)=\"removeChip(val, $event)\" />\n </span>\n }\n @if (extraChipsCount() > 0) {\n <span rtElem=\"chip-more\" qa-dataid=\"multiselect-chip-more\">+{{ extraChipsCount() }}</span>\n }\n </span>\n }\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"multiselect-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 <rt-icon rtElem=\"chevron\" name=\"chevron-down\" size=\"sm\" color=\"muted\" />\n }\n </button>\n\n <ng-template #panelTpl>\n <div\n rtElem=\"panel\"\n qa-dataid=\"multiselect-panel\"\n role=\"listbox\"\n [style.--rt-multiselect-panel-max-height]=\"panelMaxHeight()\"\n [attr.aria-label]=\"ariaLabel()\">\n <!--\n Опции выбираются мышью через (click); keyboard-nav — на trigger'е\n (activedescendant), опции не focusable индивидуально.\n -->\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <ul rtElem=\"list\">\n @for (row of rows(); track row.option.value; let i = $index) {\n <li\n rtElem=\"option\"\n qa-dataid=\"multiselect-option\"\n role=\"option\"\n [id]=\"panelId + '-opt-' + i\"\n [attr.data-value]=\"row.option.value\"\n [attr.aria-level]=\"isTree() ? row.level + 1 : null\"\n [style.--rt-multiselect-tree-level]=\"row.level\"\n [rtMod]=\"{\n selected: rowChecks()[i] === 'all',\n active: i === activeIndex(),\n disabled: !!row.option.disabled,\n }\"\n [attr.aria-selected]=\"rowChecks()[i] === 'all'\"\n [attr.aria-disabled]=\"!!row.option.disabled\"\n (click)=\"toggleOption(row.option)\">\n @if (isTree()) {\n @if (row.branch) {\n <button\n rtElem=\"toggle\"\n qa-dataid=\"multiselect-option-toggle\"\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"row.open ? t().uiCollapse : t().uiExpand\"\n [attr.aria-expanded]=\"row.open\"\n (click)=\"toggleBranch($event, row.option.value)\">\n <rt-icon size=\"sm\" color=\"muted\" [name]=\"row.open ? 'chevron-down' : 'chevron-right'\" />\n </button>\n } @else {\n <span rtElem=\"toggle-space\"></span>\n }\n }\n <input\n rtElem=\"checkbox\"\n qa-dataid=\"multiselect-option-checkbox\"\n type=\"checkbox\"\n tabindex=\"-1\"\n [checked]=\"rowChecks()[i] === 'all'\"\n [indeterminate]=\"rowChecks()[i] === 'some'\" />\n <span rtElem=\"option-label\" qa-dataid=\"multiselect-option-label\">{{ row.option.label }}</span>\n </li>\n } @empty {\n <li rtElem=\"empty\" qa-dataid=\"multiselect-empty\">{{ t().uiNoOptions }}</li>\n }\n </ul>\n </div>\n </ng-template>\n</ng-container>\n",
|
|
310
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-multiselect{--rt-multiselect-radius: var(--rt-input-radius);--rt-multiselect-caret-transition-duration: var(--rt-duration-fast);--rt-multiselect-own-outline-width: var(--rt-border-width-medium);position:relative;display:block;width:100%}.rt-multiselect--borderless .rt-multiselect__trigger{border-color:transparent}.rt-multiselect__trigger{display: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-multiselect-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:pointer;font-family:inherit;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);text-align:start;transition:var(--rt-input-transition)}.rt-multiselect__trigger:focus{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-multiselect__trigger:disabled{cursor:not-allowed}.rt-multiselect__trigger--own{width:auto;min-height:0;padding:0;border-color:transparent;background-color:transparent}.rt-multiselect__trigger--own:focus{border-color:transparent;box-shadow:none}.rt-multiselect__trigger--own:focus-visible{outline:var(--rt-multiselect-own-outline-width) solid var(--rt-input-color-border-focus);outline-offset:var(--rt-input-focus-outline-offset)}.rt-multiselect--open .rt-multiselect__trigger{border-color:var(--rt-input-color-border-focus)}.rt-multiselect--open .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger{border-color:var(--rt-input-color-border-error)}.rt-multiselect--invalid .rt-multiselect__trigger:focus{box-shadow:var(--rt-input-focus-shadow-error)}.rt-multiselect--invalid .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger--own:focus{box-shadow:none}.rt-multiselect--disabled{opacity:var(--rt-input-disabled-opacity)}.rt-multiselect--readonly .rt-multiselect__trigger{display:none}.rt-multiselect__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-multiselect__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-multiselect--size--sm .rt-multiselect__trigger{min-height:var(--rt-input-height-sm)}.rt-multiselect--size--lg .rt-multiselect__trigger{min-height:var(--rt-input-height-lg)}.rt-multiselect__placeholder{overflow:hidden;min-width:0;flex:1 1 auto;color:var(--rt-input-color-text-placeholder);text-overflow:ellipsis;white-space:nowrap}.rt-multiselect__chips{display:flex;min-width:0;flex:1 1 auto;flex-wrap:wrap;gap:var(--rt-space-2xs)}.rt-multiselect__chip{display:inline-flex;align-items:center}.rt-multiselect__chip-more{display:inline-flex;align-items:center;padding:0 var(--rt-space-xs);color:var(--rt-input-color-text-placeholder);font-size:var(--rt-input-font-size)}.rt-multiselect__icon-left,.rt-multiselect__clear{flex-shrink:0}.rt-multiselect__chevron{flex-shrink:0;transition:transform var(--rt-multiselect-caret-transition-duration) ease}.rt-multiselect--open .rt-multiselect__chevron{transform:rotate(180deg)}.rt-multiselect__panel{--rt-multiselect-panel-shadow: var(--rt-shadow-md);--rt-multiselect-tree-indent: var(--rt-space-lg);--rt-multiselect-panel-max-height: var(--rt-input-panel-max-height);width:100%;max-height:var(--rt-multiselect-panel-max-height);box-sizing:border-box;border:var(--rt-input-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-input-radius);background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-multiselect-panel-shadow);overflow-y:auto}.rt-multiselect__list{padding:var(--rt-space-2xs) 0;margin:0;list-style:none}.rt-multiselect__option{--rt-multiselect-tree-level: 0;display:flex;align-items:center;padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);padding-inline-start:calc(var(--rt-space-md) + var(--rt-multiselect-tree-indent) * var(--rt-multiselect-tree-level))}.rt-multiselect__option:hover,.rt-multiselect__option--active{background-color:var(--rt-color-bg-hover)}.rt-multiselect__option--selected{background-color:var(--rt-color-action-primary-subtle);font-weight:var(--rt-font-weight-semibold)}.rt-multiselect__option--disabled{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-multiselect__option--disabled:hover{background-color:transparent}.rt-multiselect__toggle,.rt-multiselect__toggle-space{display:inline-flex;flex-shrink:0;block-size:var(--rt-input-icon-size);inline-size:var(--rt-input-icon-size)}.rt-multiselect__toggle{align-items:center;justify-content:center;padding:0;border:0;background:transparent;cursor:pointer}.rt-multiselect__checkbox{flex-shrink:0;margin:0;pointer-events:none}.rt-multiselect__option-label{min-width:0;flex:1 1 auto}.rt-multiselect__empty{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-input-color-text-placeholder);font-style:italic}.rt-multiselect[data-rt-radius=none]{--rt-multiselect-radius: var(--rt-radius-none)}.rt-multiselect[data-rt-radius=xs]{--rt-multiselect-radius: var(--rt-radius-xs)}.rt-multiselect[data-rt-radius=sm]{--rt-multiselect-radius: var(--rt-radius-sm)}.rt-multiselect[data-rt-radius=ms]{--rt-multiselect-radius: var(--rt-radius-ms)}.rt-multiselect[data-rt-radius=md]{--rt-multiselect-radius: var(--rt-radius-md)}.rt-multiselect[data-rt-radius=lg]{--rt-multiselect-radius: var(--rt-radius-lg)}.rt-multiselect[data-rt-radius=xl]{--rt-multiselect-radius: var(--rt-radius-xl)}.rt-multiselect[data-rt-radius=\"2xl\"]{--rt-multiselect-radius: var(--rt-radius-2xl)}.rt-multiselect[data-rt-radius=full]{--rt-multiselect-radius: var(--rt-radius-full)}}\n"],
|
|
311
|
+
dependencies: [
|
|
312
|
+
{
|
|
313
|
+
kind: "directive",
|
|
314
|
+
type: NgTemplateOutlet,
|
|
315
|
+
selector: "[ngTemplateOutlet]",
|
|
316
|
+
inputs: [
|
|
317
|
+
"ngTemplateOutletContext",
|
|
318
|
+
"ngTemplateOutlet",
|
|
319
|
+
"ngTemplateOutletInjector"
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
kind: "component",
|
|
324
|
+
type: RtIconButtonComponent,
|
|
325
|
+
selector: "rt-icon-button",
|
|
326
|
+
inputs: [
|
|
327
|
+
"icon",
|
|
328
|
+
"glyph",
|
|
329
|
+
"ariaLabel",
|
|
330
|
+
"variant",
|
|
331
|
+
"iconColor",
|
|
332
|
+
"iconFill",
|
|
333
|
+
"size",
|
|
334
|
+
"iconSize",
|
|
335
|
+
"type",
|
|
336
|
+
"tooltip",
|
|
337
|
+
"tooltipHideOnClick",
|
|
338
|
+
"tabIndex",
|
|
339
|
+
"loading",
|
|
340
|
+
"disabled",
|
|
341
|
+
"active",
|
|
342
|
+
"expanded",
|
|
343
|
+
"indicator"
|
|
344
|
+
],
|
|
345
|
+
outputs: ["clicked"]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
kind: "component",
|
|
349
|
+
type: RtIconComponent,
|
|
350
|
+
selector: "rt-icon",
|
|
351
|
+
inputs: [
|
|
352
|
+
"name",
|
|
353
|
+
"glyph",
|
|
354
|
+
"glyphStrategy",
|
|
355
|
+
"size",
|
|
356
|
+
"color",
|
|
357
|
+
"fill",
|
|
358
|
+
"spin",
|
|
359
|
+
"rotate"
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
kind: "directive",
|
|
364
|
+
type: RtPopoverDirective,
|
|
365
|
+
selector: "[rtPopover]",
|
|
366
|
+
inputs: [
|
|
367
|
+
"rtPopover",
|
|
368
|
+
"rtPopoverTrigger",
|
|
369
|
+
"rtPopoverWidth",
|
|
370
|
+
"rtPopoverAlign",
|
|
371
|
+
"rtPopoverFitViewport",
|
|
372
|
+
"rtPopoverContext",
|
|
373
|
+
"rtPopoverPanelClass",
|
|
374
|
+
"rtPopoverDisabled",
|
|
375
|
+
"rtPopoverOffsetY",
|
|
376
|
+
"rtPopoverOffsetX",
|
|
377
|
+
"rtPopoverPositions"
|
|
378
|
+
],
|
|
379
|
+
outputs: ["rtPopoverOpened", "rtPopoverClosed"],
|
|
380
|
+
exportAs: ["rtPopover"]
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
kind: "component",
|
|
384
|
+
type: RtTagComponent,
|
|
385
|
+
selector: "rt-tag",
|
|
386
|
+
inputs: [
|
|
387
|
+
"value",
|
|
388
|
+
"highlight",
|
|
389
|
+
"severity",
|
|
390
|
+
"size",
|
|
391
|
+
"appearance",
|
|
392
|
+
"icon",
|
|
393
|
+
"iconEnd",
|
|
394
|
+
"closable"
|
|
395
|
+
],
|
|
396
|
+
outputs: ["closed"]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
kind: "directive",
|
|
400
|
+
type: BlockDirective,
|
|
401
|
+
selector: "[rtBlock]",
|
|
402
|
+
inputs: ["rtMod"]
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
kind: "directive",
|
|
406
|
+
type: ElemDirective,
|
|
407
|
+
selector: "[rtElem]",
|
|
408
|
+
inputs: ["rtMod"]
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
kind: "directive",
|
|
412
|
+
type: ModDirective,
|
|
413
|
+
selector: "[rtMod]"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
kind: "pipe",
|
|
417
|
+
type: RtMultiselectLabelPipe,
|
|
418
|
+
name: "rtMultiselectLabel"
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
422
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
427
|
+
minVersion: "12.0.0",
|
|
428
|
+
version: "22.2.2",
|
|
429
|
+
ngImport: i0,
|
|
430
|
+
type: RtMultiselectComponent,
|
|
431
|
+
decorators: [{
|
|
432
|
+
type: Component,
|
|
433
|
+
args: [{
|
|
434
|
+
selector: "rt-multiselect",
|
|
435
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
436
|
+
encapsulation: ViewEncapsulation.None,
|
|
437
|
+
imports: [
|
|
438
|
+
NgTemplateOutlet,
|
|
439
|
+
RtIconButtonComponent,
|
|
440
|
+
RtIconComponent,
|
|
441
|
+
RtPopoverDirective,
|
|
442
|
+
RtTagComponent,
|
|
443
|
+
BlockDirective,
|
|
444
|
+
ElemDirective,
|
|
445
|
+
ModDirective,
|
|
446
|
+
RtMultiselectLabelPipe
|
|
447
|
+
],
|
|
448
|
+
providers: [{
|
|
449
|
+
provide: RtFormControlBase,
|
|
450
|
+
useExisting: forwardRef(() => RtMultiselectComponent)
|
|
451
|
+
}],
|
|
452
|
+
hostDirectives: [{
|
|
453
|
+
directive: RtRadiusDirective,
|
|
454
|
+
inputs: ["radius"]
|
|
455
|
+
}],
|
|
456
|
+
host: {
|
|
457
|
+
class: BEM_BLOCK,
|
|
458
|
+
"[class.rt-multiselect--open]": "isOpen()",
|
|
459
|
+
"[class.rt-multiselect--disabled]": "isDisabled()",
|
|
460
|
+
"[class.rt-multiselect--readonly]": "isReadonly()",
|
|
461
|
+
"[class.rt-multiselect--invalid]": "isInvalid()",
|
|
462
|
+
"[class.rt-multiselect--borderless]": "!bordered()",
|
|
463
|
+
"[class.rt-multiselect--size--sm]": "size() === 'sm'",
|
|
464
|
+
"[class.rt-multiselect--size--lg]": "size() === 'lg'"
|
|
465
|
+
},
|
|
466
|
+
template: "<ng-container rtBlock=\"rt-multiselect\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"multiselect-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '—' }}</span>\n }\n <button\n #triggerEl\n rtElem=\"trigger\"\n qa-dataid=\"multiselect-trigger\"\n type=\"button\"\n [rtPopoverWidth]=\"panelWidth()\"\n [rtMod]=\"{ own: !!triggerTpl() }\"\n [rtPopover]=\"panelTpl\"\n [rtPopoverDisabled]=\"isDisabled()\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-activedescendant]=\"activeOptionId()\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onTriggerKeydown($event)\"\n (rtPopoverOpened)=\"onOpened()\"\n (rtPopoverClosed)=\"onClosed()\">\n <!--\n Разметка указателя: своя, если потребитель её объявил, иначе зашитая китом. Она встаёт\n внутрь кнопки, а не вместо неё: поведение — открытие панели, приметы доступности,\n отключённость, клавиши и закрытие — остаётся на кнопке кита.\n -->\n @if (triggerTpl(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: triggerState() }\" />\n } @else {\n @if (iconLeft(); as left) {\n <rt-icon rtElem=\"icon-left\" qa-dataid=\"multiselect-icon-left\" size=\"sm\" color=\"muted\" [name]=\"left\" />\n }\n @if (value().length === 0) {\n <span rtElem=\"placeholder\" qa-dataid=\"multiselect-placeholder\">{{ placeholderText() }}</span>\n } @else {\n <span rtElem=\"chips\">\n @for (val of visibleChips(); track val) {\n <span rtElem=\"chip\" qa-dataid=\"multiselect-chip\" [attr.data-value]=\"val\">\n <rt-tag\n severity=\"info\"\n [value]=\"val | rtMultiselectLabel: options()\"\n [closable]=\"true\"\n (closed)=\"removeChip(val, $event)\" />\n </span>\n }\n @if (extraChipsCount() > 0) {\n <span rtElem=\"chip-more\" qa-dataid=\"multiselect-chip-more\">+{{ extraChipsCount() }}</span>\n }\n </span>\n }\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"multiselect-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 <rt-icon rtElem=\"chevron\" name=\"chevron-down\" size=\"sm\" color=\"muted\" />\n }\n </button>\n\n <ng-template #panelTpl>\n <div\n rtElem=\"panel\"\n qa-dataid=\"multiselect-panel\"\n role=\"listbox\"\n [style.--rt-multiselect-panel-max-height]=\"panelMaxHeight()\"\n [attr.aria-label]=\"ariaLabel()\">\n <!--\n Опции выбираются мышью через (click); keyboard-nav — на trigger'е\n (activedescendant), опции не focusable индивидуально.\n -->\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <ul rtElem=\"list\">\n @for (row of rows(); track row.option.value; let i = $index) {\n <li\n rtElem=\"option\"\n qa-dataid=\"multiselect-option\"\n role=\"option\"\n [id]=\"panelId + '-opt-' + i\"\n [attr.data-value]=\"row.option.value\"\n [attr.aria-level]=\"isTree() ? row.level + 1 : null\"\n [style.--rt-multiselect-tree-level]=\"row.level\"\n [rtMod]=\"{\n selected: rowChecks()[i] === 'all',\n active: i === activeIndex(),\n disabled: !!row.option.disabled,\n }\"\n [attr.aria-selected]=\"rowChecks()[i] === 'all'\"\n [attr.aria-disabled]=\"!!row.option.disabled\"\n (click)=\"toggleOption(row.option)\">\n @if (isTree()) {\n @if (row.branch) {\n <button\n rtElem=\"toggle\"\n qa-dataid=\"multiselect-option-toggle\"\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"row.open ? t().uiCollapse : t().uiExpand\"\n [attr.aria-expanded]=\"row.open\"\n (click)=\"toggleBranch($event, row.option.value)\">\n <rt-icon size=\"sm\" color=\"muted\" [name]=\"row.open ? 'chevron-down' : 'chevron-right'\" />\n </button>\n } @else {\n <span rtElem=\"toggle-space\"></span>\n }\n }\n <input\n rtElem=\"checkbox\"\n qa-dataid=\"multiselect-option-checkbox\"\n type=\"checkbox\"\n tabindex=\"-1\"\n [checked]=\"rowChecks()[i] === 'all'\"\n [indeterminate]=\"rowChecks()[i] === 'some'\" />\n <span rtElem=\"option-label\" qa-dataid=\"multiselect-option-label\">{{ row.option.label }}</span>\n </li>\n } @empty {\n <li rtElem=\"empty\" qa-dataid=\"multiselect-empty\">{{ t().uiNoOptions }}</li>\n }\n </ul>\n </div>\n </ng-template>\n</ng-container>\n",
|
|
467
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-multiselect{--rt-multiselect-radius: var(--rt-input-radius);--rt-multiselect-caret-transition-duration: var(--rt-duration-fast);--rt-multiselect-own-outline-width: var(--rt-border-width-medium);position:relative;display:block;width:100%}.rt-multiselect--borderless .rt-multiselect__trigger{border-color:transparent}.rt-multiselect__trigger{display: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-multiselect-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:pointer;font-family:inherit;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);text-align:start;transition:var(--rt-input-transition)}.rt-multiselect__trigger:focus{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-multiselect__trigger:disabled{cursor:not-allowed}.rt-multiselect__trigger--own{width:auto;min-height:0;padding:0;border-color:transparent;background-color:transparent}.rt-multiselect__trigger--own:focus{border-color:transparent;box-shadow:none}.rt-multiselect__trigger--own:focus-visible{outline:var(--rt-multiselect-own-outline-width) solid var(--rt-input-color-border-focus);outline-offset:var(--rt-input-focus-outline-offset)}.rt-multiselect--open .rt-multiselect__trigger{border-color:var(--rt-input-color-border-focus)}.rt-multiselect--open .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger{border-color:var(--rt-input-color-border-error)}.rt-multiselect--invalid .rt-multiselect__trigger:focus{box-shadow:var(--rt-input-focus-shadow-error)}.rt-multiselect--invalid .rt-multiselect__trigger--own{border-color:transparent}.rt-multiselect--invalid .rt-multiselect__trigger--own:focus{box-shadow:none}.rt-multiselect--disabled{opacity:var(--rt-input-disabled-opacity)}.rt-multiselect--readonly .rt-multiselect__trigger{display:none}.rt-multiselect__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-multiselect__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-multiselect--size--sm .rt-multiselect__trigger{min-height:var(--rt-input-height-sm)}.rt-multiselect--size--lg .rt-multiselect__trigger{min-height:var(--rt-input-height-lg)}.rt-multiselect__placeholder{overflow:hidden;min-width:0;flex:1 1 auto;color:var(--rt-input-color-text-placeholder);text-overflow:ellipsis;white-space:nowrap}.rt-multiselect__chips{display:flex;min-width:0;flex:1 1 auto;flex-wrap:wrap;gap:var(--rt-space-2xs)}.rt-multiselect__chip{display:inline-flex;align-items:center}.rt-multiselect__chip-more{display:inline-flex;align-items:center;padding:0 var(--rt-space-xs);color:var(--rt-input-color-text-placeholder);font-size:var(--rt-input-font-size)}.rt-multiselect__icon-left,.rt-multiselect__clear{flex-shrink:0}.rt-multiselect__chevron{flex-shrink:0;transition:transform var(--rt-multiselect-caret-transition-duration) ease}.rt-multiselect--open .rt-multiselect__chevron{transform:rotate(180deg)}.rt-multiselect__panel{--rt-multiselect-panel-shadow: var(--rt-shadow-md);--rt-multiselect-tree-indent: var(--rt-space-lg);--rt-multiselect-panel-max-height: var(--rt-input-panel-max-height);width:100%;max-height:var(--rt-multiselect-panel-max-height);box-sizing:border-box;border:var(--rt-input-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-input-radius);background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-multiselect-panel-shadow);overflow-y:auto}.rt-multiselect__list{padding:var(--rt-space-2xs) 0;margin:0;list-style:none}.rt-multiselect__option{--rt-multiselect-tree-level: 0;display:flex;align-items:center;padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);padding-inline-start:calc(var(--rt-space-md) + var(--rt-multiselect-tree-indent) * var(--rt-multiselect-tree-level))}.rt-multiselect__option:hover,.rt-multiselect__option--active{background-color:var(--rt-color-bg-hover)}.rt-multiselect__option--selected{background-color:var(--rt-color-action-primary-subtle);font-weight:var(--rt-font-weight-semibold)}.rt-multiselect__option--disabled{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-multiselect__option--disabled:hover{background-color:transparent}.rt-multiselect__toggle,.rt-multiselect__toggle-space{display:inline-flex;flex-shrink:0;block-size:var(--rt-input-icon-size);inline-size:var(--rt-input-icon-size)}.rt-multiselect__toggle{align-items:center;justify-content:center;padding:0;border:0;background:transparent;cursor:pointer}.rt-multiselect__checkbox{flex-shrink:0;margin:0;pointer-events:none}.rt-multiselect__option-label{min-width:0;flex:1 1 auto}.rt-multiselect__empty{padding:var(--rt-space-sm) var(--rt-space-md);color:var(--rt-input-color-text-placeholder);font-style:italic}.rt-multiselect[data-rt-radius=none]{--rt-multiselect-radius: var(--rt-radius-none)}.rt-multiselect[data-rt-radius=xs]{--rt-multiselect-radius: var(--rt-radius-xs)}.rt-multiselect[data-rt-radius=sm]{--rt-multiselect-radius: var(--rt-radius-sm)}.rt-multiselect[data-rt-radius=ms]{--rt-multiselect-radius: var(--rt-radius-ms)}.rt-multiselect[data-rt-radius=md]{--rt-multiselect-radius: var(--rt-radius-md)}.rt-multiselect[data-rt-radius=lg]{--rt-multiselect-radius: var(--rt-radius-lg)}.rt-multiselect[data-rt-radius=xl]{--rt-multiselect-radius: var(--rt-radius-xl)}.rt-multiselect[data-rt-radius=\"2xl\"]{--rt-multiselect-radius: var(--rt-radius-2xl)}.rt-multiselect[data-rt-radius=full]{--rt-multiselect-radius: var(--rt-radius-full)}}\n"]
|
|
468
|
+
}]
|
|
469
|
+
}],
|
|
470
|
+
ctorParameters: () => [],
|
|
471
|
+
propDecorators: {
|
|
472
|
+
popover: [{
|
|
473
|
+
type: i0.ViewChild,
|
|
474
|
+
args: [i0.forwardRef(() => RtPopoverDirective), { isSignal: true }]
|
|
475
|
+
}],
|
|
476
|
+
triggerEl: [{
|
|
477
|
+
type: i0.ViewChild,
|
|
478
|
+
args: ["triggerEl", { isSignal: true }]
|
|
479
|
+
}],
|
|
480
|
+
triggerTpl: [{
|
|
481
|
+
type: i0.ContentChild,
|
|
482
|
+
args: [i0.forwardRef(() => RtSelectTriggerDirective), { isSignal: true }]
|
|
483
|
+
}],
|
|
484
|
+
options: [{
|
|
485
|
+
type: i0.Input,
|
|
486
|
+
args: [{
|
|
487
|
+
isSignal: true,
|
|
488
|
+
alias: "options",
|
|
489
|
+
required: false
|
|
490
|
+
}]
|
|
491
|
+
}],
|
|
492
|
+
placeholder: [{
|
|
493
|
+
type: i0.Input,
|
|
494
|
+
args: [{
|
|
495
|
+
isSignal: true,
|
|
496
|
+
alias: "placeholder",
|
|
497
|
+
required: false
|
|
498
|
+
}]
|
|
499
|
+
}],
|
|
500
|
+
maxChips: [{
|
|
501
|
+
type: i0.Input,
|
|
502
|
+
args: [{
|
|
503
|
+
isSignal: true,
|
|
504
|
+
alias: "maxChips",
|
|
505
|
+
required: false
|
|
506
|
+
}]
|
|
507
|
+
}],
|
|
508
|
+
iconLeft: [{
|
|
509
|
+
type: i0.Input,
|
|
510
|
+
args: [{
|
|
511
|
+
isSignal: true,
|
|
512
|
+
alias: "iconLeft",
|
|
513
|
+
required: false
|
|
514
|
+
}]
|
|
515
|
+
}],
|
|
516
|
+
panelWidth: [{
|
|
517
|
+
type: i0.Input,
|
|
518
|
+
args: [{
|
|
519
|
+
isSignal: true,
|
|
520
|
+
alias: "panelWidth",
|
|
521
|
+
required: false
|
|
522
|
+
}]
|
|
523
|
+
}],
|
|
524
|
+
panelMaxHeight: [{
|
|
525
|
+
type: i0.Input,
|
|
526
|
+
args: [{
|
|
527
|
+
isSignal: true,
|
|
528
|
+
alias: "panelMaxHeight",
|
|
529
|
+
required: false
|
|
530
|
+
}]
|
|
531
|
+
}]
|
|
532
|
+
}
|
|
533
|
+
});
|
|
314
534
|
export { RtMultiselectComponent };
|
|
315
|
-
|
|
535
|
+
|
|
536
|
+
//# sourceMappingURL=rt-tools-ui-kit-v2-multiselect.mjs.map
|