@workday/canvas-kit-preview-react 7.0.0-alpha.0-next.5 → 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 +2 -2
- package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +1 -0
- package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +5 -1
- package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +2 -2
- package/dist/commonjs/form-field/lib/FormField.d.ts +47 -13
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormField.js +8 -12
- 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 +13 -15
- 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 +6 -20
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +9 -4
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +11 -14
- 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/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
- 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 +10 -16
- 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 +10 -16
- 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 +2 -2
- 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 +2 -2
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +3 -3
- package/dist/es6/form-field/lib/FormField.d.ts +47 -13
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormField.js +9 -13
- 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 +14 -16
- 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 +8 -22
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts +9 -4
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.js +12 -15
- 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/form-field/lib/hooks/useFormFieldOrientation.d.ts +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
- 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 +11 -17
- 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 +11 -17
- 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 +14 -29
- package/form-field/lib/FormFieldHint.tsx +22 -33
- package/form-field/lib/FormFieldInput.tsx +8 -15
- package/form-field/lib/FormFieldLabel.tsx +18 -23
- 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/form-field/lib/hooks/useFormFieldOrientation.tsx +1 -1
- 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 +16 -30
- package/text-area/lib/TextAreaField.tsx +30 -44
- package/text-area/lib/hooks/useTextAreaModel.ts +1 -3
- package/text-input/lib/TextInput.tsx +16 -30
- 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,8 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export declare const useTextAreaModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
2
|
+
hasError: boolean;
|
|
3
|
+
id: string;
|
|
4
|
+
isRequired: boolean;
|
|
5
|
+
}> & {} & {}) | undefined) => {
|
|
6
|
+
state: {
|
|
7
|
+
id: string;
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
isRequired: boolean;
|
|
10
|
+
};
|
|
11
|
+
events: {};
|
|
12
|
+
}) & import("@workday/canvas-kit-react/common").ModelExtras<{
|
|
13
|
+
hasError: boolean;
|
|
14
|
+
id: string;
|
|
15
|
+
isRequired: boolean;
|
|
16
|
+
}, {}, {
|
|
17
|
+
id: string;
|
|
18
|
+
hasError: boolean;
|
|
19
|
+
isRequired: boolean;
|
|
20
|
+
}, {}, {
|
|
21
|
+
state: {
|
|
22
|
+
id: string;
|
|
23
|
+
hasError: boolean;
|
|
24
|
+
isRequired: boolean;
|
|
25
|
+
};
|
|
26
|
+
events: {};
|
|
27
|
+
}>;
|
|
8
28
|
//# sourceMappingURL=useTextAreaModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextAreaModel.d.ts","sourceRoot":"","sources":["../../../../../text-area/lib/hooks/useTextAreaModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTextAreaModel.d.ts","sourceRoot":"","sources":["../../../../../text-area/lib/hooks/useTextAreaModel.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAC"}
|
|
@@ -1,22 +1,70 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
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
4
|
export interface TextInputProps extends ExtractProps<typeof FormField, never> {
|
|
11
|
-
model?: TextInputModel;
|
|
12
5
|
/**
|
|
13
6
|
* Children of the Text Input. Should contain a `<TextInput.Field>`, a `<TextInput.Label>` and an optional `<TextInput.Hint>`
|
|
14
7
|
*/
|
|
15
8
|
children: React.ReactNode;
|
|
16
9
|
}
|
|
17
|
-
export declare const TextInput: import("@workday/canvas-kit-react/common").
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
export declare const TextInput: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../../form-field").FormFieldProps & Partial<{
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
id: string;
|
|
13
|
+
isRequired: boolean;
|
|
14
|
+
}> & {} & {} & import("@workday/canvas-kit-react/common").PropsWithModel<{
|
|
15
|
+
state: {
|
|
16
|
+
id: string;
|
|
17
|
+
hasError: boolean;
|
|
18
|
+
isRequired: boolean;
|
|
19
|
+
};
|
|
20
|
+
events: {};
|
|
21
|
+
}>, {
|
|
22
|
+
state: {
|
|
23
|
+
id: string;
|
|
24
|
+
hasError: boolean;
|
|
25
|
+
isRequired: boolean;
|
|
26
|
+
};
|
|
27
|
+
events: {};
|
|
28
|
+
}> & {
|
|
29
|
+
Context: React.Context<{
|
|
30
|
+
state: {
|
|
31
|
+
id: string;
|
|
32
|
+
hasError: boolean;
|
|
33
|
+
isRequired: boolean;
|
|
34
|
+
};
|
|
35
|
+
events: {};
|
|
36
|
+
}>;
|
|
37
|
+
} & {
|
|
38
|
+
Field: 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 & import("@workday/canvas-kit-react/common").PropsWithModel<{
|
|
39
|
+
state: {
|
|
40
|
+
id: string;
|
|
41
|
+
hasError: boolean;
|
|
42
|
+
isRequired: boolean;
|
|
43
|
+
};
|
|
44
|
+
events: {};
|
|
45
|
+
}>, {
|
|
46
|
+
state: {
|
|
47
|
+
id: string;
|
|
48
|
+
hasError: boolean;
|
|
49
|
+
isRequired: boolean;
|
|
50
|
+
};
|
|
51
|
+
events: {};
|
|
52
|
+
}>;
|
|
53
|
+
Label: import("@workday/canvas-kit-react/common").ElementComponentM<"label", import("../../form-field/lib/FormFieldLabel").FormFieldLabelProps, {
|
|
54
|
+
state: {
|
|
55
|
+
id: string;
|
|
56
|
+
hasError: boolean;
|
|
57
|
+
isRequired: boolean;
|
|
58
|
+
};
|
|
59
|
+
events: {};
|
|
60
|
+
}>;
|
|
61
|
+
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, {
|
|
62
|
+
state: {
|
|
63
|
+
id: string;
|
|
64
|
+
hasError: boolean;
|
|
65
|
+
isRequired: boolean;
|
|
66
|
+
};
|
|
67
|
+
events: {};
|
|
68
|
+
}>;
|
|
21
69
|
};
|
|
22
70
|
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1 +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,
|
|
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,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,SAAS,EAA0B,MAAM,8CAA8C,CAAC;AAMhG,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,SAAS,EAAE,KAAK,CAAC;IAC3E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
|
|
@@ -21,27 +21,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { Stack } from '@workday/canvas-kit-
|
|
24
|
+
import { createContainer } from '@workday/canvas-kit-react/common';
|
|
25
|
+
import { FormField, useFormFieldOrientation } from '@workday/canvas-kit-preview-react/form-field';
|
|
26
|
+
import { Stack } from '@workday/canvas-kit-react/layout';
|
|
27
27
|
import { useTextInputModel } from './hooks';
|
|
28
28
|
import { TextInputField } from './TextInputField';
|
|
29
|
-
|
|
30
|
-
import { TextInputHint } from './TextInputHint';
|
|
31
|
-
export var TextInputModelContext = FormFieldModelContext;
|
|
32
|
-
export var TextInput = createComponent()({
|
|
29
|
+
export var TextInput = createContainer('div')({
|
|
33
30
|
displayName: 'TextInput',
|
|
34
|
-
|
|
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 }, useTextInputModel);
|
|
38
|
-
var layoutProps = useFormFieldOrientation(orientation);
|
|
39
|
-
return (React.createElement(TextInputModelContext.Provider, { value: value },
|
|
40
|
-
React.createElement(Stack, __assign({ ref: ref }, layoutProps, elemProps), children)));
|
|
41
|
-
},
|
|
31
|
+
modelHook: useTextInputModel,
|
|
42
32
|
subComponents: {
|
|
43
33
|
Field: TextInputField,
|
|
44
|
-
Label:
|
|
45
|
-
Hint:
|
|
34
|
+
Label: FormField.Label,
|
|
35
|
+
Hint: FormField.Hint,
|
|
46
36
|
},
|
|
37
|
+
})(function (_a, Element) {
|
|
38
|
+
var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
|
|
39
|
+
var layoutProps = useFormFieldOrientation(orientation);
|
|
40
|
+
return (React.createElement(Stack, __assign({ as: Element }, layoutProps, elemProps), children));
|
|
47
41
|
});
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
export declare const TextInputField: 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 & import("@workday/canvas-kit-react/common").PropsWithModel<{
|
|
2
|
+
state: {
|
|
3
|
+
id: string;
|
|
4
|
+
hasError: boolean;
|
|
5
|
+
isRequired: boolean;
|
|
6
|
+
};
|
|
7
|
+
events: {};
|
|
8
|
+
}>, {
|
|
9
|
+
state: {
|
|
10
|
+
id: string;
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
isRequired: boolean;
|
|
13
|
+
};
|
|
14
|
+
events: {};
|
|
15
|
+
}>;
|
|
8
16
|
//# sourceMappingURL=TextInputField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputField.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInputField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInputField.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInputField.tsx"],"names":[],"mappings":"AA0CA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;EAgCzB,CAAC"}
|
|
@@ -9,26 +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
|
/** @jsxRuntime classic */
|
|
24
13
|
/** @jsx jsx */
|
|
25
14
|
import { jsx } from '@emotion/react';
|
|
26
15
|
import { borderRadius, inputColors, space, type, } from '@workday/canvas-kit-react/tokens';
|
|
27
|
-
import {
|
|
16
|
+
import { createSubcomponent, useTheme } from '@workday/canvas-kit-react/common';
|
|
28
17
|
import { useThemedRing } from '@workday/canvas-kit-labs-react/common';
|
|
29
18
|
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
30
|
-
import {
|
|
31
|
-
import { useTextInputField } from './hooks';
|
|
19
|
+
import { useTextInputField, useTextInputModel } from './hooks';
|
|
32
20
|
var baseStyles = __assign(__assign({}, type.levels.subtext.large), { transition: '0.2s box-shadow, 0.2s border-color', '&::placeholder': {
|
|
33
21
|
color: inputColors.placeholder,
|
|
34
22
|
}, '&:hover': {
|
|
@@ -45,22 +33,20 @@ var baseStyles = __assign(__assign({}, type.levels.subtext.large), { transition:
|
|
|
45
33
|
}, '::-ms-clear': {
|
|
46
34
|
display: 'none',
|
|
47
35
|
} });
|
|
48
|
-
export var TextInputField =
|
|
36
|
+
export var TextInputField = createSubcomponent('input')({
|
|
49
37
|
displayName: 'TextInput.Field',
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return (jsx(FormField.Input, __assign({ as: "input", css: [baseStyles, focusStyles], padding: space.xxs, margin: 0, display: "block", height: "40px", minWidth: "280px", border: "1px solid " + inputColors.border, backgroundColor: inputColors.background, borderRadius: borderRadius.m }, props)));
|
|
65
|
-
},
|
|
38
|
+
modelHook: useTextInputModel,
|
|
39
|
+
elemPropsHook: useTextInputField,
|
|
40
|
+
})(function (elemProps, Element, model) {
|
|
41
|
+
var theme = useTheme();
|
|
42
|
+
var errorRing = useThemedRing('error');
|
|
43
|
+
var focusStyles = model.state.hasError
|
|
44
|
+
? errorRing
|
|
45
|
+
: {
|
|
46
|
+
'&:focus:not([disabled])': {
|
|
47
|
+
borderColor: theme.canvas.palette.common.focusOutline,
|
|
48
|
+
boxShadow: "inset 0 0 0 1px " + theme.canvas.palette.common.focusOutline,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
return (jsx(FormField.Input, __assign({ as: "input", css: [baseStyles, focusStyles], padding: space.xxs, margin: 0, display: "block", height: "40px", minWidth: "280px", border: "1px solid " + inputColors.border, backgroundColor: inputColors.background, borderRadius: borderRadius.m }, elemProps)));
|
|
66
52
|
});
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
|
|
3
3
|
*/
|
|
4
|
-
export declare const useTextInputField: <P extends {}, R>(model:
|
|
4
|
+
export declare const useTextInputField: <P extends {}, R>(model: {
|
|
5
|
+
state: {
|
|
6
|
+
id: string;
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
isRequired: boolean;
|
|
9
|
+
};
|
|
10
|
+
events: {};
|
|
11
|
+
}, elemProps?: P | undefined, ref?: ((instance: R | null) => void) | import("react").RefObject<R> | null | undefined) => {
|
|
5
12
|
type: string;
|
|
6
13
|
} & P & (R extends HTMLOrSVGElement ? {
|
|
7
14
|
ref: import("react").Ref<R>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextInputField.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTextInputField.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputField.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;OAI5B,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useTextInputModel } from './useTextInputModel';
|
|
2
3
|
/**
|
|
3
4
|
* Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
|
|
4
5
|
*/
|
|
5
|
-
export var useTextInputField =
|
|
6
|
+
export var useTextInputField = createElemPropsHook(useTextInputModel)(function () {
|
|
6
7
|
return {
|
|
7
8
|
type: 'text',
|
|
8
9
|
};
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export declare const useTextInputModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
2
|
+
hasError: boolean;
|
|
3
|
+
id: string;
|
|
4
|
+
isRequired: boolean;
|
|
5
|
+
}> & {} & {}) | undefined) => {
|
|
6
|
+
state: {
|
|
7
|
+
id: string;
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
isRequired: boolean;
|
|
10
|
+
};
|
|
11
|
+
events: {};
|
|
12
|
+
}) & import("@workday/canvas-kit-react/common").ModelExtras<{
|
|
13
|
+
hasError: boolean;
|
|
14
|
+
id: string;
|
|
15
|
+
isRequired: boolean;
|
|
16
|
+
}, {}, {
|
|
17
|
+
id: string;
|
|
18
|
+
hasError: boolean;
|
|
19
|
+
isRequired: boolean;
|
|
20
|
+
}, {}, {
|
|
21
|
+
state: {
|
|
22
|
+
id: string;
|
|
23
|
+
hasError: boolean;
|
|
24
|
+
isRequired: boolean;
|
|
25
|
+
};
|
|
26
|
+
events: {};
|
|
27
|
+
}>;
|
|
8
28
|
//# sourceMappingURL=useTextInputModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextInputModel.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTextInputModel.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputModel.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAC"}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {Stack, StackSpacing} from '@workday/canvas-kit-
|
|
3
|
+
import {createContainer, ExtractProps} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {Stack, StackSpacing} from '@workday/canvas-kit-react/layout';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
useFormFieldModel,
|
|
8
|
-
FormFieldModel,
|
|
9
|
-
FormFieldModelConfig,
|
|
10
|
-
useFormFieldOrientation,
|
|
11
|
-
} from './hooks';
|
|
6
|
+
import {useFormFieldModel, useFormFieldOrientation} from './hooks';
|
|
12
7
|
import {FormFieldInput} from './FormFieldInput';
|
|
13
8
|
import {FormFieldLabel} from './FormFieldLabel';
|
|
14
9
|
import {FormFieldHint} from './FormFieldHint';
|
|
15
10
|
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
export interface FormFieldProps
|
|
19
|
-
extends FormFieldModelConfig,
|
|
20
|
-
Omit<ExtractProps<typeof Stack, never>, 'spacing'> {
|
|
21
|
-
model?: FormFieldModel;
|
|
11
|
+
export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>, 'spacing'> {
|
|
22
12
|
/**
|
|
23
13
|
* Children of the Text Input. Should contain a `<FormField.Input>`, a `<FormField.Label>` and an optional `<FormField.Hint>`
|
|
24
14
|
*/
|
|
@@ -34,25 +24,20 @@ export interface FormFieldProps
|
|
|
34
24
|
spacing?: StackSpacing;
|
|
35
25
|
}
|
|
36
26
|
|
|
37
|
-
export const FormField =
|
|
27
|
+
export const FormField = createContainer('div')({
|
|
38
28
|
displayName: 'FormField',
|
|
39
|
-
|
|
40
|
-
const {hasError, id, isRequired, ...elemProps} = props;
|
|
41
|
-
const value = useDefaultModel(model, {hasError, id, isRequired}, useFormFieldModel);
|
|
42
|
-
|
|
43
|
-
const layoutProps = useFormFieldOrientation(orientation);
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<FormFieldModelContext.Provider value={value}>
|
|
47
|
-
<Stack ref={ref} {...layoutProps} {...elemProps}>
|
|
48
|
-
{children}
|
|
49
|
-
</Stack>
|
|
50
|
-
</FormFieldModelContext.Provider>
|
|
51
|
-
);
|
|
52
|
-
},
|
|
29
|
+
modelHook: useFormFieldModel,
|
|
53
30
|
subComponents: {
|
|
54
31
|
Input: FormFieldInput,
|
|
55
32
|
Label: FormFieldLabel,
|
|
56
33
|
Hint: FormFieldHint,
|
|
57
34
|
},
|
|
35
|
+
})<FormFieldProps>(({children, orientation, ...elemProps}, Element) => {
|
|
36
|
+
const layoutProps = useFormFieldOrientation(orientation);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Stack as={Element} {...layoutProps} {...elemProps}>
|
|
40
|
+
{children}
|
|
41
|
+
</Stack>
|
|
42
|
+
);
|
|
58
43
|
});
|
|
@@ -1,51 +1,40 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
createSubcomponent,
|
|
4
4
|
ExtractProps,
|
|
5
|
-
useModelContext,
|
|
6
5
|
useTheme,
|
|
7
6
|
styled,
|
|
8
7
|
StyledType,
|
|
9
8
|
} from '@workday/canvas-kit-react/common';
|
|
10
9
|
import {space, type} from '@workday/canvas-kit-react/tokens';
|
|
11
|
-
import {Box, BoxProps} from '@workday/canvas-kit-
|
|
10
|
+
import {Box, BoxProps} from '@workday/canvas-kit-react/layout';
|
|
12
11
|
|
|
13
|
-
import {
|
|
14
|
-
import {FormFieldModel, useFormFieldHint} from './hooks';
|
|
15
|
-
|
|
16
|
-
export interface FormFieldHintProps extends ExtractProps<typeof Box, never> {
|
|
17
|
-
model?: FormFieldModel;
|
|
18
|
-
/**
|
|
19
|
-
* Hint text to show to the user regarding the Error/Alert
|
|
20
|
-
*/
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
}
|
|
12
|
+
import {useFormFieldHint, useFormFieldModel} from './hooks';
|
|
23
13
|
|
|
24
14
|
const StyledHint = styled(Box)<StyledType & BoxProps>({
|
|
25
15
|
...type.levels.subtext.medium,
|
|
26
16
|
});
|
|
27
17
|
|
|
28
|
-
export const FormFieldHint =
|
|
18
|
+
export const FormFieldHint = createSubcomponent('p')({
|
|
29
19
|
displayName: 'FormField.Hint',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
modelHook: useFormFieldModel,
|
|
21
|
+
elemPropsHook: useFormFieldHint,
|
|
22
|
+
})<ExtractProps<typeof Box, never>>(({children, ...elemProps}, Element, model) => {
|
|
23
|
+
const theme = useTheme();
|
|
34
24
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
if (!children) {
|
|
26
|
+
// If there is no hint text just skip rendering
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
30
|
+
return (
|
|
31
|
+
<StyledHint
|
|
32
|
+
as={Element}
|
|
33
|
+
color={model.state.hasError ? theme.canvas.palette.error.main : undefined}
|
|
34
|
+
marginY={space.xxs}
|
|
35
|
+
{...elemProps}
|
|
36
|
+
>
|
|
37
|
+
{children}
|
|
38
|
+
</StyledHint>
|
|
39
|
+
);
|
|
51
40
|
});
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {Box} from '@workday/canvas-kit-
|
|
3
|
+
import {createSubcomponent, ExtractProps} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {Box} from '@workday/canvas-kit-react/layout';
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {FormFieldModel, useFormFieldInput} from './hooks';
|
|
6
|
+
import {useFormFieldInput, useFormFieldModel} from './hooks';
|
|
8
7
|
|
|
9
|
-
export
|
|
10
|
-
model?: FormFieldModel;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const FormFieldInput = createComponent('input')({
|
|
8
|
+
export const FormFieldInput = createSubcomponent('input')({
|
|
14
9
|
displayName: 'FormField.Input',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return <Box as={Element} {...props} />;
|
|
20
|
-
},
|
|
10
|
+
modelHook: useFormFieldModel,
|
|
11
|
+
elemPropsHook: useFormFieldInput,
|
|
12
|
+
})<ExtractProps<typeof Box, never>>((elemProps, Element) => {
|
|
13
|
+
return <Box as={Element} {...elemProps} />;
|
|
21
14
|
});
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
createSubcomponent,
|
|
5
5
|
ExtractProps,
|
|
6
|
-
useModelContext,
|
|
7
6
|
useTheme,
|
|
8
7
|
styled,
|
|
9
8
|
StyledType,
|
|
10
9
|
} from '@workday/canvas-kit-react/common';
|
|
11
|
-
import {Box} from '@workday/canvas-kit-
|
|
10
|
+
import {Box, HStack, StackSpacing} from '@workday/canvas-kit-react/layout';
|
|
12
11
|
import {type} from '@workday/canvas-kit-react/tokens';
|
|
13
|
-
import {HStack, StackSpacing} from '@workday/canvas-kit-labs-react/layout';
|
|
14
12
|
|
|
15
|
-
import {
|
|
16
|
-
import {FormFieldModel, useFormFieldLabel} from './hooks';
|
|
13
|
+
import {useFormFieldLabel, useFormFieldModel} from './hooks';
|
|
17
14
|
|
|
18
15
|
export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
|
|
19
|
-
model?: FormFieldModel;
|
|
20
16
|
/**
|
|
21
17
|
* The text of the label.
|
|
22
18
|
*/
|
|
@@ -39,22 +35,21 @@ const StyledAsterisk = styled(Box)<StyledType>({
|
|
|
39
35
|
textDecoration: 'unset',
|
|
40
36
|
});
|
|
41
37
|
|
|
42
|
-
export const FormFieldLabel =
|
|
38
|
+
export const FormFieldLabel = createSubcomponent('label')({
|
|
43
39
|
displayName: 'FormField.Label',
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
modelHook: useFormFieldModel,
|
|
41
|
+
elemPropsHook: useFormFieldLabel,
|
|
42
|
+
})<FormFieldLabelProps>(({spacing = 'xxxs', children, ...elemProps}, Element, model) => {
|
|
43
|
+
const theme = useTheme();
|
|
48
44
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
45
|
+
return (
|
|
46
|
+
<HStack as={Element} spacing={spacing} minWidth="180px" {...elemProps}>
|
|
47
|
+
<StyledFormFieldLabel>{children}</StyledFormFieldLabel>
|
|
48
|
+
{model.state.isRequired && (
|
|
49
|
+
<StyledAsterisk as="span" color={theme.canvas.palette.error.main} aria-hidden="true">
|
|
50
|
+
*
|
|
51
|
+
</StyledAsterisk>
|
|
52
|
+
)}
|
|
53
|
+
</HStack>
|
|
54
|
+
);
|
|
60
55
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {createElemPropsHook} from '@workday/canvas-kit-react/common';
|
|
2
|
+
import {useFormFieldModel} from './useFormFieldModel';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Adds the necessary props to a `Hint` component.
|
|
6
6
|
* Used by the FormField.Hint subcomponent and other input type components
|
|
7
7
|
*/
|
|
8
|
-
export const useFormFieldHint =
|
|
8
|
+
export const useFormFieldHint = createElemPropsHook(useFormFieldModel)(({state}) => {
|
|
9
9
|
return {
|
|
10
10
|
id: `hint-${state.id}`,
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {createElemPropsHook} from '@workday/canvas-kit-react/common';
|
|
2
|
+
import {useFormFieldModel} from './useFormFieldModel';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Adds the necessary props to an `Input` component.
|
|
6
6
|
* Used by the FormField.Input subcomponent and other input type components
|
|
7
7
|
*/
|
|
8
|
-
export const useFormFieldInput =
|
|
8
|
+
export const useFormFieldInput = createElemPropsHook(useFormFieldModel)(({state}) => {
|
|
9
9
|
return {
|
|
10
10
|
required: state.isRequired ? true : undefined,
|
|
11
11
|
'aria-invalid': state.hasError ? true : undefined,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {createElemPropsHook} from '@workday/canvas-kit-react/common';
|
|
2
|
+
import {useFormFieldModel} from './useFormFieldModel';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Adds the necessary props to a `Label` component.
|
|
6
6
|
* Used by the FormField.Label subcomponent and other input type components
|
|
7
7
|
*/
|
|
8
|
-
export const useFormFieldLabel =
|
|
8
|
+
export const useFormFieldLabel = createElemPropsHook(useFormFieldModel)(({state}) => {
|
|
9
9
|
return {
|
|
10
10
|
htmlFor: `input-${state.id}`,
|
|
11
11
|
};
|