@workday/canvas-kit-preview-react 7.0.0-alpha.129-next.3 → 7.0.0-alpha.256-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/dist/commonjs/form-field/lib/FormField.d.ts +2 -11
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.js +2 -3
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +3 -9
- package/dist/commonjs/index.d.ts +2 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/menu/lib/Menu.d.ts +37 -13
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +42 -22
- package/dist/commonjs/menu/lib/MenuItem.d.ts +35 -13
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +24 -10
- package/dist/commonjs/pill/lib/Pill.d.ts +0 -10
- package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/index.d.ts +3 -0
- package/dist/commonjs/segmented-control/index.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/index.js +14 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +1004 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +22 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +103 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +130 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +66 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
- package/dist/commonjs/{breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js → segmented-control/lib/SegmentedControlList.js} +21 -28
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +60 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +23 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1052 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +74 -0
- package/dist/commonjs/select/index.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/index.d.ts +2 -0
- package/dist/commonjs/status-indicator/index.d.ts.map +1 -0
- package/dist/commonjs/{breadcrumbs → status-indicator}/index.js +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +42 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +55 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +73 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +98 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
- package/dist/commonjs/{breadcrumbs/lib/Breadcrumbs/Nav.js → status-indicator/lib/StatusIndicatorLabel.js} +10 -6
- package/dist/commonjs/status-indicator/lib/hooks/index.d.ts +2 -0
- package/dist/commonjs/status-indicator/lib/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/hooks/index.js +13 -0
- package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
- package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.js +34 -0
- package/dist/commonjs/text-area/lib/TextArea.d.ts +2 -11
- package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.js +15 -7
- package/dist/commonjs/text-input/lib/TextInput.d.ts +2 -11
- package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.d.ts +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +14 -7
- package/dist/es6/form-field/lib/FormField.d.ts +2 -11
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.js +4 -5
- package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.js +5 -11
- package/dist/es6/index.d.ts +2 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +2 -2
- package/dist/es6/menu/lib/Menu.d.ts +37 -13
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +41 -21
- package/dist/es6/menu/lib/MenuItem.d.ts +35 -13
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.js +23 -9
- package/dist/es6/pill/lib/Pill.d.ts +0 -10
- package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
- package/dist/es6/segmented-control/index.d.ts +3 -0
- package/dist/es6/segmented-control/index.d.ts.map +1 -0
- package/dist/es6/segmented-control/index.js +2 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +1004 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.js +16 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +103 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +108 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +66 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +44 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +60 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +20 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1052 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +68 -0
- package/dist/es6/select/index.d.ts.map +1 -1
- package/dist/es6/status-indicator/index.d.ts +2 -0
- package/dist/es6/status-indicator/index.d.ts.map +1 -0
- package/dist/es6/status-indicator/index.js +1 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +42 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.js +49 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +73 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +92 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
- package/dist/es6/{breadcrumbs/lib/Breadcrumbs/Nav.js → status-indicator/lib/StatusIndicatorLabel.js} +9 -4
- package/dist/es6/status-indicator/lib/hooks/index.d.ts +2 -0
- package/dist/es6/status-indicator/lib/hooks/index.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/hooks/index.js +1 -0
- package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
- package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.js +31 -0
- package/dist/es6/text-area/lib/TextArea.d.ts +2 -11
- package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextAreaField.d.ts +1 -1
- package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextAreaField.js +15 -7
- package/dist/es6/text-input/lib/TextInput.d.ts +2 -11
- package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInputField.d.ts +1 -1
- package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInputField.js +14 -7
- package/form-field/lib/FormFieldHint.tsx +23 -30
- package/form-field/lib/FormFieldLabel.tsx +14 -24
- package/index.ts +2 -3
- package/menu/lib/Menu.tsx +73 -26
- package/menu/lib/MenuItem.tsx +51 -16
- package/package.json +6 -5
- package/segmented-control/LICENSE +126 -0
- package/segmented-control/README.md +6 -0
- package/segmented-control/index.ts +2 -0
- package/segmented-control/lib/SegmentedControl.tsx +21 -0
- package/segmented-control/lib/SegmentedControlItem.tsx +175 -0
- package/segmented-control/lib/SegmentedControlList.tsx +49 -0
- package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +37 -0
- package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +75 -0
- package/segmented-control/package.json +6 -0
- package/select/index.ts +0 -1
- package/{breadcrumbs → status-indicator}/LICENSE +1 -1
- package/status-indicator/README.md +12 -0
- package/status-indicator/index.ts +1 -0
- package/status-indicator/lib/StatusIndicator.tsx +49 -0
- package/status-indicator/lib/StatusIndicatorIcon.tsx +88 -0
- package/status-indicator/lib/StatusIndicatorLabel.tsx +28 -0
- package/status-indicator/lib/hooks/index.ts +1 -0
- package/status-indicator/lib/hooks/useStatusIndicatorModel.tsx +29 -0
- package/status-indicator/package.json +6 -0
- package/text-area/lib/TextAreaField.tsx +1 -1
- package/text-input/lib/TextInputField.tsx +1 -1
- package/breadcrumbs/README.md +0 -7
- package/breadcrumbs/index.ts +0 -1
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +0 -85
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +0 -152
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.tsx +0 -63
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts +0 -109
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/index.tsx +0 -38
- package/breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx +0 -66
- package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +0 -64
- package/breadcrumbs/lib/Breadcrumbs/List/Link.tsx +0 -88
- package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +0 -30
- package/breadcrumbs/lib/Breadcrumbs/List/hooks.ts +0 -114
- package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +0 -26
- package/breadcrumbs/lib/Breadcrumbs/List/styles.ts +0 -12
- package/breadcrumbs/lib/Breadcrumbs/Nav.tsx +0 -14
- package/breadcrumbs/lib/Breadcrumbs/hooks.ts +0 -13
- package/breadcrumbs/lib/Breadcrumbs/index.tsx +0 -15
- package/breadcrumbs/lib/Breadcrumbs/types.ts +0 -7
- package/breadcrumbs/package.json +0 -6
- package/dist/commonjs/breadcrumbs/index.d.ts +0 -2
- package/dist/commonjs/breadcrumbs/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -69
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -94
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -77
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -37
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -78
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -49
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -66
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -43
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -116
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -26
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -16
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -12
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.js +0 -17
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.js +0 -2
- package/dist/es6/breadcrumbs/index.d.ts +0 -2
- package/dist/es6/breadcrumbs/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/index.js +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -63
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -87
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -51
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -72
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -30
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -55
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -42
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -59
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -36
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -91
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -20
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -12
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -8
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.js +0 -14
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.js +0 -1
|
@@ -28,16 +28,7 @@ export declare const FormField: import("@workday/canvas-kit-react/common").Eleme
|
|
|
28
28
|
};
|
|
29
29
|
events: {};
|
|
30
30
|
}> & {
|
|
31
|
-
|
|
32
|
-
state: {
|
|
33
|
-
id: string;
|
|
34
|
-
hasError: boolean;
|
|
35
|
-
isRequired: boolean;
|
|
36
|
-
};
|
|
37
|
-
events: {};
|
|
38
|
-
}>;
|
|
39
|
-
} & {
|
|
40
|
-
Input: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").BorderShorthandStyleProps & import("@workday/canvas-kit-react/layout").BorderColorStyleProps & import("@workday/canvas-kit-react/layout").BorderRadiusStyleProps & import("@workday/canvas-kit-react/layout").BorderLineStyleProps & import("@workday/canvas-kit-react/layout").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").BorderLogicalStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout/lib/utils/other").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStandardProps & import("@workday/canvas-kit-react/layout").PositionLogicalProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceStandardProps & import("@workday/canvas-kit-react/layout/lib/utils/space").SpaceLogicalProps, {
|
|
31
|
+
Input: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").CommonStyleProps, {
|
|
41
32
|
state: {
|
|
42
33
|
id: string;
|
|
43
34
|
hasError: boolean;
|
|
@@ -53,7 +44,7 @@ export declare const FormField: import("@workday/canvas-kit-react/common").Eleme
|
|
|
53
44
|
};
|
|
54
45
|
events: {};
|
|
55
46
|
}>;
|
|
56
|
-
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("@workday/canvas-kit-react/
|
|
47
|
+
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", Pick<import("@workday/canvas-kit-react/text").TypeLevelProps, "top" | "left" | "right" | "bottom" | "fill" | "children" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY" | "variant">, {
|
|
57
48
|
state: {
|
|
58
49
|
id: string;
|
|
59
50
|
hasError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAOrE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IACxF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAOrE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IACxF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", import("@workday/canvas-kit-react/
|
|
1
|
+
export declare const FormFieldHint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", Pick<import("@workday/canvas-kit-react/text").TypeLevelProps, "top" | "left" | "right" | "bottom" | "fill" | "children" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY" | "variant">, {
|
|
2
2
|
state: {
|
|
3
3
|
id: string;
|
|
4
4
|
hasError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldHint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldHint.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormFieldHint.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldHint.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa;;;;;;;EAyBzB,CAAC"}
|
|
@@ -29,9 +29,8 @@ exports.FormFieldHint = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
31
31
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
32
|
-
var layout_1 = require("@workday/canvas-kit-react/layout");
|
|
33
32
|
var hooks_1 = require("./hooks");
|
|
34
|
-
var
|
|
33
|
+
var text_1 = require("@workday/canvas-kit-react/text");
|
|
35
34
|
exports.FormFieldHint = common_1.createSubcomponent('p')({
|
|
36
35
|
displayName: 'FormField.Hint',
|
|
37
36
|
modelHook: hooks_1.useFormFieldModel,
|
|
@@ -43,5 +42,5 @@ exports.FormFieldHint = common_1.createSubcomponent('p')({
|
|
|
43
42
|
// If there is no hint text just skip rendering
|
|
44
43
|
return null;
|
|
45
44
|
}
|
|
46
|
-
return (react_1.default.createElement(
|
|
45
|
+
return (react_1.default.createElement(text_1.Subtext, __assign({ as: Element, size: "medium", color: model.state.hasError ? theme.canvas.palette.error.main : undefined, marginY: tokens_1.space.xxs }, elemProps), children));
|
|
47
46
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const FormFieldInput: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").
|
|
1
|
+
export declare const FormFieldInput: import("@workday/canvas-kit-react/common").ElementComponentM<"input", import("@workday/canvas-kit-react/layout").CommonStyleProps, {
|
|
2
2
|
state: {
|
|
3
3
|
id: string;
|
|
4
4
|
hasError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,YAAY,EAAW,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAItE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAC9F;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;;;;;EAyBzB,CAAC"}
|
|
@@ -29,14 +29,8 @@ exports.FormFieldLabel = void 0;
|
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
31
31
|
var layout_1 = require("@workday/canvas-kit-react/layout");
|
|
32
|
-
var
|
|
32
|
+
var text_1 = require("@workday/canvas-kit-react/text");
|
|
33
33
|
var hooks_1 = require("./hooks");
|
|
34
|
-
var StyledFormFieldLabel = common_1.styled('span')(__assign(__assign({}, tokens_1.type.levels.subtext.large), { fontWeight: tokens_1.type.properties.fontWeights.medium }));
|
|
35
|
-
var StyledAsterisk = common_1.styled(layout_1.Box)({
|
|
36
|
-
fontSize: tokens_1.type.properties.fontSizes[20],
|
|
37
|
-
fontWeight: tokens_1.type.properties.fontWeights.regular,
|
|
38
|
-
textDecoration: 'unset',
|
|
39
|
-
});
|
|
40
34
|
exports.FormFieldLabel = common_1.createSubcomponent('label')({
|
|
41
35
|
displayName: 'FormField.Label',
|
|
42
36
|
modelHook: hooks_1.useFormFieldModel,
|
|
@@ -45,6 +39,6 @@ exports.FormFieldLabel = common_1.createSubcomponent('label')({
|
|
|
45
39
|
var _b = _a.spacing, spacing = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["spacing", "children"]);
|
|
46
40
|
var theme = common_1.useTheme();
|
|
47
41
|
return (react_1.default.createElement(layout_1.HStack, __assign({ as: Element, spacing: spacing, minWidth: "180px" }, elemProps),
|
|
48
|
-
react_1.default.createElement(
|
|
49
|
-
model.state.isRequired && (react_1.default.createElement(
|
|
42
|
+
react_1.default.createElement(text_1.LabelText, { as: "span", fontWeight: "medium" }, children),
|
|
43
|
+
model.state.isRequired && (react_1.default.createElement(text_1.Text, { fontSize: 20, fontWeight: "regular", textDecoration: "unset", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
|
|
50
44
|
});
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from './breadcrumbs';
|
|
2
1
|
export * from './color-picker';
|
|
3
2
|
export * from './form-field';
|
|
4
3
|
export * from './menu';
|
|
5
4
|
export * from './pill';
|
|
5
|
+
export * from './segmented-control';
|
|
6
6
|
export * from './select';
|
|
7
7
|
export * from './side-panel';
|
|
8
|
+
export * from './status-indicator';
|
|
8
9
|
export * from './text-area';
|
|
9
10
|
export * from './text-input';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -10,13 +10,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./breadcrumbs"), exports);
|
|
14
13
|
__exportStar(require("./color-picker"), exports);
|
|
15
14
|
__exportStar(require("./form-field"), exports);
|
|
16
15
|
__exportStar(require("./menu"), exports);
|
|
17
16
|
__exportStar(require("./pill"), exports);
|
|
17
|
+
__exportStar(require("./segmented-control"), exports);
|
|
18
18
|
__exportStar(require("./select"), exports);
|
|
19
19
|
__exportStar(require("./side-panel"), exports);
|
|
20
|
+
__exportStar(require("./status-indicator"), exports);
|
|
20
21
|
__exportStar(require("./text-area"), exports);
|
|
21
22
|
__exportStar(require("./text-input"), exports);
|
|
22
|
-
/// <reference types="@types/node" />
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DeprecatedMenuItemProps } from './MenuItem';
|
|
3
3
|
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* ### Deprecated Menu
|
|
6
|
+
*
|
|
7
|
+
* As of Canvas Kit v8, Menu is being soft-deprecated.
|
|
8
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
9
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
10
|
+
* for more information.
|
|
11
|
+
*/
|
|
12
|
+
export interface DeprecatedMenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLUListElement> {
|
|
5
13
|
/**
|
|
6
|
-
* The
|
|
14
|
+
* The DeprecatedMenuItem children of the DeprecatedMenu (must be at least one). Also accepts other components which share the same interface as `DeprecatedMenuItem`.
|
|
7
15
|
*/
|
|
8
|
-
children?: React.ReactElement<
|
|
16
|
+
children?: React.ReactElement<DeprecatedMenuItemProps> | React.ReactElement<DeprecatedMenuItemProps>[];
|
|
9
17
|
/**
|
|
10
|
-
* If true, set the
|
|
18
|
+
* If true, set the DeprecatedMenu to the open state. Useful for showing and hiding the DeprecatedMenu from a parent component such as a menu button.
|
|
11
19
|
* @default true
|
|
12
20
|
*/
|
|
13
21
|
isOpen?: boolean;
|
|
14
22
|
/**
|
|
15
|
-
* The width of the
|
|
23
|
+
* The width of the DeprecatedMenu. If no value is provided, the DeprecatedMenu will collapse around its content.
|
|
16
24
|
*/
|
|
17
25
|
width?: number | string;
|
|
18
26
|
/**
|
|
@@ -20,7 +28,7 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
|
|
|
20
28
|
*/
|
|
21
29
|
onSelect?: () => void;
|
|
22
30
|
/**
|
|
23
|
-
* The function called when the
|
|
31
|
+
* The function called when the DeprecatedMenu should close. This is called after a menu item is selected or if the escape shortcut key is used. This will not fire if the menu item sets `shouldClose` to false.
|
|
24
32
|
*/
|
|
25
33
|
onClose?: () => void;
|
|
26
34
|
/**
|
|
@@ -28,24 +36,40 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
|
|
|
28
36
|
*/
|
|
29
37
|
initialSelectedItem?: number;
|
|
30
38
|
/**
|
|
31
|
-
* The unique id of the
|
|
39
|
+
* The unique id of the DeprecatedMenu used for ARIA and HTML `id` attributes.
|
|
32
40
|
*/
|
|
33
41
|
id?: string;
|
|
34
42
|
/**
|
|
35
|
-
* The HTML `id` of the element that labels the
|
|
43
|
+
* The HTML `id` of the element that labels the DeprecatedMenu. Often used with menu buttons.
|
|
36
44
|
*/
|
|
37
45
|
'aria-labelledby'?: string;
|
|
38
46
|
}
|
|
39
|
-
|
|
47
|
+
/**
|
|
48
|
+
* ### Deprecated Menu State
|
|
49
|
+
*
|
|
50
|
+
* As of Canvas Kit v8, Menu is being soft-deprecated.
|
|
51
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
52
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
53
|
+
* for more information.
|
|
54
|
+
*/
|
|
55
|
+
export interface DeprecatedMenuState {
|
|
40
56
|
selectedItemIndex: number;
|
|
41
57
|
}
|
|
42
|
-
|
|
58
|
+
/**
|
|
59
|
+
* ### Deprecated Menu
|
|
60
|
+
*
|
|
61
|
+
* As of Canvas Kit v8, this component is being soft-deprecated.
|
|
62
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
63
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
64
|
+
* for more information.
|
|
65
|
+
*/
|
|
66
|
+
export declare class DeprecatedMenu extends React.Component<DeprecatedMenuProps, DeprecatedMenuState> {
|
|
43
67
|
private id;
|
|
44
68
|
private animateId;
|
|
45
69
|
private menuRef;
|
|
46
70
|
private firstCharacters;
|
|
47
|
-
constructor(props:
|
|
48
|
-
componentDidUpdate(prevProps:
|
|
71
|
+
constructor(props: DeprecatedMenuProps);
|
|
72
|
+
componentDidUpdate(prevProps: DeprecatedMenuProps): void;
|
|
49
73
|
componentDidMount(): void;
|
|
50
74
|
componentWillUnmount(): void;
|
|
51
75
|
render(): JSX.Element;
|
|
@@ -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,
|
|
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,uBAAuB,EAAC,MAAM,YAAY,CAAC;AAGnD,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG;;;;;;;GAOG;AACH,MAAM,WAAW,mBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EACL,KAAK,CAAC,YAAY,CAAC,uBAAuB,CAAC,GAC3C,KAAK,CAAC,YAAY,CAAC,uBAAuB,CAAC,EAAE,CAAC;IAClD;;;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;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,KAAK,CAAC,SAAS,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAC3F,OAAO,CAAC,EAAE,CAAsB;IAChC,OAAO,CAAC,SAAS,CAAU;IAE3B,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,eAAe,CAAY;gBAEvB,KAAK,EAAE,mBAAmB;IAetC,kBAAkB,CAAC,SAAS,EAAE,mBAAmB;IAejD,iBAAiB;IAYjB,oBAAoB;IAIb,MAAM;IAyDN,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,MAAM,CAQjE;IAEK,sBAAsB,UAAW,MAAM,GAAG,SAAS,KAAG,IAAI,CAE/D;IAEF,OAAO,CAAC,uBAAuB,CA+E7B;IAEF,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CAkCxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
|
|
@@ -57,7 +57,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
57
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.
|
|
60
|
+
exports.DeprecatedMenu = void 0;
|
|
61
61
|
var React = __importStar(require("react"));
|
|
62
62
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
63
63
|
var card_1 = require("@workday/canvas-kit-react/card");
|
|
@@ -66,9 +66,17 @@ var common_1 = require("@workday/canvas-kit-react/common");
|
|
|
66
66
|
var List = styled_1.default('ul')(__assign({ background: tokens_1.commonColors.background, borderRadius: tokens_1.borderRadius.m, padding: 0, margin: tokens_1.space.xxs + " 0", '&:focus': {
|
|
67
67
|
outline: 'none',
|
|
68
68
|
} }, common_1.hideMouseFocus));
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
/**
|
|
70
|
+
* ### Deprecated Menu
|
|
71
|
+
*
|
|
72
|
+
* As of Canvas Kit v8, this component is being soft-deprecated.
|
|
73
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
74
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
75
|
+
* for more information.
|
|
76
|
+
*/
|
|
77
|
+
var DeprecatedMenu = /** @class */ (function (_super) {
|
|
78
|
+
__extends(DeprecatedMenu, _super);
|
|
79
|
+
function DeprecatedMenu(props) {
|
|
72
80
|
var _this = _super.call(this, props) || this;
|
|
73
81
|
_this.id = common_1.generateUniqueId();
|
|
74
82
|
_this.getNormalizedItemIndex = function (index) {
|
|
@@ -90,9 +98,13 @@ var Menu = /** @class */ (function (_super) {
|
|
|
90
98
|
var children = React.Children.toArray(_this.props.children);
|
|
91
99
|
var nextSelectedIndex = 0;
|
|
92
100
|
var isShortcut = false;
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
|
|
101
|
+
var interactiveItems = children.filter(function (child) {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
return !((_b = (_a = child) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.isHeader);
|
|
104
|
+
});
|
|
105
|
+
var interactiveItemCount = interactiveItems.length;
|
|
106
|
+
var firstIndex = 0;
|
|
107
|
+
var lastIndex = interactiveItemCount - 1;
|
|
96
108
|
if (event.key.length === 1 && event.key.match(/\S/)) {
|
|
97
109
|
var start = _this.state.selectedItemIndex + 1;
|
|
98
110
|
var searchIndex = void 0;
|
|
@@ -112,17 +124,15 @@ var Menu = /** @class */ (function (_super) {
|
|
|
112
124
|
switch (event.key) {
|
|
113
125
|
case 'ArrowUp':
|
|
114
126
|
case 'ArrowDown':
|
|
115
|
-
case 'Down': // IE/Edge specific value
|
|
116
|
-
case 'Up': // IE/Edge specific value
|
|
117
127
|
var direction = event.key === 'ArrowUp' ? -1 : 1;
|
|
118
128
|
isShortcut = true;
|
|
119
129
|
var nextIndex = _this.state.selectedItemIndex + direction;
|
|
120
130
|
nextSelectedIndex =
|
|
121
|
-
nextIndex < 0 ?
|
|
131
|
+
nextIndex < 0 ? lastIndex : nextIndex >= interactiveItemCount ? firstIndex : nextIndex;
|
|
122
132
|
break;
|
|
123
133
|
case 'Home':
|
|
124
134
|
case 'End':
|
|
125
|
-
var skipTo = event.key === 'Home' ?
|
|
135
|
+
var skipTo = event.key === 'Home' ? firstIndex : lastIndex;
|
|
126
136
|
isShortcut = true;
|
|
127
137
|
nextSelectedIndex = skipTo;
|
|
128
138
|
break;
|
|
@@ -142,7 +152,7 @@ var Menu = /** @class */ (function (_super) {
|
|
|
142
152
|
case ' ':
|
|
143
153
|
case 'Enter':
|
|
144
154
|
nextSelectedIndex = _this.state.selectedItemIndex;
|
|
145
|
-
var child =
|
|
155
|
+
var child = interactiveItems[_this.state.selectedItemIndex];
|
|
146
156
|
_this.handleClick(event, child.props);
|
|
147
157
|
isShortcut = true;
|
|
148
158
|
break;
|
|
@@ -158,7 +168,7 @@ var Menu = /** @class */ (function (_super) {
|
|
|
158
168
|
_this.handleClick = function (event, menuItemProps) {
|
|
159
169
|
/* istanbul ignore next line for coverage */
|
|
160
170
|
if (menuItemProps.isDisabled) {
|
|
161
|
-
// You should only hit this point if you are using a custom
|
|
171
|
+
// You should only hit this point if you are using a custom DeprecatedMenuItem implementation.
|
|
162
172
|
return;
|
|
163
173
|
}
|
|
164
174
|
if (menuItemProps.onClick) {
|
|
@@ -211,6 +221,10 @@ var Menu = /** @class */ (function (_super) {
|
|
|
211
221
|
return character;
|
|
212
222
|
};
|
|
213
223
|
var firstCharacters = React.Children.map(_this.props.children, function (child) {
|
|
224
|
+
var _a, _b;
|
|
225
|
+
if ((_b = (_a = child) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.isHeader) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
214
228
|
return getFirstCharacter(child);
|
|
215
229
|
});
|
|
216
230
|
_this.firstCharacters = firstCharacters;
|
|
@@ -241,7 +255,7 @@ var Menu = /** @class */ (function (_super) {
|
|
|
241
255
|
};
|
|
242
256
|
return _this;
|
|
243
257
|
}
|
|
244
|
-
|
|
258
|
+
DeprecatedMenu.prototype.componentDidUpdate = function (prevProps) {
|
|
245
259
|
var _this = this;
|
|
246
260
|
if (this.props.children !== prevProps.children) {
|
|
247
261
|
this.setFirstCharacters();
|
|
@@ -256,33 +270,39 @@ var Menu = /** @class */ (function (_super) {
|
|
|
256
270
|
}
|
|
257
271
|
});
|
|
258
272
|
};
|
|
259
|
-
|
|
273
|
+
DeprecatedMenu.prototype.componentDidMount = function () {
|
|
274
|
+
console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
|
|
260
275
|
this.setFirstCharacters();
|
|
261
276
|
this.setInitialSelectedItem();
|
|
262
277
|
};
|
|
263
|
-
|
|
278
|
+
DeprecatedMenu.prototype.componentWillUnmount = function () {
|
|
264
279
|
cancelAnimationFrame(this.animateId);
|
|
265
280
|
};
|
|
266
|
-
|
|
281
|
+
DeprecatedMenu.prototype.render = function () {
|
|
267
282
|
var _this = this;
|
|
268
283
|
// TODO: Standardize on prop spread location (see #150)
|
|
269
284
|
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"]);
|
|
270
285
|
var selectedItemIndex = this.state.selectedItemIndex;
|
|
271
286
|
var cardWidth = grow ? '100%' : width;
|
|
287
|
+
var interactiveItemIndex = null;
|
|
272
288
|
return (React.createElement(card_1.Card, { display: "inline-block", padding: tokens_1.space.zero, width: cardWidth, depth: 3 },
|
|
273
289
|
React.createElement(card_1.Card.Body, null,
|
|
274
|
-
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
|
|
290
|
+
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) {
|
|
275
291
|
if (!React.isValidElement(menuItem)) {
|
|
276
292
|
return;
|
|
277
293
|
}
|
|
278
|
-
var itemId
|
|
294
|
+
var itemId;
|
|
295
|
+
if (!menuItem.props.isHeader) {
|
|
296
|
+
interactiveItemIndex = (interactiveItemIndex !== null && interactiveItemIndex !== void 0 ? interactiveItemIndex : -1) + 1;
|
|
297
|
+
itemId = id + "-" + interactiveItemIndex;
|
|
298
|
+
}
|
|
279
299
|
return (React.createElement(React.Fragment, { key: itemId }, React.cloneElement(menuItem, {
|
|
280
300
|
onClick: function (event) { return _this.handleClick(event, menuItem.props); },
|
|
281
301
|
id: itemId,
|
|
282
|
-
isFocused: selectedItemIndex ===
|
|
302
|
+
isFocused: selectedItemIndex === interactiveItemIndex && !menuItem.props.isHeader,
|
|
283
303
|
})));
|
|
284
304
|
})))));
|
|
285
305
|
};
|
|
286
|
-
return
|
|
306
|
+
return DeprecatedMenu;
|
|
287
307
|
}(React.Component));
|
|
288
|
-
exports.
|
|
308
|
+
exports.DeprecatedMenu = DeprecatedMenu;
|
|
@@ -1,52 +1,74 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* ### Deprecated Menu Item Props
|
|
5
|
+
*
|
|
6
|
+
* As of Canvas Kit v8, Menu is being soft-deprecated.
|
|
7
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
8
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
9
|
+
* for more information.
|
|
10
|
+
*/
|
|
11
|
+
export interface DeprecatedMenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
4
12
|
/**
|
|
5
|
-
* The function called when the
|
|
13
|
+
* The function called when the DeprecatedMenuItem is clicked. If the item is a child of the DeprecatedMenu component, this callback will be decorated with the onSelect and onClose DeprecatedMenu callbacks. This callback will not fire if the item is disabled (see below).
|
|
6
14
|
*/
|
|
7
15
|
onClick?: (event: React.MouseEvent) => void;
|
|
8
16
|
/**
|
|
9
|
-
* The unique id for the
|
|
17
|
+
* The unique id for the DeprecatedMenuItem used for ARIA attributes. If the item is a child of the `DeprecatedMenu` component, this property will be generated and overridden.
|
|
10
18
|
*/
|
|
11
19
|
id?: string;
|
|
12
20
|
/**
|
|
13
|
-
* The icon of the
|
|
21
|
+
* The icon of the DeprecatedMenuItem. This icon is displayed before what you supplied for the children.
|
|
14
22
|
*/
|
|
15
23
|
icon?: CanvasSystemIcon;
|
|
16
24
|
/**
|
|
17
|
-
* The secondary icon of the
|
|
25
|
+
* The secondary icon of the DeprecatedMenuItem. This icon is displayed after what you supplied for the children.
|
|
18
26
|
*/
|
|
19
27
|
secondaryIcon?: CanvasSystemIcon;
|
|
20
28
|
/**
|
|
21
|
-
* If true, render a top border on the
|
|
29
|
+
* If true, render a top border on the DeprecatedMenuItem.
|
|
22
30
|
* @default false
|
|
23
31
|
*/
|
|
24
32
|
hasDivider?: boolean;
|
|
25
33
|
/**
|
|
26
|
-
* If true,
|
|
34
|
+
* If true, render a header to group data, this menu item will not be intractable.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
isHeader?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* If true, set the DeprecatedMenuItem to the disabled state so it is not clickable.
|
|
27
40
|
* @default false
|
|
28
41
|
*/
|
|
29
42
|
isDisabled?: boolean;
|
|
30
43
|
/**
|
|
31
|
-
* If true, set the
|
|
44
|
+
* If true, set the DeprecatedMenuItem to be the currently selected item. If the item is a child of the DeprecatedMenu component, this property will be generated and overridden.
|
|
32
45
|
* @default false
|
|
33
46
|
*/
|
|
34
47
|
isFocused?: boolean;
|
|
35
48
|
/**
|
|
36
|
-
* The role of the
|
|
49
|
+
* The role of the DeprecatedMenuItem. Use this to override the role of the item (e.g. you can use this element as an option in a Combobox).
|
|
37
50
|
* @default menuItem
|
|
38
51
|
*/
|
|
39
52
|
role?: string;
|
|
40
53
|
/**
|
|
41
|
-
* If true, allow the onClose
|
|
54
|
+
* If true, allow the onClose DeprecatedMenu callback to be fired after the DeprecatedMenuItem has been clicked.
|
|
42
55
|
* @default true
|
|
43
56
|
*/
|
|
44
57
|
shouldClose?: boolean;
|
|
45
58
|
}
|
|
46
|
-
|
|
59
|
+
/**
|
|
60
|
+
* ### Deprecated Menu Item
|
|
61
|
+
*
|
|
62
|
+
* As of Canvas Kit v8, Menu is being soft-deprecated.
|
|
63
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
64
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
65
|
+
* for more information.
|
|
66
|
+
*/
|
|
67
|
+
export declare class DeprecatedMenuItem extends React.Component<DeprecatedMenuItemProps> {
|
|
47
68
|
ref: React.RefObject<HTMLLIElement>;
|
|
48
|
-
|
|
49
|
-
|
|
69
|
+
componentDidMount(): void;
|
|
70
|
+
componentDidUpdate: (prevProps: DeprecatedMenuItemProps) => void;
|
|
71
|
+
render(): JSX.Element;
|
|
50
72
|
private handleClick;
|
|
51
73
|
}
|
|
52
74
|
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -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,
|
|
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;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACpF;;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,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;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;AA2LD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC;IAC9E,GAAG,iCAAoC;IAEvC,iBAAiB;IASjB,kBAAkB,cAAe,uBAAuB,UAMtD;IAEF,MAAM;IA2CN,OAAO,CAAC,WAAW,CAOjB;CACH"}
|
|
@@ -57,7 +57,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
57
57
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.
|
|
60
|
+
exports.DeprecatedMenuItem = void 0;
|
|
61
61
|
var React = __importStar(require("react"));
|
|
62
62
|
var styled_1 = __importDefault(require("@emotion/styled"));
|
|
63
63
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
@@ -65,6 +65,9 @@ var icon_1 = require("@workday/canvas-kit-react/icon");
|
|
|
65
65
|
var Item = styled_1.default('li')(__assign(__assign({}, tokens_1.type.levels.subtext.large), { padding: tokens_1.space.xxs + " " + tokens_1.space.s, height: tokens_1.space.xl, boxSizing: 'border-box', cursor: 'pointer', color: tokens_1.colors.blackPepper300, display: 'flex', flexDirection: 'row', alignItems: 'center', transition: 'background-color 80ms, color 80ms', '&:focus': {
|
|
66
66
|
outline: 'none',
|
|
67
67
|
} }), function (_a) {
|
|
68
|
+
var isHeader = _a.isHeader;
|
|
69
|
+
return { pointerEvents: isHeader ? 'none' : 'all' };
|
|
70
|
+
}, function (_a) {
|
|
68
71
|
var _b;
|
|
69
72
|
var isFocused = _a.isFocused, isDisabled = _a.isDisabled;
|
|
70
73
|
if (!isFocused && !isDisabled) {
|
|
@@ -193,9 +196,17 @@ var scrollIntoViewIfNeeded = function (elem, centerIfNeeded) {
|
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
198
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
/**
|
|
200
|
+
* ### Deprecated Menu Item
|
|
201
|
+
*
|
|
202
|
+
* As of Canvas Kit v8, Menu is being soft-deprecated.
|
|
203
|
+
* It will be hard-deprecated (completely removed) in v9. Please see the
|
|
204
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
205
|
+
* for more information.
|
|
206
|
+
*/
|
|
207
|
+
var DeprecatedMenuItem = /** @class */ (function (_super) {
|
|
208
|
+
__extends(DeprecatedMenuItem, _super);
|
|
209
|
+
function DeprecatedMenuItem() {
|
|
199
210
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
200
211
|
_this.ref = React.createRef();
|
|
201
212
|
_this.componentDidUpdate = function (prevProps) {
|
|
@@ -215,20 +226,23 @@ var MenuItem = /** @class */ (function (_super) {
|
|
|
215
226
|
};
|
|
216
227
|
return _this;
|
|
217
228
|
}
|
|
218
|
-
|
|
219
|
-
|
|
229
|
+
DeprecatedMenuItem.prototype.componentDidMount = function () {
|
|
230
|
+
console.warn("This component is being deprecated and will be removed in Canvas Kit V9.\n\n For more information, please see the V8 upgrade guide:\n\n https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page\n ");
|
|
231
|
+
};
|
|
232
|
+
DeprecatedMenuItem.prototype.render = function () {
|
|
233
|
+
var _a = this.props, onClick = _a.onClick, children = _a.children, id = _a.id, icon = _a.icon, secondaryIcon = _a.secondaryIcon, hasDivider = _a.hasDivider, isDisabled = _a.isDisabled, isFocused = _a.isFocused, isHeader = _a.isHeader, role = _a.role, elemProps = __rest(_a, ["onClick", "children", "id", "icon", "secondaryIcon", "hasDivider", "isDisabled", "isFocused", "isHeader", "role"]);
|
|
220
234
|
iconProps = setIconProps(icon, isDisabled, isFocused);
|
|
221
235
|
secondaryIconProps = setIconProps(secondaryIcon, isDisabled, isFocused);
|
|
222
236
|
return (React.createElement(React.Fragment, null,
|
|
223
237
|
hasDivider && React.createElement(Divider, null),
|
|
224
|
-
React.createElement(Item, __assign({ ref: this.ref, tabIndex: -1, id: id, role: role, onClick: this.handleClick, "aria-disabled": isDisabled ? true : undefined, isDisabled: !!isDisabled, isFocused: !!isFocused }, elemProps),
|
|
238
|
+
React.createElement(Item, __assign({ ref: this.ref, tabIndex: -1, id: id, role: isHeader ? 'presentation' : role, onClick: this.handleClick, "aria-disabled": isDisabled ? true : undefined, isDisabled: !!isDisabled, isFocused: !!isFocused, isHeader: !!isHeader }, elemProps),
|
|
225
239
|
icon && iconProps && React.createElement(StyledSystemIcon, __assign({}, iconProps)),
|
|
226
240
|
React.createElement(LabelContainer, null, children),
|
|
227
241
|
secondaryIcon && secondaryIconProps && (React.createElement(SecondaryStyledSystemIcon, __assign({}, secondaryIconProps))))));
|
|
228
242
|
};
|
|
229
|
-
return
|
|
243
|
+
return DeprecatedMenuItem;
|
|
230
244
|
}(React.Component));
|
|
231
|
-
exports.
|
|
245
|
+
exports.DeprecatedMenuItem = DeprecatedMenuItem;
|
|
232
246
|
/**
|
|
233
247
|
* If we destructure props, shouldClose will be undefined because the value is only applied for the render method only.
|
|
234
248
|
* We have to use defaultProps so that the value of shouldClose is applied for every method and therefore references in the Menu component.
|
|
@@ -236,7 +250,7 @@ exports.MenuItem = MenuItem;
|
|
|
236
250
|
*/
|
|
237
251
|
// TODO: Remove this ts-ignore when we convert to a functional component
|
|
238
252
|
// @ts-ignore
|
|
239
|
-
|
|
253
|
+
DeprecatedMenuItem.defaultProps = {
|
|
240
254
|
shouldClose: true,
|
|
241
255
|
role: 'menuitem',
|
|
242
256
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BoxProps } from '@workday/canvas-kit-react/layout';
|
|
3
2
|
export interface PillProps extends BoxProps {
|
|
4
3
|
/**
|
|
@@ -19,15 +18,6 @@ export declare const Pill: import("@workday/canvas-kit-react/common").ElementCom
|
|
|
19
18
|
};
|
|
20
19
|
events: {};
|
|
21
20
|
}> & {
|
|
22
|
-
Context: React.Context<{
|
|
23
|
-
state: {
|
|
24
|
-
id: string;
|
|
25
|
-
maxWidth: string | number;
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
};
|
|
28
|
-
events: {};
|
|
29
|
-
}>;
|
|
30
|
-
} & {
|
|
31
21
|
Icon: import("@workday/canvas-kit-react/common").ElementComponentM<"span", import("./PillIcon").PillIconProps, {
|
|
32
22
|
state: {
|
|
33
23
|
id: string;
|