@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,540 +1,1067 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NgTemplateOutlet } from
|
|
4
|
-
import { takeUntilDestroyed } from
|
|
5
|
-
import { RouterLink } from
|
|
6
|
-
import { Subject, mergeMap } from
|
|
7
|
-
import { BlockDirective, ElemDirective, ModDirective } from
|
|
8
|
-
import { RT_KIT_LABELS,
|
|
9
|
-
import { RT_DIALOG_DATA,
|
|
10
|
-
import {
|
|
11
|
-
import * as i2 from
|
|
12
|
-
import { RtRadiusDirective } from
|
|
13
|
-
import * as i1 from
|
|
14
|
-
import { RtTooltipDirective } from
|
|
15
|
-
import { RtButtonDirective } from
|
|
16
|
-
import { FocusKeyManager } from
|
|
17
|
-
import * as i1
|
|
18
|
-
import { CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from
|
|
19
|
-
import { RtIconButtonComponent } from
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, TemplateRef, ViewEncapsulation, booleanAttribute, computed, contentChild, effect, inject, input, isDevMode, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
4
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
5
|
+
import { RouterLink } from "@angular/router";
|
|
6
|
+
import { Subject, mergeMap } from "rxjs";
|
|
7
|
+
import { BlockDirective, ElemDirective, ModDirective } from "@rt-tools/core";
|
|
8
|
+
import { RT_KIT_LABELS, carryThemeScope, materialPresetClassesOf, rtKitLabel } from "@rt-tools/ui-kit-v2/core";
|
|
9
|
+
import { RT_DIALOG_DATA, RtDialogComponent, RtDialogRef, RtDialogService } from "@rt-tools/ui-kit-v2/dialog";
|
|
10
|
+
import { RtIconComponent, materialPairOf } from "@rt-tools/ui-kit-v2/icon";
|
|
11
|
+
import * as i2 from "@rt-tools/ui-kit-v2/radius";
|
|
12
|
+
import { RtRadiusDirective } from "@rt-tools/ui-kit-v2/radius";
|
|
13
|
+
import * as i1$1 from "@rt-tools/ui-kit-v2/tooltip";
|
|
14
|
+
import { RtTooltipDirective } from "@rt-tools/ui-kit-v2/tooltip";
|
|
15
|
+
import { RtButtonDirective } from "@rt-tools/ui-kit-v2/button";
|
|
16
|
+
import { FocusKeyManager } from "@angular/cdk/a11y";
|
|
17
|
+
import * as i1 from "@angular/cdk/overlay";
|
|
18
|
+
import { CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from "@angular/cdk/overlay";
|
|
19
|
+
import { RtIconButtonComponent } from "@rt-tools/ui-kit-v2/icon-button";
|
|
20
|
+
var RtMenuItemIconDirective = class RtMenuItemIconDirective {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.templateRef = inject(TemplateRef);
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
26
|
+
minVersion: "12.0.0",
|
|
27
|
+
version: "22.2.2",
|
|
28
|
+
ngImport: i0,
|
|
29
|
+
type: RtMenuItemIconDirective,
|
|
30
|
+
deps: [],
|
|
31
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
static {
|
|
35
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
36
|
+
minVersion: "14.0.0",
|
|
37
|
+
version: "22.2.2",
|
|
38
|
+
type: RtMenuItemIconDirective,
|
|
39
|
+
isStandalone: true,
|
|
40
|
+
selector: "ng-template[rtMenuItemIcon]",
|
|
41
|
+
ngImport: i0
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
46
|
+
minVersion: "12.0.0",
|
|
47
|
+
version: "22.2.2",
|
|
48
|
+
ngImport: i0,
|
|
49
|
+
type: RtMenuItemIconDirective,
|
|
50
|
+
decorators: [{
|
|
51
|
+
type: Directive,
|
|
52
|
+
args: [{ selector: "ng-template[rtMenuItemIcon]" }]
|
|
53
|
+
}]
|
|
54
|
+
});
|
|
55
|
+
const BEM_BLOCK$2 = "rt-menu-confirm-dialog";
|
|
56
|
+
var RtMenuConfirmDialogComponent = class RtMenuConfirmDialogComponent {
|
|
57
|
+
constructor() {
|
|
58
|
+
this.t = inject(RT_KIT_LABELS);
|
|
59
|
+
this.data = inject(RT_DIALOG_DATA);
|
|
60
|
+
this.#dialogRef = inject(RtDialogRef);
|
|
61
|
+
}
|
|
62
|
+
#dialogRef;
|
|
63
|
+
onConfirm() {
|
|
64
|
+
this.#dialogRef.close(true);
|
|
65
|
+
}
|
|
66
|
+
onCancel() {
|
|
67
|
+
this.#dialogRef.close(false);
|
|
68
|
+
}
|
|
69
|
+
static {
|
|
70
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
71
|
+
minVersion: "12.0.0",
|
|
72
|
+
version: "22.2.2",
|
|
73
|
+
ngImport: i0,
|
|
74
|
+
type: RtMenuConfirmDialogComponent,
|
|
75
|
+
deps: [],
|
|
76
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
static {
|
|
80
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
81
|
+
minVersion: "17.0.0",
|
|
82
|
+
version: "22.2.2",
|
|
83
|
+
type: RtMenuConfirmDialogComponent,
|
|
84
|
+
isStandalone: true,
|
|
85
|
+
selector: "rt-menu-confirm-dialog",
|
|
86
|
+
host: { classAttribute: "rt-menu-confirm-dialog" },
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
template: "<rt-dialog width=\"360px\" [ariaLabel]=\"t().uiConfirmAction\">\n <div rtBlock=\"rt-menu-confirm-dialog\">\n <div rtElem=\"text\">\n @if (data.title; as title) {\n <h2 rtElem=\"title\" qa-dataid=\"menu-confirm-title\">{{ title }}</h2>\n }\n <p rtElem=\"message\" qa-dataid=\"menu-confirm-message\">{{ data.message }}</p>\n </div>\n <div rtElem=\"footer\">\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-cancel\"\n type=\"button\"\n appearance=\"text\"\n theme=\"secondary\"\n [label]=\"data.cancelLabel\"\n (click)=\"onCancel()\"></button>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-accept\"\n type=\"button\"\n appearance=\"filled\"\n [label]=\"data.confirmLabel\"\n [theme]=\"data.tone\"\n (click)=\"onConfirm()\"></button>\n </div>\n </div>\n</rt-dialog>\n",
|
|
89
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-confirm-dialog{display:flex;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-xl);gap:var(--rt-space-lg)}.rt-menu-confirm-dialog__text{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-menu-confirm-dialog__title{margin:0;color:var(--rt-color-text-primary);font-size:var(--rt-text-md);font-weight:var(--rt-font-weight-bold)}.rt-menu-confirm-dialog__message{margin:0;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-menu-confirm-dialog__footer{display:flex;justify-content:flex-end;gap:var(--rt-space-sm)}}\n"],
|
|
90
|
+
dependencies: [
|
|
91
|
+
{
|
|
92
|
+
kind: "directive",
|
|
93
|
+
type: RtButtonDirective,
|
|
94
|
+
selector: "button[rtButton], a[rtButton]",
|
|
95
|
+
inputs: [
|
|
96
|
+
"label",
|
|
97
|
+
"icon",
|
|
98
|
+
"iconPos",
|
|
99
|
+
"theme",
|
|
100
|
+
"appearance",
|
|
101
|
+
"size",
|
|
102
|
+
"loading",
|
|
103
|
+
"loadingIcon",
|
|
104
|
+
"loadingLabel",
|
|
105
|
+
"pressed"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
kind: "component",
|
|
110
|
+
type: RtDialogComponent,
|
|
111
|
+
selector: "rt-dialog",
|
|
112
|
+
inputs: [
|
|
113
|
+
"size",
|
|
114
|
+
"width",
|
|
115
|
+
"ariaLabel"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
kind: "directive",
|
|
120
|
+
type: BlockDirective,
|
|
121
|
+
selector: "[rtBlock]",
|
|
122
|
+
inputs: ["rtMod"]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
kind: "directive",
|
|
126
|
+
type: ElemDirective,
|
|
127
|
+
selector: "[rtElem]",
|
|
128
|
+
inputs: ["rtMod"]
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
132
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
137
|
+
minVersion: "12.0.0",
|
|
138
|
+
version: "22.2.2",
|
|
139
|
+
ngImport: i0,
|
|
140
|
+
type: RtMenuConfirmDialogComponent,
|
|
141
|
+
decorators: [{
|
|
142
|
+
type: Component,
|
|
143
|
+
args: [{
|
|
144
|
+
selector: "rt-menu-confirm-dialog",
|
|
145
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
146
|
+
encapsulation: ViewEncapsulation.None,
|
|
147
|
+
imports: [
|
|
148
|
+
RtButtonDirective,
|
|
149
|
+
RtDialogComponent,
|
|
150
|
+
BlockDirective,
|
|
151
|
+
ElemDirective
|
|
152
|
+
],
|
|
153
|
+
host: { class: BEM_BLOCK$2 },
|
|
154
|
+
template: "<rt-dialog width=\"360px\" [ariaLabel]=\"t().uiConfirmAction\">\n <div rtBlock=\"rt-menu-confirm-dialog\">\n <div rtElem=\"text\">\n @if (data.title; as title) {\n <h2 rtElem=\"title\" qa-dataid=\"menu-confirm-title\">{{ title }}</h2>\n }\n <p rtElem=\"message\" qa-dataid=\"menu-confirm-message\">{{ data.message }}</p>\n </div>\n <div rtElem=\"footer\">\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-cancel\"\n type=\"button\"\n appearance=\"text\"\n theme=\"secondary\"\n [label]=\"data.cancelLabel\"\n (click)=\"onCancel()\"></button>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-accept\"\n type=\"button\"\n appearance=\"filled\"\n [label]=\"data.confirmLabel\"\n [theme]=\"data.tone\"\n (click)=\"onConfirm()\"></button>\n </div>\n </div>\n</rt-dialog>\n",
|
|
155
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-confirm-dialog{display:flex;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-xl);gap:var(--rt-space-lg)}.rt-menu-confirm-dialog__text{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-menu-confirm-dialog__title{margin:0;color:var(--rt-color-text-primary);font-size:var(--rt-text-md);font-weight:var(--rt-font-weight-bold)}.rt-menu-confirm-dialog__message{margin:0;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-menu-confirm-dialog__footer{display:flex;justify-content:flex-end;gap:var(--rt-space-sm)}}\n"]
|
|
156
|
+
}]
|
|
157
|
+
}]
|
|
158
|
+
});
|
|
89
159
|
function menuItemIconName(icon, glyph) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
return materialPairOf(glyph);
|
|
160
|
+
if (icon !== null) return icon;
|
|
161
|
+
return materialPairOf(glyph);
|
|
94
162
|
}
|
|
95
|
-
/**
|
|
96
|
-
* Имя Material, о котором пункт должен предупредить: у него нет пары в перечне кита, а ни `icon`,
|
|
97
|
-
* ни своего значка нет. Тогда пункт рисуется без значка, и без предупреждения пропуск не заметен.
|
|
98
|
-
* `null` — предупреждать не о чем.
|
|
99
|
-
*/
|
|
100
163
|
function unpairedGlyph(icon, glyph, hasOwnIcon) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
return glyph;
|
|
164
|
+
if (!glyph || hasOwnIcon || menuItemIconName(icon, glyph) !== null) return null;
|
|
165
|
+
return glyph;
|
|
105
166
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
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
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
167
|
+
const RT_MENU_SELECT_EVENT = "rtMenuSelect";
|
|
168
|
+
const BEM_BLOCK$1 = "rt-menu-item";
|
|
169
|
+
var RtMenuItemComponent = class RtMenuItemComponent {
|
|
170
|
+
#elementRef;
|
|
171
|
+
#dialogService;
|
|
172
|
+
#destroyRef;
|
|
173
|
+
#confirmRequestSource;
|
|
174
|
+
#t_uiConfirm;
|
|
175
|
+
#t_uiCancel;
|
|
176
|
+
constructor() {
|
|
177
|
+
this.#elementRef = inject(ElementRef);
|
|
178
|
+
this.#dialogService = inject(RtDialogService);
|
|
179
|
+
this.#destroyRef = inject(DestroyRef);
|
|
180
|
+
this.#confirmRequestSource = new Subject();
|
|
181
|
+
this.#t_uiConfirm = rtKitLabel("uiConfirm");
|
|
182
|
+
this.#t_uiCancel = rtKitLabel("uiCancel");
|
|
183
|
+
this.ownIcon = contentChild(RtMenuItemIconDirective, ...ngDevMode ? [{ debugName: "ownIcon" }] : /* istanbul ignore next */ []);
|
|
184
|
+
this.iconName = computed(() => menuItemIconName(this.icon(), this.glyph()), ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
|
|
185
|
+
this.isLink = computed(() => this.link() !== null, ...ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []);
|
|
186
|
+
this.linkTarget = computed(() => this.disabled() ? null : this.link(), ...ngDevMode ? [{ debugName: "linkTarget" }] : /* istanbul ignore next */ []);
|
|
187
|
+
this.icon = input(null, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
188
|
+
this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
189
|
+
this.danger = input(false, {
|
|
190
|
+
...ngDevMode ? { debugName: "danger" } : /* istanbul ignore next */ {},
|
|
191
|
+
transform: booleanAttribute
|
|
192
|
+
});
|
|
193
|
+
this.success = input(false, {
|
|
194
|
+
...ngDevMode ? { debugName: "success" } : /* istanbul ignore next */ {},
|
|
195
|
+
transform: booleanAttribute
|
|
196
|
+
});
|
|
197
|
+
this.glyph = input(null, ...ngDevMode ? [{ debugName: "glyph" }] : /* istanbul ignore next */ []);
|
|
198
|
+
this.fill = input(false, {
|
|
199
|
+
...ngDevMode ? { debugName: "fill" } : /* istanbul ignore next */ {},
|
|
200
|
+
transform: booleanAttribute
|
|
201
|
+
});
|
|
202
|
+
this.current = input(false, {
|
|
203
|
+
...ngDevMode ? { debugName: "current" } : /* istanbul ignore next */ {},
|
|
204
|
+
transform: booleanAttribute
|
|
205
|
+
});
|
|
206
|
+
this.disabled = input(false, {
|
|
207
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
208
|
+
transform: booleanAttribute
|
|
209
|
+
});
|
|
210
|
+
this.confirmMessage = input("", ...ngDevMode ? [{ debugName: "confirmMessage" }] : /* istanbul ignore next */ []);
|
|
211
|
+
this.confirmTitle = input(null, ...ngDevMode ? [{ debugName: "confirmTitle" }] : /* istanbul ignore next */ []);
|
|
212
|
+
this.confirmLabel = input("", ...ngDevMode ? [{ debugName: "confirmLabel" }] : /* istanbul ignore next */ []);
|
|
213
|
+
this.confirmCancelLabel = input("", ...ngDevMode ? [{ debugName: "confirmCancelLabel" }] : /* istanbul ignore next */ []);
|
|
214
|
+
this.confirmTone = input("danger", ...ngDevMode ? [{ debugName: "confirmTone" }] : /* istanbul ignore next */ []);
|
|
215
|
+
this.link = input(null, ...ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []);
|
|
216
|
+
this.selected = output();
|
|
217
|
+
if (isDevMode()) effect(() => {
|
|
218
|
+
const glyph = unpairedGlyph(this.icon(), this.glyph(), this.ownIcon() !== void 0);
|
|
219
|
+
if (glyph !== null) console.warn(`rt-menu-item «${this.label()}»: у значка Material «${glyph}» нет пары в перечне кита. Задайте icon или свой значок через <ng-template rtMenuItemIcon>.`);
|
|
220
|
+
});
|
|
221
|
+
this.#confirmRequestSource.pipe(mergeMap((data) => this.#dialogService.open(RtMenuConfirmDialogComponent, { data }).afterClosed()), takeUntilDestroyed(this.#destroyRef)).subscribe((confirmed = false) => {
|
|
222
|
+
if (confirmed === true) this.#commitSelection();
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
onActivate(event) {
|
|
226
|
+
if (this.disabled()) {
|
|
227
|
+
event.stopPropagation();
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const message = this.confirmMessage().trim();
|
|
232
|
+
if (message !== "" && !this.isLink()) {
|
|
233
|
+
this.#openConfirm(message);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
this.#commitSelection();
|
|
237
|
+
}
|
|
238
|
+
onKey(event) {
|
|
239
|
+
if (this.isLink()) {
|
|
240
|
+
this.#onLinkKey(event);
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
event.preventDefault();
|
|
244
|
+
this.onActivate(event);
|
|
245
|
+
}
|
|
246
|
+
onAuxClick(event) {
|
|
247
|
+
if (this.isLink() && event.button === 1 && !this.disabled()) this.#commitSelection();
|
|
248
|
+
}
|
|
249
|
+
#onLinkKey(event) {
|
|
250
|
+
if (event instanceof KeyboardEvent && event.key === " ") {
|
|
251
|
+
event.preventDefault();
|
|
252
|
+
this.#elementRef.nativeElement.querySelector("a")?.click();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
#openConfirm(message) {
|
|
256
|
+
const data = {
|
|
257
|
+
message,
|
|
258
|
+
title: this.confirmTitle(),
|
|
259
|
+
confirmLabel: this.confirmLabel() || this.#t_uiConfirm(),
|
|
260
|
+
cancelLabel: this.confirmCancelLabel() || this.#t_uiCancel(),
|
|
261
|
+
tone: this.confirmTone()
|
|
262
|
+
};
|
|
263
|
+
this.#confirmRequestSource.next(data);
|
|
264
|
+
}
|
|
265
|
+
#commitSelection() {
|
|
266
|
+
this.selected.emit();
|
|
267
|
+
this.#elementRef.nativeElement.dispatchEvent(new CustomEvent(RT_MENU_SELECT_EVENT, { bubbles: true }));
|
|
268
|
+
}
|
|
269
|
+
static {
|
|
270
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
271
|
+
minVersion: "12.0.0",
|
|
272
|
+
version: "22.2.2",
|
|
273
|
+
ngImport: i0,
|
|
274
|
+
type: RtMenuItemComponent,
|
|
275
|
+
deps: [],
|
|
276
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
static {
|
|
280
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
281
|
+
minVersion: "17.0.0",
|
|
282
|
+
version: "22.2.2",
|
|
283
|
+
type: RtMenuItemComponent,
|
|
284
|
+
isStandalone: true,
|
|
285
|
+
selector: "rt-menu-item",
|
|
286
|
+
inputs: {
|
|
287
|
+
icon: {
|
|
288
|
+
classPropertyName: "icon",
|
|
289
|
+
publicName: "icon",
|
|
290
|
+
isSignal: true,
|
|
291
|
+
isRequired: false,
|
|
292
|
+
transformFunction: null
|
|
293
|
+
},
|
|
294
|
+
label: {
|
|
295
|
+
classPropertyName: "label",
|
|
296
|
+
publicName: "label",
|
|
297
|
+
isSignal: true,
|
|
298
|
+
isRequired: false,
|
|
299
|
+
transformFunction: null
|
|
300
|
+
},
|
|
301
|
+
danger: {
|
|
302
|
+
classPropertyName: "danger",
|
|
303
|
+
publicName: "danger",
|
|
304
|
+
isSignal: true,
|
|
305
|
+
isRequired: false,
|
|
306
|
+
transformFunction: null
|
|
307
|
+
},
|
|
308
|
+
success: {
|
|
309
|
+
classPropertyName: "success",
|
|
310
|
+
publicName: "success",
|
|
311
|
+
isSignal: true,
|
|
312
|
+
isRequired: false,
|
|
313
|
+
transformFunction: null
|
|
314
|
+
},
|
|
315
|
+
glyph: {
|
|
316
|
+
classPropertyName: "glyph",
|
|
317
|
+
publicName: "glyph",
|
|
318
|
+
isSignal: true,
|
|
319
|
+
isRequired: false,
|
|
320
|
+
transformFunction: null
|
|
321
|
+
},
|
|
322
|
+
fill: {
|
|
323
|
+
classPropertyName: "fill",
|
|
324
|
+
publicName: "fill",
|
|
325
|
+
isSignal: true,
|
|
326
|
+
isRequired: false,
|
|
327
|
+
transformFunction: null
|
|
328
|
+
},
|
|
329
|
+
current: {
|
|
330
|
+
classPropertyName: "current",
|
|
331
|
+
publicName: "current",
|
|
332
|
+
isSignal: true,
|
|
333
|
+
isRequired: false,
|
|
334
|
+
transformFunction: null
|
|
335
|
+
},
|
|
336
|
+
disabled: {
|
|
337
|
+
classPropertyName: "disabled",
|
|
338
|
+
publicName: "disabled",
|
|
339
|
+
isSignal: true,
|
|
340
|
+
isRequired: false,
|
|
341
|
+
transformFunction: null
|
|
342
|
+
},
|
|
343
|
+
confirmMessage: {
|
|
344
|
+
classPropertyName: "confirmMessage",
|
|
345
|
+
publicName: "confirmMessage",
|
|
346
|
+
isSignal: true,
|
|
347
|
+
isRequired: false,
|
|
348
|
+
transformFunction: null
|
|
349
|
+
},
|
|
350
|
+
confirmTitle: {
|
|
351
|
+
classPropertyName: "confirmTitle",
|
|
352
|
+
publicName: "confirmTitle",
|
|
353
|
+
isSignal: true,
|
|
354
|
+
isRequired: false,
|
|
355
|
+
transformFunction: null
|
|
356
|
+
},
|
|
357
|
+
confirmLabel: {
|
|
358
|
+
classPropertyName: "confirmLabel",
|
|
359
|
+
publicName: "confirmLabel",
|
|
360
|
+
isSignal: true,
|
|
361
|
+
isRequired: false,
|
|
362
|
+
transformFunction: null
|
|
363
|
+
},
|
|
364
|
+
confirmCancelLabel: {
|
|
365
|
+
classPropertyName: "confirmCancelLabel",
|
|
366
|
+
publicName: "confirmCancelLabel",
|
|
367
|
+
isSignal: true,
|
|
368
|
+
isRequired: false,
|
|
369
|
+
transformFunction: null
|
|
370
|
+
},
|
|
371
|
+
confirmTone: {
|
|
372
|
+
classPropertyName: "confirmTone",
|
|
373
|
+
publicName: "confirmTone",
|
|
374
|
+
isSignal: true,
|
|
375
|
+
isRequired: false,
|
|
376
|
+
transformFunction: null
|
|
377
|
+
},
|
|
378
|
+
link: {
|
|
379
|
+
classPropertyName: "link",
|
|
380
|
+
publicName: "link",
|
|
381
|
+
isSignal: true,
|
|
382
|
+
isRequired: false,
|
|
383
|
+
transformFunction: null
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
outputs: { selected: "selected" },
|
|
387
|
+
host: {
|
|
388
|
+
listeners: {
|
|
389
|
+
"click": "onActivate($event)",
|
|
390
|
+
"auxclick": "onAuxClick($event)",
|
|
391
|
+
"keydown.enter": "onKey($event)",
|
|
392
|
+
"keydown.space": "onKey($event)"
|
|
393
|
+
},
|
|
394
|
+
properties: {
|
|
395
|
+
"attr.role": "isLink() ? 'none' : 'menuitem'",
|
|
396
|
+
"class.rt-menu-item--danger": "danger()",
|
|
397
|
+
"class.rt-menu-item--success": "success()",
|
|
398
|
+
"class.rt-menu-item--disabled": "disabled()",
|
|
399
|
+
"class.rt-menu-item--current": "current()",
|
|
400
|
+
"class.rt-menu-item--link": "isLink()",
|
|
401
|
+
"attr.aria-current": "current() && !isLink() ? 'true' : null",
|
|
402
|
+
"attr.aria-disabled": "disabled() && !isLink() ? 'true' : null",
|
|
403
|
+
"attr.tabindex": "disabled() || isLink() ? null : 0"
|
|
404
|
+
},
|
|
405
|
+
classAttribute: "rt-menu-item"
|
|
406
|
+
},
|
|
407
|
+
queries: [{
|
|
408
|
+
propertyName: "ownIcon",
|
|
409
|
+
first: true,
|
|
410
|
+
predicate: RtMenuItemIconDirective,
|
|
411
|
+
descendants: true,
|
|
412
|
+
isSignal: true
|
|
413
|
+
}],
|
|
414
|
+
hostDirectives: [{
|
|
415
|
+
directive: i1$1.RtTooltipDirective,
|
|
416
|
+
inputs: ["rtTooltip", "tooltip"]
|
|
417
|
+
}, {
|
|
418
|
+
directive: i2.RtRadiusDirective,
|
|
419
|
+
inputs: ["radius", "radius"]
|
|
420
|
+
}],
|
|
421
|
+
ngImport: i0,
|
|
422
|
+
template: "<ng-container rtBlock=\"rt-menu-item\">\n @if (isLink()) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"menu-item-link\"\n [routerLink]=\"linkTarget()\"\n [attr.aria-current]=\"current() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? null : 0\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\n }\n\n <ng-template #content>\n @if (ownIcon(); as own) {\n <span rtElem=\"icon\" qa-dataid=\"menu-item-own-icon\" aria-hidden=\"true\" [rtMod]=\"{ own: true }\">\n <ng-container [ngTemplateOutlet]=\"own.templateRef\" />\n </span>\n } @else if (iconName(); as name) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"name\" [fill]=\"fill()\" />\n }\n\n <span rtElem=\"label\" qa-dataid=\"menu-item-label\">{{ label() }}</span>\n </ng-template>\n</ng-container>\n",
|
|
423
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-item{--rt-menu-item-radius: var(--rt-radius-sm);--rt-menu-item-transition-duration: var(--rt-duration-fast);--rt-menu-item-weight: var(--rt-overlay-menu-item-weight);--rt-menu-item-danger-color: var(--rt-overlay-menu-danger-color);--rt-menu-item-current-bg: var(--rt-overlay-menu-current-bg);--rt-menu-item-min-height: var(--rt-overlay-menu-item-min-height);--rt-menu-item-padding-y: var(--rt-overlay-menu-item-padding-y);--rt-menu-item-padding-x: var(--rt-overlay-menu-item-padding-x);--rt-menu-item-icon-size: var(--rt-overlay-menu-item-icon-size);--rt-menu-item-danger-label-color: var(--rt-overlay-menu-danger-label-color);--rt-menu-item-success-color: var(--rt-color-state-success-text);display:flex;width:100%;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);font-weight:var(--rt-menu-item-weight);gap:var(--rt-space-sm);text-align:start;transition:background-color var(--rt-menu-item-transition-duration) ease}.rt-menu-item:hover{background:var(--rt-color-bg-hover)}.rt-menu-item:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item__icon{min-width:var(--rt-menu-item-icon-size);max-width:var(--rt-menu-item-icon-size);min-height:var(--rt-menu-item-icon-size);max-height:var(--rt-menu-item-icon-size);flex-shrink:0;color:var(--rt-color-text-muted)}.rt-menu-item__icon--own{display:inline-flex;width:var(--rt-menu-item-icon-size);height:var(--rt-menu-item-icon-size);align-items:center;justify-content:center;font-size:var(--rt-menu-item-icon-size);line-height:1}.rt-menu-item__icon--own>*{max-width:100%;max-height:100%}.rt-menu-item__label{flex:1 1 auto;white-space:nowrap}.rt-menu-item--link{padding:0}.rt-menu-item__link{display:flex;min-width:0;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;flex:1 1 auto;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:inherit;gap:var(--rt-space-sm);text-decoration:none}.rt-menu-item__link:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item--current{background:var(--rt-menu-item-current-bg)}.rt-menu-item--danger{color:var(--rt-menu-item-danger-label-color)}.rt-menu-item--danger .rt-menu-item__icon{color:var(--rt-menu-item-danger-color)}.rt-menu-item--success,.rt-menu-item--success .rt-menu-item__icon{color:var(--rt-menu-item-success-color)}.rt-menu-item--disabled{color:var(--rt-color-text-muted);cursor:default;opacity:.5}.rt-menu-item--disabled:hover{background:transparent}.rt-menu-item[data-rt-radius=none]{--rt-menu-item-radius: var(--rt-radius-none)}.rt-menu-item[data-rt-radius=xs]{--rt-menu-item-radius: var(--rt-radius-xs)}.rt-menu-item[data-rt-radius=sm]{--rt-menu-item-radius: var(--rt-radius-sm)}.rt-menu-item[data-rt-radius=ms]{--rt-menu-item-radius: var(--rt-radius-ms)}.rt-menu-item[data-rt-radius=md]{--rt-menu-item-radius: var(--rt-radius-md)}.rt-menu-item[data-rt-radius=lg]{--rt-menu-item-radius: var(--rt-radius-lg)}.rt-menu-item[data-rt-radius=xl]{--rt-menu-item-radius: var(--rt-radius-xl)}.rt-menu-item[data-rt-radius=\"2xl\"]{--rt-menu-item-radius: var(--rt-radius-2xl)}.rt-menu-item[data-rt-radius=full]{--rt-menu-item-radius: var(--rt-radius-full)}}\n"],
|
|
424
|
+
dependencies: [
|
|
425
|
+
{
|
|
426
|
+
kind: "component",
|
|
427
|
+
type: RtIconComponent,
|
|
428
|
+
selector: "rt-icon",
|
|
429
|
+
inputs: [
|
|
430
|
+
"name",
|
|
431
|
+
"glyph",
|
|
432
|
+
"glyphStrategy",
|
|
433
|
+
"size",
|
|
434
|
+
"color",
|
|
435
|
+
"fill",
|
|
436
|
+
"spin",
|
|
437
|
+
"rotate"
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
kind: "directive",
|
|
442
|
+
type: BlockDirective,
|
|
443
|
+
selector: "[rtBlock]",
|
|
444
|
+
inputs: ["rtMod"]
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
kind: "directive",
|
|
448
|
+
type: ElemDirective,
|
|
449
|
+
selector: "[rtElem]",
|
|
450
|
+
inputs: ["rtMod"]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
kind: "directive",
|
|
454
|
+
type: ModDirective,
|
|
455
|
+
selector: "[rtMod]"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
kind: "directive",
|
|
459
|
+
type: NgTemplateOutlet,
|
|
460
|
+
selector: "[ngTemplateOutlet]",
|
|
461
|
+
inputs: [
|
|
462
|
+
"ngTemplateOutletContext",
|
|
463
|
+
"ngTemplateOutlet",
|
|
464
|
+
"ngTemplateOutletInjector"
|
|
465
|
+
]
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
kind: "directive",
|
|
469
|
+
type: RouterLink,
|
|
470
|
+
selector: "[routerLink]",
|
|
471
|
+
inputs: [
|
|
472
|
+
"target",
|
|
473
|
+
"queryParams",
|
|
474
|
+
"fragment",
|
|
475
|
+
"queryParamsHandling",
|
|
476
|
+
"state",
|
|
477
|
+
"info",
|
|
478
|
+
"relativeTo",
|
|
479
|
+
"preserveFragment",
|
|
480
|
+
"skipLocationChange",
|
|
481
|
+
"replaceUrl",
|
|
482
|
+
"browserUrl",
|
|
483
|
+
"routerLink"
|
|
484
|
+
]
|
|
485
|
+
}
|
|
486
|
+
],
|
|
487
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
488
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
493
|
+
minVersion: "12.0.0",
|
|
494
|
+
version: "22.2.2",
|
|
495
|
+
ngImport: i0,
|
|
496
|
+
type: RtMenuItemComponent,
|
|
497
|
+
decorators: [{
|
|
498
|
+
type: Component,
|
|
499
|
+
args: [{
|
|
500
|
+
selector: "rt-menu-item",
|
|
501
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
502
|
+
encapsulation: ViewEncapsulation.None,
|
|
503
|
+
imports: [
|
|
504
|
+
RtIconComponent,
|
|
505
|
+
BlockDirective,
|
|
506
|
+
ElemDirective,
|
|
507
|
+
ModDirective,
|
|
508
|
+
NgTemplateOutlet,
|
|
509
|
+
RouterLink
|
|
510
|
+
],
|
|
511
|
+
hostDirectives: [{
|
|
512
|
+
directive: RtTooltipDirective,
|
|
513
|
+
inputs: ["rtTooltip: tooltip"]
|
|
514
|
+
}, {
|
|
515
|
+
directive: RtRadiusDirective,
|
|
516
|
+
inputs: ["radius"]
|
|
517
|
+
}],
|
|
518
|
+
host: {
|
|
519
|
+
class: BEM_BLOCK$1,
|
|
520
|
+
"[attr.role]": "isLink() ? 'none' : 'menuitem'",
|
|
521
|
+
"[class.rt-menu-item--danger]": "danger()",
|
|
522
|
+
"[class.rt-menu-item--success]": "success()",
|
|
523
|
+
"[class.rt-menu-item--disabled]": "disabled()",
|
|
524
|
+
"[class.rt-menu-item--current]": "current()",
|
|
525
|
+
"[class.rt-menu-item--link]": "isLink()",
|
|
526
|
+
"[attr.aria-current]": "current() && !isLink() ? 'true' : null",
|
|
527
|
+
"[attr.aria-disabled]": "disabled() && !isLink() ? 'true' : null",
|
|
528
|
+
"[attr.tabindex]": "disabled() || isLink() ? null : 0",
|
|
529
|
+
"(click)": "onActivate($event)",
|
|
530
|
+
"(auxclick)": "onAuxClick($event)",
|
|
531
|
+
"(keydown.enter)": "onKey($event)",
|
|
532
|
+
"(keydown.space)": "onKey($event)"
|
|
533
|
+
},
|
|
534
|
+
template: "<ng-container rtBlock=\"rt-menu-item\">\n @if (isLink()) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"menu-item-link\"\n [routerLink]=\"linkTarget()\"\n [attr.aria-current]=\"current() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? null : 0\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\n }\n\n <ng-template #content>\n @if (ownIcon(); as own) {\n <span rtElem=\"icon\" qa-dataid=\"menu-item-own-icon\" aria-hidden=\"true\" [rtMod]=\"{ own: true }\">\n <ng-container [ngTemplateOutlet]=\"own.templateRef\" />\n </span>\n } @else if (iconName(); as name) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"name\" [fill]=\"fill()\" />\n }\n\n <span rtElem=\"label\" qa-dataid=\"menu-item-label\">{{ label() }}</span>\n </ng-template>\n</ng-container>\n",
|
|
535
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-item{--rt-menu-item-radius: var(--rt-radius-sm);--rt-menu-item-transition-duration: var(--rt-duration-fast);--rt-menu-item-weight: var(--rt-overlay-menu-item-weight);--rt-menu-item-danger-color: var(--rt-overlay-menu-danger-color);--rt-menu-item-current-bg: var(--rt-overlay-menu-current-bg);--rt-menu-item-min-height: var(--rt-overlay-menu-item-min-height);--rt-menu-item-padding-y: var(--rt-overlay-menu-item-padding-y);--rt-menu-item-padding-x: var(--rt-overlay-menu-item-padding-x);--rt-menu-item-icon-size: var(--rt-overlay-menu-item-icon-size);--rt-menu-item-danger-label-color: var(--rt-overlay-menu-danger-label-color);--rt-menu-item-success-color: var(--rt-color-state-success-text);display:flex;width:100%;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);font-weight:var(--rt-menu-item-weight);gap:var(--rt-space-sm);text-align:start;transition:background-color var(--rt-menu-item-transition-duration) ease}.rt-menu-item:hover{background:var(--rt-color-bg-hover)}.rt-menu-item:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item__icon{min-width:var(--rt-menu-item-icon-size);max-width:var(--rt-menu-item-icon-size);min-height:var(--rt-menu-item-icon-size);max-height:var(--rt-menu-item-icon-size);flex-shrink:0;color:var(--rt-color-text-muted)}.rt-menu-item__icon--own{display:inline-flex;width:var(--rt-menu-item-icon-size);height:var(--rt-menu-item-icon-size);align-items:center;justify-content:center;font-size:var(--rt-menu-item-icon-size);line-height:1}.rt-menu-item__icon--own>*{max-width:100%;max-height:100%}.rt-menu-item__label{flex:1 1 auto;white-space:nowrap}.rt-menu-item--link{padding:0}.rt-menu-item__link{display:flex;min-width:0;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;flex:1 1 auto;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:inherit;gap:var(--rt-space-sm);text-decoration:none}.rt-menu-item__link:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item--current{background:var(--rt-menu-item-current-bg)}.rt-menu-item--danger{color:var(--rt-menu-item-danger-label-color)}.rt-menu-item--danger .rt-menu-item__icon{color:var(--rt-menu-item-danger-color)}.rt-menu-item--success,.rt-menu-item--success .rt-menu-item__icon{color:var(--rt-menu-item-success-color)}.rt-menu-item--disabled{color:var(--rt-color-text-muted);cursor:default;opacity:.5}.rt-menu-item--disabled:hover{background:transparent}.rt-menu-item[data-rt-radius=none]{--rt-menu-item-radius: var(--rt-radius-none)}.rt-menu-item[data-rt-radius=xs]{--rt-menu-item-radius: var(--rt-radius-xs)}.rt-menu-item[data-rt-radius=sm]{--rt-menu-item-radius: var(--rt-radius-sm)}.rt-menu-item[data-rt-radius=ms]{--rt-menu-item-radius: var(--rt-radius-ms)}.rt-menu-item[data-rt-radius=md]{--rt-menu-item-radius: var(--rt-radius-md)}.rt-menu-item[data-rt-radius=lg]{--rt-menu-item-radius: var(--rt-radius-lg)}.rt-menu-item[data-rt-radius=xl]{--rt-menu-item-radius: var(--rt-radius-xl)}.rt-menu-item[data-rt-radius=\"2xl\"]{--rt-menu-item-radius: var(--rt-radius-2xl)}.rt-menu-item[data-rt-radius=full]{--rt-menu-item-radius: var(--rt-radius-full)}}\n"]
|
|
536
|
+
}]
|
|
537
|
+
}],
|
|
538
|
+
ctorParameters: () => [],
|
|
539
|
+
propDecorators: {
|
|
540
|
+
ownIcon: [{
|
|
541
|
+
type: i0.ContentChild,
|
|
542
|
+
args: [i0.forwardRef(() => RtMenuItemIconDirective), { isSignal: true }]
|
|
543
|
+
}],
|
|
544
|
+
icon: [{
|
|
545
|
+
type: i0.Input,
|
|
546
|
+
args: [{
|
|
547
|
+
isSignal: true,
|
|
548
|
+
alias: "icon",
|
|
549
|
+
required: false
|
|
550
|
+
}]
|
|
551
|
+
}],
|
|
552
|
+
label: [{
|
|
553
|
+
type: i0.Input,
|
|
554
|
+
args: [{
|
|
555
|
+
isSignal: true,
|
|
556
|
+
alias: "label",
|
|
557
|
+
required: false
|
|
558
|
+
}]
|
|
559
|
+
}],
|
|
560
|
+
danger: [{
|
|
561
|
+
type: i0.Input,
|
|
562
|
+
args: [{
|
|
563
|
+
isSignal: true,
|
|
564
|
+
alias: "danger",
|
|
565
|
+
required: false
|
|
566
|
+
}]
|
|
567
|
+
}],
|
|
568
|
+
success: [{
|
|
569
|
+
type: i0.Input,
|
|
570
|
+
args: [{
|
|
571
|
+
isSignal: true,
|
|
572
|
+
alias: "success",
|
|
573
|
+
required: false
|
|
574
|
+
}]
|
|
575
|
+
}],
|
|
576
|
+
glyph: [{
|
|
577
|
+
type: i0.Input,
|
|
578
|
+
args: [{
|
|
579
|
+
isSignal: true,
|
|
580
|
+
alias: "glyph",
|
|
581
|
+
required: false
|
|
582
|
+
}]
|
|
583
|
+
}],
|
|
584
|
+
fill: [{
|
|
585
|
+
type: i0.Input,
|
|
586
|
+
args: [{
|
|
587
|
+
isSignal: true,
|
|
588
|
+
alias: "fill",
|
|
589
|
+
required: false
|
|
590
|
+
}]
|
|
591
|
+
}],
|
|
592
|
+
current: [{
|
|
593
|
+
type: i0.Input,
|
|
594
|
+
args: [{
|
|
595
|
+
isSignal: true,
|
|
596
|
+
alias: "current",
|
|
597
|
+
required: false
|
|
598
|
+
}]
|
|
599
|
+
}],
|
|
600
|
+
disabled: [{
|
|
601
|
+
type: i0.Input,
|
|
602
|
+
args: [{
|
|
603
|
+
isSignal: true,
|
|
604
|
+
alias: "disabled",
|
|
605
|
+
required: false
|
|
606
|
+
}]
|
|
607
|
+
}],
|
|
608
|
+
confirmMessage: [{
|
|
609
|
+
type: i0.Input,
|
|
610
|
+
args: [{
|
|
611
|
+
isSignal: true,
|
|
612
|
+
alias: "confirmMessage",
|
|
613
|
+
required: false
|
|
614
|
+
}]
|
|
615
|
+
}],
|
|
616
|
+
confirmTitle: [{
|
|
617
|
+
type: i0.Input,
|
|
618
|
+
args: [{
|
|
619
|
+
isSignal: true,
|
|
620
|
+
alias: "confirmTitle",
|
|
621
|
+
required: false
|
|
622
|
+
}]
|
|
623
|
+
}],
|
|
624
|
+
confirmLabel: [{
|
|
625
|
+
type: i0.Input,
|
|
626
|
+
args: [{
|
|
627
|
+
isSignal: true,
|
|
628
|
+
alias: "confirmLabel",
|
|
629
|
+
required: false
|
|
630
|
+
}]
|
|
631
|
+
}],
|
|
632
|
+
confirmCancelLabel: [{
|
|
633
|
+
type: i0.Input,
|
|
634
|
+
args: [{
|
|
635
|
+
isSignal: true,
|
|
636
|
+
alias: "confirmCancelLabel",
|
|
637
|
+
required: false
|
|
638
|
+
}]
|
|
639
|
+
}],
|
|
640
|
+
confirmTone: [{
|
|
641
|
+
type: i0.Input,
|
|
642
|
+
args: [{
|
|
643
|
+
isSignal: true,
|
|
644
|
+
alias: "confirmTone",
|
|
645
|
+
required: false
|
|
646
|
+
}]
|
|
647
|
+
}],
|
|
648
|
+
link: [{
|
|
649
|
+
type: i0.Input,
|
|
650
|
+
args: [{
|
|
651
|
+
isSignal: true,
|
|
652
|
+
alias: "link",
|
|
653
|
+
required: false
|
|
654
|
+
}]
|
|
655
|
+
}],
|
|
656
|
+
selected: [{
|
|
657
|
+
type: i0.Output,
|
|
658
|
+
args: ["selected"]
|
|
659
|
+
}]
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
const BEM_BLOCK = "rt-menu";
|
|
339
663
|
const POSITION_BELOW_END = {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
664
|
+
originX: "end",
|
|
665
|
+
originY: "bottom",
|
|
666
|
+
overlayX: "end",
|
|
667
|
+
overlayY: "top",
|
|
668
|
+
offsetY: 4
|
|
345
669
|
};
|
|
346
670
|
const POSITION_ABOVE_END = {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
671
|
+
originX: "end",
|
|
672
|
+
originY: "top",
|
|
673
|
+
overlayX: "end",
|
|
674
|
+
overlayY: "bottom",
|
|
675
|
+
offsetY: -4
|
|
352
676
|
};
|
|
353
677
|
const POSITION_BELOW_START = {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
678
|
+
originX: "start",
|
|
679
|
+
originY: "bottom",
|
|
680
|
+
overlayX: "start",
|
|
681
|
+
overlayY: "top",
|
|
682
|
+
offsetY: 4
|
|
359
683
|
};
|
|
360
684
|
const POSITION_ABOVE_START = {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
685
|
+
originX: "start",
|
|
686
|
+
originY: "top",
|
|
687
|
+
overlayX: "start",
|
|
688
|
+
overlayY: "bottom",
|
|
689
|
+
offsetY: -4
|
|
366
690
|
};
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
691
|
+
var RtMenuComponent = class RtMenuComponent {
|
|
692
|
+
constructor() {
|
|
693
|
+
this.#host = inject(ElementRef);
|
|
694
|
+
this.#t_uiActions = rtKitLabel("uiActions");
|
|
695
|
+
this.#keyManager = null;
|
|
696
|
+
this.overlay = viewChild.required(CdkConnectedOverlay, ...ngDevMode ? [{ debugName: "overlay" }] : /* istanbul ignore next */ []);
|
|
697
|
+
this.trigger = viewChild.required(CdkOverlayOrigin, ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
698
|
+
this.isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
699
|
+
this.presetClasses = signal([], ...ngDevMode ? [{ debugName: "presetClasses" }] : /* istanbul ignore next */ []);
|
|
700
|
+
this.panelClasses = computed(() => {
|
|
701
|
+
const own = this.panelClass();
|
|
702
|
+
return [...Array.isArray(own) ? own : own.split(/\s+/).filter(Boolean), ...this.presetClasses()];
|
|
703
|
+
}, ...ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []);
|
|
704
|
+
this.ariaText = computed(() => this.ariaLabel() || this.#t_uiActions(), ...ngDevMode ? [{ debugName: "ariaText" }] : /* istanbul ignore next */ []);
|
|
705
|
+
this.overlayPositions = computed(() => this.align() === "end" ? [
|
|
706
|
+
POSITION_BELOW_END,
|
|
707
|
+
POSITION_ABOVE_END,
|
|
708
|
+
POSITION_BELOW_START,
|
|
709
|
+
POSITION_ABOVE_START
|
|
710
|
+
] : [
|
|
711
|
+
POSITION_BELOW_START,
|
|
712
|
+
POSITION_ABOVE_START,
|
|
713
|
+
POSITION_BELOW_END,
|
|
714
|
+
POSITION_ABOVE_END
|
|
715
|
+
], ...ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []);
|
|
716
|
+
this.icon = input("ellipsis-h", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
|
|
717
|
+
this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
718
|
+
this.align = input("end", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
|
|
719
|
+
this.panelClass = input([], ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
|
|
720
|
+
this.triggerSize = input("md", ...ngDevMode ? [{ debugName: "triggerSize" }] : /* istanbul ignore next */ []);
|
|
721
|
+
this.size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
722
|
+
this.disabled = input(false, {
|
|
723
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
724
|
+
transform: booleanAttribute
|
|
725
|
+
});
|
|
726
|
+
this.openedChange = output();
|
|
727
|
+
}
|
|
728
|
+
#host;
|
|
729
|
+
#t_uiActions;
|
|
730
|
+
#keyManager;
|
|
731
|
+
toggle(event) {
|
|
732
|
+
event.stopPropagation();
|
|
733
|
+
this.#setOpen(!this.isOpen());
|
|
734
|
+
}
|
|
735
|
+
close() {
|
|
736
|
+
this.#setOpen(false);
|
|
737
|
+
}
|
|
738
|
+
onAttach() {
|
|
739
|
+
const pane = this.overlay().overlayRef.overlayElement;
|
|
740
|
+
carryThemeScope(pane, this.trigger().elementRef.nativeElement);
|
|
741
|
+
const focusables = Array.from(pane.querySelectorAll("[role=\"menuitem\"]")).map((node) => ({
|
|
742
|
+
disabled: node.getAttribute("aria-disabled") === "true",
|
|
743
|
+
focus: () => node.focus()
|
|
744
|
+
}));
|
|
745
|
+
this.#keyManager = new FocusKeyManager(focusables).withWrap().withHomeAndEnd();
|
|
746
|
+
this.#keyManager.setFirstItemActive();
|
|
747
|
+
}
|
|
748
|
+
onSelect() {
|
|
749
|
+
this.close();
|
|
750
|
+
this.#focusTrigger();
|
|
751
|
+
}
|
|
752
|
+
onKeydown(event) {
|
|
753
|
+
if (event.key === "Escape") {
|
|
754
|
+
this.close();
|
|
755
|
+
this.#focusTrigger();
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
if (event.key === "Tab") {
|
|
759
|
+
this.close();
|
|
760
|
+
this.#focusTrigger();
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
this.#keyManager?.onKeydown(event);
|
|
764
|
+
}
|
|
765
|
+
#focusTrigger() {
|
|
766
|
+
this.trigger().elementRef.nativeElement.querySelector("button")?.focus();
|
|
767
|
+
}
|
|
768
|
+
#setOpen(open) {
|
|
769
|
+
if (open !== this.isOpen()) {
|
|
770
|
+
if (!open) {
|
|
771
|
+
this.#keyManager?.destroy();
|
|
772
|
+
this.#keyManager = null;
|
|
773
|
+
}
|
|
774
|
+
if (open) this.presetClasses.set(materialPresetClassesOf(this.#host.nativeElement));
|
|
775
|
+
this.isOpen.set(open);
|
|
776
|
+
this.openedChange.emit(open);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
static {
|
|
780
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
781
|
+
minVersion: "12.0.0",
|
|
782
|
+
version: "22.2.2",
|
|
783
|
+
ngImport: i0,
|
|
784
|
+
type: RtMenuComponent,
|
|
785
|
+
deps: [],
|
|
786
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
static {
|
|
790
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
791
|
+
minVersion: "17.2.0",
|
|
792
|
+
version: "22.2.2",
|
|
793
|
+
type: RtMenuComponent,
|
|
794
|
+
isStandalone: true,
|
|
795
|
+
selector: "rt-menu",
|
|
796
|
+
inputs: {
|
|
797
|
+
icon: {
|
|
798
|
+
classPropertyName: "icon",
|
|
799
|
+
publicName: "icon",
|
|
800
|
+
isSignal: true,
|
|
801
|
+
isRequired: false,
|
|
802
|
+
transformFunction: null
|
|
803
|
+
},
|
|
804
|
+
ariaLabel: {
|
|
805
|
+
classPropertyName: "ariaLabel",
|
|
806
|
+
publicName: "ariaLabel",
|
|
807
|
+
isSignal: true,
|
|
808
|
+
isRequired: false,
|
|
809
|
+
transformFunction: null
|
|
810
|
+
},
|
|
811
|
+
align: {
|
|
812
|
+
classPropertyName: "align",
|
|
813
|
+
publicName: "align",
|
|
814
|
+
isSignal: true,
|
|
815
|
+
isRequired: false,
|
|
816
|
+
transformFunction: null
|
|
817
|
+
},
|
|
818
|
+
panelClass: {
|
|
819
|
+
classPropertyName: "panelClass",
|
|
820
|
+
publicName: "panelClass",
|
|
821
|
+
isSignal: true,
|
|
822
|
+
isRequired: false,
|
|
823
|
+
transformFunction: null
|
|
824
|
+
},
|
|
825
|
+
triggerSize: {
|
|
826
|
+
classPropertyName: "triggerSize",
|
|
827
|
+
publicName: "triggerSize",
|
|
828
|
+
isSignal: true,
|
|
829
|
+
isRequired: false,
|
|
830
|
+
transformFunction: null
|
|
831
|
+
},
|
|
832
|
+
size: {
|
|
833
|
+
classPropertyName: "size",
|
|
834
|
+
publicName: "size",
|
|
835
|
+
isSignal: true,
|
|
836
|
+
isRequired: false,
|
|
837
|
+
transformFunction: null
|
|
838
|
+
},
|
|
839
|
+
disabled: {
|
|
840
|
+
classPropertyName: "disabled",
|
|
841
|
+
publicName: "disabled",
|
|
842
|
+
isSignal: true,
|
|
843
|
+
isRequired: false,
|
|
844
|
+
transformFunction: null
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
outputs: { openedChange: "openedChange" },
|
|
848
|
+
host: {
|
|
849
|
+
properties: { "class.rt-menu--open": "isOpen()" },
|
|
850
|
+
classAttribute: "rt-menu"
|
|
851
|
+
},
|
|
852
|
+
viewQueries: [{
|
|
853
|
+
propertyName: "overlay",
|
|
854
|
+
first: true,
|
|
855
|
+
predicate: CdkConnectedOverlay,
|
|
856
|
+
descendants: true,
|
|
857
|
+
isSignal: true
|
|
858
|
+
}, {
|
|
859
|
+
propertyName: "trigger",
|
|
860
|
+
first: true,
|
|
861
|
+
predicate: CdkOverlayOrigin,
|
|
862
|
+
descendants: true,
|
|
863
|
+
isSignal: true
|
|
864
|
+
}],
|
|
865
|
+
ngImport: i0,
|
|
866
|
+
template: "<rt-icon-button\n cdkOverlayOrigin\n qa-dataid=\"menu-trigger\"\n #trigger=\"cdkOverlayOrigin\"\n variant=\"ghost\"\n [size]=\"triggerSize()\"\n [icon]=\"icon()\"\n [ariaLabel]=\"ariaText()\"\n [tooltip]=\"ariaText()\"\n [disabled]=\"disabled()\"\n (clicked)=\"toggle($event)\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayPanelClass]=\"panelClasses()\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttach()\"\n (detach)=\"close()\"\n (overlayKeydown)=\"onKeydown($event)\">\n <ng-container rtBlock=\"rt-menu\">\n <div rtElem=\"panel\" qa-dataid=\"menu-panel\" role=\"menu\" [rtMod]=\"{ size: size() }\" (rtMenuSelect)=\"onSelect()\">\n <ng-content />\n </div>\n </ng-container>\n</ng-template>\n",
|
|
867
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu{display:inline-flex;align-items:center;justify-content:center}.rt-menu__panel{--rt-menu-panel-radius: var(--rt-overlay-menu-radius);--rt-menu-panel-border-width: var(--rt-border-width-thin);--rt-menu-panel-shadow: var(--rt-overlay-menu-shadow);--rt-menu-panel-bg: var(--rt-overlay-menu-bg);--rt-menu-panel-padding-y: var(--rt-overlay-menu-padding-y);--rt-menu-panel-min-width: var(--rt-overlay-menu-min-width);display:flex;min-width:var(--rt-menu-panel-min-width);flex-direction:column;padding:var(--rt-menu-panel-padding-y) var(--rt-space-xs);border:var(--rt-menu-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-menu-panel-radius);background:var(--rt-menu-panel-bg);box-shadow:var(--rt-menu-panel-shadow)}.rt-menu__panel--size--sm{--rt-overlay-menu-item-min-height: var(--rt-overlay-menu-sm-item-min-height);--rt-overlay-menu-item-icon-size: var(--rt-overlay-menu-sm-item-icon-size)}}\n"],
|
|
868
|
+
dependencies: [
|
|
869
|
+
{
|
|
870
|
+
kind: "ngmodule",
|
|
871
|
+
type: OverlayModule
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
kind: "directive",
|
|
875
|
+
type: i1.CdkConnectedOverlay,
|
|
876
|
+
selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
|
|
877
|
+
inputs: [
|
|
878
|
+
"cdkConnectedOverlayOrigin",
|
|
879
|
+
"cdkConnectedOverlayPositions",
|
|
880
|
+
"cdkConnectedOverlayPositionStrategy",
|
|
881
|
+
"cdkConnectedOverlayOffsetX",
|
|
882
|
+
"cdkConnectedOverlayOffsetY",
|
|
883
|
+
"cdkConnectedOverlayWidth",
|
|
884
|
+
"cdkConnectedOverlayHeight",
|
|
885
|
+
"cdkConnectedOverlayMinWidth",
|
|
886
|
+
"cdkConnectedOverlayMinHeight",
|
|
887
|
+
"cdkConnectedOverlayBackdropClass",
|
|
888
|
+
"cdkConnectedOverlayPanelClass",
|
|
889
|
+
"cdkConnectedOverlayViewportMargin",
|
|
890
|
+
"cdkConnectedOverlayScrollStrategy",
|
|
891
|
+
"cdkConnectedOverlayOpen",
|
|
892
|
+
"cdkConnectedOverlayDisableClose",
|
|
893
|
+
"cdkConnectedOverlayTransformOriginOn",
|
|
894
|
+
"cdkConnectedOverlayHasBackdrop",
|
|
895
|
+
"cdkConnectedOverlayLockPosition",
|
|
896
|
+
"cdkConnectedOverlayFlexibleDimensions",
|
|
897
|
+
"cdkConnectedOverlayGrowAfterOpen",
|
|
898
|
+
"cdkConnectedOverlayPush",
|
|
899
|
+
"cdkConnectedOverlayDisposeOnNavigation",
|
|
900
|
+
"cdkConnectedOverlayUsePopover",
|
|
901
|
+
"cdkConnectedOverlayMatchWidth",
|
|
902
|
+
"cdkConnectedOverlay"
|
|
903
|
+
],
|
|
904
|
+
outputs: [
|
|
905
|
+
"backdropClick",
|
|
906
|
+
"positionChange",
|
|
907
|
+
"attach",
|
|
908
|
+
"detach",
|
|
909
|
+
"overlayKeydown",
|
|
910
|
+
"overlayOutsideClick"
|
|
911
|
+
],
|
|
912
|
+
exportAs: ["cdkConnectedOverlay"]
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
kind: "directive",
|
|
916
|
+
type: i1.CdkOverlayOrigin,
|
|
917
|
+
selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
|
|
918
|
+
exportAs: ["cdkOverlayOrigin"]
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
kind: "component",
|
|
922
|
+
type: RtIconButtonComponent,
|
|
923
|
+
selector: "rt-icon-button",
|
|
924
|
+
inputs: [
|
|
925
|
+
"icon",
|
|
926
|
+
"glyph",
|
|
927
|
+
"ariaLabel",
|
|
928
|
+
"variant",
|
|
929
|
+
"iconColor",
|
|
930
|
+
"iconFill",
|
|
931
|
+
"size",
|
|
932
|
+
"iconSize",
|
|
933
|
+
"type",
|
|
934
|
+
"tooltip",
|
|
935
|
+
"tooltipHideOnClick",
|
|
936
|
+
"tabIndex",
|
|
937
|
+
"loading",
|
|
938
|
+
"disabled",
|
|
939
|
+
"active",
|
|
940
|
+
"expanded",
|
|
941
|
+
"indicator"
|
|
942
|
+
],
|
|
943
|
+
outputs: ["clicked"]
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
kind: "directive",
|
|
947
|
+
type: BlockDirective,
|
|
948
|
+
selector: "[rtBlock]",
|
|
949
|
+
inputs: ["rtMod"]
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
kind: "directive",
|
|
953
|
+
type: ElemDirective,
|
|
954
|
+
selector: "[rtElem]",
|
|
955
|
+
inputs: ["rtMod"]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
kind: "directive",
|
|
959
|
+
type: ModDirective,
|
|
960
|
+
selector: "[rtMod]"
|
|
961
|
+
}
|
|
962
|
+
],
|
|
963
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
964
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
969
|
+
minVersion: "12.0.0",
|
|
970
|
+
version: "22.2.2",
|
|
971
|
+
ngImport: i0,
|
|
972
|
+
type: RtMenuComponent,
|
|
973
|
+
decorators: [{
|
|
974
|
+
type: Component,
|
|
975
|
+
args: [{
|
|
976
|
+
selector: "rt-menu",
|
|
977
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
978
|
+
encapsulation: ViewEncapsulation.None,
|
|
979
|
+
imports: [
|
|
980
|
+
OverlayModule,
|
|
981
|
+
RtIconButtonComponent,
|
|
982
|
+
BlockDirective,
|
|
983
|
+
ElemDirective,
|
|
984
|
+
ModDirective
|
|
985
|
+
],
|
|
986
|
+
host: {
|
|
987
|
+
class: BEM_BLOCK,
|
|
988
|
+
"[class.rt-menu--open]": "isOpen()"
|
|
989
|
+
},
|
|
990
|
+
template: "<rt-icon-button\n cdkOverlayOrigin\n qa-dataid=\"menu-trigger\"\n #trigger=\"cdkOverlayOrigin\"\n variant=\"ghost\"\n [size]=\"triggerSize()\"\n [icon]=\"icon()\"\n [ariaLabel]=\"ariaText()\"\n [tooltip]=\"ariaText()\"\n [disabled]=\"disabled()\"\n (clicked)=\"toggle($event)\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayPanelClass]=\"panelClasses()\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttach()\"\n (detach)=\"close()\"\n (overlayKeydown)=\"onKeydown($event)\">\n <ng-container rtBlock=\"rt-menu\">\n <div rtElem=\"panel\" qa-dataid=\"menu-panel\" role=\"menu\" [rtMod]=\"{ size: size() }\" (rtMenuSelect)=\"onSelect()\">\n <ng-content />\n </div>\n </ng-container>\n</ng-template>\n",
|
|
991
|
+
styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu{display:inline-flex;align-items:center;justify-content:center}.rt-menu__panel{--rt-menu-panel-radius: var(--rt-overlay-menu-radius);--rt-menu-panel-border-width: var(--rt-border-width-thin);--rt-menu-panel-shadow: var(--rt-overlay-menu-shadow);--rt-menu-panel-bg: var(--rt-overlay-menu-bg);--rt-menu-panel-padding-y: var(--rt-overlay-menu-padding-y);--rt-menu-panel-min-width: var(--rt-overlay-menu-min-width);display:flex;min-width:var(--rt-menu-panel-min-width);flex-direction:column;padding:var(--rt-menu-panel-padding-y) var(--rt-space-xs);border:var(--rt-menu-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-menu-panel-radius);background:var(--rt-menu-panel-bg);box-shadow:var(--rt-menu-panel-shadow)}.rt-menu__panel--size--sm{--rt-overlay-menu-item-min-height: var(--rt-overlay-menu-sm-item-min-height);--rt-overlay-menu-item-icon-size: var(--rt-overlay-menu-sm-item-icon-size)}}\n"]
|
|
992
|
+
}]
|
|
993
|
+
}],
|
|
994
|
+
propDecorators: {
|
|
995
|
+
overlay: [{
|
|
996
|
+
type: i0.ViewChild,
|
|
997
|
+
args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }]
|
|
998
|
+
}],
|
|
999
|
+
trigger: [{
|
|
1000
|
+
type: i0.ViewChild,
|
|
1001
|
+
args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }]
|
|
1002
|
+
}],
|
|
1003
|
+
icon: [{
|
|
1004
|
+
type: i0.Input,
|
|
1005
|
+
args: [{
|
|
1006
|
+
isSignal: true,
|
|
1007
|
+
alias: "icon",
|
|
1008
|
+
required: false
|
|
1009
|
+
}]
|
|
1010
|
+
}],
|
|
1011
|
+
ariaLabel: [{
|
|
1012
|
+
type: i0.Input,
|
|
1013
|
+
args: [{
|
|
1014
|
+
isSignal: true,
|
|
1015
|
+
alias: "ariaLabel",
|
|
1016
|
+
required: false
|
|
1017
|
+
}]
|
|
1018
|
+
}],
|
|
1019
|
+
align: [{
|
|
1020
|
+
type: i0.Input,
|
|
1021
|
+
args: [{
|
|
1022
|
+
isSignal: true,
|
|
1023
|
+
alias: "align",
|
|
1024
|
+
required: false
|
|
1025
|
+
}]
|
|
1026
|
+
}],
|
|
1027
|
+
panelClass: [{
|
|
1028
|
+
type: i0.Input,
|
|
1029
|
+
args: [{
|
|
1030
|
+
isSignal: true,
|
|
1031
|
+
alias: "panelClass",
|
|
1032
|
+
required: false
|
|
1033
|
+
}]
|
|
1034
|
+
}],
|
|
1035
|
+
triggerSize: [{
|
|
1036
|
+
type: i0.Input,
|
|
1037
|
+
args: [{
|
|
1038
|
+
isSignal: true,
|
|
1039
|
+
alias: "triggerSize",
|
|
1040
|
+
required: false
|
|
1041
|
+
}]
|
|
1042
|
+
}],
|
|
1043
|
+
size: [{
|
|
1044
|
+
type: i0.Input,
|
|
1045
|
+
args: [{
|
|
1046
|
+
isSignal: true,
|
|
1047
|
+
alias: "size",
|
|
1048
|
+
required: false
|
|
1049
|
+
}]
|
|
1050
|
+
}],
|
|
1051
|
+
disabled: [{
|
|
1052
|
+
type: i0.Input,
|
|
1053
|
+
args: [{
|
|
1054
|
+
isSignal: true,
|
|
1055
|
+
alias: "disabled",
|
|
1056
|
+
required: false
|
|
1057
|
+
}]
|
|
1058
|
+
}],
|
|
1059
|
+
openedChange: [{
|
|
1060
|
+
type: i0.Output,
|
|
1061
|
+
args: ["openedChange"]
|
|
1062
|
+
}]
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
539
1065
|
export { RT_MENU_SELECT_EVENT, RtMenuComponent, RtMenuItemComponent, RtMenuItemIconDirective };
|
|
540
|
-
|
|
1066
|
+
|
|
1067
|
+
//# sourceMappingURL=rt-tools-ui-kit-v2-menu.mjs.map
|