@instructure/ui-options 8.25.1-snapshot.0 → 8.26.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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.26.0](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.26.0) (2022-06-30)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-options
9
+
6
10
  # [8.25.0](https://github.com/instructure/instructure-ui/compare/v8.24.5...v8.25.0) (2022-06-03)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-options",
3
- "version": "8.25.1-snapshot.0+59b6babce",
3
+ "version": "8.26.0",
4
4
  "description": "A view-only component for composing interactive lists and menus.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,21 +23,21 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.25.1-snapshot.0+59b6babce",
27
- "@instructure/ui-color-utils": "8.25.1-snapshot.0+59b6babce",
28
- "@instructure/ui-test-locator": "8.25.1-snapshot.0+59b6babce",
29
- "@instructure/ui-test-utils": "8.25.1-snapshot.0+59b6babce",
30
- "@instructure/ui-themes": "8.25.1-snapshot.0+59b6babce"
26
+ "@instructure/ui-babel-preset": "8.26.0",
27
+ "@instructure/ui-color-utils": "8.26.0",
28
+ "@instructure/ui-test-locator": "8.26.0",
29
+ "@instructure/ui-test-utils": "8.26.0",
30
+ "@instructure/ui-themes": "8.26.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@instructure/emotion": "8.25.1-snapshot.0+59b6babce",
35
- "@instructure/shared-types": "8.25.1-snapshot.0+59b6babce",
36
- "@instructure/ui-icons": "8.25.1-snapshot.0+59b6babce",
37
- "@instructure/ui-prop-types": "8.25.1-snapshot.0+59b6babce",
38
- "@instructure/ui-react-utils": "8.25.1-snapshot.0+59b6babce",
39
- "@instructure/ui-testable": "8.25.1-snapshot.0+59b6babce",
40
- "@instructure/ui-view": "8.25.1-snapshot.0+59b6babce",
34
+ "@instructure/emotion": "8.26.0",
35
+ "@instructure/shared-types": "8.26.0",
36
+ "@instructure/ui-icons": "8.26.0",
37
+ "@instructure/ui-prop-types": "8.26.0",
38
+ "@instructure/ui-react-utils": "8.26.0",
39
+ "@instructure/ui-testable": "8.26.0",
40
+ "@instructure/ui-view": "8.26.0",
41
41
  "prop-types": "^15"
42
42
  },
43
43
  "peerDependencies": {
@@ -46,6 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "sideEffects": false,
50
- "gitHead": "59b6babce07a9242111475156f544ec11c1a9283"
49
+ "sideEffects": false
51
50
  }
@@ -34,7 +34,7 @@ import type {
34
34
  import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
35
35
  import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
36
36
 
37
- type ItemProps = {
37
+ type OptionsItemRenderProps = {
38
38
  children?: React.ReactNode | (() => React.ReactNode)
39
39
  /**
40
40
  * Element type to render as. Will be set to `<a>` if href is provided.
@@ -55,17 +55,21 @@ type ItemProps = {
55
55
  role?: string
56
56
  }
57
57
 
58
- type OptionsItemOwnProps = ItemProps & {
58
+ type OptionsItemOwnProps = OptionsItemRenderProps & {
59
59
  /**
60
60
  * Content to render before the label
61
61
  * (if you pass a function, it has the `props` as its parameter)
62
62
  */
63
- renderBeforeLabel?: React.ReactNode | ((props: ItemProps) => React.ReactNode)
63
+ renderBeforeLabel?:
64
+ | React.ReactNode
65
+ | ((props: OptionsItemRenderProps) => React.ReactNode)
64
66
  /**
65
67
  * Content to render after the label
66
68
  * (if you pass a function, it has the `props` as its parameter)
67
69
  */
68
- renderAfterLabel?: React.ReactNode | ((props: ItemProps) => React.ReactNode)
70
+ renderAfterLabel?:
71
+ | React.ReactNode
72
+ | ((props: OptionsItemRenderProps) => React.ReactNode)
69
73
  /**
70
74
  * Sets the vAlign of renderBeforeLabel content
71
75
  */
@@ -146,5 +150,5 @@ const allowedProps: AllowedPropKeys = [
146
150
  'children'
147
151
  ]
148
152
 
149
- export type { OptionsItemProps, OptionsItemStyle }
153
+ export type { OptionsItemProps, OptionsItemStyle, OptionsItemRenderProps }
150
154
  export { propTypes, allowedProps }
package/src/index.ts CHANGED
@@ -29,5 +29,8 @@ export { optionsItemThemeGenerator } from './Options/Item/theme'
29
29
  export { optionsSeparatorThemeGenerator } from './Options/Separator/theme'
30
30
 
31
31
  export type { OptionsProps } from './Options/props'
32
- export type { OptionsItemProps } from './Options/Item/props'
32
+ export type {
33
+ OptionsItemProps,
34
+ OptionsItemRenderProps
35
+ } from './Options/Item/props'
33
36
  export type { OptionsSeparatorProps } from './Options/Separator/props'