@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,328 +1,596 @@
|
|
|
1
|
-
import { DOCUMENT, NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, DestroyRef, ElementRef, booleanAttribute, computed, contentChildren, inject, input, model, numberAttribute, output, signal, viewChild, viewChildren } from "@angular/core";
|
|
5
4
|
let nextSplitterPanelId = 0;
|
|
6
|
-
class AerisSplitterPanel {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
var AerisSplitterPanel = class AerisSplitterPanel {
|
|
6
|
+
element = inject(ElementRef);
|
|
7
|
+
instanceId = ++nextSplitterPanelId;
|
|
8
|
+
size = input(null, {
|
|
9
|
+
...ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {},
|
|
10
|
+
transform: nullableNumberAttribute
|
|
11
|
+
});
|
|
12
|
+
minSize = input(0, {
|
|
13
|
+
...ngDevMode ? { debugName: "minSize" } : /* istanbul ignore next */ {},
|
|
14
|
+
transform: numberAttribute
|
|
15
|
+
});
|
|
16
|
+
maxSize = input(100, {
|
|
17
|
+
...ngDevMode ? { debugName: "maxSize" } : /* istanbul ignore next */ {},
|
|
18
|
+
transform: numberAttribute
|
|
19
|
+
});
|
|
20
|
+
resizable = input(true, {
|
|
21
|
+
...ngDevMode ? { debugName: "resizable" } : /* istanbul ignore next */ {},
|
|
22
|
+
transform: booleanAttribute
|
|
23
|
+
});
|
|
24
|
+
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
25
|
+
content = viewChild.required("content", ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
26
|
+
panelId = `aeris-splitter-panel-${this.instanceId}`;
|
|
27
|
+
isDirectPanelOf(splitterHost) {
|
|
28
|
+
const parent = this.element.nativeElement.parentElement;
|
|
29
|
+
return parent?.classList.contains("aeris-splitter__panel-source") === true && parent.parentElement === splitterHost;
|
|
30
|
+
}
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.3",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: AerisSplitterPanel,
|
|
36
|
+
deps: [],
|
|
37
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
38
|
+
});
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
40
|
+
minVersion: "17.2.0",
|
|
41
|
+
version: "22.2.3",
|
|
42
|
+
type: AerisSplitterPanel,
|
|
43
|
+
isStandalone: true,
|
|
44
|
+
selector: "aeris-splitter-panel",
|
|
45
|
+
inputs: {
|
|
46
|
+
size: {
|
|
47
|
+
classPropertyName: "size",
|
|
48
|
+
publicName: "size",
|
|
49
|
+
isSignal: true,
|
|
50
|
+
isRequired: false,
|
|
51
|
+
transformFunction: null
|
|
52
|
+
},
|
|
53
|
+
minSize: {
|
|
54
|
+
classPropertyName: "minSize",
|
|
55
|
+
publicName: "minSize",
|
|
56
|
+
isSignal: true,
|
|
57
|
+
isRequired: false,
|
|
58
|
+
transformFunction: null
|
|
59
|
+
},
|
|
60
|
+
maxSize: {
|
|
61
|
+
classPropertyName: "maxSize",
|
|
62
|
+
publicName: "maxSize",
|
|
63
|
+
isSignal: true,
|
|
64
|
+
isRequired: false,
|
|
65
|
+
transformFunction: null
|
|
66
|
+
},
|
|
67
|
+
resizable: {
|
|
68
|
+
classPropertyName: "resizable",
|
|
69
|
+
publicName: "resizable",
|
|
70
|
+
isSignal: true,
|
|
71
|
+
isRequired: false,
|
|
72
|
+
transformFunction: null
|
|
73
|
+
},
|
|
74
|
+
ariaLabel: {
|
|
75
|
+
classPropertyName: "ariaLabel",
|
|
76
|
+
publicName: "ariaLabel",
|
|
77
|
+
isSignal: true,
|
|
78
|
+
isRequired: false,
|
|
79
|
+
transformFunction: null
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
host: { properties: { "style.display": "\"none\"" } },
|
|
83
|
+
viewQueries: [{
|
|
84
|
+
propertyName: "content",
|
|
85
|
+
first: true,
|
|
86
|
+
predicate: ["content"],
|
|
87
|
+
descendants: true,
|
|
88
|
+
isSignal: true
|
|
89
|
+
}],
|
|
90
|
+
ngImport: i0,
|
|
91
|
+
template: `
|
|
25
92
|
<ng-template #content>
|
|
26
93
|
<ng-content />
|
|
27
94
|
</ng-template>
|
|
28
|
-
`,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
95
|
+
`,
|
|
96
|
+
isInline: true
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
100
|
+
minVersion: "12.0.0",
|
|
101
|
+
version: "22.2.3",
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: AerisSplitterPanel,
|
|
104
|
+
decorators: [{
|
|
105
|
+
type: Component,
|
|
106
|
+
args: [{
|
|
107
|
+
selector: "aeris-splitter-panel",
|
|
108
|
+
template: `
|
|
35
109
|
<ng-template #content>
|
|
36
110
|
<ng-content />
|
|
37
111
|
</ng-template>
|
|
38
112
|
`,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
113
|
+
host: { "[style.display]": "\"none\"" }
|
|
114
|
+
}]
|
|
115
|
+
}],
|
|
116
|
+
propDecorators: {
|
|
117
|
+
size: [{
|
|
118
|
+
type: i0.Input,
|
|
119
|
+
args: [{
|
|
120
|
+
isSignal: true,
|
|
121
|
+
alias: "size",
|
|
122
|
+
required: false
|
|
123
|
+
}]
|
|
124
|
+
}],
|
|
125
|
+
minSize: [{
|
|
126
|
+
type: i0.Input,
|
|
127
|
+
args: [{
|
|
128
|
+
isSignal: true,
|
|
129
|
+
alias: "minSize",
|
|
130
|
+
required: false
|
|
131
|
+
}]
|
|
132
|
+
}],
|
|
133
|
+
maxSize: [{
|
|
134
|
+
type: i0.Input,
|
|
135
|
+
args: [{
|
|
136
|
+
isSignal: true,
|
|
137
|
+
alias: "maxSize",
|
|
138
|
+
required: false
|
|
139
|
+
}]
|
|
140
|
+
}],
|
|
141
|
+
resizable: [{
|
|
142
|
+
type: i0.Input,
|
|
143
|
+
args: [{
|
|
144
|
+
isSignal: true,
|
|
145
|
+
alias: "resizable",
|
|
146
|
+
required: false
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
ariaLabel: [{
|
|
150
|
+
type: i0.Input,
|
|
151
|
+
args: [{
|
|
152
|
+
isSignal: true,
|
|
153
|
+
alias: "ariaLabel",
|
|
154
|
+
required: false
|
|
155
|
+
}]
|
|
156
|
+
}],
|
|
157
|
+
content: [{
|
|
158
|
+
type: i0.ViewChild,
|
|
159
|
+
args: ["content", { isSignal: true }]
|
|
160
|
+
}]
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
var AerisSplitter = class AerisSplitter {
|
|
164
|
+
hostElement = inject(ElementRef).nativeElement;
|
|
165
|
+
document = inject(DOCUMENT);
|
|
166
|
+
destroyRef = inject(DestroyRef);
|
|
167
|
+
root = viewChild("root", ...ngDevMode ? [{ debugName: "root" }] : /* istanbul ignore next */ []);
|
|
168
|
+
sizes = model([], ...ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []);
|
|
169
|
+
orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
170
|
+
variant = input("outlined", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
171
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
172
|
+
showHandle = input(true, {
|
|
173
|
+
...ngDevMode ? { debugName: "showHandle" } : /* istanbul ignore next */ {},
|
|
174
|
+
transform: booleanAttribute
|
|
175
|
+
});
|
|
176
|
+
disabled = input(false, {
|
|
177
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
178
|
+
transform: booleanAttribute
|
|
179
|
+
});
|
|
180
|
+
fluid = input(true, {
|
|
181
|
+
...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
|
|
182
|
+
transform: booleanAttribute
|
|
183
|
+
});
|
|
184
|
+
step = input(5, {
|
|
185
|
+
...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
|
|
186
|
+
transform: numberAttribute
|
|
187
|
+
});
|
|
188
|
+
height = input("", ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
189
|
+
minHeight = input("", ...ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []);
|
|
190
|
+
maxHeight = input("", ...ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []);
|
|
191
|
+
width = input("100%", ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
192
|
+
maxWidth = input("", ...ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []);
|
|
193
|
+
role = input("group", ...ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []);
|
|
194
|
+
ariaLabel = input("Resizable panels", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
195
|
+
ariaLabelledBy = input("", ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
196
|
+
ariaDescribedBy = input("", ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
197
|
+
separatorLabel = input("Resize panels", ...ngDevMode ? [{ debugName: "separatorLabel" }] : /* istanbul ignore next */ []);
|
|
198
|
+
resizeStart = output();
|
|
199
|
+
resized = output();
|
|
200
|
+
resizeEnd = output();
|
|
201
|
+
discoveredPanels = contentChildren(AerisSplitterPanel, {
|
|
202
|
+
...ngDevMode ? { debugName: "discoveredPanels" } : /* istanbul ignore next */ {},
|
|
203
|
+
descendants: true
|
|
204
|
+
});
|
|
205
|
+
gutters = viewChildren("gutter", ...ngDevMode ? [{ debugName: "gutters" }] : /* istanbul ignore next */ []);
|
|
206
|
+
activeHandle = signal(null, ...ngDevMode ? [{ debugName: "activeHandle" }] : /* istanbul ignore next */ []);
|
|
207
|
+
panels = computed(() => this.discoveredPanels().filter((panel) => panel.isDirectPanelOf(this.hostElement)), ...ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []);
|
|
208
|
+
normalizedSizes = computed(() => this.normalizeSizes(this.panels(), this.sizes()), ...ngDevMode ? [{ debugName: "normalizedSizes" }] : /* istanbul ignore next */ []);
|
|
209
|
+
panelStates = computed(() => {
|
|
210
|
+
const sizes = this.normalizedSizes();
|
|
211
|
+
return this.panels().map((panel, index) => ({
|
|
212
|
+
panel,
|
|
213
|
+
index,
|
|
214
|
+
id: panel.panelId,
|
|
215
|
+
label: panel.ariaLabel(),
|
|
216
|
+
size: sizes[index] ?? 0,
|
|
217
|
+
minSize: this.clampPercent(panel.minSize()),
|
|
218
|
+
maxSize: this.clampPercent(Math.max(panel.maxSize(), panel.minSize())),
|
|
219
|
+
resizable: panel.resizable(),
|
|
220
|
+
content: panel.content()
|
|
221
|
+
}));
|
|
222
|
+
}, ...ngDevMode ? [{ debugName: "panelStates" }] : /* istanbul ignore next */ []);
|
|
223
|
+
handleStates = computed(() => {
|
|
224
|
+
const states = this.panelStates();
|
|
225
|
+
const activeHandle = this.activeHandle();
|
|
226
|
+
return states.slice(0, -1).map((state, index) => {
|
|
227
|
+
const next = states[index + 1];
|
|
228
|
+
const bounds = this.handleBoundsFromStates(states, index);
|
|
229
|
+
return {
|
|
230
|
+
index,
|
|
231
|
+
id: `aeris-splitter-gutter-${state.id}`,
|
|
232
|
+
currentPanelId: state.id,
|
|
233
|
+
nextPanelId: next?.id ?? "",
|
|
234
|
+
disabled: this.disabled() || !state.resizable || !next?.resizable,
|
|
235
|
+
active: activeHandle === index,
|
|
236
|
+
min: Math.round(bounds.min),
|
|
237
|
+
max: Math.round(bounds.max),
|
|
238
|
+
value: Math.round(state.size),
|
|
239
|
+
zIndex: this.handleZIndex(states, index)
|
|
240
|
+
};
|
|
241
|
+
});
|
|
242
|
+
}, ...ngDevMode ? [{ debugName: "handleStates" }] : /* istanbul ignore next */ []);
|
|
243
|
+
activeSession = null;
|
|
244
|
+
constructor() {
|
|
245
|
+
this.destroyRef.onDestroy(() => this.removeDocumentListeners());
|
|
246
|
+
}
|
|
247
|
+
setSizes(sizes, originalEvent = null) {
|
|
248
|
+
const previousSizes = this.normalizedSizes();
|
|
249
|
+
const nextSizes = this.normalizeExplicitSizes(this.panels(), sizes);
|
|
250
|
+
this.commitSizes(nextSizes, previousSizes, -1, originalEvent, this.resized);
|
|
251
|
+
}
|
|
252
|
+
reset(originalEvent = null) {
|
|
253
|
+
const previousSizes = this.normalizedSizes();
|
|
254
|
+
const nextSizes = this.normalizeSizes(this.panels(), []);
|
|
255
|
+
this.commitSizes(nextSizes, previousSizes, -1, originalEvent, this.resized);
|
|
256
|
+
}
|
|
257
|
+
focusHandle(index, options) {
|
|
258
|
+
this.gutters()[index]?.nativeElement.focus(options);
|
|
259
|
+
}
|
|
260
|
+
handlePointerDown(event, index) {
|
|
261
|
+
if (event.button !== 0 || this.handleStates()[index]?.disabled) return;
|
|
262
|
+
const containerSize = this.containerPixelSize();
|
|
263
|
+
if (containerSize <= 0) return;
|
|
264
|
+
event.preventDefault();
|
|
265
|
+
const startSizes = this.normalizedSizes();
|
|
266
|
+
const session = {
|
|
267
|
+
index,
|
|
268
|
+
pointerId: event.pointerId,
|
|
269
|
+
startCoordinate: this.pointerCoordinate(event),
|
|
270
|
+
containerSize,
|
|
271
|
+
startSizes,
|
|
272
|
+
previousSizes: startSizes,
|
|
273
|
+
move: (moveEvent) => this.handlePointerMove(moveEvent),
|
|
274
|
+
end: (endEvent) => this.handlePointerEnd(endEvent)
|
|
275
|
+
};
|
|
276
|
+
this.activeSession = session;
|
|
277
|
+
this.activeHandle.set(index);
|
|
278
|
+
this.document.addEventListener("pointermove", session.move);
|
|
279
|
+
this.document.addEventListener("pointerup", session.end);
|
|
280
|
+
this.document.addEventListener("pointercancel", session.end);
|
|
281
|
+
this.resizeStart.emit(this.eventPayload(event, startSizes, startSizes, index));
|
|
282
|
+
}
|
|
283
|
+
handleGutterKeydown(event, index) {
|
|
284
|
+
if (this.handleStates()[index]?.disabled) return;
|
|
285
|
+
const amount = this.keyAmount(event);
|
|
286
|
+
if (amount === null) return;
|
|
287
|
+
event.preventDefault();
|
|
288
|
+
const previousSizes = this.normalizedSizes();
|
|
289
|
+
const nextSizes = amount === "min" ? this.resizePair(previousSizes, index, Number.NEGATIVE_INFINITY) : amount === "max" ? this.resizePair(previousSizes, index, Number.POSITIVE_INFINITY) : this.resizePair(previousSizes, index, amount);
|
|
290
|
+
this.commitSizes(nextSizes, previousSizes, index, event, this.resized);
|
|
291
|
+
}
|
|
292
|
+
handlePointerMove(event) {
|
|
293
|
+
const session = this.activeSession;
|
|
294
|
+
if (!session || event.pointerId !== session.pointerId) return;
|
|
295
|
+
event.preventDefault();
|
|
296
|
+
const delta = (this.pointerCoordinate(event) - session.startCoordinate) / session.containerSize * 100;
|
|
297
|
+
const nextSizes = this.resizePair(session.startSizes, session.index, delta);
|
|
298
|
+
this.commitSizes(nextSizes, session.previousSizes, session.index, event, this.resized);
|
|
299
|
+
}
|
|
300
|
+
handlePointerEnd(event) {
|
|
301
|
+
const session = this.activeSession;
|
|
302
|
+
if (!session || event.pointerId !== session.pointerId) return;
|
|
303
|
+
event.preventDefault();
|
|
304
|
+
const previousSizes = session.previousSizes;
|
|
305
|
+
const nextSizes = this.normalizedSizes();
|
|
306
|
+
this.removeDocumentListeners();
|
|
307
|
+
this.resizeEnd.emit(this.eventPayload(event, nextSizes, previousSizes, session.index));
|
|
308
|
+
}
|
|
309
|
+
removeDocumentListeners() {
|
|
310
|
+
const session = this.activeSession;
|
|
311
|
+
if (!session) return;
|
|
312
|
+
this.document.removeEventListener("pointermove", session.move);
|
|
313
|
+
this.document.removeEventListener("pointerup", session.end);
|
|
314
|
+
this.document.removeEventListener("pointercancel", session.end);
|
|
315
|
+
this.activeSession = null;
|
|
316
|
+
this.activeHandle.set(null);
|
|
317
|
+
}
|
|
318
|
+
commitSizes(nextSizes, previousSizes, index, originalEvent, emitter) {
|
|
319
|
+
const normalized = this.normalizeExplicitSizes(this.panels(), nextSizes);
|
|
320
|
+
if (this.sameSizes(normalized, this.normalizedSizes())) return;
|
|
321
|
+
this.sizes.set(normalized);
|
|
322
|
+
emitter.emit(this.eventPayload(originalEvent, normalized, previousSizes, index));
|
|
323
|
+
}
|
|
324
|
+
eventPayload(originalEvent, sizes, previousSizes, index) {
|
|
325
|
+
return {
|
|
326
|
+
originalEvent,
|
|
327
|
+
sizes,
|
|
328
|
+
previousSizes,
|
|
329
|
+
index,
|
|
330
|
+
nextIndex: index >= 0 ? index + 1 : -1
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
normalizeSizes(panels, requestedSizes) {
|
|
334
|
+
if (panels.length === 0) return [];
|
|
335
|
+
if (requestedSizes.length > 0) return this.normalizeExplicitSizes(panels, requestedSizes);
|
|
336
|
+
const explicit = panels.map((panel) => panel.size());
|
|
337
|
+
const totalExplicit = explicit.reduce((total, value) => total + (value ?? 0), 0);
|
|
338
|
+
const unsetCount = explicit.filter((value) => value === null).length;
|
|
339
|
+
const fallbackSize = unsetCount > 0 ? Math.max(0, (100 - totalExplicit) / unsetCount) : 0;
|
|
340
|
+
return this.normalizeExplicitSizes(panels, explicit.map((value) => value ?? fallbackSize));
|
|
341
|
+
}
|
|
342
|
+
normalizeExplicitSizes(panels, requestedSizes) {
|
|
343
|
+
if (panels.length === 0) return [];
|
|
344
|
+
const fallbackSize = 100 / panels.length;
|
|
345
|
+
const raw = panels.map((panel, index) => {
|
|
346
|
+
const min = this.clampPercent(panel.minSize());
|
|
347
|
+
const max = this.clampPercent(Math.max(panel.maxSize(), panel.minSize()));
|
|
348
|
+
return clamp(requestedSizes[index] ?? panel.size() ?? fallbackSize, min, max);
|
|
349
|
+
});
|
|
350
|
+
const total = raw.reduce((sum, value) => sum + value, 0);
|
|
351
|
+
if (total <= 0) return panels.map(() => roundSize(fallbackSize));
|
|
352
|
+
return raw.map((value) => roundSize(value / total * 100));
|
|
353
|
+
}
|
|
354
|
+
resizePair(sizes, index, delta) {
|
|
355
|
+
const states = this.panelStates();
|
|
356
|
+
const current = states[index];
|
|
357
|
+
const next = states[index + 1];
|
|
358
|
+
if (!current || !next) return sizes;
|
|
359
|
+
const pairTotal = (sizes[index] ?? current.size) + (sizes[index + 1] ?? next.size);
|
|
360
|
+
const minCurrent = Math.max(current.minSize, pairTotal - next.maxSize);
|
|
361
|
+
const maxCurrent = Math.min(current.maxSize, pairTotal - next.minSize);
|
|
362
|
+
const currentSize = clamp((sizes[index] ?? current.size) + delta, minCurrent, maxCurrent);
|
|
363
|
+
const nextSize = pairTotal - currentSize;
|
|
364
|
+
return sizes.map((size, sizeIndex) => sizeIndex === index ? roundSize(currentSize) : sizeIndex === index + 1 ? roundSize(nextSize) : size);
|
|
365
|
+
}
|
|
366
|
+
handleBoundsFromStates(states, index) {
|
|
367
|
+
const current = states[index];
|
|
368
|
+
const next = states[index + 1];
|
|
369
|
+
if (!current || !next) return {
|
|
370
|
+
min: 0,
|
|
371
|
+
max: 0
|
|
372
|
+
};
|
|
373
|
+
const pairTotal = current.size + next.size;
|
|
374
|
+
return {
|
|
375
|
+
min: Math.max(current.minSize, pairTotal - next.maxSize),
|
|
376
|
+
max: Math.min(current.maxSize, pairTotal - next.minSize)
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
handleZIndex(states, index) {
|
|
380
|
+
const handleCount = Math.max(0, states.length - 1);
|
|
381
|
+
return states.slice(0, index + 1).reduce((total, state) => total + state.size, 0) > 50 ? handleCount - index : index + 1;
|
|
382
|
+
}
|
|
383
|
+
keyAmount(event) {
|
|
384
|
+
const step = Math.max(1, this.step());
|
|
385
|
+
if (event.key === "Home") return "min";
|
|
386
|
+
if (event.key === "End") return "max";
|
|
387
|
+
if (this.orientation() === "horizontal") {
|
|
388
|
+
if (event.key === "ArrowLeft") return -step;
|
|
389
|
+
if (event.key === "ArrowRight") return step;
|
|
390
|
+
} else {
|
|
391
|
+
if (event.key === "ArrowUp") return -step;
|
|
392
|
+
if (event.key === "ArrowDown") return step;
|
|
393
|
+
}
|
|
394
|
+
return null;
|
|
395
|
+
}
|
|
396
|
+
pointerCoordinate(event) {
|
|
397
|
+
return this.orientation() === "horizontal" ? event.clientX : event.clientY;
|
|
398
|
+
}
|
|
399
|
+
containerPixelSize() {
|
|
400
|
+
const rect = this.root()?.nativeElement.getBoundingClientRect();
|
|
401
|
+
return this.orientation() === "horizontal" ? rect?.width ?? 0 : rect?.height ?? 0;
|
|
402
|
+
}
|
|
403
|
+
sameSizes(left, right) {
|
|
404
|
+
return left.length === right.length && left.every((value, index) => Math.abs(value - (right[index] ?? 0)) < .001);
|
|
405
|
+
}
|
|
406
|
+
clampPercent(value) {
|
|
407
|
+
return clamp(Number.isFinite(value) ? value : 0, 0, 100);
|
|
408
|
+
}
|
|
409
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
410
|
+
minVersion: "12.0.0",
|
|
411
|
+
version: "22.2.3",
|
|
412
|
+
ngImport: i0,
|
|
413
|
+
type: AerisSplitter,
|
|
414
|
+
deps: [],
|
|
415
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
416
|
+
});
|
|
417
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
418
|
+
minVersion: "17.0.0",
|
|
419
|
+
version: "22.2.3",
|
|
420
|
+
type: AerisSplitter,
|
|
421
|
+
isStandalone: true,
|
|
422
|
+
selector: "aeris-splitter",
|
|
423
|
+
inputs: {
|
|
424
|
+
sizes: {
|
|
425
|
+
classPropertyName: "sizes",
|
|
426
|
+
publicName: "sizes",
|
|
427
|
+
isSignal: true,
|
|
428
|
+
isRequired: false,
|
|
429
|
+
transformFunction: null
|
|
430
|
+
},
|
|
431
|
+
orientation: {
|
|
432
|
+
classPropertyName: "orientation",
|
|
433
|
+
publicName: "orientation",
|
|
434
|
+
isSignal: true,
|
|
435
|
+
isRequired: false,
|
|
436
|
+
transformFunction: null
|
|
437
|
+
},
|
|
438
|
+
variant: {
|
|
439
|
+
classPropertyName: "variant",
|
|
440
|
+
publicName: "variant",
|
|
441
|
+
isSignal: true,
|
|
442
|
+
isRequired: false,
|
|
443
|
+
transformFunction: null
|
|
444
|
+
},
|
|
445
|
+
size: {
|
|
446
|
+
classPropertyName: "size",
|
|
447
|
+
publicName: "size",
|
|
448
|
+
isSignal: true,
|
|
449
|
+
isRequired: false,
|
|
450
|
+
transformFunction: null
|
|
451
|
+
},
|
|
452
|
+
showHandle: {
|
|
453
|
+
classPropertyName: "showHandle",
|
|
454
|
+
publicName: "showHandle",
|
|
455
|
+
isSignal: true,
|
|
456
|
+
isRequired: false,
|
|
457
|
+
transformFunction: null
|
|
458
|
+
},
|
|
459
|
+
disabled: {
|
|
460
|
+
classPropertyName: "disabled",
|
|
461
|
+
publicName: "disabled",
|
|
462
|
+
isSignal: true,
|
|
463
|
+
isRequired: false,
|
|
464
|
+
transformFunction: null
|
|
465
|
+
},
|
|
466
|
+
fluid: {
|
|
467
|
+
classPropertyName: "fluid",
|
|
468
|
+
publicName: "fluid",
|
|
469
|
+
isSignal: true,
|
|
470
|
+
isRequired: false,
|
|
471
|
+
transformFunction: null
|
|
472
|
+
},
|
|
473
|
+
step: {
|
|
474
|
+
classPropertyName: "step",
|
|
475
|
+
publicName: "step",
|
|
476
|
+
isSignal: true,
|
|
477
|
+
isRequired: false,
|
|
478
|
+
transformFunction: null
|
|
479
|
+
},
|
|
480
|
+
height: {
|
|
481
|
+
classPropertyName: "height",
|
|
482
|
+
publicName: "height",
|
|
483
|
+
isSignal: true,
|
|
484
|
+
isRequired: false,
|
|
485
|
+
transformFunction: null
|
|
486
|
+
},
|
|
487
|
+
minHeight: {
|
|
488
|
+
classPropertyName: "minHeight",
|
|
489
|
+
publicName: "minHeight",
|
|
490
|
+
isSignal: true,
|
|
491
|
+
isRequired: false,
|
|
492
|
+
transformFunction: null
|
|
493
|
+
},
|
|
494
|
+
maxHeight: {
|
|
495
|
+
classPropertyName: "maxHeight",
|
|
496
|
+
publicName: "maxHeight",
|
|
497
|
+
isSignal: true,
|
|
498
|
+
isRequired: false,
|
|
499
|
+
transformFunction: null
|
|
500
|
+
},
|
|
501
|
+
width: {
|
|
502
|
+
classPropertyName: "width",
|
|
503
|
+
publicName: "width",
|
|
504
|
+
isSignal: true,
|
|
505
|
+
isRequired: false,
|
|
506
|
+
transformFunction: null
|
|
507
|
+
},
|
|
508
|
+
maxWidth: {
|
|
509
|
+
classPropertyName: "maxWidth",
|
|
510
|
+
publicName: "maxWidth",
|
|
511
|
+
isSignal: true,
|
|
512
|
+
isRequired: false,
|
|
513
|
+
transformFunction: null
|
|
514
|
+
},
|
|
515
|
+
role: {
|
|
516
|
+
classPropertyName: "role",
|
|
517
|
+
publicName: "role",
|
|
518
|
+
isSignal: true,
|
|
519
|
+
isRequired: false,
|
|
520
|
+
transformFunction: null
|
|
521
|
+
},
|
|
522
|
+
ariaLabel: {
|
|
523
|
+
classPropertyName: "ariaLabel",
|
|
524
|
+
publicName: "ariaLabel",
|
|
525
|
+
isSignal: true,
|
|
526
|
+
isRequired: false,
|
|
527
|
+
transformFunction: null
|
|
528
|
+
},
|
|
529
|
+
ariaLabelledBy: {
|
|
530
|
+
classPropertyName: "ariaLabelledBy",
|
|
531
|
+
publicName: "ariaLabelledBy",
|
|
532
|
+
isSignal: true,
|
|
533
|
+
isRequired: false,
|
|
534
|
+
transformFunction: null
|
|
535
|
+
},
|
|
536
|
+
ariaDescribedBy: {
|
|
537
|
+
classPropertyName: "ariaDescribedBy",
|
|
538
|
+
publicName: "ariaDescribedBy",
|
|
539
|
+
isSignal: true,
|
|
540
|
+
isRequired: false,
|
|
541
|
+
transformFunction: null
|
|
542
|
+
},
|
|
543
|
+
separatorLabel: {
|
|
544
|
+
classPropertyName: "separatorLabel",
|
|
545
|
+
publicName: "separatorLabel",
|
|
546
|
+
isSignal: true,
|
|
547
|
+
isRequired: false,
|
|
548
|
+
transformFunction: null
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
outputs: {
|
|
552
|
+
sizes: "sizesChange",
|
|
553
|
+
resizeStart: "resizeStart",
|
|
554
|
+
resized: "resized",
|
|
555
|
+
resizeEnd: "resizeEnd"
|
|
556
|
+
},
|
|
557
|
+
host: {
|
|
558
|
+
properties: {
|
|
559
|
+
"attr.data-orientation": "orientation()",
|
|
560
|
+
"attr.data-variant": "variant()",
|
|
561
|
+
"attr.data-size": "size()",
|
|
562
|
+
"attr.data-show-handle": "showHandle()",
|
|
563
|
+
"attr.data-disabled": "disabled() || null",
|
|
564
|
+
"attr.data-dragging": "activeHandle() !== null || null",
|
|
565
|
+
"attr.data-fluid": "fluid() || null",
|
|
566
|
+
"style.block-size": "height() || null",
|
|
567
|
+
"style.min-block-size": "minHeight() || null",
|
|
568
|
+
"style.max-block-size": "maxHeight() || null",
|
|
569
|
+
"style.inline-size": "width() || null",
|
|
570
|
+
"style.max-inline-size": "maxWidth() || null"
|
|
571
|
+
},
|
|
572
|
+
classAttribute: "aeris-splitter"
|
|
573
|
+
},
|
|
574
|
+
queries: [{
|
|
575
|
+
propertyName: "discoveredPanels",
|
|
576
|
+
predicate: AerisSplitterPanel,
|
|
577
|
+
descendants: true,
|
|
578
|
+
isSignal: true
|
|
579
|
+
}],
|
|
580
|
+
viewQueries: [{
|
|
581
|
+
propertyName: "root",
|
|
582
|
+
first: true,
|
|
583
|
+
predicate: ["root"],
|
|
584
|
+
descendants: true,
|
|
585
|
+
isSignal: true
|
|
586
|
+
}, {
|
|
587
|
+
propertyName: "gutters",
|
|
588
|
+
predicate: ["gutter"],
|
|
589
|
+
descendants: true,
|
|
590
|
+
isSignal: true
|
|
591
|
+
}],
|
|
592
|
+
ngImport: i0,
|
|
593
|
+
template: `
|
|
326
594
|
<div class="aeris-splitter__panel-source" aria-hidden="true">
|
|
327
595
|
<ng-content />
|
|
328
596
|
</div>
|
|
@@ -366,7 +634,11 @@ class AerisSplitter {
|
|
|
366
634
|
tabindex="0"
|
|
367
635
|
[id]="handleStates()[state.index]?.id"
|
|
368
636
|
[attr.aria-label]="separatorLabel()"
|
|
369
|
-
[attr.aria-controls]="
|
|
637
|
+
[attr.aria-controls]="
|
|
638
|
+
handleStates()[state.index]?.currentPanelId +
|
|
639
|
+
' ' +
|
|
640
|
+
handleStates()[state.index]?.nextPanelId
|
|
641
|
+
"
|
|
370
642
|
[attr.aria-orientation]="orientation()"
|
|
371
643
|
[attr.aria-valuemin]="handleStates()[state.index]?.min"
|
|
372
644
|
[attr.aria-valuemax]="handleStates()[state.index]?.max"
|
|
@@ -378,16 +650,39 @@ class AerisSplitter {
|
|
|
378
650
|
(pointerdown)="handlePointerDown($event, state.index)"
|
|
379
651
|
(keydown)="handleGutterKeydown($event, state.index)"
|
|
380
652
|
>
|
|
381
|
-
|
|
653
|
+
@if (showHandle()) {
|
|
654
|
+
<span class="aeris-splitter__handle" aria-hidden="true"></span>
|
|
655
|
+
}
|
|
382
656
|
</div>
|
|
383
657
|
}
|
|
384
658
|
}
|
|
385
659
|
</div>
|
|
386
|
-
`,
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
660
|
+
`,
|
|
661
|
+
isInline: true,
|
|
662
|
+
styles: [":host{display:block;min-inline-size:0;min-block-size:0}:host([data-fluid=true]){inline-size:100%}.aeris-splitter__panel-source{display:none}.aeris-splitter__root{display:flex;block-size:100%;min-inline-size:0;min-block-size:0;border:var(--aeris-splitter-border-width, 1px) solid var(--aeris-splitter-border, var(--aeris-border));border-radius:var(--aeris-splitter-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-splitter-background, var(--aeris-surface, #fff));color:var(--aeris-splitter-color, var(--aeris-text, #111111));box-shadow:var(--aeris-splitter-shadow, none);overflow:hidden}:host([data-orientation=vertical])>.aeris-splitter__root{flex-direction:column;min-block-size:var(--aeris-splitter-min-height, 18rem)}:host([data-orientation=horizontal])>.aeris-splitter__root{flex-direction:row}:host([data-variant=filled])>.aeris-splitter__root{background:var(--aeris-splitter-filled-background, color-mix(in srgb, var(--aeris-surface-2, #f3f3f3) 72%, var(--aeris-surface, #fff)))}:host([data-variant=plain])>.aeris-splitter__root{border-color:transparent;border-radius:0;background:transparent;box-shadow:none}.aeris-splitter__panel{box-sizing:border-box;min-inline-size:0;min-block-size:0;flex:1 1 0;overflow:hidden;background:var(--aeris-splitter-panel-background, transparent);color:var(--aeris-splitter-panel-color, var(--aeris-text-2, #454545))}.aeris-splitter__panel-content{box-sizing:border-box;inline-size:100%;block-size:100%;min-inline-size:0;min-block-size:0;overflow:auto;padding:var(--aeris-splitter-panel-padding, 1rem);scrollbar-width:thin}.aeris-splitter__panel-content>:first-child{margin-block-start:0}.aeris-splitter__panel-content>:last-child{margin-block-end:0}.aeris-splitter__gutter{--aeris-splitter-gutter-current-size: var(--aeris-splitter-gutter-size, .75rem);position:relative;z-index:1;display:grid;flex:0 0 var(--aeris-splitter-gutter-current-size);place-items:center;background:var(--aeris-splitter-gutter-background, transparent);outline:none;touch-action:none;transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-splitter__gutter:before{position:absolute;inset:0;content:\"\"}.aeris-splitter__gutter:after{position:absolute;inset:0;display:block;margin:auto;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-splitter-divider-color, var(--aeris-border, color-mix(in srgb, var(--aeris-border, #efefef) 86%, transparent)));content:\"\"}:host([data-orientation=horizontal])>.aeris-splitter__root>.aeris-splitter__gutter{inline-size:var(--aeris-splitter-gutter-current-size);margin-inline:calc(var(--aeris-splitter-gutter-current-size) / -2);cursor:col-resize}:host([data-orientation=horizontal])>.aeris-splitter__root>.aeris-splitter__gutter:after{inline-size:var(--aeris-splitter-divider-thickness, 1px);block-size:100%}:host([data-orientation=vertical])>.aeris-splitter__root>.aeris-splitter__gutter{block-size:var(--aeris-splitter-gutter-current-size);margin-block:calc(var(--aeris-splitter-gutter-current-size) / -2);cursor:row-resize}:host([data-orientation=vertical])>.aeris-splitter__root>.aeris-splitter__gutter:after{inline-size:100%;block-size:var(--aeris-splitter-divider-thickness, 1px)}.aeris-splitter__gutter:focus-visible,.aeris-splitter__gutter[data-active]{background:var(--aeris-splitter-gutter-hover-background, transparent)}@media(hover:hover){.aeris-splitter__gutter:hover:not([data-disabled]){background:var(--aeris-splitter-gutter-hover-background, transparent)}}.aeris-splitter__gutter:focus-visible{box-shadow:inset 0 0 0 2px var(--aeris-splitter-focus-ring, var(--aeris-focus, var(--aeris-primary, #111111)))}.aeris-splitter__gutter[data-disabled]{cursor:default;opacity:.58}.aeris-splitter__handle{position:absolute;inset:0;margin:auto;z-index:1;display:block;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-splitter-handle-color, color-mix(in srgb, var(--aeris-text, #111111) 28%, transparent));transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}:host([data-orientation=horizontal])>.aeris-splitter__root>.aeris-splitter__gutter>.aeris-splitter__handle{inline-size:var(--aeris-splitter-handle-thickness, .1875rem);block-size:var(--aeris-splitter-handle-length, 2rem)}:host([data-orientation=vertical])>.aeris-splitter__root>.aeris-splitter__gutter>.aeris-splitter__handle{inline-size:var(--aeris-splitter-handle-length, 2rem);block-size:var(--aeris-splitter-handle-thickness, .1875rem)}.aeris-splitter__gutter:focus-visible .aeris-splitter__handle,.aeris-splitter__gutter[data-active] .aeris-splitter__handle{background:var(--aeris-splitter-handle-hover-color, var(--aeris-primary-text, #111111))}@media(hover:hover){.aeris-splitter__gutter:hover:not([data-disabled]) .aeris-splitter__handle{background:var(--aeris-splitter-handle-hover-color, var(--aeris-primary-text, #111111))}}:host([data-size=sm])>.aeris-splitter__root>.aeris-splitter__panel>.aeris-splitter__panel-content{padding:var(--aeris-splitter-panel-padding-sm, .75rem)}:host([data-size=sm])>.aeris-splitter__root>.aeris-splitter__gutter{--aeris-splitter-gutter-current-size: var(--aeris-splitter-gutter-size-sm, .625rem)}:host([data-size=lg])>.aeris-splitter__root>.aeris-splitter__panel>.aeris-splitter__panel-content{padding:var(--aeris-splitter-panel-padding-lg, 1.25rem)}:host([data-size=lg])>.aeris-splitter__root>.aeris-splitter__gutter{--aeris-splitter-gutter-current-size: var(--aeris-splitter-gutter-size-lg, .875rem)}:host([data-orientation=horizontal][data-size=sm])>.aeris-splitter__root>.aeris-splitter__gutter{inline-size:var(--aeris-splitter-gutter-current-size)}:host([data-orientation=vertical][data-size=sm])>.aeris-splitter__root>.aeris-splitter__gutter{block-size:var(--aeris-splitter-gutter-current-size)}:host([data-orientation=horizontal][data-size=lg])>.aeris-splitter__root>.aeris-splitter__gutter{inline-size:var(--aeris-splitter-gutter-current-size)}:host([data-orientation=vertical][data-size=lg])>.aeris-splitter__root>.aeris-splitter__gutter{block-size:var(--aeris-splitter-gutter-current-size)}:host([data-disabled=true])>.aeris-splitter__root>.aeris-splitter__gutter{cursor:default}:host([data-dragging=true]){-webkit-user-select:none;user-select:none}@media(max-width:42rem){.aeris-splitter__root{min-inline-size:0}.aeris-splitter__panel-content{padding:var(--aeris-splitter-panel-padding-mobile, .875rem)}}@media(prefers-reduced-motion:reduce){.aeris-splitter__gutter,.aeris-splitter__handle{transition:none}}\n"],
|
|
663
|
+
dependencies: [{
|
|
664
|
+
kind: "directive",
|
|
665
|
+
type: NgTemplateOutlet,
|
|
666
|
+
selector: "[ngTemplateOutlet]",
|
|
667
|
+
inputs: [
|
|
668
|
+
"ngTemplateOutletContext",
|
|
669
|
+
"ngTemplateOutlet",
|
|
670
|
+
"ngTemplateOutletInjector"
|
|
671
|
+
]
|
|
672
|
+
}]
|
|
673
|
+
});
|
|
674
|
+
};
|
|
675
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
676
|
+
minVersion: "12.0.0",
|
|
677
|
+
version: "22.2.3",
|
|
678
|
+
ngImport: i0,
|
|
679
|
+
type: AerisSplitter,
|
|
680
|
+
decorators: [{
|
|
681
|
+
type: Component,
|
|
682
|
+
args: [{
|
|
683
|
+
selector: "aeris-splitter",
|
|
684
|
+
imports: [NgTemplateOutlet],
|
|
685
|
+
template: `
|
|
391
686
|
<div class="aeris-splitter__panel-source" aria-hidden="true">
|
|
392
687
|
<ng-content />
|
|
393
688
|
</div>
|
|
@@ -431,7 +726,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
431
726
|
tabindex="0"
|
|
432
727
|
[id]="handleStates()[state.index]?.id"
|
|
433
728
|
[attr.aria-label]="separatorLabel()"
|
|
434
|
-
[attr.aria-controls]="
|
|
729
|
+
[attr.aria-controls]="
|
|
730
|
+
handleStates()[state.index]?.currentPanelId +
|
|
731
|
+
' ' +
|
|
732
|
+
handleStates()[state.index]?.nextPanelId
|
|
733
|
+
"
|
|
435
734
|
[attr.aria-orientation]="orientation()"
|
|
436
735
|
[attr.aria-valuemin]="handleStates()[state.index]?.min"
|
|
437
736
|
[attr.aria-valuemax]="handleStates()[state.index]?.max"
|
|
@@ -443,46 +742,222 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
443
742
|
(pointerdown)="handlePointerDown($event, state.index)"
|
|
444
743
|
(keydown)="handleGutterKeydown($event, state.index)"
|
|
445
744
|
>
|
|
446
|
-
|
|
745
|
+
@if (showHandle()) {
|
|
746
|
+
<span class="aeris-splitter__handle" aria-hidden="true"></span>
|
|
747
|
+
}
|
|
447
748
|
</div>
|
|
448
749
|
}
|
|
449
750
|
}
|
|
450
751
|
</div>
|
|
451
|
-
`,
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
752
|
+
`,
|
|
753
|
+
host: {
|
|
754
|
+
class: "aeris-splitter",
|
|
755
|
+
"[attr.data-orientation]": "orientation()",
|
|
756
|
+
"[attr.data-variant]": "variant()",
|
|
757
|
+
"[attr.data-size]": "size()",
|
|
758
|
+
"[attr.data-show-handle]": "showHandle()",
|
|
759
|
+
"[attr.data-disabled]": "disabled() || null",
|
|
760
|
+
"[attr.data-dragging]": "activeHandle() !== null || null",
|
|
761
|
+
"[attr.data-fluid]": "fluid() || null",
|
|
762
|
+
"[style.block-size]": "height() || null",
|
|
763
|
+
"[style.min-block-size]": "minHeight() || null",
|
|
764
|
+
"[style.max-block-size]": "maxHeight() || null",
|
|
765
|
+
"[style.inline-size]": "width() || null",
|
|
766
|
+
"[style.max-inline-size]": "maxWidth() || null"
|
|
767
|
+
},
|
|
768
|
+
styles: [":host{display:block;min-inline-size:0;min-block-size:0}:host([data-fluid=true]){inline-size:100%}.aeris-splitter__panel-source{display:none}.aeris-splitter__root{display:flex;block-size:100%;min-inline-size:0;min-block-size:0;border:var(--aeris-splitter-border-width, 1px) solid var(--aeris-splitter-border, var(--aeris-border));border-radius:var(--aeris-splitter-radius, var(--aeris-radius-surface, var(--aeris-radius-lg, .75rem)));background:var(--aeris-splitter-background, var(--aeris-surface, #fff));color:var(--aeris-splitter-color, var(--aeris-text, #111111));box-shadow:var(--aeris-splitter-shadow, none);overflow:hidden}:host([data-orientation=vertical])>.aeris-splitter__root{flex-direction:column;min-block-size:var(--aeris-splitter-min-height, 18rem)}:host([data-orientation=horizontal])>.aeris-splitter__root{flex-direction:row}:host([data-variant=filled])>.aeris-splitter__root{background:var(--aeris-splitter-filled-background, color-mix(in srgb, var(--aeris-surface-2, #f3f3f3) 72%, var(--aeris-surface, #fff)))}:host([data-variant=plain])>.aeris-splitter__root{border-color:transparent;border-radius:0;background:transparent;box-shadow:none}.aeris-splitter__panel{box-sizing:border-box;min-inline-size:0;min-block-size:0;flex:1 1 0;overflow:hidden;background:var(--aeris-splitter-panel-background, transparent);color:var(--aeris-splitter-panel-color, var(--aeris-text-2, #454545))}.aeris-splitter__panel-content{box-sizing:border-box;inline-size:100%;block-size:100%;min-inline-size:0;min-block-size:0;overflow:auto;padding:var(--aeris-splitter-panel-padding, 1rem);scrollbar-width:thin}.aeris-splitter__panel-content>:first-child{margin-block-start:0}.aeris-splitter__panel-content>:last-child{margin-block-end:0}.aeris-splitter__gutter{--aeris-splitter-gutter-current-size: var(--aeris-splitter-gutter-size, .75rem);position:relative;z-index:1;display:grid;flex:0 0 var(--aeris-splitter-gutter-current-size);place-items:center;background:var(--aeris-splitter-gutter-background, transparent);outline:none;touch-action:none;transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-splitter__gutter:before{position:absolute;inset:0;content:\"\"}.aeris-splitter__gutter:after{position:absolute;inset:0;display:block;margin:auto;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-splitter-divider-color, var(--aeris-border, color-mix(in srgb, var(--aeris-border, #efefef) 86%, transparent)));content:\"\"}:host([data-orientation=horizontal])>.aeris-splitter__root>.aeris-splitter__gutter{inline-size:var(--aeris-splitter-gutter-current-size);margin-inline:calc(var(--aeris-splitter-gutter-current-size) / -2);cursor:col-resize}:host([data-orientation=horizontal])>.aeris-splitter__root>.aeris-splitter__gutter:after{inline-size:var(--aeris-splitter-divider-thickness, 1px);block-size:100%}:host([data-orientation=vertical])>.aeris-splitter__root>.aeris-splitter__gutter{block-size:var(--aeris-splitter-gutter-current-size);margin-block:calc(var(--aeris-splitter-gutter-current-size) / -2);cursor:row-resize}:host([data-orientation=vertical])>.aeris-splitter__root>.aeris-splitter__gutter:after{inline-size:100%;block-size:var(--aeris-splitter-divider-thickness, 1px)}.aeris-splitter__gutter:focus-visible,.aeris-splitter__gutter[data-active]{background:var(--aeris-splitter-gutter-hover-background, transparent)}@media(hover:hover){.aeris-splitter__gutter:hover:not([data-disabled]){background:var(--aeris-splitter-gutter-hover-background, transparent)}}.aeris-splitter__gutter:focus-visible{box-shadow:inset 0 0 0 2px var(--aeris-splitter-focus-ring, var(--aeris-focus, var(--aeris-primary, #111111)))}.aeris-splitter__gutter[data-disabled]{cursor:default;opacity:.58}.aeris-splitter__handle{position:absolute;inset:0;margin:auto;z-index:1;display:block;border-radius:var(--aeris-radius-pill, 999px);background:var(--aeris-splitter-handle-color, color-mix(in srgb, var(--aeris-text, #111111) 28%, transparent));transition:background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}:host([data-orientation=horizontal])>.aeris-splitter__root>.aeris-splitter__gutter>.aeris-splitter__handle{inline-size:var(--aeris-splitter-handle-thickness, .1875rem);block-size:var(--aeris-splitter-handle-length, 2rem)}:host([data-orientation=vertical])>.aeris-splitter__root>.aeris-splitter__gutter>.aeris-splitter__handle{inline-size:var(--aeris-splitter-handle-length, 2rem);block-size:var(--aeris-splitter-handle-thickness, .1875rem)}.aeris-splitter__gutter:focus-visible .aeris-splitter__handle,.aeris-splitter__gutter[data-active] .aeris-splitter__handle{background:var(--aeris-splitter-handle-hover-color, var(--aeris-primary-text, #111111))}@media(hover:hover){.aeris-splitter__gutter:hover:not([data-disabled]) .aeris-splitter__handle{background:var(--aeris-splitter-handle-hover-color, var(--aeris-primary-text, #111111))}}:host([data-size=sm])>.aeris-splitter__root>.aeris-splitter__panel>.aeris-splitter__panel-content{padding:var(--aeris-splitter-panel-padding-sm, .75rem)}:host([data-size=sm])>.aeris-splitter__root>.aeris-splitter__gutter{--aeris-splitter-gutter-current-size: var(--aeris-splitter-gutter-size-sm, .625rem)}:host([data-size=lg])>.aeris-splitter__root>.aeris-splitter__panel>.aeris-splitter__panel-content{padding:var(--aeris-splitter-panel-padding-lg, 1.25rem)}:host([data-size=lg])>.aeris-splitter__root>.aeris-splitter__gutter{--aeris-splitter-gutter-current-size: var(--aeris-splitter-gutter-size-lg, .875rem)}:host([data-orientation=horizontal][data-size=sm])>.aeris-splitter__root>.aeris-splitter__gutter{inline-size:var(--aeris-splitter-gutter-current-size)}:host([data-orientation=vertical][data-size=sm])>.aeris-splitter__root>.aeris-splitter__gutter{block-size:var(--aeris-splitter-gutter-current-size)}:host([data-orientation=horizontal][data-size=lg])>.aeris-splitter__root>.aeris-splitter__gutter{inline-size:var(--aeris-splitter-gutter-current-size)}:host([data-orientation=vertical][data-size=lg])>.aeris-splitter__root>.aeris-splitter__gutter{block-size:var(--aeris-splitter-gutter-current-size)}:host([data-disabled=true])>.aeris-splitter__root>.aeris-splitter__gutter{cursor:default}:host([data-dragging=true]){-webkit-user-select:none;user-select:none}@media(max-width:42rem){.aeris-splitter__root{min-inline-size:0}.aeris-splitter__panel-content{padding:var(--aeris-splitter-panel-padding-mobile, .875rem)}}@media(prefers-reduced-motion:reduce){.aeris-splitter__gutter,.aeris-splitter__handle{transition:none}}\n"]
|
|
769
|
+
}]
|
|
770
|
+
}],
|
|
771
|
+
ctorParameters: () => [],
|
|
772
|
+
propDecorators: {
|
|
773
|
+
root: [{
|
|
774
|
+
type: i0.ViewChild,
|
|
775
|
+
args: ["root", { isSignal: true }]
|
|
776
|
+
}],
|
|
777
|
+
sizes: [{
|
|
778
|
+
type: i0.Input,
|
|
779
|
+
args: [{
|
|
780
|
+
isSignal: true,
|
|
781
|
+
alias: "sizes",
|
|
782
|
+
required: false
|
|
783
|
+
}]
|
|
784
|
+
}, {
|
|
785
|
+
type: i0.Output,
|
|
786
|
+
args: ["sizesChange"]
|
|
787
|
+
}],
|
|
788
|
+
orientation: [{
|
|
789
|
+
type: i0.Input,
|
|
790
|
+
args: [{
|
|
791
|
+
isSignal: true,
|
|
792
|
+
alias: "orientation",
|
|
793
|
+
required: false
|
|
794
|
+
}]
|
|
795
|
+
}],
|
|
796
|
+
variant: [{
|
|
797
|
+
type: i0.Input,
|
|
798
|
+
args: [{
|
|
799
|
+
isSignal: true,
|
|
800
|
+
alias: "variant",
|
|
801
|
+
required: false
|
|
802
|
+
}]
|
|
803
|
+
}],
|
|
804
|
+
size: [{
|
|
805
|
+
type: i0.Input,
|
|
806
|
+
args: [{
|
|
807
|
+
isSignal: true,
|
|
808
|
+
alias: "size",
|
|
809
|
+
required: false
|
|
810
|
+
}]
|
|
811
|
+
}],
|
|
812
|
+
showHandle: [{
|
|
813
|
+
type: i0.Input,
|
|
814
|
+
args: [{
|
|
815
|
+
isSignal: true,
|
|
816
|
+
alias: "showHandle",
|
|
817
|
+
required: false
|
|
818
|
+
}]
|
|
819
|
+
}],
|
|
820
|
+
disabled: [{
|
|
821
|
+
type: i0.Input,
|
|
822
|
+
args: [{
|
|
823
|
+
isSignal: true,
|
|
824
|
+
alias: "disabled",
|
|
825
|
+
required: false
|
|
826
|
+
}]
|
|
827
|
+
}],
|
|
828
|
+
fluid: [{
|
|
829
|
+
type: i0.Input,
|
|
830
|
+
args: [{
|
|
831
|
+
isSignal: true,
|
|
832
|
+
alias: "fluid",
|
|
833
|
+
required: false
|
|
834
|
+
}]
|
|
835
|
+
}],
|
|
836
|
+
step: [{
|
|
837
|
+
type: i0.Input,
|
|
838
|
+
args: [{
|
|
839
|
+
isSignal: true,
|
|
840
|
+
alias: "step",
|
|
841
|
+
required: false
|
|
842
|
+
}]
|
|
843
|
+
}],
|
|
844
|
+
height: [{
|
|
845
|
+
type: i0.Input,
|
|
846
|
+
args: [{
|
|
847
|
+
isSignal: true,
|
|
848
|
+
alias: "height",
|
|
849
|
+
required: false
|
|
850
|
+
}]
|
|
851
|
+
}],
|
|
852
|
+
minHeight: [{
|
|
853
|
+
type: i0.Input,
|
|
854
|
+
args: [{
|
|
855
|
+
isSignal: true,
|
|
856
|
+
alias: "minHeight",
|
|
857
|
+
required: false
|
|
858
|
+
}]
|
|
859
|
+
}],
|
|
860
|
+
maxHeight: [{
|
|
861
|
+
type: i0.Input,
|
|
862
|
+
args: [{
|
|
863
|
+
isSignal: true,
|
|
864
|
+
alias: "maxHeight",
|
|
865
|
+
required: false
|
|
866
|
+
}]
|
|
867
|
+
}],
|
|
868
|
+
width: [{
|
|
869
|
+
type: i0.Input,
|
|
870
|
+
args: [{
|
|
871
|
+
isSignal: true,
|
|
872
|
+
alias: "width",
|
|
873
|
+
required: false
|
|
874
|
+
}]
|
|
875
|
+
}],
|
|
876
|
+
maxWidth: [{
|
|
877
|
+
type: i0.Input,
|
|
878
|
+
args: [{
|
|
879
|
+
isSignal: true,
|
|
880
|
+
alias: "maxWidth",
|
|
881
|
+
required: false
|
|
882
|
+
}]
|
|
883
|
+
}],
|
|
884
|
+
role: [{
|
|
885
|
+
type: i0.Input,
|
|
886
|
+
args: [{
|
|
887
|
+
isSignal: true,
|
|
888
|
+
alias: "role",
|
|
889
|
+
required: false
|
|
890
|
+
}]
|
|
891
|
+
}],
|
|
892
|
+
ariaLabel: [{
|
|
893
|
+
type: i0.Input,
|
|
894
|
+
args: [{
|
|
895
|
+
isSignal: true,
|
|
896
|
+
alias: "ariaLabel",
|
|
897
|
+
required: false
|
|
898
|
+
}]
|
|
899
|
+
}],
|
|
900
|
+
ariaLabelledBy: [{
|
|
901
|
+
type: i0.Input,
|
|
902
|
+
args: [{
|
|
903
|
+
isSignal: true,
|
|
904
|
+
alias: "ariaLabelledBy",
|
|
905
|
+
required: false
|
|
906
|
+
}]
|
|
907
|
+
}],
|
|
908
|
+
ariaDescribedBy: [{
|
|
909
|
+
type: i0.Input,
|
|
910
|
+
args: [{
|
|
911
|
+
isSignal: true,
|
|
912
|
+
alias: "ariaDescribedBy",
|
|
913
|
+
required: false
|
|
914
|
+
}]
|
|
915
|
+
}],
|
|
916
|
+
separatorLabel: [{
|
|
917
|
+
type: i0.Input,
|
|
918
|
+
args: [{
|
|
919
|
+
isSignal: true,
|
|
920
|
+
alias: "separatorLabel",
|
|
921
|
+
required: false
|
|
922
|
+
}]
|
|
923
|
+
}],
|
|
924
|
+
resizeStart: [{
|
|
925
|
+
type: i0.Output,
|
|
926
|
+
args: ["resizeStart"]
|
|
927
|
+
}],
|
|
928
|
+
resized: [{
|
|
929
|
+
type: i0.Output,
|
|
930
|
+
args: ["resized"]
|
|
931
|
+
}],
|
|
932
|
+
resizeEnd: [{
|
|
933
|
+
type: i0.Output,
|
|
934
|
+
args: ["resizeEnd"]
|
|
935
|
+
}],
|
|
936
|
+
discoveredPanels: [{
|
|
937
|
+
type: i0.ContentChildren,
|
|
938
|
+
args: [i0.forwardRef(() => AerisSplitterPanel), {
|
|
939
|
+
descendants: true,
|
|
940
|
+
isSignal: true
|
|
941
|
+
}]
|
|
942
|
+
}],
|
|
943
|
+
gutters: [{
|
|
944
|
+
type: i0.ViewChildren,
|
|
945
|
+
args: ["gutter", { isSignal: true }]
|
|
946
|
+
}]
|
|
947
|
+
}
|
|
948
|
+
});
|
|
469
949
|
function nullableNumberAttribute(value) {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
return Number.isFinite(parsed) ? parsed : null;
|
|
950
|
+
if (value === null || value === void 0 || value === "") return null;
|
|
951
|
+
const parsed = Number(value);
|
|
952
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
474
953
|
}
|
|
475
954
|
function clamp(value, min, max) {
|
|
476
|
-
|
|
955
|
+
return Math.min(Math.max(value, min), max);
|
|
477
956
|
}
|
|
478
957
|
function roundSize(value) {
|
|
479
|
-
|
|
958
|
+
return Math.round(value * 1e3) / 1e3;
|
|
480
959
|
}
|
|
481
960
|
const AerisSplitterModule = [AerisSplitter, AerisSplitterPanel];
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Generated bundle index. Do not edit.
|
|
485
|
-
*/
|
|
486
|
-
|
|
487
961
|
export { AerisSplitter, AerisSplitterModule, AerisSplitterPanel };
|
|
488
|
-
|
|
962
|
+
|
|
963
|
+
//# sourceMappingURL=aeris-ui-core-splitter.mjs.map
|