@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +232 -191
- package/THIRD_PARTY_LICENSES.md +48 -0
- package/fesm2022/aeris-ui-core-accordion.mjs +666 -273
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1301 -450
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +221 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +609 -199
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-forms.mjs +78 -0
- package/fesm2022/aeris-ui-core-button-forms.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-button-group.mjs +554 -36
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +911 -137
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +835 -369
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +1294 -525
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +594 -262
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +619 -150
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +1109 -121
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-code-block.mjs +687 -0
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +2436 -1076
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-command-palette.mjs +996 -0
- package/fesm2022/aeris-ui-core-command-palette.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-compare.mjs +870 -338
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1454 -575
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1499 -760
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +975 -449
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs +946 -0
- package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-date-picker.mjs +2538 -1183
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1187 -368
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1712 -345
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +418 -254
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +1808 -783
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1529 -536
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +2821 -1143
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +496 -132
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +713 -257
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +1095 -297
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +703 -160
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-kbd.mjs +243 -0
- package/fesm2022/aeris-ui-core-kbd.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-listbox.mjs +789 -0
- package/fesm2022/aeris-ui-core-listbox.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-mega-menu.mjs +662 -388
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1111 -478
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +1081 -411
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +513 -147
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +641 -230
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1832 -577
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-navbar.mjs +1407 -0
- package/fesm2022/aeris-ui-core-navbar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-order-list.mjs +748 -220
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +521 -201
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +671 -127
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +602 -210
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +1046 -269
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1796 -703
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +1354 -385
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +609 -182
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +428 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +502 -132
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +506 -231
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +279 -69
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select-native.mjs +145 -0
- package/fesm2022/aeris-ui-core-select-native.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-select.mjs +1984 -668
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-sidebar.mjs +1293 -0
- package/fesm2022/aeris-ui-core-sidebar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +884 -430
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +882 -337
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +972 -268
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +831 -356
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +705 -256
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +2927 -923
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +855 -283
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +919 -221
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1368 -1407
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -144
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +966 -447
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +1109 -384
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +1340 -131
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1650 -627
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2442 -994
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1257 -670
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +1601 -312
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +48 -8
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/runtime/schematics/ng-add/options.js +4 -4
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-color-derivation.js +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +38 -17
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +13 -8
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +33 -23
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +8 -2
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +63 -76
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +15 -5
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +18 -2
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +121 -34
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_choice-card.scss +93 -0
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_icon-artwork.scss +14 -0
- package/styles/_icon-template.scss +42 -0
- package/styles/_mobile.scss +16 -0
- package/styles/_selection-icons.scss +12 -0
- package/styles/_table-pinning.scss +119 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +447 -137
- package/styles/controls.css +205 -35
- package/tools/aeris-theme.mjs +4 -4
- package/tools/aeris-theme.schema.json +18 -13
- package/types/aeris-ui-core-accordion.d.ts +167 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
- package/types/aeris-ui-core-auto-complete.d.ts +339 -140
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -46
- package/types/aeris-ui-core-block-ui.d.ts +48 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
- package/types/aeris-ui-core-button-forms.d.ts +18 -0
- package/types/aeris-ui-core-button-group.d.ts +150 -16
- package/types/aeris-ui-core-button.d.ts +274 -67
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +213 -117
- package/types/aeris-ui-core-cascade-select.d.ts +275 -123
- package/types/aeris-ui-core-chart.d.ts +150 -84
- package/types/aeris-ui-core-checkbox.d.ts +173 -54
- package/types/aeris-ui-core-chip.d.ts +316 -56
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-code-block.d.ts +201 -0
- package/types/aeris-ui-core-color-picker.d.ts +450 -143
- package/types/aeris-ui-core-command-palette.d.ts +267 -0
- package/types/aeris-ui-core-compare.d.ts +230 -102
- package/types/aeris-ui-core-confirm-dialog.d.ts +450 -245
- package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
- package/types/aeris-ui-core-context-menu.d.ts +270 -146
- package/types/aeris-ui-core-date-picker.d.ts +594 -219
- package/types/aeris-ui-core-dialog.d.ts +301 -117
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +380 -112
- package/types/aeris-ui-core-dynamic-dialog.d.ts +162 -137
- package/types/aeris-ui-core-editor.d.ts +257 -123
- package/types/aeris-ui-core-file-upload.d.ts +385 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +163 -0
- package/types/aeris-ui-core-galleria.d.ts +636 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -32
- package/types/aeris-ui-core-inplace.d.ts +129 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -33
- package/types/aeris-ui-core-input-mask.d.ts +201 -69
- package/types/aeris-ui-core-input-number.d.ts +291 -87
- package/types/aeris-ui-core-input-otp.d.ts +191 -81
- package/types/aeris-ui-core-input-text.d.ts +195 -60
- package/types/aeris-ui-core-kbd.d.ts +74 -0
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-listbox.d.ts +222 -0
- package/types/aeris-ui-core-mega-menu.d.ts +181 -121
- package/types/aeris-ui-core-menu.d.ts +283 -168
- package/types/aeris-ui-core-menubar.d.ts +289 -135
- package/types/aeris-ui-core-message.d.ts +138 -60
- package/types/aeris-ui-core-meter-group.d.ts +169 -90
- package/types/aeris-ui-core-multi-select.d.ts +469 -180
- package/types/aeris-ui-core-navbar.d.ts +208 -0
- package/types/aeris-ui-core-order-list.d.ts +168 -66
- package/types/aeris-ui-core-organization-chart.d.ts +139 -77
- package/types/aeris-ui-core-paginator.d.ts +129 -38
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +276 -102
- package/types/aeris-ui-core-pick-list.d.ts +428 -179
- package/types/aeris-ui-core-popover.d.ts +294 -105
- package/types/aeris-ui-core-progress-bar.d.ts +163 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +116 -48
- package/types/aeris-ui-core-radio-button.d.ts +146 -50
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +73 -29
- package/types/aeris-ui-core-select-native.d.ts +40 -0
- package/types/aeris-ui-core-select.d.ts +487 -217
- package/types/aeris-ui-core-sidebar.d.ts +220 -0
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -115
- package/types/aeris-ui-core-speed-dial.d.ts +241 -111
- package/types/aeris-ui-core-split-button.d.ts +267 -113
- package/types/aeris-ui-core-splitter.d.ts +224 -106
- package/types/aeris-ui-core-stepper.d.ts +184 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +729 -304
- package/types/aeris-ui-core-tabs.d.ts +193 -76
- package/types/aeris-ui-core-textarea.d.ts +271 -78
- package/types/aeris-ui-core-theme-builder.d.ts +220 -463
- package/types/aeris-ui-core-theming.d.ts +42 -45
- package/types/aeris-ui-core-tiered-menu.d.ts +257 -142
- package/types/aeris-ui-core-timeline.d.ts +109 -71
- package/types/aeris-ui-core-toast.d.ts +231 -115
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
- package/types/aeris-ui-core-toolbar.d.ts +314 -47
- package/types/aeris-ui-core-tooltip.d.ts +157 -88
- package/types/aeris-ui-core-tree-select.d.ts +394 -171
- package/types/aeris-ui-core-tree-table.d.ts +629 -288
- package/types/aeris-ui-core-tree.d.ts +294 -165
- package/types/aeris-ui-core.d.ts +338 -74
|
@@ -1,257 +1,617 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { ɵAerisIcon } from "@aeris-ui/core";
|
|
2
|
+
import { NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Component, DestroyRef, Directive, ElementRef, InjectionToken, PLATFORM_ID, TemplateRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, inject, input, model, output, signal, viewChild, viewChildren } from "@angular/core";
|
|
5
|
+
const AERIS_TABS_OWNER = new InjectionToken("AerisTabsOwner");
|
|
6
|
+
var AerisTabHeaderTemplate = class AerisTabHeaderTemplate {
|
|
7
|
+
template = inject(TemplateRef);
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
9
|
+
minVersion: "12.0.0",
|
|
10
|
+
version: "22.2.3",
|
|
11
|
+
ngImport: i0,
|
|
12
|
+
type: AerisTabHeaderTemplate,
|
|
13
|
+
deps: [],
|
|
14
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
15
|
+
});
|
|
16
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
17
|
+
minVersion: "14.0.0",
|
|
18
|
+
version: "22.2.3",
|
|
19
|
+
type: AerisTabHeaderTemplate,
|
|
20
|
+
isStandalone: true,
|
|
21
|
+
selector: "ng-template[aerisTabHeader]",
|
|
22
|
+
ngImport: i0
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
26
|
+
minVersion: "12.0.0",
|
|
27
|
+
version: "22.2.3",
|
|
28
|
+
ngImport: i0,
|
|
29
|
+
type: AerisTabHeaderTemplate,
|
|
30
|
+
decorators: [{
|
|
31
|
+
type: Directive,
|
|
32
|
+
args: [{ selector: "ng-template[aerisTabHeader]" }]
|
|
33
|
+
}]
|
|
34
|
+
});
|
|
35
|
+
var AerisTabContentTemplate = class AerisTabContentTemplate {
|
|
36
|
+
template = inject(TemplateRef);
|
|
37
|
+
renderStrategy = input("preserve", {
|
|
38
|
+
...ngDevMode ? { debugName: "renderStrategy" } : /* istanbul ignore next */ {},
|
|
39
|
+
alias: "aerisTabContent",
|
|
40
|
+
transform: (value) => value || "preserve"
|
|
41
|
+
});
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
43
|
+
minVersion: "12.0.0",
|
|
44
|
+
version: "22.2.3",
|
|
45
|
+
ngImport: i0,
|
|
46
|
+
type: AerisTabContentTemplate,
|
|
47
|
+
deps: [],
|
|
48
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
49
|
+
});
|
|
50
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
51
|
+
minVersion: "17.1.0",
|
|
52
|
+
version: "22.2.3",
|
|
53
|
+
type: AerisTabContentTemplate,
|
|
54
|
+
isStandalone: true,
|
|
55
|
+
selector: "ng-template[aerisTabContent]",
|
|
56
|
+
inputs: { renderStrategy: {
|
|
57
|
+
classPropertyName: "renderStrategy",
|
|
58
|
+
publicName: "aerisTabContent",
|
|
59
|
+
isSignal: true,
|
|
60
|
+
isRequired: false,
|
|
61
|
+
transformFunction: null
|
|
62
|
+
} },
|
|
63
|
+
ngImport: i0
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
67
|
+
minVersion: "12.0.0",
|
|
68
|
+
version: "22.2.3",
|
|
69
|
+
ngImport: i0,
|
|
70
|
+
type: AerisTabContentTemplate,
|
|
71
|
+
decorators: [{
|
|
72
|
+
type: Directive,
|
|
73
|
+
args: [{ selector: "ng-template[aerisTabContent]" }]
|
|
74
|
+
}],
|
|
75
|
+
propDecorators: { renderStrategy: [{
|
|
76
|
+
type: i0.Input,
|
|
77
|
+
args: [{
|
|
78
|
+
isSignal: true,
|
|
79
|
+
alias: "aerisTabContent",
|
|
80
|
+
required: false
|
|
81
|
+
}]
|
|
82
|
+
}] }
|
|
83
|
+
});
|
|
14
84
|
let nextPanelId = 0;
|
|
15
|
-
class AerisTabPanel {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
85
|
+
var AerisTabPanel = class AerisTabPanel {
|
|
86
|
+
owner = inject(AERIS_TABS_OWNER, { optional: true });
|
|
87
|
+
instanceId = nextPanelId++;
|
|
88
|
+
value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
89
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
90
|
+
disabled = input(false, {
|
|
91
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
92
|
+
transform: booleanAttribute
|
|
93
|
+
});
|
|
94
|
+
panelId = `aeris-tab-panel-${this.instanceId}`;
|
|
95
|
+
tabId = `aeris-tab-${this.instanceId}`;
|
|
96
|
+
projectedContent = viewChild.required("content", ...ngDevMode ? [{ debugName: "projectedContent" }] : /* istanbul ignore next */ []);
|
|
97
|
+
deferredContent = contentChild(AerisTabContentTemplate, {
|
|
98
|
+
...ngDevMode ? { debugName: "deferredContent" } : /* istanbul ignore next */ {},
|
|
99
|
+
descendants: false
|
|
100
|
+
});
|
|
101
|
+
headerTemplate = contentChild(AerisTabHeaderTemplate, {
|
|
102
|
+
...ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {},
|
|
103
|
+
descendants: false
|
|
104
|
+
});
|
|
105
|
+
content = computed(() => this.deferredContent()?.template ?? this.projectedContent(), ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
106
|
+
renderStrategy = computed(() => this.deferredContent()?.renderStrategy() ?? "eager", ...ngDevMode ? [{ debugName: "renderStrategy" }] : /* istanbul ignore next */ []);
|
|
107
|
+
isDirectPanelOf(tabsHost) {
|
|
108
|
+
return this.owner?.host === tabsHost;
|
|
109
|
+
}
|
|
110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
111
|
+
minVersion: "12.0.0",
|
|
112
|
+
version: "22.2.3",
|
|
113
|
+
ngImport: i0,
|
|
114
|
+
type: AerisTabPanel,
|
|
115
|
+
deps: [],
|
|
116
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
117
|
+
});
|
|
118
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
119
|
+
minVersion: "17.2.0",
|
|
120
|
+
version: "22.2.3",
|
|
121
|
+
type: AerisTabPanel,
|
|
122
|
+
isStandalone: true,
|
|
123
|
+
selector: "aeris-tab-panel",
|
|
124
|
+
inputs: {
|
|
125
|
+
value: {
|
|
126
|
+
classPropertyName: "value",
|
|
127
|
+
publicName: "value",
|
|
128
|
+
isSignal: true,
|
|
129
|
+
isRequired: true,
|
|
130
|
+
transformFunction: null
|
|
131
|
+
},
|
|
132
|
+
label: {
|
|
133
|
+
classPropertyName: "label",
|
|
134
|
+
publicName: "label",
|
|
135
|
+
isSignal: true,
|
|
136
|
+
isRequired: true,
|
|
137
|
+
transformFunction: null
|
|
138
|
+
},
|
|
139
|
+
disabled: {
|
|
140
|
+
classPropertyName: "disabled",
|
|
141
|
+
publicName: "disabled",
|
|
142
|
+
isSignal: true,
|
|
143
|
+
isRequired: false,
|
|
144
|
+
transformFunction: null
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
host: { properties: { "style.display": "\"none\"" } },
|
|
148
|
+
queries: [{
|
|
149
|
+
propertyName: "deferredContent",
|
|
150
|
+
first: true,
|
|
151
|
+
predicate: AerisTabContentTemplate,
|
|
152
|
+
isSignal: true
|
|
153
|
+
}, {
|
|
154
|
+
propertyName: "headerTemplate",
|
|
155
|
+
first: true,
|
|
156
|
+
predicate: AerisTabHeaderTemplate,
|
|
157
|
+
isSignal: true
|
|
158
|
+
}],
|
|
159
|
+
viewQueries: [{
|
|
160
|
+
propertyName: "projectedContent",
|
|
161
|
+
first: true,
|
|
162
|
+
predicate: ["content"],
|
|
163
|
+
descendants: true,
|
|
164
|
+
isSignal: true
|
|
165
|
+
}],
|
|
166
|
+
ngImport: i0,
|
|
167
|
+
template: `
|
|
35
168
|
<ng-template #content>
|
|
36
169
|
<ng-content />
|
|
37
170
|
</ng-template>
|
|
38
|
-
`,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
171
|
+
`,
|
|
172
|
+
isInline: true
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
176
|
+
minVersion: "12.0.0",
|
|
177
|
+
version: "22.2.3",
|
|
178
|
+
ngImport: i0,
|
|
179
|
+
type: AerisTabPanel,
|
|
180
|
+
decorators: [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{
|
|
183
|
+
selector: "aeris-tab-panel",
|
|
184
|
+
template: `
|
|
45
185
|
<ng-template #content>
|
|
46
186
|
<ng-content />
|
|
47
187
|
</ng-template>
|
|
48
188
|
`,
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
189
|
+
host: { "[style.display]": "\"none\"" }
|
|
190
|
+
}]
|
|
191
|
+
}],
|
|
192
|
+
propDecorators: {
|
|
193
|
+
value: [{
|
|
194
|
+
type: i0.Input,
|
|
195
|
+
args: [{
|
|
196
|
+
isSignal: true,
|
|
197
|
+
alias: "value",
|
|
198
|
+
required: true
|
|
199
|
+
}]
|
|
200
|
+
}],
|
|
201
|
+
label: [{
|
|
202
|
+
type: i0.Input,
|
|
203
|
+
args: [{
|
|
204
|
+
isSignal: true,
|
|
205
|
+
alias: "label",
|
|
206
|
+
required: true
|
|
207
|
+
}]
|
|
208
|
+
}],
|
|
209
|
+
disabled: [{
|
|
210
|
+
type: i0.Input,
|
|
211
|
+
args: [{
|
|
212
|
+
isSignal: true,
|
|
213
|
+
alias: "disabled",
|
|
214
|
+
required: false
|
|
215
|
+
}]
|
|
216
|
+
}],
|
|
217
|
+
projectedContent: [{
|
|
218
|
+
type: i0.ViewChild,
|
|
219
|
+
args: ["content", { isSignal: true }]
|
|
220
|
+
}],
|
|
221
|
+
deferredContent: [{
|
|
222
|
+
type: i0.ContentChild,
|
|
223
|
+
args: [i0.forwardRef(() => AerisTabContentTemplate), {
|
|
224
|
+
descendants: false,
|
|
225
|
+
isSignal: true
|
|
226
|
+
}]
|
|
227
|
+
}],
|
|
228
|
+
headerTemplate: [{
|
|
229
|
+
type: i0.ContentChild,
|
|
230
|
+
args: [i0.forwardRef(() => AerisTabHeaderTemplate), {
|
|
231
|
+
descendants: false,
|
|
232
|
+
isSignal: true
|
|
233
|
+
}]
|
|
234
|
+
}]
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
var AerisTabs = class AerisTabs {
|
|
238
|
+
previousIconTemplate = input(...ngDevMode ? [void 0, { debugName: "previousIconTemplate" }] : /* istanbul ignore next */ []);
|
|
239
|
+
nextIconTemplate = input(...ngDevMode ? [void 0, { debugName: "nextIconTemplate" }] : /* istanbul ignore next */ []);
|
|
240
|
+
hostElement = inject(ElementRef).nativeElement;
|
|
241
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
242
|
+
destroyRef = inject(DestroyRef);
|
|
243
|
+
value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
244
|
+
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
245
|
+
ariaLabelledBy = input("", ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
246
|
+
orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
247
|
+
activationMode = input("automatic", ...ngDevMode ? [{ debugName: "activationMode" }] : /* istanbul ignore next */ []);
|
|
248
|
+
variant = input("line", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
249
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
250
|
+
justify = input("start", ...ngDevMode ? [{ debugName: "justify" }] : /* istanbul ignore next */ []);
|
|
251
|
+
scrollable = input(true, {
|
|
252
|
+
...ngDevMode ? { debugName: "scrollable" } : /* istanbul ignore next */ {},
|
|
253
|
+
transform: booleanAttribute
|
|
254
|
+
});
|
|
255
|
+
panelTabIndex = input(0, ...ngDevMode ? [{ debugName: "panelTabIndex" }] : /* istanbul ignore next */ []);
|
|
256
|
+
changed = output();
|
|
257
|
+
tabFocused = output();
|
|
258
|
+
discoveredPanels = contentChildren(AerisTabPanel, {
|
|
259
|
+
...ngDevMode ? { debugName: "discoveredPanels" } : /* istanbul ignore next */ {},
|
|
260
|
+
descendants: true
|
|
261
|
+
});
|
|
262
|
+
panels = computed(() => this.discoveredPanels().filter((panel) => panel.isDirectPanelOf(this.hostElement)), ...ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []);
|
|
263
|
+
tabButtons = viewChildren("tabButton", ...ngDevMode ? [{ debugName: "tabButtons" }] : /* istanbul ignore next */ []);
|
|
264
|
+
tabList = viewChild("tabList", ...ngDevMode ? [{ debugName: "tabList" }] : /* istanbul ignore next */ []);
|
|
265
|
+
tabHeader = viewChild("tabHeader", ...ngDevMode ? [{ debugName: "tabHeader" }] : /* istanbul ignore next */ []);
|
|
266
|
+
focusedValue = signal("", ...ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []);
|
|
267
|
+
activatedPanels = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "activatedPanels" }] : /* istanbul ignore next */ []);
|
|
268
|
+
hasOverflow = signal(false, ...ngDevMode ? [{ debugName: "hasOverflow" }] : /* istanbul ignore next */ []);
|
|
269
|
+
indicatorRect = signal(null, ...ngDevMode ? [{ debugName: "indicatorRect" }] : /* istanbul ignore next */ []);
|
|
270
|
+
indicatorReady = signal(false, ...ngDevMode ? [{ debugName: "indicatorReady" }] : /* istanbul ignore next */ []);
|
|
271
|
+
indicatorTransform = computed(() => {
|
|
272
|
+
const indicator = this.indicatorRect();
|
|
273
|
+
return indicator ? `translate3d(${indicator.x}px, ${indicator.y}px, 0)` : "none";
|
|
274
|
+
}, ...ngDevMode ? [{ debugName: "indicatorTransform" }] : /* istanbul ignore next */ []);
|
|
275
|
+
indicatorFrame = null;
|
|
276
|
+
indicatorReadyFrame = null;
|
|
277
|
+
canScrollPrevious = signal(false, ...ngDevMode ? [{ debugName: "canScrollPrevious" }] : /* istanbul ignore next */ []);
|
|
278
|
+
canScrollNext = signal(false, ...ngDevMode ? [{ debugName: "canScrollNext" }] : /* istanbul ignore next */ []);
|
|
279
|
+
showScrollControls = computed(() => this.scrollable() && this.orientation() === "horizontal" && this.hasOverflow(), ...ngDevMode ? [{ debugName: "showScrollControls" }] : /* istanbul ignore next */ []);
|
|
280
|
+
activePanel = computed(() => this.panels().find((panel) => !panel.disabled() && panel.value() === this.value()) ?? this.panels().find((panel) => !panel.disabled()), ...ngDevMode ? [{ debugName: "activePanel" }] : /* istanbul ignore next */ []);
|
|
281
|
+
focusedPanel = computed(() => this.panels().find((panel) => !panel.disabled() && panel.value() === this.focusedValue()) ?? this.activePanel(), ...ngDevMode ? [{ debugName: "focusedPanel" }] : /* istanbul ignore next */ []);
|
|
282
|
+
panelViews = computed(() => {
|
|
283
|
+
const activePanel = this.activePanel();
|
|
284
|
+
const activatedPanels = this.activatedPanels();
|
|
285
|
+
return this.panels().map((panel) => {
|
|
286
|
+
const active = panel === activePanel;
|
|
287
|
+
const strategy = panel.renderStrategy();
|
|
288
|
+
return {
|
|
289
|
+
panel,
|
|
290
|
+
active,
|
|
291
|
+
rendered: strategy === "eager" || active || strategy === "preserve" && activatedPanels.has(panel)
|
|
292
|
+
};
|
|
293
|
+
});
|
|
294
|
+
}, ...ngDevMode ? [{ debugName: "panelViews" }] : /* istanbul ignore next */ []);
|
|
295
|
+
constructor() {
|
|
296
|
+
afterNextRender(() => {
|
|
297
|
+
this.updateScrollState();
|
|
298
|
+
this.observeTabSizing();
|
|
299
|
+
this.scheduleIndicatorUpdate();
|
|
300
|
+
});
|
|
301
|
+
effect(() => {
|
|
302
|
+
const panelCount = this.panels().length;
|
|
303
|
+
this.tabButtons();
|
|
304
|
+
if (panelCount === 0) return;
|
|
305
|
+
queueMicrotask(() => this.updateScrollState());
|
|
306
|
+
});
|
|
307
|
+
afterRenderEffect(() => {
|
|
308
|
+
const panel = this.activePanel();
|
|
309
|
+
this.variant();
|
|
310
|
+
this.orientation();
|
|
311
|
+
this.justify();
|
|
312
|
+
this.tabButtons();
|
|
313
|
+
this.scheduleIndicatorUpdate();
|
|
314
|
+
if (panel && !this.activatedPanels().has(panel)) this.activatedPanels.update((current) => new Set(current).add(panel));
|
|
315
|
+
});
|
|
316
|
+
this.destroyRef.onDestroy(() => {
|
|
317
|
+
if (this.indicatorFrame !== null) cancelAnimationFrame(this.indicatorFrame);
|
|
318
|
+
if (this.indicatorReadyFrame !== null) cancelAnimationFrame(this.indicatorReadyFrame);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
select(valueOrPanel, originalEvent = null) {
|
|
322
|
+
const panel = typeof valueOrPanel === "string" ? this.panels().find((candidate) => candidate.value() === valueOrPanel) : valueOrPanel;
|
|
323
|
+
if (!panel || panel.disabled()) return;
|
|
324
|
+
const previousValue = this.activePanel()?.value() ?? "";
|
|
325
|
+
this.focusedValue.set(panel.value());
|
|
326
|
+
if (previousValue === panel.value() && this.value() === panel.value()) return;
|
|
327
|
+
this.value.set(panel.value());
|
|
328
|
+
this.changed.emit({
|
|
329
|
+
originalEvent,
|
|
330
|
+
value: panel.value(),
|
|
331
|
+
previousValue
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
focusTab(value, options) {
|
|
335
|
+
const panelIndex = this.panels().findIndex((panel) => !panel.disabled() && panel.value() === value);
|
|
336
|
+
if (panelIndex < 0) return;
|
|
337
|
+
this.focusedValue.set(value);
|
|
338
|
+
this.tabButtons()[panelIndex]?.nativeElement.focus(options);
|
|
339
|
+
}
|
|
340
|
+
handleKeydown(event) {
|
|
341
|
+
if (this.activationMode() === "manual" && (event.key === "Enter" || event.key === " ")) {
|
|
342
|
+
event.preventDefault();
|
|
343
|
+
const panel = this.focusedPanel();
|
|
344
|
+
if (panel) this.select(panel, event);
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
const direction = this.keyDirection(event.key);
|
|
348
|
+
if (direction === void 0) return;
|
|
349
|
+
event.preventDefault();
|
|
350
|
+
const enabledPanels = this.panels().filter((panel) => !panel.disabled());
|
|
351
|
+
if (enabledPanels.length === 0) return;
|
|
352
|
+
const currentPanel = this.focusedPanel() ?? this.activePanel();
|
|
353
|
+
const currentIndex = Math.max(enabledPanels.indexOf(currentPanel), 0);
|
|
354
|
+
const nextPanel = enabledPanels[direction === "first" ? 0 : direction === "last" ? enabledPanels.length - 1 : (currentIndex + direction + enabledPanels.length) % enabledPanels.length];
|
|
355
|
+
if (!nextPanel) return;
|
|
356
|
+
this.focusedValue.set(nextPanel.value());
|
|
357
|
+
if (this.activationMode() === "automatic") this.select(nextPanel, event);
|
|
358
|
+
this.focusTab(nextPanel.value());
|
|
359
|
+
this.scrollPanelIntoView(nextPanel);
|
|
360
|
+
}
|
|
361
|
+
handleTabFocus(panel, event) {
|
|
362
|
+
this.focusedValue.set(panel.value());
|
|
363
|
+
this.tabFocused.emit(panel.value());
|
|
364
|
+
if (this.activationMode() === "automatic" && panel !== this.activePanel()) this.select(panel, event);
|
|
365
|
+
}
|
|
366
|
+
scrollTabs(direction) {
|
|
367
|
+
const list = this.tabList()?.nativeElement;
|
|
368
|
+
if (!list) return;
|
|
369
|
+
const left = direction * Math.max(list.clientWidth * .75, 160);
|
|
370
|
+
if (typeof list.scrollBy === "function") list.scrollBy({
|
|
371
|
+
left,
|
|
372
|
+
behavior: "smooth"
|
|
373
|
+
});
|
|
374
|
+
else list.scrollLeft += left;
|
|
375
|
+
queueMicrotask(() => this.updateScrollState());
|
|
376
|
+
}
|
|
377
|
+
updateScrollState() {
|
|
378
|
+
const list = this.tabList()?.nativeElement;
|
|
379
|
+
const header = this.tabHeader()?.nativeElement;
|
|
380
|
+
if (!list || !header) return;
|
|
381
|
+
const overflow = this.scrollable() && this.orientation() === "horizontal" && list.scrollWidth > header.clientWidth + 1;
|
|
382
|
+
this.hasOverflow.set(overflow);
|
|
383
|
+
if (!overflow) {
|
|
384
|
+
this.canScrollPrevious.set(false);
|
|
385
|
+
this.canScrollNext.set(false);
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
this.canScrollPrevious.set(list.scrollLeft > 1);
|
|
389
|
+
this.canScrollNext.set(list.scrollLeft + list.clientWidth < list.scrollWidth - 1);
|
|
390
|
+
}
|
|
391
|
+
observeTabSizing() {
|
|
392
|
+
if (!this.isBrowser || typeof globalThis.ResizeObserver !== "function") return;
|
|
393
|
+
const header = this.tabHeader()?.nativeElement;
|
|
394
|
+
const list = this.tabList()?.nativeElement;
|
|
395
|
+
if (!header || !list) return;
|
|
396
|
+
const observer = new ResizeObserver(() => {
|
|
397
|
+
this.updateScrollState();
|
|
398
|
+
this.scheduleIndicatorUpdate();
|
|
399
|
+
});
|
|
400
|
+
observer.observe(header);
|
|
401
|
+
observer.observe(list);
|
|
402
|
+
for (const button of this.tabButtons()) observer.observe(button.nativeElement);
|
|
403
|
+
this.destroyRef.onDestroy(() => observer.disconnect());
|
|
404
|
+
}
|
|
405
|
+
scheduleIndicatorUpdate() {
|
|
406
|
+
if (!this.isBrowser) return;
|
|
407
|
+
if (this.indicatorFrame !== null) cancelAnimationFrame(this.indicatorFrame);
|
|
408
|
+
this.indicatorFrame = requestAnimationFrame(() => {
|
|
409
|
+
this.indicatorFrame = null;
|
|
410
|
+
this.updateIndicator();
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
updateIndicator() {
|
|
414
|
+
const panel = this.activePanel();
|
|
415
|
+
const list = this.tabList()?.nativeElement;
|
|
416
|
+
const panelIndex = panel ? this.panels().indexOf(panel) : -1;
|
|
417
|
+
const button = panelIndex >= 0 ? this.tabButtons()[panelIndex]?.nativeElement : void 0;
|
|
418
|
+
if (!list || !button) {
|
|
419
|
+
this.indicatorReady.set(false);
|
|
420
|
+
this.indicatorRect.set(null);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const pill = this.variant() === "pill";
|
|
424
|
+
const vertical = getComputedStyle(list).flexDirection === "column";
|
|
425
|
+
const rect = pill ? {
|
|
426
|
+
x: button.offsetLeft,
|
|
427
|
+
y: button.offsetTop,
|
|
428
|
+
width: button.offsetWidth,
|
|
429
|
+
height: button.offsetHeight
|
|
430
|
+
} : vertical ? {
|
|
431
|
+
x: list.clientWidth - 2,
|
|
432
|
+
y: button.offsetTop + 8,
|
|
433
|
+
width: 2,
|
|
434
|
+
height: Math.max(button.offsetHeight - 16, 2)
|
|
435
|
+
} : {
|
|
436
|
+
x: button.offsetLeft + 12,
|
|
437
|
+
y: button.offsetTop + button.offsetHeight - 2,
|
|
438
|
+
width: Math.max(button.offsetWidth - 24, 2),
|
|
439
|
+
height: 2
|
|
440
|
+
};
|
|
441
|
+
const currentRect = this.indicatorRect();
|
|
442
|
+
if (!currentRect || currentRect.x !== rect.x || currentRect.y !== rect.y || currentRect.width !== rect.width || currentRect.height !== rect.height) this.indicatorRect.set(rect);
|
|
443
|
+
if (this.indicatorReady()) return;
|
|
444
|
+
if (this.indicatorReadyFrame !== null) cancelAnimationFrame(this.indicatorReadyFrame);
|
|
445
|
+
this.indicatorReadyFrame = requestAnimationFrame(() => {
|
|
446
|
+
this.indicatorReadyFrame = null;
|
|
447
|
+
this.indicatorReady.set(true);
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
scrollPanelIntoView(panel) {
|
|
451
|
+
const panelIndex = this.panels().indexOf(panel);
|
|
452
|
+
const tab = this.tabButtons()[panelIndex]?.nativeElement;
|
|
453
|
+
if (typeof tab?.scrollIntoView === "function") tab.scrollIntoView({
|
|
454
|
+
behavior: this.isBrowser ? "smooth" : "auto",
|
|
455
|
+
block: "nearest",
|
|
456
|
+
inline: "nearest"
|
|
457
|
+
});
|
|
458
|
+
queueMicrotask(() => this.updateScrollState());
|
|
459
|
+
}
|
|
460
|
+
keyDirection(key) {
|
|
461
|
+
if (key === "Home") return "first";
|
|
462
|
+
if (key === "End") return "last";
|
|
463
|
+
if (this.orientation() === "horizontal" && key === "ArrowLeft" || this.orientation() === "vertical" && key === "ArrowUp") return -1;
|
|
464
|
+
if (this.orientation() === "horizontal" && key === "ArrowRight" || this.orientation() === "vertical" && key === "ArrowDown") return 1;
|
|
465
|
+
}
|
|
466
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
467
|
+
minVersion: "12.0.0",
|
|
468
|
+
version: "22.2.3",
|
|
469
|
+
ngImport: i0,
|
|
470
|
+
type: AerisTabs,
|
|
471
|
+
deps: [],
|
|
472
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
473
|
+
});
|
|
474
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
475
|
+
minVersion: "17.0.0",
|
|
476
|
+
version: "22.2.3",
|
|
477
|
+
type: AerisTabs,
|
|
478
|
+
isStandalone: true,
|
|
479
|
+
selector: "aeris-tabs",
|
|
480
|
+
inputs: {
|
|
481
|
+
previousIconTemplate: {
|
|
482
|
+
classPropertyName: "previousIconTemplate",
|
|
483
|
+
publicName: "previousIconTemplate",
|
|
484
|
+
isSignal: true,
|
|
485
|
+
isRequired: false,
|
|
486
|
+
transformFunction: null
|
|
487
|
+
},
|
|
488
|
+
nextIconTemplate: {
|
|
489
|
+
classPropertyName: "nextIconTemplate",
|
|
490
|
+
publicName: "nextIconTemplate",
|
|
491
|
+
isSignal: true,
|
|
492
|
+
isRequired: false,
|
|
493
|
+
transformFunction: null
|
|
494
|
+
},
|
|
495
|
+
value: {
|
|
496
|
+
classPropertyName: "value",
|
|
497
|
+
publicName: "value",
|
|
498
|
+
isSignal: true,
|
|
499
|
+
isRequired: false,
|
|
500
|
+
transformFunction: null
|
|
501
|
+
},
|
|
502
|
+
ariaLabel: {
|
|
503
|
+
classPropertyName: "ariaLabel",
|
|
504
|
+
publicName: "ariaLabel",
|
|
505
|
+
isSignal: true,
|
|
506
|
+
isRequired: false,
|
|
507
|
+
transformFunction: null
|
|
508
|
+
},
|
|
509
|
+
ariaLabelledBy: {
|
|
510
|
+
classPropertyName: "ariaLabelledBy",
|
|
511
|
+
publicName: "ariaLabelledBy",
|
|
512
|
+
isSignal: true,
|
|
513
|
+
isRequired: false,
|
|
514
|
+
transformFunction: null
|
|
515
|
+
},
|
|
516
|
+
orientation: {
|
|
517
|
+
classPropertyName: "orientation",
|
|
518
|
+
publicName: "orientation",
|
|
519
|
+
isSignal: true,
|
|
520
|
+
isRequired: false,
|
|
521
|
+
transformFunction: null
|
|
522
|
+
},
|
|
523
|
+
activationMode: {
|
|
524
|
+
classPropertyName: "activationMode",
|
|
525
|
+
publicName: "activationMode",
|
|
526
|
+
isSignal: true,
|
|
527
|
+
isRequired: false,
|
|
528
|
+
transformFunction: null
|
|
529
|
+
},
|
|
530
|
+
variant: {
|
|
531
|
+
classPropertyName: "variant",
|
|
532
|
+
publicName: "variant",
|
|
533
|
+
isSignal: true,
|
|
534
|
+
isRequired: false,
|
|
535
|
+
transformFunction: null
|
|
536
|
+
},
|
|
537
|
+
size: {
|
|
538
|
+
classPropertyName: "size",
|
|
539
|
+
publicName: "size",
|
|
540
|
+
isSignal: true,
|
|
541
|
+
isRequired: false,
|
|
542
|
+
transformFunction: null
|
|
543
|
+
},
|
|
544
|
+
justify: {
|
|
545
|
+
classPropertyName: "justify",
|
|
546
|
+
publicName: "justify",
|
|
547
|
+
isSignal: true,
|
|
548
|
+
isRequired: false,
|
|
549
|
+
transformFunction: null
|
|
550
|
+
},
|
|
551
|
+
scrollable: {
|
|
552
|
+
classPropertyName: "scrollable",
|
|
553
|
+
publicName: "scrollable",
|
|
554
|
+
isSignal: true,
|
|
555
|
+
isRequired: false,
|
|
556
|
+
transformFunction: null
|
|
557
|
+
},
|
|
558
|
+
panelTabIndex: {
|
|
559
|
+
classPropertyName: "panelTabIndex",
|
|
560
|
+
publicName: "panelTabIndex",
|
|
561
|
+
isSignal: true,
|
|
562
|
+
isRequired: false,
|
|
563
|
+
transformFunction: null
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
outputs: {
|
|
567
|
+
value: "valueChange",
|
|
568
|
+
changed: "changed",
|
|
569
|
+
tabFocused: "tabFocused"
|
|
570
|
+
},
|
|
571
|
+
host: {
|
|
572
|
+
properties: {
|
|
573
|
+
"attr.data-orientation": "orientation()",
|
|
574
|
+
"attr.data-variant": "variant()",
|
|
575
|
+
"attr.data-size": "size()",
|
|
576
|
+
"attr.data-justify": "justify()",
|
|
577
|
+
"attr.data-scrollable": "scrollable() || null"
|
|
578
|
+
},
|
|
579
|
+
classAttribute: "aeris-tabs"
|
|
580
|
+
},
|
|
581
|
+
providers: [{
|
|
582
|
+
provide: AERIS_TABS_OWNER,
|
|
583
|
+
useFactory: () => ({ host: inject(ElementRef).nativeElement })
|
|
584
|
+
}],
|
|
585
|
+
queries: [{
|
|
586
|
+
propertyName: "discoveredPanels",
|
|
587
|
+
predicate: AerisTabPanel,
|
|
588
|
+
descendants: true,
|
|
589
|
+
isSignal: true
|
|
590
|
+
}],
|
|
591
|
+
viewQueries: [
|
|
592
|
+
{
|
|
593
|
+
propertyName: "tabButtons",
|
|
594
|
+
predicate: ["tabButton"],
|
|
595
|
+
descendants: true,
|
|
596
|
+
isSignal: true
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
propertyName: "tabList",
|
|
600
|
+
first: true,
|
|
601
|
+
predicate: ["tabList"],
|
|
602
|
+
descendants: true,
|
|
603
|
+
isSignal: true
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
propertyName: "tabHeader",
|
|
607
|
+
first: true,
|
|
608
|
+
predicate: ["tabHeader"],
|
|
609
|
+
descendants: true,
|
|
610
|
+
isSignal: true
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
ngImport: i0,
|
|
614
|
+
template: `
|
|
255
615
|
<div class="aeris-tabs__panel-source" aria-hidden="true">
|
|
256
616
|
<ng-content />
|
|
257
617
|
</div>
|
|
@@ -265,7 +625,13 @@ class AerisTabs {
|
|
|
265
625
|
[disabled]="!canScrollPrevious()"
|
|
266
626
|
(click)="scrollTabs(-1)"
|
|
267
627
|
>
|
|
268
|
-
|
|
628
|
+
@if (previousIconTemplate(); as customIcon) {
|
|
629
|
+
<span aria-hidden="true" data-aeris-custom-icon
|
|
630
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
631
|
+
/></span>
|
|
632
|
+
} @else {
|
|
633
|
+
<span aerisInternalIcon="chevron" aria-hidden="true"></span>
|
|
634
|
+
}
|
|
269
635
|
</button>
|
|
270
636
|
}
|
|
271
637
|
|
|
@@ -279,6 +645,16 @@ class AerisTabs {
|
|
|
279
645
|
(keydown)="handleKeydown($event)"
|
|
280
646
|
(scroll)="updateScrollState()"
|
|
281
647
|
>
|
|
648
|
+
@if (indicatorRect(); as indicator) {
|
|
649
|
+
<span
|
|
650
|
+
class="aeris-tabs__indicator"
|
|
651
|
+
aria-hidden="true"
|
|
652
|
+
[attr.data-ready]="indicatorReady() || null"
|
|
653
|
+
[style.width.px]="indicator.width"
|
|
654
|
+
[style.height.px]="indicator.height"
|
|
655
|
+
[style.transform]="indicatorTransform()"
|
|
656
|
+
></span>
|
|
657
|
+
}
|
|
282
658
|
@for (panel of panels(); track panel.value()) {
|
|
283
659
|
<button
|
|
284
660
|
#tabButton
|
|
@@ -316,27 +692,66 @@ class AerisTabs {
|
|
|
316
692
|
[disabled]="!canScrollNext()"
|
|
317
693
|
(click)="scrollTabs(1)"
|
|
318
694
|
>
|
|
319
|
-
|
|
695
|
+
@if (nextIconTemplate(); as customIcon) {
|
|
696
|
+
<span aria-hidden="true" data-aeris-custom-icon
|
|
697
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
698
|
+
/></span>
|
|
699
|
+
} @else {
|
|
700
|
+
<span aerisInternalIcon="chevron" aria-hidden="true"></span>
|
|
701
|
+
}
|
|
320
702
|
</button>
|
|
321
703
|
}
|
|
322
704
|
</div>
|
|
323
705
|
|
|
324
|
-
@
|
|
706
|
+
@for (view of panelViews(); track view.panel.panelId) {
|
|
325
707
|
<div
|
|
326
708
|
class="aeris-tabs__panel"
|
|
327
709
|
role="tabpanel"
|
|
328
|
-
[id]="panel.panelId"
|
|
329
|
-
[attr.aria-labelledby]="panel.tabId"
|
|
330
|
-
[attr.tabindex]="panelTabIndex()"
|
|
710
|
+
[id]="view.panel.panelId"
|
|
711
|
+
[attr.aria-labelledby]="view.panel.tabId"
|
|
712
|
+
[attr.tabindex]="view.active ? panelTabIndex() : -1"
|
|
713
|
+
[hidden]="!view.active"
|
|
331
714
|
>
|
|
332
|
-
|
|
715
|
+
@if (view.rendered) {
|
|
716
|
+
<ng-container [ngTemplateOutlet]="view.panel.content()" />
|
|
717
|
+
}
|
|
333
718
|
</div>
|
|
334
719
|
}
|
|
335
|
-
`,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
720
|
+
`,
|
|
721
|
+
isInline: true,
|
|
722
|
+
styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );--_tab-height: 3rem;--_tab-padding: 1rem;--_tab-font-size: var(--aeris-font-size-lg, .875rem);display:block;min-width:0}:host([data-size=sm]){--_tab-height: 2.25rem;--_tab-padding: .75rem;--_tab-font-size: var(--aeris-font-size-sm, .75rem)}:host([data-size=lg]){--_tab-height: 3.5rem;--_tab-padding: 1.25rem;--_tab-font-size: var(--aeris-font-size-xl, .9375rem)}.aeris-tabs__header{display:flex;align-items:stretch;min-width:0}.aeris-tabs__list{position:relative;isolation:isolate;min-width:0;display:flex;flex:1 1 auto;gap:.25rem;border-bottom:1px solid var(--aeris-tabs-border, var(--aeris-border));overflow:visible;scrollbar-width:none}.aeris-tabs__list::-webkit-scrollbar{display:none}:host([data-scrollable][data-orientation=horizontal]) .aeris-tabs__list{overflow-x:auto;overscroll-behavior-inline:contain}.aeris-tabs__list button{position:relative;z-index:1;min-height:var(--_tab-height);flex:0 0 auto;padding:0 var(--_tab-padding);border:0;border-radius:var(--aeris-tabs-radius, var(--aeris-radius-control, .4375rem));background:transparent;color:var(--aeris-tabs-text, var(--aeris-text-2, #454545));font:inherit;font-size:var(--_tab-font-size);font-weight:var(--aeris-font-weight-semibold, 600);white-space:nowrap;cursor:pointer;transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}@media(hover:hover){.aeris-tabs__list button:hover:not(:disabled){background:transparent;color:var(--aeris-tabs-active-text, var(--aeris-primary-text, #111111))}}.aeris-tabs__list button[aria-selected=true]{color:var(--aeris-tabs-active-text, var(--aeris-primary-text, #111111))}.aeris-tabs__list button:disabled{opacity:var(--aeris-disabled-opacity, .45);cursor:not-allowed}.aeris-tabs__list button:focus-visible,.aeris-tabs__scroll:focus-visible{z-index:1;outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:-2px}:host([data-variant=pill]) .aeris-tabs__list{gap:.25rem;padding:.25rem;border:0;border-radius:calc(min(var(--aeris-tabs-radius, var(--aeris-radius-control, .4375rem)),1rem) + .25rem);background:var(--aeris-tabs-list-background, var(--aeris-surface-2, #f3f3f3))}:host([data-variant=pill]) .aeris-tabs__list button{min-height:calc(var(--_tab-height) - .5rem)}@media(hover:hover){:host([data-variant=pill]) .aeris-tabs__list button:hover:not(:disabled){background:var(--aeris-tabs-hover, color-mix(in srgb, var(--aeris-surface, #fff) 76%, transparent));color:var(--aeris-text, #111111)}}:host([data-variant=pill]) .aeris-tabs__list button[aria-selected=true]{background:transparent;color:var(--aeris-text, #111111)}.aeris-tabs__indicator{position:absolute;z-index:2;top:0;left:0;border-radius:var(--aeris-radius-pill, 999px) var(--aeris-radius-pill, 999px) 0 0;background:var(--aeris-tabs-indicator, var(--aeris-primary, #111111));pointer-events:none;will-change:transform,width,height}.aeris-tabs__indicator[data-ready]{transition:width var(--aeris-motion-slow, .22s) var(--aeris-ease-standard, cubic-bezier(.2, 0, 0, 1)),height var(--aeris-motion-slow, .22s) var(--aeris-ease-standard, cubic-bezier(.2, 0, 0, 1)),transform var(--aeris-motion-slow, .22s) var(--aeris-ease-standard, cubic-bezier(.2, 0, 0, 1))}:host([data-variant=pill]) .aeris-tabs__indicator{z-index:0;border-radius:var(--aeris-tabs-radius, var(--aeris-radius-control, .4375rem));background:var(--aeris-tabs-active-background, var(--aeris-surface, #fff));box-shadow:0 1px 3px #1f231b1a}:host([data-justify=center]) .aeris-tabs__list{justify-content:center}:host([data-justify=end]) .aeris-tabs__list{justify-content:flex-end}:host([data-justify=stretch]) .aeris-tabs__list button{flex:1 1 0}.aeris-tabs__scroll{width:2.25rem;flex:0 0 2.25rem;display:grid;place-items:center;padding:0;border:0;border-bottom:1px solid var(--aeris-tabs-border, var(--aeris-border));background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #454545);cursor:pointer}.aeris-tabs__scroll:disabled{opacity:.3;cursor:default}.aeris-tabs__scroll span{position:relative;width:1rem;height:1rem}.aeris-tabs__scroll span:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%) rotate(90deg);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-tabs__scroll--next span:before{transform:translate(-50%,-50%) rotate(-90deg)}.aeris-tabs__panel-source{display:none}.aeris-tabs__panel{min-width:0;padding-top:var(--aeris-tabs-panel-padding, 1rem)}:host([data-orientation=vertical]){display:grid;grid-template-columns:max-content minmax(0,1fr)}:host([data-orientation=vertical]) .aeris-tabs__header{display:block}:host([data-orientation=vertical]) .aeris-tabs__list{flex-direction:column;border-right:1px solid var(--aeris-tabs-border, var(--aeris-border));border-bottom:0}:host([data-orientation=vertical]) .aeris-tabs__list button{text-align:left}@media(max-width:40rem){:host([data-orientation=vertical]){display:block}:host([data-orientation=vertical]) .aeris-tabs__list{flex-direction:row;border-right:0;border-bottom:1px solid var(--aeris-tabs-border, var(--aeris-border));overflow-x:auto}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}.aeris-tabs__scroll span[data-aeris-custom-icon]{rotate:90deg}.aeris-tabs__scroll--next span[data-aeris-custom-icon]{rotate:-90deg}@media(prefers-reduced-motion:reduce){.aeris-tabs__list{scroll-behavior:auto}.aeris-tabs__indicator,.aeris-tabs__list button{transition:none}}\n"],
|
|
723
|
+
dependencies: [{
|
|
724
|
+
kind: "component",
|
|
725
|
+
type: ɵAerisIcon,
|
|
726
|
+
selector: "span[aerisInternalIcon]",
|
|
727
|
+
inputs: ["aerisInternalIcon", "aerisInternalIconFallback"]
|
|
728
|
+
}, {
|
|
729
|
+
kind: "directive",
|
|
730
|
+
type: NgTemplateOutlet,
|
|
731
|
+
selector: "[ngTemplateOutlet]",
|
|
732
|
+
inputs: [
|
|
733
|
+
"ngTemplateOutletContext",
|
|
734
|
+
"ngTemplateOutlet",
|
|
735
|
+
"ngTemplateOutletInjector"
|
|
736
|
+
]
|
|
737
|
+
}]
|
|
738
|
+
});
|
|
739
|
+
};
|
|
740
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
741
|
+
minVersion: "12.0.0",
|
|
742
|
+
version: "22.2.3",
|
|
743
|
+
ngImport: i0,
|
|
744
|
+
type: AerisTabs,
|
|
745
|
+
decorators: [{
|
|
746
|
+
type: Component,
|
|
747
|
+
args: [{
|
|
748
|
+
selector: "aeris-tabs",
|
|
749
|
+
providers: [{
|
|
750
|
+
provide: AERIS_TABS_OWNER,
|
|
751
|
+
useFactory: () => ({ host: inject(ElementRef).nativeElement })
|
|
752
|
+
}],
|
|
753
|
+
imports: [ɵAerisIcon, NgTemplateOutlet],
|
|
754
|
+
template: `
|
|
340
755
|
<div class="aeris-tabs__panel-source" aria-hidden="true">
|
|
341
756
|
<ng-content />
|
|
342
757
|
</div>
|
|
@@ -350,7 +765,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
350
765
|
[disabled]="!canScrollPrevious()"
|
|
351
766
|
(click)="scrollTabs(-1)"
|
|
352
767
|
>
|
|
353
|
-
|
|
768
|
+
@if (previousIconTemplate(); as customIcon) {
|
|
769
|
+
<span aria-hidden="true" data-aeris-custom-icon
|
|
770
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
771
|
+
/></span>
|
|
772
|
+
} @else {
|
|
773
|
+
<span aerisInternalIcon="chevron" aria-hidden="true"></span>
|
|
774
|
+
}
|
|
354
775
|
</button>
|
|
355
776
|
}
|
|
356
777
|
|
|
@@ -364,6 +785,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
364
785
|
(keydown)="handleKeydown($event)"
|
|
365
786
|
(scroll)="updateScrollState()"
|
|
366
787
|
>
|
|
788
|
+
@if (indicatorRect(); as indicator) {
|
|
789
|
+
<span
|
|
790
|
+
class="aeris-tabs__indicator"
|
|
791
|
+
aria-hidden="true"
|
|
792
|
+
[attr.data-ready]="indicatorReady() || null"
|
|
793
|
+
[style.width.px]="indicator.width"
|
|
794
|
+
[style.height.px]="indicator.height"
|
|
795
|
+
[style.transform]="indicatorTransform()"
|
|
796
|
+
></span>
|
|
797
|
+
}
|
|
367
798
|
@for (panel of panels(); track panel.value()) {
|
|
368
799
|
<button
|
|
369
800
|
#tabButton
|
|
@@ -401,38 +832,179 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
401
832
|
[disabled]="!canScrollNext()"
|
|
402
833
|
(click)="scrollTabs(1)"
|
|
403
834
|
>
|
|
404
|
-
|
|
835
|
+
@if (nextIconTemplate(); as customIcon) {
|
|
836
|
+
<span aria-hidden="true" data-aeris-custom-icon
|
|
837
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
838
|
+
/></span>
|
|
839
|
+
} @else {
|
|
840
|
+
<span aerisInternalIcon="chevron" aria-hidden="true"></span>
|
|
841
|
+
}
|
|
405
842
|
</button>
|
|
406
843
|
}
|
|
407
844
|
</div>
|
|
408
845
|
|
|
409
|
-
@
|
|
846
|
+
@for (view of panelViews(); track view.panel.panelId) {
|
|
410
847
|
<div
|
|
411
848
|
class="aeris-tabs__panel"
|
|
412
849
|
role="tabpanel"
|
|
413
|
-
[id]="panel.panelId"
|
|
414
|
-
[attr.aria-labelledby]="panel.tabId"
|
|
415
|
-
[attr.tabindex]="panelTabIndex()"
|
|
850
|
+
[id]="view.panel.panelId"
|
|
851
|
+
[attr.aria-labelledby]="view.panel.tabId"
|
|
852
|
+
[attr.tabindex]="view.active ? panelTabIndex() : -1"
|
|
853
|
+
[hidden]="!view.active"
|
|
416
854
|
>
|
|
417
|
-
|
|
855
|
+
@if (view.rendered) {
|
|
856
|
+
<ng-container [ngTemplateOutlet]="view.panel.content()" />
|
|
857
|
+
}
|
|
418
858
|
</div>
|
|
419
859
|
}
|
|
420
|
-
`,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
860
|
+
`,
|
|
861
|
+
host: {
|
|
862
|
+
class: "aeris-tabs",
|
|
863
|
+
"[attr.data-orientation]": "orientation()",
|
|
864
|
+
"[attr.data-variant]": "variant()",
|
|
865
|
+
"[attr.data-size]": "size()",
|
|
866
|
+
"[attr.data-justify]": "justify()",
|
|
867
|
+
"[attr.data-scrollable]": "scrollable() || null"
|
|
868
|
+
},
|
|
869
|
+
styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );--_tab-height: 3rem;--_tab-padding: 1rem;--_tab-font-size: var(--aeris-font-size-lg, .875rem);display:block;min-width:0}:host([data-size=sm]){--_tab-height: 2.25rem;--_tab-padding: .75rem;--_tab-font-size: var(--aeris-font-size-sm, .75rem)}:host([data-size=lg]){--_tab-height: 3.5rem;--_tab-padding: 1.25rem;--_tab-font-size: var(--aeris-font-size-xl, .9375rem)}.aeris-tabs__header{display:flex;align-items:stretch;min-width:0}.aeris-tabs__list{position:relative;isolation:isolate;min-width:0;display:flex;flex:1 1 auto;gap:.25rem;border-bottom:1px solid var(--aeris-tabs-border, var(--aeris-border));overflow:visible;scrollbar-width:none}.aeris-tabs__list::-webkit-scrollbar{display:none}:host([data-scrollable][data-orientation=horizontal]) .aeris-tabs__list{overflow-x:auto;overscroll-behavior-inline:contain}.aeris-tabs__list button{position:relative;z-index:1;min-height:var(--_tab-height);flex:0 0 auto;padding:0 var(--_tab-padding);border:0;border-radius:var(--aeris-tabs-radius, var(--aeris-radius-control, .4375rem));background:transparent;color:var(--aeris-tabs-text, var(--aeris-text-2, #454545));font:inherit;font-size:var(--_tab-font-size);font-weight:var(--aeris-font-weight-semibold, 600);white-space:nowrap;cursor:pointer;transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}@media(hover:hover){.aeris-tabs__list button:hover:not(:disabled){background:transparent;color:var(--aeris-tabs-active-text, var(--aeris-primary-text, #111111))}}.aeris-tabs__list button[aria-selected=true]{color:var(--aeris-tabs-active-text, var(--aeris-primary-text, #111111))}.aeris-tabs__list button:disabled{opacity:var(--aeris-disabled-opacity, .45);cursor:not-allowed}.aeris-tabs__list button:focus-visible,.aeris-tabs__scroll:focus-visible{z-index:1;outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:-2px}:host([data-variant=pill]) .aeris-tabs__list{gap:.25rem;padding:.25rem;border:0;border-radius:calc(min(var(--aeris-tabs-radius, var(--aeris-radius-control, .4375rem)),1rem) + .25rem);background:var(--aeris-tabs-list-background, var(--aeris-surface-2, #f3f3f3))}:host([data-variant=pill]) .aeris-tabs__list button{min-height:calc(var(--_tab-height) - .5rem)}@media(hover:hover){:host([data-variant=pill]) .aeris-tabs__list button:hover:not(:disabled){background:var(--aeris-tabs-hover, color-mix(in srgb, var(--aeris-surface, #fff) 76%, transparent));color:var(--aeris-text, #111111)}}:host([data-variant=pill]) .aeris-tabs__list button[aria-selected=true]{background:transparent;color:var(--aeris-text, #111111)}.aeris-tabs__indicator{position:absolute;z-index:2;top:0;left:0;border-radius:var(--aeris-radius-pill, 999px) var(--aeris-radius-pill, 999px) 0 0;background:var(--aeris-tabs-indicator, var(--aeris-primary, #111111));pointer-events:none;will-change:transform,width,height}.aeris-tabs__indicator[data-ready]{transition:width var(--aeris-motion-slow, .22s) var(--aeris-ease-standard, cubic-bezier(.2, 0, 0, 1)),height var(--aeris-motion-slow, .22s) var(--aeris-ease-standard, cubic-bezier(.2, 0, 0, 1)),transform var(--aeris-motion-slow, .22s) var(--aeris-ease-standard, cubic-bezier(.2, 0, 0, 1))}:host([data-variant=pill]) .aeris-tabs__indicator{z-index:0;border-radius:var(--aeris-tabs-radius, var(--aeris-radius-control, .4375rem));background:var(--aeris-tabs-active-background, var(--aeris-surface, #fff));box-shadow:0 1px 3px #1f231b1a}:host([data-justify=center]) .aeris-tabs__list{justify-content:center}:host([data-justify=end]) .aeris-tabs__list{justify-content:flex-end}:host([data-justify=stretch]) .aeris-tabs__list button{flex:1 1 0}.aeris-tabs__scroll{width:2.25rem;flex:0 0 2.25rem;display:grid;place-items:center;padding:0;border:0;border-bottom:1px solid var(--aeris-tabs-border, var(--aeris-border));background:var(--aeris-surface, #fff);color:var(--aeris-text-2, #454545);cursor:pointer}.aeris-tabs__scroll:disabled{opacity:.3;cursor:default}.aeris-tabs__scroll span{position:relative;width:1rem;height:1rem}.aeris-tabs__scroll span:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%) rotate(90deg);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-tabs__scroll--next span:before{transform:translate(-50%,-50%) rotate(-90deg)}.aeris-tabs__panel-source{display:none}.aeris-tabs__panel{min-width:0;padding-top:var(--aeris-tabs-panel-padding, 1rem)}:host([data-orientation=vertical]){display:grid;grid-template-columns:max-content minmax(0,1fr)}:host([data-orientation=vertical]) .aeris-tabs__header{display:block}:host([data-orientation=vertical]) .aeris-tabs__list{flex-direction:column;border-right:1px solid var(--aeris-tabs-border, var(--aeris-border));border-bottom:0}:host([data-orientation=vertical]) .aeris-tabs__list button{text-align:left}@media(max-width:40rem){:host([data-orientation=vertical]){display:block}:host([data-orientation=vertical]) .aeris-tabs__list{flex-direction:row;border-right:0;border-bottom:1px solid var(--aeris-tabs-border, var(--aeris-border));overflow-x:auto}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}.aeris-tabs__scroll span[data-aeris-custom-icon]{rotate:90deg}.aeris-tabs__scroll--next span[data-aeris-custom-icon]{rotate:-90deg}@media(prefers-reduced-motion:reduce){.aeris-tabs__list{scroll-behavior:auto}.aeris-tabs__indicator,.aeris-tabs__list button{transition:none}}\n"]
|
|
870
|
+
}]
|
|
871
|
+
}],
|
|
872
|
+
ctorParameters: () => [],
|
|
873
|
+
propDecorators: {
|
|
874
|
+
previousIconTemplate: [{
|
|
875
|
+
type: i0.Input,
|
|
876
|
+
args: [{
|
|
877
|
+
isSignal: true,
|
|
878
|
+
alias: "previousIconTemplate",
|
|
879
|
+
required: false
|
|
880
|
+
}]
|
|
881
|
+
}],
|
|
882
|
+
nextIconTemplate: [{
|
|
883
|
+
type: i0.Input,
|
|
884
|
+
args: [{
|
|
885
|
+
isSignal: true,
|
|
886
|
+
alias: "nextIconTemplate",
|
|
887
|
+
required: false
|
|
888
|
+
}]
|
|
889
|
+
}],
|
|
890
|
+
value: [{
|
|
891
|
+
type: i0.Input,
|
|
892
|
+
args: [{
|
|
893
|
+
isSignal: true,
|
|
894
|
+
alias: "value",
|
|
895
|
+
required: false
|
|
896
|
+
}]
|
|
897
|
+
}, {
|
|
898
|
+
type: i0.Output,
|
|
899
|
+
args: ["valueChange"]
|
|
900
|
+
}],
|
|
901
|
+
ariaLabel: [{
|
|
902
|
+
type: i0.Input,
|
|
903
|
+
args: [{
|
|
904
|
+
isSignal: true,
|
|
905
|
+
alias: "ariaLabel",
|
|
906
|
+
required: false
|
|
907
|
+
}]
|
|
908
|
+
}],
|
|
909
|
+
ariaLabelledBy: [{
|
|
910
|
+
type: i0.Input,
|
|
911
|
+
args: [{
|
|
912
|
+
isSignal: true,
|
|
913
|
+
alias: "ariaLabelledBy",
|
|
914
|
+
required: false
|
|
915
|
+
}]
|
|
916
|
+
}],
|
|
917
|
+
orientation: [{
|
|
918
|
+
type: i0.Input,
|
|
919
|
+
args: [{
|
|
920
|
+
isSignal: true,
|
|
921
|
+
alias: "orientation",
|
|
922
|
+
required: false
|
|
923
|
+
}]
|
|
924
|
+
}],
|
|
925
|
+
activationMode: [{
|
|
926
|
+
type: i0.Input,
|
|
927
|
+
args: [{
|
|
928
|
+
isSignal: true,
|
|
929
|
+
alias: "activationMode",
|
|
930
|
+
required: false
|
|
931
|
+
}]
|
|
932
|
+
}],
|
|
933
|
+
variant: [{
|
|
934
|
+
type: i0.Input,
|
|
935
|
+
args: [{
|
|
936
|
+
isSignal: true,
|
|
937
|
+
alias: "variant",
|
|
938
|
+
required: false
|
|
939
|
+
}]
|
|
940
|
+
}],
|
|
941
|
+
size: [{
|
|
942
|
+
type: i0.Input,
|
|
943
|
+
args: [{
|
|
944
|
+
isSignal: true,
|
|
945
|
+
alias: "size",
|
|
946
|
+
required: false
|
|
947
|
+
}]
|
|
948
|
+
}],
|
|
949
|
+
justify: [{
|
|
950
|
+
type: i0.Input,
|
|
951
|
+
args: [{
|
|
952
|
+
isSignal: true,
|
|
953
|
+
alias: "justify",
|
|
954
|
+
required: false
|
|
955
|
+
}]
|
|
956
|
+
}],
|
|
957
|
+
scrollable: [{
|
|
958
|
+
type: i0.Input,
|
|
959
|
+
args: [{
|
|
960
|
+
isSignal: true,
|
|
961
|
+
alias: "scrollable",
|
|
962
|
+
required: false
|
|
963
|
+
}]
|
|
964
|
+
}],
|
|
965
|
+
panelTabIndex: [{
|
|
966
|
+
type: i0.Input,
|
|
967
|
+
args: [{
|
|
968
|
+
isSignal: true,
|
|
969
|
+
alias: "panelTabIndex",
|
|
970
|
+
required: false
|
|
971
|
+
}]
|
|
972
|
+
}],
|
|
973
|
+
changed: [{
|
|
974
|
+
type: i0.Output,
|
|
975
|
+
args: ["changed"]
|
|
976
|
+
}],
|
|
977
|
+
tabFocused: [{
|
|
978
|
+
type: i0.Output,
|
|
979
|
+
args: ["tabFocused"]
|
|
980
|
+
}],
|
|
981
|
+
discoveredPanels: [{
|
|
982
|
+
type: i0.ContentChildren,
|
|
983
|
+
args: [i0.forwardRef(() => AerisTabPanel), {
|
|
984
|
+
descendants: true,
|
|
985
|
+
isSignal: true
|
|
986
|
+
}]
|
|
987
|
+
}],
|
|
988
|
+
tabButtons: [{
|
|
989
|
+
type: i0.ViewChildren,
|
|
990
|
+
args: ["tabButton", { isSignal: true }]
|
|
991
|
+
}],
|
|
992
|
+
tabList: [{
|
|
993
|
+
type: i0.ViewChild,
|
|
994
|
+
args: ["tabList", { isSignal: true }]
|
|
995
|
+
}],
|
|
996
|
+
tabHeader: [{
|
|
997
|
+
type: i0.ViewChild,
|
|
998
|
+
args: ["tabHeader", { isSignal: true }]
|
|
999
|
+
}]
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
const AerisTabsModule = [
|
|
1003
|
+
AerisTabs,
|
|
1004
|
+
AerisTabPanel,
|
|
1005
|
+
AerisTabHeaderTemplate,
|
|
1006
|
+
AerisTabContentTemplate
|
|
1007
|
+
];
|
|
1008
|
+
export { AerisTabContentTemplate, AerisTabHeaderTemplate, AerisTabPanel, AerisTabs, AerisTabsModule };
|
|
436
1009
|
|
|
437
|
-
|
|
438
|
-
//# sourceMappingURL=aeris-ui-core-tabs.mjs.map
|
|
1010
|
+
//# sourceMappingURL=aeris-ui-core-tabs.mjs.map
|