@instructure/ui-list 10.26.1 → 11.0.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/es/InlineList/InlineListItem/index.js +6 -6
  3. package/es/InlineList/InlineListItem/props.js +1 -13
  4. package/es/InlineList/index.js +9 -6
  5. package/es/InlineList/props.js +1 -13
  6. package/es/List/ListItem/index.js +6 -6
  7. package/es/List/ListItem/props.js +1 -12
  8. package/es/List/index.js +6 -6
  9. package/es/List/props.js +1 -14
  10. package/lib/InlineList/InlineListItem/index.js +5 -5
  11. package/lib/InlineList/InlineListItem/props.js +1 -13
  12. package/lib/InlineList/index.js +9 -5
  13. package/lib/InlineList/props.js +1 -14
  14. package/lib/List/ListItem/index.js +5 -5
  15. package/lib/List/ListItem/props.js +1 -12
  16. package/lib/List/index.js +5 -5
  17. package/lib/List/props.js +1 -15
  18. package/package.json +12 -15
  19. package/src/InlineList/InlineListItem/index.tsx +2 -4
  20. package/src/InlineList/InlineListItem/props.ts +1 -24
  21. package/src/InlineList/index.tsx +2 -4
  22. package/src/InlineList/props.ts +2 -31
  23. package/src/List/ListItem/index.tsx +2 -4
  24. package/src/List/ListItem/props.ts +1 -24
  25. package/src/List/index.tsx +2 -4
  26. package/src/List/props.ts +2 -33
  27. package/tsconfig.build.json +0 -2
  28. package/tsconfig.build.tsbuildinfo +1 -1
  29. package/types/InlineList/InlineListItem/index.d.ts +0 -1
  30. package/types/InlineList/InlineListItem/index.d.ts.map +1 -1
  31. package/types/InlineList/InlineListItem/props.d.ts +2 -3
  32. package/types/InlineList/InlineListItem/props.d.ts.map +1 -1
  33. package/types/InlineList/index.d.ts +0 -9
  34. package/types/InlineList/index.d.ts.map +1 -1
  35. package/types/InlineList/props.d.ts +2 -3
  36. package/types/InlineList/props.d.ts.map +1 -1
  37. package/types/List/ListItem/index.d.ts +0 -1
  38. package/types/List/ListItem/index.d.ts.map +1 -1
  39. package/types/List/ListItem/props.d.ts +2 -3
  40. package/types/List/ListItem/props.d.ts.map +1 -1
  41. package/types/List/index.d.ts +0 -10
  42. package/types/List/index.d.ts.map +1 -1
  43. package/types/List/props.d.ts +2 -3
  44. package/types/List/props.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-list",
3
- "version": "10.26.1",
3
+ "version": "11.0.0",
4
4
  "description": "Components for displaying vertical or horizontal lists.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,26 +24,23 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.27.6",
27
- "@instructure/console": "10.26.1",
28
- "@instructure/emotion": "10.26.1",
29
- "@instructure/shared-types": "10.26.1",
30
- "@instructure/ui-prop-types": "10.26.1",
31
- "@instructure/ui-react-utils": "10.26.1",
32
- "@instructure/ui-testable": "10.26.1",
33
- "@instructure/ui-view": "10.26.1",
34
- "prop-types": "^15.8.1"
27
+ "@instructure/console": "11.0.0",
28
+ "@instructure/emotion": "11.0.0",
29
+ "@instructure/shared-types": "11.0.0",
30
+ "@instructure/ui-react-utils": "11.0.0",
31
+ "@instructure/ui-view": "11.0.0"
35
32
  },
36
33
  "devDependencies": {
37
- "@instructure/ui-axe-check": "10.26.1",
38
- "@instructure/ui-babel-preset": "10.26.1",
39
- "@instructure/ui-color-utils": "10.26.1",
40
- "@instructure/ui-themes": "10.26.1",
34
+ "@instructure/ui-axe-check": "11.0.0",
35
+ "@instructure/ui-babel-preset": "11.0.0",
36
+ "@instructure/ui-color-utils": "11.0.0",
37
+ "@instructure/ui-themes": "11.0.0",
41
38
  "@testing-library/jest-dom": "^6.6.3",
42
- "@testing-library/react": "^16.0.1",
39
+ "@testing-library/react": "15.0.7",
43
40
  "vitest": "^3.2.2"
44
41
  },
45
42
  "peerDependencies": {
46
- "react": ">=16.14 <=18"
43
+ "react": ">=18 <=19"
47
44
  },
