@workday/canvas-kit-preview-react 7.0.0-alpha.88-next.15 → 7.0.0-alpha.91-next.18
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/form-field/lib/FormField.d.ts +46 -12
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormField.js +7 -11
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +8 -12
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.js +11 -13
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +8 -7
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldInput.js +5 -19
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +8 -3
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +9 -11
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +8 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +2 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +8 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +2 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +8 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +2 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +77 -15
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +41 -15
- package/dist/commonjs/menu/lib/Menu.js +1 -1
- package/dist/commonjs/text-area/lib/TextArea.d.ts +52 -11
- package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextArea.js +9 -15
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts +15 -7
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.js +16 -17
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +27 -7
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInput.d.ts +59 -11
- package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInput.js +9 -15
- package/dist/commonjs/text-input/lib/TextInputField.d.ts +15 -7
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +15 -29
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +8 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +2 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +27 -7
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormField.d.ts +46 -12
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormField.js +8 -12
- package/dist/es6/form-field/lib/FormFieldHint.d.ts +8 -12
- package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.js +13 -15
- package/dist/es6/form-field/lib/FormFieldInput.d.ts +8 -7
- package/dist/es6/form-field/lib/FormFieldInput.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldInput.js +7 -21
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts +8 -3
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.js +11 -13
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +8 -5
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +3 -2
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +8 -5
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +3 -2
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +8 -5
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +3 -2
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +77 -15
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +42 -15
- package/dist/es6/menu/lib/Menu.js +1 -1
- package/dist/es6/text-area/lib/TextArea.d.ts +52 -11
- package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextArea.js +10 -16
- package/dist/es6/text-area/lib/TextAreaField.d.ts +15 -7
- package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextAreaField.js +17 -18
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +27 -7
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInput.d.ts +59 -11
- package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInput.js +10 -16
- package/dist/es6/text-input/lib/TextInputField.d.ts +15 -7
- package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInputField.js +17 -31
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +8 -1
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
- package/dist/es6/text-input/lib/hooks/useTextInputField.js +3 -2
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +27 -7
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
- package/form-field/lib/FormField.tsx +13 -28
- package/form-field/lib/FormFieldHint.tsx +21 -32
- package/form-field/lib/FormFieldInput.tsx +7 -14
- package/form-field/lib/FormFieldLabel.tsx +17 -21
- package/form-field/lib/hooks/useFormFieldHint.tsx +3 -3
- package/form-field/lib/hooks/useFormFieldInput.tsx +3 -3
- package/form-field/lib/hooks/useFormFieldLabel.tsx +3 -3
- package/form-field/lib/hooks/useFormFieldModel.tsx +32 -53
- package/menu/lib/Menu.tsx +1 -1
- package/package.json +7 -16
- package/text-area/lib/TextArea.tsx +15 -29
- package/text-area/lib/TextAreaField.tsx +30 -44
- package/text-area/lib/hooks/useTextAreaModel.ts +1 -3
- package/text-input/lib/TextInput.tsx +15 -29
- package/text-input/lib/TextInputField.tsx +31 -43
- package/text-input/lib/hooks/useTextInputField.tsx +3 -2
- package/text-input/lib/hooks/useTextInputModel.ts +1 -3
- package/dist/commonjs/text-area/lib/TextAreaHint.d.ts +0 -5
- package/dist/commonjs/text-area/lib/TextAreaHint.d.ts.map +0 -1
- package/dist/commonjs/text-area/lib/TextAreaHint.js +0 -5
- package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +0 -5
- package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts.map +0 -1
- package/dist/commonjs/text-area/lib/TextAreaLabel.js +0 -5
- package/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -5
- package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/TextInputHint.js +0 -5
- package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -5
- package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +0 -1
- package/dist/commonjs/text-input/lib/TextInputLabel.js +0 -5
- package/dist/es6/text-area/lib/TextAreaHint.d.ts +0 -5
- package/dist/es6/text-area/lib/TextAreaHint.d.ts.map +0 -1
- package/dist/es6/text-area/lib/TextAreaHint.js +0 -2
- package/dist/es6/text-area/lib/TextAreaLabel.d.ts +0 -5
- package/dist/es6/text-area/lib/TextAreaLabel.d.ts.map +0 -1
- package/dist/es6/text-area/lib/TextAreaLabel.js +0 -2
- package/dist/es6/text-input/lib/TextInputHint.d.ts +0 -5
- package/dist/es6/text-input/lib/TextInputHint.d.ts.map +0 -1
- package/dist/es6/text-input/lib/TextInputHint.js +0 -2
- package/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -5
- package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +0 -1
- package/dist/es6/text-input/lib/TextInputLabel.js +0 -2
- package/text-area/lib/TextAreaHint.tsx +0 -6
- package/text-area/lib/TextAreaLabel.tsx +0 -6
- package/text-input/lib/TextInputHint.tsx +0 -6
- package/text-input/lib/TextInputLabel.tsx +0 -6
- package/ts3.5/dist/commonjs/breadcrumbs/index.d.ts +0 -5
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
- package/ts3.5/dist/commonjs/color-picker/index.d.ts +0 -2
- package/ts3.5/dist/commonjs/color-picker/lib/ColorPicker.d.ts +0 -55
- package/ts3.5/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts +0 -7
- package/ts3.5/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts +0 -7
- package/ts3.5/dist/commonjs/form-field/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/form-field/lib/FormField.d.ts +0 -31
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldHint.d.ts +0 -13
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldInput.d.ts +0 -8
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +0 -18
- package/ts3.5/dist/commonjs/form-field/lib/hooks/index.d.ts +0 -6
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +0 -14
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +0 -17
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -14
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +0 -36
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +0 -10
- package/ts3.5/dist/commonjs/index.d.ts +0 -9
- package/ts3.5/dist/commonjs/menu/index.d.ts +0 -6
- package/ts3.5/dist/commonjs/menu/lib/Menu.d.ts +0 -61
- package/ts3.5/dist/commonjs/menu/lib/MenuItem.d.ts +0 -53
- package/ts3.5/dist/commonjs/select/index.d.ts +0 -6
- package/ts3.5/dist/commonjs/select/lib/Select.d.ts +0 -25
- package/ts3.5/dist/commonjs/select/lib/SelectBase.d.ts +0 -123
- package/ts3.5/dist/commonjs/select/lib/SelectMenu.d.ts +0 -42
- package/ts3.5/dist/commonjs/select/lib/SelectOption.d.ts +0 -33
- package/ts3.5/dist/commonjs/select/lib/scrolling.d.ts +0 -2
- package/ts3.5/dist/commonjs/select/lib/types.d.ts +0 -33
- package/ts3.5/dist/commonjs/select/lib/utils.d.ts +0 -4
- package/ts3.5/dist/commonjs/side-panel/index.d.ts +0 -6
- package/ts3.5/dist/commonjs/side-panel/lib/SidePanel.d.ts +0 -86
- package/ts3.5/dist/commonjs/side-panel/lib/hooks.d.ts +0 -80
- package/ts3.5/dist/commonjs/text-area/index.d.ts +0 -2
- package/ts3.5/dist/commonjs/text-area/lib/TextArea.d.ts +0 -22
- package/ts3.5/dist/commonjs/text-area/lib/TextAreaField.d.ts +0 -8
- package/ts3.5/dist/commonjs/text-area/lib/TextAreaHint.d.ts +0 -5
- package/ts3.5/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +0 -5
- package/ts3.5/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
- package/ts3.5/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -8
- package/ts3.5/dist/commonjs/text-input/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +0 -22
- package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +0 -8
- package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +0 -5
- package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +0 -5
- package/ts3.5/dist/commonjs/text-input/lib/hooks/index.d.ts +0 -3
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +0 -9
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +0 -8
- package/ts3.5/dist/es6/breadcrumbs/index.d.ts +0 -5
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
- package/ts3.5/dist/es6/color-picker/index.d.ts +0 -2
- package/ts3.5/dist/es6/color-picker/lib/ColorPicker.d.ts +0 -55
- package/ts3.5/dist/es6/color-picker/lib/parts/ColorReset.d.ts +0 -7
- package/ts3.5/dist/es6/color-picker/lib/parts/SwatchBook.d.ts +0 -7
- package/ts3.5/dist/es6/form-field/index.d.ts +0 -3
- package/ts3.5/dist/es6/form-field/lib/FormField.d.ts +0 -31
- package/ts3.5/dist/es6/form-field/lib/FormFieldHint.d.ts +0 -13
- package/ts3.5/dist/es6/form-field/lib/FormFieldInput.d.ts +0 -8
- package/ts3.5/dist/es6/form-field/lib/FormFieldLabel.d.ts +0 -18
- package/ts3.5/dist/es6/form-field/lib/hooks/index.d.ts +0 -6
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +0 -14
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +0 -17
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -14
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +0 -36
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +0 -10
- package/ts3.5/dist/es6/index.d.ts +0 -9
- package/ts3.5/dist/es6/menu/index.d.ts +0 -6
- package/ts3.5/dist/es6/menu/lib/Menu.d.ts +0 -61
- package/ts3.5/dist/es6/menu/lib/MenuItem.d.ts +0 -53
- package/ts3.5/dist/es6/select/index.d.ts +0 -6
- package/ts3.5/dist/es6/select/lib/Select.d.ts +0 -25
- package/ts3.5/dist/es6/select/lib/SelectBase.d.ts +0 -123
- package/ts3.5/dist/es6/select/lib/SelectMenu.d.ts +0 -42
- package/ts3.5/dist/es6/select/lib/SelectOption.d.ts +0 -33
- package/ts3.5/dist/es6/select/lib/scrolling.d.ts +0 -2
- package/ts3.5/dist/es6/select/lib/types.d.ts +0 -33
- package/ts3.5/dist/es6/select/lib/utils.d.ts +0 -4
- package/ts3.5/dist/es6/side-panel/index.d.ts +0 -6
- package/ts3.5/dist/es6/side-panel/lib/SidePanel.d.ts +0 -86
- package/ts3.5/dist/es6/side-panel/lib/hooks.d.ts +0 -80
- package/ts3.5/dist/es6/text-area/index.d.ts +0 -2
- package/ts3.5/dist/es6/text-area/lib/TextArea.d.ts +0 -22
- package/ts3.5/dist/es6/text-area/lib/TextAreaField.d.ts +0 -8
- package/ts3.5/dist/es6/text-area/lib/TextAreaHint.d.ts +0 -5
- package/ts3.5/dist/es6/text-area/lib/TextAreaLabel.d.ts +0 -5
- package/ts3.5/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
- package/ts3.5/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -8
- package/ts3.5/dist/es6/text-input/index.d.ts +0 -3
- package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +0 -22
- package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +0 -8
- package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +0 -5
- package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +0 -5
- package/ts3.5/dist/es6/text-input/lib/hooks/index.d.ts +0 -3
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +0 -9
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -8
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ColorPickerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* The function called when the ColorPicker state changes.
|
|
5
|
-
*/
|
|
6
|
-
onColorChange: (color: string) => void;
|
|
7
|
-
/**
|
|
8
|
-
* The value of the ColorPicker.
|
|
9
|
-
*/
|
|
10
|
-
value?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The array of colors to be rendered in the swatchbook.
|
|
13
|
-
*/
|
|
14
|
-
colorSet?: string[];
|
|
15
|
-
/**
|
|
16
|
-
* If true, render an input for entering a custom hex color.
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
showCustomHexInput?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The label text of the custom hex input.
|
|
22
|
-
* @default 'Custom Hex Color'
|
|
23
|
-
*/
|
|
24
|
-
customHexInputLabel?: string;
|
|
25
|
-
/**
|
|
26
|
-
* The label of the custom hex color submit icon button.
|
|
27
|
-
* @default 'Submit'
|
|
28
|
-
*/
|
|
29
|
-
submitLabel?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The function called when the submit icon is clicked.
|
|
32
|
-
*/
|
|
33
|
-
onSubmitClick?: (event: React.FormEvent) => void;
|
|
34
|
-
/**
|
|
35
|
-
* The function called when the color rest button is selected.
|
|
36
|
-
* It is required to be set for the reset button to render.
|
|
37
|
-
*/
|
|
38
|
-
onColorReset?: (color: string) => void;
|
|
39
|
-
/**
|
|
40
|
-
* The color that the reset button resets to.
|
|
41
|
-
* It is required to be set for the reset button to render.
|
|
42
|
-
*/
|
|
43
|
-
resetColor?: string;
|
|
44
|
-
/**
|
|
45
|
-
* The label text of the reset button.
|
|
46
|
-
* @default 'Reset'
|
|
47
|
-
*/
|
|
48
|
-
resetLabel?: string;
|
|
49
|
-
}
|
|
50
|
-
declare const ColorPicker: {
|
|
51
|
-
({ colorSet, customHexInputLabel, submitLabel, onColorChange, onColorReset, onSubmitClick, resetLabel, resetColor, value, showCustomHexInput, ...elemProps }: ColorPickerProps): JSX.Element;
|
|
52
|
-
defaultColorSet: string[];
|
|
53
|
-
};
|
|
54
|
-
export default ColorPicker;
|
|
55
|
-
//# sourceMappingURL=ColorPicker.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Stack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
import { FormFieldModel, FormFieldModelConfig } from './hooks';
|
|
5
|
-
export declare const FormFieldModelContext: React.Context<import("@workday/canvas-kit-react/common").Model<{
|
|
6
|
-
hasError?: boolean | undefined;
|
|
7
|
-
id?: string | undefined;
|
|
8
|
-
isRequired?: boolean | undefined;
|
|
9
|
-
}, {}>>;
|
|
10
|
-
export interface FormFieldProps extends FormFieldModelConfig, Omit<ExtractProps<typeof Stack, never>, 'spacing'> {
|
|
11
|
-
model?: FormFieldModel;
|
|
12
|
-
/**
|
|
13
|
-
* Children of the Text Input. Should contain a `<FormField.Input>`, a `<FormField.Label>` and an optional `<FormField.Hint>`
|
|
14
|
-
*/
|
|
15
|
-
children: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* The direction the child elements should stack
|
|
18
|
-
*/
|
|
19
|
-
orientation: 'vertical' | 'horizontal';
|
|
20
|
-
/**
|
|
21
|
-
* Spacing between children elements
|
|
22
|
-
* @default xxxs when vertical l when orientation is horizontal
|
|
23
|
-
*/
|
|
24
|
-
spacing?: StackSpacing;
|
|
25
|
-
}
|
|
26
|
-
export declare const FormField: import("@workday/canvas-kit-react/common").Component<FormFieldProps> & {
|
|
27
|
-
Input: import("@workday/canvas-kit-react/common").ElementComponent<"input", import("./FormFieldInput").FormFieldInputProps>;
|
|
28
|
-
Label: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("./FormFieldLabel").FormFieldLabelProps>;
|
|
29
|
-
Hint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("./FormFieldHint").FormFieldHintProps>;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Box } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
import { FormFieldModel } from './hooks';
|
|
5
|
-
export interface FormFieldHintProps extends ExtractProps<typeof Box, never> {
|
|
6
|
-
model?: FormFieldModel;
|
|
7
|
-
/**
|
|
8
|
-
* Hint text to show to the user regarding the Error/Alert
|
|
9
|
-
*/
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponent<"p", FormFieldHintProps>;
|
|
13
|
-
//# sourceMappingURL=FormFieldHint.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { Box } from '@workday/canvas-kit-react/layout';
|
|
3
|
-
import { FormFieldModel } from './hooks';
|
|
4
|
-
export interface FormFieldInputProps extends ExtractProps<typeof Box, never> {
|
|
5
|
-
model?: FormFieldModel;
|
|
6
|
-
}
|
|
7
|
-
export declare const FormFieldInput: import("@workday/canvas-kit-react/common").ElementComponent<"input", FormFieldInputProps>;
|
|
8
|
-
//# sourceMappingURL=FormFieldInput.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { HStack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
import { FormFieldModel } from './hooks';
|
|
5
|
-
export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
|
|
6
|
-
model?: FormFieldModel;
|
|
7
|
-
/**
|
|
8
|
-
* The text of the label.
|
|
9
|
-
*/
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* When the input is required, this is spacing between label and asterisk.
|
|
13
|
-
* @default xxxs
|
|
14
|
-
*/
|
|
15
|
-
spacing?: StackSpacing;
|
|
16
|
-
}
|
|
17
|
-
export declare const FormFieldLabel: import("@workday/canvas-kit-react/common").ElementComponent<"label", FormFieldLabelProps>;
|
|
18
|
-
//# sourceMappingURL=FormFieldLabel.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds the necessary props to a `Hint` component.
|
|
3
|
-
* Used by the FormField.Hint subcomponent and other input type components
|
|
4
|
-
*/
|
|
5
|
-
export declare const useFormFieldHint: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
|
|
6
|
-
hasError?: boolean | undefined;
|
|
7
|
-
id?: string | undefined;
|
|
8
|
-
isRequired?: boolean | undefined;
|
|
9
|
-
}, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
10
|
-
id: string;
|
|
11
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
12
|
-
ref: import("react").Ref<R>;
|
|
13
|
-
} : {});
|
|
14
|
-
//# sourceMappingURL=useFormFieldHint.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds the necessary props to an `Input` component.
|
|
3
|
-
* Used by the FormField.Input subcomponent and other input type components
|
|
4
|
-
*/
|
|
5
|
-
export declare const useFormFieldInput: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
|
|
6
|
-
hasError?: boolean | undefined;
|
|
7
|
-
id?: string | undefined;
|
|
8
|
-
isRequired?: boolean | undefined;
|
|
9
|
-
}, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
10
|
-
required: boolean | undefined;
|
|
11
|
-
'aria-invalid': boolean | undefined;
|
|
12
|
-
'aria-describedby': string;
|
|
13
|
-
id: string;
|
|
14
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
15
|
-
ref: import("react").Ref<R>;
|
|
16
|
-
} : {});
|
|
17
|
-
//# sourceMappingURL=useFormFieldInput.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds the necessary props to a `Label` component.
|
|
3
|
-
* Used by the FormField.Label subcomponent and other input type components
|
|
4
|
-
*/
|
|
5
|
-
export declare const useFormFieldLabel: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
|
|
6
|
-
hasError?: boolean | undefined;
|
|
7
|
-
id?: string | undefined;
|
|
8
|
-
isRequired?: boolean | undefined;
|
|
9
|
-
}, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
10
|
-
htmlFor: string;
|
|
11
|
-
} & P & (R extends HTMLOrSVGElement ? {
|
|
12
|
-
ref: import("react").Ref<R>;
|
|
13
|
-
} : {});
|
|
14
|
-
//# sourceMappingURL=useFormFieldLabel.d.ts.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Model, ToModelConfig } from '@workday/canvas-kit-react/common';
|
|
2
|
-
declare type FormFieldState = {
|
|
3
|
-
/**
|
|
4
|
-
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
5
|
-
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
6
|
-
* @default false
|
|
7
|
-
*/
|
|
8
|
-
hasError?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
11
|
-
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
12
|
-
* - `FormField.Input` will set `id` to `input-${id}`
|
|
13
|
-
* - `FormField.Label` will set `htmlFor` to `input-${id}`
|
|
14
|
-
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
15
|
-
*
|
|
16
|
-
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
17
|
-
* @default `useUniqueId()`
|
|
18
|
-
*/
|
|
19
|
-
id?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
22
|
-
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
isRequired?: boolean;
|
|
26
|
-
};
|
|
27
|
-
declare type FormFieldEvents = {};
|
|
28
|
-
export declare type FormFieldModel = Model<FormFieldState, FormFieldEvents>;
|
|
29
|
-
declare const formFieldEventMap: {
|
|
30
|
-
guards: {};
|
|
31
|
-
callbacks: {};
|
|
32
|
-
};
|
|
33
|
-
export declare type FormFieldModelConfig = FormFieldState & Partial<ToModelConfig<FormFieldState, FormFieldEvents, typeof formFieldEventMap>>;
|
|
34
|
-
export declare const useFormFieldModel: (config?: FormFieldModelConfig) => FormFieldModel;
|
|
35
|
-
export {};
|
|
36
|
-
//# sourceMappingURL=useFormFieldModel.d.ts.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StackSpacing, StackProps } from '@workday/canvas-kit-react/layout';
|
|
2
|
-
/**
|
|
3
|
-
* Adds the necessary layout props to a `FormField` component.
|
|
4
|
-
*/
|
|
5
|
-
export declare const useFormFieldOrientation: (orientation: 'horizontal' | 'vertical') => {
|
|
6
|
-
flexDirection: StackProps['flexDirection'];
|
|
7
|
-
alignItems: StackProps['alignItems'];
|
|
8
|
-
spacing: StackSpacing;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=useFormFieldOrientation.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './breadcrumbs';
|
|
2
|
-
export * from './color-picker';
|
|
3
|
-
export * from './form-field';
|
|
4
|
-
export * from './menu';
|
|
5
|
-
export * from './select';
|
|
6
|
-
export * from './side-panel';
|
|
7
|
-
export * from './text-area';
|
|
8
|
-
export * from './text-input';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { MenuItemProps } from './MenuItem';
|
|
3
|
-
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
4
|
-
export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLUListElement> {
|
|
5
|
-
/**
|
|
6
|
-
* The MenuItem children of the Menu (must be at least one). Also accepts other components which share the same interface as `MenuItem`.
|
|
7
|
-
*/
|
|
8
|
-
children?: React.ReactElement<MenuItemProps> | React.ReactElement<MenuItemProps>[];
|
|
9
|
-
/**
|
|
10
|
-
* If true, set the Menu to the open state. Useful for showing and hiding the Menu from a parent component such as a menu button.
|
|
11
|
-
* @default true
|
|
12
|
-
*/
|
|
13
|
-
isOpen?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* The width of the Menu. If no value is provided, the Menu will collapse around its content.
|
|
16
|
-
*/
|
|
17
|
-
width?: number | string;
|
|
18
|
-
/**
|
|
19
|
-
* The function called when a menu item is selected.
|
|
20
|
-
*/
|
|
21
|
-
onSelect?: () => void;
|
|
22
|
-
/**
|
|
23
|
-
* The function called when the Menu should close. This is called after a menu item is selected or if the escape shortcut key is used. This will not fire if the menu item sets `shouldClose` to false.
|
|
24
|
-
*/
|
|
25
|
-
onClose?: () => void;
|
|
26
|
-
/**
|
|
27
|
-
* The zero-based index of the menu item which should initially receive focus.
|
|
28
|
-
*/
|
|
29
|
-
initialSelectedItem?: number;
|
|
30
|
-
/**
|
|
31
|
-
* The unique id of the Menu used for ARIA and HTML `id` attributes.
|
|
32
|
-
*/
|
|
33
|
-
id?: string;
|
|
34
|
-
/**
|
|
35
|
-
* The HTML `id` of the element that labels the Menu. Often used with menu buttons.
|
|
36
|
-
*/
|
|
37
|
-
'aria-labelledby'?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface MenuState {
|
|
40
|
-
selectedItemIndex: number;
|
|
41
|
-
}
|
|
42
|
-
export default class Menu extends React.Component<MenuProps, MenuState> {
|
|
43
|
-
private id;
|
|
44
|
-
private animateId;
|
|
45
|
-
private menuRef;
|
|
46
|
-
private firstCharacters;
|
|
47
|
-
constructor(props: MenuProps);
|
|
48
|
-
componentDidUpdate(prevProps: MenuProps): void;
|
|
49
|
-
componentDidMount(): void;
|
|
50
|
-
componentWillUnmount(): void;
|
|
51
|
-
render(): JSX.Element;
|
|
52
|
-
getNormalizedItemIndex: (index: number | undefined) => number;
|
|
53
|
-
setNormalizedItemIndex: (index: number | undefined) => void;
|
|
54
|
-
private handleKeyboardShortcuts;
|
|
55
|
-
private handleClick;
|
|
56
|
-
private getIndexFirstChars;
|
|
57
|
-
private setFirstCharacters;
|
|
58
|
-
private getInitialSelectedItem;
|
|
59
|
-
private setInitialSelectedItem;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
3
|
-
export interface MenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
4
|
-
/**
|
|
5
|
-
* The function called when the MenuItem is clicked. If the item is a child of the Menu component, this callback will be decorated with the onSelect and onClose Menu callbacks. This callback will not fire if the item is disabled (see below).
|
|
6
|
-
*/
|
|
7
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
8
|
-
/**
|
|
9
|
-
* The unique id for the MenuItem used for ARIA attributes. If the item is a child of the `Menu` component, this property will be generated and overridden.
|
|
10
|
-
*/
|
|
11
|
-
id?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The icon of the MenuItem. This icon is displayed before what you supplied for the children.
|
|
14
|
-
*/
|
|
15
|
-
icon?: CanvasSystemIcon;
|
|
16
|
-
/**
|
|
17
|
-
* The secondary icon of the MenuItem. This icon is displayed after what you supplied for the children.
|
|
18
|
-
*/
|
|
19
|
-
secondaryIcon?: CanvasSystemIcon;
|
|
20
|
-
/**
|
|
21
|
-
* If true, render a top border on the MenuItem.
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
hasDivider?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* If true, set the MenuItem to the disabled state so it is not clickable.
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
isDisabled?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* If true, set the MenuItem to be the currently selected item. If the item is a child of the Menu component, this property will be generated and overridden.
|
|
32
|
-
* @default false
|
|
33
|
-
*/
|
|
34
|
-
isFocused?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* The role of the MenuItem. Use this to override the role of the item (e.g. you can use this element as an option in a Combobox).
|
|
37
|
-
* @default menuItem
|
|
38
|
-
*/
|
|
39
|
-
role?: string;
|
|
40
|
-
/**
|
|
41
|
-
* If true, allow the onClose Menu callback to be fired after the MenuItem has been clicked.
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
|
-
shouldClose?: boolean;
|
|
45
|
-
}
|
|
46
|
-
declare class MenuItem extends React.Component<MenuItemProps> {
|
|
47
|
-
ref: React.RefObject<HTMLLIElement>;
|
|
48
|
-
componentDidUpdate: (prevProps: MenuItemProps) => void;
|
|
49
|
-
render(): React.ReactNode;
|
|
50
|
-
private handleClick;
|
|
51
|
-
}
|
|
52
|
-
export default MenuItem;
|
|
53
|
-
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ErrorType } from '@workday/canvas-kit-react/common';
|
|
2
|
-
import { CoreSelectBaseProps, Option } from './SelectBase';
|
|
3
|
-
export interface SelectProps extends CoreSelectBaseProps {
|
|
4
|
-
/**
|
|
5
|
-
* The options of the Select. `options` may be an array of objects or an array of strings.
|
|
6
|
-
*
|
|
7
|
-
* If `options` is an array of objects, each object must adhere to the `Option` interface:
|
|
8
|
-
*
|
|
9
|
-
* * `data: object` (optional)
|
|
10
|
-
* * `disabled: boolean` (optional)
|
|
11
|
-
* * `id: string` (optional, a random `id` will be assigned to the object if one isn't provided)
|
|
12
|
-
* * `label: string` (optional, analogous to the text content of an `<option>`)
|
|
13
|
-
* * `value: string` (required, analogous to the `value` attribute of an `<option>`)
|
|
14
|
-
*
|
|
15
|
-
* If `label` is omitted, the `value` will be used to render the option.
|
|
16
|
-
*
|
|
17
|
-
* The `data` object is carried over to the `option` passed into the `renderOption` function where it may then be used to customize how each option is rendered.
|
|
18
|
-
*/
|
|
19
|
-
options: (Option | string)[];
|
|
20
|
-
}
|
|
21
|
-
export declare const Select: import("@workday/canvas-kit-react/common").ElementComponent<"button", SelectProps> & {
|
|
22
|
-
ErrorType: typeof ErrorType;
|
|
23
|
-
};
|
|
24
|
-
export default Select;
|
|
25
|
-
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GrowthBehavior, ErrorType, StyledType, Themeable } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { MenuPlacement, MenuVisibility } from './types';
|
|
4
|
-
interface OptionData {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface Option {
|
|
8
|
-
data?: OptionData;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
id?: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
value: string;
|
|
13
|
-
}
|
|
14
|
-
export interface NormalizedOption extends Option {
|
|
15
|
-
data: OptionData;
|
|
16
|
-
disabled: boolean;
|
|
17
|
-
id: string;
|
|
18
|
-
label: string;
|
|
19
|
-
}
|
|
20
|
-
export interface RenderableOption extends NormalizedOption {
|
|
21
|
-
focused: boolean;
|
|
22
|
-
selected: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface RenderOptionFunction {
|
|
25
|
-
(option: RenderableOption): React.ReactNode;
|
|
26
|
-
}
|
|
27
|
-
export interface CoreSelectBaseProps extends Themeable, GrowthBehavior, Pick<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'>, Pick<React.SelectHTMLAttributes<HTMLSelectElement>, 'required'>, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
28
|
-
/**
|
|
29
|
-
* The type of error associated with the Select (if applicable).
|
|
30
|
-
*/
|
|
31
|
-
error?: ErrorType;
|
|
32
|
-
/**
|
|
33
|
-
* The function called to render the content of each option.
|
|
34
|
-
*
|
|
35
|
-
* The `option` argument passed to the function is an object which contains the following:
|
|
36
|
-
*
|
|
37
|
-
* * `data: object` (data object carried over from the corresponding option originally passed into the component)
|
|
38
|
-
* * `disabled: boolean`
|
|
39
|
-
* * `focused: boolean` (set to `true` if the option has keyboard focus)
|
|
40
|
-
* * `id: string`
|
|
41
|
-
* * `label: string`
|
|
42
|
-
* * `selected: boolean` (set to `true` if the option is selected)
|
|
43
|
-
* * `value: string`
|
|
44
|
-
*
|
|
45
|
-
* If you omit the `renderOption` prop, each option will be rendered using a `defaultRenderOption` function provided by the component.
|
|
46
|
-
*
|
|
47
|
-
* @default defaultRenderOption
|
|
48
|
-
*/
|
|
49
|
-
renderOption?: RenderOptionFunction;
|
|
50
|
-
/**
|
|
51
|
-
* The value of the Select.
|
|
52
|
-
*/
|
|
53
|
-
value?: string;
|
|
54
|
-
}
|
|
55
|
-
export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
|
|
56
|
-
/**
|
|
57
|
-
* The ref to be forwarded to the underlying button element. Use this to imperatively manipulate the button.
|
|
58
|
-
*/
|
|
59
|
-
forwardedButtonRef?: React.Ref<HTMLButtonElement>;
|
|
60
|
-
/**
|
|
61
|
-
* The local ref to the underlying button element. Can be used in situations where RefObject is required (such as the Popper Menu).
|
|
62
|
-
*/
|
|
63
|
-
localButtonRef?: React.RefObject<HTMLButtonElement>;
|
|
64
|
-
/**
|
|
65
|
-
* The index of the focused option in the SelectBase.
|
|
66
|
-
* @default 0
|
|
67
|
-
*/
|
|
68
|
-
focusedOptionIndex?: number;
|
|
69
|
-
/**
|
|
70
|
-
* The ref to the underlying (hidden) text input element. Use this to imperatively manipulate the input.
|
|
71
|
-
*/
|
|
72
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
73
|
-
/**
|
|
74
|
-
* The placement of the SelectBase menu relative to its corresponding SelectButton.
|
|
75
|
-
* @default 'bottom'
|
|
76
|
-
*/
|
|
77
|
-
menuPlacement?: MenuPlacement;
|
|
78
|
-
/**
|
|
79
|
-
* The ref to the underlying menu element. Use this to imperatively manipulate the menu.
|
|
80
|
-
*/
|
|
81
|
-
menuRef?: React.RefObject<HTMLUListElement>;
|
|
82
|
-
/**
|
|
83
|
-
* The visibility state of the SelectBase menu.
|
|
84
|
-
* @default 'closed'
|
|
85
|
-
*/
|
|
86
|
-
menuVisibility?: MenuVisibility;
|
|
87
|
-
/**
|
|
88
|
-
* The function called when a key is pressed down while the SelectBase button or menu has focus.
|
|
89
|
-
*/
|
|
90
|
-
onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
91
|
-
/**
|
|
92
|
-
* The function called when the menu is closed.
|
|
93
|
-
*/
|
|
94
|
-
onClose?: () => void;
|
|
95
|
-
/**
|
|
96
|
-
* The function called when an option in the SelectBase is selected via a click or a keyboard shortcut. The `index` passed to the callback function represents the index of the option which was selected.
|
|
97
|
-
*/
|
|
98
|
-
onOptionSelection?: (index: number) => void;
|
|
99
|
-
/**
|
|
100
|
-
* The options of the SelectBase. `options` is an array of objects, each object adhering to the `NormalizedOption` interface:
|
|
101
|
-
*
|
|
102
|
-
* * `value: string` (required, analagous to the `value` attribute of an `<option>`)
|
|
103
|
-
* * `disabled: boolean` (required)
|
|
104
|
-
* * `id: string` (required)
|
|
105
|
-
* * `label: string` (required, analagous to the text content of an `<option>`)
|
|
106
|
-
*/
|
|
107
|
-
options: NormalizedOption[];
|
|
108
|
-
/**
|
|
109
|
-
* If true, automatically flip the SelectBase menu to keep it visible if necessary (e.g., if the the menu would otherwise display below the visible area of the viewport).
|
|
110
|
-
* @default true
|
|
111
|
-
*/
|
|
112
|
-
shouldMenuAutoFlip?: boolean;
|
|
113
|
-
/**
|
|
114
|
-
* If true, focus the SelectBase menu when it's shown. Set to false if you don't want to focus the menu automatically (for visual testing purposes, for example).
|
|
115
|
-
* @default true
|
|
116
|
-
*/
|
|
117
|
-
shouldMenuAutoFocus?: boolean;
|
|
118
|
-
}
|
|
119
|
-
export declare const buttonBorderWidth = 1;
|
|
120
|
-
export declare const buttonDefaultWidth = 280;
|
|
121
|
-
declare const SelectBase: ({ "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex, grow, inputRef, menuPlacement, menuRef, menuVisibility, onChange, onKeyDown, onClose, onOptionSelection, options, renderOption, required, shouldMenuAutoFlip, shouldMenuAutoFocus, value, ...elemProps }: SelectBaseProps) => JSX.Element;
|
|
122
|
-
export default SelectBase;
|
|
123
|
-
//# sourceMappingURL=SelectBase.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Themeable } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { SelectProps } from './Select';
|
|
4
|
-
import { MenuPlacement, MenuVisibility } from './types';
|
|
5
|
-
interface SelectMenuProps extends Themeable, React.HTMLAttributes<HTMLUListElement>, Pick<SelectProps, 'error'> {
|
|
6
|
-
/**
|
|
7
|
-
* The ref to the anchor button element. Required to anchor the menu.
|
|
8
|
-
*/
|
|
9
|
-
buttonRef?: React.RefObject<HTMLButtonElement>;
|
|
10
|
-
/**
|
|
11
|
-
* The ref to the underlying menu/listbox element. Use this to imperatively manipulate the menu.
|
|
12
|
-
*/
|
|
13
|
-
menuRef?: React.RefObject<HTMLUListElement>;
|
|
14
|
-
/**
|
|
15
|
-
* The function called when the menu is closed.
|
|
16
|
-
*/
|
|
17
|
-
onClose?: () => void;
|
|
18
|
-
/**
|
|
19
|
-
* The placement of the SelectMenu relative to its corresponding button.
|
|
20
|
-
* @default 'bottom'
|
|
21
|
-
*/
|
|
22
|
-
placement?: MenuPlacement;
|
|
23
|
-
/**
|
|
24
|
-
* If true, automatically flip the SelectMenu to keep it visible if necessary (e.g., if the the SelectMenu would otherwise display below the visible area of the viewport).
|
|
25
|
-
* @default true
|
|
26
|
-
*/
|
|
27
|
-
shouldAutoFlip?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* If true, focus the SelectMenu when it's shown. Set to false if you don't want to focus the SelectMenu automatically (for visual testing purposes, for example).
|
|
30
|
-
* @default true
|
|
31
|
-
*/
|
|
32
|
-
shouldAutoFocus?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The visibility state of the SelectMenu.
|
|
35
|
-
* @default 'closed'
|
|
36
|
-
*/
|
|
37
|
-
visibility?: MenuVisibility;
|
|
38
|
-
}
|
|
39
|
-
export declare const menuAnimationDuration = 200;
|
|
40
|
-
declare const SelectMenu: ({ buttonRef, children, error, menuRef, onClose, placement, shouldAutoFlip, shouldAutoFocus, visibility, ...elemProps }: SelectMenuProps) => JSX.Element;
|
|
41
|
-
export default SelectMenu;
|
|
42
|
-
//# sourceMappingURL=SelectMenu.d.ts.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ErrorType, Themeable } from '@workday/canvas-kit-react/common';
|
|
3
|
-
export interface SelectOptionProps extends Themeable, React.LiHTMLAttributes<HTMLLIElement> {
|
|
4
|
-
/**
|
|
5
|
-
* The type of error associated with the SelectOption (if applicable).
|
|
6
|
-
*/
|
|
7
|
-
error?: ErrorType;
|
|
8
|
-
/**
|
|
9
|
-
* If true, set the SelectOption to the focused state.
|
|
10
|
-
* @default false
|
|
11
|
-
*/
|
|
12
|
-
focused?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* The HTML `id` of the SelectOption.
|
|
15
|
-
*/
|
|
16
|
-
id?: string;
|
|
17
|
-
/**
|
|
18
|
-
* If true, set the SelectOption to the interactive state. Non-interactive SelectOptions should not give any visual cues that they are interactive (e.g., remove hover styling).
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
21
|
-
interactive?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* The ref to the list item that the styled component renders. Use this to imperatively manipulate the SelectOption (e.g., to scroll to it if it's out of view in the Select menu).
|
|
24
|
-
*/
|
|
25
|
-
optionRef?: React.Ref<HTMLLIElement>;
|
|
26
|
-
/**
|
|
27
|
-
* The value of the SelectOption.
|
|
28
|
-
*/
|
|
29
|
-
value?: string;
|
|
30
|
-
}
|
|
31
|
-
declare const SelectOption: ({ children, focused, interactive, optionRef, value, ...elemProps }: SelectOptionProps) => JSX.Element;
|
|
32
|
-
export default SelectOption;
|
|
33
|
-
//# sourceMappingURL=SelectOption.d.ts.map
|