@code0-tech/pictor 0.0.0-mvp.25 → 0.0.0-mvp.27
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/dist/assets/components/badge/Badge.style.css +1 -1
- package/dist/assets/components/button/Button.style.css +1 -1
- package/dist/assets/components/context-menu/ContextMenu.style.css +1 -0
- package/dist/assets/components/d-flow-folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.style.css +1 -1
- package/dist/assets/components/d-flow-panel/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow-suggestion/DFlowSuggestionSearchInput.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -1
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -1
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -1
- package/dist/assets/components/form/Input.style.css +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -1
- package/dist/components/avatar/Avatar.js +7 -7
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/Badge.js +57 -17
- package/dist/components/breadcrumb/Breadcrumb.js +5 -5
- package/dist/components/button/Button.js +8 -8
- package/dist/components/context-menu/ContextMenu.d.ts +31 -0
- package/dist/components/context-menu/ContextMenu.js +191 -0
- package/dist/components/d-application/DApplication.service.d.ts +5 -0
- package/dist/components/d-application/DApplication.service.js +9 -0
- package/dist/components/d-flow/DFlow.d.ts +5 -3
- package/dist/components/d-flow/DFlow.edges.hook.d.ts +2 -1
- package/dist/components/d-flow/DFlow.edges.hook.js +98 -136
- package/dist/components/d-flow/DFlow.js +214 -199
- package/dist/components/d-flow/DFlow.nodes.hook.d.ts +5 -1
- package/dist/components/d-flow/DFlow.nodes.hook.js +101 -123
- package/dist/components/d-flow/DFlow.service.d.ts +12 -7
- package/dist/components/d-flow/DFlow.service.js +117 -7
- package/dist/components/d-flow/{edge/DFlowEdge.d.ts → DFlowEdge.d.ts} +5 -3
- package/dist/components/d-flow/DFlowEdge.js +69 -0
- package/dist/components/d-flow/index.d.ts +1 -10
- package/dist/components/d-flow/index.js +9 -44
- package/dist/components/d-flow-data-type/DFlowDataType.service.d.ts +9 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.service.js +12 -10
- package/dist/components/{d-flow/data-type → d-flow-data-type}/DFlowDataType.view.d.ts +8 -2
- package/dist/components/d-flow-data-type/DFlowDataType.view.js +71 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.d.ts +2 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsKeyRule.js +3 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.d.ts +2 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeContainsTypeRule.js +4 -4
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.d.ts +2 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeParentRule.js +3 -3
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeReturnTypeRule.d.ts +2 -3
- package/dist/components/d-flow-data-type/rules/DFlowDataTypeReturnTypeRule.js +246 -0
- package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.d.ts +2 -3
- package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabDefault.d.ts +2 -3
- package/dist/components/d-flow-file/DFlowTabDefault.js +139 -0
- package/dist/components/{d-flow/tab → d-flow-file}/DFlowTabTrigger.d.ts +2 -2
- package/dist/components/d-flow-file/DFlowTabTrigger.js +75 -0
- package/dist/components/d-flow-file/DFlowTabs.d.ts +6 -0
- package/dist/components/d-flow-file/DFlowTabs.js +128 -0
- package/dist/components/d-flow-file/index.d.ts +1 -0
- package/dist/components/d-flow-file/index.js +4 -0
- package/dist/components/{d-flow/folder → d-flow-folder}/DFlowFolder.d.ts +11 -5
- package/dist/components/d-flow-folder/DFlowFolder.js +158 -0
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.d.ts +18 -0
- package/dist/components/d-flow-folder/DFlowFolderContextMenu.js +69 -0
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.d.ts +9 -0
- package/dist/components/d-flow-folder/DFlowFolderCreateDialog.js +76 -0
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.d.ts +5 -0
- package/dist/components/d-flow-folder/DFlowFolderItemPathInput.js +49 -0
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.d.ts +9 -0
- package/dist/components/d-flow-folder/DFlowFolderRenameDialog.js +55 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.d.ts +1 -1
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.input.hook.js +1 -1
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.return.hook.d.ts +2 -2
- package/dist/components/d-flow-function/DFlowFunction.return.hook.js +9 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.service.d.ts +1 -1
- package/dist/components/d-flow-function/DFlowFunction.service.js +12 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunction.view.d.ts +12 -0
- package/dist/components/d-flow-function/DFlowFunction.view.js +132 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionDefaultCard.d.ts +4 -4
- package/dist/components/d-flow-function/DFlowFunctionDefaultCard.js +120 -0
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.d.ts +13 -0
- package/dist/components/d-flow-function/DFlowFunctionGroupCard.js +68 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionSuggestionCard.d.ts +3 -4
- package/dist/components/d-flow-function/DFlowFunctionSuggestionCard.js +48 -0
- package/dist/components/{d-flow/function → d-flow-function}/DFlowFunctionTriggerCard.d.ts +3 -3
- package/dist/components/d-flow-function/DFlowFunctionTriggerCard.js +71 -0
- package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.d.ts +1 -1
- package/dist/components/{d-flow/input → d-flow-input}/DFlowInputDataType.js +175 -165
- package/dist/components/d-flow-panel/DFlowExport.js +32 -0
- package/dist/components/d-flow-panel/DFlowMiniMap.js +33 -0
- package/dist/components/d-flow-panel/DFlowPanelControl.d.ts +6 -0
- package/dist/components/d-flow-panel/DFlowPanelControl.js +70 -0
- package/dist/components/d-flow-panel/DFlowPanelLayout.d.ts +4 -0
- package/dist/components/d-flow-panel/DFlowPanelLayout.js +47 -0
- package/dist/components/d-flow-panel/DFlowPanelSize.d.ts +2 -0
- package/dist/components/d-flow-panel/DFlowPanelSize.js +94 -0
- package/dist/components/d-flow-panel/index.d.ts +5 -0
- package/dist/components/d-flow-panel/index.js +12 -0
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestion.hook.d.ts +0 -15
- package/dist/components/d-flow-suggestion/DFlowSuggestion.hook.js +161 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.d.ts +14 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestion.view.js +4 -0
- package/dist/components/d-flow-suggestion/DFlowSuggestionMenu.js +83 -0
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.d.ts +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.util.js +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.js +5 -5
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.d.ts +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuSearchBar.js +1 -1
- package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionSearchInput.d.ts +1 -1
- package/dist/components/d-flow-suggestion/DFlowSuggestionSearchInput.js +35 -0
- package/dist/components/d-flow-suggestion/index.d.ts +1 -0
- package/dist/components/d-flow-suggestion/index.js +4 -0
- package/dist/components/{d-flow/type → d-flow-type}/DFlowType.service.d.ts +1 -1
- package/dist/components/d-flow-type/DFlowType.service.js +12 -0
- package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.d.ts +6 -0
- package/dist/components/{d-flow/type → d-flow-type}/DFlowType.view.js +16 -10
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.d.ts +2 -0
- package/dist/components/d-flow-validation/DDataTypeValidation.hook.js +18 -0
- package/dist/components/d-flow-validation/DFlowValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DFlowValidation.hook.js +22 -0
- package/dist/components/d-flow-validation/DFlowValidation.js +66 -0
- package/dist/components/d-flow-validation/DNodeValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DNodeValidation.hook.js +62 -0
- package/dist/components/d-flow-validation/DValueValidation.hook.d.ts +3 -0
- package/dist/components/d-flow-validation/DValueValidation.hook.js +8 -0
- package/dist/components/{d-flow/validation → d-flow-validation}/index.js +2 -2
- package/dist/components/d-fullscreen/DFullScreen.js +2 -2
- package/dist/components/d-member/DNamespaceMemberContent.js +140 -92
- package/dist/components/d-member/DNamespaceMemberList.js +5 -5
- package/dist/components/d-organization/DOrganizationList.js +7 -7
- package/dist/components/d-organization/DOrganizationMenu.js +5 -5
- package/dist/components/d-organization/DOrganizatonContent.js +29 -29
- package/dist/components/d-project/DNamespaceProjectContent.js +6 -6
- package/dist/components/d-project/DNamespaceProjectList.js +5 -5
- package/dist/components/d-project/DNamespaceProjectMenu.js +51 -22
- package/dist/components/d-project/index.js +10 -9
- package/dist/components/d-resizable/DResizable.js +18 -17
- package/dist/components/d-role/DNamespaceRoleContent.js +11 -11
- package/dist/components/d-role/DNamespaceRolePermissions.js +5 -5
- package/dist/components/d-runtime/DRuntimeContent.js +10 -10
- package/dist/components/d-runtime/DRuntimeList.js +7 -7
- package/dist/components/d-user/DUser.session.hook.js +2 -2
- package/dist/components/d-user/DUserContent.js +19 -19
- package/dist/components/d-user/DUserInput.js +9 -9
- package/dist/components/d-user/DUserList.js +9 -9
- package/dist/components/file-tabs/FileTabs.js +2 -2
- package/dist/components/file-tabs/FileTabs.service.d.ts +5 -0
- package/dist/components/file-tabs/FileTabs.service.js +68 -16
- package/dist/components/file-tabs/FileTabs.view.d.ts +1 -0
- package/dist/components/form/CheckboxInput.js +4 -4
- package/dist/components/form/EmailInput.js +12 -12
- package/dist/components/form/Input.js +220 -206
- package/dist/components/form/Input.selection.hook.js +9 -9
- package/dist/components/form/Input.syntax.hook.js +7 -7
- package/dist/components/form/NumberInput.js +9 -9
- package/dist/components/form/PasswordInput.js +6 -6
- package/dist/components/form/SwitchInput.js +7 -7
- package/dist/components/form/TextInput.js +10 -10
- package/dist/components/segmented-control/SegmentedControl.d.ts +1 -1
- package/dist/components/segmented-control/SegmentedControl.js +14 -12
- package/dist/index.d.ts +8 -0
- package/dist/index.js +117 -117
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +527 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +402 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +208 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +53 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +222 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +636 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +219 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +27 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +7 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +2 -2
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +8 -8
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +112 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +68 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +71 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +25 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +11 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +15 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +30 -0
- package/dist/node_modules/tslib/tslib.es6.js +27 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +6 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +25 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +67 -0
- package/dist/utils/generics.d.ts +5 -6
- package/dist/utils/generics.js +2 -2
- package/dist/utils/objectStore.js +15 -15
- package/dist/utils/reactiveArrayService.js +5 -5
- package/package.json +7 -4
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +0 -1
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +0 -1
- package/dist/assets/components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css +0 -1
- package/dist/components/d-flow/DFlow.view.d.ts +0 -113
- package/dist/components/d-flow/DFlow.view.js +0 -248
- package/dist/components/d-flow/control/DFlowControl.d.ts +0 -2
- package/dist/components/d-flow/control/DFlowControl.js +0 -81
- package/dist/components/d-flow/control/index.d.ts +0 -1
- package/dist/components/d-flow/control/index.js +0 -4
- package/dist/components/d-flow/data-type/DFlowDataType.service.d.ts +0 -10
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.d.ts +0 -2
- package/dist/components/d-flow/data-type/DFlowDataType.validation.type.js +0 -18
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.d.ts +0 -4
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +0 -20
- package/dist/components/d-flow/data-type/DFlowDataType.view.js +0 -65
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +0 -243
- package/dist/components/d-flow/edge/DFlowEdge.js +0 -48
- package/dist/components/d-flow/export/DFlowExport.js +0 -24
- package/dist/components/d-flow/folder/DFlowFolder.js +0 -119
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +0 -11
- package/dist/components/d-flow/function/DFlowFunction.service.js +0 -9
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.d.ts +0 -10
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +0 -74
- package/dist/components/d-flow/function/DFlowFunction.view.js +0 -117
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +0 -158
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.d.ts +0 -5
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +0 -55
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +0 -26
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +0 -93
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +0 -22
- package/dist/components/d-flow/minimap/index.d.ts +0 -1
- package/dist/components/d-flow/minimap/index.js +0 -4
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +0 -150
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.d.ts +0 -5
- package/dist/components/d-flow/suggestion/DFlowSuggestion.service.js +0 -18
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.d.ts +0 -21
- package/dist/components/d-flow/suggestion/DFlowSuggestion.view.js +0 -25
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +0 -67
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +0 -35
- package/dist/components/d-flow/suggestion/index.d.ts +0 -2
- package/dist/components/d-flow/suggestion/index.js +0 -7
- package/dist/components/d-flow/tab/DFlowTabDefault.js +0 -103
- package/dist/components/d-flow/tab/DFlowTabTrigger.js +0 -51
- package/dist/components/d-flow/tab/DFlowTabs.d.ts +0 -2
- package/dist/components/d-flow/tab/DFlowTabs.js +0 -105
- package/dist/components/d-flow/type/DFlowType.service.js +0 -9
- package/dist/components/d-flow/validation/DFlowValidation.hook.d.ts +0 -3
- package/dist/components/d-flow/validation/DFlowValidation.hook.js +0 -10
- package/dist/components/d-flow/validation/DFlowValidation.js +0 -60
- /package/dist/assets/components/{d-flow/input → d-flow-input}/DFlowInputDataType.style.css +0 -0
- /package/dist/assets/components/{d-flow/validation → d-flow-validation}/DFlowValidation.style.css +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/index.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeItemOfCollectionRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeNumberRangeRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRegexRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRule.js +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.d.ts +0 -0
- /package/dist/components/{d-flow/data-type → d-flow-data-type}/rules/DFlowDataTypeRules.js +0 -0
- /package/dist/components/{d-flow/folder → d-flow-folder}/index.d.ts +0 -0
- /package/dist/components/{d-flow/folder → d-flow-folder}/index.js +0 -0
- /package/dist/components/{d-flow/function → d-flow-function}/index.d.ts +0 -0
- /package/dist/components/{d-flow/function → d-flow-function}/index.js +0 -0
- /package/dist/components/{d-flow/export → d-flow-panel}/DFlowExport.d.ts +0 -0
- /package/dist/components/{d-flow/minimap → d-flow-panel}/DFlowMiniMap.d.ts +0 -0
- /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenu.d.ts +0 -0
- /package/dist/components/{d-flow/suggestion → d-flow-suggestion}/DFlowSuggestionMenuFooter.d.ts +0 -0
- /package/dist/components/{d-flow/type → d-flow-type}/index.d.ts +0 -0
- /package/dist/components/{d-flow/type → d-flow-type}/index.js +0 -0
- /package/dist/components/{d-flow/validation → d-flow-validation}/DFlowValidation.d.ts +0 -0
- /package/dist/components/{d-flow/validation → d-flow-validation}/index.d.ts +0 -0
|
@@ -0,0 +1,636 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { composeEventHandlers as v } from "../../primitive/dist/index.js";
|
|
3
|
+
import { createCollection as ze } from "../../react-collection/dist/index.js";
|
|
4
|
+
import { useComposedRefs as D, composeRefs as Ze } from "../../react-compose-refs/dist/index.js";
|
|
5
|
+
import { createContextScope as $e } from "../../react-context/dist/index.js";
|
|
6
|
+
import { useDirection as qe } from "../../react-direction/dist/index.js";
|
|
7
|
+
import { DismissableLayer as Je } from "../../react-dismissable-layer/dist/index.js";
|
|
8
|
+
import { useFocusGuards as Qe } from "../../react-focus-guards/dist/index.js";
|
|
9
|
+
import { FocusScope as et } from "../../react-focus-scope/dist/index.js";
|
|
10
|
+
import { useId as de } from "../../react-id/dist/index.js";
|
|
11
|
+
import { createPopperScope as pe, Root as me, Anchor as tt, Arrow as nt, Content as ot } from "../../react-popper/dist/index.js";
|
|
12
|
+
import { Portal as rt } from "../../react-portal/dist/index.js";
|
|
13
|
+
import { Presence as X } from "../../react-presence/dist/index.js";
|
|
14
|
+
import { Primitive as N, dispatchDiscreteCustomEvent as ct } from "../../react-primitive/dist/index.js";
|
|
15
|
+
import { createRovingFocusGroupScope as he, Item as at, Root as st } from "../../react-roving-focus/dist/index.js";
|
|
16
|
+
import { createSlot as ut } from "../../react-slot/dist/index.js";
|
|
17
|
+
import { useCallbackRef as q } from "../../react-use-callback-ref/dist/index.js";
|
|
18
|
+
import { hideOthers as it } from "../../../aria-hidden/dist/es2015/index.js";
|
|
19
|
+
import lt from "../../../react-remove-scroll/dist/es2015/Combination.js";
|
|
20
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
21
|
+
var $ = ["Enter", " "], dt = ["ArrowDown", "PageUp", "Home"], Me = ["ArrowUp", "PageDown", "End"], ft = [...dt, ...Me], pt = {
|
|
22
|
+
ltr: [...$, "ArrowRight"],
|
|
23
|
+
rtl: [...$, "ArrowLeft"]
|
|
24
|
+
}, mt = {
|
|
25
|
+
ltr: ["ArrowLeft"],
|
|
26
|
+
rtl: ["ArrowRight"]
|
|
27
|
+
}, F = "Menu", [O, ht, Mt] = ze(F), [P, on] = $e(F, [
|
|
28
|
+
Mt,
|
|
29
|
+
pe,
|
|
30
|
+
he
|
|
31
|
+
]), L = pe(), ve = he(), [Ce, R] = P(F), [vt, K] = P(F), ge = (e) => {
|
|
32
|
+
const { __scopeMenu: n, open: t = !1, children: r, dir: u, onOpenChange: c, modal: d = !0 } = e, m = L(n), [h, p] = o.useState(null), l = o.useRef(!1), a = q(c), f = qe(u);
|
|
33
|
+
return o.useEffect(() => {
|
|
34
|
+
const g = () => {
|
|
35
|
+
l.current = !0, document.addEventListener("pointerdown", M, { capture: !0, once: !0 }), document.addEventListener("pointermove", M, { capture: !0, once: !0 });
|
|
36
|
+
}, M = () => l.current = !1;
|
|
37
|
+
return document.addEventListener("keydown", g, { capture: !0 }), () => {
|
|
38
|
+
document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", M, { capture: !0 }), document.removeEventListener("pointermove", M, { capture: !0 });
|
|
39
|
+
};
|
|
40
|
+
}, []), /* @__PURE__ */ s(me, { ...m, children: /* @__PURE__ */ s(
|
|
41
|
+
Ce,
|
|
42
|
+
{
|
|
43
|
+
scope: n,
|
|
44
|
+
open: t,
|
|
45
|
+
onOpenChange: a,
|
|
46
|
+
content: h,
|
|
47
|
+
onContentChange: p,
|
|
48
|
+
children: /* @__PURE__ */ s(
|
|
49
|
+
vt,
|
|
50
|
+
{
|
|
51
|
+
scope: n,
|
|
52
|
+
onClose: o.useCallback(() => a(!1), [a]),
|
|
53
|
+
isUsingKeyboardRef: l,
|
|
54
|
+
dir: f,
|
|
55
|
+
modal: d,
|
|
56
|
+
children: r
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
) });
|
|
61
|
+
};
|
|
62
|
+
ge.displayName = F;
|
|
63
|
+
var Ct = "MenuAnchor", J = o.forwardRef(
|
|
64
|
+
(e, n) => {
|
|
65
|
+
const { __scopeMenu: t, ...r } = e, u = L(t);
|
|
66
|
+
return /* @__PURE__ */ s(tt, { ...u, ...r, ref: n });
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
J.displayName = Ct;
|
|
70
|
+
var Q = "MenuPortal", [gt, _e] = P(Q, {
|
|
71
|
+
forceMount: void 0
|
|
72
|
+
}), Re = (e) => {
|
|
73
|
+
const { __scopeMenu: n, forceMount: t, children: r, container: u } = e, c = R(Q, n);
|
|
74
|
+
return /* @__PURE__ */ s(gt, { scope: n, forceMount: t, children: /* @__PURE__ */ s(X, { present: t || c.open, children: /* @__PURE__ */ s(rt, { asChild: !0, container: u, children: r }) }) });
|
|
75
|
+
};
|
|
76
|
+
Re.displayName = Q;
|
|
77
|
+
var _ = "MenuContent", [_t, ee] = P(_), Se = o.forwardRef(
|
|
78
|
+
(e, n) => {
|
|
79
|
+
const t = _e(_, e.__scopeMenu), { forceMount: r = t.forceMount, ...u } = e, c = R(_, e.__scopeMenu), d = K(_, e.__scopeMenu);
|
|
80
|
+
return /* @__PURE__ */ s(O.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(X, { present: r || c.open, children: /* @__PURE__ */ s(O.Slot, { scope: e.__scopeMenu, children: d.modal ? /* @__PURE__ */ s(Rt, { ...u, ref: n }) : /* @__PURE__ */ s(St, { ...u, ref: n }) }) }) });
|
|
81
|
+
}
|
|
82
|
+
), Rt = o.forwardRef(
|
|
83
|
+
(e, n) => {
|
|
84
|
+
const t = R(_, e.__scopeMenu), r = o.useRef(null), u = D(n, r);
|
|
85
|
+
return o.useEffect(() => {
|
|
86
|
+
const c = r.current;
|
|
87
|
+
if (c) return it(c);
|
|
88
|
+
}, []), /* @__PURE__ */ s(
|
|
89
|
+
te,
|
|
90
|
+
{
|
|
91
|
+
...e,
|
|
92
|
+
ref: u,
|
|
93
|
+
trapFocus: t.open,
|
|
94
|
+
disableOutsidePointerEvents: t.open,
|
|
95
|
+
disableOutsideScroll: !0,
|
|
96
|
+
onFocusOutside: v(
|
|
97
|
+
e.onFocusOutside,
|
|
98
|
+
(c) => c.preventDefault(),
|
|
99
|
+
{ checkForDefaultPrevented: !1 }
|
|
100
|
+
),
|
|
101
|
+
onDismiss: () => t.onOpenChange(!1)
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
), St = o.forwardRef((e, n) => {
|
|
106
|
+
const t = R(_, e.__scopeMenu);
|
|
107
|
+
return /* @__PURE__ */ s(
|
|
108
|
+
te,
|
|
109
|
+
{
|
|
110
|
+
...e,
|
|
111
|
+
ref: n,
|
|
112
|
+
trapFocus: !1,
|
|
113
|
+
disableOutsidePointerEvents: !1,
|
|
114
|
+
disableOutsideScroll: !1,
|
|
115
|
+
onDismiss: () => t.onOpenChange(!1)
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}), Pt = ut("MenuContent.ScrollLock"), te = o.forwardRef(
|
|
119
|
+
(e, n) => {
|
|
120
|
+
const {
|
|
121
|
+
__scopeMenu: t,
|
|
122
|
+
loop: r = !1,
|
|
123
|
+
trapFocus: u,
|
|
124
|
+
onOpenAutoFocus: c,
|
|
125
|
+
onCloseAutoFocus: d,
|
|
126
|
+
disableOutsidePointerEvents: m,
|
|
127
|
+
onEntryFocus: h,
|
|
128
|
+
onEscapeKeyDown: p,
|
|
129
|
+
onPointerDownOutside: l,
|
|
130
|
+
onFocusOutside: a,
|
|
131
|
+
onInteractOutside: f,
|
|
132
|
+
onDismiss: g,
|
|
133
|
+
disableOutsideScroll: M,
|
|
134
|
+
...E
|
|
135
|
+
} = e, x = R(_, t), w = K(_, t), Ue = L(t), Be = ve(t), ae = ht(t), [Ve, se] = o.useState(null), G = o.useRef(null), Ye = D(n, G, x.onContentChange), U = o.useRef(0), B = o.useRef(""), Xe = o.useRef(0), H = o.useRef(null), ue = o.useRef("right"), W = o.useRef(0), je = M ? lt : o.Fragment, He = M ? { as: Pt, allowPinchZoom: !0 } : void 0, We = (i) => {
|
|
136
|
+
const y = B.current + i, S = ae().filter((C) => !C.disabled), b = document.activeElement, z = S.find((C) => C.ref.current === b)?.textValue, Z = S.map((C) => C.textValue), ie = Nt(Z, y, z), T = S.find((C) => C.textValue === ie)?.ref.current;
|
|
137
|
+
(function C(le) {
|
|
138
|
+
B.current = le, window.clearTimeout(U.current), le !== "" && (U.current = window.setTimeout(() => C(""), 1e3));
|
|
139
|
+
})(y), T && setTimeout(() => T.focus());
|
|
140
|
+
};
|
|
141
|
+
o.useEffect(() => () => window.clearTimeout(U.current), []), Qe();
|
|
142
|
+
const I = o.useCallback((i) => ue.current === H.current?.side && Lt(i, H.current?.area), []);
|
|
143
|
+
return /* @__PURE__ */ s(
|
|
144
|
+
_t,
|
|
145
|
+
{
|
|
146
|
+
scope: t,
|
|
147
|
+
searchRef: B,
|
|
148
|
+
onItemEnter: o.useCallback(
|
|
149
|
+
(i) => {
|
|
150
|
+
I(i) && i.preventDefault();
|
|
151
|
+
},
|
|
152
|
+
[I]
|
|
153
|
+
),
|
|
154
|
+
onItemLeave: o.useCallback(
|
|
155
|
+
(i) => {
|
|
156
|
+
I(i) || (G.current?.focus(), se(null));
|
|
157
|
+
},
|
|
158
|
+
[I]
|
|
159
|
+
),
|
|
160
|
+
onTriggerLeave: o.useCallback(
|
|
161
|
+
(i) => {
|
|
162
|
+
I(i) && i.preventDefault();
|
|
163
|
+
},
|
|
164
|
+
[I]
|
|
165
|
+
),
|
|
166
|
+
pointerGraceTimerRef: Xe,
|
|
167
|
+
onPointerGraceIntentChange: o.useCallback((i) => {
|
|
168
|
+
H.current = i;
|
|
169
|
+
}, []),
|
|
170
|
+
children: /* @__PURE__ */ s(je, { ...He, children: /* @__PURE__ */ s(
|
|
171
|
+
et,
|
|
172
|
+
{
|
|
173
|
+
asChild: !0,
|
|
174
|
+
trapped: u,
|
|
175
|
+
onMountAutoFocus: v(c, (i) => {
|
|
176
|
+
i.preventDefault(), G.current?.focus({ preventScroll: !0 });
|
|
177
|
+
}),
|
|
178
|
+
onUnmountAutoFocus: d,
|
|
179
|
+
children: /* @__PURE__ */ s(
|
|
180
|
+
Je,
|
|
181
|
+
{
|
|
182
|
+
asChild: !0,
|
|
183
|
+
disableOutsidePointerEvents: m,
|
|
184
|
+
onEscapeKeyDown: p,
|
|
185
|
+
onPointerDownOutside: l,
|
|
186
|
+
onFocusOutside: a,
|
|
187
|
+
onInteractOutside: f,
|
|
188
|
+
onDismiss: g,
|
|
189
|
+
children: /* @__PURE__ */ s(
|
|
190
|
+
st,
|
|
191
|
+
{
|
|
192
|
+
asChild: !0,
|
|
193
|
+
...Be,
|
|
194
|
+
dir: w.dir,
|
|
195
|
+
orientation: "vertical",
|
|
196
|
+
loop: r,
|
|
197
|
+
currentTabStopId: Ve,
|
|
198
|
+
onCurrentTabStopIdChange: se,
|
|
199
|
+
onEntryFocus: v(h, (i) => {
|
|
200
|
+
w.isUsingKeyboardRef.current || i.preventDefault();
|
|
201
|
+
}),
|
|
202
|
+
preventScrollOnEntryFocus: !0,
|
|
203
|
+
children: /* @__PURE__ */ s(
|
|
204
|
+
ot,
|
|
205
|
+
{
|
|
206
|
+
role: "menu",
|
|
207
|
+
"aria-orientation": "vertical",
|
|
208
|
+
"data-state": Ge(x.open),
|
|
209
|
+
"data-radix-menu-content": "",
|
|
210
|
+
dir: w.dir,
|
|
211
|
+
...Ue,
|
|
212
|
+
...E,
|
|
213
|
+
ref: Ye,
|
|
214
|
+
style: { outline: "none", ...E.style },
|
|
215
|
+
onKeyDown: v(E.onKeyDown, (i) => {
|
|
216
|
+
const S = i.target.closest("[data-radix-menu-content]") === i.currentTarget, b = i.ctrlKey || i.altKey || i.metaKey, z = i.key.length === 1;
|
|
217
|
+
S && (i.key === "Tab" && i.preventDefault(), !b && z && We(i.key));
|
|
218
|
+
const Z = G.current;
|
|
219
|
+
if (i.target !== Z || !ft.includes(i.key)) return;
|
|
220
|
+
i.preventDefault();
|
|
221
|
+
const T = ae().filter((C) => !C.disabled).map((C) => C.ref.current);
|
|
222
|
+
Me.includes(i.key) && T.reverse(), kt(T);
|
|
223
|
+
}),
|
|
224
|
+
onBlur: v(e.onBlur, (i) => {
|
|
225
|
+
i.currentTarget.contains(i.target) || (window.clearTimeout(U.current), B.current = "");
|
|
226
|
+
}),
|
|
227
|
+
onPointerMove: v(
|
|
228
|
+
e.onPointerMove,
|
|
229
|
+
k((i) => {
|
|
230
|
+
const y = i.target, S = W.current !== i.clientX;
|
|
231
|
+
if (i.currentTarget.contains(y) && S) {
|
|
232
|
+
const b = i.clientX > W.current ? "right" : "left";
|
|
233
|
+
ue.current = b, W.current = i.clientX;
|
|
234
|
+
}
|
|
235
|
+
})
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
) })
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
Se.displayName = _;
|
|
250
|
+
var Et = "MenuGroup", ne = o.forwardRef(
|
|
251
|
+
(e, n) => {
|
|
252
|
+
const { __scopeMenu: t, ...r } = e;
|
|
253
|
+
return /* @__PURE__ */ s(N.div, { role: "group", ...r, ref: n });
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
ne.displayName = Et;
|
|
257
|
+
var wt = "MenuLabel", Pe = o.forwardRef(
|
|
258
|
+
(e, n) => {
|
|
259
|
+
const { __scopeMenu: t, ...r } = e;
|
|
260
|
+
return /* @__PURE__ */ s(N.div, { ...r, ref: n });
|
|
261
|
+
}
|
|
262
|
+
);
|
|
263
|
+
Pe.displayName = wt;
|
|
264
|
+
var V = "MenuItem", fe = "menu.itemSelect", j = o.forwardRef(
|
|
265
|
+
(e, n) => {
|
|
266
|
+
const { disabled: t = !1, onSelect: r, ...u } = e, c = o.useRef(null), d = K(V, e.__scopeMenu), m = ee(V, e.__scopeMenu), h = D(n, c), p = o.useRef(!1), l = () => {
|
|
267
|
+
const a = c.current;
|
|
268
|
+
if (!t && a) {
|
|
269
|
+
const f = new CustomEvent(fe, { bubbles: !0, cancelable: !0 });
|
|
270
|
+
a.addEventListener(fe, (g) => r?.(g), { once: !0 }), ct(a, f), f.defaultPrevented ? p.current = !1 : d.onClose();
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
return /* @__PURE__ */ s(
|
|
274
|
+
Ee,
|
|
275
|
+
{
|
|
276
|
+
...u,
|
|
277
|
+
ref: h,
|
|
278
|
+
disabled: t,
|
|
279
|
+
onClick: v(e.onClick, l),
|
|
280
|
+
onPointerDown: (a) => {
|
|
281
|
+
e.onPointerDown?.(a), p.current = !0;
|
|
282
|
+
},
|
|
283
|
+
onPointerUp: v(e.onPointerUp, (a) => {
|
|
284
|
+
p.current || a.currentTarget?.click();
|
|
285
|
+
}),
|
|
286
|
+
onKeyDown: v(e.onKeyDown, (a) => {
|
|
287
|
+
const f = m.searchRef.current !== "";
|
|
288
|
+
t || f && a.key === " " || $.includes(a.key) && (a.currentTarget.click(), a.preventDefault());
|
|
289
|
+
})
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
j.displayName = V;
|
|
295
|
+
var Ee = o.forwardRef(
|
|
296
|
+
(e, n) => {
|
|
297
|
+
const { __scopeMenu: t, disabled: r = !1, textValue: u, ...c } = e, d = ee(V, t), m = ve(t), h = o.useRef(null), p = D(n, h), [l, a] = o.useState(!1), [f, g] = o.useState("");
|
|
298
|
+
return o.useEffect(() => {
|
|
299
|
+
const M = h.current;
|
|
300
|
+
M && g((M.textContent ?? "").trim());
|
|
301
|
+
}, [c.children]), /* @__PURE__ */ s(
|
|
302
|
+
O.ItemSlot,
|
|
303
|
+
{
|
|
304
|
+
scope: t,
|
|
305
|
+
disabled: r,
|
|
306
|
+
textValue: u ?? f,
|
|
307
|
+
children: /* @__PURE__ */ s(at, { asChild: !0, ...m, focusable: !r, children: /* @__PURE__ */ s(
|
|
308
|
+
N.div,
|
|
309
|
+
{
|
|
310
|
+
role: "menuitem",
|
|
311
|
+
"data-highlighted": l ? "" : void 0,
|
|
312
|
+
"aria-disabled": r || void 0,
|
|
313
|
+
"data-disabled": r ? "" : void 0,
|
|
314
|
+
...c,
|
|
315
|
+
ref: p,
|
|
316
|
+
onPointerMove: v(
|
|
317
|
+
e.onPointerMove,
|
|
318
|
+
k((M) => {
|
|
319
|
+
r ? d.onItemLeave(M) : (d.onItemEnter(M), M.defaultPrevented || M.currentTarget.focus({ preventScroll: !0 }));
|
|
320
|
+
})
|
|
321
|
+
),
|
|
322
|
+
onPointerLeave: v(
|
|
323
|
+
e.onPointerLeave,
|
|
324
|
+
k((M) => d.onItemLeave(M))
|
|
325
|
+
),
|
|
326
|
+
onFocus: v(e.onFocus, () => a(!0)),
|
|
327
|
+
onBlur: v(e.onBlur, () => a(!1))
|
|
328
|
+
}
|
|
329
|
+
) })
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
), It = "MenuCheckboxItem", we = o.forwardRef(
|
|
334
|
+
(e, n) => {
|
|
335
|
+
const { checked: t = !1, onCheckedChange: r, ...u } = e;
|
|
336
|
+
return /* @__PURE__ */ s(Te, { scope: e.__scopeMenu, checked: t, children: /* @__PURE__ */ s(
|
|
337
|
+
j,
|
|
338
|
+
{
|
|
339
|
+
role: "menuitemcheckbox",
|
|
340
|
+
"aria-checked": Y(t) ? "mixed" : t,
|
|
341
|
+
...u,
|
|
342
|
+
ref: n,
|
|
343
|
+
"data-state": ce(t),
|
|
344
|
+
onSelect: v(
|
|
345
|
+
u.onSelect,
|
|
346
|
+
() => r?.(Y(t) ? !0 : !t),
|
|
347
|
+
{ checkForDefaultPrevented: !1 }
|
|
348
|
+
)
|
|
349
|
+
}
|
|
350
|
+
) });
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
we.displayName = It;
|
|
354
|
+
var Ie = "MenuRadioGroup", [yt, xt] = P(
|
|
355
|
+
Ie,
|
|
356
|
+
{ value: void 0, onValueChange: () => {
|
|
357
|
+
} }
|
|
358
|
+
), ye = o.forwardRef(
|
|
359
|
+
(e, n) => {
|
|
360
|
+
const { value: t, onValueChange: r, ...u } = e, c = q(r);
|
|
361
|
+
return /* @__PURE__ */ s(yt, { scope: e.__scopeMenu, value: t, onValueChange: c, children: /* @__PURE__ */ s(ne, { ...u, ref: n }) });
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
ye.displayName = Ie;
|
|
365
|
+
var xe = "MenuRadioItem", be = o.forwardRef(
|
|
366
|
+
(e, n) => {
|
|
367
|
+
const { value: t, ...r } = e, u = xt(xe, e.__scopeMenu), c = t === u.value;
|
|
368
|
+
return /* @__PURE__ */ s(Te, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ s(
|
|
369
|
+
j,
|
|
370
|
+
{
|
|
371
|
+
role: "menuitemradio",
|
|
372
|
+
"aria-checked": c,
|
|
373
|
+
...r,
|
|
374
|
+
ref: n,
|
|
375
|
+
"data-state": ce(c),
|
|
376
|
+
onSelect: v(
|
|
377
|
+
r.onSelect,
|
|
378
|
+
() => u.onValueChange?.(t),
|
|
379
|
+
{ checkForDefaultPrevented: !1 }
|
|
380
|
+
)
|
|
381
|
+
}
|
|
382
|
+
) });
|
|
383
|
+
}
|
|
384
|
+
);
|
|
385
|
+
be.displayName = xe;
|
|
386
|
+
var oe = "MenuItemIndicator", [Te, bt] = P(
|
|
387
|
+
oe,
|
|
388
|
+
{ checked: !1 }
|
|
389
|
+
), Ae = o.forwardRef(
|
|
390
|
+
(e, n) => {
|
|
391
|
+
const { __scopeMenu: t, forceMount: r, ...u } = e, c = bt(oe, t);
|
|
392
|
+
return /* @__PURE__ */ s(
|
|
393
|
+
X,
|
|
394
|
+
{
|
|
395
|
+
present: r || Y(c.checked) || c.checked === !0,
|
|
396
|
+
children: /* @__PURE__ */ s(
|
|
397
|
+
N.span,
|
|
398
|
+
{
|
|
399
|
+
...u,
|
|
400
|
+
ref: n,
|
|
401
|
+
"data-state": ce(c.checked)
|
|
402
|
+
}
|
|
403
|
+
)
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
);
|
|
408
|
+
Ae.displayName = oe;
|
|
409
|
+
var Tt = "MenuSeparator", Oe = o.forwardRef(
|
|
410
|
+
(e, n) => {
|
|
411
|
+
const { __scopeMenu: t, ...r } = e;
|
|
412
|
+
return /* @__PURE__ */ s(
|
|
413
|
+
N.div,
|
|
414
|
+
{
|
|
415
|
+
role: "separator",
|
|
416
|
+
"aria-orientation": "horizontal",
|
|
417
|
+
...r,
|
|
418
|
+
ref: n
|
|
419
|
+
}
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
Oe.displayName = Tt;
|
|
424
|
+
var At = "MenuArrow", ke = o.forwardRef(
|
|
425
|
+
(e, n) => {
|
|
426
|
+
const { __scopeMenu: t, ...r } = e, u = L(t);
|
|
427
|
+
return /* @__PURE__ */ s(nt, { ...u, ...r, ref: n });
|
|
428
|
+
}
|
|
429
|
+
);
|
|
430
|
+
ke.displayName = At;
|
|
431
|
+
var re = "MenuSub", [Ot, De] = P(re), Ne = (e) => {
|
|
432
|
+
const { __scopeMenu: n, children: t, open: r = !1, onOpenChange: u } = e, c = R(re, n), d = L(n), [m, h] = o.useState(null), [p, l] = o.useState(null), a = q(u);
|
|
433
|
+
return o.useEffect(() => (c.open === !1 && a(!1), () => a(!1)), [c.open, a]), /* @__PURE__ */ s(me, { ...d, children: /* @__PURE__ */ s(
|
|
434
|
+
Ce,
|
|
435
|
+
{
|
|
436
|
+
scope: n,
|
|
437
|
+
open: r,
|
|
438
|
+
onOpenChange: a,
|
|
439
|
+
content: p,
|
|
440
|
+
onContentChange: l,
|
|
441
|
+
children: /* @__PURE__ */ s(
|
|
442
|
+
Ot,
|
|
443
|
+
{
|
|
444
|
+
scope: n,
|
|
445
|
+
contentId: de(),
|
|
446
|
+
triggerId: de(),
|
|
447
|
+
trigger: m,
|
|
448
|
+
onTriggerChange: h,
|
|
449
|
+
children: t
|
|
450
|
+
}
|
|
451
|
+
)
|
|
452
|
+
}
|
|
453
|
+
) });
|
|
454
|
+
};
|
|
455
|
+
Ne.displayName = re;
|
|
456
|
+
var A = "MenuSubTrigger", Fe = o.forwardRef(
|
|
457
|
+
(e, n) => {
|
|
458
|
+
const t = R(A, e.__scopeMenu), r = K(A, e.__scopeMenu), u = De(A, e.__scopeMenu), c = ee(A, e.__scopeMenu), d = o.useRef(null), { pointerGraceTimerRef: m, onPointerGraceIntentChange: h } = c, p = { __scopeMenu: e.__scopeMenu }, l = o.useCallback(() => {
|
|
459
|
+
d.current && window.clearTimeout(d.current), d.current = null;
|
|
460
|
+
}, []);
|
|
461
|
+
return o.useEffect(() => l, [l]), o.useEffect(() => {
|
|
462
|
+
const a = m.current;
|
|
463
|
+
return () => {
|
|
464
|
+
window.clearTimeout(a), h(null);
|
|
465
|
+
};
|
|
466
|
+
}, [m, h]), /* @__PURE__ */ s(J, { asChild: !0, ...p, children: /* @__PURE__ */ s(
|
|
467
|
+
Ee,
|
|
468
|
+
{
|
|
469
|
+
id: u.triggerId,
|
|
470
|
+
"aria-haspopup": "menu",
|
|
471
|
+
"aria-expanded": t.open,
|
|
472
|
+
"aria-controls": u.contentId,
|
|
473
|
+
"data-state": Ge(t.open),
|
|
474
|
+
...e,
|
|
475
|
+
ref: Ze(n, u.onTriggerChange),
|
|
476
|
+
onClick: (a) => {
|
|
477
|
+
e.onClick?.(a), !(e.disabled || a.defaultPrevented) && (a.currentTarget.focus(), t.open || t.onOpenChange(!0));
|
|
478
|
+
},
|
|
479
|
+
onPointerMove: v(
|
|
480
|
+
e.onPointerMove,
|
|
481
|
+
k((a) => {
|
|
482
|
+
c.onItemEnter(a), !a.defaultPrevented && !e.disabled && !t.open && !d.current && (c.onPointerGraceIntentChange(null), d.current = window.setTimeout(() => {
|
|
483
|
+
t.onOpenChange(!0), l();
|
|
484
|
+
}, 100));
|
|
485
|
+
})
|
|
486
|
+
),
|
|
487
|
+
onPointerLeave: v(
|
|
488
|
+
e.onPointerLeave,
|
|
489
|
+
k((a) => {
|
|
490
|
+
l();
|
|
491
|
+
const f = t.content?.getBoundingClientRect();
|
|
492
|
+
if (f) {
|
|
493
|
+
const g = t.content?.dataset.side, M = g === "right", E = M ? -5 : 5, x = f[M ? "left" : "right"], w = f[M ? "right" : "left"];
|
|
494
|
+
c.onPointerGraceIntentChange({
|
|
495
|
+
area: [
|
|
496
|
+
// Apply a bleed on clientX to ensure that our exit point is
|
|
497
|
+
// consistently within polygon bounds
|
|
498
|
+
{ x: a.clientX + E, y: a.clientY },
|
|
499
|
+
{ x, y: f.top },
|
|
500
|
+
{ x: w, y: f.top },
|
|
501
|
+
{ x: w, y: f.bottom },
|
|
502
|
+
{ x, y: f.bottom }
|
|
503
|
+
],
|
|
504
|
+
side: g
|
|
505
|
+
}), window.clearTimeout(m.current), m.current = window.setTimeout(
|
|
506
|
+
() => c.onPointerGraceIntentChange(null),
|
|
507
|
+
300
|
|
508
|
+
);
|
|
509
|
+
} else {
|
|
510
|
+
if (c.onTriggerLeave(a), a.defaultPrevented) return;
|
|
511
|
+
c.onPointerGraceIntentChange(null);
|
|
512
|
+
}
|
|
513
|
+
})
|
|
514
|
+
),
|
|
515
|
+
onKeyDown: v(e.onKeyDown, (a) => {
|
|
516
|
+
const f = c.searchRef.current !== "";
|
|
517
|
+
e.disabled || f && a.key === " " || pt[r.dir].includes(a.key) && (t.onOpenChange(!0), t.content?.focus(), a.preventDefault());
|
|
518
|
+
})
|
|
519
|
+
}
|
|
520
|
+
) });
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
Fe.displayName = A;
|
|
524
|
+
var Le = "MenuSubContent", Ke = o.forwardRef(
|
|
525
|
+
(e, n) => {
|
|
526
|
+
const t = _e(_, e.__scopeMenu), { forceMount: r = t.forceMount, ...u } = e, c = R(_, e.__scopeMenu), d = K(_, e.__scopeMenu), m = De(Le, e.__scopeMenu), h = o.useRef(null), p = D(n, h);
|
|
527
|
+
return /* @__PURE__ */ s(O.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(X, { present: r || c.open, children: /* @__PURE__ */ s(O.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ s(
|
|
528
|
+
te,
|
|
529
|
+
{
|
|
530
|
+
id: m.contentId,
|
|
531
|
+
"aria-labelledby": m.triggerId,
|
|
532
|
+
...u,
|
|
533
|
+
ref: p,
|
|
534
|
+
align: "start",
|
|
535
|
+
side: d.dir === "rtl" ? "left" : "right",
|
|
536
|
+
disableOutsidePointerEvents: !1,
|
|
537
|
+
disableOutsideScroll: !1,
|
|
538
|
+
trapFocus: !1,
|
|
539
|
+
onOpenAutoFocus: (l) => {
|
|
540
|
+
d.isUsingKeyboardRef.current && h.current?.focus(), l.preventDefault();
|
|
541
|
+
},
|
|
542
|
+
onCloseAutoFocus: (l) => l.preventDefault(),
|
|
543
|
+
onFocusOutside: v(e.onFocusOutside, (l) => {
|
|
544
|
+
l.target !== m.trigger && c.onOpenChange(!1);
|
|
545
|
+
}),
|
|
546
|
+
onEscapeKeyDown: v(e.onEscapeKeyDown, (l) => {
|
|
547
|
+
d.onClose(), l.preventDefault();
|
|
548
|
+
}),
|
|
549
|
+
onKeyDown: v(e.onKeyDown, (l) => {
|
|
550
|
+
const a = l.currentTarget.contains(l.target), f = mt[d.dir].includes(l.key);
|
|
551
|
+
a && f && (c.onOpenChange(!1), m.trigger?.focus(), l.preventDefault());
|
|
552
|
+
})
|
|
553
|
+
}
|
|
554
|
+
) }) }) });
|
|
555
|
+
}
|
|
556
|
+
);
|
|
557
|
+
Ke.displayName = Le;
|
|
558
|
+
function Ge(e) {
|
|
559
|
+
return e ? "open" : "closed";
|
|
560
|
+
}
|
|
561
|
+
function Y(e) {
|
|
562
|
+
return e === "indeterminate";
|
|
563
|
+
}
|
|
564
|
+
function ce(e) {
|
|
565
|
+
return Y(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
566
|
+
}
|
|
567
|
+
function kt(e) {
|
|
568
|
+
const n = document.activeElement;
|
|
569
|
+
for (const t of e)
|
|
570
|
+
if (t === n || (t.focus(), document.activeElement !== n)) return;
|
|
571
|
+
}
|
|
572
|
+
function Dt(e, n) {
|
|
573
|
+
return e.map((t, r) => e[(n + r) % e.length]);
|
|
574
|
+
}
|
|
575
|
+
function Nt(e, n, t) {
|
|
576
|
+
const u = n.length > 1 && Array.from(n).every((p) => p === n[0]) ? n[0] : n, c = t ? e.indexOf(t) : -1;
|
|
577
|
+
let d = Dt(e, Math.max(c, 0));
|
|
578
|
+
u.length === 1 && (d = d.filter((p) => p !== t));
|
|
579
|
+
const h = d.find(
|
|
580
|
+
(p) => p.toLowerCase().startsWith(u.toLowerCase())
|
|
581
|
+
);
|
|
582
|
+
return h !== t ? h : void 0;
|
|
583
|
+
}
|
|
584
|
+
function Ft(e, n) {
|
|
585
|
+
const { x: t, y: r } = e;
|
|
586
|
+
let u = !1;
|
|
587
|
+
for (let c = 0, d = n.length - 1; c < n.length; d = c++) {
|
|
588
|
+
const m = n[c], h = n[d], p = m.x, l = m.y, a = h.x, f = h.y;
|
|
589
|
+
l > r != f > r && t < (a - p) * (r - l) / (f - l) + p && (u = !u);
|
|
590
|
+
}
|
|
591
|
+
return u;
|
|
592
|
+
}
|
|
593
|
+
function Lt(e, n) {
|
|
594
|
+
if (!n) return !1;
|
|
595
|
+
const t = { x: e.clientX, y: e.clientY };
|
|
596
|
+
return Ft(t, n);
|
|
597
|
+
}
|
|
598
|
+
function k(e) {
|
|
599
|
+
return (n) => n.pointerType === "mouse" ? e(n) : void 0;
|
|
600
|
+
}
|
|
601
|
+
var rn = ge, cn = J, an = Re, sn = Se, un = ne, ln = Pe, dn = j, fn = we, pn = ye, mn = be, hn = Ae, Mn = Oe, vn = ke, Cn = Ne, gn = Fe, _n = Ke;
|
|
602
|
+
export {
|
|
603
|
+
cn as Anchor,
|
|
604
|
+
vn as Arrow,
|
|
605
|
+
fn as CheckboxItem,
|
|
606
|
+
sn as Content,
|
|
607
|
+
un as Group,
|
|
608
|
+
dn as Item,
|
|
609
|
+
hn as ItemIndicator,
|
|
610
|
+
ln as Label,
|
|
611
|
+
ge as Menu,
|
|
612
|
+
J as MenuAnchor,
|
|
613
|
+
ke as MenuArrow,
|
|
614
|
+
we as MenuCheckboxItem,
|
|
615
|
+
Se as MenuContent,
|
|
616
|
+
ne as MenuGroup,
|
|
617
|
+
j as MenuItem,
|
|
618
|
+
Ae as MenuItemIndicator,
|
|
619
|
+
Pe as MenuLabel,
|
|
620
|
+
Re as MenuPortal,
|
|
621
|
+
ye as MenuRadioGroup,
|
|
622
|
+
be as MenuRadioItem,
|
|
623
|
+
Oe as MenuSeparator,
|
|
624
|
+
Ne as MenuSub,
|
|
625
|
+
Ke as MenuSubContent,
|
|
626
|
+
Fe as MenuSubTrigger,
|
|
627
|
+
an as Portal,
|
|
628
|
+
pn as RadioGroup,
|
|
629
|
+
mn as RadioItem,
|
|
630
|
+
rn as Root,
|
|
631
|
+
Mn as Separator,
|
|
632
|
+
Cn as Sub,
|
|
633
|
+
_n as SubContent,
|
|
634
|
+
gn as SubTrigger,
|
|
635
|
+
on as createMenuScope
|
|
636
|
+
};
|