@workday/canvas-kit-preview-react 10.0.0-alpha.540-next.0 → 10.0.0-alpha.543-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/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +1 -5
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/radio/lib/StyledRadioButton.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.d.ts +6 -0
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +3 -0
- package/dist/commonjs/select/lib/SelectBase.d.ts +24 -0
- package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectBase.js +3 -0
- package/dist/commonjs/select/lib/SelectMenu.d.ts +3 -0
- package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectMenu.js +3 -0
- package/dist/commonjs/select/lib/SelectOption.d.ts +6 -0
- package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectOption.js +3 -0
- package/dist/commonjs/select/lib/scrolling.d.ts +3 -0
- package/dist/commonjs/select/lib/scrolling.d.ts.map +1 -1
- package/dist/commonjs/select/lib/scrolling.js +3 -0
- package/dist/commonjs/select/lib/types.d.ts +4 -0
- package/dist/commonjs/select/lib/types.d.ts.map +1 -1
- package/dist/commonjs/select/lib/utils.d.ts +6 -0
- package/dist/commonjs/select/lib/utils.d.ts.map +1 -1
- package/dist/commonjs/select/lib/utils.js +6 -0
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +1 -5
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/radio/lib/StyledRadioButton.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.d.ts +6 -0
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +3 -0
- package/dist/es6/select/lib/SelectBase.d.ts +24 -0
- package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectBase.js +3 -0
- package/dist/es6/select/lib/SelectMenu.d.ts +3 -0
- package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectMenu.js +3 -0
- package/dist/es6/select/lib/SelectOption.d.ts +6 -0
- package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectOption.js +3 -0
- package/dist/es6/select/lib/scrolling.d.ts +3 -0
- package/dist/es6/select/lib/scrolling.d.ts.map +1 -1
- package/dist/es6/select/lib/scrolling.js +3 -0
- package/dist/es6/select/lib/types.d.ts +4 -0
- package/dist/es6/select/lib/types.d.ts.map +1 -1
- package/dist/es6/select/lib/utils.d.ts +6 -0
- package/dist/es6/select/lib/utils.d.ts.map +1 -1
- package/dist/es6/select/lib/utils.js +6 -0
- package/menu/lib/Menu.tsx +4 -8
- package/menu/lib/MenuItem.tsx +8 -6
- package/package.json +3 -3
- package/radio/lib/StyledRadioButton.tsx +7 -6
- package/select/lib/Select.tsx +6 -2
- package/select/lib/SelectBase.tsx +24 -8
- package/select/lib/SelectMenu.tsx +3 -0
- package/select/lib/SelectOption.tsx +6 -1
- package/select/lib/scrolling.ts +3 -0
- package/select/lib/types.ts +4 -0
- package/select/lib/utils.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAC;AAGnD,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,mBACf,SAAQ,cAAc,EACpB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N,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,MAAM,CAQjE;IAEK,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,IAAI,CAE/D;IAEF,OAAO,CAAC,uBAAuB,CA+E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CA8BxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
|
|
@@ -171,11 +171,7 @@ class DeprecatedMenu extends React.Component {
|
|
|
171
171
|
character = '';
|
|
172
172
|
}
|
|
173
173
|
else if (typeof child === 'string' || typeof child === 'number') {
|
|
174
|
-
character = child
|
|
175
|
-
.toString()
|
|
176
|
-
.trim()
|
|
177
|
-
.substring(0, 1)
|
|
178
|
-
.toLowerCase();
|
|
174
|
+
character = child.toString().trim().substring(0, 1).toLowerCase();
|
|
179
175
|
}
|
|
180
176
|
else if (Array.isArray(child) && child[0]) {
|
|
181
177
|
// TODO test React.ReactNodeArray
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACpF;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CA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AkB,cAAe,uBAAuB,UAMtD;IAEF,MAAM;IA4CN,OAAO,CAAC,WAAW,CAOjB;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,YAAY,EACZ,SAAS,EACV,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAC,GAAG,EAAO,MAAM,kCAAkC,CAAC;AAK3D,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;IAC1F,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;
|
|
1
|
+
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,YAAY,EACZ,SAAS,EACV,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAC,GAAG,EAAO,MAAM,kCAAkC,CAAC;AAK3D,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;IAC1F,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAiID,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC;IAC/E,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8FAuB5B,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ErrorType } from '@workday/canvas-kit-react/common';
|
|
2
2
|
import { CoreSelectBaseProps, Option } from './SelectBase';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated ⚠️ `SelectProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface SelectProps extends CoreSelectBaseProps {
|
|
4
7
|
/**
|
|
5
8
|
* The options of the Select. `options` may be an array of objects, an array of strings,
|
|
@@ -19,6 +22,9 @@ export interface SelectProps extends CoreSelectBaseProps {
|
|
|
19
22
|
*/
|
|
20
23
|
options: (Option | string)[];
|
|
21
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated ⚠️ `Select` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
27
|
+
*/
|
|
22
28
|
export declare const Select: import("@workday/canvas-kit-react/common").ElementComponent<"button", SelectProps> & {
|
|
23
29
|
ErrorType: typeof ErrorType;
|
|
24
30
|
};
|
|
@@ -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;
|
|
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;AAGvF;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;;OAeG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAoiBD;;GAEG;AACH,eAAO,MAAM,MAAM;;CAUjB,CAAC"}
|
|
@@ -466,6 +466,9 @@ class SelectContainer extends React.Component {
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
SelectContainer.ErrorType = common_1.ErrorType;
|
|
469
|
+
/**
|
|
470
|
+
* @deprecated ⚠️ `Select` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
471
|
+
*/
|
|
469
472
|
exports.Select = common_1.createComponent('button')({
|
|
470
473
|
displayName: 'Select',
|
|
471
474
|
Component: (props, ref, Element) => (
|
|
@@ -4,6 +4,9 @@ import { MenuPlacement, MenuVisibility } from './types';
|
|
|
4
4
|
interface OptionData {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated ⚠️ `Option` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
9
|
+
*/
|
|
7
10
|
export interface Option {
|
|
8
11
|
data?: OptionData;
|
|
9
12
|
disabled?: boolean;
|
|
@@ -11,22 +14,37 @@ export interface Option {
|
|
|
11
14
|
label?: string;
|
|
12
15
|
value: string;
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated ⚠️ `NormalizedOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
19
|
+
*/
|
|
14
20
|
export interface NormalizedOption extends Option {
|
|
15
21
|
data: OptionData;
|
|
16
22
|
disabled: boolean;
|
|
17
23
|
id: string;
|
|
18
24
|
label: string;
|
|
19
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated ⚠️ `RenderSelectedFunction` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
28
|
+
*/
|
|
20
29
|
export interface RenderSelectedFunction {
|
|
21
30
|
(option: NormalizedOption): React.ReactNode;
|
|
22
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated ⚠️ `RenderableOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
34
|
+
*/
|
|
23
35
|
export interface RenderableOption extends NormalizedOption {
|
|
24
36
|
focused: boolean;
|
|
25
37
|
selected: boolean;
|
|
26
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated ⚠️ `RenderOptionFunction` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
41
|
+
*/
|
|
27
42
|
export interface RenderOptionFunction {
|
|
28
43
|
(option: RenderableOption): React.ReactNode;
|
|
29
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated ⚠️ `CoreSelectBaseProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
47
|
+
*/
|
|
30
48
|
export interface CoreSelectBaseProps extends Themeable, GrowthBehavior, Pick<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>, Pick<React.SelectHTMLAttributes<HTMLSelectElement>, 'required'>, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
31
49
|
/**
|
|
32
50
|
* The type of error associated with the Select (if applicable).
|
|
@@ -71,6 +89,9 @@ export interface CoreSelectBaseProps extends Themeable, GrowthBehavior, Pick<Rea
|
|
|
71
89
|
*/
|
|
72
90
|
value?: string;
|
|
73
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated ⚠️ `SelectBaseProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
94
|
+
*/
|
|
74
95
|
export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
|
|
75
96
|
/**
|
|
76
97
|
* The ref to be forwarded to the underlying button element. Use this to imperatively manipulate the button.
|
|
@@ -136,6 +157,9 @@ export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
|
|
|
136
157
|
shouldMenuAutoFocus?: boolean;
|
|
137
158
|
}
|
|
138
159
|
export declare const buttonBorderWidth = 1;
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated ⚠️ `SelectBase` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
162
|
+
*/
|
|
139
163
|
export declare const SelectBase: ({ "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex, grow, inputRef, menuPlacement, menuRef, menuVisibility, onChange, onKeyDown, onBlur, onClose, onOptionSelection, options, renderOption, renderSelected, required, shouldMenuAutoFlip, shouldMenuAutoFocus, value, ...elemProps }: SelectBaseProps) => JSX.Element;
|
|
140
164
|
export {};
|
|
141
165
|
//# sourceMappingURL=SelectBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAGtD,UAAU,UAAU;IAIlB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAGtD,UA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118
118
|
return option.label;
|
|
119
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated ⚠️ `SelectBase` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
122
|
+
*/
|
|
120
123
|
const SelectBase = ({ 'aria-labelledby': ariaLabelledBy, 'aria-required': ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex = 0, grow, inputRef, menuPlacement = 'bottom', menuRef, menuVisibility = 'closed', onChange, onKeyDown, onBlur, onClose, onOptionSelection, options, renderOption = defaultRenderOption, renderSelected = defaultRenderSelected, required, shouldMenuAutoFlip = true, shouldMenuAutoFocus = true, value, ...elemProps }) => {
|
|
121
124
|
const focusedOptionRef = react_1.default.useRef(null);
|
|
122
125
|
const menuId = common_1.useUniqueId();
|
|
@@ -37,6 +37,9 @@ interface SelectMenuProps extends Themeable, React.HTMLAttributes<HTMLUListEleme
|
|
|
37
37
|
visibility?: MenuVisibility;
|
|
38
38
|
}
|
|
39
39
|
export declare const menuAnimationDuration = 200;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated ⚠️ `SelectMenu` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
42
|
+
*/
|
|
40
43
|
export declare const SelectMenu: ({ buttonRef, children, error, menuRef, onClose, placement, shouldAutoFlip, shouldAutoFocus, visibility, ...elemProps }: SelectMenuProps) => JSX.Element;
|
|
41
44
|
export {};
|
|
42
45
|
//# sourceMappingURL=SelectMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMenu.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAgC,SAAS,EAAS,MAAM,kCAAkC,CAAC;AAYlG,OAAO,EA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OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,MAAM,CAAC;AA8KzC;;GAEG;AACH,eAAO,MAAM,UAAU,2HAWpB,eAAe,gBA2DjB,CAAC"}
|
|
@@ -167,6 +167,9 @@ const generatePopperOptions = (props) => {
|
|
|
167
167
|
},
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* @deprecated ⚠️ `SelectMenu` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
172
|
+
*/
|
|
170
173
|
const SelectMenu = ({ buttonRef, children, error, menuRef, onClose, placement = 'bottom', shouldAutoFlip = true, shouldAutoFocus = true, visibility = 'closed', ...elemProps }) => {
|
|
171
174
|
const model = popup_1.usePopupModel({
|
|
172
175
|
initialVisibility: 'visible',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ErrorType, Themeable } from '@workday/canvas-kit-react/common';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated ⚠️ `SelectOptionProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface SelectOptionProps extends Themeable, React.LiHTMLAttributes<HTMLLIElement> {
|
|
4
7
|
/**
|
|
5
8
|
* The type of error associated with the SelectOption (if applicable).
|
|
@@ -28,5 +31,8 @@ export interface SelectOptionProps extends Themeable, React.LiHTMLAttributes<HTM
|
|
|
28
31
|
*/
|
|
29
32
|
value?: string;
|
|
30
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated ⚠️ `SelectOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
36
|
+
*/
|
|
31
37
|
export declare const SelectOption: ({ children, focused, interactive, optionRef, value, ...elemProps }: SelectOptionProps) => JSX.Element;
|
|
32
38
|
//# sourceMappingURL=SelectOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EACT,SAAS,EAGV,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EACT,SAAS,EAGV,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACzF;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqED;;GAEG;AACH,eAAO,MAAM,YAAY,uEAOtB,iBAAiB,gBAanB,CAAC"}
|
|
@@ -83,6 +83,9 @@ const Option = common_1.styled('li')({
|
|
|
83
83
|
}, ({ error }) => ({
|
|
84
84
|
padding: `${optionPadding}px ${error === common_1.ErrorType.Alert ? optionPadding - 1 : optionPadding}px`,
|
|
85
85
|
}));
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated ⚠️ `SelectOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
88
|
+
*/
|
|
86
89
|
const SelectOption = ({ children, focused = false, interactive = true, optionRef, value, ...elemProps }) => {
|
|
87
90
|
return (React.createElement(Option, Object.assign({ "data-value": value, focused: focused, interactive: interactive, ref: optionRef, role: "option" }, elemProps), children));
|
|
88
91
|
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated ⚠️ `scrollIntoViewIfNeeded` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
3
|
+
*/
|
|
1
4
|
export declare const scrollIntoViewIfNeeded: (elem: HTMLElement, centerIfNeeded?: boolean) => void;
|
|
2
5
|
//# sourceMappingURL=scrolling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrolling.d.ts","sourceRoot":"","sources":["../../../../select/lib/scrolling.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB,SAAU,WAAW,+BAA0B,IAqCjF,CAAC"}
|
|
1
|
+
{"version":3,"file":"scrolling.d.ts","sourceRoot":"","sources":["../../../../select/lib/scrolling.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,sBAAsB,SAAU,WAAW,+BAA0B,IAqCjF,CAAC"}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.scrollIntoViewIfNeeded = void 0;
|
|
4
4
|
// Modified from https://gist.github.com/hsablonniere/2581101
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated ⚠️ `scrollIntoViewIfNeeded` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
7
|
+
*/
|
|
5
8
|
const scrollIntoViewIfNeeded = (elem, centerIfNeeded = true) => {
|
|
6
9
|
const parent = elem.parentElement;
|
|
7
10
|
if (elem && parent) {
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* https://github.com/popperjs/popper-core/blob/38914aae7a2e91715c6eb2b563517082a40cfa64/src/utils/computeOffsets.js#L68-L81
|
|
8
8
|
* This rounding causes problems with browsers that allow subpixel values for elements
|
|
9
9
|
* like Firefox and Edge.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated ⚠️ `MenuPlacement` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
10
12
|
*/
|
|
11
13
|
export declare type MenuPlacement = 'bottom' | 'top';
|
|
12
14
|
/**
|
|
@@ -28,6 +30,8 @@ export declare type MenuPlacement = 'bottom' | 'top';
|
|
|
28
30
|
* However, it's possible for a user to open a menu while it's in the process of
|
|
29
31
|
* closing in which case the menu can transition from `closing` > `opening` (and
|
|
30
32
|
* vice-versa).
|
|
33
|
+
*
|
|
34
|
+
* @deprecated ⚠️ `MenuVisibility` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
31
35
|
*/
|
|
32
36
|
export declare type MenuVisibility = 'closed' | 'open' | 'opening' | 'opened' | 'close' | 'closing';
|
|
33
37
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../select/lib/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../select/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,oBAAY,aAAa,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oBAAY,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { NormalizedOption } from './SelectBase';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated ⚠️ `getIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
4
|
+
*/
|
|
2
5
|
export declare const getIndexByValue: (options: NormalizedOption[], value: string | undefined) => number;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated ⚠️ `getCorrectedIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
8
|
+
*/
|
|
3
9
|
export declare const getCorrectedIndexByValue: (options: NormalizedOption[], value: string | undefined) => number;
|
|
4
10
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../select/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../select/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C;;GAEG;AACH,eAAO,MAAM,eAAe,YAAa,gBAAgB,EAAE,SAAS,MAAM,GAAG,SAAS,KAAG,MAYxF,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,wBAAwB,YAC1B,gBAAgB,EAAE,SACpB,MAAM,GAAG,SAAS,KACxB,MAIF,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCorrectedIndexByValue = exports.getIndexByValue = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated ⚠️ `getIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
6
|
+
*/
|
|
4
7
|
const getIndexByValue = (options, value) => {
|
|
5
8
|
if (!options || value === undefined) {
|
|
6
9
|
return -1;
|
|
@@ -14,6 +17,9 @@ const getIndexByValue = (options, value) => {
|
|
|
14
17
|
};
|
|
15
18
|
exports.getIndexByValue = getIndexByValue;
|
|
16
19
|
// If the value doesn't exist in the options, return index 0
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated ⚠️ `getCorrectedIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
22
|
+
*/
|
|
17
23
|
const getCorrectedIndexByValue = (options, value) => {
|
|
18
24
|
const indexByValue = exports.getIndexByValue(options, value);
|
|
19
25
|
return indexByValue === -1 ? 0 : indexByValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAC;AAGnD,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,mBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,g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G,SAAS,KAAG,MAAM,CAQjE;IAEK,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,IAAI,CAE/D;IAEF,OAAO,CAAC,uBAAuB,CA+E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CA8BxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
|
|
@@ -146,11 +146,7 @@ export class DeprecatedMenu extends React.Component {
|
|
|
146
146
|
character = '';
|
|
147
147
|
}
|
|
148
148
|
else if (typeof child === 'string' || typeof child === 'number') {
|
|
149
|
-
character = child
|
|
150
|
-
.toString()
|
|
151
|
-
.trim()
|
|
152
|
-
.substring(0, 1)
|
|
153
|
-
.toLowerCase();
|
|
149
|
+
character = child.toString().trim().substring(0, 1).toLowerCase();
|
|
154
150
|
}
|
|
155
151
|
else if (Array.isArray(child) && child[0]) {
|
|
156
152
|
// TODO test React.ReactNodeArray
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACpF;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACr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;IAEF,MAAM;IA4CN,OAAO,CAAC,WAAW,CAOjB;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,YAAY,EACZ,SAAS,EACV,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAC,GAAG,EAAO,MAAM,kCAAkC,CAAC;AAK3D,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;IAC1F,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;
|
|
1
|
+
{"version":3,"file":"StyledRadioButton.d.ts","sourceRoot":"","sources":["../../../../radio/lib/StyledRadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,YAAY,EACZ,SAAS,EACV,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAC,GAAG,EAAO,MAAM,kCAAkC,CAAC;AAK3D,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,SAAS;IAC1F,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAiID,MAAM,WAAW,sBAAuB,SAAQ,YAAY,CAAC,OAAO,GAAG,EAAE,OAAO,CAAC;IAC/E,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8FAuB5B,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ErrorType } from '@workday/canvas-kit-react/common';
|
|
2
2
|
import { CoreSelectBaseProps, Option } from './SelectBase';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated ⚠️ `SelectProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface SelectProps extends CoreSelectBaseProps {
|
|
4
7
|
/**
|
|
5
8
|
* The options of the Select. `options` may be an array of objects, an array of strings,
|
|
@@ -19,6 +22,9 @@ export interface SelectProps extends CoreSelectBaseProps {
|
|
|
19
22
|
*/
|
|
20
23
|
options: (Option | string)[];
|
|
21
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated ⚠️ `Select` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
27
|
+
*/
|
|
22
28
|
export declare const Select: import("@workday/canvas-kit-react/common").ElementComponent<"button", SelectProps> & {
|
|
23
29
|
ErrorType: typeof ErrorType;
|
|
24
30
|
};
|
|
@@ -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;
|
|
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;AAGvF;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;;OAeG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAoiBD;;GAEG;AACH,eAAO,MAAM,MAAM;;CAUjB,CAAC"}
|
|
@@ -444,6 +444,9 @@ class SelectContainer extends React.Component {
|
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
SelectContainer.ErrorType = ErrorType;
|
|
447
|
+
/**
|
|
448
|
+
* @deprecated ⚠️ `Select` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
449
|
+
*/
|
|
447
450
|
export const Select = createComponent('button')({
|
|
448
451
|
displayName: 'Select',
|
|
449
452
|
Component: (props, ref, Element) => (
|
|
@@ -4,6 +4,9 @@ import { MenuPlacement, MenuVisibility } from './types';
|
|
|
4
4
|
interface OptionData {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated ⚠️ `Option` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
9
|
+
*/
|
|
7
10
|
export interface Option {
|
|
8
11
|
data?: OptionData;
|
|
9
12
|
disabled?: boolean;
|
|
@@ -11,22 +14,37 @@ export interface Option {
|
|
|
11
14
|
label?: string;
|
|
12
15
|
value: string;
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated ⚠️ `NormalizedOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
19
|
+
*/
|
|
14
20
|
export interface NormalizedOption extends Option {
|
|
15
21
|
data: OptionData;
|
|
16
22
|
disabled: boolean;
|
|
17
23
|
id: string;
|
|
18
24
|
label: string;
|
|
19
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated ⚠️ `RenderSelectedFunction` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
28
|
+
*/
|
|
20
29
|
export interface RenderSelectedFunction {
|
|
21
30
|
(option: NormalizedOption): React.ReactNode;
|
|
22
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated ⚠️ `RenderableOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
34
|
+
*/
|
|
23
35
|
export interface RenderableOption extends NormalizedOption {
|
|
24
36
|
focused: boolean;
|
|
25
37
|
selected: boolean;
|
|
26
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated ⚠️ `RenderOptionFunction` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
41
|
+
*/
|
|
27
42
|
export interface RenderOptionFunction {
|
|
28
43
|
(option: RenderableOption): React.ReactNode;
|
|
29
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated ⚠️ `CoreSelectBaseProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
47
|
+
*/
|
|
30
48
|
export interface CoreSelectBaseProps extends Themeable, GrowthBehavior, Pick<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>, Pick<React.SelectHTMLAttributes<HTMLSelectElement>, 'required'>, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
31
49
|
/**
|
|
32
50
|
* The type of error associated with the Select (if applicable).
|
|
@@ -71,6 +89,9 @@ export interface CoreSelectBaseProps extends Themeable, GrowthBehavior, Pick<Rea
|
|
|
71
89
|
*/
|
|
72
90
|
value?: string;
|
|
73
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated ⚠️ `SelectBaseProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
94
|
+
*/
|
|
74
95
|
export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
|
|
75
96
|
/**
|
|
76
97
|
* The ref to be forwarded to the underlying button element. Use this to imperatively manipulate the button.
|
|
@@ -136,6 +157,9 @@ export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
|
|
|
136
157
|
shouldMenuAutoFocus?: boolean;
|
|
137
158
|
}
|
|
138
159
|
export declare const buttonBorderWidth = 1;
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated ⚠️ `SelectBase` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
162
|
+
*/
|
|
139
163
|
export declare const SelectBase: ({ "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex, grow, inputRef, menuPlacement, menuRef, menuVisibility, onChange, onKeyDown, onBlur, onClose, onOptionSelection, options, renderOption, renderSelected, required, shouldMenuAutoFlip, shouldMenuAutoFocus, value, ...elemProps }: SelectBaseProps) => JSX.Element;
|
|
140
164
|
export {};
|
|
141
165
|
//# sourceMappingURL=SelectBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAGtD,UAAU,UAAU;IAIlB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAQ1C,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAGtD,UAAU,UAAU;IAIlB,CAAC,GAAG,EAAE,M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|
+
/**
|
|
99
|
+
* @deprecated ⚠️ `SelectBase` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
100
|
+
*/
|
|
98
101
|
export const SelectBase = ({ 'aria-labelledby': ariaLabelledBy, 'aria-required': ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex = 0, grow, inputRef, menuPlacement = 'bottom', menuRef, menuVisibility = 'closed', onChange, onKeyDown, onBlur, onClose, onOptionSelection, options, renderOption = defaultRenderOption, renderSelected = defaultRenderSelected, required, shouldMenuAutoFlip = true, shouldMenuAutoFocus = true, value, ...elemProps }) => {
|
|
99
102
|
const focusedOptionRef = React.useRef(null);
|
|
100
103
|
const menuId = useUniqueId();
|
|
@@ -37,6 +37,9 @@ interface SelectMenuProps extends Themeable, React.HTMLAttributes<HTMLUListEleme
|
|
|
37
37
|
visibility?: MenuVisibility;
|
|
38
38
|
}
|
|
39
39
|
export declare const menuAnimationDuration = 200;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated ⚠️ `SelectMenu` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
42
|
+
*/
|
|
40
43
|
export declare const SelectMenu: ({ buttonRef, children, error, menuRef, onClose, placement, shouldAutoFlip, shouldAutoFocus, visibility, ...elemProps }: SelectMenuProps) => JSX.Element;
|
|
41
44
|
export {};
|
|
42
45
|
//# sourceMappingURL=SelectMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMenu.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAgC,SAAS,EAAS,MAAM,kCAAkC,CAAC;AAYlG,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AACrC,OAAO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S,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,MAAM,CAAC;AA8KzC;;GAEG;AACH,eAAO,MAAM,UAAU,2HAWpB,eAAe,gBA2DjB,CAAC"}
|
|
@@ -145,6 +145,9 @@ const generatePopperOptions = (props) => {
|
|
|
145
145
|
},
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated ⚠️ `SelectMenu` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
150
|
+
*/
|
|
148
151
|
export const SelectMenu = ({ buttonRef, children, error, menuRef, onClose, placement = 'bottom', shouldAutoFlip = true, shouldAutoFocus = true, visibility = 'closed', ...elemProps }) => {
|
|
149
152
|
const model = usePopupModel({
|
|
150
153
|
initialVisibility: 'visible',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ErrorType, Themeable } from '@workday/canvas-kit-react/common';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated ⚠️ `SelectOptionProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface SelectOptionProps extends Themeable, React.LiHTMLAttributes<HTMLLIElement> {
|
|
4
7
|
/**
|
|
5
8
|
* The type of error associated with the SelectOption (if applicable).
|
|
@@ -28,5 +31,8 @@ export interface SelectOptionProps extends Themeable, React.LiHTMLAttributes<HTM
|
|
|
28
31
|
*/
|
|
29
32
|
value?: string;
|
|
30
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated ⚠️ `SelectOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
36
|
+
*/
|
|
31
37
|
export declare const SelectOption: ({ children, focused, interactive, optionRef, value, ...elemProps }: SelectOptionProps) => JSX.Element;
|
|
32
38
|
//# sourceMappingURL=SelectOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EACT,SAAS,EAGV,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EACT,SAAS,EAGV,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACzF;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqED;;GAEG;AACH,eAAO,MAAM,YAAY,uEAOtB,iBAAiB,gBAanB,CAAC"}
|
|
@@ -61,6 +61,9 @@ const Option = styled('li')({
|
|
|
61
61
|
}, ({ error }) => ({
|
|
62
62
|
padding: `${optionPadding}px ${error === ErrorType.Alert ? optionPadding - 1 : optionPadding}px`,
|
|
63
63
|
}));
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated ⚠️ `SelectOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
66
|
+
*/
|
|
64
67
|
export const SelectOption = ({ children, focused = false, interactive = true, optionRef, value, ...elemProps }) => {
|
|
65
68
|
return (React.createElement(Option, Object.assign({ "data-value": value, focused: focused, interactive: interactive, ref: optionRef, role: "option" }, elemProps), children));
|
|
66
69
|
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated ⚠️ `scrollIntoViewIfNeeded` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
3
|
+
*/
|
|
1
4
|
export declare const scrollIntoViewIfNeeded: (elem: HTMLElement, centerIfNeeded?: boolean) => void;
|
|
2
5
|
//# sourceMappingURL=scrolling.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrolling.d.ts","sourceRoot":"","sources":["../../../../select/lib/scrolling.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB,SAAU,WAAW,+BAA0B,IAqCjF,CAAC"}
|
|
1
|
+
{"version":3,"file":"scrolling.d.ts","sourceRoot":"","sources":["../../../../select/lib/scrolling.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,sBAAsB,SAAU,WAAW,+BAA0B,IAqCjF,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// Modified from https://gist.github.com/hsablonniere/2581101
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated ⚠️ `scrollIntoViewIfNeeded` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
4
|
+
*/
|
|
2
5
|
export const scrollIntoViewIfNeeded = (elem, centerIfNeeded = true) => {
|
|
3
6
|
const parent = elem.parentElement;
|
|
4
7
|
if (elem && parent) {
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* https://github.com/popperjs/popper-core/blob/38914aae7a2e91715c6eb2b563517082a40cfa64/src/utils/computeOffsets.js#L68-L81
|
|
8
8
|
* This rounding causes problems with browsers that allow subpixel values for elements
|
|
9
9
|
* like Firefox and Edge.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated ⚠️ `MenuPlacement` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
10
12
|
*/
|
|
11
13
|
export declare type MenuPlacement = 'bottom' | 'top';
|
|
12
14
|
/**
|
|
@@ -28,6 +30,8 @@ export declare type MenuPlacement = 'bottom' | 'top';
|
|
|
28
30
|
* However, it's possible for a user to open a menu while it's in the process of
|
|
29
31
|
* closing in which case the menu can transition from `closing` > `opening` (and
|
|
30
32
|
* vice-versa).
|
|
33
|
+
*
|
|
34
|
+
* @deprecated ⚠️ `MenuVisibility` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
31
35
|
*/
|
|
32
36
|
export declare type MenuVisibility = 'closed' | 'open' | 'opening' | 'opened' | 'close' | 'closing';
|
|
33
37
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../select/lib/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../select/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,oBAAY,aAAa,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oBAAY,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { NormalizedOption } from './SelectBase';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated ⚠️ `getIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
4
|
+
*/
|
|
2
5
|
export declare const getIndexByValue: (options: NormalizedOption[], value: string | undefined) => number;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated ⚠️ `getCorrectedIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
8
|
+
*/
|
|
3
9
|
export declare const getCorrectedIndexByValue: (options: NormalizedOption[], value: string | undefined) => number;
|
|
4
10
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../select/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../select/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9C;;GAEG;AACH,eAAO,MAAM,eAAe,YAAa,gBAAgB,EAAE,SAAS,MAAM,GAAG,SAAS,KAAG,MAYxF,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,wBAAwB,YAC1B,gBAAgB,EAAE,SACpB,MAAM,GAAG,SAAS,KACxB,MAIF,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated ⚠️ `getIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
3
|
+
*/
|
|
1
4
|
export const getIndexByValue = (options, value) => {
|
|
2
5
|
if (!options || value === undefined) {
|
|
3
6
|
return -1;
|
|
@@ -10,6 +13,9 @@ export const getIndexByValue = (options, value) => {
|
|
|
10
13
|
return -1;
|
|
11
14
|
};
|
|
12
15
|
// If the value doesn't exist in the options, return index 0
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated ⚠️ `getCorrectedIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
18
|
+
*/
|
|
13
19
|
export const getCorrectedIndexByValue = (options, value) => {
|
|
14
20
|
const indexByValue = getIndexByValue(options, value);
|
|
15
21
|
return indexByValue === -1 ? 0 : indexByValue;
|
package/menu/lib/Menu.tsx
CHANGED
|
@@ -266,9 +266,9 @@ export class DeprecatedMenu extends React.Component<DeprecatedMenuProps, Depreca
|
|
|
266
266
|
case ' ':
|
|
267
267
|
case 'Enter':
|
|
268
268
|
nextSelectedIndex = this.state.selectedItemIndex;
|
|
269
|
-
const child = interactiveItems[
|
|
270
|
-
|
|
271
|
-
>;
|
|
269
|
+
const child = interactiveItems[
|
|
270
|
+
this.state.selectedItemIndex
|
|
271
|
+
] as React.ReactElement<DeprecatedMenuItemProps>;
|
|
272
272
|
this.handleClick(event, child.props);
|
|
273
273
|
isShortcut = true;
|
|
274
274
|
break;
|
|
@@ -324,11 +324,7 @@ export class DeprecatedMenu extends React.Component<DeprecatedMenuProps, Depreca
|
|
|
324
324
|
if (!child || typeof child === 'boolean') {
|
|
325
325
|
character = '';
|
|
326
326
|
} else if (typeof child === 'string' || typeof child === 'number') {
|
|
327
|
-
character = child
|
|
328
|
-
.toString()
|
|
329
|
-
.trim()
|
|
330
|
-
.substring(0, 1)
|
|
331
|
-
.toLowerCase();
|
|
327
|
+
character = child.toString().trim().substring(0, 1).toLowerCase();
|
|
332
328
|
} else if (Array.isArray(child) && child[0]) {
|
|
333
329
|
// TODO test React.ReactNodeArray
|
|
334
330
|
character = getFirstCharacter(child[0]);
|
package/menu/lib/MenuItem.tsx
CHANGED
|
@@ -111,9 +111,10 @@ const Item = styled('li')<Pick<DeprecatedMenuItemProps, 'isDisabled' | 'isFocuse
|
|
|
111
111
|
'span .wd-icon-fill, span .wd-icon-accent, span .wd-icon-accent2': {
|
|
112
112
|
fill: iconColors.inverse,
|
|
113
113
|
},
|
|
114
|
-
'span .wd-icon-background ~ .wd-icon-accent, span .wd-icon-background ~ .wd-icon-accent2':
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
'span .wd-icon-background ~ .wd-icon-accent, span .wd-icon-background ~ .wd-icon-accent2':
|
|
115
|
+
{
|
|
116
|
+
fill: isDisabled ? iconColors.disabled : iconColors.active,
|
|
117
|
+
},
|
|
117
118
|
'span .wd-icon-background': {
|
|
118
119
|
fill: iconColors.inverse,
|
|
119
120
|
},
|
|
@@ -123,9 +124,10 @@ const Item = styled('li')<Pick<DeprecatedMenuItemProps, 'isDisabled' | 'isFocuse
|
|
|
123
124
|
[data-whatinput='pointer'] &`]: {
|
|
124
125
|
backgroundColor: 'inherit',
|
|
125
126
|
color: colors.blackPepper300,
|
|
126
|
-
'span .wd-icon-background ~ .wd-icon-accent, span .wd-icon-background ~ .wd-icon-accent2':
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
'span .wd-icon-background ~ .wd-icon-accent, span .wd-icon-background ~ .wd-icon-accent2':
|
|
128
|
+
{
|
|
129
|
+
fill: iconColors.standard,
|
|
130
|
+
},
|
|
129
131
|
'&:hover': {
|
|
130
132
|
backgroundColor: commonColors.hoverBackground,
|
|
131
133
|
'span .wd-icon-fill, span .wd-icon-accent, span .wd-icon-accent2': {
|
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.543-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": "^
|
|
49
|
+
"@workday/canvas-kit-react": "^9.1.25",
|
|
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": "e60a421331ce924600e49158d796a5ee109c77c4"
|
|
60
60
|
}
|
|
@@ -111,12 +111,13 @@ const StyledRadioInput = styled(Box.as('input'))<StyledRadioButtonProps & Styled
|
|
|
111
111
|
},
|
|
112
112
|
|
|
113
113
|
...mouseFocusBehavior({
|
|
114
|
-
'&:focus + .cnvs-radio-check, &:focus:hover + .cnvs-radio-check, &:focus:active + .cnvs-radio-check, &:focus:hover:checked + .cnvs-radio-check, &:focus:active:checked + .cnvs-radio-check':
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
'&:focus + .cnvs-radio-check, &:focus:hover + .cnvs-radio-check, &:focus:active + .cnvs-radio-check, &:focus:hover:checked + .cnvs-radio-check, &:focus:active:checked + .cnvs-radio-check':
|
|
115
|
+
{
|
|
116
|
+
...focusRing({
|
|
117
|
+
width: 0,
|
|
118
|
+
outerColor: variant === 'inverse' ? colors.frenchVanilla100 : themeFocusOutline,
|
|
119
|
+
}),
|
|
120
|
+
},
|
|
120
121
|
}),
|
|
121
122
|
})
|
|
122
123
|
);
|
package/select/lib/Select.tsx
CHANGED
|
@@ -10,7 +10,9 @@ import {menuAnimationDuration} from './SelectMenu';
|
|
|
10
10
|
import {SelectBase, CoreSelectBaseProps, Option, NormalizedOption} from './SelectBase';
|
|
11
11
|
import {MenuVisibility} from './types';
|
|
12
12
|
import {getCorrectedIndexByValue} from './utils';
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated ⚠️ `SelectProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
15
|
+
*/
|
|
14
16
|
export interface SelectProps extends CoreSelectBaseProps {
|
|
15
17
|
/**
|
|
16
18
|
* The options of the Select. `options` may be an array of objects, an array of strings,
|
|
@@ -577,7 +579,9 @@ class SelectContainer extends React.Component<SelectContainerProps, SelectContai
|
|
|
577
579
|
);
|
|
578
580
|
}
|
|
579
581
|
}
|
|
580
|
-
|
|
582
|
+
/**
|
|
583
|
+
* @deprecated ⚠️ `Select` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
584
|
+
*/
|
|
581
585
|
export const Select = createComponent('button')({
|
|
582
586
|
displayName: 'Select',
|
|
583
587
|
Component: (props: SelectProps, ref, Element) => (
|
|
@@ -25,7 +25,9 @@ interface OptionData {
|
|
|
25
25
|
// function without encountering TypeScript errors
|
|
26
26
|
[key: string]: any;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated ⚠️ `Option` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
30
|
+
*/
|
|
29
31
|
export interface Option {
|
|
30
32
|
data?: OptionData;
|
|
31
33
|
disabled?: boolean;
|
|
@@ -33,7 +35,9 @@ export interface Option {
|
|
|
33
35
|
label?: string;
|
|
34
36
|
value: string;
|
|
35
37
|
}
|
|
36
|
-
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated ⚠️ `NormalizedOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
40
|
+
*/
|
|
37
41
|
export interface NormalizedOption extends Option {
|
|
38
42
|
// Optional keys in Option are required in NormalizedOption
|
|
39
43
|
data: OptionData;
|
|
@@ -41,20 +45,28 @@ export interface NormalizedOption extends Option {
|
|
|
41
45
|
id: string;
|
|
42
46
|
label: string;
|
|
43
47
|
}
|
|
44
|
-
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated ⚠️ `RenderSelectedFunction` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
50
|
+
*/
|
|
45
51
|
export interface RenderSelectedFunction {
|
|
46
52
|
(option: NormalizedOption): React.ReactNode;
|
|
47
53
|
}
|
|
48
|
-
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated ⚠️ `RenderableOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
56
|
+
*/
|
|
49
57
|
export interface RenderableOption extends NormalizedOption {
|
|
50
58
|
focused: boolean;
|
|
51
59
|
selected: boolean;
|
|
52
60
|
}
|
|
53
|
-
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated ⚠️ `RenderOptionFunction` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
63
|
+
*/
|
|
54
64
|
export interface RenderOptionFunction {
|
|
55
65
|
(option: RenderableOption): React.ReactNode;
|
|
56
66
|
}
|
|
57
|
-
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated ⚠️ `CoreSelectBaseProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
69
|
+
*/
|
|
58
70
|
export interface CoreSelectBaseProps
|
|
59
71
|
extends Themeable,
|
|
60
72
|
GrowthBehavior,
|
|
@@ -104,7 +116,9 @@ export interface CoreSelectBaseProps
|
|
|
104
116
|
*/
|
|
105
117
|
value?: string;
|
|
106
118
|
}
|
|
107
|
-
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated ⚠️ `SelectBaseProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
121
|
+
*/
|
|
108
122
|
export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
|
|
109
123
|
/**
|
|
110
124
|
* The ref to be forwarded to the underlying button element. Use this to imperatively manipulate the button.
|
|
@@ -278,7 +292,9 @@ const defaultRenderOption: RenderOptionFunction = option => {
|
|
|
278
292
|
const defaultRenderSelected: RenderSelectedFunction = option => {
|
|
279
293
|
return option.label;
|
|
280
294
|
};
|
|
281
|
-
|
|
295
|
+
/**
|
|
296
|
+
* @deprecated ⚠️ `SelectBase` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
297
|
+
*/
|
|
282
298
|
export const SelectBase = ({
|
|
283
299
|
'aria-labelledby': ariaLabelledBy,
|
|
284
300
|
'aria-required': ariaRequired,
|
|
@@ -228,6 +228,9 @@ const generatePopperOptions = (
|
|
|
228
228
|
};
|
|
229
229
|
};
|
|
230
230
|
|
|
231
|
+
/**
|
|
232
|
+
* @deprecated ⚠️ `SelectMenu` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
233
|
+
*/
|
|
231
234
|
export const SelectMenu = ({
|
|
232
235
|
buttonRef,
|
|
233
236
|
children,
|
|
@@ -8,7 +8,9 @@ import {
|
|
|
8
8
|
styled,
|
|
9
9
|
} from '@workday/canvas-kit-react/common';
|
|
10
10
|
import {colors, commonColors, type} from '@workday/canvas-kit-react/tokens';
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated ⚠️ `SelectOptionProps` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
13
|
+
*/
|
|
12
14
|
export interface SelectOptionProps extends Themeable, React.LiHTMLAttributes<HTMLLIElement> {
|
|
13
15
|
/**
|
|
14
16
|
* The type of error associated with the SelectOption (if applicable).
|
|
@@ -105,6 +107,9 @@ const Option = styled('li')<SelectOptionProps>(
|
|
|
105
107
|
})
|
|
106
108
|
);
|
|
107
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated ⚠️ `SelectOption` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
112
|
+
*/
|
|
108
113
|
export const SelectOption = ({
|
|
109
114
|
children,
|
|
110
115
|
focused = false,
|
package/select/lib/scrolling.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// Modified from https://gist.github.com/hsablonniere/2581101
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated ⚠️ `scrollIntoViewIfNeeded` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
4
|
+
*/
|
|
2
5
|
export const scrollIntoViewIfNeeded = (elem: HTMLElement, centerIfNeeded = true): void => {
|
|
3
6
|
const parent = elem.parentElement;
|
|
4
7
|
|
package/select/lib/types.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* https://github.com/popperjs/popper-core/blob/38914aae7a2e91715c6eb2b563517082a40cfa64/src/utils/computeOffsets.js#L68-L81
|
|
8
8
|
* This rounding causes problems with browsers that allow subpixel values for elements
|
|
9
9
|
* like Firefox and Edge.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated ⚠️ `MenuPlacement` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
10
12
|
*/
|
|
11
13
|
export type MenuPlacement = 'bottom' | 'top';
|
|
12
14
|
|
|
@@ -29,5 +31,7 @@ export type MenuPlacement = 'bottom' | 'top';
|
|
|
29
31
|
* However, it's possible for a user to open a menu while it's in the process of
|
|
30
32
|
* closing in which case the menu can transition from `closing` > `opening` (and
|
|
31
33
|
* vice-versa).
|
|
34
|
+
*
|
|
35
|
+
* @deprecated ⚠️ `MenuVisibility` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
32
36
|
*/
|
|
33
37
|
export type MenuVisibility = 'closed' | 'open' | 'opening' | 'opened' | 'close' | 'closing';
|
package/select/lib/utils.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {NormalizedOption} from './SelectBase';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated ⚠️ `getIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
4
|
+
*/
|
|
3
5
|
export const getIndexByValue = (options: NormalizedOption[], value: string | undefined): number => {
|
|
4
6
|
if (!options || value === undefined) {
|
|
5
7
|
return -1;
|
|
@@ -15,6 +17,9 @@ export const getIndexByValue = (options: NormalizedOption[], value: string | und
|
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
// If the value doesn't exist in the options, return index 0
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated ⚠️ `getCorrectedIndexByValue` in Preview has been deprecated and will be removed in a future major version. Please use [`Select` in Main](https://workday.github.io/canvas-kit/?path=/docs/components-inputs-select--basic) instead.
|
|
22
|
+
*/
|
|
18
23
|
export const getCorrectedIndexByValue = (
|
|
19
24
|
options: NormalizedOption[],
|
|
20
25
|
value: string | undefined
|