48
45
  "publishConfig": {
49
46
  "access": "public"
@@ -25,7 +25,6 @@
25
25
  import { Component } from 'react'
26
26
 
27
27
  import { View } from '@instructure/ui-view'
28
- import { testable } from '@instructure/ui-testable'
29
28
  import { passthroughProps } from '@instructure/ui-react-utils'
30
29
 
31
30
  import { withStyle } from '@instructure/emotion'
@@ -33,7 +32,7 @@ import { withStyle } from '@instructure/emotion'
33
32
  import generateStyle from './styles'
34
33
  import generateComponentTheme from './theme'
35
34
 
36
- import { propTypes, allowedProps } from './props'
35
+ import { allowedProps } from './props'
37
36
  import type { InlineListItemProps } from './props'
38
37
 
39
38
  /**
@@ -43,11 +42,9 @@ id: InlineList.Item
43
42
  ---
44
43
  **/
45
44
  @withStyle(generateStyle, generateComponentTheme)
46
- @testable()
47
45
  class InlineListItem extends Component<InlineListItemProps> {
48
46
  static readonly componentId = 'InlineList.Item'
49
47
 
50
- static propTypes = propTypes
51
48
  static allowedProps = allowedProps
52
49
  static defaultProps = {
53
50
  padding: 'none',
@@ -101,6 +98,7 @@ class InlineListItem extends Component<InlineListItemProps> {
101
98
  display="inline-block"
102
99
  maxWidth="100%"
103
100
  elementRef={this.handleRef}
101
+ data-cid="InlineListItem"
104
102
  >
105
103
  {children}
106
104
  {!lastPlaceholder && (
@@ -23,7 +23,6 @@
23
23
  */
24
24
 
25
25
  import { PropsWithChildren } from 'react'
26
- import PropTypes from 'prop-types'
27
26
 
28
27
  import type {
29
28
  Spacing,
@@ -31,7 +30,6 @@ import type {
31
30
  ComponentStyle
32
31
  } from '@instructure/emotion'
33
32
  import type {
34
- PropValidators,
35
33
  InlineListItemTheme,
36
34
  OtherHTMLAttributes
37
35
  } from '@instructure/shared-types'
@@ -87,27 +85,6 @@ type InlineListItemProps = InlineListItemOwnProps &
87
85
 
88
86
  type InlineListItemStyle = ComponentStyle<'inlineListItem' | 'delimiter'>
89
87
 
90
- const propTypes: PropValidators<PropKeys> = {
91
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
92
- delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
93
- size: PropTypes.oneOf(['small', 'medium', 'large']),
94
- margin: PropTypes.string,
95
- padding: PropTypes.string,
96
- spacing: PropTypes.oneOf([
97
- 'none',
98
- 'xxx-small',
99
- 'xx-small',
100
- 'x-small',
101
- 'small',
102
- 'medium',
103
- 'large',
104
- 'x-large',
105
- 'xx-large'
106
- ]),
107
- elementRef: PropTypes.func,
108
- lastPlaceholder: PropTypes.bool
109
- }
110
-
111
88
  const allowedProps: AllowedPropKeys = [
112
89
  'children',
113
90
  'delimiter',
@@ -119,4 +96,4 @@ const allowedProps: AllowedPropKeys = [
119
96
  ]
120
97
 
121
98
  export type { InlineListItemProps, InlineListItemStyle }
122
- export { propTypes, allowedProps }
99
+ export { allowedProps }
@@ -25,11 +25,10 @@ import { Children, Component, ReactElement } from 'react'
25
25
 
26
26
  import { View } from '@instructure/ui-view'
27
27
  import { passthroughProps, safeCloneElement } from '@instructure/ui-react-utils'
28
- import { testable } from '@instructure/ui-testable'
29
28
 
30
29
  import { InlineListItem } from './InlineListItem'
31
30
 
32
- import { propTypes, allowedProps } from './props'
31
+ import { allowedProps } from './props'
33
32
  import type { InlineListProps } from './props'
34
33
 
35
34
  /**
@@ -38,9 +37,7 @@ category: components
38
37
  ---
39
38
 
40
39
  **/
41
- @testable()
42
40
  class InlineList extends Component<InlineListProps> {
43
- static propTypes = propTypes
44
41
  static allowedProps = allowedProps
45
42
  static defaultProps = {
46
43
  itemSpacing: 'none',
@@ -93,6 +90,7 @@ class InlineList extends Component<InlineListProps> {
93
90
  padding="0"
94
91
  elementRef={this.handleRef}
95
92
  display="block"
93
+ data-cid="InlineList"
96
94
  >
97
95
  {this.renderChildren()}
98
96
  </View>
@@ -23,16 +23,8 @@
23
23
  */
24
24
 
25
25
  import React from 'react'
26
- import PropTypes from 'prop-types'
27
-
28
- import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types'
29
- import { InlineListItem } from './InlineListItem'
30
-
31
26
  import type { Spacing } from '@instructure/emotion'
32
- import type {
33
- OtherHTMLAttributes,
34
- PropValidators
35
- } from '@instructure/shared-types'
27
+ import type { OtherHTMLAttributes } from '@instructure/shared-types'
36
28
 
37
29
  type InlineListOwnProps = {
38
30
  /**
@@ -74,27 +66,6 @@ type AllowedPropKeys = Readonly<Array<PropKeys>>
74
66
 
75
67
  type InlineListProps = InlineListOwnProps &
76
68
  OtherHTMLAttributes<InlineListOwnProps>
77
-
78
- const propTypes: PropValidators<PropKeys> = {
79
- children: ChildrenPropTypes.oneOf([InlineListItem]),
80
- as: PropTypes.oneOf(['ul', 'ol']),
81
- margin: PropTypes.string,
82
- size: PropTypes.oneOf(['small', 'medium', 'large']),
83
- delimiter: PropTypes.oneOf(['none', 'pipe', 'slash', 'arrow']),
84
- itemSpacing: PropTypes.oneOf([
85
- 'none',
86
- 'xxx-small',
87
- 'xx-small',
88
- 'x-small',
89
- 'small',
90
- 'medium',
91
- 'large',
92
- 'x-large',
93
- 'xx-large'
94
- ]),
95
- elementRef: PropTypes.func
96
- }
97
-
98
69
  const allowedProps: AllowedPropKeys = [
99
70
  'children',
100
71
  'as',
@@ -106,4 +77,4 @@ const allowedProps: AllowedPropKeys = [
106
77
  ]
107
78
 
108
79
  export type { InlineListProps }
109
- export { propTypes, allowedProps }
80
+ export { allowedProps }
@@ -25,7 +25,6 @@
25
25
  import { Component } from 'react'
26
26
 
27
27
  import { View } from '@instructure/ui-view'
28
- import { testable } from '@instructure/ui-testable'
29
28
  import { passthroughProps } from '@instructure/ui-react-utils'
30
29
 
31
30
  import { withStyle } from '@instructure/emotion'
@@ -33,7 +32,7 @@ import { withStyle } from '@instructure/emotion'
33
32
  import generateStyle from './styles'
34
33
  import generateComponentTheme from './theme'
35
34
 
36
- import { propTypes, allowedProps } from './props'
35
+ import { allowedProps } from './props'
37
36
  import type { ListItemProps } from './props'
38
37
 
39
38
  /**
@@ -43,11 +42,9 @@ id: List.Item
43
42
  ---
44
43
  **/
45
44
  @withStyle(generateStyle, generateComponentTheme)
46
- @testable()
47
45
  class ListItem extends Component<ListItemProps> {
48
46
  static readonly componentId = 'List.Item'
49
47
 
50
- static propTypes = propTypes
51
48
  static allowedProps = allowedProps
52
49
  static defaultProps = {
53
50
  padding: 'none',
@@ -98,6 +95,7 @@ class ListItem extends Component<ListItemProps> {
98
95
  padding={padding}
99
96
  maxWidth="100%"
100
97
  elementRef={this.handleRef}
98
+ data-cid="ListItem"
101
99
  >
102
100
  {children}
103
101
  </View>
@@ -23,7 +23,6 @@
23
23
  */
24
24
 
25
25
  import { PropsWithChildren } from 'react'
26
- import PropTypes from 'prop-types'
27
26
 
28
27
  import type {
29
28
  Spacing,
@@ -31,7 +30,6 @@ import type {
31
30
  ComponentStyle
32
31
  } from '@instructure/emotion'
33
32
  import type {
34
- PropValidators,
35
33
  ListItemTheme,
36
34
  OtherHTMLAttributes
37
35
  } from '@instructure/shared-types'
@@ -82,27 +80,6 @@ type ListItemProps = ListItemOwnProps &
82
80
  OtherHTMLAttributes<ListItemOwnProps>
83
81
 
84
82
  type ListItemStyle = ComponentStyle<'listItem'>
85
-
86
- const propTypes: PropValidators<PropKeys> = {
87
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
88
- delimiter: PropTypes.oneOf(['none', 'dashed', 'solid']),
89
- size: PropTypes.oneOf(['small', 'medium', 'large']),
90
- margin: PropTypes.string,
91
- padding: PropTypes.string,
92
- spacing: PropTypes.oneOf([
93
- 'none',
94
- 'xxx-small',
95
- 'xx-small',
96
- 'x-small',
97
- 'small',
98
- 'medium',
99
- 'large',
100
- 'x-large',
101
- 'xx-large'
102
- ]),
103
- elementRef: PropTypes.func
104
- }
105
-
106
83
  const allowedProps: AllowedPropKeys = [
107
84
  'children',
108
85
  'delimiter',
@@ -114,4 +91,4 @@ const allowedProps: AllowedPropKeys = [
114
91
  ]
115
92
 
116
93
  export type { ListItemProps, ListItemStyle }
117
- export { propTypes, allowedProps }
94
+ export { allowedProps }
@@ -26,7 +26,6 @@ import { Children, Component, ReactElement } from 'react'
26
26
 
27
27
  import { View } from '@instructure/ui-view'
28
28
  import { passthroughProps, safeCloneElement } from '@instructure/ui-react-utils'
29
- import { testable } from '@instructure/ui-testable'
30
29
 
31
30
  import { ListItem } from './ListItem'
32
31
 
@@ -35,7 +34,7 @@ import { withStyle } from '@instructure/emotion'
35
34
  import generateStyle from './styles'
36
35
  import generateComponentTheme from './theme'
37
36
 
38
- import { propTypes, allowedProps } from './props'
37
+ import { allowedProps } from './props'
39
38
  import type { ListProps } from './props'
40
39
 
41
40
  /**
@@ -44,11 +43,9 @@ category: components
44
43
  ---
45
44
  **/
46
45
  @withStyle(generateStyle, generateComponentTheme)
47
- @testable()
48
46
  class List extends Component<ListProps> {
49
47
  static readonly componentId = 'List'
50
48
 
51
- static propTypes = propTypes
52
49
  static allowedProps = allowedProps
53
50
  static defaultProps = {
54
51
  as: 'ul',
@@ -104,6 +101,7 @@ class List extends Component<ListProps> {
104
101
  margin={margin}
105
102
  elementRef={this.handleRef}
106
103
  display="block"
104
+ data-cid="List"
107
105
  >
108
106
  {this.renderChildren()}
109
107
  </View>
package/src/List/props.ts CHANGED
@@ -23,22 +23,13 @@
23
23
  */
24
24
 
25
25
  import React from 'react'
26
- import PropTypes from 'prop-types'
27
-
28
- import { Children as ChildrenPropTypes } from '@instructure/ui-prop-types'
29
-
30
- import { ListItem } from './ListItem'
31
26
 
32
27
  import type {
33
28
  Spacing,
34
29
  WithStyleProps,
35
30
  ComponentStyle
36
31
  } from '@instructure/emotion'
37
- import type {
38
- PropValidators,
39
- ListTheme,
40
- OtherHTMLAttributes
41
- } from '@instructure/shared-types'
32
+ import type { ListTheme, OtherHTMLAttributes } from '@instructure/shared-types'
42
33
 
43
34
  type ListOwnProps = {
44
35
  /**
@@ -89,28 +80,6 @@ type ListProps = ListOwnProps &
89
80
  OtherHTMLAttributes<ListOwnProps>
90
81
 
91
82
  type ListStyle = ComponentStyle<'list'>
92
-
93
- const propTypes: PropValidators<PropKeys> = {
94
- children: ChildrenPropTypes.oneOf([ListItem]),
95
- as: PropTypes.oneOf(['ul', 'ol']),
96
- delimiter: PropTypes.oneOf(['none', 'dashed', 'solid']),
97
- isUnstyled: PropTypes.bool,
98
- margin: PropTypes.string,
99
- size: PropTypes.oneOf(['small', 'medium', 'large']),
100
- itemSpacing: PropTypes.oneOf([
101
- 'none',
102
- 'xxx-small',
103
- 'xx-small',
104
- 'x-small',
105
- 'small',
106
- 'medium',
107
- 'large',
108
- 'x-large',
109
- 'xx-large'
110
- ]),
111
- elementRef: PropTypes.func
112
- }
113
-
114
83
  const allowedProps: AllowedPropKeys = [
115
84
  'children',
116
85
  'as',
@@ -123,4 +92,4 @@ const allowedProps: AllowedPropKeys = [
123
92
  ]
124
93
 
125
94
  export type { ListProps, ListStyle }
126
- export { propTypes, allowedProps }
95
+ export { allowedProps }
@@ -11,9 +11,7 @@
11
11
  { "path": "../emotion/tsconfig.build.json" },
12
12
  { "path": "../shared-types/tsconfig.build.json" },
13
13
  { "path": "../ui-axe-check/tsconfig.build.json" },
14
- { "path": "../ui-prop-types/tsconfig.build.json" },
15
14
  { "path": "../ui-react-utils/tsconfig.build.json" },
16
- { "path": "../ui-testable/tsconfig.build.json" },
17
15
  { "path": "../ui-view/tsconfig.build.json" },
18
16
  { "path": "../ui-babel-preset/tsconfig.build.json" },
19
17
  { "path": "../ui-color-utils/tsconfig.build.json" },