@pgcorp/ui-kit 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1055 -31
- package/dist/assets/src/components/layout/SDockRegion.vue_vue_type_style_index_0_scoped_a1f403e2_lang.css +1 -0
- package/dist/assets/src/components/layout/{SResizeHandle.vue_vue_type_style_index_0_scoped_90cc655e_lang.css → SResizeHandle.vue_vue_type_style_index_0_scoped_dc65aba1_lang.css} +1 -1
- package/dist/assets/src/components/layout/{SWorkbenchPanelShell.css_vue_type_style_index_0_src_1030a231_scoped_1030a231_lang.css → SWorkbenchPanelShell.css_vue_type_style_index_0_src_f9faa52a_scoped_f9faa52a_lang.css} +1 -1
- package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_a108e8f1_scoped_a108e8f1_lang.css +2 -0
- package/dist/assets/src/components/shared/_internal/{SListboxGroup.css_vue_type_style_index_0_src_518787d3_scoped_518787d3_lang.css → SListboxGroup.css_vue_type_style_index_0_src_00060944_scoped_00060944_lang.css} +1 -1
- package/dist/assets/src/components/shared/_internal/SMenuLayer.css_vue_type_style_index_0_src_e478164c_scoped_e478164c_lang.css +1 -0
- package/dist/assets/src/components/shared/containers/{SCollapsiblePanel.css_vue_type_style_index_0_src_71824088_scoped_71824088_lang.css → SCollapsiblePanel.css_vue_type_style_index_0_src_db85261d_scoped_db85261d_lang.css} +1 -1
- package/dist/assets/src/components/shared/containers/SOverlayHost.css_vue_type_style_index_0_src_09215628_scoped_09215628_lang.css +2 -0
- package/dist/assets/src/components/shared/containers/SPopover.css_vue_type_style_index_0_src_a4f1f64a_scoped_a4f1f64a_lang.css +2 -0
- package/dist/assets/src/components/shared/containers/{SSidebarGroup.css_vue_type_style_index_0_src_3e8bc2d7_scoped_3e8bc2d7_lang.css → SSidebarGroup.css_vue_type_style_index_0_src_5b1eeb6c_scoped_5b1eeb6c_lang.css} +1 -1
- package/dist/assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_52396e42_scoped_52396e42_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_7a5acda9_scoped_7a5acda9_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_2562f916_scoped_2562f916_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SCombobox.css_vue_type_style_index_0_src_d630c922_scoped_d630c922_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_43b6e378_scoped_43b6e378_lang.css +1 -0
- package/dist/assets/src/components/shared/controls/{SDropdownMenu.css_vue_type_style_index_0_src_1ccb9efc_scoped_1ccb9efc_lang.css → SDropdownMenu.css_vue_type_style_index_0_src_40040ae5_scoped_40040ae5_lang.css} +1 -1
- package/dist/assets/src/components/shared/controls/SField.css_vue_type_style_index_0_src_2d353c26_scoped_2d353c26_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/{SInteractiveSurface.css_vue_type_style_index_0_src_998940dd_scoped_998940dd_lang.css → SInteractiveSurface.css_vue_type_style_index_0_src_5e422fac_scoped_5e422fac_lang.css} +1 -1
- package/dist/assets/src/components/shared/controls/{SLink.css_vue_type_style_index_0_src_c7ae14e1_scoped_c7ae14e1_lang.css → SLink.css_vue_type_style_index_0_src_ac46e5a4_scoped_ac46e5a4_lang.css} +1 -1
- package/dist/assets/src/components/shared/controls/SListbox.css_vue_type_style_index_0_src_50063f9f_scoped_50063f9f_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/{SListboxOption.css_vue_type_style_index_0_src_77c399b4_scoped_77c399b4_lang.css → SListboxOption.css_vue_type_style_index_0_src_59c9c538_scoped_59c9c538_lang.css} +1 -1
- package/dist/assets/src/components/shared/controls/SMenuSurface.css_vue_type_style_index_0_src_d2b7d71b_scoped_d2b7d71b_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/SSelect.css_vue_type_style_index_0_src_d1ead6c0_scoped_d1ead6c0_lang.css +2 -0
- package/dist/assets/src/components/shared/controls/STextarea.css_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/assets/src/components/shared/data-display/SControlledToastViewport.css_vue_type_style_index_0_src_a69aa84b_scoped_a69aa84b_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/SProgressBar.css_vue_type_style_index_0_src_cad721dd_scoped_cad721dd_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/SRichDocument.css_vue_type_style_index_0_src_8db085d5_scoped_8db085d5_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/SScrollViewport.css_vue_type_style_index_0_src_d94fcf8c_scoped_d94fcf8c_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/SStatus.css_vue_type_style_index_0_src_3ce41a12_scoped_3ce41a12_lang.css +1 -1
- package/dist/assets/src/components/shared/data-display/STable.css_vue_type_style_index_0_src_b23b3d71_scoped_b23b3d71_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/STooltip.css_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_9fe3ade0_scoped_9fe3ade0_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/_internal/SRichBlockNode.css_vue_type_style_index_0_src_eaae882d_scoped_eaae882d_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/_internal/SRichDisclosure.css_vue_type_style_index_0_src_1f0ffc97_scoped_1f0ffc97_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/_internal/SRichImage.css_vue_type_style_index_0_src_2f1c39a9_scoped_2f1c39a9_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/_internal/{SRichInlineNode.css_vue_type_style_index_0_src_20c8cc87_scoped_20c8cc87_lang.css → SRichInlineNode.css_vue_type_style_index_0_src_3ca8df12_scoped_3ca8df12_lang.css} +1 -1
- package/dist/assets/src/components/shared/data-display/_internal/STableCell.css_vue_type_style_index_0_src_b829cbc6_scoped_b829cbc6_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/_internal/STableFrame.css_vue_type_style_index_0_src_914bad28_scoped_914bad28_lang.css +2 -0
- package/dist/assets/src/components/shared/data-display/_internal/STableRow.css_vue_type_style_index_0_src_1661f8b8_scoped_1661f8b8_lang.css +2 -0
- package/dist/assets/src/components/shared/feedback/SAsyncState.css_vue_type_style_index_0_src_8a291af7_scoped_8a291af7_lang.css +2 -0
- package/dist/assets/src/components/shared/navigation/{SBottomNav.vue_vue_type_style_index_0_scoped_b3963080_lang.css → SBottomNav.vue_vue_type_style_index_0_scoped_68cf84b3_lang.css} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -3
- package/dist/reference.css +4 -0
- package/dist/src/components/icons/_internal/generatedSputnigUiIconComponents.d.ts +15 -0
- package/dist/src/components/icons/_internal/generatedSputnigUiIconComponents.js +4 -4
- package/dist/src/components/icons/_internal/generatedSputnigUiIconMarkup.d.ts +46 -1
- package/dist/src/components/icons/_internal/generatedSputnigUiIconMarkup.js +260 -230
- package/dist/src/components/icons/sputnigUiIcons.d.ts +1 -1
- package/dist/src/components/icons/sputnigUiIcons.js +233 -218
- package/dist/src/components/layout/SAppShell.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/src/components/layout/SDockRegion.vue.d.ts +18 -5
- package/dist/src/components/layout/SDockRegion.vue.js +2 -2
- package/dist/src/components/layout/SDockRegion.vue_vue_type_script_setup_true_lang.js +112 -64
- package/dist/src/components/layout/SResizeHandle.vue.d.ts +6 -3
- package/dist/src/components/layout/SResizeHandle.vue.js +2 -2
- package/dist/src/components/layout/SResizeHandle.vue_vue_type_script_setup_true_lang.js +127 -87
- package/dist/src/components/layout/SStack.vue.d.ts +1 -1
- package/dist/src/components/layout/SWorkbenchPanelShell.vue.d.ts +4 -4
- package/dist/src/components/layout/SWorkbenchPanelShell.vue.js +2 -2
- package/dist/src/components/layout/SWorkbenchPanelShell.vue_vue_type_script_setup_true_lang.js +62 -58
- package/dist/src/components/layout/types.d.ts +20 -0
- package/dist/src/components/shared/_internal/SDialogSurface.vue.d.ts +9 -1
- package/dist/src/components/shared/_internal/SDialogSurface.vue.js +2 -2
- package/dist/src/components/shared/_internal/SDialogSurface.vue_vue_type_script_setup_true_lang.js +183 -68
- package/dist/src/components/shared/_internal/SHeaderSurface.vue.d.ts +1 -1
- package/dist/src/components/shared/_internal/SListboxGroup.vue.d.ts +5 -0
- package/dist/src/components/shared/_internal/SListboxGroup.vue.js +2 -2
- package/dist/src/components/shared/_internal/SListboxGroup.vue_vue_type_script_setup_true_lang.js +33 -15
- package/dist/src/components/shared/_internal/SMenuLayer.vue.d.ts +5 -1
- package/dist/src/components/shared/_internal/SMenuLayer.vue.js +2 -2
- package/dist/src/components/shared/_internal/SMenuLayer.vue_vue_type_script_setup_true_lang.js +64 -20
- package/dist/src/components/shared/_internal/dialogSurface.d.ts +17 -2
- package/dist/src/components/shared/_internal/dialogSurface.js +42 -23
- package/dist/src/components/shared/_internal/dialogSurfaceMotion.d.ts +14 -0
- package/dist/src/components/shared/_internal/dialogSurfaceMotion.js +84 -0
- package/dist/src/components/shared/_internal/focusTrap.js +15 -13
- package/dist/src/components/shared/_internal/listboxContext.d.ts +1 -0
- package/dist/src/components/shared/_internal/listboxInventory.d.ts +51 -0
- package/dist/src/components/shared/_internal/listboxInventory.js +85 -0
- package/dist/src/components/shared/_internal/menuContext.d.ts +8 -0
- package/dist/src/components/shared/_internal/menuContext.js +2 -2
- package/dist/src/components/shared/_internal/sidebarGroupContext.d.ts +1 -0
- package/dist/src/components/shared/_internal/useVirtualCollection.d.ts +45 -0
- package/dist/src/components/shared/_internal/useVirtualCollection.js +123 -0
- package/dist/src/components/shared/complex/SKanbanLane.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/src/components/shared/containers/SCloudChrome.vue.d.ts +1 -1
- package/dist/src/components/shared/containers/SCloudChromeRow.vue.d.ts +1 -1
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue.d.ts +5 -0
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue.js +2 -2
- package/dist/src/components/shared/containers/SCollapsiblePanel.vue_vue_type_script_setup_true_lang.js +123 -121
- package/dist/src/components/shared/containers/SDrawer.vue.d.ts +16 -5
- package/dist/src/components/shared/containers/SDrawer.vue.js +3 -6
- package/dist/src/components/shared/containers/SDrawer.vue_vue_type_script_setup_true_lang.js +149 -75
- package/dist/src/components/shared/containers/SModal.vue.d.ts +8 -8
- package/dist/src/components/shared/containers/SModal.vue.js +3 -6
- package/dist/src/components/shared/containers/SModal.vue_vue_type_script_setup_true_lang.js +93 -85
- package/dist/src/components/shared/containers/SOverlayHost.vue.d.ts +16 -0
- package/dist/src/components/shared/containers/SOverlayHost.vue.js +8 -0
- package/dist/src/components/shared/containers/SOverlayHost.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/src/components/shared/containers/SPageHeader.vue.d.ts +1 -1
- package/dist/src/components/shared/containers/SPanel.vue.d.ts +2 -2
- package/dist/src/components/shared/containers/SPanel.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/src/components/shared/containers/SPopover.vue.js +2 -2
- package/dist/src/components/shared/containers/SPopover.vue_vue_type_script_setup_true_lang.js +250 -156
- package/dist/src/components/shared/containers/SSidebarGroup.vue.js +2 -2
- package/dist/src/components/shared/containers/SSidebarGroup.vue_vue_type_script_setup_true_lang.js +30 -8
- package/dist/src/components/shared/containers/SSidebarSection.vue.js +2 -2
- package/dist/src/components/shared/containers/SSidebarSection.vue_vue_type_script_setup_true_lang.js +59 -45
- package/dist/src/components/shared/controls/SButton.vue.d.ts +7 -0
- package/dist/src/components/shared/controls/SButton.vue.js +2 -2
- package/dist/src/components/shared/controls/SButton.vue_vue_type_script_setup_true_lang.js +11 -5
- package/dist/src/components/shared/controls/SCheckbox.vue.d.ts +3 -0
- package/dist/src/components/shared/controls/SCheckbox.vue.js +2 -2
- package/dist/src/components/shared/controls/SCheckbox.vue_vue_type_script_setup_true_lang.js +53 -43
- package/dist/src/components/shared/controls/SCheckboxGroup.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/src/components/shared/controls/SChoiceCards.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/src/components/shared/controls/SColorSelect.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/src/components/shared/controls/SCombobox.vue.js +2 -2
- package/dist/src/components/shared/controls/SCombobox.vue_vue_type_script_setup_true_lang.js +157 -132
- package/dist/src/components/shared/controls/SComboboxTrigger.vue.d.ts +2 -2
- package/dist/src/components/shared/controls/SContextMenu.vue.d.ts +11 -0
- package/dist/src/components/shared/controls/SContextMenu.vue.js +2 -2
- package/dist/src/components/shared/controls/SContextMenu.vue_vue_type_script_setup_true_lang.js +163 -73
- package/dist/src/components/shared/controls/SContextToggleButton.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/src/components/shared/controls/SDragHandle.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/src/components/shared/controls/SDropdownMenu.vue.js +2 -2
- package/dist/src/components/shared/controls/SDropdownMenu.vue_vue_type_script_setup_true_lang.js +77 -65
- package/dist/src/components/shared/controls/SField.vue.d.ts +9 -6
- package/dist/src/components/shared/controls/SField.vue.js +2 -2
- package/dist/src/components/shared/controls/SField.vue_vue_type_script_setup_true_lang.js +69 -52
- package/dist/src/components/shared/controls/SFieldGroup.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/src/components/shared/controls/SInlineTokenEditor.vue_vue_type_script_setup_true_lang.js +26 -26
- package/dist/src/components/shared/controls/SInputText.vue_vue_type_script_setup_true_lang.js +21 -21
- package/dist/src/components/shared/controls/SInteractiveSurface.vue.js +2 -2
- package/dist/src/components/shared/controls/SInteractiveSurface.vue_vue_type_script_setup_true_lang.js +99 -74
- package/dist/src/components/shared/controls/SLink.d.ts +11 -1
- package/dist/src/components/shared/controls/SLink.vue.d.ts +17 -1
- package/dist/src/components/shared/controls/SLink.vue.js +2 -2
- package/dist/src/components/shared/controls/SLink.vue_vue_type_script_setup_true_lang.js +157 -62
- package/dist/src/components/shared/controls/SListbox.vue.d.ts +10 -1
- package/dist/src/components/shared/controls/SListbox.vue.js +2 -2
- package/dist/src/components/shared/controls/SListbox.vue_vue_type_script_setup_true_lang.js +371 -189
- package/dist/src/components/shared/controls/SListboxOption.vue.d.ts +6 -0
- package/dist/src/components/shared/controls/SListboxOption.vue.js +2 -2
- package/dist/src/components/shared/controls/SListboxOption.vue_vue_type_script_setup_true_lang.js +47 -34
- package/dist/src/components/shared/controls/SMenuSurface.vue.d.ts +2 -2
- package/dist/src/components/shared/controls/SMenuSurface.vue.js +2 -2
- package/dist/src/components/shared/controls/SMenuSurface.vue_vue_type_script_setup_true_lang.js +145 -115
- package/dist/src/components/shared/controls/SRange.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/src/components/shared/controls/SSelect.vue.js +2 -2
- package/dist/src/components/shared/controls/SSelect.vue_vue_type_script_setup_true_lang.js +130 -112
- package/dist/src/components/shared/controls/STextarea.d.ts +1 -1
- package/dist/src/components/shared/controls/STextarea.vue.d.ts +28 -2
- package/dist/src/components/shared/controls/STextarea.vue_vue_type_script_setup_true_lang.js +348 -209
- package/dist/src/components/shared/controls/_internal/SInlineTokenSurface.vue_vue_type_script_lang.js +36 -36
- package/dist/src/components/shared/data-display/SActionList.vue.d.ts +1 -1
- package/dist/src/components/shared/data-display/SActionListItem.vue.d.ts +4 -4
- package/dist/src/components/shared/data-display/SActionListItem.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/src/components/shared/data-display/SBadge.vue.d.ts +1 -1
- package/dist/src/components/shared/data-display/SChart.vue_vue_type_script_setup_true_lang.js +89 -89
- package/dist/src/components/shared/data-display/SChip.vue.d.ts +1 -1
- package/dist/src/components/shared/data-display/SChip.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/src/components/shared/data-display/SCodeBlock.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/src/components/shared/data-display/SCodeEditor.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/src/components/shared/data-display/SCodeSearchPanel.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/src/components/shared/data-display/SCodeWorkspaceEditor.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/src/components/shared/data-display/SControlledToastViewport.vue.js +2 -2
- package/dist/src/components/shared/data-display/SControlledToastViewport.vue_vue_type_script_setup_true_lang.js +57 -48
- package/dist/src/components/shared/data-display/SDiffViewer.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/src/components/shared/data-display/SDocBlock.vue_vue_type_script_setup_true_lang.js +12 -12
- package/dist/src/components/shared/data-display/SEmptyState.vue.d.ts +1 -1
- package/dist/src/components/shared/data-display/SEmptyState.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/src/components/shared/data-display/SExpandableText.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/src/components/shared/data-display/SKeyValueGrid.vue_vue_type_script_setup_true_lang.js +15 -15
- package/dist/src/components/shared/data-display/SLinkedSystemsList.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/src/components/shared/data-display/SMessage.vue.d.ts +1 -1
- package/dist/src/components/shared/data-display/SMessage.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/src/components/shared/data-display/SMetricCard.vue.d.ts +1 -1
- package/dist/src/components/shared/data-display/SProgressBar.vue.d.ts +22 -3
- package/dist/src/components/shared/data-display/SProgressBar.vue.js +2 -2
- package/dist/src/components/shared/data-display/SProgressBar.vue_vue_type_script_setup_true_lang.js +133 -47
- package/dist/src/components/shared/data-display/SProgressIndicator.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/src/components/shared/data-display/SRichDocument.vue.js +2 -2
- package/dist/src/components/shared/data-display/SRichDocument.vue_vue_type_script_setup_true_lang.js +46 -23
- package/dist/src/components/shared/data-display/SScrollViewport.vue.d.ts +10 -5
- package/dist/src/components/shared/data-display/SScrollViewport.vue.js +2 -2
- package/dist/src/components/shared/data-display/SScrollViewport.vue_vue_type_script_setup_true_lang.js +162 -111
- package/dist/src/components/shared/data-display/SSectionHeader.vue.d.ts +1 -1
- package/dist/src/components/shared/data-display/SStatus.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/src/components/shared/data-display/STable.vue.js +2 -2
- package/dist/src/components/shared/data-display/STable.vue_vue_type_script_setup_true_lang.js +343 -322
- package/dist/src/components/shared/data-display/STooltip.vue.d.ts +2 -2
- package/dist/src/components/shared/data-display/STooltip.vue_vue_type_script_setup_true_lang.js +284 -205
- package/dist/src/components/shared/data-display/STooltipAnchor.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/src/components/shared/data-display/STooltipTarget.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/src/components/shared/data-display/SVirtualList.vue.js +2 -2
- package/dist/src/components/shared/data-display/SVirtualList.vue_vue_type_script_setup_true_lang.js +196 -246
- package/dist/src/components/shared/data-display/_internal/SRichBlockNode.vue.js +2 -2
- package/dist/src/components/shared/data-display/_internal/SRichBlockNode.vue_vue_type_script_setup_true_lang.js +242 -220
- package/dist/src/components/shared/data-display/_internal/SRichDisclosure.vue.d.ts +13 -2
- package/dist/src/components/shared/data-display/_internal/SRichDisclosure.vue.js +2 -2
- package/dist/src/components/shared/data-display/_internal/SRichDisclosure.vue_vue_type_script_setup_true_lang.js +67 -11
- package/dist/src/components/shared/data-display/_internal/SRichImage.vue.d.ts +11 -0
- package/dist/src/components/shared/data-display/_internal/SRichImage.vue.js +8 -0
- package/dist/src/components/shared/data-display/_internal/SRichImage.vue_vue_type_script_setup_true_lang.js +89 -0
- package/dist/src/components/shared/data-display/_internal/SRichInlineNode.vue.d.ts +3 -2
- package/dist/src/components/shared/data-display/_internal/SRichInlineNode.vue.js +2 -2
- package/dist/src/components/shared/data-display/_internal/SRichInlineNode.vue_vue_type_script_setup_true_lang.js +179 -125
- package/dist/src/components/shared/data-display/_internal/SRichMath.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/src/components/shared/data-display/_internal/SRichTableNode.vue.d.ts +21 -0
- package/dist/src/components/shared/data-display/_internal/SRichTableNode.vue.js +5 -0
- package/dist/src/components/shared/data-display/_internal/SRichTableNode.vue_vue_type_script_setup_true_lang.js +150 -0
- package/dist/src/components/shared/data-display/_internal/STableCell.vue.d.ts +52 -0
- package/dist/src/components/shared/data-display/_internal/STableCell.vue.js +8 -0
- package/dist/src/components/shared/data-display/_internal/STableCell.vue_vue_type_script_setup_true_lang.js +148 -0
- package/dist/src/components/shared/data-display/_internal/STableFrame.vue.d.ts +42 -0
- package/dist/src/components/shared/data-display/_internal/STableFrame.vue.js +8 -0
- package/dist/src/components/shared/data-display/_internal/STableFrame.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/src/components/shared/data-display/_internal/STableRow.vue.d.ts +43 -0
- package/dist/src/components/shared/data-display/_internal/STableRow.vue.js +8 -0
- package/dist/src/components/shared/data-display/_internal/STableRow.vue_vue_type_script_setup_true_lang.js +115 -0
- package/dist/src/components/shared/data-display/_internal/STableSection.vue.d.ts +28 -0
- package/dist/src/components/shared/data-display/_internal/STableSection.vue.js +5 -0
- package/dist/src/components/shared/data-display/_internal/STableSection.vue_vue_type_script_setup_true_lang.js +77 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentMedia.d.ts +6 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentMedia.js +136 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentMetadata.d.ts +21 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentMetadata.js +39 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentNavigation.d.ts +30 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentNavigation.js +88 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentTableValidation.d.ts +9 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentTableValidation.js +240 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentTraversal.d.ts +15 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentTraversal.js +61 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentTypes.d.ts +466 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentValidation.d.ts +65 -0
- package/dist/src/components/shared/data-display/_internal/richDocumentValidation.js +192 -0
- package/dist/src/components/shared/data-display/_internal/tableFoundation.d.ts +27 -0
- package/dist/src/components/shared/data-display/_internal/tableFoundation.js +16 -0
- package/dist/src/components/shared/data-display/richDocument.d.ts +3 -220
- package/dist/src/components/shared/data-display/richDocument.js +607 -399
- package/dist/src/components/shared/data-display/scrollViewport.d.ts +2 -0
- package/dist/src/components/shared/database/SDataGrid.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/src/components/shared/database/SSqlEditor.vue.d.ts +2 -2
- package/dist/src/components/shared/database/SSqlEditor.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/src/components/shared/feedback/SAsyncState.vue.js +2 -2
- package/dist/src/components/shared/feedback/SAsyncState.vue_vue_type_script_setup_true_lang.js +70 -63
- package/dist/src/components/shared/navigation/SBottomNav.vue.d.ts +2 -2
- package/dist/src/components/shared/navigation/SBottomNav.vue.js +2 -2
- package/dist/src/components/shared/navigation/SBottomNav.vue_vue_type_script_setup_true_lang.js +140 -129
- package/dist/src/components/shared/navigation/SBreadcrumbs.vue.d.ts +2 -2
- package/dist/src/components/shared/navigation/STabList.vue.d.ts +1 -1
- package/dist/src/components/shared/navigation/STabPanel.vue.d.ts +2 -2
- package/dist/src/components/shared/navigation/SWizardSteps.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/src/components/shared/persona/SPersonaProjectPicker.vue.d.ts +2 -2
- package/dist/src/composables/useDialogOverlay.d.ts +21 -2
- package/dist/src/composables/useDialogOverlay.js +275 -44
- package/dist/src/composables/useFloatingPosition.d.ts +20 -0
- package/dist/src/composables/useFloatingPosition.js +129 -52
- package/dist/src/internal/fieldSurface.d.ts +3 -0
- package/dist/src/internal/fieldSurface.js +3 -2
- package/dist/src/internal/flatTree.d.ts +8 -0
- package/dist/src/internal/flatTree.js +23 -0
- package/dist/src/internal/focusNavigation.d.ts +5 -0
- package/dist/src/internal/focusNavigation.js +29 -16
- package/dist/src/internal/inertLease.d.ts +8 -0
- package/dist/src/internal/inertLease.js +33 -0
- package/dist/src/internal/layerStack.d.ts +52 -0
- package/dist/src/internal/layerStack.js +343 -60
- package/dist/src/internal/linkTarget.d.ts +7 -1
- package/dist/src/internal/linkTarget.js +11 -7
- package/dist/src/internal/nativeFocus.d.ts +4 -0
- package/dist/src/internal/nativeFocus.js +12 -0
- package/dist/src/internal/overlayHost.d.ts +18 -0
- package/dist/src/internal/overlayHost.js +18 -0
- package/dist/src/internal/overlayPortal.d.ts +17 -0
- package/dist/src/internal/overlayPortal.js +23 -0
- package/dist/src/internal/ownedAttrs.d.ts +13 -3
- package/dist/src/internal/ownedAttrs.js +8 -1
- package/dist/src/internal/runtimeContract.d.ts +2 -0
- package/dist/src/internal/runtimeContract.js +10 -5
- package/dist/src/internal/semanticSizing.d.ts +2 -2
- package/dist/src/internal/semanticSizing.js +2 -1
- package/dist/src/internal/useMenuLayer.d.ts +8 -4
- package/dist/src/internal/useMenuLayer.js +78 -49
- package/dist/src/internal/viewportModality.d.ts +27 -0
- package/dist/src/internal/viewportModality.js +132 -0
- package/dist/tailwind.css +3 -0
- package/dist/typography.LICENSE.txt +94 -0
- package/dist/typography.js +5105 -0
- package/docs/getting-started.md +39 -0
- package/docs/link-download.md +114 -0
- package/docs/listbox.md +129 -0
- package/docs/overlay-lifecycle.md +195 -0
- package/docs/public-api.md +335 -6
- package/docs/resize.md +158 -0
- package/docs/rich-document.md +442 -25
- package/docs/scroll-viewport.md +30 -10
- package/docs/theming.md +42 -8
- package/package.json +12 -4
- package/src/components/shared/_internal/SDialogSurface.css +213 -36
- package/src/components/shared/_internal/SMenuLayer.css +4 -0
- package/src/components/shared/containers/SOverlayHost.css +14 -0
- package/src/components/shared/containers/SPopover.css +8 -2
- package/src/components/shared/controls/SButton.css +4 -3
- package/src/components/shared/controls/SCheckbox.css +19 -7
- package/src/components/shared/controls/SField.css +6 -0
- package/src/components/shared/controls/SListbox.css +17 -0
- package/src/components/shared/controls/SMenuSurface.css +18 -4
- package/src/components/shared/controls/STextarea.css +42 -3
- package/src/components/shared/data-display/SControlledToastViewport.css +2 -10
- package/src/components/shared/data-display/SProgressBar.css +79 -0
- package/src/components/shared/data-display/SRichDocument.css +1 -0
- package/src/components/shared/data-display/SScrollViewport.css +17 -1
- package/src/components/shared/data-display/SStatus.css +8 -25
- package/src/components/shared/data-display/STable.css +0 -113
- package/src/components/shared/data-display/STooltip.css +3 -0
- package/src/components/shared/data-display/_internal/SRichBlockNode.css +11 -7
- package/src/components/shared/data-display/_internal/SRichDisclosure.css +16 -0
- package/src/components/shared/data-display/_internal/SRichImage.css +37 -0
- package/src/components/shared/data-display/_internal/STableCell.css +55 -0
- package/src/components/shared/data-display/_internal/STableFrame.css +37 -0
- package/src/components/shared/data-display/_internal/STableRow.css +12 -0
- package/src/components/shared/feedback/SAsyncState.css +0 -4
- package/src/styles/style.css +9 -5
- package/src/styles/tokens.css +30 -0
- package/dist/assets/src/components/layout/SDockRegion.vue_vue_type_style_index_0_scoped_2932631d_lang.css +0 -1
- package/dist/assets/src/components/shared/_internal/SDialogSurface.css_vue_type_style_index_0_src_d1b65adf_scoped_d1b65adf_lang.css +0 -2
- package/dist/assets/src/components/shared/_internal/SMenuLayer.css_vue_type_style_index_0_src_4913bbe1_scoped_4913bbe1_lang.css +0 -1
- package/dist/assets/src/components/shared/containers/SDrawer.css_vue_type_style_index_0_src_091d7325_scoped_091d7325_lang.css +0 -2
- package/dist/assets/src/components/shared/containers/SModal.css_vue_type_style_index_0_src_0dc51b74_scoped_0dc51b74_lang.css +0 -2
- package/dist/assets/src/components/shared/containers/SPopover.css_vue_type_style_index_0_src_deded766_scoped_deded766_lang.css +0 -2
- package/dist/assets/src/components/shared/containers/SSidebarSection.css_vue_type_style_index_0_src_96f51ac6_scoped_96f51ac6_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SButton.css_vue_type_style_index_0_src_a5d8f7e0_scoped_a5d8f7e0_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SCheckbox.css_vue_type_style_index_0_src_b20b27dd_scoped_b20b27dd_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SCombobox.css_vue_type_style_index_0_src_e3b4f580_scoped_e3b4f580_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SContextMenu.css_vue_type_style_index_0_src_00c91d39_scoped_00c91d39_lang.css +0 -1
- package/dist/assets/src/components/shared/controls/SField.css_vue_type_style_index_0_src_60628f96_scoped_60628f96_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SListbox.css_vue_type_style_index_0_src_24db4abb_scoped_24db4abb_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SMenuSurface.css_vue_type_style_index_0_src_ddcc5fbb_scoped_ddcc5fbb_lang.css +0 -2
- package/dist/assets/src/components/shared/controls/SSelect.css_vue_type_style_index_0_src_441648c9_scoped_441648c9_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SControlledToastViewport.css_vue_type_style_index_0_src_5864b6c6_scoped_5864b6c6_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SProgressBar.css_vue_type_style_index_0_src_9308293a_scoped_9308293a_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SRichDocument.css_vue_type_style_index_0_src_d1afafc5_scoped_d1afafc5_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SScrollViewport.css_vue_type_style_index_0_src_e5d11342_scoped_e5d11342_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/STable.css_vue_type_style_index_0_src_9955d482_scoped_9955d482_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/SVirtualList.css_vue_type_style_index_0_src_cee8c247_scoped_cee8c247_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/_internal/SRichBlockNode.css_vue_type_style_index_0_src_195d5c06_scoped_195d5c06_lang.css +0 -2
- package/dist/assets/src/components/shared/data-display/_internal/SRichDisclosure.css_vue_type_style_index_0_src_fa94e2ff_scoped_fa94e2ff_lang.css +0 -2
- package/dist/assets/src/components/shared/feedback/SAsyncState.css_vue_type_style_index_0_src_bfc28903_scoped_bfc28903_lang.css +0 -2
- package/src/components/shared/containers/SDrawer.css +0 -69
- package/src/components/shared/containers/SModal.css +0 -27
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/_internal/SListboxGroup.
|
|
1
|
+
import "../../../../assets/src/components/shared/_internal/SListboxGroup.css_vue_type_style_index_0_src_00060944_scoped_00060944_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SListboxGroup.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/_internal/SListboxGroup.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-00060944"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|
package/dist/src/components/shared/_internal/SListboxGroup.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,26 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { listboxContextKey as e } from "./listboxContext.js";
|
|
2
|
+
import { createElementBlock as t, createElementVNode as n, defineComponent as r, inject as i, normalizeStyle as a, onBeforeUnmount as o, onMounted as s, openBlock as c, ref as l, renderSlot as u, toDisplayString as d } from "vue";
|
|
2
3
|
//#region src/components/shared/_internal/SListboxGroup.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
4
|
-
class: "s-listbox-group__options",
|
|
5
|
-
role: "presentation"
|
|
6
|
-
}, l = /*@__PURE__*/ n({
|
|
4
|
+
var f = ["data-variant"], p = ["id"], m = ["aria-labelledby"], h = /*@__PURE__*/ r({
|
|
7
5
|
__name: "SListboxGroup",
|
|
8
6
|
props: {
|
|
9
7
|
label: {},
|
|
10
8
|
labelId: {},
|
|
11
|
-
variant: { default: "select" }
|
|
9
|
+
variant: { default: "select" },
|
|
10
|
+
registrationToken: {},
|
|
11
|
+
virtualOffset: { default: void 0 },
|
|
12
|
+
virtualHeight: { default: void 0 }
|
|
12
13
|
},
|
|
13
|
-
setup(
|
|
14
|
-
|
|
14
|
+
setup(r) {
|
|
15
|
+
let h = r, g = i(e), _ = l(null), v;
|
|
16
|
+
return s(() => {
|
|
17
|
+
let e = _.value;
|
|
18
|
+
if (!(e instanceof HTMLElement)) throw Error("SListboxGroup: label element is unavailable");
|
|
19
|
+
v = g?.registerGeometry?.(`header:${h.registrationToken}`, e);
|
|
20
|
+
}), o(() => v?.()), (e, i) => (c(), t("li", {
|
|
15
21
|
class: "s-listbox-group",
|
|
16
|
-
"data-variant":
|
|
17
|
-
role: "
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
"data-variant": r.variant,
|
|
23
|
+
role: "presentation",
|
|
24
|
+
style: a(r.virtualOffset === void 0 ? void 0 : {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
top: `${r.virtualOffset}px`,
|
|
27
|
+
height: `${r.virtualHeight}px`,
|
|
28
|
+
left: "0",
|
|
29
|
+
right: "0"
|
|
30
|
+
})
|
|
31
|
+
}, [n("span", {
|
|
32
|
+
ref_key: "labelElement",
|
|
33
|
+
ref: _,
|
|
34
|
+
id: r.labelId,
|
|
21
35
|
class: "s-listbox-group__label"
|
|
22
|
-
},
|
|
36
|
+
}, d(r.label), 9, p), n("ul", {
|
|
37
|
+
class: "s-listbox-group__options",
|
|
38
|
+
role: "group",
|
|
39
|
+
"aria-labelledby": r.labelId
|
|
40
|
+
}, [u(e.$slots, "default", {}, void 0, !0)], 8, m)], 12, f));
|
|
23
41
|
}
|
|
24
42
|
});
|
|
25
43
|
//#endregion
|
|
26
|
-
export {
|
|
44
|
+
export { h as default };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ElementApi } from '../../../internal/interactiveElement';
|
|
2
|
-
|
|
2
|
+
import { FloatingAvailableSize, FloatingSizingElements } from '../../../composables/useFloatingPosition';
|
|
3
|
+
export interface SMenuLayerApi extends ElementApi<HTMLDivElement> {
|
|
4
|
+
getSizingElements: () => FloatingSizingElements | null;
|
|
5
|
+
}
|
|
3
6
|
interface Props {
|
|
4
7
|
kind: 'dropdown' | 'context' | 'submenu';
|
|
5
8
|
landmarkLabel: string;
|
|
@@ -8,6 +11,7 @@ interface Props {
|
|
|
8
11
|
top: number;
|
|
9
12
|
};
|
|
10
13
|
zIndex: string;
|
|
14
|
+
availableSize: FloatingAvailableSize | null;
|
|
11
15
|
}
|
|
12
16
|
declare var __VLS_1: {};
|
|
13
17
|
type __VLS_Slots = {} & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../../../../assets/src/components/shared/_internal/SMenuLayer.
|
|
1
|
+
import "../../../../assets/src/components/shared/_internal/SMenuLayer.css_vue_type_style_index_0_src_e478164c_scoped_e478164c_lang.css";
|
|
2
2
|
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import t from "./SMenuLayer.vue_vue_type_script_setup_true_lang.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region src/components/shared/_internal/SMenuLayer.vue
|
|
6
|
-
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-e478164c"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|
package/dist/src/components/shared/_internal/SMenuLayer.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -1,33 +1,77 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useOverlayAdmission as e } from "../../../internal/overlayHost.js";
|
|
2
|
+
import { menuViewportKey as t } from "./menuContext.js";
|
|
3
|
+
import { computed as n, createElementBlock as r, defineComponent as i, nextTick as a, normalizeClass as o, normalizeStyle as s, openBlock as c, provide as l, ref as u, renderSlot as d, unref as f, watch as p } from "vue";
|
|
2
4
|
//#region src/components/shared/_internal/SMenuLayer.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
5
|
+
var m = [
|
|
6
|
+
"hidden",
|
|
7
|
+
"^inert",
|
|
8
|
+
"data-kind",
|
|
9
|
+
"aria-label"
|
|
10
|
+
], h = /*@__PURE__*/ i({
|
|
4
11
|
__name: "SMenuLayer",
|
|
5
12
|
props: {
|
|
6
13
|
kind: {},
|
|
7
14
|
landmarkLabel: {},
|
|
8
15
|
position: {},
|
|
9
|
-
zIndex: {}
|
|
16
|
+
zIndex: {},
|
|
17
|
+
availableSize: {}
|
|
10
18
|
},
|
|
11
|
-
setup(
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
setup(i, { expose: h }) {
|
|
20
|
+
let g = i, _ = u(null), v = e(), y = u(!v.value);
|
|
21
|
+
p(v, (e) => {
|
|
22
|
+
if (e) return;
|
|
23
|
+
y.value = !0;
|
|
24
|
+
let t = _.value;
|
|
25
|
+
if (!t) return;
|
|
26
|
+
t.hidden = !0, t.setAttribute("inert", "");
|
|
27
|
+
let n = t.ownerDocument.activeElement;
|
|
28
|
+
n instanceof HTMLElement && t.contains(n) && n.blur();
|
|
29
|
+
}, { flush: "sync" });
|
|
30
|
+
let b = null;
|
|
31
|
+
l(t, { register(e) {
|
|
32
|
+
if (b !== null) throw Error("SMenuLayer: exactly one native menu sizing surface is allowed");
|
|
33
|
+
if (!e.surface.contains(e.content)) throw Error("SMenuLayer: native sizing content must belong to its surface");
|
|
34
|
+
return b = e, () => {
|
|
35
|
+
b === e && (b = null);
|
|
36
|
+
};
|
|
37
|
+
} });
|
|
38
|
+
let x = n(() => ({
|
|
39
|
+
left: `${g.position.left}px`,
|
|
40
|
+
top: `${g.position.top}px`,
|
|
41
|
+
zIndex: g.zIndex,
|
|
42
|
+
...g.availableSize ? {
|
|
43
|
+
"--s-menu-viewport-available-inline-size": `${g.availableSize.width}px`,
|
|
44
|
+
"--s-menu-viewport-available-block-size": `${g.availableSize.height}px`
|
|
45
|
+
} : {}
|
|
16
46
|
}));
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
47
|
+
return p(() => [g.availableSize?.width, g.availableSize?.height], async ([e, t], n) => {
|
|
48
|
+
if (e === n[0] && t === n[1]) return;
|
|
49
|
+
let r = b;
|
|
50
|
+
await a(), r && b === r && _.value?.isConnected && r.surface.isConnected && _.value.contains(r.surface) && r.revealFocusedItem();
|
|
51
|
+
}), h({
|
|
52
|
+
getElement: () => {
|
|
53
|
+
let e = _.value;
|
|
54
|
+
if (!e) throw Error("SMenuLayer: layer element is unavailable");
|
|
55
|
+
return e;
|
|
56
|
+
},
|
|
57
|
+
getSizingElements: () => {
|
|
58
|
+
let e = _.value;
|
|
59
|
+
if (!e || !b) return null;
|
|
60
|
+
if (!e.contains(b.surface)) throw Error("SMenuLayer: native sizing surface must belong to the current layer");
|
|
61
|
+
return b;
|
|
62
|
+
}
|
|
63
|
+
}), (e, t) => (c(), r("div", {
|
|
22
64
|
ref_key: "layerRef",
|
|
23
|
-
ref:
|
|
24
|
-
|
|
25
|
-
"
|
|
65
|
+
ref: _,
|
|
66
|
+
hidden: y.value || !f(v),
|
|
67
|
+
"^inert": y.value || !f(v) ? !0 : void 0,
|
|
68
|
+
class: o(["s-menu-layer", [`s-menu-layer--${i.kind}`, i.kind === "context" ? "s-context-menu" : i.kind === "dropdown" ? "s-dropdown-menu-items" : "s-submenu-items"]]),
|
|
69
|
+
"data-kind": i.kind,
|
|
26
70
|
role: "region",
|
|
27
|
-
"aria-label":
|
|
28
|
-
style:
|
|
29
|
-
}, [
|
|
71
|
+
"aria-label": i.landmarkLabel,
|
|
72
|
+
style: s(x.value)
|
|
73
|
+
}, [d(e.$slots, "default", {}, void 0, !0)], 14, m));
|
|
30
74
|
}
|
|
31
75
|
});
|
|
32
76
|
//#endregion
|
|
33
|
-
export {
|
|
77
|
+
export { h as default };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export type DialogSurfaceModalSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'wide' | 'full';
|
|
2
2
|
export type DialogSurfaceDrawerSize = 'sm' | 'md' | 'lg';
|
|
3
|
-
export type DialogSurfaceDrawerPlacement = 'right' | 'bottom';
|
|
3
|
+
export type DialogSurfaceDrawerPlacement = 'left' | 'right' | 'bottom';
|
|
4
|
+
export type DialogSurfaceDrawerScope = 'viewport' | 'contained';
|
|
5
|
+
export type DialogSurfaceDrawerScrollBehavior = 'body' | 'content';
|
|
4
6
|
export type DialogSurfaceTone = 'default' | 'subtle';
|
|
5
7
|
export type DialogSurfaceScrollBehavior = 'page' | 'body';
|
|
6
8
|
export type DialogSurfaceHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
9
|
+
/** Translates the canonical registration base into the exact dialog-owned paint bands. */
|
|
10
|
+
export declare function resolveDialogSurfaceLayerIndex(base: string, band: 'backdrop' | 'surface' | 'toast'): string;
|
|
7
11
|
/** Проверяет уровень native heading без числового coercion. / Validates a native heading level without numeric coercion. */
|
|
8
12
|
export declare function validateDialogSurfaceHeadingLevel(owner: string, value: unknown): DialogSurfaceHeadingLevel;
|
|
9
13
|
export interface ModalDialogSurfacePresentation {
|
|
@@ -13,12 +17,22 @@ export interface ModalDialogSurfacePresentation {
|
|
|
13
17
|
surface: DialogSurfaceTone;
|
|
14
18
|
scrollBehavior: DialogSurfaceScrollBehavior;
|
|
15
19
|
}
|
|
16
|
-
|
|
20
|
+
interface DrawerDialogSurfaceBase {
|
|
17
21
|
kind: 'drawer';
|
|
18
22
|
size: DialogSurfaceDrawerSize;
|
|
19
23
|
placement: DialogSurfaceDrawerPlacement;
|
|
20
24
|
mobileFullScreen: boolean;
|
|
25
|
+
scrollBehavior: DialogSurfaceDrawerScrollBehavior;
|
|
21
26
|
}
|
|
27
|
+
export type DrawerDialogSurfacePresentation = DrawerDialogSurfaceBase & ({
|
|
28
|
+
scope: 'viewport';
|
|
29
|
+
extent?: never;
|
|
30
|
+
} | {
|
|
31
|
+
scope: 'contained';
|
|
32
|
+
extent: number;
|
|
33
|
+
});
|
|
34
|
+
/** Validates an exact finite percentage in (0,100], with no unit coercion. */
|
|
35
|
+
export declare function validateDrawerExtent(owner: string, value: unknown): number;
|
|
22
36
|
export type DialogSurfacePresentation = ModalDialogSurfacePresentation | DrawerDialogSurfacePresentation;
|
|
23
37
|
export type DialogSurfaceContractErrorCode = 'invalid-presentation' | 'invalid-size' | 'invalid-surface' | 'invalid-scroll-behavior';
|
|
24
38
|
export declare class DialogSurfaceContractError extends Error {
|
|
@@ -30,3 +44,4 @@ export declare class DialogSurfaceContractError extends Error {
|
|
|
30
44
|
* Validates the private dialog surface discriminated contract without fallback branches.
|
|
31
45
|
*/
|
|
32
46
|
export declare function assertDialogSurfacePresentation(presentation: DialogSurfacePresentation): asserts presentation is DialogSurfacePresentation;
|
|
47
|
+
export {};
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
+
import { hasOwn as e } from "../../../internal/es2020.js";
|
|
1
2
|
//#region src/components/shared/_internal/dialogSurface.ts
|
|
2
|
-
function
|
|
3
|
+
function t(e, t) {
|
|
4
|
+
return t === "backdrop" ? e : `calc(${e} + var(${t === "surface" ? "--s-layer-overlay-surface-offset" : "--s-layer-toast"}))`;
|
|
5
|
+
}
|
|
6
|
+
function n(e, t) {
|
|
3
7
|
if (t === 1 || t === 2 || t === 3 || t === 4 || t === 5 || t === 6) return t;
|
|
4
8
|
throw TypeError(`${e}: headingLevel должен быть целым числом от 1 до 6; получено ${String(t)}. / ${e}: headingLevel must be an integer from 1 to 6; received ${String(t)}.`);
|
|
5
9
|
}
|
|
6
|
-
|
|
10
|
+
function r(e, t) {
|
|
11
|
+
if (typeof t == "number" && Number.isFinite(t) && t > 0 && t <= 100) return t;
|
|
12
|
+
throw TypeError(`${e}: extent must be a finite percentage in (0,100]; received ${String(t)}`);
|
|
13
|
+
}
|
|
14
|
+
var i = class extends Error {
|
|
7
15
|
constructor(e, t) {
|
|
8
16
|
super(t), this.name = "DialogSurfaceContractError", this.code = e;
|
|
9
17
|
}
|
|
10
|
-
},
|
|
18
|
+
}, a = /* @__PURE__ */ new Set([
|
|
11
19
|
"kind",
|
|
12
20
|
"size",
|
|
13
21
|
"fullscreen",
|
|
14
22
|
"surface",
|
|
15
23
|
"scrollBehavior"
|
|
16
|
-
]),
|
|
24
|
+
]), o = /* @__PURE__ */ new Set([
|
|
17
25
|
"kind",
|
|
18
26
|
"size",
|
|
19
27
|
"placement",
|
|
20
|
-
"mobileFullScreen"
|
|
21
|
-
|
|
28
|
+
"mobileFullScreen",
|
|
29
|
+
"scope",
|
|
30
|
+
"extent",
|
|
31
|
+
"scrollBehavior"
|
|
32
|
+
]), s = /* @__PURE__ */ new Set([
|
|
22
33
|
"sm",
|
|
23
34
|
"md",
|
|
24
35
|
"lg",
|
|
@@ -28,30 +39,38 @@ var t = class extends Error {
|
|
|
28
39
|
"4xl",
|
|
29
40
|
"wide",
|
|
30
41
|
"full"
|
|
31
|
-
]),
|
|
42
|
+
]), c = /* @__PURE__ */ new Set([
|
|
32
43
|
"sm",
|
|
33
44
|
"md",
|
|
34
45
|
"lg"
|
|
35
|
-
]),
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
]), l = /* @__PURE__ */ new Set([
|
|
47
|
+
"left",
|
|
48
|
+
"right",
|
|
49
|
+
"bottom"
|
|
50
|
+
]), u = /* @__PURE__ */ new Set(["default", "subtle"]), d = /* @__PURE__ */ new Set(["page", "body"]), f = (e, t, n) => {
|
|
51
|
+
let r = Object.keys(e).find((e) => !n.has(e));
|
|
52
|
+
if (r) throw new i("invalid-presentation", `SDialogSurface presentation kind="${t}" содержит недопустимое поле ${r}`);
|
|
38
53
|
};
|
|
39
|
-
function
|
|
40
|
-
let
|
|
41
|
-
if (
|
|
42
|
-
if (
|
|
43
|
-
if (typeof
|
|
44
|
-
if (!
|
|
45
|
-
if (!
|
|
54
|
+
function p(t) {
|
|
55
|
+
let n = t;
|
|
56
|
+
if (n.kind === "modal") {
|
|
57
|
+
if (f(n, "modal", a), !s.has(n.size)) throw new i("invalid-size", `Недопустимый размер SModal: ${String(n.size)}`);
|
|
58
|
+
if (typeof n.fullscreen != "boolean") throw new i("invalid-presentation", "SModal presentation требует boolean fullscreen");
|
|
59
|
+
if (!u.has(n.surface)) throw new i("invalid-surface", `Недопустимая поверхность SModal: ${String(n.surface)}`);
|
|
60
|
+
if (!d.has(n.scrollBehavior)) throw new i("invalid-scroll-behavior", `Недопустимый scroll behavior SModal: ${String(n.scrollBehavior)}`);
|
|
46
61
|
return;
|
|
47
62
|
}
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
if (!
|
|
51
|
-
if (typeof
|
|
63
|
+
if (n.kind === "drawer") {
|
|
64
|
+
if (f(n, "drawer", o), !c.has(n.size)) throw new i("invalid-size", `Недопустимый размер SDrawer: ${String(n.size)}`);
|
|
65
|
+
if (!l.has(n.placement)) throw new i("invalid-presentation", `Недопустимое размещение SDrawer: ${String(n.placement)}`);
|
|
66
|
+
if (typeof n.mobileFullScreen != "boolean") throw new i("invalid-presentation", "SDrawer presentation требует boolean mobileFullScreen");
|
|
67
|
+
if (n.scope !== "viewport" && n.scope !== "contained") throw new i("invalid-presentation", "SDrawer presentation requires viewport or contained scope");
|
|
68
|
+
if (n.scrollBehavior !== "body" && n.scrollBehavior !== "content") throw new i("invalid-scroll-behavior", "SDrawer presentation requires body or content scrollBehavior");
|
|
69
|
+
if (n.scope === "contained") r("SDialogSurface", n.extent);
|
|
70
|
+
else if (e(n, "extent")) throw new i("invalid-presentation", "SDrawer extent requires contained scope");
|
|
52
71
|
return;
|
|
53
72
|
}
|
|
54
|
-
throw new
|
|
73
|
+
throw new i("invalid-presentation", `Неизвестный kind SDialogSurface: ${String(n.kind)}`);
|
|
55
74
|
}
|
|
56
75
|
//#endregion
|
|
57
|
-
export {
|
|
76
|
+
export { i as DialogSurfaceContractError, p as assertDialogSurfacePresentation, t as resolveDialogSurfaceLayerIndex, n as validateDialogSurfaceHeadingLevel, r as validateDrawerExtent };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DialogSurfaceMotionElements {
|
|
2
|
+
readonly subject: HTMLElement;
|
|
3
|
+
readonly frame: HTMLElement;
|
|
4
|
+
readonly backdrop: HTMLElement;
|
|
5
|
+
}
|
|
6
|
+
export interface DialogSurfaceMotionOwner {
|
|
7
|
+
readonly register: (elements: DialogSurfaceMotionElements) => () => void;
|
|
8
|
+
readonly enter: (element: Element, done: () => void) => void;
|
|
9
|
+
readonly leave: (element: Element, done: () => void) => void;
|
|
10
|
+
readonly cancel: (element: Element) => void;
|
|
11
|
+
readonly dispose: () => void;
|
|
12
|
+
}
|
|
13
|
+
/** Coordinates exact child CSS effects with Vue's explicit completion hooks; no duration clock or root motion. */
|
|
14
|
+
export declare function useDialogSurfaceMotion(enabled: () => boolean): DialogSurfaceMotionOwner;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { createAggregateError as e } from "../../../internal/es2020.js";
|
|
2
|
+
import { onBeforeUnmount as t } from "vue";
|
|
3
|
+
//#region src/components/shared/_internal/dialogSurfaceMotion.ts
|
|
4
|
+
function n(n) {
|
|
5
|
+
let r = "s-dialog-surface-motion", i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = !1, s = (e) => {
|
|
6
|
+
if (!(e instanceof HTMLElement)) return;
|
|
7
|
+
let t = a.get(e);
|
|
8
|
+
t && (a.delete(e), t.observer.disconnect());
|
|
9
|
+
}, c = (e) => !o && a.get(e.subject) === e, l = (e) => {
|
|
10
|
+
c(e) && (s(e.subject), e.direction === "leave" && i.delete(e.subject), e.done());
|
|
11
|
+
}, u = (e) => [...e.frame.getAnimations().filter((t) => t.effect instanceof KeyframeEffect && t.effect.target === e.frame && t.effect.pseudoElement === null && "transitionProperty" in t && t.transitionProperty === "transform"), ...e.backdrop.getAnimations().filter((t) => t.effect instanceof KeyframeEffect && t.effect.target === e.backdrop && t.effect.pseudoElement === null && "transitionProperty" in t && t.transitionProperty === "opacity")].filter((e) => e.playState !== "idle" && e.playState !== "finished"), d = (e) => {
|
|
12
|
+
if (!c(e) || !e.subject.classList.contains(e.toClass) || e.waiting) return;
|
|
13
|
+
let t = i.get(e.subject);
|
|
14
|
+
if (!t) throw TypeError("dialogSurfaceMotion: current semantic subject requires its exact frame/backdrop refs");
|
|
15
|
+
let n = u(t);
|
|
16
|
+
if (n.length === 0) {
|
|
17
|
+
l(e);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
e.waiting = !0, Promise.all(n.map((e) => e.finished)).then(() => {
|
|
21
|
+
e.waiting = !1, d(e);
|
|
22
|
+
}, (t) => {
|
|
23
|
+
if (e.waiting = !1, !(t instanceof DOMException) || t.name !== "AbortError") throw s(e.subject), t;
|
|
24
|
+
d(e);
|
|
25
|
+
});
|
|
26
|
+
}, f = (e, t, l) => {
|
|
27
|
+
if (!(e instanceof HTMLElement)) throw TypeError("dialogSurfaceMotion: Vue subject must be its native HTMLElement");
|
|
28
|
+
if (s(e), o || !n()) {
|
|
29
|
+
l === "leave" && i.delete(e), t();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
let u = `${r}-${l}-active`, f = `${r}-${l}-to`, p = new MutationObserver(() => {
|
|
33
|
+
if (c(m)) {
|
|
34
|
+
if (!e.classList.contains(u)) {
|
|
35
|
+
s(e);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
d(m);
|
|
39
|
+
}
|
|
40
|
+
}), m = {
|
|
41
|
+
subject: e,
|
|
42
|
+
direction: l,
|
|
43
|
+
activeClass: u,
|
|
44
|
+
toClass: f,
|
|
45
|
+
done: t,
|
|
46
|
+
observer: p,
|
|
47
|
+
waiting: !1
|
|
48
|
+
};
|
|
49
|
+
a.set(e, m), p.observe(e, {
|
|
50
|
+
attributes: !0,
|
|
51
|
+
attributeFilter: ["class"]
|
|
52
|
+
}), d(m);
|
|
53
|
+
}, p = () => {
|
|
54
|
+
if (o) return;
|
|
55
|
+
o = !0;
|
|
56
|
+
let t = [];
|
|
57
|
+
for (let e of [...a.values()]) {
|
|
58
|
+
s(e.subject);
|
|
59
|
+
try {
|
|
60
|
+
e.done();
|
|
61
|
+
} catch (e) {
|
|
62
|
+
t.push(e);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (i.clear(), t.length === 1) throw t[0];
|
|
66
|
+
if (t.length > 1) throw e(t, "dialogSurfaceMotion: completion cleanup failed");
|
|
67
|
+
};
|
|
68
|
+
return t(p), {
|
|
69
|
+
register: (e) => {
|
|
70
|
+
if (e.frame === e.backdrop || !e.subject.contains(e.frame) || !e.subject.contains(e.backdrop)) throw TypeError("dialogSurfaceMotion: exact frame/backdrop must be distinct descendants of their subject");
|
|
71
|
+
i.set(e.subject, e);
|
|
72
|
+
let t = a.get(e.subject);
|
|
73
|
+
return t && d(t), () => {
|
|
74
|
+
i.get(e.subject) === e && (e.subject.isConnected || (i.delete(e.subject), s(e.subject)));
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
enter: (e, t) => f(e, t, "enter"),
|
|
78
|
+
leave: (e, t) => f(e, t, "leave"),
|
|
79
|
+
cancel: s,
|
|
80
|
+
dispose: p
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { n as useDialogSurfaceMotion };
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { flatTreeContains as e } from "../../../internal/flatTree.js";
|
|
2
|
+
import { nativeFocusedElement as t } from "../../../internal/nativeFocus.js";
|
|
3
|
+
import { getFocusableElements as n } from "../../../internal/focusNavigation.js";
|
|
2
4
|
//#region src/components/shared/_internal/focusTrap.ts
|
|
3
|
-
function
|
|
4
|
-
if (
|
|
5
|
-
let
|
|
6
|
-
if (!
|
|
7
|
-
let
|
|
8
|
-
if (
|
|
9
|
-
|
|
5
|
+
function r(r, i, a) {
|
|
6
|
+
if (r.key !== "Tab" || !a) return;
|
|
7
|
+
let o = i.value;
|
|
8
|
+
if (!o) return;
|
|
9
|
+
let s = n(o, { requireLayout: !0 });
|
|
10
|
+
if (s.length === 0) {
|
|
11
|
+
r.preventDefault(), o.focus();
|
|
10
12
|
return;
|
|
11
13
|
}
|
|
12
|
-
let
|
|
13
|
-
if (
|
|
14
|
-
(
|
|
14
|
+
let c = s[0], l = s[s.length - 1], u = t(), d = u === o || u === null || !e(o, u);
|
|
15
|
+
if (r.shiftKey) {
|
|
16
|
+
(u === c || d) && (r.preventDefault(), l?.focus());
|
|
15
17
|
return;
|
|
16
18
|
}
|
|
17
|
-
(
|
|
19
|
+
(u === l || d) && (r.preventDefault(), c?.focus());
|
|
18
20
|
}
|
|
19
21
|
//#endregion
|
|
20
|
-
export {
|
|
22
|
+
export { r as trapFocusInsidePanel };
|
|
@@ -9,5 +9,6 @@ export interface ListboxOptionRegistration {
|
|
|
9
9
|
}
|
|
10
10
|
export interface ListboxContext {
|
|
11
11
|
register: (registration: ListboxOptionRegistration) => () => void;
|
|
12
|
+
registerGeometry?: (token: string, element: HTMLElement) => () => void;
|
|
12
13
|
}
|
|
13
14
|
export declare const listboxContextKey: InjectionKey<ListboxContext>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ResolvedSelectionInventory, ResolvedSelectionOption } from './selectionContract';
|
|
2
|
+
import { SelectionKey } from './useSelectionRoving';
|
|
3
|
+
export declare const CLEAR_OPTION_TOKEN = "clear-option";
|
|
4
|
+
export interface ListboxCatalogOption<TKey extends SelectionKey> extends ResolvedSelectionOption<TKey> {
|
|
5
|
+
position: number;
|
|
6
|
+
rowIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export type ListboxCatalogEntry<TKey extends SelectionKey> = {
|
|
9
|
+
kind: 'option';
|
|
10
|
+
token: string;
|
|
11
|
+
record: ListboxCatalogOption<TKey>;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'group';
|
|
14
|
+
token: string;
|
|
15
|
+
label: string;
|
|
16
|
+
headerIndex: number;
|
|
17
|
+
endIndex: number;
|
|
18
|
+
records: readonly ListboxCatalogOption<TKey>[];
|
|
19
|
+
};
|
|
20
|
+
export interface ListboxNavigationOption<TKey extends SelectionKey> {
|
|
21
|
+
token: string;
|
|
22
|
+
value: TKey | null;
|
|
23
|
+
label: string;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
position: number;
|
|
26
|
+
rowIndex: number;
|
|
27
|
+
}
|
|
28
|
+
export type ListboxVirtualRow<TKey extends SelectionKey> = {
|
|
29
|
+
kind: 'clear';
|
|
30
|
+
key: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'header';
|
|
33
|
+
key: string;
|
|
34
|
+
entryToken: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'option';
|
|
37
|
+
key: string;
|
|
38
|
+
entryToken: string;
|
|
39
|
+
record: ListboxCatalogOption<TKey>;
|
|
40
|
+
};
|
|
41
|
+
/** Complete semantic inventory, independent of mounted viewport rows. */
|
|
42
|
+
export declare function createListboxInventory<TKey extends SelectionKey>(inventory: ResolvedSelectionInventory<TKey>, clearLabel: string | undefined, disabled: boolean): {
|
|
43
|
+
rows: ListboxVirtualRow<TKey>[];
|
|
44
|
+
entries: ListboxCatalogEntry<TKey>[];
|
|
45
|
+
entriesByToken: Map<string, ListboxCatalogEntry<TKey>>;
|
|
46
|
+
navigation: ListboxNavigationOption<TKey>[];
|
|
47
|
+
navigationByToken: Map<string, ListboxNavigationOption<TKey>>;
|
|
48
|
+
setSize: number;
|
|
49
|
+
};
|
|
50
|
+
/** A bounded DOM projection; a mounted group always includes at least one option and its accessible label. */
|
|
51
|
+
export declare function projectListboxEntries<TKey extends SelectionKey>(catalog: ReturnType<typeof createListboxInventory<TKey>>, rows: readonly ListboxVirtualRow<TKey>[]): ListboxCatalogEntry<TKey>[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//#region src/components/shared/_internal/listboxInventory.ts
|
|
2
|
+
var e = "clear-option";
|
|
3
|
+
function t(t, n, r) {
|
|
4
|
+
let i = [], a = [], o = [];
|
|
5
|
+
n !== void 0 && (i.push({
|
|
6
|
+
kind: "clear",
|
|
7
|
+
key: e
|
|
8
|
+
}), o.push({
|
|
9
|
+
token: e,
|
|
10
|
+
value: null,
|
|
11
|
+
label: n,
|
|
12
|
+
disabled: r,
|
|
13
|
+
position: 1,
|
|
14
|
+
rowIndex: 0
|
|
15
|
+
}));
|
|
16
|
+
function s(e, t) {
|
|
17
|
+
let n = {
|
|
18
|
+
...e,
|
|
19
|
+
position: o.length + 1,
|
|
20
|
+
rowIndex: i.length
|
|
21
|
+
};
|
|
22
|
+
return o.push({
|
|
23
|
+
token: e.token,
|
|
24
|
+
value: e.option.value,
|
|
25
|
+
label: e.option.label,
|
|
26
|
+
disabled: r || e.option.disabled === !0,
|
|
27
|
+
position: n.position,
|
|
28
|
+
rowIndex: n.rowIndex
|
|
29
|
+
}), i.push({
|
|
30
|
+
kind: "option",
|
|
31
|
+
key: e.token,
|
|
32
|
+
entryToken: t,
|
|
33
|
+
record: n
|
|
34
|
+
}), n;
|
|
35
|
+
}
|
|
36
|
+
for (let e of t.entries) if (e.kind === "option") a.push({
|
|
37
|
+
kind: "option",
|
|
38
|
+
token: e.token,
|
|
39
|
+
record: s(e.record, e.token)
|
|
40
|
+
});
|
|
41
|
+
else {
|
|
42
|
+
let t = i.length;
|
|
43
|
+
i.push({
|
|
44
|
+
kind: "header",
|
|
45
|
+
key: `header:${e.token}`,
|
|
46
|
+
entryToken: e.token
|
|
47
|
+
});
|
|
48
|
+
let n = e.records.map((t) => s(t, e.token));
|
|
49
|
+
a.push({
|
|
50
|
+
kind: "group",
|
|
51
|
+
token: e.token,
|
|
52
|
+
label: e.label,
|
|
53
|
+
headerIndex: t,
|
|
54
|
+
endIndex: i.length,
|
|
55
|
+
records: n
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
rows: i,
|
|
60
|
+
entries: a,
|
|
61
|
+
entriesByToken: new Map(a.map((e) => [e.token, e])),
|
|
62
|
+
navigation: o,
|
|
63
|
+
navigationByToken: new Map(o.map((e) => [e.token, e])),
|
|
64
|
+
setSize: o.length
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function n(e, t) {
|
|
68
|
+
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
69
|
+
for (let i of t) {
|
|
70
|
+
if (i.kind === "clear") continue;
|
|
71
|
+
let t = e.entriesByToken.get(i.entryToken);
|
|
72
|
+
if (!t) throw Error("SListbox: virtual row refers to a stale entry");
|
|
73
|
+
if (t.kind === "option") n.set(t.token, t);
|
|
74
|
+
else {
|
|
75
|
+
let e = r.get(t.token);
|
|
76
|
+
e || (e = /* @__PURE__ */ new Map(), r.set(t.token, e)), i.kind === "option" ? e.set(i.record.token, i.record) : e.size === 0 && e.set(t.records[0].token, t.records[0]), n.set(t.token, t);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return [...n.values()].map((e) => e.kind === "option" ? e : {
|
|
80
|
+
...e,
|
|
81
|
+
records: [...r.get(e.token).values()].sort((e, t) => e.rowIndex - t.rowIndex)
|
|
82
|
+
}).sort((e, t) => (e.kind === "option" ? e.record.rowIndex : e.headerIndex) - (t.kind === "option" ? t.record.rowIndex : t.headerIndex));
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
export { e as CLEAR_OPTION_TOKEN, t as createListboxInventory, n as projectListboxEntries };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
import { FloatingSizingElements } from '../../../composables/useFloatingPosition';
|
|
2
3
|
export type MenuDensity = 'compact' | 'comfortable';
|
|
3
4
|
export interface MenuItemRegistration {
|
|
4
5
|
readonly entryId: string;
|
|
@@ -15,5 +16,12 @@ export interface MenuContext {
|
|
|
15
16
|
density: Readonly<Ref<MenuDensity>>;
|
|
16
17
|
register: (registration: MenuItemRegistration) => () => void;
|
|
17
18
|
}
|
|
19
|
+
export interface MenuViewportRegistration extends FloatingSizingElements {
|
|
20
|
+
revealFocusedItem: () => void;
|
|
21
|
+
}
|
|
22
|
+
export interface MenuViewportContext {
|
|
23
|
+
register: (elements: MenuViewportRegistration) => () => void;
|
|
24
|
+
}
|
|
18
25
|
export declare const menuContextKey: InjectionKey<MenuContext>;
|
|
19
26
|
export declare const menuDepthKey: InjectionKey<number>;
|
|
27
|
+
export declare const menuViewportKey: InjectionKey<MenuViewportContext>;
|