@workday/canvas-kit-preview-react 7.0.0-alpha.0-next.7 → 7.0.0-alpha.100-next.25
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/Button.tsx +51 -22
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +1 -1
- package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +1 -0
- package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +4 -0
- package/color-picker/lib/ColorPicker.tsx +3 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +33 -5
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +2 -2
- 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/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/menu/lib/Menu.js +1 -1
- package/dist/commonjs/pill/index.d.ts +3 -0
- package/dist/commonjs/pill/index.d.ts.map +1 -0
- package/dist/commonjs/pill/index.js +14 -0
- package/dist/commonjs/pill/lib/Pill.d.ts +58 -0
- package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/Pill.js +164 -0
- package/dist/commonjs/pill/lib/PillAvatar.d.ts +11 -0
- package/dist/commonjs/pill/lib/PillAvatar.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/PillAvatar.js +29 -0
- package/dist/commonjs/pill/lib/PillCount.d.ts +5 -0
- package/dist/commonjs/pill/lib/PillCount.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/PillCount.js +45 -0
- package/dist/commonjs/pill/lib/PillIcon.d.ts +17 -0
- package/dist/commonjs/pill/lib/PillIcon.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/PillIcon.js +40 -0
- package/dist/commonjs/pill/lib/PillIconButton.d.ts +17 -0
- package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/PillIconButton.js +88 -0
- package/dist/commonjs/pill/lib/PillLabel.d.ts +13 -0
- package/dist/commonjs/pill/lib/PillLabel.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/PillLabel.js +47 -0
- package/dist/commonjs/pill/lib/usePillModel.d.ts +58 -0
- package/dist/commonjs/pill/lib/usePillModel.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/usePillModel.js +31 -0
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +4 -4
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +24 -9
- 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/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +3 -3
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +35 -7
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +3 -3
- 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/index.d.ts +1 -0
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +1 -0
- package/dist/es6/menu/lib/Menu.js +1 -1
- package/dist/es6/pill/index.d.ts +3 -0
- package/dist/es6/pill/index.d.ts.map +1 -0
- package/dist/es6/pill/index.js +2 -0
- package/dist/es6/pill/lib/Pill.d.ts +58 -0
- package/dist/es6/pill/lib/Pill.d.ts.map +1 -0
- package/dist/es6/pill/lib/Pill.js +158 -0
- package/dist/es6/pill/lib/PillAvatar.d.ts +12 -0
- package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -0
- package/dist/es6/pill/lib/PillAvatar.js +23 -0
- package/dist/es6/pill/lib/PillCount.d.ts +5 -0
- package/dist/es6/pill/lib/PillCount.d.ts.map +1 -0
- package/dist/es6/pill/lib/PillCount.js +39 -0
- package/dist/es6/pill/lib/PillIcon.d.ts +18 -0
- package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -0
- package/dist/es6/pill/lib/PillIcon.js +34 -0
- package/dist/es6/pill/lib/PillIconButton.d.ts +18 -0
- package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -0
- package/dist/es6/pill/lib/PillIconButton.js +82 -0
- package/dist/es6/pill/lib/PillLabel.d.ts +14 -0
- package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -0
- package/dist/es6/pill/lib/PillLabel.js +41 -0
- package/dist/es6/pill/lib/usePillModel.d.ts +58 -0
- package/dist/es6/pill/lib/usePillModel.d.ts.map +1 -0
- package/dist/es6/pill/lib/usePillModel.js +28 -0
- package/dist/es6/side-panel/lib/SidePanel.d.ts +4 -4
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +26 -11
- 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/index.ts +1 -0
- package/menu/lib/Menu.tsx +1 -1
- package/package.json +9 -18
- package/pill/LICENSE +52 -0
- package/pill/README.md +5 -0
- package/pill/index.ts +2 -0
- package/pill/lib/Pill.tsx +218 -0
- package/pill/lib/PillAvatar.tsx +26 -0
- package/pill/lib/PillCount.tsx +39 -0
- package/pill/lib/PillIcon.tsx +32 -0
- package/pill/lib/PillIconButton.tsx +96 -0
- package/pill/lib/PillLabel.tsx +35 -0
- package/pill/lib/usePillModel.tsx +21 -0
- package/pill/package.json +5 -0
- package/side-panel/lib/SidePanel.tsx +36 -21
- 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,14 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { Stack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
|
|
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;
|
|
4
|
+
export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>, 'spacing'> {
|
|
12
5
|
/**
|
|
13
6
|
* Children of the Text Input. Should contain a `<FormField.Input>`, a `<FormField.Label>` and an optional `<FormField.Hint>`
|
|
14
7
|
*/
|
|
@@ -23,9 +16,50 @@ export interface FormFieldProps extends FormFieldModelConfig, Omit<ExtractProps<
|
|
|
23
16
|
*/
|
|
24
17
|
spacing?: StackSpacing;
|
|
25
18
|
}
|
|
26
|
-
export declare const FormField: import("@workday/canvas-kit-react/common").
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
export declare const FormField: import("@workday/canvas-kit-react/common").ElementComponentM<"div", FormFieldProps & Partial<{
|
|
20
|
+
hasError: boolean;
|
|
21
|
+
id: string;
|
|
22
|
+
isRequired: boolean;
|
|
23
|
+
}> & {} & {}, {
|
|
24
|
+
state: {
|
|
25
|
+
id: string;
|
|
26
|
+
hasError: boolean;
|
|
27
|
+
isRequired: boolean;
|
|
28
|
+
};
|
|
29
|
+
events: {};
|
|
30
|
+
}> & {
|
|
31
|
+
Context: React.Context<{
|
|
32
|
+
state: {
|
|
33
|
+
id: string;
|
|
34
|
+
hasError: boolean;
|
|
35
|
+
isRequired: boolean;
|
|
36
|
+
};
|
|
37
|
+
events: {};
|
|
38
|
+
}>;
|
|
39
|
+
} & {
|
|
40
|
+
Input: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").BorderShorthandStyleProps & import("@workday/canvas-kit-react/layout").BorderColorStyleProps & import("@workday/canvas-kit-react/layout").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout").BorderLineStyleProps & import("@workday/canvas-kit-react/layout").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").BorderLogicalStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/other").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStandardProps & import("@workday/canvas-kit-react/layout").PositionLogicalProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceStandardProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceLogicalProps, {
|
|
41
|
+
state: {
|
|
42
|
+
id: string;
|
|
43
|
+
hasError: boolean;
|
|
44
|
+
isRequired: boolean;
|
|
45
|
+
};
|
|
46
|
+
events: {};
|
|
47
|
+
}>;
|
|
48
|
+
Label: import("@workday/canvas-kit-react/common").ElementComponentM<"label", import("./FormFieldLabel").FormFieldLabelProps, {
|
|
49
|
+
state: {
|
|
50
|
+
id: string;
|
|
51
|
+
hasError: boolean;
|
|
52
|
+
isRequired: boolean;
|
|
53
|
+
};
|
|
54
|
+
events: {};
|
|
55
|
+
}>;
|
|
56
|
+
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("@workday/canvas-kit-react/layout").BorderShorthandStyleProps & import("@workday/canvas-kit-react/layout").BorderColorStyleProps & import("@workday/canvas-kit-react/layout").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout").BorderLineStyleProps & import("@workday/canvas-kit-react/layout").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").BorderLogicalStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/other").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStandardProps & import("@workday/canvas-kit-react/layout").PositionLogicalProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceStandardProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceLogicalProps, {
|
|
57
|
+
state: {
|
|
58
|
+
id: string;
|
|
59
|
+
hasError: boolean;
|
|
60
|
+
isRequired: boolean;
|
|
61
|
+
};
|
|
62
|
+
events: {};
|
|
63
|
+
}>;
|
|
30
64
|
};
|
|
31
65
|
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAOrE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IACxF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
|
|
@@ -21,26 +21,22 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
|
-
import {
|
|
24
|
+
import { createContainer } from '@workday/canvas-kit-react/common';
|
|
25
25
|
import { Stack } from '@workday/canvas-kit-react/layout';
|
|
26
|
-
import { useFormFieldModel, useFormFieldOrientation
|
|
26
|
+
import { useFormFieldModel, useFormFieldOrientation } from './hooks';
|
|
27
27
|
import { FormFieldInput } from './FormFieldInput';
|
|
28
28
|
import { FormFieldLabel } from './FormFieldLabel';
|
|
29
29
|
import { FormFieldHint } from './FormFieldHint';
|
|
30
|
-
export var
|
|
31
|
-
export var FormField = createComponent()({
|
|
30
|
+
export var FormField = createContainer('div')({
|
|
32
31
|
displayName: 'FormField',
|
|
33
|
-
|
|
34
|
-
var children = _a.children, model = _a.model, spacing = _a.spacing, orientation = _a.orientation, props = __rest(_a, ["children", "model", "spacing", "orientation"]);
|
|
35
|
-
var hasError = props.hasError, id = props.id, isRequired = props.isRequired, elemProps = __rest(props, ["hasError", "id", "isRequired"]);
|
|
36
|
-
var value = useDefaultModel(model, { hasError: hasError, id: id, isRequired: isRequired }, useFormFieldModel);
|
|
37
|
-
var layoutProps = useFormFieldOrientation(orientation);
|
|
38
|
-
return (React.createElement(FormFieldModelContext.Provider, { value: value },
|
|
39
|
-
React.createElement(Stack, __assign({ ref: ref }, layoutProps, elemProps), children)));
|
|
40
|
-
},
|
|
32
|
+
modelHook: useFormFieldModel,
|
|
41
33
|
subComponents: {
|
|
42
34
|
Input: FormFieldInput,
|
|
43
35
|
Label: FormFieldLabel,
|
|
44
36
|
Hint: FormFieldHint,
|
|
45
37
|
},
|
|
38
|
+
})(function (_a, Element) {
|
|
39
|
+
var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
|
|
40
|
+
var layoutProps = useFormFieldOrientation(orientation);
|
|
41
|
+
return (React.createElement(Stack, __assign({ as: Element }, layoutProps, elemProps), children));
|
|
46
42
|
});
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
children?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponent<"p", FormFieldHintProps>;
|
|
1
|
+
export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("@workday/canvas-kit-react/layout").BorderShorthandStyleProps & import("@workday/canvas-kit-react/layout").BorderColorStyleProps & import("@workday/canvas-kit-react/layout").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout").BorderLineStyleProps & import("@workday/canvas-kit-react/layout").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").BorderLogicalStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/other").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStandardProps & import("@workday/canvas-kit-react/layout").PositionLogicalProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceStandardProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceLogicalProps, {
|
|
2
|
+
state: {
|
|
3
|
+
id: string;
|
|
4
|
+
hasError: boolean;
|
|
5
|
+
isRequired: boolean;
|
|
6
|
+
};
|
|
7
|
+
events: {};
|
|
8
|
+
}>;
|
|
13
9
|
//# sourceMappingURL=FormFieldHint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldHint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldHint.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormFieldHint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldHint.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa;;;;;;;EAsBxB,CAAC"}
|
|
@@ -21,23 +21,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
|
-
import {
|
|
24
|
+
import { createSubcomponent, useTheme, styled, } from '@workday/canvas-kit-react/common';
|
|
25
25
|
import { space, type } from '@workday/canvas-kit-react/tokens';
|
|
26
26
|
import { Box } from '@workday/canvas-kit-react/layout';
|
|
27
|
-
import {
|
|
28
|
-
import { useFormFieldHint } from './hooks';
|
|
27
|
+
import { useFormFieldHint, useFormFieldModel } from './hooks';
|
|
29
28
|
var StyledHint = styled(Box)(__assign({}, type.levels.subtext.medium));
|
|
30
|
-
export var FormFieldHint =
|
|
29
|
+
export var FormFieldHint = createSubcomponent('p')({
|
|
31
30
|
displayName: 'FormField.Hint',
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
31
|
+
modelHook: useFormFieldModel,
|
|
32
|
+
elemPropsHook: useFormFieldHint,
|
|
33
|
+
})(function (_a, Element, model) {
|
|
34
|
+
var children = _a.children, elemProps = __rest(_a, ["children"]);
|
|
35
|
+
var theme = useTheme();
|
|
36
|
+
if (!children) {
|
|
37
|
+
// If there is no hint text just skip rendering
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return (React.createElement(StyledHint, __assign({ as: Element, color: model.state.hasError ? theme.canvas.palette.error.main : undefined, marginY: space.xxs }, elemProps), children));
|
|
43
41
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
export declare const FormFieldInput: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").BorderShorthandStyleProps & import("@workday/canvas-kit-react/layout").BorderColorStyleProps & import("@workday/canvas-kit-react/layout").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout").BorderLineStyleProps & import("@workday/canvas-kit-react/layout").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").BorderLogicalStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/other").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStandardProps & import("@workday/canvas-kit-react/layout").PositionLogicalProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceStandardProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceLogicalProps, {
|
|
2
|
+
state: {
|
|
3
|
+
id: string;
|
|
4
|
+
hasError: boolean;
|
|
5
|
+
isRequired: boolean;
|
|
6
|
+
};
|
|
7
|
+
events: {};
|
|
8
|
+
}>;
|
|
8
9
|
//# sourceMappingURL=FormFieldInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldInput.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormFieldInput.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldInput.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc;;;;;;;EAMzB,CAAC"}
|
|
@@ -9,28 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
12
|
import React from 'react';
|
|
24
|
-
import {
|
|
13
|
+
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
25
14
|
import { Box } from '@workday/canvas-kit-react/layout';
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
export var FormFieldInput = createComponent('input')({
|
|
15
|
+
import { useFormFieldInput, useFormFieldModel } from './hooks';
|
|
16
|
+
export var FormFieldInput = createSubcomponent('input')({
|
|
29
17
|
displayName: 'FormField.Input',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return React.createElement(Box, __assign({ as: Element }, props));
|
|
35
|
-
},
|
|
18
|
+
modelHook: useFormFieldModel,
|
|
19
|
+
elemPropsHook: useFormFieldInput,
|
|
20
|
+
})(function (elemProps, Element) {
|
|
21
|
+
return React.createElement(Box, __assign({ as: Element }, elemProps));
|
|
36
22
|
});
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { HStack, StackSpacing } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
import { FormFieldModel } from './hooks';
|
|
5
4
|
export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
|
|
6
|
-
model?: FormFieldModel;
|
|
7
5
|
/**
|
|
8
6
|
* The text of the label.
|
|
9
7
|
*/
|
|
@@ -14,5 +12,12 @@ export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, ne
|
|
|
14
12
|
*/
|
|
15
13
|
spacing?: StackSpacing;
|
|
16
14
|
}
|
|
17
|
-
export declare const FormFieldLabel: import("@workday/canvas-kit-react/common").
|
|
15
|
+
export declare const FormFieldLabel: import("@workday/canvas-kit-react/common").ElementComponentM<"label", FormFieldLabelProps, {
|
|
16
|
+
state: {
|
|
17
|
+
id: string;
|
|
18
|
+
hasError: boolean;
|
|
19
|
+
isRequired: boolean;
|
|
20
|
+
};
|
|
21
|
+
events: {};
|
|
22
|
+
}>;
|
|
18
23
|
//# sourceMappingURL=FormFieldLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,YAAY,
|
|
1
|
+
{"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,YAAY,EAIb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAM,MAAM,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAK3E,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAC9F;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAaD,eAAO,MAAM,cAAc;;;;;;;EAiBzB,CAAC"}
|
|
@@ -21,26 +21,24 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
|
-
import {
|
|
24
|
+
import { createSubcomponent, useTheme, styled, } from '@workday/canvas-kit-react/common';
|
|
25
25
|
import { Box, HStack } from '@workday/canvas-kit-react/layout';
|
|
26
26
|
import { type } from '@workday/canvas-kit-react/tokens';
|
|
27
|
-
import {
|
|
28
|
-
import { useFormFieldLabel } from './hooks';
|
|
27
|
+
import { useFormFieldLabel, useFormFieldModel } from './hooks';
|
|
29
28
|
var StyledFormFieldLabel = styled('span')(__assign(__assign({}, type.levels.subtext.large), { fontWeight: type.properties.fontWeights.medium }));
|
|
30
29
|
var StyledAsterisk = styled(Box)({
|
|
31
30
|
fontSize: type.properties.fontSizes[20],
|
|
32
31
|
fontWeight: type.properties.fontWeights.regular,
|
|
33
32
|
textDecoration: 'unset',
|
|
34
33
|
});
|
|
35
|
-
export var FormFieldLabel =
|
|
34
|
+
export var FormFieldLabel = createSubcomponent('label')({
|
|
36
35
|
displayName: 'FormField.Label',
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
},
|
|
36
|
+
modelHook: useFormFieldModel,
|
|
37
|
+
elemPropsHook: useFormFieldLabel,
|
|
38
|
+
})(function (_a, Element, model) {
|
|
39
|
+
var _b = _a.spacing, spacing = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["spacing", "children"]);
|
|
40
|
+
var theme = useTheme();
|
|
41
|
+
return (React.createElement(HStack, __assign({ as: Element, spacing: spacing, minWidth: "180px" }, elemProps),
|
|
42
|
+
React.createElement(StyledFormFieldLabel, null, children),
|
|
43
|
+
model.state.isRequired && (React.createElement(StyledAsterisk, { as: "span", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
|
|
46
44
|
});
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
* Adds the necessary props to a `Hint` component.
|
|
3
3
|
* Used by the FormField.Hint subcomponent and other input type components
|
|
4
4
|
*/
|
|
5
|
-
export declare const useFormFieldHint: <P extends {}, R>(model:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export declare const useFormFieldHint: <P extends {}, R>(model: {
|
|
6
|
+
state: {
|
|
7
|
+
id: string;
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
isRequired: boolean;
|
|
10
|
+
};
|
|
11
|
+
events: {};
|
|
12
|
+
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
10
13
|
id: string;
|
|
11
14
|
} & P & (R extends HTMLOrSVGElement ? {
|
|
12
15
|
ref: import("react").Ref<R>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldHint.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldHint.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"useFormFieldHint.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldHint.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;OAI3B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useFormFieldModel } from './useFormFieldModel';
|
|
2
3
|
/**
|
|
3
4
|
* Adds the necessary props to a `Hint` component.
|
|
4
5
|
* Used by the FormField.Hint subcomponent and other input type components
|
|
5
6
|
*/
|
|
6
|
-
export var useFormFieldHint =
|
|
7
|
+
export var useFormFieldHint = createElemPropsHook(useFormFieldModel)(function (_a) {
|
|
7
8
|
var state = _a.state;
|
|
8
9
|
return {
|
|
9
10
|
id: "hint-" + state.id,
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
* Adds the necessary props to an `Input` component.
|
|
3
3
|
* Used by the FormField.Input subcomponent and other input type components
|
|
4
4
|
*/
|
|
5
|
-
export declare const useFormFieldInput: <P extends {}, R>(model:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export declare const useFormFieldInput: <P extends {}, R>(model: {
|
|
6
|
+
state: {
|
|
7
|
+
id: string;
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
isRequired: boolean;
|
|
10
|
+
};
|
|
11
|
+
events: {};
|
|
12
|
+
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
10
13
|
required: boolean | undefined;
|
|
11
14
|
'aria-invalid': boolean | undefined;
|
|
12
15
|
'aria-describedby': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;OAO5B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useFormFieldModel } from './useFormFieldModel';
|
|
2
3
|
/**
|
|
3
4
|
* Adds the necessary props to an `Input` component.
|
|
4
5
|
* Used by the FormField.Input subcomponent and other input type components
|
|
5
6
|
*/
|
|
6
|
-
export var useFormFieldInput =
|
|
7
|
+
export var useFormFieldInput = createElemPropsHook(useFormFieldModel)(function (_a) {
|
|
7
8
|
var state = _a.state;
|
|
8
9
|
return {
|
|
9
10
|
required: state.isRequired ? true : undefined,
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
* Adds the necessary props to a `Label` component.
|
|
3
3
|
* Used by the FormField.Label subcomponent and other input type components
|
|
4
4
|
*/
|
|
5
|
-
export declare const useFormFieldLabel: <P extends {}, R>(model:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export declare const useFormFieldLabel: <P extends {}, R>(model: {
|
|
6
|
+
state: {
|
|
7
|
+
id: string;
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
isRequired: boolean;
|
|
10
|
+
};
|
|
11
|
+
events: {};
|
|
12
|
+
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
10
13
|
htmlFor: string;
|
|
11
14
|
} & P & (R extends HTMLOrSVGElement ? {
|
|
12
15
|
ref: import("react").Ref<R>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB
|
|
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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useFormFieldModel } from './useFormFieldModel';
|
|
2
3
|
/**
|
|
3
4
|
* Adds the necessary props to a `Label` component.
|
|
4
5
|
* Used by the FormField.Label subcomponent and other input type components
|
|
5
6
|
*/
|
|
6
|
-
export var useFormFieldLabel =
|
|
7
|
+
export var useFormFieldLabel = createElemPropsHook(useFormFieldModel)(function (_a) {
|
|
7
8
|
var state = _a.state;
|
|
8
9
|
return {
|
|
9
10
|
htmlFor: "input-" + state.id,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
declare type FormFieldState = {
|
|
1
|
+
export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
3
2
|
/**
|
|
4
3
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
5
4
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
6
5
|
* @default false
|
|
7
6
|
*/
|
|
8
|
-
hasError
|
|
7
|
+
hasError: boolean;
|
|
9
8
|
/**
|
|
10
9
|
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
11
10
|
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
@@ -16,21 +15,84 @@ declare type FormFieldState = {
|
|
|
16
15
|
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
17
16
|
* @default `useUniqueId()`
|
|
18
17
|
*/
|
|
19
|
-
id
|
|
18
|
+
id: string;
|
|
20
19
|
/**
|
|
21
20
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
22
21
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
23
22
|
* @default false
|
|
24
23
|
*/
|
|
25
|
-
isRequired
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
isRequired: boolean;
|
|
25
|
+
}> & {} & {}) | undefined) => {
|
|
26
|
+
state: {
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
30
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
hasError: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
36
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
isRequired: boolean;
|
|
40
|
+
};
|
|
41
|
+
events: {};
|
|
42
|
+
}) & import("@workday/canvas-kit-react/common").ModelExtras<{
|
|
43
|
+
/**
|
|
44
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
45
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
hasError: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
51
|
+
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
52
|
+
* - `FormField.Input` will set `id` to `input-${id}`
|
|
53
|
+
* - `FormField.Label` will set `htmlFor` to `input-${id}`
|
|
54
|
+
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
55
|
+
*
|
|
56
|
+
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
57
|
+
* @default `useUniqueId()`
|
|
58
|
+
*/
|
|
59
|
+
id: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
62
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
isRequired: boolean;
|
|
66
|
+
}, {}, {
|
|
67
|
+
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
70
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
hasError: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
76
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
isRequired: boolean;
|
|
80
|
+
}, {}, {
|
|
81
|
+
state: {
|
|
82
|
+
id: string;
|
|
83
|
+
/**
|
|
84
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
85
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
hasError: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
91
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
isRequired: boolean;
|
|
95
|
+
};
|
|
96
|
+
events: {};
|
|
97
|
+
}>;
|
|
36
98
|
//# sourceMappingURL=useFormFieldModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;IAE1B;;;;OAIG;;IAEH;;;;;;;;;OASG;;IAEH;;;;OAIG;;;;;QArBH;;;;WAIG;;QAaH;;;;WAIG;;;;;IArBH;;;;OAIG;;IAEH;;;;;;;;;OASG;;IAEH;;;;OAIG;;;;IArBH;;;;OAIG;;IAaH;;;;OAIG;;;;;QArBH;;;;WAIG;;QAaH;;;;WAIG;;;;EAeL,CAAC"}
|
|
@@ -1,19 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var state = {
|
|
10
|
-
hasError: config.hasError,
|
|
11
|
-
isRequired: config.isRequired,
|
|
12
|
-
id: id,
|
|
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;
|
|
13
9
|
};
|
|
14
|
-
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { createModelHook, useUniqueId } from '@workday/canvas-kit-react/common';
|
|
13
|
+
export var useFormFieldModel = createModelHook({
|
|
14
|
+
defaultConfig: {
|
|
15
|
+
/**
|
|
16
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
17
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
hasError: false,
|
|
21
|
+
/**
|
|
22
|
+
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
23
|
+
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
24
|
+
* - `FormField.Input` will set `id` to `input-${id}`
|
|
25
|
+
* - `FormField.Label` will set `htmlFor` to `input-${id}`
|
|
26
|
+
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
27
|
+
*
|
|
28
|
+
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
29
|
+
* @default `useUniqueId()`
|
|
30
|
+
*/
|
|
31
|
+
id: '',
|
|
32
|
+
/**
|
|
33
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
34
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
isRequired: false,
|
|
38
|
+
},
|
|
39
|
+
})(function (config) {
|
|
40
|
+
var id = useUniqueId(config.id);
|
|
41
|
+
var state = __assign(__assign({}, config), { id: id });
|
|
15
42
|
return {
|
|
16
43
|
state: state,
|
|
17
|
-
events:
|
|
44
|
+
events: {},
|
|
18
45
|
};
|
|
19
|
-
};
|
|
46
|
+
});
|