@instructure/ui-menu 10.16.1-snapshot-0 → 10.16.1
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/CHANGELOG.md +1 -1
- package/es/Menu/MenuItem/__new-tests__/MenuItem.test.js +53 -35
- package/es/Menu/MenuItem/index.js +26 -17
- package/es/Menu/MenuItemGroup/__new-tests__/MenuItemGroup.test.js +87 -43
- package/es/Menu/MenuItemGroup/index.js +16 -12
- package/es/Menu/MenuItemSeparator/index.js +5 -4
- package/es/Menu/__new-tests__/Menu.test.js +204 -107
- package/es/Menu/index.js +28 -23
- package/lib/Menu/MenuItem/__new-tests__/MenuItem.test.js +66 -49
- package/lib/Menu/MenuItem/index.js +24 -17
- package/lib/Menu/MenuItemGroup/__new-tests__/MenuItemGroup.test.js +99 -56
- package/lib/Menu/MenuItemGroup/index.js +15 -12
- package/lib/Menu/MenuItemSeparator/index.js +4 -3
- package/lib/Menu/__new-tests__/Menu.test.js +216 -121
- package/lib/Menu/index.js +26 -23
- package/package.json +19 -19
- package/src/Menu/MenuItem/__new-tests__/MenuItem.test.tsx +0 -1
- package/src/Menu/MenuItem/index.tsx +3 -3
- package/src/Menu/MenuItemGroup/__new-tests__/MenuItemGroup.test.tsx +0 -1
- package/src/Menu/MenuItemGroup/index.tsx +4 -5
- package/src/Menu/MenuItemSeparator/index.tsx +1 -2
- package/src/Menu/__new-tests__/Menu.test.tsx +1 -1
- package/src/Menu/index.tsx +7 -7
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Menu/MenuItem/__new-tests__/MenuItem.test.d.ts.map +1 -1
- package/types/Menu/MenuItem/index.d.ts +5 -7
- package/types/Menu/MenuItem/index.d.ts.map +1 -1
- package/types/Menu/MenuItemGroup/__new-tests__/MenuItemGroup.test.d.ts.map +1 -1
- package/types/Menu/MenuItemGroup/index.d.ts +5 -7
- package/types/Menu/MenuItemGroup/index.d.ts.map +1 -1
- package/types/Menu/MenuItemSeparator/index.d.ts +1 -3
- package/types/Menu/MenuItemSeparator/index.d.ts.map +1 -1
- package/types/Menu/index.d.ts +8 -10
- package/types/Menu/index.d.ts.map +1 -1
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
import
|
|
24
|
+
|
|
25
|
+
import { Component } from 'react'
|
|
26
26
|
import keycode from 'keycode'
|
|
27
27
|
|
|
28
28
|
import { IconCheckSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons'
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import { createChainedFunction } from '@instructure/ui-utils'
|
|
36
36
|
import { isActiveElement, findDOMNode } from '@instructure/ui-dom-utils'
|
|
37
37
|
import { testable } from '@instructure/ui-testable'
|
|
38
|
-
import { withStyle
|
|
38
|
+
import { withStyle } from '@instructure/emotion'
|
|
39
39
|
|
|
40
40
|
import { MenuContext } from '../../MenuContext'
|
|
41
41
|
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
import React, { Children, Component } from 'react'
|
|
25
|
+
import { ComponentElement, Children, Component } from 'react'
|
|
27
26
|
|
|
28
|
-
import { withStyle
|
|
27
|
+
import { withStyle } from '@instructure/emotion'
|
|
29
28
|
import {
|
|
30
29
|
omitProps,
|
|
31
30
|
safeCloneElement,
|
|
@@ -46,8 +45,8 @@ import generateComponentTheme from './theme'
|
|
|
46
45
|
import { propTypes, allowedProps } from './props'
|
|
47
46
|
import type { MenuGroupProps, MenuGroupState } from './props'
|
|
48
47
|
|
|
49
|
-
type MenuItemChild =
|
|
50
|
-
type MenuSeparatorChild =
|
|
48
|
+
type MenuItemChild = ComponentElement<MenuItemProps, MenuItem>
|
|
49
|
+
type MenuSeparatorChild = ComponentElement<
|
|
51
50
|
MenuSeparatorProps,
|
|
52
51
|
MenuItemSeparator
|
|
53
52
|
>
|
|
@@ -22,10 +22,9 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
/** @jsx jsx */
|
|
26
25
|
import { Component } from 'react'
|
|
27
26
|
|
|
28
|
-
import { withStyle
|
|
27
|
+
import { withStyle } from '@instructure/emotion'
|
|
29
28
|
import { testable } from '@instructure/ui-testable'
|
|
30
29
|
import { omitProps } from '@instructure/ui-react-utils'
|
|
31
30
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
import { render, screen, fireEvent } from '@testing-library/react'
|
|
26
26
|
import { vi } from 'vitest'
|
|
27
27
|
import { userEvent } from '@testing-library/user-event'
|
package/src/Menu/index.tsx
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
import
|
|
24
|
+
|
|
25
|
+
import { ComponentElement, Children, Component, ReactElement } from 'react'
|
|
26
26
|
import keycode from 'keycode'
|
|
27
27
|
|
|
28
28
|
import { Popover } from '@instructure/ui-popover'
|
|
@@ -42,7 +42,7 @@ import { MenuItemGroup } from './MenuItemGroup'
|
|
|
42
42
|
import type { MenuGroupProps } from './MenuItemGroup/props'
|
|
43
43
|
import { MenuItemSeparator } from './MenuItemSeparator'
|
|
44
44
|
import type { MenuSeparatorProps } from './MenuItemSeparator/props'
|
|
45
|
-
import { withStyle
|
|
45
|
+
import { withStyle } from '@instructure/emotion'
|
|
46
46
|
|
|
47
47
|
import generateStyle from './styles'
|
|
48
48
|
import generateComponentTheme from './theme'
|
|
@@ -50,10 +50,10 @@ import generateComponentTheme from './theme'
|
|
|
50
50
|
import { propTypes, allowedProps } from './props'
|
|
51
51
|
import type { MenuProps } from './props'
|
|
52
52
|
|
|
53
|
-
type MenuChild =
|
|
54
|
-
type MenuItemChild =
|
|
55
|
-
type MenuGroupChild =
|
|
56
|
-
type MenuSeparatorChild =
|
|
53
|
+
type MenuChild = ComponentElement<MenuProps, Menu>
|
|
54
|
+
type MenuItemChild = ComponentElement<MenuItemProps, MenuItem>
|
|
55
|
+
type MenuGroupChild = ComponentElement<MenuGroupProps, MenuItemGroup>
|
|
56
|
+
type MenuSeparatorChild = ComponentElement<
|
|
57
57
|
MenuSeparatorProps,
|
|
58
58
|
MenuItemSeparator
|
|
59
59
|
>
|