@workday/canvas-kit-preview-react 5.3.0-next.3 → 5.3.0-next.32
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/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +0 -2
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts +0 -1
- package/breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx +0 -1
- package/breadcrumbs/lib/Breadcrumbs/List/hooks.ts +5 -5
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +4 -4
- package/dist/commonjs/form-field/index.d.ts +3 -0
- package/dist/commonjs/form-field/index.d.ts.map +1 -0
- package/dist/commonjs/form-field/index.js +7 -0
- package/dist/commonjs/form-field/lib/FormField.d.ts +31 -0
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/FormField.js +51 -0
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +13 -0
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/FormFieldHint.js +45 -0
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +8 -0
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/FormFieldInput.js +41 -0
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +18 -0
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +51 -0
- package/dist/commonjs/form-field/lib/hooks/index.d.ts +6 -0
- package/dist/commonjs/form-field/lib/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/hooks/index.js +10 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +13 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +16 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +13 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +21 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -0
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +24 -0
- package/dist/commonjs/index.d.ts +3 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +4 -0
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +1 -2
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +2 -3
- package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectMenu.js +1 -0
- package/dist/commonjs/side-panel/lib/hooks.d.ts +7 -7
- package/dist/commonjs/text-area/index.d.ts +2 -0
- package/dist/commonjs/text-area/index.d.ts.map +1 -0
- package/dist/commonjs/text-area/index.js +6 -0
- package/dist/commonjs/text-area/lib/TextArea.d.ts +22 -0
- package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -0
- package/dist/commonjs/text-area/lib/TextArea.js +52 -0
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts +8 -0
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -0
- package/dist/commonjs/text-area/lib/TextAreaField.js +65 -0
- package/dist/commonjs/text-area/lib/TextAreaHint.d.ts +5 -0
- package/dist/commonjs/text-area/lib/TextAreaHint.d.ts.map +1 -0
- package/dist/commonjs/text-area/lib/TextAreaHint.js +4 -0
- package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +5 -0
- package/dist/commonjs/text-area/lib/TextAreaLabel.d.ts.map +1 -0
- package/dist/commonjs/text-area/lib/TextAreaLabel.js +4 -0
- package/dist/commonjs/text-area/lib/hooks/index.d.ts +2 -0
- package/dist/commonjs/text-area/lib/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/text-area/lib/hooks/index.js +6 -0
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -0
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +4 -0
- package/dist/commonjs/text-input/index.d.ts +3 -0
- package/dist/commonjs/text-input/index.d.ts.map +1 -0
- package/dist/commonjs/text-input/index.js +7 -0
- package/dist/commonjs/text-input/lib/TextInput.d.ts +22 -0
- package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -0
- package/dist/commonjs/text-input/lib/TextInput.js +52 -0
- package/dist/commonjs/text-input/lib/TextInputField.d.ts +8 -0
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -0
- package/dist/commonjs/text-input/lib/TextInputField.js +67 -0
- package/dist/commonjs/text-input/lib/TextInputHint.d.ts +5 -0
- package/dist/commonjs/text-input/lib/TextInputHint.d.ts.map +1 -0
- package/dist/commonjs/text-input/lib/TextInputHint.js +4 -0
- package/dist/commonjs/text-input/lib/TextInputLabel.d.ts +5 -0
- package/dist/commonjs/text-input/lib/TextInputLabel.d.ts.map +1 -0
- package/dist/commonjs/text-input/lib/TextInputLabel.js +4 -0
- package/dist/commonjs/text-input/lib/hooks/index.d.ts +3 -0
- package/dist/commonjs/text-input/lib/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/text-input/lib/hooks/index.js +7 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +10 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +11 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +4 -0
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.js +4 -4
- package/dist/es6/form-field/index.d.ts +3 -0
- package/dist/es6/form-field/index.d.ts.map +1 -0
- package/dist/es6/form-field/index.js +2 -0
- package/dist/es6/form-field/lib/FormField.d.ts +31 -0
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -0
- package/dist/es6/form-field/lib/FormField.js +46 -0
- package/dist/es6/form-field/lib/FormFieldHint.d.ts +13 -0
- package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -0
- package/dist/es6/form-field/lib/FormFieldHint.js +43 -0
- package/dist/es6/form-field/lib/FormFieldInput.d.ts +8 -0
- package/dist/es6/form-field/lib/FormFieldInput.d.ts.map +1 -0
- package/dist/es6/form-field/lib/FormFieldInput.js +36 -0
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts +18 -0
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -0
- package/dist/es6/form-field/lib/FormFieldLabel.js +49 -0
- package/dist/es6/form-field/lib/hooks/index.d.ts +6 -0
- package/dist/es6/form-field/lib/hooks/index.d.ts.map +1 -0
- package/dist/es6/form-field/lib/hooks/index.js +5 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +11 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +14 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +11 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +19 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -0
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.js +22 -0
- package/dist/es6/index.d.ts +3 -0
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +4 -0
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +2 -3
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +3 -4
- package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectMenu.js +2 -1
- package/dist/es6/side-panel/lib/hooks.d.ts +7 -7
- package/dist/es6/text-area/index.d.ts +2 -0
- package/dist/es6/text-area/index.d.ts.map +1 -0
- package/dist/es6/text-area/index.js +1 -0
- package/dist/es6/text-area/lib/TextArea.d.ts +22 -0
- package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -0
- package/dist/es6/text-area/lib/TextArea.js +47 -0
- package/dist/es6/text-area/lib/TextAreaField.d.ts +8 -0
- package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -0
- package/dist/es6/text-area/lib/TextAreaField.js +63 -0
- package/dist/es6/text-area/lib/TextAreaHint.d.ts +5 -0
- package/dist/es6/text-area/lib/TextAreaHint.d.ts.map +1 -0
- package/dist/es6/text-area/lib/TextAreaHint.js +2 -0
- package/dist/es6/text-area/lib/TextAreaLabel.d.ts +5 -0
- package/dist/es6/text-area/lib/TextAreaLabel.d.ts.map +1 -0
- package/dist/es6/text-area/lib/TextAreaLabel.js +2 -0
- package/dist/es6/text-area/lib/hooks/index.d.ts +2 -0
- package/dist/es6/text-area/lib/hooks/index.d.ts.map +1 -0
- package/dist/es6/text-area/lib/hooks/index.js +1 -0
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +1 -0
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.js +2 -0
- package/dist/es6/text-input/index.d.ts +3 -0
- package/dist/es6/text-input/index.d.ts.map +1 -0
- package/dist/es6/text-input/index.js +2 -0
- package/dist/es6/text-input/lib/TextInput.d.ts +22 -0
- package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -0
- package/dist/es6/text-input/lib/TextInput.js +47 -0
- package/dist/es6/text-input/lib/TextInputField.d.ts +8 -0
- package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -0
- package/dist/es6/text-input/lib/TextInputField.js +65 -0
- package/dist/es6/text-input/lib/TextInputHint.d.ts +5 -0
- package/dist/es6/text-input/lib/TextInputHint.d.ts.map +1 -0
- package/dist/es6/text-input/lib/TextInputHint.js +2 -0
- package/dist/es6/text-input/lib/TextInputLabel.d.ts +5 -0
- package/dist/es6/text-input/lib/TextInputLabel.d.ts.map +1 -0
- package/dist/es6/text-input/lib/TextInputLabel.js +2 -0
- package/dist/es6/text-input/lib/hooks/index.d.ts +3 -0
- package/dist/es6/text-input/lib/hooks/index.d.ts.map +1 -0
- package/dist/es6/text-input/lib/hooks/index.js +2 -0
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +10 -0
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -0
- package/dist/es6/text-input/lib/hooks/useTextInputField.js +9 -0
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -0
- package/dist/es6/text-input/lib/hooks/useTextInputModel.js +2 -0
- package/form-field/LICENSE +52 -0
- package/form-field/README.md +8 -0
- package/form-field/index.ts +2 -0
- package/form-field/lib/FormField.tsx +56 -0
- package/form-field/lib/FormFieldHint.tsx +46 -0
- package/form-field/lib/FormFieldInput.tsx +21 -0
- package/form-field/lib/FormFieldLabel.tsx +70 -0
- package/form-field/lib/hooks/index.ts +5 -0
- package/form-field/lib/hooks/useFormFieldHint.tsx +12 -0
- package/form-field/lib/hooks/useFormFieldInput.tsx +15 -0
- package/form-field/lib/hooks/useFormFieldLabel.tsx +12 -0
- package/form-field/lib/hooks/useFormFieldModel.tsx +62 -0
- package/form-field/lib/hooks/useFormFieldOrientation.tsx +29 -0
- package/form-field/package.json +5 -0
- package/index.ts +5 -0
- package/menu/lib/Menu.tsx +3 -3
- package/package.json +9 -9
- package/select/lib/Select.tsx +9 -4
- package/select/lib/SelectMenu.tsx +2 -0
- package/side-panel/lib/hooks.ts +7 -7
- package/text-area/LICENSE +52 -0
- package/text-area/README.md +7 -0
- package/text-area/index.ts +1 -0
- package/text-area/lib/TextArea.tsx +43 -0
- package/text-area/lib/TextAreaField.tsx +81 -0
- package/text-area/lib/TextAreaHint.tsx +6 -0
- package/text-area/lib/TextAreaLabel.tsx +6 -0
- package/text-area/lib/hooks/index.ts +1 -0
- package/text-area/lib/hooks/useTextAreaModel.ts +8 -0
- package/text-area/package.json +5 -0
- package/text-input/LICENSE +52 -0
- package/text-input/README.md +7 -0
- package/text-input/index.ts +2 -0
- package/text-input/lib/TextInput.tsx +43 -0
- package/text-input/lib/TextInputField.tsx +81 -0
- package/text-input/lib/TextInputHint.tsx +6 -0
- package/text-input/lib/TextInputLabel.tsx +6 -0
- package/text-input/lib/hooks/index.ts +2 -0
- package/text-input/lib/hooks/useTextInputField.tsx +10 -0
- package/text-input/lib/hooks/useTextInputModel.ts +8 -0
- package/text-input/package.json +5 -0
- package/ts3.5/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
- package/ts3.5/dist/commonjs/form-field/index.d.ts +3 -0
- package/ts3.5/dist/commonjs/form-field/lib/FormField.d.ts +31 -0
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldHint.d.ts +13 -0
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldInput.d.ts +8 -0
- package/ts3.5/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +18 -0
- package/ts3.5/dist/commonjs/form-field/lib/hooks/index.d.ts +6 -0
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
- package/ts3.5/dist/commonjs/index.d.ts +3 -0
- package/ts3.5/dist/commonjs/side-panel/lib/hooks.d.ts +7 -7
- package/ts3.5/dist/commonjs/text-area/index.d.ts +2 -0
- package/ts3.5/dist/commonjs/text-area/lib/TextArea.d.ts +22 -0
- package/ts3.5/dist/commonjs/text-area/lib/TextAreaField.d.ts +8 -0
- package/ts3.5/dist/commonjs/text-area/lib/TextAreaHint.d.ts +5 -0
- package/ts3.5/dist/commonjs/text-area/lib/TextAreaLabel.d.ts +5 -0
- package/ts3.5/dist/commonjs/text-area/lib/hooks/index.d.ts +2 -0
- package/ts3.5/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
- package/ts3.5/dist/commonjs/text-input/index.d.ts +3 -0
- package/ts3.5/dist/commonjs/text-input/lib/TextInput.d.ts +22 -0
- package/ts3.5/dist/commonjs/text-input/lib/TextInputField.d.ts +8 -0
- package/ts3.5/dist/commonjs/text-input/lib/TextInputHint.d.ts +5 -0
- package/ts3.5/dist/commonjs/text-input/lib/TextInputLabel.d.ts +5 -0
- package/ts3.5/dist/commonjs/text-input/lib/hooks/index.d.ts +3 -0
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +10 -0
- package/ts3.5/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
- package/ts3.5/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
- package/ts3.5/dist/es6/form-field/index.d.ts +3 -0
- package/ts3.5/dist/es6/form-field/lib/FormField.d.ts +31 -0
- package/ts3.5/dist/es6/form-field/lib/FormFieldHint.d.ts +13 -0
- package/ts3.5/dist/es6/form-field/lib/FormFieldInput.d.ts +8 -0
- package/ts3.5/dist/es6/form-field/lib/FormFieldLabel.d.ts +18 -0
- package/ts3.5/dist/es6/form-field/lib/hooks/index.d.ts +6 -0
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +15 -0
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +18 -0
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +15 -0
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +36 -0
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +9 -0
- package/ts3.5/dist/es6/index.d.ts +3 -0
- package/ts3.5/dist/es6/side-panel/lib/hooks.d.ts +7 -7
- package/ts3.5/dist/es6/text-area/index.d.ts +2 -0
- package/ts3.5/dist/es6/text-area/lib/TextArea.d.ts +22 -0
- package/ts3.5/dist/es6/text-area/lib/TextAreaField.d.ts +8 -0
- package/ts3.5/dist/es6/text-area/lib/TextAreaHint.d.ts +5 -0
- package/ts3.5/dist/es6/text-area/lib/TextAreaLabel.d.ts +5 -0
- package/ts3.5/dist/es6/text-area/lib/hooks/index.d.ts +2 -0
- package/ts3.5/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +8 -0
- package/ts3.5/dist/es6/text-input/index.d.ts +3 -0
- package/ts3.5/dist/es6/text-input/lib/TextInput.d.ts +22 -0
- package/ts3.5/dist/es6/text-input/lib/TextInputField.d.ts +8 -0
- package/ts3.5/dist/es6/text-input/lib/TextInputHint.d.ts +5 -0
- package/ts3.5/dist/es6/text-input/lib/TextInputLabel.d.ts +5 -0
- package/ts3.5/dist/es6/text-input/lib/hooks/index.d.ts +3 -0
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +10 -0
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +8 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
/**
|
|
3
|
+
* Adds the necessary props to an `Input` component.
|
|
4
|
+
* Used by the FormField.Input subcomponent and other input type components
|
|
5
|
+
*/
|
|
6
|
+
export var useFormFieldInput = createHook(function (_a) {
|
|
7
|
+
var state = _a.state;
|
|
8
|
+
return {
|
|
9
|
+
required: state.isRequired ? true : undefined,
|
|
10
|
+
'aria-invalid': state.hasError ? true : undefined,
|
|
11
|
+
'aria-describedby': "hint-" + state.id,
|
|
12
|
+
id: "input-" + state.id,
|
|
13
|
+
};
|
|
14
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="@emotion/core" />
|
|
2
|
+
/**
|
|
3
|
+
* Adds the necessary props to a `Label` component.
|
|
4
|
+
* Used by the FormField.Label subcomponent and other input type components
|
|
5
|
+
*/
|
|
6
|
+
export declare const useFormFieldLabel: <P extends {}, R>(model: import("@workday/canvas-kit-react/common").Model<{
|
|
7
|
+
hasError?: boolean | undefined;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
isRequired?: boolean | undefined;
|
|
10
|
+
}, {}>, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
11
|
+
htmlFor: string;
|
|
12
|
+
} & P & (R extends HTMLOrSVGElement ? {
|
|
13
|
+
ref: import("react").Ref<R>;
|
|
14
|
+
} : {});
|
|
15
|
+
//# sourceMappingURL=useFormFieldLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":";AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;OAI5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
/**
|
|
3
|
+
* Adds the necessary props to a `Label` component.
|
|
4
|
+
* Used by the FormField.Label subcomponent and other input type components
|
|
5
|
+
*/
|
|
6
|
+
export var useFormFieldLabel = createHook(function (_a) {
|
|
7
|
+
var state = _a.state;
|
|
8
|
+
return {
|
|
9
|
+
htmlFor: "input-" + state.id,
|
|
10
|
+
};
|
|
11
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
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) => Model<FormFieldState, FormFieldEvents>;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=useFormFieldModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,aAAa,EAGd,MAAM,kCAAkC,CAAC;AAE1C,aAAK,cAAc,GAAG;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,aAAK,eAAe,GAAG,EAAE,CAAC;AAE1B,oBAAY,cAAc,GAAG,KAAK,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;AAEpE,QAAA,MAAM,iBAAiB;;;CAGrB,CAAC;AAEH,oBAAY,oBAAoB,GAAG,cAAc,GAC/C,OAAO,CAAC,aAAa,CAAC,cAAc,EAAE,eAAe,EAAE,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEpF,eAAO,MAAM,iBAAiB,2EAe7B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createEventMap, useEventMap, useUniqueId, } from '@workday/canvas-kit-react/common';
|
|
2
|
+
var formFieldEventMap = createEventMap()({
|
|
3
|
+
guards: {},
|
|
4
|
+
callbacks: {},
|
|
5
|
+
});
|
|
6
|
+
export var useFormFieldModel = function (config) {
|
|
7
|
+
if (config === void 0) { config = {}; }
|
|
8
|
+
var id = useUniqueId(config.id);
|
|
9
|
+
var state = {
|
|
10
|
+
hasError: config.hasError,
|
|
11
|
+
isRequired: config.isRequired,
|
|
12
|
+
id: id,
|
|
13
|
+
};
|
|
14
|
+
var events = useEventMap(formFieldEventMap, state, config, {});
|
|
15
|
+
return {
|
|
16
|
+
state: state,
|
|
17
|
+
events: events,
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds the necessary layout props to a `FormField` component.
|
|
3
|
+
*/
|
|
4
|
+
export declare const useFormFieldOrientation: (orientation: "horizontal" | "vertical") => {
|
|
5
|
+
flexDirection: "column" | "column-reverse" | "row" | "row-reverse" | undefined;
|
|
6
|
+
alignItems: (string & {}) | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | undefined;
|
|
7
|
+
spacing: number | (string & {}) | "s" | "zero" | "m" | "l" | "xl" | "xxxs" | "xxs" | "xs" | "xxl" | "xxxl";
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useFormFieldOrientation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;CAsBnC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { space } from '@workday/canvas-kit-react/tokens';
|
|
2
|
+
/**
|
|
3
|
+
* Adds the necessary layout props to a `FormField` component.
|
|
4
|
+
*/
|
|
5
|
+
export var useFormFieldOrientation = function (orientation) {
|
|
6
|
+
var layoutProps;
|
|
7
|
+
if (orientation === 'horizontal') {
|
|
8
|
+
layoutProps = {
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
spacing: space.l,
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
layoutProps = {
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
spacing: space.xxxs,
|
|
18
|
+
alignItems: 'flex-start',
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return layoutProps;
|
|
22
|
+
};
|
package/dist/es6/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './breadcrumbs';
|
|
2
2
|
export * from './color-picker';
|
|
3
|
+
export * from './form-field';
|
|
3
4
|
export * from './menu';
|
|
4
5
|
export * from './select';
|
|
5
6
|
export * from './side-panel';
|
|
7
|
+
export * from './text-area';
|
|
8
|
+
export * from './text-input';
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/es6/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
package/dist/es6/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export * from './breadcrumbs';
|
|
2
2
|
export * from './color-picker';
|
|
3
|
+
export * from './form-field';
|
|
3
4
|
export * from './menu';
|
|
4
5
|
export * from './select';
|
|
5
6
|
export * from './side-panel';
|
|
7
|
+
export * from './text-area';
|
|
8
|
+
export * from './text-input';
|
|
9
|
+
/// <reference types="@types/node" />
|
|
@@ -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,aAAa,EAAC,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAiB,cAAc,
|
|
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,aAAa,EAAC,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG,MAAM,WAAW,SAAU,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACvF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACnF;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IACrE,OAAO,CAAC,EAAE,CAAsB;IAChC,OAAO,CAAC,SAAS,CAAU;IAE3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,eAAe,CAAY;gBAEvB,KAAK,EAAE,SAAS;IAe5B,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAevC,iBAAiB;IAKjB,oBAAoB;IAIb,MAAM;IAmDN,sBAAsB,wCAQ3B;IAEK,sBAAsB,sCAE3B;IAEF,OAAO,CAAC,uBAAuB,CA4E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CA+BxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
|
|
@@ -35,10 +35,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
35
35
|
};
|
|
36
36
|
import * as React from 'react';
|
|
37
37
|
import styled from '@emotion/styled';
|
|
38
|
-
import uuid from 'uuid/v4';
|
|
39
38
|
import { Card } from '@workday/canvas-kit-react/card';
|
|
40
39
|
import { commonColors, space, borderRadius } from '@workday/canvas-kit-react/tokens';
|
|
41
|
-
import { hideMouseFocus } from '@workday/canvas-kit-react/common';
|
|
40
|
+
import { hideMouseFocus, generateUniqueId } from '@workday/canvas-kit-react/common';
|
|
42
41
|
var List = styled('ul')(__assign({ background: commonColors.background, borderRadius: borderRadius.m, padding: 0, margin: space.xxs + " 0", '&:focus': {
|
|
43
42
|
outline: 'none',
|
|
44
43
|
} }, hideMouseFocus));
|
|
@@ -46,7 +45,7 @@ var Menu = /** @class */ (function (_super) {
|
|
|
46
45
|
__extends(Menu, _super);
|
|
47
46
|
function Menu(props) {
|
|
48
47
|
var _this = _super.call(this, props) || this;
|
|
49
|
-
_this.id =
|
|
48
|
+
_this.id = generateUniqueId();
|
|
50
49
|
_this.getNormalizedItemIndex = function (index) {
|
|
51
50
|
var itemCount = React.Children.count(_this.props.children);
|
|
52
51
|
var firstItem = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAmB,EAAC,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAIvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;OAcG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAmiBD,eAAO,MAAM,MAAM;;CAUjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -34,11 +34,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
34
34
|
return t;
|
|
35
35
|
};
|
|
36
36
|
import * as React from 'react';
|
|
37
|
-
import { ErrorType, createComponent, useForkRef } from '@workday/canvas-kit-react/common';
|
|
37
|
+
import { ErrorType, createComponent, useForkRef, generateUniqueId, } from '@workday/canvas-kit-react/common';
|
|
38
38
|
import { menuAnimationDuration } from './SelectMenu';
|
|
39
39
|
import SelectBase from './SelectBase';
|
|
40
40
|
import { getCorrectedIndexByValue } from './utils';
|
|
41
|
-
import uuid from 'uuid/v4';
|
|
42
41
|
var SelectContainer = /** @class */ (function (_super) {
|
|
43
42
|
__extends(SelectContainer, _super);
|
|
44
43
|
function SelectContainer(props) {
|
|
@@ -76,14 +75,14 @@ var SelectContainer = /** @class */ (function (_super) {
|
|
|
76
75
|
var disabled, id, label, value;
|
|
77
76
|
if (typeof option === 'string') {
|
|
78
77
|
disabled = false;
|
|
79
|
-
id =
|
|
78
|
+
id = generateUniqueId();
|
|
80
79
|
value = option;
|
|
81
80
|
label = option;
|
|
82
81
|
}
|
|
83
82
|
else {
|
|
84
83
|
data = option.data || data;
|
|
85
84
|
disabled = !!option.disabled;
|
|
86
|
-
id = option.id ||
|
|
85
|
+
id = option.id || generateUniqueId();
|
|
87
86
|
value = option.value;
|
|
88
87
|
label = option.label || option.value;
|
|
89
88
|
}
|
|
@@ -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;
|
|
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;AAErC,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAEtD,UAAU,eACR,SAAQ,SAAS,EACf,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EACtC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;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;AAwKzC,QAAA,MAAM,UAAU,0JAsEf,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React, { useState, useEffect, useLayoutEffect, useCallback } from 'react';
|
|
24
24
|
import { ErrorType, styled } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import { Popper, useCloseOnEscape, useCloseOnOutsideClick, usePopupModel, useReturnFocus, } from '@workday/canvas-kit-react/popup';
|
|
25
|
+
import { Popper, useCloseOnEscape, useCloseOnOutsideClick, usePopupModel, useReturnFocus, useTransferOnFullscreenExit, } from '@workday/canvas-kit-react/popup';
|
|
26
26
|
import { colors, borderRadius, inputColors } from '@workday/canvas-kit-react/tokens';
|
|
27
27
|
import { buttonBorderWidth } from './SelectBase';
|
|
28
28
|
export var menuAnimationDuration = 200;
|
|
@@ -203,6 +203,7 @@ var SelectMenu = function (_a) {
|
|
|
203
203
|
useCloseOnEscape(model);
|
|
204
204
|
useCloseOnOutsideClick(model);
|
|
205
205
|
useReturnFocus(model);
|
|
206
|
+
useTransferOnFullscreenExit(model);
|
|
206
207
|
return (React.createElement(Popper, { placement: placement, anchorElement: buttonRef, popperOptions: generatePopperOptions({
|
|
207
208
|
menuRef: menuRef,
|
|
208
209
|
placement: placement,
|
|
@@ -9,12 +9,12 @@ export interface UseSidePanelProps {
|
|
|
9
9
|
initialExpanded?: boolean;
|
|
10
10
|
/**
|
|
11
11
|
* sets the `id` for the panel
|
|
12
|
-
* @default
|
|
12
|
+
* @default unique identifier
|
|
13
13
|
*/
|
|
14
14
|
panelId?: string;
|
|
15
15
|
/**
|
|
16
16
|
* sets the `id` for the label
|
|
17
|
-
* @default
|
|
17
|
+
* @default unique identifier
|
|
18
18
|
*/
|
|
19
19
|
labelId?: string;
|
|
20
20
|
}
|
|
@@ -28,12 +28,12 @@ export interface PanelProps {
|
|
|
28
28
|
expanded: boolean;
|
|
29
29
|
/**
|
|
30
30
|
* the accessible `id`
|
|
31
|
-
* - this will either be a
|
|
31
|
+
* - this will either be a unique identifier value or the `panelId` provided in the config
|
|
32
32
|
*/
|
|
33
33
|
id: string;
|
|
34
34
|
/**
|
|
35
35
|
* the accessible label `id`
|
|
36
|
-
* - this will either be a
|
|
36
|
+
* - this will either be a unique identifier value or the `labelId` provided in the config
|
|
37
37
|
*/
|
|
38
38
|
'aria-labelledby': string;
|
|
39
39
|
/**
|
|
@@ -45,14 +45,14 @@ export interface PanelProps {
|
|
|
45
45
|
export interface LabelProps {
|
|
46
46
|
/**
|
|
47
47
|
* the accessible `id`
|
|
48
|
-
* - this will either be a
|
|
48
|
+
* - this will either be a unique identifier value or the `labelId` provided in the config
|
|
49
49
|
*/
|
|
50
50
|
id: string;
|
|
51
51
|
}
|
|
52
52
|
export interface ControlProps {
|
|
53
53
|
/**
|
|
54
54
|
* the accessible `id` that connects the panel to this control
|
|
55
|
-
* - this will either be a
|
|
55
|
+
* - this will either be a unique identifier value or the `panelId` provided in the config
|
|
56
56
|
*/
|
|
57
57
|
'aria-controls': string;
|
|
58
58
|
/**
|
|
@@ -62,7 +62,7 @@ export interface ControlProps {
|
|
|
62
62
|
'aria-expanded': boolean;
|
|
63
63
|
/**
|
|
64
64
|
* the accessible label `id`
|
|
65
|
-
* - this will either be a
|
|
65
|
+
* - this will either be a unique identifier value or the `labelId` provided in the config
|
|
66
66
|
*/
|
|
67
67
|
'aria-labelledby': string;
|
|
68
68
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text-area/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/TextArea';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
4
|
+
import { TextAreaModel } from './hooks';
|
|
5
|
+
export declare const TextAreaModelContext: 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 TextAreaProps extends ExtractProps<typeof FormField, never> {
|
|
11
|
+
model?: TextAreaModel;
|
|
12
|
+
/**
|
|
13
|
+
* Children of the Text Input. Should contain a `<TextArea.Field>`, a `<TextArea.Label>` and an optional `<TextArea.Hint>`
|
|
14
|
+
*/
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const TextArea: import("@workday/canvas-kit-react/common").Component<TextAreaProps> & {
|
|
18
|
+
Field: import("@workday/canvas-kit-react/common").ElementComponent<"textarea", import("./TextAreaField").TextAreaFieldProps>;
|
|
19
|
+
Label: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("../../form-field/lib/FormFieldLabel").FormFieldLabelProps>;
|
|
20
|
+
Hint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("../../form-field/lib/FormFieldHint").FormFieldHintProps>;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAC,SAAS,EAAiD,MAAM,8CAA8C,CAAC;AAGvH,OAAO,EAAE,aAAa,EAAoB,MAAM,SAAS,CAAC;AAK1D,eAAO,MAAM,oBAAoB;;;;OAAwB,CAAC;AAE1D,MAAM,WAAW,aAAc,SAAQ,YAAY,CAAC,OAAO,SAAS,EAAE,KAAK,CAAC;IAC1E,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ;;;;CAqBnB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { createComponent, useDefaultModel } from '@workday/canvas-kit-react/common';
|
|
25
|
+
import { FormFieldModelContext, useFormFieldOrientation } from '@workday/canvas-kit-preview-react/form-field';
|
|
26
|
+
import { Stack } from '@workday/canvas-kit-labs-react/layout';
|
|
27
|
+
import { useTextAreaModel } from './hooks';
|
|
28
|
+
import { TextAreaField } from './TextAreaField';
|
|
29
|
+
import { TextAreaLabel } from './TextAreaLabel';
|
|
30
|
+
import { TextAreaHint } from './TextAreaHint';
|
|
31
|
+
export var TextAreaModelContext = FormFieldModelContext;
|
|
32
|
+
export var TextArea = createComponent()({
|
|
33
|
+
displayName: 'TextArea',
|
|
34
|
+
Component: function (_a, ref) {
|
|
35
|
+
var children = _a.children, model = _a.model, orientation = _a.orientation, props = __rest(_a, ["children", "model", "orientation"]);
|
|
36
|
+
var hasError = props.hasError, id = props.id, isRequired = props.isRequired, elemProps = __rest(props, ["hasError", "id", "isRequired"]);
|
|
37
|
+
var value = useDefaultModel(model, { hasError: hasError, id: id, isRequired: isRequired }, useTextAreaModel);
|
|
38
|
+
var layoutProps = useFormFieldOrientation(orientation);
|
|
39
|
+
return (React.createElement(TextAreaModelContext.Provider, { value: value },
|
|
40
|
+
React.createElement(Stack, __assign({ ref: ref }, layoutProps, elemProps), children)));
|
|
41
|
+
},
|
|
42
|
+
subComponents: {
|
|
43
|
+
Field: TextAreaField,
|
|
44
|
+
Label: TextAreaLabel,
|
|
45
|
+
Hint: TextAreaHint,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
3
|
+
import { TextAreaModel } from './hooks';
|
|
4
|
+
export interface TextAreaFieldProps extends ExtractProps<typeof FormField.Input, never> {
|
|
5
|
+
model?: TextAreaModel;
|
|
6
|
+
}
|
|
7
|
+
export declare const TextAreaField: import("@workday/canvas-kit-react/common").ElementComponent<"textarea", TextAreaFieldProps>;
|
|
8
|
+
//# sourceMappingURL=TextAreaField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAkB,YAAY,EAA4B,MAAM,kCAAkC,CAAC;AAE1G,OAAO,EAAC,SAAS,EAAC,MAAM,8CAA8C,CAAC;AAGvE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,kBAAmB,SAAQ,YAAY,CAAC,OAAO,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IACrF,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AA4BD,eAAO,MAAM,aAAa,6FAiCxB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
/** @jsx jsx */
|
|
24
|
+
import { jsx } from '@emotion/core';
|
|
25
|
+
import { borderRadius, inputColors, spaceNumbers, type, } from '@workday/canvas-kit-react/tokens';
|
|
26
|
+
import { createComponent, useModelContext, useTheme } from '@workday/canvas-kit-react/common';
|
|
27
|
+
import { useThemedRing } from '@workday/canvas-kit-labs-react/common';
|
|
28
|
+
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
29
|
+
import { TextAreaModelContext } from './TextArea';
|
|
30
|
+
var baseStyles = __assign(__assign({}, type.levels.subtext.large), { transition: '0.2s box-shadow, 0.2s border-color', resize: 'both', '&::webkit-resizer': {
|
|
31
|
+
display: 'none',
|
|
32
|
+
}, '&::placeholder': {
|
|
33
|
+
color: inputColors.placeholder,
|
|
34
|
+
}, '&:hover': {
|
|
35
|
+
borderColor: inputColors.hoverBorder,
|
|
36
|
+
}, '&:focus:not([disabled])': {
|
|
37
|
+
outline: 'none',
|
|
38
|
+
}, '&:disabled': {
|
|
39
|
+
backgroundColor: inputColors.disabled.background,
|
|
40
|
+
borderColor: inputColors.disabled.border,
|
|
41
|
+
color: inputColors.disabled.text,
|
|
42
|
+
'&::placeholder': {
|
|
43
|
+
color: inputColors.disabled.text,
|
|
44
|
+
},
|
|
45
|
+
} });
|
|
46
|
+
export var TextAreaField = createComponent('textarea')({
|
|
47
|
+
displayName: 'TextArea.Field',
|
|
48
|
+
Component: function (_a, ref) {
|
|
49
|
+
var model = _a.model, elemProps = __rest(_a, ["model"]);
|
|
50
|
+
var localModel = useModelContext(TextAreaModelContext, model);
|
|
51
|
+
var theme = useTheme();
|
|
52
|
+
var errorRing = useThemedRing('error');
|
|
53
|
+
var focusStyles = localModel.state.hasError
|
|
54
|
+
? errorRing
|
|
55
|
+
: {
|
|
56
|
+
'&:focus:not([disabled])': {
|
|
57
|
+
borderColor: theme.canvas.palette.common.focusOutline,
|
|
58
|
+
boxShadow: "inset 0 0 0 1px " + theme.canvas.palette.common.focusOutline,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
return (jsx(FormField.Input, __assign({ as: "textarea", ref: ref, css: [baseStyles, focusStyles] }, elemProps, { border: "1px solid " + inputColors.border, display: 'block', backgroundColor: inputColors.background, borderRadius: borderRadius.m, minHeight: 64, minWidth: 280, padding: spaceNumbers.xxs, margin: 0 })));
|
|
62
|
+
},
|
|
63
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
3
|
+
export declare type TextAreaHintProps = ExtractProps<typeof FormField.Hint, never>;
|
|
4
|
+
export declare const TextAreaHint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("../../form-field/lib/FormFieldHint").FormFieldHintProps>;
|
|
5
|
+
//# sourceMappingURL=TextAreaHint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAreaHint.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaHint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,8CAA8C,CAAC;AAEvE,oBAAY,iBAAiB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAE3E,eAAO,MAAM,YAAY,mIAAiB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
3
|
+
export declare type TextAreaLabelProps = ExtractProps<typeof FormField.Label, never>;
|
|
4
|
+
export declare const TextAreaLabel: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("../../form-field/lib/FormFieldLabel").FormFieldLabelProps>;
|
|
5
|
+
//# sourceMappingURL=TextAreaLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAreaLabel.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,8CAA8C,CAAC;AAEvE,oBAAY,kBAAkB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAE7E,eAAO,MAAM,aAAa,yIAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../text-area/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useTextAreaModel';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormFieldModel } from '@workday/canvas-kit-preview-react/form-field';
|
|
2
|
+
export declare const useTextAreaModel: (config?: import("../../../form-field").FormFieldModelConfig) => import("@workday/canvas-kit-react/common").Model<{
|
|
3
|
+
hasError?: boolean | undefined;
|
|
4
|
+
id?: string | undefined;
|
|
5
|
+
isRequired?: boolean | undefined;
|
|
6
|
+
}, {}>;
|
|
7
|
+
export declare type TextAreaModel = FormFieldModel;
|
|
8
|
+
//# sourceMappingURL=useTextAreaModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTextAreaModel.d.ts","sourceRoot":"","sources":["../../../../../text-area/lib/hooks/useTextAreaModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACf,MAAM,8CAA8C,CAAC;AAEtD,eAAO,MAAM,gBAAgB;;;;MAAoB,CAAC;AAElD,oBAAY,aAAa,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../text-input/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
4
|
+
import { TextInputModel } from './hooks';
|
|
5
|
+
export declare const TextInputModelContext: 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 TextInputProps extends ExtractProps<typeof FormField, never> {
|
|
11
|
+
model?: TextInputModel;
|
|
12
|
+
/**
|
|
13
|
+
* Children of the Text Input. Should contain a `<TextInput.Field>`, a `<TextInput.Label>` and an optional `<TextInput.Hint>`
|
|
14
|
+
*/
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const TextInput: import("@workday/canvas-kit-react/common").Component<TextInputProps> & {
|
|
18
|
+
Field: import("@workday/canvas-kit-react/common").ElementComponent<"input", import("./TextInputField").TextInputFieldProps>;
|
|
19
|
+
Label: import("@workday/canvas-kit-react/common").ElementComponent<"label", import("../../form-field/lib/FormFieldLabel").FormFieldLabelProps>;
|
|
20
|
+
Hint: import("@workday/canvas-kit-react/common").ElementComponent<"p", import("../../form-field/lib/FormFieldHint").FormFieldHintProps>;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAC,SAAS,EAAiD,MAAM,8CAA8C,CAAC;AAGvH,OAAO,EAAoB,cAAc,EAAC,MAAM,SAAS,CAAC;AAK1D,eAAO,MAAM,qBAAqB;;;;OAAwB,CAAC;AAE3D,MAAM,WAAW,cAAgB,SAAQ,YAAY,CAAC,OAAO,SAAS,EAAE,KAAK,CAAC;IAC5E,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,SAAS;;;;CAqBpB,CAAC"}
|