@workday/canvas-kit-preview-react 7.0.0-alpha.0-next.6 → 7.0.0-alpha.101-next.26
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
|
@@ -28,26 +28,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
28
28
|
exports.FormFieldLabel = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
31
|
-
var
|
|
31
|
+
var layout_1 = require("@workday/canvas-kit-react/layout");
|
|
32
32
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
33
|
-
var layout_1 = require("@workday/canvas-kit-labs-react/layout");
|
|
34
|
-
var FormField_1 = require("./FormField");
|
|
35
33
|
var hooks_1 = require("./hooks");
|
|
36
34
|
var StyledFormFieldLabel = common_1.styled('span')(__assign(__assign({}, tokens_1.type.levels.subtext.large), { fontWeight: tokens_1.type.properties.fontWeights.medium }));
|
|
37
|
-
var StyledAsterisk = common_1.styled(
|
|
35
|
+
var StyledAsterisk = common_1.styled(layout_1.Box)({
|
|
38
36
|
fontSize: tokens_1.type.properties.fontSizes[20],
|
|
39
37
|
fontWeight: tokens_1.type.properties.fontWeights.regular,
|
|
40
38
|
textDecoration: 'unset',
|
|
41
39
|
});
|
|
42
|
-
exports.FormFieldLabel = common_1.
|
|
40
|
+
exports.FormFieldLabel = common_1.createSubcomponent('label')({
|
|
43
41
|
displayName: 'FormField.Label',
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
42
|
+
modelHook: hooks_1.useFormFieldModel,
|
|
43
|
+
elemPropsHook: hooks_1.useFormFieldLabel,
|
|
44
|
+
})(function (_a, Element, model) {
|
|
45
|
+
var _b = _a.spacing, spacing = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["spacing", "children"]);
|
|
46
|
+
var theme = common_1.useTheme();
|
|
47
|
+
return (react_1.default.createElement(layout_1.HStack, __assign({ as: Element, spacing: spacing, minWidth: "180px" }, elemProps),
|
|
48
|
+
react_1.default.createElement(StyledFormFieldLabel, null, children),
|
|
49
|
+
model.state.isRequired && (react_1.default.createElement(StyledAsterisk, { as: "span", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
|
|
53
50
|
});
|
|
@@ -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"}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormFieldHint = void 0;
|
|
4
4
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
var useFormFieldModel_1 = require("./useFormFieldModel");
|
|
5
6
|
/**
|
|
6
7
|
* Adds the necessary props to a `Hint` component.
|
|
7
8
|
* Used by the FormField.Hint subcomponent and other input type components
|
|
8
9
|
*/
|
|
9
|
-
exports.useFormFieldHint = common_1.
|
|
10
|
+
exports.useFormFieldHint = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(function (_a) {
|
|
10
11
|
var state = _a.state;
|
|
11
12
|
return {
|
|
12
13
|
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"}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormFieldInput = void 0;
|
|
4
4
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
var useFormFieldModel_1 = require("./useFormFieldModel");
|
|
5
6
|
/**
|
|
6
7
|
* Adds the necessary props to an `Input` component.
|
|
7
8
|
* Used by the FormField.Input subcomponent and other input type components
|
|
8
9
|
*/
|
|
9
|
-
exports.useFormFieldInput = common_1.
|
|
10
|
+
exports.useFormFieldInput = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(function (_a) {
|
|
10
11
|
var state = _a.state;
|
|
11
12
|
return {
|
|
12
13
|
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"}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormFieldLabel = void 0;
|
|
4
4
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
var useFormFieldModel_1 = require("./useFormFieldModel");
|
|
5
6
|
/**
|
|
6
7
|
* Adds the necessary props to a `Label` component.
|
|
7
8
|
* Used by the FormField.Label subcomponent and other input type components
|
|
8
9
|
*/
|
|
9
|
-
exports.useFormFieldLabel = common_1.
|
|
10
|
+
exports.useFormFieldLabel = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(function (_a) {
|
|
10
11
|
var state = _a.state;
|
|
11
12
|
return {
|
|
12
13
|
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,23 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
14
|
exports.useFormFieldModel = void 0;
|
|
4
15
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
exports.useFormFieldModel = common_1.createModelHook({
|
|
17
|
+
defaultConfig: {
|
|
18
|
+
/**
|
|
19
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
20
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
hasError: false,
|
|
24
|
+
/**
|
|
25
|
+
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
26
|
+
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
27
|
+
* - `FormField.Input` will set `id` to `input-${id}`
|
|
28
|
+
* - `FormField.Label` will set `htmlFor` to `input-${id}`
|
|
29
|
+
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
30
|
+
*
|
|
31
|
+
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
32
|
+
* @default `useUniqueId()`
|
|
33
|
+
*/
|
|
34
|
+
id: '',
|
|
35
|
+
/**
|
|
36
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
37
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
isRequired: false,
|
|
41
|
+
},
|
|
42
|
+
})(function (config) {
|
|
11
43
|
var id = common_1.useUniqueId(config.id);
|
|
12
|
-
var state = {
|
|
13
|
-
hasError: config.hasError,
|
|
14
|
-
isRequired: config.isRequired,
|
|
15
|
-
id: id,
|
|
16
|
-
};
|
|
17
|
-
var events = common_1.useEventMap(formFieldEventMap, state, config, {});
|
|
44
|
+
var state = __assign(__assign({}, config), { id: id });
|
|
18
45
|
return {
|
|
19
46
|
state: state,
|
|
20
|
-
events:
|
|
47
|
+
events: {},
|
|
21
48
|
};
|
|
22
|
-
};
|
|
23
|
-
exports.useFormFieldModel = useFormFieldModel;
|
|
49
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAG1E;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,UAAU,CAAC,eAAe,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC;aAC3B,YAAY;CAkBxB,CAAC"}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -14,6 +14,7 @@ __exportStar(require("./breadcrumbs"), exports);
|
|
|
14
14
|
__exportStar(require("./color-picker"), exports);
|
|
15
15
|
__exportStar(require("./form-field"), exports);
|
|
16
16
|
__exportStar(require("./menu"), exports);
|
|
17
|
+
__exportStar(require("./pill"), exports);
|
|
17
18
|
__exportStar(require("./select"), exports);
|
|
18
19
|
__exportStar(require("./side-panel"), exports);
|
|
19
20
|
__exportStar(require("./text-area"), exports);
|
|
@@ -268,7 +268,7 @@ var Menu = /** @class */ (function (_super) {
|
|
|
268
268
|
var _a = this.props, _b = _a.id, id = _b === void 0 ? this.id : _b, _c = _a.isOpen, isOpen = _c === void 0 ? true : _c, children = _a.children, ariaLabelledby = _a["aria-labelledby"], grow = _a.grow, width = _a.width, onSelect = _a.onSelect, onClose = _a.onClose, initialSelectedItem = _a.initialSelectedItem, elemProps = __rest(_a, ["id", "isOpen", "children", 'aria-labelledby', "grow", "width", "onSelect", "onClose", "initialSelectedItem"]);
|
|
269
269
|
var selectedItemIndex = this.state.selectedItemIndex;
|
|
270
270
|
var cardWidth = grow ? '100%' : width;
|
|
271
|
-
return (React.createElement(card_1.Card, {
|
|
271
|
+
return (React.createElement(card_1.Card, { display: "inline-block", padding: tokens_1.space.zero, width: cardWidth, depth: 3 },
|
|
272
272
|
React.createElement(card_1.Card.Body, null,
|
|
273
273
|
React.createElement(List, __assign({ role: "menu", tabIndex: 0, id: id, "aria-labelledby": ariaLabelledby, "aria-activedescendant": id + "-" + selectedItemIndex, onKeyDown: this.handleKeyboardShortcuts, ref: this.menuRef }, elemProps), React.Children.map(children, function (menuItem, index) {
|
|
274
274
|
if (!React.isValidElement(menuItem)) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../pill/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./lib/Pill"), exports);
|
|
14
|
+
__exportStar(require("./lib/usePillModel"), exports);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoxProps } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
export interface PillProps extends BoxProps {
|
|
4
|
+
/**
|
|
5
|
+
* Defines what kind of pill to render stylistically and its interaction states
|
|
6
|
+
* @default 'default'
|
|
7
|
+
*/
|
|
8
|
+
variant?: 'default' | 'readOnly' | 'removable';
|
|
9
|
+
}
|
|
10
|
+
export declare const Pill: import("@workday/canvas-kit-react/common").ElementComponentM<"button", PillProps & Partial<{
|
|
11
|
+
maxWidth: string | number;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}> & {} & {}, {
|
|
14
|
+
state: {
|
|
15
|
+
maxWidth: string | number;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
};
|
|
18
|
+
events: {};
|
|
19
|
+
}> & {
|
|
20
|
+
Context: React.Context<{
|
|
21
|
+
state: {
|
|
22
|
+
maxWidth: string | number;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
};
|
|
25
|
+
events: {};
|
|
26
|
+
}>;
|
|
27
|
+
} & {
|
|
28
|
+
Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillIcon").PillIconProps, {
|
|
29
|
+
state: {
|
|
30
|
+
maxWidth: string | number;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
};
|
|
33
|
+
events: {};
|
|
34
|
+
}>;
|
|
35
|
+
Avatar: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillAvatar").PillAvatarProps, {
|
|
36
|
+
state: {
|
|
37
|
+
maxWidth: string | number;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
};
|
|
40
|
+
events: {};
|
|
41
|
+
}>;
|
|
42
|
+
Count: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("./PillCount").PillCountProps>;
|
|
43
|
+
Label: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillLabel").PillLabelProps, {
|
|
44
|
+
state: {
|
|
45
|
+
maxWidth: string | number;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
};
|
|
48
|
+
events: {};
|
|
49
|
+
}>;
|
|
50
|
+
IconButton: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillIconButton").PillIconButtonProps, {
|
|
51
|
+
state: {
|
|
52
|
+
maxWidth: string | number;
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
};
|
|
55
|
+
events: {};
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=Pill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../../pill/lib/Pill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAAC,QAAQ,EAA4B,MAAM,kCAAkC,CAAC;AAWrF,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;CAChD;AAgID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Df,CAAC"}
|