@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,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {IconButton, IconButtonProps} from '@workday/canvas-kit-react/button';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {BaseButton} from '@workday/canvas-kit-react/button';
|
|
4
3
|
import {relatedActionsIcon} from '@workday/canvas-system-icons-web';
|
|
5
4
|
import {CanvasSystemIcon} from '@workday/design-assets-types';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import {createComponent, EmotionCanvasTheme, useTheme} from '@workday/canvas-kit-react/common';
|
|
6
|
+
import {colors, space} from '@workday/canvas-kit-react/tokens';
|
|
8
7
|
|
|
9
|
-
export interface DropdownButtonProps extends
|
|
8
|
+
export interface DropdownButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
10
9
|
/**
|
|
11
10
|
* The accessibility label for the button
|
|
12
11
|
*/
|
|
@@ -23,37 +22,64 @@ export interface DropdownButtonProps extends IconButtonProps {
|
|
|
23
22
|
toggled: boolean;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
export const DropdownButton = createComponent(
|
|
25
|
+
export const DropdownButton = createComponent('button')({
|
|
27
26
|
displayName: 'DropdownButton',
|
|
28
27
|
Component: (
|
|
29
|
-
{
|
|
30
|
-
buttonIcon = relatedActionsIcon,
|
|
31
|
-
toggled,
|
|
32
|
-
variant = 'plain',
|
|
33
|
-
...elemProps
|
|
34
|
-
}: DropdownButtonProps,
|
|
28
|
+
{buttonIcon = relatedActionsIcon, toggled, ...elemProps}: DropdownButtonProps,
|
|
35
29
|
ref,
|
|
36
30
|
Element
|
|
37
31
|
) => {
|
|
38
|
-
const
|
|
39
|
-
// gives the plain icon variant a little extra space between the chevron separators
|
|
40
|
-
const customStyles = css(hasPlainVariant ? {margin: '0 1px'} : {});
|
|
41
|
-
|
|
32
|
+
const theme = useTheme();
|
|
42
33
|
return (
|
|
43
|
-
<
|
|
34
|
+
<BaseButton
|
|
35
|
+
as={Element}
|
|
44
36
|
ref={ref}
|
|
45
|
-
|
|
46
|
-
css={customStyles}
|
|
47
|
-
variant={variant}
|
|
48
|
-
icon={buttonIcon}
|
|
49
|
-
color={colors.licorice200}
|
|
50
|
-
toggled={toggled}
|
|
51
|
-
aria-pressed={undefined} // removing aria-pressed from IconButton and opting for aria-expanded
|
|
37
|
+
aria-pressed={undefined} // removing aria-pressed from button and opting for aria-expanded
|
|
52
38
|
aria-expanded={toggled}
|
|
53
39
|
aria-haspopup
|
|
54
40
|
aria-controls="menu"
|
|
41
|
+
size="small"
|
|
42
|
+
height={space.l}
|
|
43
|
+
width={space.l}
|
|
44
|
+
padding={space.zero}
|
|
45
|
+
colors={getDropdownColors(toggled, theme)}
|
|
55
46
|
{...elemProps}
|
|
56
|
-
|
|
47
|
+
>
|
|
48
|
+
<BaseButton.Icon icon={buttonIcon} />
|
|
49
|
+
</BaseButton>
|
|
57
50
|
);
|
|
58
51
|
},
|
|
59
52
|
});
|
|
53
|
+
|
|
54
|
+
const getDropdownColors = (toggled: boolean, theme: EmotionCanvasTheme) => {
|
|
55
|
+
const {
|
|
56
|
+
canvas: {
|
|
57
|
+
palette: {primary: themePrimary},
|
|
58
|
+
},
|
|
59
|
+
} = theme;
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
default: {
|
|
63
|
+
icon: toggled ? themePrimary.main : colors.blackPepper400,
|
|
64
|
+
label: themePrimary.main,
|
|
65
|
+
},
|
|
66
|
+
hover: {
|
|
67
|
+
background: colors.soap200,
|
|
68
|
+
icon: toggled ? themePrimary.dark : colors.blackPepper500,
|
|
69
|
+
label: themePrimary.dark,
|
|
70
|
+
},
|
|
71
|
+
active: {
|
|
72
|
+
background: colors.soap300,
|
|
73
|
+
icon: toggled ? themePrimary.dark : colors.blackPepper500,
|
|
74
|
+
label: themePrimary.dark,
|
|
75
|
+
},
|
|
76
|
+
focus: {
|
|
77
|
+
icon: toggled ? themePrimary.main : colors.blackPepper500,
|
|
78
|
+
label: themePrimary.main,
|
|
79
|
+
},
|
|
80
|
+
disabled: {
|
|
81
|
+
icon: toggled ? themePrimary.main : colors.blackPepper400,
|
|
82
|
+
label: themePrimary.main,
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {css, jsx} from '@emotion/core';
|
|
4
2
|
import {styled} from '@workday/canvas-kit-react/common';
|
|
5
3
|
import {
|
|
6
4
|
borderRadius,
|
|
@@ -15,6 +13,7 @@ import {
|
|
|
15
13
|
import {Breadcrumb} from '../types';
|
|
16
14
|
// local components
|
|
17
15
|
import {DropdownMenuItemLink} from './MenuItemLink';
|
|
16
|
+
import {Box, BoxProps} from '@workday/canvas-kit-react/layout';
|
|
18
17
|
|
|
19
18
|
export interface DropdownMenuProps {
|
|
20
19
|
/**
|
|
@@ -51,9 +50,9 @@ export interface DropdownMenuProps {
|
|
|
51
50
|
toggleActiveItemDown: () => void;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
const
|
|
53
|
+
const StyledDropdownMenu = styled(Box)<BoxProps>({
|
|
55
54
|
...type.levels.subtext.large,
|
|
56
|
-
...depth[
|
|
55
|
+
...depth[3],
|
|
57
56
|
backgroundColor: commonColors.background,
|
|
58
57
|
border: `1px solid ${colors.soap500}`,
|
|
59
58
|
borderRadius: borderRadius.m,
|
|
@@ -130,7 +129,7 @@ export const DropdownMenu = ({
|
|
|
130
129
|
};
|
|
131
130
|
|
|
132
131
|
return (
|
|
133
|
-
<
|
|
132
|
+
<StyledDropdownMenu>
|
|
134
133
|
<MenuList {...elemProps}>
|
|
135
134
|
{dropdownItems.map((item, i) => {
|
|
136
135
|
const {index, link, text, ...elemProps} = item;
|
|
@@ -148,6 +147,6 @@ export const DropdownMenu = ({
|
|
|
148
147
|
);
|
|
149
148
|
})}
|
|
150
149
|
</MenuList>
|
|
151
|
-
</
|
|
150
|
+
</StyledDropdownMenu>
|
|
152
151
|
);
|
|
153
152
|
};
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {css, jsx} from '@emotion/core';
|
|
4
2
|
import {SystemIcon} from '@workday/canvas-kit-react/icon';
|
|
5
3
|
import {chevronLeftSmallIcon, chevronRightSmallIcon} from '@workday/canvas-system-icons-web';
|
|
6
4
|
import {colors} from '@workday/canvas-kit-react/tokens';
|
|
7
5
|
|
|
8
6
|
import {useRTL} from '../hooks';
|
|
7
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
9
8
|
|
|
10
9
|
export type ListItemProps = React.HTMLAttributes<HTMLLIElement>;
|
|
11
10
|
|
|
12
|
-
const breadcrumbItemStyles = css({
|
|
13
|
-
display: `flex`,
|
|
14
|
-
alignItems: `center`,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
11
|
export const BreadcrumbsListItem = ({children, ...props}: ListItemProps) => {
|
|
18
12
|
const {shouldUseRTL} = useRTL();
|
|
19
13
|
const icon = shouldUseRTL ? chevronLeftSmallIcon : chevronRightSmallIcon;
|
|
20
14
|
|
|
21
15
|
return (
|
|
22
|
-
<li
|
|
16
|
+
<Flex as="li" alignItems="center" {...props}>
|
|
23
17
|
{children}
|
|
24
18
|
<SystemIcon
|
|
25
19
|
icon={icon}
|
|
26
20
|
color={colors.licorice200}
|
|
27
21
|
colorHover={colors.licorice200}
|
|
22
|
+
size={20}
|
|
23
|
+
height={32}
|
|
24
|
+
width={32}
|
|
25
|
+
styles={{justifyContent: 'center', alignItems: 'center', display: 'inline-flex'}}
|
|
28
26
|
aria-hidden
|
|
29
27
|
/>
|
|
30
|
-
</
|
|
28
|
+
</Flex>
|
|
31
29
|
);
|
|
32
30
|
};
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const breadcrumbListStyles = css({
|
|
6
|
-
alignItems: 'center',
|
|
7
|
-
boxSizing: 'border-box',
|
|
8
|
-
display: 'inline-flex',
|
|
9
|
-
// minHeight set to keep the nav from bouncing when the icon button appears / disappears
|
|
10
|
-
minHeight: 40,
|
|
11
|
-
listStyle: 'none',
|
|
12
|
-
margin: 0,
|
|
13
|
-
padding: 0,
|
|
14
|
-
});
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
3
|
+
import {Flex} from '@workday/canvas-kit-react/layout';
|
|
15
4
|
|
|
16
5
|
export type BreadcrumbsListProps = React.HTMLAttributes<HTMLUListElement>;
|
|
17
6
|
|
|
18
|
-
export const BreadcrumbsList =
|
|
19
|
-
|
|
7
|
+
export const BreadcrumbsList = createComponent('ul')({
|
|
8
|
+
displayName: 'BreadcrumbsList',
|
|
9
|
+
Component: ({children, ...elemProps}: BreadcrumbsListProps, ref) => {
|
|
20
10
|
return (
|
|
21
|
-
<
|
|
11
|
+
<Flex
|
|
12
|
+
padding="zero"
|
|
13
|
+
margin="zero"
|
|
14
|
+
display="inline-flex"
|
|
15
|
+
alignItems="center"
|
|
16
|
+
minHeight={40}
|
|
17
|
+
listStyle="none"
|
|
18
|
+
style={{boxSizing: 'border-box'}}
|
|
19
|
+
as="ul"
|
|
20
|
+
role="list"
|
|
21
|
+
ref={ref}
|
|
22
|
+
{...elemProps}
|
|
23
|
+
>
|
|
22
24
|
{children}
|
|
23
|
-
</
|
|
25
|
+
</Flex>
|
|
24
26
|
);
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
+
},
|
|
28
|
+
});
|
package/breadcrumbs/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {colors, space} from '@workday/canvas-kit-react/tokens';
|
|
2
2
|
import {checkIcon} from '@workday/canvas-system-icons-web';
|
|
3
3
|
import {ColorInput} from '@workday/canvas-kit-react/color-picker';
|
|
4
|
-
import {
|
|
4
|
+
import {SecondaryButton} from '@workday/canvas-kit-react/button';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import FormField from '@workday/canvas-kit-react/form-field';
|
|
7
7
|
import styled from '@emotion/styled';
|
|
@@ -141,7 +141,7 @@ const ColorInputAndLabel = styled(FormField)({
|
|
|
141
141
|
margin: 0,
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
const CheckButton = styled(
|
|
144
|
+
const CheckButton = styled(SecondaryButton)({
|
|
145
145
|
alignSelf: 'flex-end',
|
|
146
146
|
});
|
|
147
147
|
|
|
@@ -207,7 +207,7 @@ const ColorPicker = ({
|
|
|
207
207
|
showCheck={value === validHexValue || value === customHexValue}
|
|
208
208
|
/>
|
|
209
209
|
</ColorInputAndLabel>
|
|
210
|
-
<CheckButton aria-label={submitLabel}
|
|
210
|
+
<CheckButton aria-label={submitLabel} icon={checkIcon} />
|
|
211
211
|
</ColorInputWrapper>
|
|
212
212
|
)}
|
|
213
213
|
</ColorPickerContainer>
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
}
|
|
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
|
+
};
|
|
5
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Breadcrumbs = void 0;
|
|
6
14
|
var Breadcrumbs_1 = require("./lib/Breadcrumbs");
|
|
7
|
-
exports
|
|
15
|
+
Object.defineProperty(exports, "Breadcrumbs", { enumerable: true, get: function () { return Breadcrumbs_1.Breadcrumbs; } });
|
|
8
16
|
exports.default = Breadcrumbs_1.Breadcrumbs;
|
|
9
|
-
|
|
17
|
+
__exportStar(require("./lib/Breadcrumbs"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
3
|
-
export interface DropdownButtonProps extends
|
|
3
|
+
export interface DropdownButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
/**
|
|
5
5
|
* The accessibility label for the button
|
|
6
6
|
*/
|
|
@@ -16,5 +16,5 @@ export interface DropdownButtonProps extends IconButtonProps {
|
|
|
16
16
|
*/
|
|
17
17
|
toggled: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const DropdownButton: import("@workday/canvas-kit-react/common").ElementComponent<
|
|
19
|
+
export declare const DropdownButton: import("@workday/canvas-kit-react/common").ElementComponent<"button", DropdownButtonProps>;
|
|
20
20
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAI9D,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IAClF;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,cAAc,4FA2BzB,CAAC"}
|
|
@@ -21,20 +21,49 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
|
|
26
|
-
var
|
|
28
|
+
exports.DropdownButton = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
27
30
|
var button_1 = require("@workday/canvas-kit-react/button");
|
|
28
31
|
var canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
|
|
29
|
-
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
30
32
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
31
|
-
|
|
33
|
+
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
34
|
+
exports.DropdownButton = common_1.createComponent('button')({
|
|
32
35
|
displayName: 'DropdownButton',
|
|
33
36
|
Component: function (_a, ref, Element) {
|
|
34
|
-
var _b = _a.buttonIcon, buttonIcon = _b === void 0 ? canvas_system_icons_web_1.relatedActionsIcon : _b, toggled = _a.toggled,
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return (core_1.jsx(Element, __assign({ ref: ref, type: "button", css: customStyles, variant: variant, icon: buttonIcon, color: tokens_1.colors.licorice200, toggled: toggled, "aria-pressed": undefined, "aria-expanded": toggled, "aria-haspopup": true, "aria-controls": "menu" }, elemProps)));
|
|
37
|
+
var _b = _a.buttonIcon, buttonIcon = _b === void 0 ? canvas_system_icons_web_1.relatedActionsIcon : _b, toggled = _a.toggled, elemProps = __rest(_a, ["buttonIcon", "toggled"]);
|
|
38
|
+
var theme = common_1.useTheme();
|
|
39
|
+
return (react_1.default.createElement(button_1.BaseButton, __assign({ as: Element, ref: ref, "aria-pressed": undefined, "aria-expanded": toggled, "aria-haspopup": true, "aria-controls": "menu", size: "small", height: tokens_1.space.l, width: tokens_1.space.l, padding: tokens_1.space.zero, colors: getDropdownColors(toggled, theme) }, elemProps),
|
|
40
|
+
react_1.default.createElement(button_1.BaseButton.Icon, { icon: buttonIcon })));
|
|
39
41
|
},
|
|
40
42
|
});
|
|
43
|
+
var getDropdownColors = function (toggled, theme) {
|
|
44
|
+
var themePrimary = theme.canvas.palette.primary;
|
|
45
|
+
return {
|
|
46
|
+
default: {
|
|
47
|
+
icon: toggled ? themePrimary.main : tokens_1.colors.blackPepper400,
|
|
48
|
+
label: themePrimary.main,
|
|
49
|
+
},
|
|
50
|
+
hover: {
|
|
51
|
+
background: tokens_1.colors.soap200,
|
|
52
|
+
icon: toggled ? themePrimary.dark : tokens_1.colors.blackPepper500,
|
|
53
|
+
label: themePrimary.dark,
|
|
54
|
+
},
|
|
55
|
+
active: {
|
|
56
|
+
background: tokens_1.colors.soap300,
|
|
57
|
+
icon: toggled ? themePrimary.dark : tokens_1.colors.blackPepper500,
|
|
58
|
+
label: themePrimary.dark,
|
|
59
|
+
},
|
|
60
|
+
focus: {
|
|
61
|
+
icon: toggled ? themePrimary.main : tokens_1.colors.blackPepper500,
|
|
62
|
+
label: themePrimary.main,
|
|
63
|
+
},
|
|
64
|
+
disabled: {
|
|
65
|
+
icon: toggled ? themePrimary.main : tokens_1.colors.blackPepper400,
|
|
66
|
+
label: themePrimary.main,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAKpC,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,kBAAkB,EAAE,UAAU,CAAC;IAC/B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,aAAa,EAAE,UAAU,EAAE,CAAC;IAC5B;;OAEG;IACH,qBAAqB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IACxE;;OAEG;IACH,qBAAqB,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC1D;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AAgCD,eAAO,MAAM,YAAY,4JAStB,iBAAiB,gBA4DnB,CAAC"}
|
|
@@ -21,13 +21,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
24
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
|
|
28
|
+
exports.DropdownMenu = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
26
30
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
27
31
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
28
32
|
// local components
|
|
29
33
|
var MenuItemLink_1 = require("./MenuItemLink");
|
|
30
|
-
var
|
|
34
|
+
var layout_1 = require("@workday/canvas-kit-react/layout");
|
|
35
|
+
var StyledDropdownMenu = common_1.styled(layout_1.Box)(__assign(__assign(__assign({}, tokens_1.type.levels.subtext.large), tokens_1.depth[3]), { backgroundColor: tokens_1.commonColors.background, border: "1px solid " + tokens_1.colors.soap500, borderRadius: tokens_1.borderRadius.m, boxSizing: 'border-box', display: 'inline-block', marginTop: tokens_1.space.xxxs, maxHeight: 200, outline: 'none', overflowY: 'auto', position: 'relative', width: 'max-content' }));
|
|
31
36
|
var StyledMenuList = common_1.styled('ul')({
|
|
32
37
|
boxSizing: 'border-box',
|
|
33
38
|
listStyle: 'none',
|
|
@@ -38,9 +43,9 @@ var StyledMenuList = common_1.styled('ul')({
|
|
|
38
43
|
wordWrap: 'break-word',
|
|
39
44
|
});
|
|
40
45
|
var MenuList = function (elemProps) {
|
|
41
|
-
return
|
|
46
|
+
return react_1.default.createElement(StyledMenuList, __assign({ role: "menu" }, elemProps));
|
|
42
47
|
};
|
|
43
|
-
|
|
48
|
+
var DropdownMenu = function (_a) {
|
|
44
49
|
var activeDropdownItemRef = _a.activeDropdownItemRef, activeDropdownItem = _a.activeDropdownItem, _b = _a.dropdownItems, dropdownItems = _b === void 0 ? [] : _b, resetFocus = _a.resetFocus, setActiveDropdownItem = _a.setActiveDropdownItem, toggleActiveItemDown = _a.toggleActiveItemDown, toggleActiveItemUp = _a.toggleActiveItemUp, elemProps = __rest(_a, ["activeDropdownItemRef", "activeDropdownItem", "dropdownItems", "resetFocus", "setActiveDropdownItem", "toggleActiveItemDown", "toggleActiveItemUp"]);
|
|
45
50
|
var handleItemKeyUp = function (event) {
|
|
46
51
|
switch (event.key) {
|
|
@@ -78,11 +83,12 @@ exports.DropdownMenu = function (_a) {
|
|
|
78
83
|
break;
|
|
79
84
|
}
|
|
80
85
|
};
|
|
81
|
-
return (
|
|
82
|
-
|
|
86
|
+
return (react_1.default.createElement(StyledDropdownMenu, null,
|
|
87
|
+
react_1.default.createElement(MenuList, __assign({}, elemProps), dropdownItems.map(function (item, i) {
|
|
83
88
|
var index = item.index, link = item.link, text = item.text, elemProps = __rest(item, ["index", "link", "text"]);
|
|
84
89
|
var isFocused = index === activeDropdownItem.index;
|
|
85
|
-
return (
|
|
86
|
-
|
|
90
|
+
return (react_1.default.createElement("li", { onKeyUp: handleItemKeyUp, onKeyDown: function (e) { return handleItemKeyDown(e, item); }, key: i },
|
|
91
|
+
react_1.default.createElement(MenuItemLink_1.DropdownMenuItemLink, __assign({ ref: isFocused ? activeDropdownItemRef : null, href: link }, elemProps), text)));
|
|
87
92
|
}))));
|
|
88
93
|
};
|
|
94
|
+
exports.DropdownMenu = DropdownMenu;
|
|
@@ -10,6 +10,25 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
13
32
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
33
|
var t = {};
|
|
15
34
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -21,14 +40,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
40
|
}
|
|
22
41
|
return t;
|
|
23
42
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
-
if (mod && mod.__esModule) return mod;
|
|
26
|
-
var result = {};
|
|
27
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
28
|
-
result["default"] = mod;
|
|
29
|
-
return result;
|
|
30
|
-
};
|
|
31
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.DropdownMenuItemLink = void 0;
|
|
32
45
|
var react_1 = __importStar(require("react"));
|
|
33
46
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
34
47
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
1
|
import { usePopupPopper } from '@workday/canvas-kit-react/popup';
|
|
3
2
|
import { DropdownButtonProps } from './Button';
|
|
4
3
|
import { DropdownMenuProps } from './Menu';
|
|
@@ -9,6 +8,6 @@ interface UseDropdown {
|
|
|
9
8
|
dropdownMenuProps: DropdownMenuProps;
|
|
10
9
|
popperProps: ReturnType<typeof usePopupPopper>;
|
|
11
10
|
}
|
|
12
|
-
export declare const useDropdown: (activeDropdownItemRef:
|
|
11
|
+
export declare const useDropdown: (activeDropdownItemRef: React.RefObject<HTMLAnchorElement>, items: Breadcrumb[], buttonId?: string | undefined) => UseDropdown;
|
|
13
12
|
export {};
|
|
14
13
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,cAAc,EACf,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAEpC,eAAO,MAAM,yBAAyB,sFAQrC,CAAC;AASF,UAAU,WAAW;IACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;IAC7D,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAChD;AAED,eAAO,MAAM,WAAW,0BACC,MAAM,SAAS,CAAC,iBAAiB,CAAC,SAClD,UAAU,EAAE,oCAElB,WAkEF,CAAC"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useDropdown = exports.useFocusActiveItemElement = void 0;
|
|
3
4
|
var react_1 = require("react");
|
|
4
5
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
5
6
|
var popup_1 = require("@workday/canvas-kit-react/popup");
|
|
6
|
-
|
|
7
|
+
var useFocusActiveItemElement = function (activeDropdownItemRef) {
|
|
7
8
|
react_1.useLayoutEffect(function () {
|
|
8
9
|
if (activeDropdownItemRef.current) {
|
|
9
10
|
return activeDropdownItemRef.current.focus();
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
};
|
|
14
|
+
exports.useFocusActiveItemElement = useFocusActiveItemElement;
|
|
13
15
|
var initialActiveItem = {
|
|
14
16
|
index: 0,
|
|
15
17
|
link: '',
|
|
16
18
|
text: '',
|
|
17
19
|
width: 0,
|
|
18
20
|
};
|
|
19
|
-
|
|
21
|
+
var useDropdown = function (activeDropdownItemRef, items, buttonId) {
|
|
20
22
|
// state
|
|
21
23
|
var _a = react_1.useState(initialActiveItem), activeDropdownItem = _a[0], setActiveDropdownItem = _a[1];
|
|
22
24
|
// behaviors
|
|
@@ -72,3 +74,4 @@ exports.useDropdown = function (activeDropdownItemRef, items, buttonId) {
|
|
|
72
74
|
var popperProps = popup_1.usePopupPopper(model);
|
|
73
75
|
return { dropdownButtonProps: dropdownButtonProps, dropdownMenuProps: dropdownMenuProps, popperProps: popperProps };
|
|
74
76
|
};
|
|
77
|
+
exports.useDropdown = useDropdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAKpC,OAAO,EAAiB,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAG7D,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAC5E,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/Dropdown/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAKpC,OAAO,EAAiB,mBAAmB,EAAC,MAAM,UAAU,CAAC;AAG7D,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC;IAC5E,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,2CAA+C,aAAa,gBAuBhF,CAAC"}
|
|
@@ -14,13 +14,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Dropdown = void 0;
|
|
17
18
|
var react_1 = __importDefault(require("react"));
|
|
18
19
|
var popup_1 = require("@workday/canvas-kit-react/popup");
|
|
19
20
|
var hooks_1 = require("../hooks");
|
|
20
21
|
var hooks_2 = require("./hooks");
|
|
21
22
|
var Button_1 = require("./Button");
|
|
22
23
|
var Menu_1 = require("./Menu");
|
|
23
|
-
|
|
24
|
+
var Dropdown = function (_a) {
|
|
24
25
|
var buttonAriaLabel = _a.buttonAriaLabel, buttonIcon = _a.buttonIcon, _b = _a.items, items = _b === void 0 ? [] : _b;
|
|
25
26
|
// refs
|
|
26
27
|
var activeDropdownItemRef = react_1.default.useRef(null);
|
|
@@ -33,3 +34,4 @@ exports.Dropdown = function (_a) {
|
|
|
33
34
|
react_1.default.createElement(popup_1.Popper, __assign({ placement: placement }, popperProps),
|
|
34
35
|
react_1.default.createElement(Menu_1.DropdownMenu, __assign({}, dropdownMenuProps)))));
|
|
35
36
|
};
|
|
37
|
+
exports.Dropdown = Dropdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAO9C,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AASvD,MAAM,WAAW,oBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAC5C,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC;IACzC;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAO9C,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AASvD,MAAM,WAAW,oBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAC5C,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC;IACzC;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,kEAMzB,oBAAoB,gBA4BtB,CAAC"}
|