@workday/canvas-kit-preview-react 6.8.9 → 6.9.0-next.2
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 +52 -26
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +5 -6
- package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +1 -0
- package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +7 -9
- package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +22 -20
- package/breadcrumbs/lib/Breadcrumbs/List/styles.ts +1 -1
- package/breadcrumbs/package.json +2 -1
- package/color-picker/lib/ColorPicker.tsx +3 -3
- package/color-picker/package.json +2 -1
- package/dist/commonjs/breadcrumbs/index.js +13 -5
- 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 +38 -9
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +14 -8
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +20 -7
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +1 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +5 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +3 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +22 -8
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +4 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.js +3 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +10 -8
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +21 -5
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +1 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +13 -16
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.js +3 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.js +3 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.js +3 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +1 -2
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.js +1 -0
- package/dist/commonjs/color-picker/index.js +6 -2
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +21 -9
- package/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/parts/ColorReset.js +17 -3
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +17 -3
- package/dist/commonjs/form-field/index.js +12 -5
- 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 -11
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +8 -12
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.js +18 -16
- 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 +7 -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 +21 -22
- package/dist/commonjs/form-field/lib/hooks/index.js +15 -8
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +8 -6
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +3 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +8 -6
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +3 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +8 -6
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +3 -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 +42 -14
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +5 -4
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +3 -1
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +19 -11
- package/dist/commonjs/menu/index.js +12 -4
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +21 -9
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +20 -8
- 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 +65 -0
- package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/Pill.js +171 -0
- package/dist/commonjs/pill/lib/PillAvatar.d.ts +12 -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 +18 -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 +23 -0
- package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/PillIconButton.js +81 -0
- package/dist/commonjs/pill/lib/PillLabel.d.ts +14 -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 +71 -0
- package/dist/commonjs/pill/lib/usePillModel.d.ts.map +1 -0
- package/dist/commonjs/pill/lib/usePillModel.js +37 -0
- package/dist/commonjs/select/index.d.ts +1 -1
- package/dist/commonjs/select/index.d.ts.map +1 -1
- package/dist/commonjs/select/index.js +12 -4
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +22 -8
- package/dist/commonjs/select/lib/SelectBase.d.ts +20 -1
- package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectBase.js +26 -11
- package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectMenu.js +20 -7
- package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectOption.js +19 -7
- package/dist/commonjs/select/lib/scrolling.d.ts.map +1 -1
- package/dist/commonjs/select/lib/scrolling.js +3 -1
- package/dist/commonjs/select/lib/utils.d.ts.map +1 -1
- package/dist/commonjs/select/lib/utils.js +5 -2
- package/dist/commonjs/side-panel/index.js +13 -5
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +18 -5
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +32 -16
- package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/hooks.js +17 -3
- package/dist/commonjs/text-area/index.js +11 -4
- 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 -15
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts +15 -7
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.js +19 -18
- package/dist/commonjs/text-area/lib/hooks/index.js +11 -4
- 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-area/lib/hooks/useTextAreaModel.js +1 -0
- package/dist/commonjs/text-input/index.js +12 -5
- 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 -15
- package/dist/commonjs/text-input/lib/TextInputField.d.ts +15 -7
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +18 -30
- package/dist/commonjs/text-input/lib/hooks/index.js +12 -5
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +8 -2
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +3 -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/commonjs/text-input/lib/hooks/useTextInputModel.js +1 -0
- 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 +36 -11
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +8 -7
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +1 -2
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +4 -7
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +1 -2
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +9 -16
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +1 -2
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.js +1 -0
- package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +3 -3
- package/dist/es6/color-picker/lib/parts/ColorReset.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
- 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 +17 -19
- 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 +19 -24
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +8 -6
- 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 -6
- 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 -6
- 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 +5 -4
- 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.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +2 -2
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.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 +65 -0
- package/dist/es6/pill/lib/Pill.d.ts.map +1 -0
- package/dist/es6/pill/lib/Pill.js +165 -0
- package/dist/es6/pill/lib/PillAvatar.d.ts +13 -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 +19 -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 +24 -0
- package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -0
- package/dist/es6/pill/lib/PillIconButton.js +75 -0
- package/dist/es6/pill/lib/PillLabel.d.ts +15 -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 +71 -0
- package/dist/es6/pill/lib/usePillModel.d.ts.map +1 -0
- package/dist/es6/pill/lib/usePillModel.js +34 -0
- package/dist/es6/select/index.d.ts +1 -1
- package/dist/es6/select/index.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +2 -1
- package/dist/es6/select/lib/SelectBase.d.ts +20 -1
- package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectBase.js +6 -4
- package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/es6/select/lib/scrolling.d.ts.map +1 -1
- package/dist/es6/select/lib/types.js +1 -0
- package/dist/es6/select/lib/utils.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.d.ts +18 -5
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +9 -6
- package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextArea.d.ts +52 -11
- package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextArea.js +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 +19 -19
- 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 +19 -32
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +8 -2
- 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 +28 -38
- package/form-field/lib/FormFieldInput.tsx +8 -15
- package/form-field/lib/FormFieldLabel.tsx +30 -39
- 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/form-field/package.json +2 -1
- package/index.ts +1 -0
- package/menu/lib/Menu.tsx +1 -1
- package/menu/package.json +2 -1
- package/package.json +14 -22
- package/pill/LICENSE +52 -0
- package/pill/README.md +5 -0
- package/pill/index.ts +2 -0
- package/pill/lib/Pill.tsx +226 -0
- package/pill/lib/PillAvatar.tsx +27 -0
- package/pill/lib/PillCount.tsx +39 -0
- package/pill/lib/PillIcon.tsx +34 -0
- package/pill/lib/PillIconButton.tsx +100 -0
- package/pill/lib/PillLabel.tsx +36 -0
- package/pill/lib/usePillModel.tsx +28 -0
- package/pill/package.json +6 -0
- package/select/index.ts +6 -1
- package/select/lib/Select.tsx +1 -0
- package/select/lib/SelectBase.tsx +27 -3
- package/select/lib/SelectMenu.tsx +1 -1
- package/select/lib/SelectOption.tsx +1 -1
- package/select/package.json +2 -1
- package/side-panel/lib/SidePanel.tsx +28 -9
- package/side-panel/package.json +2 -1
- package/text-area/lib/TextArea.tsx +16 -30
- package/text-area/lib/TextAreaField.tsx +32 -45
- package/text-area/lib/hooks/useTextAreaModel.ts +1 -3
- package/text-area/package.json +2 -1
- package/text-input/lib/TextInput.tsx +16 -30
- package/text-input/lib/TextInputField.tsx +33 -44
- package/text-input/lib/hooks/useTextInputField.tsx +3 -2
- package/text-input/lib/hooks/useTextInputModel.ts +1 -3
- package/text-input/package.json +2 -1
- 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 -4
- 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 -4
- 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 -4
- 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 -4
- 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 -39
- 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 -14
- 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 -5
- 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 -5
- 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 -10
- 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 -15
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +0 -18
- package/ts3.5/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -15
- 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 -9
- 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 -73
- 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 -10
- 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 -39
- 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 -14
- 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 -5
- 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 -5
- 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 -10
- 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 -15
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +0 -18
- package/ts3.5/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +0 -15
- 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 -9
- 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 -73
- 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 -10
- package/ts3.5/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +0 -8
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
1
|
/**
|
|
3
2
|
* Adds the necessary props to an `Input` component.
|
|
4
3
|
* Used by the FormField.Input subcomponent and other input type components
|
|
5
4
|
*/
|
|
6
|
-
export declare const useFormFieldInput: <P extends {}, R>(model:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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) => {
|
|
11
13
|
required: boolean | undefined;
|
|
12
14
|
'aria-invalid': boolean | undefined;
|
|
13
15
|
'aria-describedby': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;OAO5B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useFormFieldModel } from './useFormFieldModel';
|
|
2
3
|
/**
|
|
3
4
|
* Adds the necessary props to an `Input` component.
|
|
4
5
|
* Used by the FormField.Input subcomponent and other input type components
|
|
5
6
|
*/
|
|
6
|
-
export var useFormFieldInput =
|
|
7
|
+
export var useFormFieldInput = createElemPropsHook(useFormFieldModel)(function (_a) {
|
|
7
8
|
var state = _a.state;
|
|
8
9
|
return {
|
|
9
10
|
required: state.isRequired ? true : undefined,
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
1
|
/**
|
|
3
2
|
* Adds the necessary props to a `Label` component.
|
|
4
3
|
* Used by the FormField.Label subcomponent and other input type components
|
|
5
4
|
*/
|
|
6
|
-
export declare const useFormFieldLabel: <P extends {}, R>(model:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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) => {
|
|
11
13
|
htmlFor: string;
|
|
12
14
|
} & P & (R extends HTMLOrSVGElement ? {
|
|
13
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":"
|
|
1
|
+
{"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;OAI5B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElemPropsHook } from '@workday/canvas-kit-react/common';
|
|
2
|
+
import { useFormFieldModel } from './useFormFieldModel';
|
|
2
3
|
/**
|
|
3
4
|
* Adds the necessary props to a `Label` component.
|
|
4
5
|
* Used by the FormField.Label subcomponent and other input type components
|
|
5
6
|
*/
|
|
6
|
-
export var useFormFieldLabel =
|
|
7
|
+
export var useFormFieldLabel = createElemPropsHook(useFormFieldModel)(function (_a) {
|
|
7
8
|
var state = _a.state;
|
|
8
9
|
return {
|
|
9
10
|
htmlFor: "input-" + state.id,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
declare type FormFieldState = {
|
|
1
|
+
export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
3
2
|
/**
|
|
4
3
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
5
4
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
6
5
|
* @default false
|
|
7
6
|
*/
|
|
8
|
-
hasError
|
|
7
|
+
hasError: boolean;
|
|
9
8
|
/**
|
|
10
9
|
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
11
10
|
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
@@ -16,21 +15,84 @@ declare type FormFieldState = {
|
|
|
16
15
|
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
17
16
|
* @default `useUniqueId()`
|
|
18
17
|
*/
|
|
19
|
-
id
|
|
18
|
+
id: string;
|
|
20
19
|
/**
|
|
21
20
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
22
21
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
23
22
|
* @default false
|
|
24
23
|
*/
|
|
25
|
-
isRequired
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
isRequired: boolean;
|
|
25
|
+
}> & {} & {}) | undefined) => {
|
|
26
|
+
state: {
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
30
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
hasError: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
36
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
isRequired: boolean;
|
|
40
|
+
};
|
|
41
|
+
events: {};
|
|
42
|
+
}) & import("@workday/canvas-kit-react/common").ModelExtras<{
|
|
43
|
+
/**
|
|
44
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
45
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
hasError: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
51
|
+
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
52
|
+
* - `FormField.Input` will set `id` to `input-${id}`
|
|
53
|
+
* - `FormField.Label` will set `htmlFor` to `input-${id}`
|
|
54
|
+
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
55
|
+
*
|
|
56
|
+
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
57
|
+
* @default `useUniqueId()`
|
|
58
|
+
*/
|
|
59
|
+
id: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
62
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
isRequired: boolean;
|
|
66
|
+
}, {}, {
|
|
67
|
+
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
70
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
hasError: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
76
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
isRequired: boolean;
|
|
80
|
+
}, {}, {
|
|
81
|
+
state: {
|
|
82
|
+
id: string;
|
|
83
|
+
/**
|
|
84
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
85
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
86
|
+
* @default false
|
|
87
|
+
*/
|
|
88
|
+
hasError: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
91
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
isRequired: boolean;
|
|
95
|
+
};
|
|
96
|
+
events: {};
|
|
97
|
+
}>;
|
|
36
98
|
//# sourceMappingURL=useFormFieldModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;IAE1B;;;;OAIG;;IAEH;;;;;;;;;OASG;;IAEH;;;;OAIG;;;;;QArBH;;;;WAIG;;QAaH;;;;WAIG;;;;;IArBH;;;;OAIG;;IAEH;;;;;;;;;OASG;;IAEH;;;;OAIG;;;;IArBH;;;;OAIG;;IAaH;;;;OAIG;;;;;QArBH;;;;WAIG;;QAaH;;;;WAIG;;;;EAeL,CAAC"}
|
|
@@ -1,19 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var state = {
|
|
10
|
-
hasError: config.hasError,
|
|
11
|
-
isRequired: config.isRequired,
|
|
12
|
-
id: id,
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
13
9
|
};
|
|
14
|
-
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { createModelHook, useUniqueId } from '@workday/canvas-kit-react/common';
|
|
13
|
+
export var useFormFieldModel = createModelHook({
|
|
14
|
+
defaultConfig: {
|
|
15
|
+
/**
|
|
16
|
+
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
17
|
+
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
hasError: false,
|
|
21
|
+
/**
|
|
22
|
+
* Optional `id` provided to `FormField`'s subcomponents as HTML attributes:
|
|
23
|
+
* - `FormField.Input` will set `aria-describedby` to `hint-${id}`
|
|
24
|
+
* - `FormField.Input` will set `id` to `input-${id}`
|
|
25
|
+
* - `FormField.Label` will set `htmlFor` to `input-${id}`
|
|
26
|
+
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
27
|
+
*
|
|
28
|
+
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
29
|
+
* @default `useUniqueId()`
|
|
30
|
+
*/
|
|
31
|
+
id: '',
|
|
32
|
+
/**
|
|
33
|
+
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
34
|
+
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
isRequired: false,
|
|
38
|
+
},
|
|
39
|
+
})(function (config) {
|
|
40
|
+
var id = useUniqueId(config.id);
|
|
41
|
+
var state = __assign(__assign({}, config), { id: id });
|
|
15
42
|
return {
|
|
16
43
|
state: state,
|
|
17
|
-
events:
|
|
44
|
+
events: {},
|
|
18
45
|
};
|
|
19
|
-
};
|
|
46
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { StackSpacing, StackProps } from '@workday/canvas-kit-react/layout';
|
|
1
2
|
/**
|
|
2
3
|
* Adds the necessary layout props to a `FormField` component.
|
|
3
4
|
*/
|
|
4
|
-
export declare const useFormFieldOrientation: (orientation:
|
|
5
|
-
flexDirection:
|
|
6
|
-
alignItems:
|
|
7
|
-
spacing:
|
|
5
|
+
export declare const useFormFieldOrientation: (orientation: 'horizontal' | 'vertical') => {
|
|
6
|
+
flexDirection: StackProps['flexDirection'];
|
|
7
|
+
alignItems: StackProps['alignItems'];
|
|
8
|
+
spacing: StackSpacing;
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=useFormFieldOrientation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"
|
|
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/es6/index.d.ts
CHANGED
package/dist/es6/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,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/es6/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG,MAAM,WAAW,SAAU,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACvF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACnF;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IACrE,OAAO,CAAC,EAAE,CAAsB;IAChC,OAAO,CAAC,SAAS,CAAU;IAE3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,eAAe,CAAY;gBAEvB,KAAK,EAAE,SAAS;IAe5B,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAevC,iBAAiB;IAKjB,oBAAoB;IAIb,MAAM;IAmDN,sBAAsB,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG,MAAM,WAAW,SAAU,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACvF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACnF;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IACrE,OAAO,CAAC,EAAE,CAAsB;IAChC,OAAO,CAAC,SAAS,CAAU;IAE3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,eAAe,CAAY;gBAEvB,KAAK,EAAE,SAAS;IAe5B,kBAAkB,CAAC,SAAS,EAAE,SAAS;IAevC,iBAAiB;IAKjB,oBAAoB;IAIb,MAAM;IAmDN,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,MAAM,CAQjE;IAEK,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,IAAI,CAE/D;IAEF,OAAO,CAAC,uBAAuB,CA4E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CA+BxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
|
|
@@ -2,7 +2,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
@@ -244,7 +244,7 @@ var Menu = /** @class */ (function (_super) {
|
|
|
244
244
|
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"]);
|
|
245
245
|
var selectedItemIndex = this.state.selectedItemIndex;
|
|
246
246
|
var cardWidth = grow ? '100%' : width;
|
|
247
|
-
return (React.createElement(Card, {
|
|
247
|
+
return (React.createElement(Card, { display: "inline-block", padding: space.zero, width: cardWidth, depth: 3 },
|
|
248
248
|
React.createElement(Card.Body, null,
|
|
249
249
|
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) {
|
|
250
250
|
if (!React.isValidElement(menuItem)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC1E;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwLD,cAAM,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACnD,GAAG,iCAAoC;IAEvC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC1E;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAwLD,cAAM,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACnD,GAAG,iCAAoC;IAEvC,kBAAkB,cAAe,aAAa,UAM5C;IAEF,MAAM,IAAI,KAAK,CAAC,SAAS;IAyCzB,OAAO,CAAC,WAAW,CAOjB;CACH;AAcD,eAAe,QAAQ,CAAC"}
|
|
@@ -2,7 +2,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
@@ -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,65 @@
|
|
|
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: React.ReactText;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
id: string;
|
|
14
|
+
}> & {} & {}, {
|
|
15
|
+
state: {
|
|
16
|
+
id: string;
|
|
17
|
+
maxWidth: React.ReactText;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
};
|
|
20
|
+
events: {};
|
|
21
|
+
}> & {
|
|
22
|
+
Context: React.Context<{
|
|
23
|
+
state: {
|
|
24
|
+
id: string;
|
|
25
|
+
maxWidth: React.ReactText;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
};
|
|
28
|
+
events: {};
|
|
29
|
+
}>;
|
|
30
|
+
} & {
|
|
31
|
+
Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillIcon").PillIconProps, {
|
|
32
|
+
state: {
|
|
33
|
+
id: string;
|
|
34
|
+
maxWidth: React.ReactText;
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
events: {};
|
|
38
|
+
}>;
|
|
39
|
+
Avatar: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillAvatar").PillAvatarProps, {
|
|
40
|
+
state: {
|
|
41
|
+
id: string;
|
|
42
|
+
maxWidth: React.ReactText;
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
};
|
|
45
|
+
events: {};
|
|
46
|
+
}>;
|
|
47
|
+
Count: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("./PillCount").PillCountProps>;
|
|
48
|
+
Label: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillLabel").PillLabelProps, {
|
|
49
|
+
state: {
|
|
50
|
+
id: string;
|
|
51
|
+
maxWidth: React.ReactText;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
};
|
|
54
|
+
events: {};
|
|
55
|
+
}>;
|
|
56
|
+
IconButton: import("@workday/canvas-kit-react/common").ElementComponentM<"button", import("./PillIconButton").PillIconButtonProps, {
|
|
57
|
+
state: {
|
|
58
|
+
id: string;
|
|
59
|
+
maxWidth: React.ReactText;
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
};
|
|
62
|
+
events: {};
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
//# 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;AAsID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Df,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React from 'react';
|
|
24
|
+
import { BaseButton } from '@workday/canvas-kit-react/button';
|
|
25
|
+
import { createContainer, focusRing, mouseFocusBehavior, styled, } from '@workday/canvas-kit-react/common';
|
|
26
|
+
import { boxStyleFn, HStack, Stack } from '@workday/canvas-kit-react/layout';
|
|
27
|
+
import { borderRadius, colors, space, type } from '@workday/canvas-kit-react/tokens';
|
|
28
|
+
import { usePillModel } from './usePillModel';
|
|
29
|
+
import { PillIcon } from './PillIcon';
|
|
30
|
+
import { PillIconButton } from './PillIconButton';
|
|
31
|
+
import { PillCount } from './PillCount';
|
|
32
|
+
import { PillAvatar } from './PillAvatar';
|
|
33
|
+
import { PillLabel } from './PillLabel';
|
|
34
|
+
var getButtonPillColors = function () {
|
|
35
|
+
return {
|
|
36
|
+
default: {
|
|
37
|
+
background: colors.soap300,
|
|
38
|
+
icon: colors.licorice200,
|
|
39
|
+
label: colors.blackPepper400,
|
|
40
|
+
border: colors.licorice200,
|
|
41
|
+
},
|
|
42
|
+
hover: {
|
|
43
|
+
icon: colors.licorice500,
|
|
44
|
+
background: colors.soap400,
|
|
45
|
+
border: colors.licorice400,
|
|
46
|
+
},
|
|
47
|
+
active: {
|
|
48
|
+
icon: colors.licorice500,
|
|
49
|
+
background: colors.soap500,
|
|
50
|
+
border: colors.licorice500,
|
|
51
|
+
},
|
|
52
|
+
focus: {
|
|
53
|
+
icon: colors.licorice500,
|
|
54
|
+
background: colors.soap300,
|
|
55
|
+
border: colors.blueberry400,
|
|
56
|
+
focusRing: focusRing({
|
|
57
|
+
width: 0,
|
|
58
|
+
inset: 'inner',
|
|
59
|
+
innerColor: colors.blueberry400,
|
|
60
|
+
outerColor: colors.blueberry400,
|
|
61
|
+
separation: 1,
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
disabled: {
|
|
65
|
+
icon: colors.licorice100,
|
|
66
|
+
label: colors.licorice100,
|
|
67
|
+
background: colors.soap100,
|
|
68
|
+
border: colors.licorice100,
|
|
69
|
+
opacity: '1',
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
var getRemovablePillColors = function (disabled) {
|
|
74
|
+
return {
|
|
75
|
+
default: {
|
|
76
|
+
background: disabled ? colors.soap100 : colors.soap300,
|
|
77
|
+
icon: disabled ? colors.licorice100 : colors.licorice200,
|
|
78
|
+
label: disabled ? colors.licorice100 : colors.blackPepper400,
|
|
79
|
+
border: disabled ? colors.licorice100 : colors.licorice200,
|
|
80
|
+
},
|
|
81
|
+
hover: {
|
|
82
|
+
icon: disabled ? colors.licorice100 : colors.licorice500,
|
|
83
|
+
background: disabled ? colors.soap100 : colors.soap300,
|
|
84
|
+
border: disabled ? colors.licorice100 : colors.licorice200,
|
|
85
|
+
label: disabled ? colors.licorice100 : colors.blackPepper400,
|
|
86
|
+
},
|
|
87
|
+
active: {
|
|
88
|
+
icon: disabled ? colors.licorice100 : colors.licorice500,
|
|
89
|
+
background: disabled ? colors.soap100 : colors.soap500,
|
|
90
|
+
border: disabled ? colors.licorice100 : colors.licorice500,
|
|
91
|
+
label: disabled ? colors.licorice100 : colors.blackPepper400,
|
|
92
|
+
},
|
|
93
|
+
focus: {
|
|
94
|
+
icon: colors.licorice200,
|
|
95
|
+
background: colors.soap300,
|
|
96
|
+
label: colors.blackPepper400,
|
|
97
|
+
focusRing: focusRing({
|
|
98
|
+
width: 0,
|
|
99
|
+
innerColor: 'transparent',
|
|
100
|
+
outerColor: 'transparent',
|
|
101
|
+
}),
|
|
102
|
+
},
|
|
103
|
+
disabled: {},
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
var pillBaseStyles = __assign(__assign({ display: 'inline-flex', alignItems: 'center', borderRadius: borderRadius.m, flexShrink: 0 }, type.levels.subtext.large), { color: colors.blackPepper400, boxShadow: 'none', outline: 'none', fontWeight: type.properties.fontWeights.medium, WebkitFontSmoothing: 'antialiased', MozOsxFontSmoothing: 'grayscale', width: 'fit-content', padding: "2px " + space.xxs, height: space.m, position: 'relative' });
|
|
107
|
+
var StyledBasePill = styled(BaseButton.as('button'))(__assign(__assign(__assign({}, pillBaseStyles), { '&:focus': {
|
|
108
|
+
'span[data-count="ck-pill-count"]': {
|
|
109
|
+
borderTop: "1px solid " + colors.blueberry400,
|
|
110
|
+
borderBottom: "1px solid " + colors.blueberry400,
|
|
111
|
+
borderRight: "1px solid " + colors.blueberry400,
|
|
112
|
+
},
|
|
113
|
+
}, '&:active, &:active:hover, &:active:focus': {
|
|
114
|
+
'span[data-count="ck-pill-count"]': {
|
|
115
|
+
backgroundColor: colors.soap600,
|
|
116
|
+
border: 'none',
|
|
117
|
+
},
|
|
118
|
+
} }), mouseFocusBehavior({
|
|
119
|
+
'&:focus': {
|
|
120
|
+
'span[data-count="ck-pill-count"]': {
|
|
121
|
+
border: 'none',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
})), function (_a) {
|
|
125
|
+
var variant = _a.variant;
|
|
126
|
+
return ({
|
|
127
|
+
'&:focus': {
|
|
128
|
+
borderColor: variant === 'removable' ? undefined : colors.blueberry400,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
}, boxStyleFn);
|
|
132
|
+
var StyledNonInteractivePill = styled(StyledBasePill)({
|
|
133
|
+
cursor: 'default',
|
|
134
|
+
overflow: 'revert',
|
|
135
|
+
position: 'relative',
|
|
136
|
+
});
|
|
137
|
+
export var Pill = createContainer('button')({
|
|
138
|
+
modelHook: usePillModel,
|
|
139
|
+
subComponents: {
|
|
140
|
+
Icon: PillIcon,
|
|
141
|
+
Avatar: PillAvatar,
|
|
142
|
+
Count: PillCount,
|
|
143
|
+
Label: PillLabel,
|
|
144
|
+
IconButton: PillIconButton,
|
|
145
|
+
},
|
|
146
|
+
})(function (_a, Element, model) {
|
|
147
|
+
var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, maxWidth = _a.maxWidth, elemProps = __rest(_a, ["variant", "maxWidth"]);
|
|
148
|
+
return (React.createElement(React.Fragment, null,
|
|
149
|
+
variant === 'readOnly' && (React.createElement(StyledNonInteractivePill, __assign({ maxWidth: model.state.maxWidth, as: Element !== 'button' ? Element : 'span', border: "1px solid " + colors.licorice200, id: model.state.id }, elemProps),
|
|
150
|
+
React.createElement(PillLabel, null, elemProps.children))),
|
|
151
|
+
variant === 'default' && (React.createElement(StyledBasePill, __assign({ colors: getButtonPillColors(), as: Element }, elemProps, { disabled: model.state.disabled }),
|
|
152
|
+
React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center" }, React.Children.map(elemProps.children, function (child, index) {
|
|
153
|
+
if (typeof child === 'string') {
|
|
154
|
+
return React.createElement(PillLabel, { key: index }, child);
|
|
155
|
+
}
|
|
156
|
+
return (React.createElement(Stack.Item, { key: index, display: "inline-flex" }, child));
|
|
157
|
+
})))),
|
|
158
|
+
variant === 'removable' && (React.createElement(StyledNonInteractivePill, __assign({ colors: getRemovablePillColors(model.state.disabled), as: Element !== 'button' ? Element : 'span', variant: variant }, elemProps),
|
|
159
|
+
React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center", justifyContent: "center" }, React.Children.map(elemProps.children, function (child, index) {
|
|
160
|
+
if (typeof child === 'string') {
|
|
161
|
+
return React.createElement(PillLabel, { key: index }, child);
|
|
162
|
+
}
|
|
163
|
+
return React.createElement(Stack.Item, { key: index }, child);
|
|
164
|
+
}))))));
|
|
165
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarProps } from '@workday/canvas-kit-react/avatar';
|
|
3
|
+
export interface PillAvatarProps extends AvatarProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const PillAvatar: import("@workday/canvas-kit-react/common").ElementComponentM<"button", PillAvatarProps, {
|
|
6
|
+
state: {
|
|
7
|
+
id: string;
|
|
8
|
+
maxWidth: React.ReactText;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
};
|
|
11
|
+
events: {};
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=PillAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PillAvatar.d.ts","sourceRoot":"","sources":["../../../../pill/lib/PillAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAS,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAGrE,MAAM,WAAW,eAAgB,SAAQ,WAAW;CAAG;AAKvD,eAAO,MAAM,UAAU;;;;;;;EAerB,CAAC"}
|