@workday/canvas-kit-preview-react 10.0.0-alpha.460-next.0 → 10.0.0-alpha.464-next.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/dist/commonjs/select/lib/Select.d.ts +3 -2
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +2 -2
- package/dist/es6/select/lib/Select.d.ts +3 -2
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +2 -2
- package/package.json +3 -3
- package/select/lib/Select.tsx +5 -4
|
@@ -2,9 +2,10 @@ import { ErrorType } from '@workday/canvas-kit-react/common';
|
|
|
2
2
|
import { CoreSelectBaseProps, Option } from './SelectBase';
|
|
3
3
|
export interface SelectProps extends CoreSelectBaseProps {
|
|
4
4
|
/**
|
|
5
|
-
* The options of the Select. `options` may be an array of objects
|
|
5
|
+
* The options of the Select. `options` may be an array of objects, an array of strings,
|
|
6
|
+
* or an array that contains both objects and strings.
|
|
6
7
|
*
|
|
7
|
-
* If `options`
|
|
8
|
+
* If `options` includes objects, each included object must adhere to the `Option` interface:
|
|
8
9
|
*
|
|
9
10
|
* * `data: object` (optional)
|
|
10
11
|
* * `disabled: boolean` (optional)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAa,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAIvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAa,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAIvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;;OAeG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAoiBD,eAAO,MAAM,MAAM;;CAUjB,CAAC"}
|
|
@@ -48,8 +48,8 @@ class SelectContainer extends React.Component {
|
|
|
48
48
|
return true;
|
|
49
49
|
};
|
|
50
50
|
// Store normalized options since the options prop can take on multiple
|
|
51
|
-
// forms
|
|
52
|
-
// arbitrary keys)
|
|
51
|
+
// forms. It can be an array of strings, an array of objects (sometimes with
|
|
52
|
+
// arbitrary keys), or an array that contains both strings and objects
|
|
53
53
|
this.setNormalizedOptions = () => {
|
|
54
54
|
const { options } = this.props;
|
|
55
55
|
// Abort if options weren't defined
|
|
@@ -2,9 +2,10 @@ import { ErrorType } from '@workday/canvas-kit-react/common';
|
|
|
2
2
|
import { CoreSelectBaseProps, Option } from './SelectBase';
|
|
3
3
|
export interface SelectProps extends CoreSelectBaseProps {
|
|
4
4
|
/**
|
|
5
|
-
* The options of the Select. `options` may be an array of objects
|
|
5
|
+
* The options of the Select. `options` may be an array of objects, an array of strings,
|
|
6
|
+
* or an array that contains both objects and strings.
|
|
6
7
|
*
|
|
7
|
-
* If `options`
|
|
8
|
+
* If `options` includes objects, each included object must adhere to the `Option` interface:
|
|
8
9
|
*
|
|
9
10
|
* * `data: object` (optional)
|
|
10
11
|
* * `disabled: boolean` (optional)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAa,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAIvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAa,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAIvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;;OAeG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAoiBD,eAAO,MAAM,MAAM;;CAUjB,CAAC"}
|
|
@@ -26,8 +26,8 @@ class SelectContainer extends React.Component {
|
|
|
26
26
|
return true;
|
|
27
27
|
};
|
|
28
28
|
// Store normalized options since the options prop can take on multiple
|
|
29
|
-
// forms
|
|
30
|
-
// arbitrary keys)
|
|
29
|
+
// forms. It can be an array of strings, an array of objects (sometimes with
|
|
30
|
+
// arbitrary keys), or an array that contains both strings and objects
|
|
31
31
|
this.setNormalizedOptions = () => {
|
|
32
32
|
const { options } = this.props;
|
|
33
33
|
// Abort if options weren't defined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-preview-react",
|
|
3
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"version": "10.0.0-alpha.464-next.0",
|
|
4
4
|
"description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
48
48
|
"@emotion/styled": "^11.6.0",
|
|
49
|
-
"@workday/canvas-kit-react": "^10.0.0-alpha.
|
|
49
|
+
"@workday/canvas-kit-react": "^10.0.0-alpha.464-next.0",
|
|
50
50
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
51
51
|
"@workday/design-assets-types": "^0.2.8"
|
|
52
52
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"react-hook-form": "7.36.1",
|
|
57
57
|
"yup": "^0.32.11"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "6e5c32264d0680bbb2faec47130a5583e596e02d"
|
|
60
60
|
}
|
package/select/lib/Select.tsx
CHANGED
|
@@ -13,9 +13,10 @@ import {getCorrectedIndexByValue} from './utils';
|
|
|
13
13
|
|
|
14
14
|
export interface SelectProps extends CoreSelectBaseProps {
|
|
15
15
|
/**
|
|
16
|
-
* The options of the Select. `options` may be an array of objects
|
|
16
|
+
* The options of the Select. `options` may be an array of objects, an array of strings,
|
|
17
|
+
* or an array that contains both objects and strings.
|
|
17
18
|
*
|
|
18
|
-
* If `options`
|
|
19
|
+
* If `options` includes objects, each included object must adhere to the `Option` interface:
|
|
19
20
|
*
|
|
20
21
|
* * `data: object` (optional)
|
|
21
22
|
* * `disabled: boolean` (optional)
|
|
@@ -76,8 +77,8 @@ class SelectContainer extends React.Component<SelectContainerProps, SelectContai
|
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
// Store normalized options since the options prop can take on multiple
|
|
79
|
-
// forms
|
|
80
|
-
// arbitrary keys)
|
|
80
|
+
// forms. It can be an array of strings, an array of objects (sometimes with
|
|
81
|
+
// arbitrary keys), or an array that contains both strings and objects
|
|
81
82
|
private setNormalizedOptions = (): void => {
|
|
82
83
|
const {options} = this.props;
|
|
83
84
|
|