@salesforce/design-system-react 0.10.39 → 0.10.43
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/components/combobox/combobox.d.ts +11 -11
- package/components/component-docs.json +4 -0
- package/components/icon/__docs__/__snapshots__/storybook-stories.storyshot +49 -2
- package/components/icon/__docs__/storybook-stories.jsx +2 -0
- package/components/icon/__examples__/color-success.jsx +24 -0
- package/components/icon/__examples__/colors.jsx +10 -2
- package/components/icon/index.jsx +2 -0
- package/components/icon.d.ts +1 -1
- package/components/menu-dropdown/menu-dropdown.jsx +5 -8
- package/components/setup-assistant.d.ts +1 -1
- package/icons/standard/account_info.js +5 -0
- package/icons/standard/asset_audit.js +5 -0
- package/icons/standard/asset_warranty.js +1 -1
- package/icons/standard/attach.js +5 -0
- package/icons/standard/budget.js +5 -0
- package/icons/standard/budget_allocation.js +5 -0
- package/icons/standard/change_request.js +5 -0
- package/icons/standard/code_set.js +5 -0
- package/icons/standard/code_set_bundle.js +5 -0
- package/icons/standard/contract_payment.js +5 -0
- package/icons/standard/coupon_codes.js +5 -0
- package/icons/standard/discounts.js +5 -0
- package/icons/standard/field_sales.js +5 -0
- package/icons/standard/filter_criteria_rule.js +5 -0
- package/icons/standard/historical_adherence.js +5 -0
- package/icons/standard/identifier.js +5 -0
- package/icons/standard/incident.js +5 -0
- package/icons/standard/index.js +43 -7
- package/icons/standard/med_rec_recommendation.js +5 -0
- package/icons/standard/med_rec_statement_recommendation.js +5 -0
- package/icons/standard/medication.js +5 -0
- package/icons/standard/medication_dispense.js +5 -0
- package/icons/standard/medication_reconciliation.js +5 -0
- package/icons/standard/medication_statement.js +5 -0
- package/icons/standard/network_contract.js +5 -0
- package/icons/standard/patient_medication_dosage.js +5 -0
- package/icons/standard/person_language.js +5 -0
- package/icons/standard/person_name.js +5 -0
- package/icons/standard/problem.js +5 -0
- package/icons/standard/product_consumed_state.js +5 -0
- package/icons/standard/product_transfer.js +1 -1
- package/icons/standard/product_transfer_state.js +5 -0
- package/icons/standard/promotion_segments.js +5 -0
- package/icons/standard/promotions_workspace.js +5 -0
- package/icons/standard/qualifications.js +5 -0
- package/icons/standard/report_type.js +5 -0
- package/icons/standard/serialized_product.js +1 -1
- package/icons/standard/serialized_product_transaction.js +1 -1
- package/icons/standard/story.js +1 -1
- package/icons/standard/tour.js +5 -0
- package/icons/standard/tour_check.js +5 -0
- package/icons/standard/travel_mode.js +1 -1
- package/icons/standard/unified_health_score.js +5 -0
- package/icons/standard/workforce_engagement.js +5 -0
- package/icons/utility/asset_audit.js +5 -0
- package/icons/utility/asset_warranty.js +1 -1
- package/icons/utility/block_visitor.js +1 -1
- package/icons/utility/bookmark_alt.js +5 -0
- package/icons/utility/change_request.js +5 -0
- package/icons/utility/collection_alt.js +5 -0
- package/icons/utility/contract_doc.js +5 -0
- package/icons/utility/contract_payment.js +5 -0
- package/icons/utility/coupon_codes.js +5 -0
- package/icons/utility/discounts.js +5 -0
- package/icons/utility/einstein.js +1 -1
- package/icons/utility/entitlement.js +5 -0
- package/icons/utility/field_sales.js +5 -0
- package/icons/utility/incident.js +5 -0
- package/icons/utility/index.js +37 -8
- package/icons/utility/layout_banner.js +5 -0
- package/icons/utility/layout_card.js +5 -0
- package/icons/utility/layout_overlap.js +5 -0
- package/icons/utility/layout_tile.js +5 -0
- package/icons/utility/light_bulb.js +1 -1
- package/icons/utility/problem.js +5 -0
- package/icons/utility/product_consumed_state.js +5 -0
- package/icons/utility/product_transfer.js +5 -0
- package/icons/utility/product_transfer_state.js +5 -0
- package/icons/utility/promotion_segments.js +5 -0
- package/icons/utility/promotions.js +1 -1
- package/icons/utility/promotions_workspace.js +5 -0
- package/icons/utility/qualifications.js +5 -0
- package/icons/utility/reminder.js +1 -1
- package/icons/utility/scan.js +5 -0
- package/icons/utility/search.js +1 -1
- package/icons/utility/shopping_bag.js +1 -1
- package/icons/utility/signature.js +5 -0
- package/icons/utility/spacer.js +5 -0
- package/icons/utility/tour.js +5 -0
- package/icons/utility/tour_check.js +5 -0
- package/icons/utility/truck.js +5 -0
- package/icons/utility/workforce_engagement.js +5 -0
- package/lib/components/combobox/combobox.d.ts +11 -11
- package/lib/components/component-docs.json +4 -0
- package/lib/components/icon/__docs__/__snapshots__/storybook-stories.storyshot +49 -2
- package/lib/components/icon/__docs__/storybook-stories.jsx +2 -0
- package/lib/components/icon/__examples__/color-success.jsx +24 -0
- package/lib/components/icon/__examples__/colors.jsx +10 -2
- package/lib/components/icon/index.js +2 -1
- package/lib/components/icon.d.ts +1 -1
- package/lib/components/menu-dropdown/menu-dropdown.js +3 -5
- package/lib/components/setup-assistant.d.ts +1 -1
- package/lib/icons/standard/account_info.js +20 -0
- package/lib/icons/standard/asset_audit.js +18 -0
- package/lib/icons/standard/asset_warranty.js +2 -1
- package/lib/icons/standard/attach.js +18 -0
- package/lib/icons/standard/budget.js +18 -0
- package/lib/icons/standard/budget_allocation.js +31 -0
- package/lib/icons/standard/change_request.js +18 -0
- package/lib/icons/standard/code_set.js +20 -0
- package/lib/icons/standard/code_set_bundle.js +20 -0
- package/lib/icons/standard/contract_payment.js +28 -0
- package/lib/icons/standard/coupon_codes.js +18 -0
- package/lib/icons/standard/discounts.js +22 -0
- package/lib/icons/standard/field_sales.js +20 -0
- package/lib/icons/standard/filter_criteria_rule.js +18 -0
- package/lib/icons/standard/historical_adherence.js +22 -0
- package/lib/icons/standard/identifier.js +18 -0
- package/lib/icons/standard/incident.js +27 -0
- package/lib/icons/standard/index.js +366 -28
- package/lib/icons/standard/med_rec_recommendation.js +20 -0
- package/lib/icons/standard/med_rec_statement_recommendation.js +18 -0
- package/lib/icons/standard/medication.js +33 -0
- package/lib/icons/standard/medication_dispense.js +35 -0
- package/lib/icons/standard/medication_reconciliation.js +18 -0
- package/lib/icons/standard/medication_statement.js +18 -0
- package/lib/icons/standard/network_contract.js +22 -0
- package/lib/icons/standard/patient_medication_dosage.js +20 -0
- package/lib/icons/standard/person_language.js +20 -0
- package/lib/icons/standard/person_name.js +19 -0
- package/lib/icons/standard/problem.js +18 -0
- package/lib/icons/standard/product_consumed_state.js +19 -0
- package/lib/icons/standard/product_transfer.js +2 -1
- package/lib/icons/standard/product_transfer_state.js +19 -0
- package/lib/icons/standard/promotion_segments.js +22 -0
- package/lib/icons/standard/promotions_workspace.js +23 -0
- package/lib/icons/standard/qualifications.js +22 -0
- package/lib/icons/standard/report_type.js +24 -0
- package/lib/icons/standard/serialized_product.js +1 -1
- package/lib/icons/standard/serialized_product_transaction.js +5 -3
- package/lib/icons/standard/story.js +9 -14
- package/lib/icons/standard/tour.js +25 -0
- package/lib/icons/standard/tour_check.js +20 -0
- package/lib/icons/standard/travel_mode.js +2 -2
- package/lib/icons/standard/unified_health_score.js +18 -0
- package/lib/icons/standard/workforce_engagement.js +20 -0
- package/lib/icons/utility/asset_audit.js +31 -0
- package/lib/icons/utility/asset_warranty.js +2 -1
- package/lib/icons/utility/block_visitor.js +2 -4
- package/lib/icons/utility/bookmark_alt.js +18 -0
- package/lib/icons/utility/change_request.js +18 -0
- package/lib/icons/utility/collection_alt.js +26 -0
- package/lib/icons/utility/contract_doc.js +20 -0
- package/lib/icons/utility/contract_payment.js +28 -0
- package/lib/icons/utility/coupon_codes.js +18 -0
- package/lib/icons/utility/discounts.js +22 -0
- package/lib/icons/utility/einstein.js +7 -1
- package/lib/icons/utility/entitlement.js +18 -0
- package/lib/icons/utility/field_sales.js +20 -0
- package/lib/icons/utility/incident.js +27 -0
- package/lib/icons/utility/index.js +290 -19
- package/lib/icons/utility/layout_banner.js +19 -0
- package/lib/icons/utility/layout_card.js +19 -0
- package/lib/icons/utility/layout_overlap.js +19 -0
- package/lib/icons/utility/layout_tile.js +19 -0
- package/lib/icons/utility/light_bulb.js +1 -0
- package/lib/icons/utility/problem.js +18 -0
- package/lib/icons/utility/product_consumed_state.js +19 -0
- package/lib/icons/utility/product_transfer.js +19 -0
- package/lib/icons/utility/product_transfer_state.js +19 -0
- package/lib/icons/utility/promotion_segments.js +22 -0
- package/lib/icons/utility/promotions.js +2 -2
- package/lib/icons/utility/promotions_workspace.js +23 -0
- package/lib/icons/utility/qualifications.js +22 -0
- package/lib/icons/utility/reminder.js +3 -5
- package/lib/icons/utility/scan.js +18 -0
- package/lib/icons/utility/search.js +1 -1
- package/lib/icons/utility/shopping_bag.js +3 -5
- package/lib/icons/utility/signature.js +22 -0
- package/lib/icons/utility/spacer.js +19 -0
- package/lib/icons/utility/tour.js +25 -0
- package/lib/icons/utility/tour_check.js +20 -0
- package/lib/icons/utility/truck.js +29 -0
- package/lib/icons/utility/workforce_engagement.js +20 -0
- package/lib/package.json +1 -1
- package/module/components/combobox/combobox.d.ts +11 -11
- package/module/components/component-docs.json +4 -0
- package/module/components/icon/__docs__/__snapshots__/storybook-stories.storyshot +49 -2
- package/module/components/icon/__docs__/storybook-stories.js +3 -0
- package/module/components/icon/__docs__/storybook-stories.js.map +1 -1
- package/module/components/icon/__examples__/color-success.js +64 -0
- package/module/components/icon/__examples__/color-success.js.map +1 -0
- package/module/components/icon/__examples__/colors.js +11 -2
- package/module/components/icon/__examples__/colors.js.map +1 -1
- package/module/components/icon/index.js +2 -1
- package/module/components/icon/index.js.map +1 -1
- package/module/components/icon.d.ts +1 -1
- package/module/components/menu-dropdown/menu-dropdown.js +3 -5
- package/module/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/module/components/setup-assistant.d.ts +1 -1
- package/module/icons/standard/account_info.js +12 -0
- package/module/icons/standard/asset_audit.js +10 -0
- package/module/icons/standard/asset_warranty.js +2 -1
- package/module/icons/standard/attach.js +10 -0
- package/module/icons/standard/budget.js +10 -0
- package/module/icons/standard/budget_allocation.js +23 -0
- package/module/icons/standard/change_request.js +10 -0
- package/module/icons/standard/code_set.js +12 -0
- package/module/icons/standard/code_set_bundle.js +12 -0
- package/module/icons/standard/contract_payment.js +20 -0
- package/module/icons/standard/coupon_codes.js +10 -0
- package/module/icons/standard/discounts.js +14 -0
- package/module/icons/standard/field_sales.js +12 -0
- package/module/icons/standard/filter_criteria_rule.js +10 -0
- package/module/icons/standard/historical_adherence.js +14 -0
- package/module/icons/standard/identifier.js +10 -0
- package/module/icons/standard/incident.js +19 -0
- package/module/icons/standard/index.js +366 -28
- package/module/icons/standard/med_rec_recommendation.js +12 -0
- package/module/icons/standard/med_rec_statement_recommendation.js +10 -0
- package/module/icons/standard/medication.js +25 -0
- package/module/icons/standard/medication_dispense.js +27 -0
- package/module/icons/standard/medication_reconciliation.js +10 -0
- package/module/icons/standard/medication_statement.js +10 -0
- package/module/icons/standard/network_contract.js +14 -0
- package/module/icons/standard/patient_medication_dosage.js +12 -0
- package/module/icons/standard/person_language.js +12 -0
- package/module/icons/standard/person_name.js +11 -0
- package/module/icons/standard/problem.js +10 -0
- package/module/icons/standard/product_consumed_state.js +11 -0
- package/module/icons/standard/product_transfer.js +2 -1
- package/module/icons/standard/product_transfer_state.js +11 -0
- package/module/icons/standard/promotion_segments.js +14 -0
- package/module/icons/standard/promotions_workspace.js +15 -0
- package/module/icons/standard/qualifications.js +14 -0
- package/module/icons/standard/report_type.js +16 -0
- package/module/icons/standard/serialized_product.js +1 -1
- package/module/icons/standard/serialized_product_transaction.js +5 -3
- package/module/icons/standard/story.js +9 -14
- package/module/icons/standard/tour.js +17 -0
- package/module/icons/standard/tour_check.js +12 -0
- package/module/icons/standard/travel_mode.js +2 -2
- package/module/icons/standard/unified_health_score.js +10 -0
- package/module/icons/standard/workforce_engagement.js +12 -0
- package/module/icons/utility/asset_audit.js +23 -0
- package/module/icons/utility/asset_warranty.js +2 -1
- package/module/icons/utility/block_visitor.js +2 -4
- package/module/icons/utility/bookmark_alt.js +10 -0
- package/module/icons/utility/change_request.js +10 -0
- package/module/icons/utility/collection_alt.js +18 -0
- package/module/icons/utility/contract_doc.js +12 -0
- package/module/icons/utility/contract_payment.js +20 -0
- package/module/icons/utility/coupon_codes.js +10 -0
- package/module/icons/utility/discounts.js +14 -0
- package/module/icons/utility/einstein.js +7 -1
- package/module/icons/utility/entitlement.js +10 -0
- package/module/icons/utility/field_sales.js +12 -0
- package/module/icons/utility/incident.js +19 -0
- package/module/icons/utility/index.js +290 -19
- package/module/icons/utility/layout_banner.js +11 -0
- package/module/icons/utility/layout_card.js +11 -0
- package/module/icons/utility/layout_overlap.js +11 -0
- package/module/icons/utility/layout_tile.js +11 -0
- package/module/icons/utility/light_bulb.js +1 -0
- package/module/icons/utility/problem.js +10 -0
- package/module/icons/utility/product_consumed_state.js +11 -0
- package/module/icons/utility/product_transfer.js +11 -0
- package/module/icons/utility/product_transfer_state.js +11 -0
- package/module/icons/utility/promotion_segments.js +14 -0
- package/module/icons/utility/promotions.js +2 -2
- package/module/icons/utility/promotions_workspace.js +15 -0
- package/module/icons/utility/qualifications.js +14 -0
- package/module/icons/utility/reminder.js +3 -5
- package/module/icons/utility/scan.js +10 -0
- package/module/icons/utility/search.js +1 -1
- package/module/icons/utility/shopping_bag.js +3 -5
- package/module/icons/utility/signature.js +14 -0
- package/module/icons/utility/spacer.js +11 -0
- package/module/icons/utility/tour.js +17 -0
- package/module/icons/utility/tour_check.js +12 -0
- package/module/icons/utility/truck.js +21 -0
- package/module/icons/utility/workforce_engagement.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
+
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4
|
+
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
6
|
+
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8
|
+
|
|
9
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
+
|
|
11
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
|
+
|
|
13
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
+
|
|
15
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
16
|
+
|
|
17
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
18
|
+
|
|
19
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
+
|
|
21
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
|
+
|
|
23
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24
|
+
|
|
25
|
+
import React from 'react';
|
|
26
|
+
import Icon from "../../../../components/icon"; // `~` is replaced with design-system-react at runtime
|
|
27
|
+
|
|
28
|
+
import IconSettings from "../../../../components/icon-settings";
|
|
29
|
+
|
|
30
|
+
var Example = /*#__PURE__*/function (_React$Component) {
|
|
31
|
+
_inherits(Example, _React$Component);
|
|
32
|
+
|
|
33
|
+
var _super = _createSuper(Example);
|
|
34
|
+
|
|
35
|
+
function Example() {
|
|
36
|
+
_classCallCheck(this, Example);
|
|
37
|
+
|
|
38
|
+
return _super.apply(this, arguments);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
_createClass(Example, [{
|
|
42
|
+
key: "render",
|
|
43
|
+
value: function render() {
|
|
44
|
+
return /*#__PURE__*/React.createElement(IconSettings, {
|
|
45
|
+
iconPath: "/assets/icons"
|
|
46
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
47
|
+
assistiveText: {
|
|
48
|
+
label: 'Description of icon'
|
|
49
|
+
},
|
|
50
|
+
category: "utility",
|
|
51
|
+
colorVariant: "success",
|
|
52
|
+
name: "announcement",
|
|
53
|
+
title: "description of icon"
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
}]);
|
|
57
|
+
|
|
58
|
+
return Example;
|
|
59
|
+
}(React.Component);
|
|
60
|
+
|
|
61
|
+
_defineProperty(Example, "displayName", 'IconExample');
|
|
62
|
+
|
|
63
|
+
export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
|
|
64
|
+
//# sourceMappingURL=color-success.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/icon/__examples__/color-success.jsx"],"names":["React","Icon","IconSettings","Example","label","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,IAAP,MAAiB,6BAAjB,C,CAAsC;;AACtC,OAAOC,YAAP,MAAyB,sCAAzB;;IAEMC,O;;;;;;;;;;;;;WAGL,kBAAS;AACR,0BACC,oBAAC,YAAD;AAAc,QAAA,QAAQ,EAAC;AAAvB,sBACC,oBAAC,IAAD;AACC,QAAA,aAAa,EAAE;AAAEC,UAAAA,KAAK,EAAE;AAAT,SADhB;AAEC,QAAA,QAAQ,EAAC,SAFV;AAGC,QAAA,YAAY,EAAC,SAHd;AAIC,QAAA,IAAI,EAAC,cAJN;AAKC,QAAA,KAAK,EAAC;AALP,QADD,CADD;AAWA;;;;EAfoBJ,KAAK,CAACK,S;;gBAAtBF,O,iBACgB,a;;AAiBtB,eAAeA,OAAf,C,CAAwB","sourcesContent":["import React from 'react';\n\nimport Icon from '~/components/icon'; // `~` is replaced with design-system-react at runtime\nimport IconSettings from '~/components/icon-settings';\n\nclass Example extends React.Component {\n\tstatic displayName = 'IconExample';\n\n\trender() {\n\t\treturn (\n\t\t\t<IconSettings iconPath=\"/assets/icons\">\n\t\t\t\t<Icon\n\t\t\t\t\tassistiveText={{ label: 'Description of icon' }}\n\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\tcolorVariant=\"success\"\n\t\t\t\t\tname=\"announcement\"\n\t\t\t\t\ttitle=\"description of icon\"\n\t\t\t\t/>\n\t\t\t</IconSettings>\n\t\t);\n\t}\n}\n\nexport default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime\n"],"file":"color-success.js"}
|
|
@@ -73,6 +73,15 @@ var Example = /*#__PURE__*/function (_React$Component) {
|
|
|
73
73
|
name: "lock"
|
|
74
74
|
})), /*#__PURE__*/React.createElement("div", {
|
|
75
75
|
className: "slds-col_padded"
|
|
76
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
77
|
+
assistiveText: {
|
|
78
|
+
label: 'Success'
|
|
79
|
+
},
|
|
80
|
+
category: "utility",
|
|
81
|
+
colorVariant: "success",
|
|
82
|
+
name: "success"
|
|
83
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: "slds-col_padded"
|
|
76
85
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
77
86
|
assistiveText: {
|
|
78
87
|
label: 'Warning'
|
|
@@ -84,11 +93,11 @@ var Example = /*#__PURE__*/function (_React$Component) {
|
|
|
84
93
|
className: "slds-col_padded"
|
|
85
94
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
86
95
|
assistiveText: {
|
|
87
|
-
|
|
96
|
+
label: 'Warning'
|
|
88
97
|
},
|
|
89
98
|
category: "utility",
|
|
90
99
|
colorVariant: "error",
|
|
91
|
-
name: "
|
|
100
|
+
name: "error"
|
|
92
101
|
}))));
|
|
93
102
|
}
|
|
94
103
|
}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../.tmp-es/components/icon/__examples__/colors.jsx"],"names":["React","IconSettings","Icon","Example","label","
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/icon/__examples__/colors.jsx"],"names":["React","IconSettings","Icon","Example","label","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAEA,OAAOC,YAAP,MAAyB,sCAAzB;AACA,OAAOC,IAAP,MAAiB,6BAAjB,C,CAAsC;;IAEhCC,O;;;;;;;;;;;;;WAGL,kBAAS;AACR,0BACC,oBAAC,YAAD;AAAc,QAAA,QAAQ,EAAC;AAAvB,sBACC;AAAK,QAAA,SAAS,EAAC;AAAf,sBACC;AAAK,QAAA,SAAS,EAAC;AAAf,sBACC,oBAAC,IAAD;AACC,QAAA,aAAa,EAAE;AAAEC,UAAAA,KAAK,EAAE;AAAT,SADhB;AAEC,QAAA,QAAQ,EAAC,UAFV;AAGC,QAAA,YAAY,EAAC,MAHd;AAIC,QAAA,IAAI,EAAC;AAJN,QADD,CADD,eASC;AAAK,QAAA,SAAS,EAAC;A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components/icon'; // `~` is replaced with design-system-react at runtime\n\nclass Example extends React.Component {\n\tstatic displayName = 'IconExample';\n\n\trender() {\n\t\treturn (\n\t\t\t<IconSettings iconPath=\"/assets/icons\">\n\t\t\t\t<div className=\"slds-grid slds-grid_pull-padded slds-grid_vertical-align-center\">\n\t\t\t\t\t<div className=\"slds-col_padded\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tassistiveText={{ label: 'Lead' }}\n\t\t\t\t\t\t\tcategory=\"standard\"\n\t\t\t\t\t\t\tcolorVariant=\"base\"\n\t\t\t\t\t\t\tname=\"lead\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"slds-col_padded\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tassistiveText={{ label: 'Lock' }}\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tcolorVariant=\"default\"\n\t\t\t\t\t\t\tname=\"lock\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"slds-col_padded\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tassistiveText={{ label: 'Lock' }}\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tcolorVariant=\"light\"\n\t\t\t\t\t\t\tname=\"lock\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"slds-col_padded\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tassistiveText={{ label: 'Success' }}\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tcolorVariant=\"success\"\n\t\t\t\t\t\t\tname=\"success\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"slds-col_padded\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tassistiveText={{ label: 'Warning' }}\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tcolorVariant=\"warning\"\n\t\t\t\t\t\t\tname=\"warning\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"slds-col_padded\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tassistiveText={{ label: 'Warning' }}\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tcolorVariant=\"error\"\n\t\t\t\t\t\t\tname=\"error\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</IconSettings>\n\t\t);\n\t}\n}\n\nexport default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime\n"],"file":"colors.js"}
|
|
@@ -75,6 +75,7 @@ var Icon = function Icon(props) {
|
|
|
75
75
|
// if category is NOT `utility` and `inverse` is false (default), icon will be light // return false
|
|
76
76
|
// if category is NOT `utility` and `inverse` is true, icon will be dark // return true
|
|
77
77
|
'slds-icon-text-default': colorVariant === 'default' && category === 'utility' ? !inverse : inverse,
|
|
78
|
+
'slds-icon-text-success': colorVariant === 'success',
|
|
78
79
|
'slds-icon-text-warning': colorVariant === 'warning',
|
|
79
80
|
'slds-icon-text-error': colorVariant === 'error',
|
|
80
81
|
'slds-icon-text-light': colorVariant === 'light'
|
|
@@ -125,7 +126,7 @@ Icon.propTypes = {
|
|
|
125
126
|
/**
|
|
126
127
|
* Icon color variants
|
|
127
128
|
*/
|
|
128
|
-
colorVariant: PropTypes.oneOf(['base', 'default', 'error', 'light', 'warning']),
|
|
129
|
+
colorVariant: PropTypes.oneOf(['base', 'default', 'error', 'light', 'warning', 'success']),
|
|
129
130
|
|
|
130
131
|
/**
|
|
131
132
|
* A custom SVG object to use instead of the supplied SLDS icons, look in `design-system-react/icons` for examples and syntax.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.tmp-es/components/icon/index.jsx"],"names":["React","PropTypes","checkProps","componentDoc","classNames","UtilityIcon","IconBackgrounds","ICON","defaultProps","assistiveText","category","colorVariant","size","Icon","props","className","containerClassName","containerStyle","icon","inverse","name","path","title","productTheme","style","backgroundColor","label","kababCaseName","replace","displayName","propTypes","shape","string","oneOf","isRequired","oneOfType","array","object","bool"],"mappings":";;;;;;AAAA;;AACA;AAEA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,YAAP,MAAyB,kBAAzB,C,CAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,6BAAvB,C,CAEA;;AACA,OAAOC,WAAP,MAAwB,2BAAxB;AAEA,OAAOC,eAAP,MAA4B,iDAA5B;AAEA,SAASC,IAAT,QAAqB,2BAArB;AAEA,IAAMC,YAAY,GAAG;AACpBC,EAAAA,aAAa,EAAE,EADK;AAEpBC,EAAAA,QAAQ,EAAE,UAFU;AAGpBC,EAAAA,YAAY,EAAE,SAHM;AAIpBC,EAAAA,IAAI,EAAE;AAJc,CAArB;AAOA;AACA;AACA;;AACA,IAAMC,IAAI,GAAG,SAAPA,IAAO,CAACC,KAAD,EAAW;AACvBZ,EAAAA,UAAU,CAACK,IAAD,EAAOO,KAAP,EAAcX,YAAd,CAAV;AACA,MACCO,QADD,GAaII,KAbJ,CACCJ,QADD;AAAA,MAECK,SAFD,GAaID,KAbJ,CAECC,SAFD;AAAA,MAGCJ,YAHD,GAaIG,KAbJ,CAGCH,YAHD;AAAA,MAICK,kBAJD,GAaIF,KAbJ,CAICE,kBAJD;AAAA,MAKCC,cALD,GAaIH,KAbJ,CAKCG,cALD;AAAA,MAMCC,IAND,GAaIJ,KAbJ,CAMCI,IAND;AAAA,MAOCC,OAPD,GAaIL,KAbJ,CAOCK,OAPD;AAAA,MAQCC,IARD,GAaIN,KAbJ,CAQCM,IARD;AAAA,MASCC,IATD,GAaIP,KAbJ,CASCO,IATD;AAAA,MAUCT,IAVD,GAaIE,KAbJ,CAUCF,IAVD;AAAA,MAWCU,KAX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,KAAV,CAAgB,CAC7B,MAD6B,EAE7B,SAF6B,EAG7B,OAH6B,EAI7B,OAJ6B,EAK7B,SAL6B,CAAhB,CA1CE;;AAiDhB;AACD;AACA;AACCf,EAAAA,IAAI,EAAEjB,SAAS,CAACoC,MApDA;;AAqDhB;AACD;AACA;AACClB,EAAAA,OAAO,EAAElB,SAAS,CAACqC,IAxDH;;AAyDhB;AACD;AACA;AACClB,EAAAA,IAAI,EAAEnB,SAAS,CAAC+B,MA5DA;;AA6DhB;AACD;AACA;AACCX,EAAAA,IAAI,EAAEpB,SAAS,CAAC+B,MAhEA;;AAiEhB;AACD;AACA;AACCT,EAAAA,YAAY,EAAEtB,SAAS,CAACgC,KAAV,CAAgB,CAC7B,cAD6B,EAE7B,eAF6B,EAG7B,gBAH6B,EAI7B,aAJ6B,EAK7B,gBAL6B,EAM7B,iBAN6B,EAO7B,iBAP6B,EAQ7B,MAR6B,CAAhB,CApEE;;AA8EhB;AACD;AACA;AACCrB,EAAAA,IAAI,EAAEX,SAAS,CAACgC,KAAV,CAAgB,CAAC,UAAD,EAAa,SAAb,EAAwB,OAAxB,EAAiC,QAAjC,EAA2C,OAA3C,CAAhB,CAjFU;;AAkFhB;AACD;AACA;AACCT,EAAAA,KAAK,EAAEvB,SAAS,CAACoC,MArFD;;AAsFhB;AACD;AACA;AACCf,EAAAA,KAAK,EAAErB,SAAS,CAAC+B;AAzFD,CAAjB;AA4FAnB,IAAI,CAACL,YAAL,GAAoBA,YAApB;AAEA,eAAeK,IAAf","sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Icon Component\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// A simple javascript utility for conditionally joining classNames together.\nimport classNames from '../../utilities/class-names';\n\n// ## Children\nimport UtilityIcon from '../utilities/utility-icon';\n\nimport IconBackgrounds from '../../utilities/product-tokens/icon-backgrounds';\n\nimport { ICON } from '../../utilities/constants';\n\nconst defaultProps = {\n\tassistiveText: {},\n\tcategory: 'standard',\n\tcolorVariant: 'default',\n\tsize: 'medium',\n};\n\n/**\n * The Icon component is the Lightning Design System Icon component and should be used for naked icons. For icons that are buttons, use the <a href='/components/buttons/'>Button component</a> component with <code>variant='icon'</code>.\n */\nconst Icon = (props) => {\n\tcheckProps(ICON, props, componentDoc);\n\tconst {\n\t\tcategory,\n\t\tclassName,\n\t\tcolorVariant,\n\t\tcontainerClassName,\n\t\tcontainerStyle,\n\t\ticon,\n\t\tinverse,\n\t\tname,\n\t\tpath,\n\t\tsize,\n\t\ttitle,\n\t\tproductTheme,\n\t} = props;\n\n\tlet { style } = props;\n\tif (productTheme) {\n\t\tstyle = { backgroundColor: IconBackgrounds[productTheme], ...style };\n\t}\n\tconst assistiveText =\n\t\ttypeof props.assistiveText === 'string'\n\t\t\t? props.assistiveText\n\t\t\t: {\n\t\t\t\t\t...defaultProps.assistiveText,\n\t\t\t\t\t...props.assistiveText,\n\t\t\t }.label;\n\n\tconst kababCaseName = name ? name.replace(/_/g, '-') : '';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={classNames(\n\t\t\t\t{\n\t\t\t\t\t'slds-icon_container': category !== 'utility',\n\t\t\t\t\t'slds-icon_container_circle': category === 'action',\n\t\t\t\t\t[`slds-icon-${category}-${kababCaseName}`]:\n\t\t\t\t\t\tcategory !== 'utility' && category !== 'doctype' && !path,\n\t\t\t\t},\n\t\t\t\tcontainerClassName\n\t\t\t)}\n\t\t\tstyle={containerStyle}\n\t\t\ttitle={title}\n\t\t>\n\t\t\t<UtilityIcon\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tcategory={category}\n\t\t\t\tclassName={classNames(className, 'slds-icon', {\n\t\t\t\t\t'slds-icon_xx-small': size === 'xx-small',\n\t\t\t\t\t'slds-icon_x-small': size === 'x-small',\n\t\t\t\t\t'slds-icon_small': size === 'small',\n\t\t\t\t\t// medium intentially not present\n\t\t\t\t\t'slds-icon_large': size === 'large',\n\t\t\t\t\t// if category is `utility` and `inverse` is false (default), icon will be dark // return true\n\t\t\t\t\t// if category is `utility` and `inverse` is true, icon will be light // return false\n\t\t\t\t\t// if category is NOT `utility` and `inverse` is false (default), icon will be light // return false\n\t\t\t\t\t// if category is NOT `utility` and `inverse` is true, icon will be dark // return true\n\t\t\t\t\t'slds-icon-text-default':\n\t\t\t\t\t\tcolorVariant === 'default' && category === 'utility'\n\t\t\t\t\t\t\t? !inverse\n\t\t\t\t\t\t\t: inverse,\n\t\t\t\t\t'slds-icon-text-warning': colorVariant === 'warning',\n\t\t\t\t\t'slds-icon-text-error': colorVariant === 'error',\n\t\t\t\t\t'slds-icon-text-light': colorVariant === 'light',\n\t\t\t\t})}\n\t\t\t\ticon={icon}\n\t\t\t\tname={name}\n\t\t\t\tpath={path}\n\t\t\t\tstyle={style}\n\t\t\t/>\n\t\t\t{assistiveText ? (\n\t\t\t\t<span className=\"slds-assistive-text\">{assistiveText}</span>\n\t\t\t) : (\n\t\t\t\t''\n\t\t\t)}\n\t\t</span>\n\t);\n};\n\n// ### Display Name\n// Always use the canonical component name as the React display name.\nIcon.displayName = ICON;\n\n// ### Prop Types\nIcon.propTypes = {\n\t/**\n\t * **Assistive text for accessibility.**\n\t * This object is merged with the default props object on every render.\n\t * * `label`: Text that is visually hidden but read aloud by screenreaders to tell the user what the icon means. Naked icons must have assistive text, however, if you also have visible descriptive text with the icon, declare this prop as <code>assistiveText=''</code>.\n\t */\n\tassistiveText: PropTypes.shape({\n\t\tlabel: PropTypes.string,\n\t}),\n\t/**\n\t * Icon category from [lightningdesignsystem.com/icons/](https://www.lightningdesignsystem.com/icons/)\n\t */\n\tcategory: PropTypes.oneOf([\n\t\t'action',\n\t\t'custom',\n\t\t'doctype',\n\t\t'standard',\n\t\t'utility',\n\t]).isRequired,\n\t/**\n\t * CSS classes that are applied to the SVG.\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * CSS classes that are applied to the span.\n\t */\n\tcontainerClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * Styles that are applied to the span.\n\t */\n\tcontainerStyle: PropTypes.object,\n\t/**\n\t * Icon color variants\n\t */\n\tcolorVariant: PropTypes.oneOf([\n\t\t'base',\n\t\t'default',\n\t\t'error',\n\t\t'light',\n\t\t'warning',\n\t]),\n\t/**\n\t * A custom SVG object to use instead of the supplied SLDS icons, look in `design-system-react/icons` for examples and syntax.\n\t */\n\ticon: PropTypes.object,\n\t/**\n\t * Setting `inverse` to true will switch the color of the icon: light to dark, dark to light.\n\t */\n\tinverse: PropTypes.bool,\n\t/**\n\t * Name of the icon. Visit <a href='http://www.lightningdesignsystem.com/resources/icons'>Lightning Design System Icons</a> to reference icon names.\n\t */\n\tname: PropTypes.string,\n\t/**\n\t * Path to the icon. This will override any global icon settings\n\t */\n\tpath: PropTypes.string,\n\t/**\n\t * Background theme color for the icon. **Only compatible with icon category `standard`**\n\t */\n\tproductTheme: PropTypes.oneOf([\n\t\t'global-setup',\n\t\t'service-cloud',\n\t\t'industry-cloud',\n\t\t'sales-cloud',\n\t\t'commerce-cloud',\n\t\t'community-cloud',\n\t\t'marketing-cloud',\n\t\t'quip',\n\t]),\n\t/**\n\t * Size of the icon. Visit [lightningdesignsystem.com/components/icons/#flavor-sizes](https://www.lightningdesignsystem.com/components/icons/#flavor-sizes)\n\t */\n\tsize: PropTypes.oneOf(['xx-small', 'x-small', 'small', 'medium', 'large']),\n\t/**\n\t * Custom styles to be passed to the SVG. Could be used to change icon or background color.\n\t */\n\tstyle: PropTypes.object,\n\t/**\n\t * Title attribute for the icon container\n\t */\n\ttitle: PropTypes.string,\n};\n\nIcon.defaultProps = defaultProps;\n\nexport default Icon;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../.tmp-es/components/icon/index.jsx"],"names":["React","PropTypes","checkProps","componentDoc","classNames","UtilityIcon","IconBackgrounds","ICON","defaultProps","assistiveText","category","colorVariant","size","Icon","props","className","containerClassName","containerStyle","icon","inverse","name","path","title","productTheme","style","backgroundColor","label","kababCaseName","replace","displayName","propTypes","shape","string","oneOf","isRequired","oneOfType","array","object","bool"],"mappings":";;;;;;AAAA;;AACA;AAEA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,YAAP,MAAyB,kBAAzB,C,CAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,6BAAvB,C,CAEA;;AACA,OAAOC,WAAP,MAAwB,2BAAxB;AAEA,OAAOC,eAAP,MAA4B,iDAA5B;AAEA,SAASC,IAAT,QAAqB,2BAArB;AAEA,IAAMC,YAAY,GAAG;AACpBC,EAAAA,aAAa,EAAE,EADK;AAEpBC,EAAAA,QAAQ,EAAE,UAFU;AAGpBC,EAAAA,YAAY,EAAE,SAHM;AAIpBC,EAAAA,IAAI,EAAE;AAJc,CAArB;AAOA;AACA;AACA;;AACA,IAAMC,IAAI,GAAG,SAAPA,IAAO,CAACC,KAAD,EAAW;AACvBZ,EAAAA,UAAU,CAACK,IAAD,EAAOO,KAAP,EAAcX,YAAd,CAAV;AACA,MACCO,QADD,GAaII,KAbJ,CACCJ,QADD;AAAA,MAECK,SAFD,GAaID,KAbJ,CAECC,SAFD;AAAA,MAGCJ,YAHD,GAaIG,KAbJ,CAGCH,YAHD;AAAA,MAICK,kBAJD,GAaIF,KAbJ,CAICE,kBAJD;AAAA,MAKCC,cALD,GAaIH,KAbJ,CAKCG,cALD;AAAA,MAMCC,IAND,GAaIJ,KAbJ,CAMCI,IAND;AAAA,MAOCC,OAPD,GAaIL,KAbJ,CAOCK,OAP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,SAAS,CAACoC,MAF6B,EAGvCpC,SAAS,CAAC+B,MAH6B,CAApB,CA9BJ;;AAmChB;AACD;AACA;AACCf,EAAAA,cAAc,EAAEhB,SAAS,CAACoC,MAtCV;;AAuChB;AACD;AACA;AACC1B,EAAAA,YAAY,EAAEV,SAAS,CAACgC,KAAV,CAAgB,CAC7B,MAD6B,EAE7B,SAF6B,EAG7B,OAH6B,EAI7B,OAJ6B,EAK7B,SAL6B,EAM7B,SAN6B,CAAhB,CA1CE;;AAkDhB;AACD;AACA;AACCf,EAAAA,IAAI,EAAEjB,SAAS,CAACoC,MArDA;;AAsDhB;AACD;AACA;AACClB,EAAAA,OAAO,EAAElB,SAAS,CAACqC,IAzDH;;AA0DhB;AACD;AACA;AACClB,EAAAA,IAAI,EAAEnB,SAAS,CAAC+B,MA7DA;;AA8DhB;AACD;AACA;AACCX,EAAAA,IAAI,EAAEpB,SAAS,CAAC+B,MAjEA;;AAkEhB;AACD;AACA;AACCT,EAAAA,YAAY,EAAEtB,SAAS,CAACgC,KAAV,CAAgB,CAC7B,cAD6B,EAE7B,eAF6B,EAG7B,gBAH6B,EAI7B,aAJ6B,EAK7B,gBAL6B,EAM7B,iBAN6B,EAO7B,iBAP6B,EAQ7B,MAR6B,CAAhB,CArEE;;AA+EhB;AACD;AACA;AACCrB,EAAAA,IAAI,EAAEX,SAAS,CAACgC,KAAV,CAAgB,CAAC,UAAD,EAAa,SAAb,EAAwB,OAAxB,EAAiC,QAAjC,EAA2C,OAA3C,CAAhB,CAlFU;;AAmFhB;AACD;AACA;AACCT,EAAAA,KAAK,EAAEvB,SAAS,CAACoC,MAtFD;;AAuFhB;AACD;AACA;AACCf,EAAAA,KAAK,EAAErB,SAAS,CAAC+B;AA1FD,CAAjB;AA6FAnB,IAAI,CAACL,YAAL,GAAoBA,YAApB;AAEA,eAAeK,IAAf","sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// # Icon Component\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\n// ### classNames\n// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)\n// A simple javascript utility for conditionally joining classNames together.\nimport classNames from '../../utilities/class-names';\n\n// ## Children\nimport UtilityIcon from '../utilities/utility-icon';\n\nimport IconBackgrounds from '../../utilities/product-tokens/icon-backgrounds';\n\nimport { ICON } from '../../utilities/constants';\n\nconst defaultProps = {\n\tassistiveText: {},\n\tcategory: 'standard',\n\tcolorVariant: 'default',\n\tsize: 'medium',\n};\n\n/**\n * The Icon component is the Lightning Design System Icon component and should be used for naked icons. For icons that are buttons, use the <a href='/components/buttons/'>Button component</a> component with <code>variant='icon'</code>.\n */\nconst Icon = (props) => {\n\tcheckProps(ICON, props, componentDoc);\n\tconst {\n\t\tcategory,\n\t\tclassName,\n\t\tcolorVariant,\n\t\tcontainerClassName,\n\t\tcontainerStyle,\n\t\ticon,\n\t\tinverse,\n\t\tname,\n\t\tpath,\n\t\tsize,\n\t\ttitle,\n\t\tproductTheme,\n\t} = props;\n\n\tlet { style } = props;\n\tif (productTheme) {\n\t\tstyle = { backgroundColor: IconBackgrounds[productTheme], ...style };\n\t}\n\tconst assistiveText =\n\t\ttypeof props.assistiveText === 'string'\n\t\t\t? props.assistiveText\n\t\t\t: {\n\t\t\t\t\t...defaultProps.assistiveText,\n\t\t\t\t\t...props.assistiveText,\n\t\t\t }.label;\n\n\tconst kababCaseName = name ? name.replace(/_/g, '-') : '';\n\n\treturn (\n\t\t<span\n\t\t\tclassName={classNames(\n\t\t\t\t{\n\t\t\t\t\t'slds-icon_container': category !== 'utility',\n\t\t\t\t\t'slds-icon_container_circle': category === 'action',\n\t\t\t\t\t[`slds-icon-${category}-${kababCaseName}`]:\n\t\t\t\t\t\tcategory !== 'utility' && category !== 'doctype' && !path,\n\t\t\t\t},\n\t\t\t\tcontainerClassName\n\t\t\t)}\n\t\t\tstyle={containerStyle}\n\t\t\ttitle={title}\n\t\t>\n\t\t\t<UtilityIcon\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tcategory={category}\n\t\t\t\tclassName={classNames(className, 'slds-icon', {\n\t\t\t\t\t'slds-icon_xx-small': size === 'xx-small',\n\t\t\t\t\t'slds-icon_x-small': size === 'x-small',\n\t\t\t\t\t'slds-icon_small': size === 'small',\n\t\t\t\t\t// medium intentially not present\n\t\t\t\t\t'slds-icon_large': size === 'large',\n\t\t\t\t\t// if category is `utility` and `inverse` is false (default), icon will be dark // return true\n\t\t\t\t\t// if category is `utility` and `inverse` is true, icon will be light // return false\n\t\t\t\t\t// if category is NOT `utility` and `inverse` is false (default), icon will be light // return false\n\t\t\t\t\t// if category is NOT `utility` and `inverse` is true, icon will be dark // return true\n\t\t\t\t\t'slds-icon-text-default':\n\t\t\t\t\t\tcolorVariant === 'default' && category === 'utility'\n\t\t\t\t\t\t\t? !inverse\n\t\t\t\t\t\t\t: inverse,\n\t\t\t\t\t'slds-icon-text-success': colorVariant === 'success',\n\t\t\t\t\t'slds-icon-text-warning': colorVariant === 'warning',\n\t\t\t\t\t'slds-icon-text-error': colorVariant === 'error',\n\t\t\t\t\t'slds-icon-text-light': colorVariant === 'light',\n\t\t\t\t})}\n\t\t\t\ticon={icon}\n\t\t\t\tname={name}\n\t\t\t\tpath={path}\n\t\t\t\tstyle={style}\n\t\t\t/>\n\t\t\t{assistiveText ? (\n\t\t\t\t<span className=\"slds-assistive-text\">{assistiveText}</span>\n\t\t\t) : (\n\t\t\t\t''\n\t\t\t)}\n\t\t</span>\n\t);\n};\n\n// ### Display Name\n// Always use the canonical component name as the React display name.\nIcon.displayName = ICON;\n\n// ### Prop Types\nIcon.propTypes = {\n\t/**\n\t * **Assistive text for accessibility.**\n\t * This object is merged with the default props object on every render.\n\t * * `label`: Text that is visually hidden but read aloud by screenreaders to tell the user what the icon means. Naked icons must have assistive text, however, if you also have visible descriptive text with the icon, declare this prop as <code>assistiveText=''</code>.\n\t */\n\tassistiveText: PropTypes.shape({\n\t\tlabel: PropTypes.string,\n\t}),\n\t/**\n\t * Icon category from [lightningdesignsystem.com/icons/](https://www.lightningdesignsystem.com/icons/)\n\t */\n\tcategory: PropTypes.oneOf([\n\t\t'action',\n\t\t'custom',\n\t\t'doctype',\n\t\t'standard',\n\t\t'utility',\n\t]).isRequired,\n\t/**\n\t * CSS classes that are applied to the SVG.\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * CSS classes that are applied to the span.\n\t */\n\tcontainerClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * Styles that are applied to the span.\n\t */\n\tcontainerStyle: PropTypes.object,\n\t/**\n\t * Icon color variants\n\t */\n\tcolorVariant: PropTypes.oneOf([\n\t\t'base',\n\t\t'default',\n\t\t'error',\n\t\t'light',\n\t\t'warning',\n\t\t'success',\n\t]),\n\t/**\n\t * A custom SVG object to use instead of the supplied SLDS icons, look in `design-system-react/icons` for examples and syntax.\n\t */\n\ticon: PropTypes.object,\n\t/**\n\t * Setting `inverse` to true will switch the color of the icon: light to dark, dark to light.\n\t */\n\tinverse: PropTypes.bool,\n\t/**\n\t * Name of the icon. Visit <a href='http://www.lightningdesignsystem.com/resources/icons'>Lightning Design System Icons</a> to reference icon names.\n\t */\n\tname: PropTypes.string,\n\t/**\n\t * Path to the icon. This will override any global icon settings\n\t */\n\tpath: PropTypes.string,\n\t/**\n\t * Background theme color for the icon. **Only compatible with icon category `standard`**\n\t */\n\tproductTheme: PropTypes.oneOf([\n\t\t'global-setup',\n\t\t'service-cloud',\n\t\t'industry-cloud',\n\t\t'sales-cloud',\n\t\t'commerce-cloud',\n\t\t'community-cloud',\n\t\t'marketing-cloud',\n\t\t'quip',\n\t]),\n\t/**\n\t * Size of the icon. Visit [lightningdesignsystem.com/components/icons/#flavor-sizes](https://www.lightningdesignsystem.com/components/icons/#flavor-sizes)\n\t */\n\tsize: PropTypes.oneOf(['xx-small', 'x-small', 'small', 'medium', 'large']),\n\t/**\n\t * Custom styles to be passed to the SVG. Could be used to change icon or background color.\n\t */\n\tstyle: PropTypes.object,\n\t/**\n\t * Title attribute for the icon container\n\t */\n\ttitle: PropTypes.string,\n};\n\nIcon.defaultProps = defaultProps;\n\nexport default Icon;\n"],"file":"index.js"}
|
|
@@ -33,7 +33,7 @@ declare module '@salesforce/design-system-react/components/icon' {
|
|
|
33
33
|
/**
|
|
34
34
|
* Icon color variants
|
|
35
35
|
*/
|
|
36
|
-
colorVariant?: 'base' | 'default' | 'error' | 'light' | 'warning';
|
|
36
|
+
colorVariant?: 'base' | 'default' | 'success' | 'error' | 'light' | 'warning';
|
|
37
37
|
/**
|
|
38
38
|
* A custom SVG object to use instead of the supplied SLDS icons, look in `design-system-react/icons` for examples and syntax.
|
|
39
39
|
*/
|
|
@@ -725,11 +725,11 @@ var MenuDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
725
725
|
|
|
726
726
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
|
|
727
727
|
if (event.keyCode) {
|
|
728
|
-
if (event.keyCode === KEYS.
|
|
728
|
+
if (event.keyCode === KEYS.TAB) {
|
|
729
|
+
_this.handleCancel();
|
|
730
|
+
} else if (event.keyCode === KEYS.ENTER || event.keyCode === KEYS.SPACE || event.keyCode === KEYS.DOWN || event.keyCode === KEYS.UP || event.keyCode === KEYS.ESCAPE) {
|
|
729
731
|
EventUtil.trap(event);
|
|
730
|
-
}
|
|
731
732
|
|
|
732
|
-
if (event.keyCode !== KEYS.TAB) {
|
|
733
733
|
var isOpen = _this.getIsOpen();
|
|
734
734
|
|
|
735
735
|
_this.handleKeyboardNavigate({
|
|
@@ -741,8 +741,6 @@ var MenuDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
741
741
|
target: event.target,
|
|
742
742
|
toggleOpen: _this.toggleOpen
|
|
743
743
|
});
|
|
744
|
-
} else {
|
|
745
|
-
_this.handleCancel();
|
|
746
744
|
}
|
|
747
745
|
|
|
748
746
|
if (_this.props.onKeyDown) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.tmp-es/components/menu-dropdown/menu-dropdown.jsx"],"names":["React","PropTypes","ReactDOM","requiredIf","classNames","isFunction","isEqual","shortid","Dialog","List","ListItem","ListItemLabel","DefaultTrigger","checkProps","componentDoc","EventUtil","KeyBuffer","keyboardNavigate","KEYS","MENU_DROPDOWN","MENU_DROPDOWN_TRIGGER","LIST","IconSettingsContext","documentDefined","document","overlay","createElement","style","top","left","width","height","position","currentOpenDropdown","DropdownNubbinPositions","noop","itemIsSelectable","item","type","disabled","getNavigableItems","items","navigableItems","indexes","keyBuffer","Array","isArray","forEach","index","push","text","label","toLowerCase","getMenu","componentRef","findDOMNode","querySelector","getMenuItem","menuItemId","context","menuItem","getElementById","DropdownToDialogNubbinMapping","bottom","propTypes","align","oneOf","assistiveText","object","buttonClassName","oneOfType","array","string","buttonInverse","bool","buttonVariant","checkmark","children","node","className","containerClassName","hasStaticAlignment","hint","hoverCloseDelay","number","iconCategory","props","iconName","iconPosition","iconVariant","iconSize","id","inverse","isOpen","listItemRenderer","func","length","menuPosition","menuStyle","nubbinPosition","onBlur","onClick","onFocus","openOn","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onSelect","onOpen","onClose","options","tabIndex","value","tooltip","tooltipMenuItem","triggerClassName","multiple","defaultProps","MenuDropdown","generatedId","state","foundIndex","some","element","undefined","menuId","getId","isHover","isUnmounting","trigger","focus","list","listItems","nextProps","values","currentIndices","filter","getIndexByValue","map","selectedIndices","selectedIndex","triggerRendered","setState","requestFocus","onRequestFocus","triggerContainer","listItem","focusedIndex","handleKeyboardFocus","getIsOpen","handleClose","event","handleOpenForHover","clearTimeout","isClosing","setTimeout","handleCloseForHover","handleOpen","setFocus","indexOf","concat","deselectIndex","currentSelected","splice","option","getValueByIndex","optionIndex","keyCode","ENTER","SPACE","DOWN","UP","trap","TAB","handleKeyboardNavigate","key","handleSelect","target","toggleOpen","handleCancel","componentContext","currentFocusedIndex","menu","getListItemId","focusMenuItem","scrollToMenuItem","getElementsByTagName","menuHeight","offsetHeight","menuTop","scrollTop","menuItemTop","offsetTop","menuBottom","menuItemBottom","customListProps","saveRefToListItem","getListItemRenderer","saveRefToList","customContent","customContentWithListPropInjection","Children","child","displayName","renderDefaultMenuContent","clonedCustomContent","cloneElement","handleClickCustomContent","generate","outsideClickIgnoreClass","hasNubbin","positionClassName","positions","split","isInline","menuStylesBase","transform","inheritTargetWidth","offset","handleKeyDown","renderMenuContent","appendChild","parentNode","removeChild","currentSelectedIndices","getCurrentSelectedIndices","prevProps","nextState","renderOverlay","CurrentTrigger","CustomTriggerChildProps","renderDialog","handleClick","handleFocus","handleMouseEnter","handleMouseLeave","saveRefToTriggerContainer","saveRefToTrigger","Component","contextType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;AAEA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,WAArB;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AAEA,OAAOC,UAAP,MAAuB,YAAvB,C,CAEA;;AACA,OAAOC,UAAP,MAAuB,mBAAvB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AAEA,OAAOC,OAAP,MAAoB,SAApB,C,CAEA;;AACA,OAAOC,MAAP,MAAmB,qBAAnB;AACA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,QAAP,MAAqB,6BAArB;AACA,OAAOC,aAAP,MAA0B,mCAA1B,C,CAEA;;AACA,OAAOC,cAAP,MAA2B,kBAA3B,C,CAEA;AACA;;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEA,OAAOC,SA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H,gBA5ClB;AA6CC,QAAA,OAAO,EAAE,KAAKxJ,KAAL,CAAWX;AA7CrB,SA8CK4J,uBA9CL,EADD;AAkDA;;;;EA9pByBvO,KAAK,CAAC+O,S;;gBAA3BxH,Y,iBACgBpG,a;;AAgqBtBoG,YAAY,CAACyH,WAAb,GAA2B1N,mBAA3B;AACAiG,YAAY,CAACvD,SAAb,GAAyBA,SAAzB;AACAuD,YAAY,CAACD,YAAb,GAA4BA,YAA5B;AAEA,eAAeC,YAAf;AACA,SAAS7G,QAAT,EAAmBC,aAAnB,EAAkCuB,uBAAlC","sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Dropdown design pattern](https://www.lightningdesignsystem.com/components/menus/#flavor-dropdown) in React. Child elements that do not have the display name of the value of `MENU_DROPDOWN_TRIGGER` in `components/constants.js` will be considered custom content and rendered in the popover.\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport requiredIf from 'react-required-if';\n\nimport classNames from 'classnames';\n\n// ### isFunction\nimport isFunction from 'lodash.isfunction';\nimport isEqual from 'lodash.isequal';\n\nimport shortid from 'shortid';\n\n// ### Children\nimport Dialog from '../utilities/dialog';\nimport List from '../utilities/menu-list';\nimport ListItem from '../utilities/menu-list/item';\nimport ListItemLabel from '../utilities/menu-list/item-label';\n\n// This is the the default Dropdown Trigger, which expects one button as a child.\nimport DefaultTrigger from './button-trigger';\n\n// This component's `checkProps` which issues warnings to developers about properties\n// when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport EventUtil from '../../utilities/event';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyboardNavigate from '../../utilities/keyboard-navigate';\nimport KEYS from '../../utilities/key-code';\nimport {\n\tMENU_DROPDOWN,\n\tMENU_DROPDOWN_TRIGGER,\n\tLIST,\n} from '../../utilities/constants';\nimport { IconSettingsContext } from '../icon-settings';\n\nconst documentDefined = typeof document !== 'undefined';\n\n// The overlay is an optional way to allow the dropdown to close on outside\n// clicks even when those clicks are over areas that wouldn't normally fire\n// click or touch events (for example, iframes). A single overlay is shared\n// between all dropdowns in the app.\nconst overlay = documentDefined\n\t? document.createElement('span')\n\t: { style: {} };\noverlay.style.top = 0;\noverlay.style.left = 0;\noverlay.style.width = '100%';\noverlay.style.height = '100%';\noverlay.style.position = 'absolute';\n\nlet currentOpenDropdown;\n\nconst DropdownNubbinPositions = [\n\t'top left',\n\t'top',\n\t'top right',\n\t'bottom left',\n\t'bottom',\n\t'bottom right',\n];\n\n// # Keyboard Navigable mixin\n\nconst noop = () => {};\n\nconst itemIsSelectable = (item) =>\n\titem.type !== 'header' && item.type !== 'divider' && !item.disabled;\n\nconst getNavigableItems = (items) => {\n\tconst navigableItems = [];\n\tnavigableItems.indexes = [];\n\tnavigableItems.keyBuffer = new KeyBuffer();\n\n\tif (Array.isArray(items)) {\n\t\titems.forEach((item, index) => {\n\t\t\tif (itemIsSelectable(item)) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tnavigableItems.push({\n\t\t\t\t\tindex,\n\t\t\t\t\ttext: `${item.label}`.toLowerCase(),\n\t\t\t\t});\n\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tnavigableItems.indexes.push(index);\n\t\t\t}\n\t\t});\n\t}\n\n\treturn navigableItems;\n};\n\nfunction getMenu(componentRef) {\n\treturn ReactDOM.findDOMNode(componentRef).querySelector('ul.dropdown__list'); // eslint-disable-line react/no-find-dom-node\n}\n\nfunction getMenuItem(menuItemId, context = document) {\n\tlet menuItem;\n\n\tif (menuItemId) {\n\t\tmenuItem = context.getElementById(menuItemId);\n\t}\n\n\treturn menuItem;\n}\n\n/*\n * Dropdowns with nubbins have a different API from other Dialogs\n *\n * Dialog receives an alignment position and whether it has a nubbin. The nubbin position is inferred from the align.\n * Dropdowns have a nubbinPosition which dictates the align, but in an inverse fashion which then gets inversed back by the Dialog.\n *\n * Since Dialog is the future API and we don't want to break backwards compatability, we currently map to the Dialog api here. Even if Dialog will map it again.\n * TODO - deprecate nubbinPosition in favor for additional `align` values and a flag to show a nubbin.\n */\nconst DropdownToDialogNubbinMapping = {\n\ttop: 'bottom',\n\t'top left': 'bottom left',\n\t'top right': 'bottom right',\n\n\tbottom: 'top',\n\t'bottom left': 'top left',\n\t'bottom right': 'top right',\n};\n\nconst propTypes = {\n\t/**\n\t * Aligns the menu center, right, or left respective to the trigger. This is not intended for use with `nubbinPosition`.\n\t */\n\talign: PropTypes.oneOf(['center', 'left', 'right']),\n\t/**\n\t * This prop is passed onto the triggering `Button`. Text that is visually hidden but read aloud by screenreaders to tell the user what the icon means. You can omit this prop if you are using the `label` prop.\n\t */\n\tassistiveText: PropTypes.object,\n\t/**\n\t * CSS classes to be added to triggering button.\n\t */\n\tbuttonClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * If true, button/icon is white. Meant for buttons or utility icons on dark backgrounds.\n\t */\n\tbuttonInverse: PropTypes.bool,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Determines variant of the Button component that triggers dropdown.\n\t */\n\tbuttonVariant: PropTypes.oneOf([\n\t\t'base',\n\t\t'neutral',\n\t\t'brand',\n\t\t'destructive',\n\t\t'icon',\n\t]),\n\t/**\n\t * If true, renders checkmark icon on the selected Menu Item.\n\t */\n\tcheckmark: PropTypes.bool,\n\t/**\n\t * If you need custom content _and_ a list, use a `<Popover>` instead.\n\t */\n\tchildren: PropTypes.node,\n\t/**\n\t * CSS classes to be added to dropdown menu.\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * By default, these class names will be added to the absolutely-positioned `Dialog` component.\n\t */\n\tcontainerClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * This prop is passed onto the triggering `Button`. Prevent dropdown menu from opening. Also applies disabled styling to trigger button.\n\t */\n\tdisabled: PropTypes.bool,\n\t/**\n\t * Prevents the dropdown from changing position based on the viewport/window. If set to true your dropdowns can extend outside the viewport _and_ overflow outside of a scrolling parent. If this happens, you might want to consider making the dropdowns contents scrollable to fit the menu on the screen. `hasStaticAlignment` disables this behavior and allows this component to extend beyond boundary elements. _Not tested._\n\t */\n\thasStaticAlignment: PropTypes.bool,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Associates an icon button with another element on the page by changes the color of the SVG. Please reference <a href=\"http://www.lightningdesignsystem.com/components/buttons/#hint\">Lightning Design System Buttons > Hint</a>.\n\t */\n\thint: PropTypes.bool,\n\t/**\n\t * Delay on menu closing in milliseconds.\n\t */\n\thoverCloseDelay: PropTypes.number,\n\t/**\n\t * Name of the icon category. Visit <a href=\"http://www.lightningdesignsystem.com/resources/icons\">Lightning Design System Icons</a> to reference icon categories.\n\t */\n\ticonCategory: requiredIf(\n\t\tPropTypes.oneOf(['action', 'custom', 'doctype', 'standard', 'utility']),\n\t\t(props) => !!props.iconName\n\t),\n\t/**\n\t * Name of the icon. Visit <a href=\"http://www.lightningdesignsystem.com/resources/icons\">Lightning Design System Icons</a> to reference icon names.\n\t */\n\ticonName: PropTypes.string,\n\t/**\n\t * If omitted, icon position is centered.\n\t */\n\ticonPosition: PropTypes.oneOf(['left', 'right']),\n\t/**\n\t * For icon variants, please reference <a href=\"http://www.lightningdesignsystem.com/components/buttons/#icon\">Lightning Design System Icons</a>.\n\t */\n\ticonVariant: PropTypes.oneOf([\n\t\t'bare',\n\t\t'container',\n\t\t'border',\n\t\t'border-filled',\n\t\t'small',\n\t\t'more',\n\t]),\n\t/**\n\t * Determines the size of the icon.\n\t */\n\ticonSize: PropTypes.oneOf(['x-small', 'small', 'medium', 'large']),\n\t/**\n\t * A unique ID is needed in order to support keyboard navigation, ARIA support, and connect the dropdown to the triggering button.\n\t */\n\tid: PropTypes.string,\n\t/**\n\t * Adds inverse class to the dropdown\n\t */\n\tinverse: PropTypes.bool,\n\t/**\n\t * Forces the dropdown to be open or closed. See controlled/uncontrolled callback/prop pattern for more on suggested use view [Concepts and Best Practices](https://github.com/salesforce-ux/design-system-react/blob/master/CONTRIBUTING.md#concepts-and-best-practices)\n\t */\n\tisOpen: PropTypes.bool,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Text within the trigger button.\n\t */\n\tlabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n\t/**\n\t * Custom element that overrides the default Menu Item component.\n\t */\n\tlistItemRenderer: PropTypes.func,\n\t/**\n\t * This prop is passed into the List for the menu. Pass null to make it the size of the content, or a string with an integer from here: https://www.lightningdesignsystem.com/components/menus/#flavor-dropdown-height\n\t */\n\tlength: PropTypes.oneOf([null, '5', '7', '10', 5, 7, 10]),\n\t/**\n\t * Please select one of the following:\n\t * * `absolute` - (default) The dialog will use `position: absolute` and style attributes to position itself. This allows inverted placement or flipping of the dialog.\n\t * * `overflowBoundaryElement` - The dialog will overflow scrolling parents. Use on elements that are aligned to the left or right of their target and don't care about the target being within a scrolling parent. Typically this is a popover or tooltip. Dropdown menus can usually open up and down if no room exists. In order to achieve this a portal element will be created and attached to `body`. This element will render into that detached render tree.\n\t * * `relative` - No styling or portals will be used. Menus will be positioned relative to their triggers. This is a great choice for HTML snapshot testing.\n\t */\n\tmenuPosition: PropTypes.oneOf([\n\t\t'absolute',\n\t\t'overflowBoundaryElement',\n\t\t'relative',\n\t]),\n\t/**\n\t * Style applied to menu element (that is the `.slds-dropdown` element)\n\t */\n\tmenuStyle: PropTypes.object,\n\t/**\n\t * Positions dropdown menu with a nubbin--that is the arrow notch. The placement options correspond to the placement of the nubbin. This is implemeted with CSS classes and is best used with a `Button` with \"icon container\" styling (`iconVariant=\"container\"`). Use with `isInline` prop, since positioning is determined by CSS via absolute-relative positioning, and using an absolutely positioned menu will not position the menu correctly without manual offsets.\n\t */\n\tnubbinPosition: PropTypes.oneOf([\n\t\t'top left',\n\t\t'top',\n\t\t'top right',\n\t\t'bottom left',\n\t\t'bottom',\n\t\t'bottom right',\n\t]),\n\t/**\n\t * Called when the triggering button loses focus.\n\t */\n\tonBlur: PropTypes.func,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Triggered when the trigger button is clicked.\n\t */\n\tonClick: PropTypes.func,\n\t/**\n\t * Called when the triggering button gains focus.\n\t */\n\tonFocus: PropTypes.func,\n\t/**\n\t * Determines if mouse hover or click opens or closes the dropdown menu. The default of `click` opens the menu on click, touch, or keyboard navigation and is highly recommended to comply with accessibility standards. The other options are `hover` which opens when the mouse enters the focusable area, and `hybrid` which causes the menu to open on clicking of the trigger, but closes the menu when the mouse leaves the menu and trigger area. If you are planning on using `hover` or `hybrid`, please pause a moment and reconsider.\n\t */\n\topenOn: PropTypes.oneOf(['hover', 'click', 'hybrid']),\n\t/**\n\t * Called when a key pressed.\n\t */\n\tonKeyDown: PropTypes.func,\n\t/**\n\t * Called when mouse clicks down on the trigger button.\n\t */\n\tonMouseDown: PropTypes.func,\n\t/**\n\t * Called when mouse hovers over the trigger button. This is only called if `this.props.openOn` is set to `hover`.\n\t */\n\tonMouseEnter: PropTypes.func,\n\t/**\n\t * Called when mouse hover leaves the trigger button. This is only called if `this.props.openOn` is set to `hover`.\n\t */\n\tonMouseLeave: PropTypes.func,\n\t/**\n\t * Triggered when an item in the menu is clicked.\n\t */\n\tonSelect: PropTypes.func,\n\t/**\n\t * Triggered when the dropdown is opened.\n\t */\n\tonOpen: PropTypes.func,\n\t/**\n\t * Triggered when the dropdown is closed.\n\t */\n\tonClose: PropTypes.func,\n\t/**\n\t * An array of menu item objects. `className` and `id` object keys are applied to the `li` DOM node. `divider` key can have a value of `top` or `bottom`. `rightIcon` and `leftIcon` are not actually `Icon` components, but prop objects that get passed to an `Icon` component. The `href` key will be added to the `a` and its default click event will be prevented. Here is a sample:\n\t * ```\n\t * [{\n\t * className: 'custom-li-class',\n\t * divider: 'bottom',\n\t * label: 'A Header',\n\t * type: 'header'\n\t * }, {\n\t * href: 'http://sfdc.co/',\n\t * id: 'custom-li-id',\n\t * label: 'Has a value',\n\t * leftIcon: {\n\t * name: 'settings',\n\t * category: 'utility'\n\t * },\n\t * rightIcon: {\n\t * name: 'settings',\n\t * category: 'utility'\n\t * },\n\t * type: 'item',\n\t * value: 'B0'\n\t * }, {\n\t * tooltipContent: 'Displays a tooltip when hovered over with this content. The `tooltipMenuItem` prop must be set for this to work.',\n\t * type: 'divider'\n\t * }]\n\t * ```\n\t */\n\toptions: PropTypes.array,\n\t/**\n\t * An object of CSS styles that are applied to the triggering button.\n\t */\n\tstyle: PropTypes.object,\n\t/**\n\t * Write <code>\"-1\"</code> if you don't want the user to tab to the button.\n\t */\n\ttabIndex: PropTypes.string,\n\t/**\n\t * If `true`, adds a transparent overlay when the menu is open to handle outside clicks. Allows clicks on iframes to be captured, but also forces a double-click to interact with other elements. If a function is passed, custom overlay logic may be defined by the app.\n\t */\n\toverlay: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n\t/**\n\t * Current selected menu item.\n\t */\n\tvalue: PropTypes.oneOfType([\n\t\tPropTypes.number,\n\t\tPropTypes.string,\n\t\tPropTypes.array,\n\t]),\n\t/**\n\t * This prop is passed onto the triggering `Button`. It creates a tooltip with the content of the `node` provided.\n\t */\n\ttooltip: PropTypes.node,\n\t/**\n\t * Accepts a `Tooltip` component to be used as the template for menu item tooltips that appear via the `tooltipContent` options object attribute. Must be present for `tooltipContent` to work\n\t */\n\ttooltipMenuItem: PropTypes.node,\n\t/**\n\t * CSS classes to be added to wrapping trigger `div` around the button.\n\t */\n\ttriggerClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * Whether this dropdown supports multi select.\n\t */\n\tmultiple: PropTypes.bool,\n\t/**\n\t * To adjust the width of the menu dropdown\n\t */\n\twidth: PropTypes.oneOf([\n\t\t'xx-small',\n\t\t'x-small',\n\t\t'small',\n\t\t'medium',\n\t\t'bottom',\n\t\t'large',\n\t]),\n};\n\nconst defaultProps = {\n\talign: 'left',\n\thoverCloseDelay: 300,\n\tlength: '5',\n\tmenuPosition: 'absolute',\n\topenOn: 'click',\n\twidth: 'medium',\n\tinverse: false,\n};\n\n/**\n * The MenuDropdown component is a variant of the Lightning Design System Menu component. This component\n * may require a polyfill such as [classList](https://github.com/yola/classlist-polyfill) due to\n * [react-onclickoutside](https://github.com/Pomax/react-onclickoutside) if Internet Explorer 11\n * support is needed.\n *\n * This component is wrapped in a [higher order component to listen for clicks outside itself](https://github.com/kentor/react-click-outside) and thus requires use of `ReactDOM`.\n */\nclass MenuDropdown extends React.Component {\n\tstatic displayName = MENU_DROPDOWN;\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\t// `checkProps` issues warnings to developers about properties (similar to React's built in development tools)\n\t\tcheckProps(MENU_DROPDOWN, props, componentDoc);\n\n\t\tthis.generatedId = shortid.generate();\n\n\t\tconst currentSelectedIndices = this.getCurrentSelectedIndices(props);\n\n\t\tthis.state = {\n\t\t\tfocusedIndex: -1,\n\t\t\tselectedIndex: -1,\n\t\t\tselectedIndices: [],\n\t\t\t...currentSelectedIndices,\n\t\t};\n\n\t\tthis.navigableItems = getNavigableItems(props.options);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (prevProps.value !== this.props.value) {\n\t\t\tconst nextState = this.getCurrentSelectedIndices(this.props);\n\t\t\t// eslint-disable-next-line react/no-did-update-set-state\n\t\t\tthis.setState(nextState);\n\t\t}\n\n\t\tif (prevProps.isOpen !== this.props.isOpen) {\n\t\t\tthis.setFocus();\n\t\t}\n\n\t\tif (!isEqual(prevProps.options, this.props.options)) {\n\t\t\tthis.navigableItems = getNavigableItems(this.props.options);\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (currentOpenDropdown === this) {\n\t\t\tcurrentOpenDropdown = undefined;\n\t\t}\n\t\tthis.isUnmounting = true;\n\t\tthis.renderOverlay(false);\n\t}\n\n\tgetId = () => this.props.id || this.generatedId;\n\n\tgetIsOpen = () =>\n\t\t!!(typeof this.props.isOpen === 'boolean'\n\t\t\t? this.props.isOpen\n\t\t\t: this.state.isOpen);\n\n\tgetIndexByValue = (value, options) => {\n\t\tlet foundIndex = -1;\n\n\t\tif (options && options.length) {\n\t\t\toptions.some((element, index) => {\n\t\t\t\tif (element && element.value === value) {\n\t\t\t\t\tfoundIndex = index;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\n\t\treturn foundIndex;\n\t};\n\n\tgetValueByIndex = (index) => this.props.options[index];\n\n\tgetListItemRenderer = () =>\n\t\tthis.props.listItemRenderer ? this.props.listItemRenderer : ListItemLabel;\n\n\tgetListItemId = (index) => {\n\t\tlet menuItemId;\n\n\t\tif (index !== undefined) {\n\t\t\tconst menuId = isFunction(this.getId) ? this.getId() : this.props.id;\n\t\t\tmenuItemId = `${menuId}-item-${index}`;\n\t\t}\n\n\t\treturn menuItemId;\n\t};\n\n\tsetFocus = () => {\n\t\tif (!this.isHover && !this.isUnmounting && this.trigger) {\n\t\t\tReactDOM.findDOMNode(this.trigger).focus(); // eslint-disable-line react/no-find-dom-node\n\t\t}\n\t};\n\n\tgetMenu = () => ReactDOM.findDOMNode(this.list); // eslint-disable-line react/no-find-dom-node\n\n\tgetMenuItem = (index) => {\n\t\tif (index !== undefined && this.listItems) {\n\t\t\treturn ReactDOM.findDOMNode(this.listItems[index]); // eslint-disable-line react/no-find-dom-node\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\tgetCurrentSelectedIndices = (nextProps) => {\n\t\tif (this.props.multiple === true) {\n\t\t\tlet values = [];\n\t\t\tlet currentIndices = [];\n\t\t\tif (!Array.isArray(nextProps.value)) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tvalues.push(nextProps.value);\n\t\t\t} else {\n\t\t\t\tvalues = nextProps.value;\n\t\t\t}\n\t\t\tvalues = values.filter(\n\t\t\t\t(value) => this.getIndexByValue(value, nextProps.options) !== -1\n\t\t\t);\n\t\t\tcurrentIndices = values.map((value) =>\n\t\t\t\tthis.getIndexByValue(value, nextProps.options)\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tselectedIndices: currentIndices,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectedIndex: this.getIndexByValue(nextProps.value, nextProps.options),\n\t\t};\n\t};\n\n\t// Trigger opens, closes, and recieves focus on close\n\tsaveRefToTrigger = (trigger) => {\n\t\tthis.trigger = trigger;\n\n\t\tif (!this.state.triggerRendered) {\n\t\t\tthis.setState({ triggerRendered: true });\n\t\t}\n\n\t\tif (trigger && this.props.requestFocus && this.props.onRequestFocus) {\n\t\t\tthis.props.onRequestFocus(trigger);\n\t\t}\n\t};\n\n\t// TriggerContainer is the wrapping outer DOM element which may differ from the actual trigger which is most likely a `button`.\n\tsaveRefToTriggerContainer = (triggerContainer) => {\n\t\tthis.triggerContainer = triggerContainer;\n\t\tif (!this.trigger) this.trigger = triggerContainer;\n\t};\n\n\tsaveRefToList = (list) => {\n\t\tthis.list = list;\n\t};\n\n\tsaveRefToListItem = (listItem, index) => {\n\t\tif (!this.listItems) {\n\t\t\tthis.listItems = {};\n\t\t}\n\n\t\tthis.listItems[index] = listItem;\n\n\t\tif (index === this.state.focusedIndex) {\n\t\t\tthis.handleKeyboardFocus(this.state.focusedIndex);\n\t\t}\n\t};\n\n\thandleClose = () => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (isOpen) {\n\t\t\tif (currentOpenDropdown === this) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\n\t\t\tthis.setState({\n\t\t\t\tisOpen: false,\n\t\t\t});\n\n\t\t\tthis.isHover = false;\n\n\t\t\tif (this.props.onClose) {\n\t\t\t\tthis.props.onClose();\n\t\t\t}\n\t\t}\n\t};\n\n\thandleOpen = () => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (!isOpen) {\n\t\t\tif (currentOpenDropdown && isFunction(currentOpenDropdown.handleClose)) {\n\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t}\n\n\t\t\tcurrentOpenDropdown = this;\n\n\t\t\tthis.setState({\n\t\t\t\tisOpen: true,\n\t\t\t});\n\n\t\t\tif (this.props.onOpen) {\n\t\t\t\tthis.props.onOpen();\n\t\t\t}\n\t\t}\n\t};\n\n\thandleMouseEnter = (event) => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tthis.isHover = true;\n\n\t\tif (!isOpen && this.props.openOn === 'hover') {\n\t\t\tthis.handleOpenForHover();\n\t\t} else {\n\t\t\t// we want this clear when openOn is hover or hybrid\n\t\t\tclearTimeout(this.isClosing);\n\t\t}\n\n\t\tif (this.props.onMouseEnter) {\n\t\t\tthis.props.onMouseEnter(event);\n\t\t}\n\t};\n\n\thandleMouseLeave = (event) => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (isOpen) {\n\t\t\tthis.isClosing = setTimeout(() => {\n\t\t\t\tthis.handleCloseForHover();\n\t\t\t}, this.props.hoverCloseDelay);\n\t\t}\n\n\t\tif (this.props.onMouseLeave) {\n\t\t\tthis.props.onMouseLeave(event);\n\t\t}\n\t};\n\n\t// Special handlers for openOn === hover\n\t// calling onClick inside onMouseEnter/Leave used to cause double clicking the trigger on hover which caused closing and reopening of the dropdown\n\thandleCloseForHover = () => {\n\t\tconst isOpen = this.getIsOpen();\n\t\tif (isOpen) {\n\t\t\tthis.handleClose();\n\t\t}\n\t};\n\n\thandleOpenForHover = () => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (!isOpen) {\n\t\t\tthis.handleOpen();\n\t\t\tthis.setFocus();\n\t\t}\n\t};\n\n\thandleClick = (event) => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (!isOpen) {\n\t\t\tthis.handleOpen();\n\t\t\tthis.setFocus();\n\t\t} else {\n\t\t\tthis.handleClose();\n\t\t}\n\n\t\tif (this.props.onClick) {\n\t\t\tthis.props.onClick(event);\n\t\t}\n\t};\n\n\thandleFocus = (event) => {\n\t\tif (this.props.onFocus) {\n\t\t\tthis.props.onFocus(event);\n\t\t}\n\t};\n\n\thandleClickCustomContent = () => {\n\t\tthis.setFocus();\n\t\tthis.handleClose();\n\n\t\tif (this.props.onSelect) {\n\t\t\tthis.props.onSelect();\n\t\t}\n\t};\n\n\thandleSelect = (index) => {\n\t\tif (!this.props.multiple) {\n\t\t\tthis.setState({ selectedIndex: index });\n\t\t\tthis.handleClose();\n\t\t\tthis.setFocus();\n\t\t} else if (\n\t\t\tthis.props.multiple &&\n\t\t\tthis.state.selectedIndices.indexOf(index) === -1\n\t\t) {\n\t\t\t// eslint-disable-next-line react/no-access-state-in-setstate\n\t\t\tconst currentIndices = this.state.selectedIndices.concat(index);\n\t\t\tthis.setState({\n\t\t\t\tselectedIndices: currentIndices,\n\t\t\t});\n\t\t} else if (this.props.multiple) {\n\t\t\tconst deselectIndex = this.state.selectedIndices.indexOf(index);\n\t\t\t// eslint-disable-next-line react/no-access-state-in-setstate\n\t\t\tconst currentSelected = this.state.selectedIndices;\n\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\tcurrentSelected.splice(deselectIndex, 1);\n\t\t\tthis.setState({\n\t\t\t\tselectedIndices: currentSelected,\n\t\t\t});\n\t\t}\n\n\t\tif (this.props.onSelect) {\n\t\t\tconst option = this.getValueByIndex(index);\n\t\t\tthis.props.onSelect(option, { option, optionIndex: index });\n\t\t}\n\t};\n\n\thandleKeyDown = (event) => {\n\t\tif (event.keyCode) {\n\t\t\tif (\n\t\t\t\tevent.keyCode === KEYS.ENTER ||\n\t\t\t\tevent.keyCode === KEYS.SPACE ||\n\t\t\t\tevent.keyCode === KEYS.DOWN ||\n\t\t\t\tevent.keyCode === KEYS.UP\n\t\t\t) {\n\t\t\t\tEventUtil.trap(event);\n\t\t\t}\n\n\t\t\tif (event.keyCode !== KEYS.TAB) {\n\t\t\t\tconst isOpen = this.getIsOpen();\n\n\t\t\t\tthis.handleKeyboardNavigate({\n\t\t\t\t\tevent,\n\t\t\t\t\tisOpen,\n\t\t\t\t\tkey: event.key,\n\t\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\t\tonSelect: this.handleSelect,\n\t\t\t\t\ttarget: event.target,\n\t\t\t\t\ttoggleOpen: this.toggleOpen,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.handleCancel();\n\t\t\t}\n\n\t\t\tif (this.props.onKeyDown) {\n\t\t\t\tthis.props.onKeyDown(event);\n\t\t\t}\n\t\t}\n\t};\n\n\thandleCancel = () => {\n\t\tthis.setFocus();\n\t\tthis.handleClose();\n\t};\n\n\thandleClickOutside = () => {\n\t\tthis.handleClose();\n\t};\n\n\t// Handling open / close toggling is optional, and a default implementation is provided for handling focus, but selection _must_ be handled\n\thandleKeyboardNavigate = ({\n\t\tevent,\n\t\tisOpen = true,\n\t\tkeyCode,\n\t\tonFocus = this.handleKeyboardFocus,\n\t\tonSelect,\n\t\ttarget,\n\t\ttoggleOpen = noop,\n\t}) => {\n\t\tkeyboardNavigate({\n\t\t\tcomponentContext: this,\n\t\t\tcurrentFocusedIndex: this.state.focusedIndex,\n\t\t\tevent,\n\t\t\tisOpen,\n\t\t\tkeyCode,\n\t\t\tnavigableItems: this.navigableItems,\n\t\t\tonFocus,\n\t\t\tonSelect,\n\t\t\ttarget,\n\t\t\ttoggleOpen,\n\t\t});\n\t};\n\n\t// This is a bit of an anti-pattern, but it has the upside of being a nice default. Component authors can always override to only set state and do their own focusing in their subcomponents.\n\thandleKeyboardFocus = (focusedIndex) => {\n\t\tif (this.state.focusedIndex !== focusedIndex) {\n\t\t\tthis.setState({ focusedIndex });\n\t\t}\n\n\t\tconst menu = isFunction(this.getMenu) ? this.getMenu() : getMenu(this);\n\n\t\tconst menuItem = isFunction(this.getMenuItem)\n\t\t\t? this.getMenuItem(focusedIndex, menu)\n\t\t\t: getMenuItem(this.getListItemId(focusedIndex));\n\n\t\tif (menuItem) {\n\t\t\tthis.focusMenuItem(menuItem);\n\t\t\tthis.scrollToMenuItem(menu, menuItem);\n\t\t}\n\t};\n\n\tfocusMenuItem = (menuItem) => {\n\t\tmenuItem.getElementsByTagName('a')[0].focus();\n\t};\n\n\tscrollToMenuItem = (menu, menuItem) => {\n\t\tif (menu && menuItem) {\n\t\t\tconst menuHeight = menu.offsetHeight;\n\n\t\t\tconst menuTop = menu.scrollTop;\n\t\t\tconst menuItemTop = menuItem.offsetTop - menu.offsetTop;\n\n\t\t\tif (menuItemTop < menuTop) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\tmenu.scrollTop = menuItemTop;\n\t\t\t} else {\n\t\t\t\tconst menuBottom = menuTop + menuHeight + menu.offsetTop;\n\t\t\t\tconst menuItemBottom =\n\t\t\t\t\tmenuItemTop + menuItem.offsetHeight + menu.offsetTop;\n\n\t\t\t\tif (menuItemBottom > menuBottom) {\n\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\tmenu.scrollTop = menuItemBottom - menuHeight - menu.offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleOpen = () => {\n\t\tconst isOpen = this.getIsOpen();\n\t\tthis.setFocus();\n\n\t\tif (isOpen) {\n\t\t\tthis.handleClose();\n\t\t} else {\n\t\t\tthis.handleOpen();\n\t\t}\n\t};\n\n\trenderDefaultMenuContent = (customListProps) => (\n\t\t<List\n\t\t\tkey={`${this.getId()}-dropdown-list`}\n\t\t\tcheckmark={this.props.checkmark}\n\t\t\tgetListItemId={this.getListItemId}\n\t\t\titemRefs={this.saveRefToListItem}\n\t\t\titemRenderer={this.getListItemRenderer()}\n\t\t\tonCancel={this.handleCancel}\n\t\t\tonSelect={this.handleSelect}\n\t\t\toptions={this.props.options}\n\t\t\tref={this.saveRefToList}\n\t\t\tselectedIndex={\n\t\t\t\t!this.props.multiple ? this.state.selectedIndex : undefined\n\t\t\t}\n\t\t\tselectedIndices={\n\t\t\t\tthis.props.multiple ? this.state.selectedIndices : undefined\n\t\t\t}\n\t\t\ttooltipMenuItem={this.props.tooltipMenuItem}\n\t\t\ttriggerId={this.getId()}\n\t\t\tlength={this.props.length}\n\t\t\t{...customListProps}\n\t\t/>\n\t);\n\n\trenderMenuContent = (customContent) => {\n\t\t/**\n\t\t * Custom content for dropdown was a hack done in the past. If there's more than a listbox within a dropdown, then it should be a popover as explained for the `children` prop.\n\t\t *\n\t\t * This code block shows how things are done in the past:\n\t\t * ```\n\t\t * <Dropdown>\n\t\t * <Trigger>\n\t\t * <Button iconCategory=\"utility\" iconName=\"settings\" />\n\t\t * </Trigger>\n\t\t * <div>Look ma! This is Custom Content.</div>\n\t\t * <List options={[myArray]}/>\n\t\t * </Dropdown>\n\t\t * ```\n\t\t */\n\t\tlet customContentWithListPropInjection = [];\n\t\t// Dropdown can take a Trigger component as a child and then return it as the parent DOM element.\n\t\tReact.Children.forEach(customContent, (child) => {\n\t\t\tif (child && child.type.displayName === LIST) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tcustomContentWithListPropInjection.push(\n\t\t\t\t\tthis.renderDefaultMenuContent(child.props)\n\t\t\t\t);\n\t\t\t} else if (child) {\n\t\t\t\tconst clonedCustomContent = React.cloneElement(child, {\n\t\t\t\t\tonClick: this.handleClickCustomContent,\n\t\t\t\t\tkey: shortid.generate(),\n\t\t\t\t});\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tcustomContentWithListPropInjection.push(clonedCustomContent);\n\t\t\t}\n\t\t});\n\n\t\tif (customContentWithListPropInjection.length === 0) {\n\t\t\tcustomContentWithListPropInjection = null;\n\t\t}\n\n\t\treturn (\n\t\t\tcustomContentWithListPropInjection || this.renderDefaultMenuContent()\n\t\t);\n\t};\n\n\trenderDialog = (customContent, isOpen, outsideClickIgnoreClass) => {\n\t\tlet align = 'bottom';\n\t\tlet hasNubbin = false;\n\t\tlet positionClassName = '';\n\n\t\tif (this.props.nubbinPosition) {\n\t\t\thasNubbin = true;\n\t\t\talign = DropdownToDialogNubbinMapping[this.props.nubbinPosition];\n\t\t} else if (this.props.align) {\n\t\t\talign =\n\t\t\t\tthis.props.align === 'center' ? 'bottom' : `bottom ${this.props.align}`;\n\t\t}\n\n\t\tconst positions = DropdownToDialogNubbinMapping[align].split(' ');\n\t\tpositionClassName = classNames(\n\t\t\tpositions.map((position) => `slds-dropdown_${position}`)\n\t\t);\n\n\t\t// FOR BACKWARDS COMPATIBILITY\n\t\tconst menuPosition = this.props.isInline\n\t\t\t? 'relative'\n\t\t\t: this.props.menuPosition; // eslint-disable-line react/prop-types\n\n\t\tconst menuStylesBase = {};\n\t\tif (this.props.align === 'center' && !hasNubbin) {\n\t\t\tmenuStylesBase.transform = 'none';\n\t\t}\n\n\t\treturn isOpen ? (\n\t\t\t<Dialog\n\t\t\t\talign={align}\n\t\t\t\tclassName={classNames(this.props.containerClassName)}\n\t\t\t\tcloseOnTabKey\n\t\t\t\tcontentsClassName={classNames(\n\t\t\t\t\t'slds-dropdown',\n\t\t\t\t\t`slds-dropdown_${this.props.width}`,\n\t\t\t\t\t'slds-text-align_left',\n\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tpositionClassName,\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-dropdown_inverse': this.props.inverse,\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t\tcontext={this.context}\n\t\t\t\thasNubbin={hasNubbin}\n\t\t\t\thasStaticAlignment={this.props.hasStaticAlignment}\n\t\t\t\tinheritWidthOf={this.props.inheritTargetWidth ? 'target' : 'none'}\n\t\t\t\toffset={this.props.offset}\n\t\t\t\tonClose={this.handleClose}\n\t\t\t\tonKeyDown={this.handleKeyDown}\n\t\t\t\toutsideClickIgnoreClass={outsideClickIgnoreClass}\n\t\t\t\tposition={menuPosition}\n\t\t\t\tstyle={{\n\t\t\t\t\t...menuStylesBase,\n\t\t\t\t\t...this.props.menuStyle,\n\t\t\t\t}}\n\t\t\t\tonRequestTargetElement={() => this.trigger}\n\t\t\t>\n\t\t\t\t{this.renderMenuContent(customContent)}\n\t\t\t</Dialog>\n\t\t) : null;\n\t};\n\n\trenderOverlay = (isOpen) => {\n\t\tif (isFunction(overlay) && documentDefined) {\n\t\t\toverlay(isOpen, overlay);\n\t\t} else if (\n\t\t\tthis.props.overlay &&\n\t\t\tisOpen &&\n\t\t\t!this.overlay &&\n\t\t\tdocumentDefined\n\t\t) {\n\t\t\tthis.overlay = overlay;\n\t\t\tdocument.querySelector('body').appendChild(this.overlay);\n\t\t} else if (!isOpen && this.overlay && this.overlay.parentNode) {\n\t\t\tthis.overlay.parentNode.removeChild(this.overlay);\n\t\t\tthis.overlay = undefined;\n\t\t}\n\t};\n\n\trender() {\n\t\t// Dropdowns are used by other components. The default trigger is a button, but some other components use `li` elements. The following allows `MenuDropdown` to be extended by providing a child component with the displayName of `DropdownTrigger`.\n\t\tlet CurrentTrigger = DefaultTrigger;\n\n\t\tlet CustomTriggerChildProps = {};\n\n\t\t// Child elements that do not have the display name of the value of `MENU_DROPDOWN_TRIGGER` in `components/constants.js` will be considered custom content and rendered in the popover.\n\t\tlet customContent = [];\n\n\t\t// Dropdown can take a Trigger component as a child and then return it as the parent DOM element.\n\t\tReact.Children.forEach(this.props.children, (child) => {\n\t\t\tif (child && child.type.displayName === MENU_DROPDOWN_TRIGGER) {\n\t\t\t\t// `CustomTriggerChildProps` is not used by the default button Trigger, but by other triggers\n\t\t\t\tCustomTriggerChildProps = child.props;\n\t\t\t\tCurrentTrigger = child.type;\n\t\t\t} else if (child) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tcustomContent.push(child);\n\t\t\t}\n\t\t});\n\n\t\tif (customContent.length === 0) {\n\t\t\tcustomContent = null;\n\t\t}\n\n\t\tconst outsideClickIgnoreClass = `ignore-click-${this.getId()}`;\n\t\tconst isOpen = !this.props.disabled && this.getIsOpen() && !!this.trigger;\n\n\t\tthis.renderOverlay(isOpen);\n\n\t\t/* Below are three sections of props:\n\t\t - The first are the props that may be given by the dropdown component. These may get deprecated in the future.\n\t\t - The next set of props (`CustomTriggerChildProps`) are props that can be overwritten by the end developer.\n\t\t - The final set are props that should not be overwritten, since they are ones that tie the trigger to the dropdown menu.\n\t\t*/\n\n\t\treturn (\n\t\t\t<CurrentTrigger\n\t\t\t\taria-haspopup\n\t\t\t\tassistiveText={this.props.assistiveText}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\toutsideClickIgnoreClass,\n\t\t\t\t\tthis.props.buttonClassName\n\t\t\t\t)}\n\t\t\t\tdisabled={this.props.disabled}\n\t\t\t\thint={this.props.hint}\n\t\t\t\ticonCategory={this.props.iconCategory}\n\t\t\t\ticonName={this.props.iconName}\n\t\t\t\ticonPosition={this.props.iconPosition}\n\t\t\t\ticonSize={this.props.iconSize}\n\t\t\t\ticonVariant={this.props.iconVariant}\n\t\t\t\tid={this.getId()}\n\t\t\t\tinverse={this.props.buttonInverse}\n\t\t\t\tisOpen={isOpen}\n\t\t\t\tlabel={this.props.label}\n\t\t\t\tmenu={this.renderDialog(customContent, isOpen, outsideClickIgnoreClass)}\n\t\t\t\tonBlur={this.props.onBlur}\n\t\t\t\tonClick={\n\t\t\t\t\tthis.props.openOn === 'click' || this.props.openOn === 'hybrid'\n\t\t\t\t\t\t? this.handleClick\n\t\t\t\t\t\t: this.props.onClick\n\t\t\t\t}\n\t\t\t\tonFocus={this.handleFocus}\n\t\t\t\tonKeyDown={this.handleKeyDown}\n\t\t\t\tonMouseDown={this.props.onMouseDown}\n\t\t\t\tonMouseEnter={\n\t\t\t\t\tthis.props.openOn === 'hover' || this.props.openOn === 'hybrid'\n\t\t\t\t\t\t? this.handleMouseEnter\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t\tonMouseLeave={\n\t\t\t\t\tthis.props.openOn === 'hover' || this.props.openOn === 'hybrid'\n\t\t\t\t\t\t? this.handleMouseLeave\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t\topenOn={this.props.openOn}\n\t\t\t\tref={this.saveRefToTriggerContainer}\n\t\t\t\tstyle={this.props.style}\n\t\t\t\ttabIndex={this.props.tabIndex || (isOpen ? '-1' : '0')}\n\t\t\t\ttooltip={this.props.tooltip}\n\t\t\t\ttriggerClassName={this.props.triggerClassName}\n\t\t\t\ttriggerRef={this.saveRefToTrigger}\n\t\t\t\tvariant={this.props.buttonVariant}\n\t\t\t\t{...CustomTriggerChildProps}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nMenuDropdown.contextType = IconSettingsContext;\nMenuDropdown.propTypes = propTypes;\nMenuDropdown.defaultProps = defaultProps;\n\nexport default MenuDropdown;\nexport { ListItem, ListItemLabel, DropdownNubbinPositions };\n"],"file":"menu-dropdown.js"}
|
|
1
|
+
{"version":3,"sources":["../../../.tmp-es/components/menu-dropdown/menu-dropdown.jsx"],"names":["React","PropTypes","ReactDOM","requiredIf","classNames","isFunction","isEqual","shortid","Dialog","List","ListItem","ListItemLabel","DefaultTrigger","checkProps","componentDoc","EventUtil","KeyBuffer","keyboardNavigate","KEYS","MENU_DROPDOWN","MENU_DROPDOWN_TRIGGER","LIST","IconSettingsContext","documentDefined","document","overlay","createElement","style","top","left","width","height","position","currentOpenDropdown","DropdownNubbinPositions","noop","itemIsSelectable","item","type","disabled","getNavigableItems","items","navigableItems","indexes","keyBuffer","Array","isArray","forEach","index","push","text","label","toLowerCase","getMenu","componentRef","findDOMNode","querySelector","getMenuItem","menuItemId","context","menuItem","getElementById","DropdownToDialogNubbinMapping","bottom","propTypes","align","oneOf","assistiveText","object","buttonClassName","oneOfType","array","string","buttonInverse","bool","buttonVariant","checkmark","children","node","className","containerClassName","hasStaticAlignment","hint","hoverCloseDelay","number","iconCategory","props","iconName","iconPosition","iconVariant","iconSize","id","inverse","isOpen","listItemRenderer","func","length","menuPosition","menuStyle","nubbinPosition","onBlur","onClick","onFocus","openOn","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onSelect","onOpen","onClose","options","tabIndex","value","tooltip","tooltipMenuItem","triggerClassName","multiple","defaultProps","MenuDropdown","generatedId","state","foundIndex","some","element","undefined","menuId","getId","isHover","isUnmounting","trigger","focus","list","listItems","nextProps","values","currentIndices","filter","getIndexByValue","map","selectedIndices","selectedIndex","triggerRendered","setState","requestFocus","onRequestFocus","triggerContainer","listItem","focusedIndex","handleKeyboardFocus","getIsOpen","handleClose","event","handleOpenForHover","clearTimeout","isClosing","setTimeout","handleCloseForHover","handleOpen","setFocus","indexOf","concat","deselectIndex","currentSelected","splice","option","getValueByIndex","optionIndex","keyCode","TAB","handleCancel","ENTER","SPACE","DOWN","UP","ESCAPE","trap","handleKeyboardNavigate","key","handleSelect","target","toggleOpen","componentContext","currentFocusedIndex","menu","getListItemId","focusMenuItem","scrollToMenuItem","getElementsByTagName","menuHeight","offsetHeight","menuTop","scrollTop","menuItemTop","offsetTop","menuBottom","menuItemBottom","customListProps","saveRefToListItem","getListItemRenderer","saveRefToList","customContent","customContentWithListPropInjection","Children","child","displayName","renderDefaultMenuContent","clonedCustomContent","cloneElement","handleClickCustomContent","generate","outsideClickIgnoreClass","hasNubbin","positionClassName","positions","split","isInline","menuStylesBase","transform","inheritTargetWidth","offset","handleKeyDown","renderMenuContent","appendChild","parentNode","removeChild","currentSelectedIndices","getCurrentSelectedIndices","prevProps","nextState","renderOverlay","CurrentTrigger","CustomTriggerChildProps","renderDialog","handleClick","handleFocus","handleMouseEnter","handleMouseLeave","saveRefToTriggerContainer","saveRefToTrigger","Component","contextType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;AAEA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAA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AL,CAAWiB,MAAX,KAAsB,OAAtB,IAAiC,KAAKjB,KAAL,CAAWiB,MAAX,KAAsB,QAAvD,GACG,KAAKsI,gBADR,GAEG,IApCL;AAsCC,QAAA,MAAM,EAAE,KAAKvJ,KAAL,CAAWiB,MAtCpB;AAuCC,QAAA,GAAG,EAAE,KAAKuI,yBAvCX;AAwCC,QAAA,KAAK,EAAE,KAAKxJ,KAAL,CAAW3D,KAxCnB;AAyCC,QAAA,QAAQ,EAAE,KAAK2D,KAAL,CAAW0B,QAAX,KAAwBnB,MAAM,GAAG,IAAH,GAAU,GAAxC,CAzCX;AA0CC,QAAA,OAAO,EAAE,KAAKP,KAAL,CAAW4B,OA1CrB;AA2CC,QAAA,gBAAgB,EAAE,KAAK5B,KAAL,CAAW8B,gBA3C9B;AA4CC,QAAA,UAAU,EAAE,KAAK2H,gBA5ClB;AA6CC,QAAA,OAAO,EAAE,KAAKzJ,KAAL,CAAWX;AA7CrB,SA8CK6J,uBA9CL,EADD;AAkDA;;;;EA3pByBxO,KAAK,CAACgP,S;;gBAA3BzH,Y,iBACgBpG,a;;AA6pBtBoG,YAAY,CAAC0H,WAAb,GAA2B3N,mBAA3B;AACAiG,YAAY,CAACvD,SAAb,GAAyBA,SAAzB;AACAuD,YAAY,CAACD,YAAb,GAA4BA,YAA5B;AAEA,eAAeC,YAAf;AACA,SAAS7G,QAAT,EAAmBC,aAAnB,EAAkCuB,uBAAlC","sourcesContent":["/* eslint-disable max-lines */\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\n// Implements the [Dropdown design pattern](https://www.lightningdesignsystem.com/components/menus/#flavor-dropdown) in React. Child elements that do not have the display name of the value of `MENU_DROPDOWN_TRIGGER` in `components/constants.js` will be considered custom content and rendered in the popover.\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport requiredIf from 'react-required-if';\n\nimport classNames from 'classnames';\n\n// ### isFunction\nimport isFunction from 'lodash.isfunction';\nimport isEqual from 'lodash.isequal';\n\nimport shortid from 'shortid';\n\n// ### Children\nimport Dialog from '../utilities/dialog';\nimport List from '../utilities/menu-list';\nimport ListItem from '../utilities/menu-list/item';\nimport ListItemLabel from '../utilities/menu-list/item-label';\n\n// This is the the default Dropdown Trigger, which expects one button as a child.\nimport DefaultTrigger from './button-trigger';\n\n// This component's `checkProps` which issues warnings to developers about properties\n// when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\nimport componentDoc from './component.json';\n\nimport EventUtil from '../../utilities/event';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyboardNavigate from '../../utilities/keyboard-navigate';\nimport KEYS from '../../utilities/key-code';\nimport {\n\tMENU_DROPDOWN,\n\tMENU_DROPDOWN_TRIGGER,\n\tLIST,\n} from '../../utilities/constants';\nimport { IconSettingsContext } from '../icon-settings';\n\nconst documentDefined = typeof document !== 'undefined';\n\n// The overlay is an optional way to allow the dropdown to close on outside\n// clicks even when those clicks are over areas that wouldn't normally fire\n// click or touch events (for example, iframes). A single overlay is shared\n// between all dropdowns in the app.\nconst overlay = documentDefined\n\t? document.createElement('span')\n\t: { style: {} };\noverlay.style.top = 0;\noverlay.style.left = 0;\noverlay.style.width = '100%';\noverlay.style.height = '100%';\noverlay.style.position = 'absolute';\n\nlet currentOpenDropdown;\n\nconst DropdownNubbinPositions = [\n\t'top left',\n\t'top',\n\t'top right',\n\t'bottom left',\n\t'bottom',\n\t'bottom right',\n];\n\n// # Keyboard Navigable mixin\n\nconst noop = () => {};\n\nconst itemIsSelectable = (item) =>\n\titem.type !== 'header' && item.type !== 'divider' && !item.disabled;\n\nconst getNavigableItems = (items) => {\n\tconst navigableItems = [];\n\tnavigableItems.indexes = [];\n\tnavigableItems.keyBuffer = new KeyBuffer();\n\n\tif (Array.isArray(items)) {\n\t\titems.forEach((item, index) => {\n\t\t\tif (itemIsSelectable(item)) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tnavigableItems.push({\n\t\t\t\t\tindex,\n\t\t\t\t\ttext: `${item.label}`.toLowerCase(),\n\t\t\t\t});\n\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tnavigableItems.indexes.push(index);\n\t\t\t}\n\t\t});\n\t}\n\n\treturn navigableItems;\n};\n\nfunction getMenu(componentRef) {\n\treturn ReactDOM.findDOMNode(componentRef).querySelector('ul.dropdown__list'); // eslint-disable-line react/no-find-dom-node\n}\n\nfunction getMenuItem(menuItemId, context = document) {\n\tlet menuItem;\n\n\tif (menuItemId) {\n\t\tmenuItem = context.getElementById(menuItemId);\n\t}\n\n\treturn menuItem;\n}\n\n/*\n * Dropdowns with nubbins have a different API from other Dialogs\n *\n * Dialog receives an alignment position and whether it has a nubbin. The nubbin position is inferred from the align.\n * Dropdowns have a nubbinPosition which dictates the align, but in an inverse fashion which then gets inversed back by the Dialog.\n *\n * Since Dialog is the future API and we don't want to break backwards compatability, we currently map to the Dialog api here. Even if Dialog will map it again.\n * TODO - deprecate nubbinPosition in favor for additional `align` values and a flag to show a nubbin.\n */\nconst DropdownToDialogNubbinMapping = {\n\ttop: 'bottom',\n\t'top left': 'bottom left',\n\t'top right': 'bottom right',\n\n\tbottom: 'top',\n\t'bottom left': 'top left',\n\t'bottom right': 'top right',\n};\n\nconst propTypes = {\n\t/**\n\t * Aligns the menu center, right, or left respective to the trigger. This is not intended for use with `nubbinPosition`.\n\t */\n\talign: PropTypes.oneOf(['center', 'left', 'right']),\n\t/**\n\t * This prop is passed onto the triggering `Button`. Text that is visually hidden but read aloud by screenreaders to tell the user what the icon means. You can omit this prop if you are using the `label` prop.\n\t */\n\tassistiveText: PropTypes.object,\n\t/**\n\t * CSS classes to be added to triggering button.\n\t */\n\tbuttonClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * If true, button/icon is white. Meant for buttons or utility icons on dark backgrounds.\n\t */\n\tbuttonInverse: PropTypes.bool,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Determines variant of the Button component that triggers dropdown.\n\t */\n\tbuttonVariant: PropTypes.oneOf([\n\t\t'base',\n\t\t'neutral',\n\t\t'brand',\n\t\t'destructive',\n\t\t'icon',\n\t]),\n\t/**\n\t * If true, renders checkmark icon on the selected Menu Item.\n\t */\n\tcheckmark: PropTypes.bool,\n\t/**\n\t * If you need custom content _and_ a list, use a `<Popover>` instead.\n\t */\n\tchildren: PropTypes.node,\n\t/**\n\t * CSS classes to be added to dropdown menu.\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * By default, these class names will be added to the absolutely-positioned `Dialog` component.\n\t */\n\tcontainerClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * This prop is passed onto the triggering `Button`. Prevent dropdown menu from opening. Also applies disabled styling to trigger button.\n\t */\n\tdisabled: PropTypes.bool,\n\t/**\n\t * Prevents the dropdown from changing position based on the viewport/window. If set to true your dropdowns can extend outside the viewport _and_ overflow outside of a scrolling parent. If this happens, you might want to consider making the dropdowns contents scrollable to fit the menu on the screen. `hasStaticAlignment` disables this behavior and allows this component to extend beyond boundary elements. _Not tested._\n\t */\n\thasStaticAlignment: PropTypes.bool,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Associates an icon button with another element on the page by changes the color of the SVG. Please reference <a href=\"http://www.lightningdesignsystem.com/components/buttons/#hint\">Lightning Design System Buttons > Hint</a>.\n\t */\n\thint: PropTypes.bool,\n\t/**\n\t * Delay on menu closing in milliseconds.\n\t */\n\thoverCloseDelay: PropTypes.number,\n\t/**\n\t * Name of the icon category. Visit <a href=\"http://www.lightningdesignsystem.com/resources/icons\">Lightning Design System Icons</a> to reference icon categories.\n\t */\n\ticonCategory: requiredIf(\n\t\tPropTypes.oneOf(['action', 'custom', 'doctype', 'standard', 'utility']),\n\t\t(props) => !!props.iconName\n\t),\n\t/**\n\t * Name of the icon. Visit <a href=\"http://www.lightningdesignsystem.com/resources/icons\">Lightning Design System Icons</a> to reference icon names.\n\t */\n\ticonName: PropTypes.string,\n\t/**\n\t * If omitted, icon position is centered.\n\t */\n\ticonPosition: PropTypes.oneOf(['left', 'right']),\n\t/**\n\t * For icon variants, please reference <a href=\"http://www.lightningdesignsystem.com/components/buttons/#icon\">Lightning Design System Icons</a>.\n\t */\n\ticonVariant: PropTypes.oneOf([\n\t\t'bare',\n\t\t'container',\n\t\t'border',\n\t\t'border-filled',\n\t\t'small',\n\t\t'more',\n\t]),\n\t/**\n\t * Determines the size of the icon.\n\t */\n\ticonSize: PropTypes.oneOf(['x-small', 'small', 'medium', 'large']),\n\t/**\n\t * A unique ID is needed in order to support keyboard navigation, ARIA support, and connect the dropdown to the triggering button.\n\t */\n\tid: PropTypes.string,\n\t/**\n\t * Adds inverse class to the dropdown\n\t */\n\tinverse: PropTypes.bool,\n\t/**\n\t * Forces the dropdown to be open or closed. See controlled/uncontrolled callback/prop pattern for more on suggested use view [Concepts and Best Practices](https://github.com/salesforce-ux/design-system-react/blob/master/CONTRIBUTING.md#concepts-and-best-practices)\n\t */\n\tisOpen: PropTypes.bool,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Text within the trigger button.\n\t */\n\tlabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n\t/**\n\t * Custom element that overrides the default Menu Item component.\n\t */\n\tlistItemRenderer: PropTypes.func,\n\t/**\n\t * This prop is passed into the List for the menu. Pass null to make it the size of the content, or a string with an integer from here: https://www.lightningdesignsystem.com/components/menus/#flavor-dropdown-height\n\t */\n\tlength: PropTypes.oneOf([null, '5', '7', '10', 5, 7, 10]),\n\t/**\n\t * Please select one of the following:\n\t * * `absolute` - (default) The dialog will use `position: absolute` and style attributes to position itself. This allows inverted placement or flipping of the dialog.\n\t * * `overflowBoundaryElement` - The dialog will overflow scrolling parents. Use on elements that are aligned to the left or right of their target and don't care about the target being within a scrolling parent. Typically this is a popover or tooltip. Dropdown menus can usually open up and down if no room exists. In order to achieve this a portal element will be created and attached to `body`. This element will render into that detached render tree.\n\t * * `relative` - No styling or portals will be used. Menus will be positioned relative to their triggers. This is a great choice for HTML snapshot testing.\n\t */\n\tmenuPosition: PropTypes.oneOf([\n\t\t'absolute',\n\t\t'overflowBoundaryElement',\n\t\t'relative',\n\t]),\n\t/**\n\t * Style applied to menu element (that is the `.slds-dropdown` element)\n\t */\n\tmenuStyle: PropTypes.object,\n\t/**\n\t * Positions dropdown menu with a nubbin--that is the arrow notch. The placement options correspond to the placement of the nubbin. This is implemeted with CSS classes and is best used with a `Button` with \"icon container\" styling (`iconVariant=\"container\"`). Use with `isInline` prop, since positioning is determined by CSS via absolute-relative positioning, and using an absolutely positioned menu will not position the menu correctly without manual offsets.\n\t */\n\tnubbinPosition: PropTypes.oneOf([\n\t\t'top left',\n\t\t'top',\n\t\t'top right',\n\t\t'bottom left',\n\t\t'bottom',\n\t\t'bottom right',\n\t]),\n\t/**\n\t * Called when the triggering button loses focus.\n\t */\n\tonBlur: PropTypes.func,\n\t/**\n\t * This prop is passed onto the triggering `Button`. Triggered when the trigger button is clicked.\n\t */\n\tonClick: PropTypes.func,\n\t/**\n\t * Called when the triggering button gains focus.\n\t */\n\tonFocus: PropTypes.func,\n\t/**\n\t * Determines if mouse hover or click opens or closes the dropdown menu. The default of `click` opens the menu on click, touch, or keyboard navigation and is highly recommended to comply with accessibility standards. The other options are `hover` which opens when the mouse enters the focusable area, and `hybrid` which causes the menu to open on clicking of the trigger, but closes the menu when the mouse leaves the menu and trigger area. If you are planning on using `hover` or `hybrid`, please pause a moment and reconsider.\n\t */\n\topenOn: PropTypes.oneOf(['hover', 'click', 'hybrid']),\n\t/**\n\t * Called when a key pressed.\n\t */\n\tonKeyDown: PropTypes.func,\n\t/**\n\t * Called when mouse clicks down on the trigger button.\n\t */\n\tonMouseDown: PropTypes.func,\n\t/**\n\t * Called when mouse hovers over the trigger button. This is only called if `this.props.openOn` is set to `hover`.\n\t */\n\tonMouseEnter: PropTypes.func,\n\t/**\n\t * Called when mouse hover leaves the trigger button. This is only called if `this.props.openOn` is set to `hover`.\n\t */\n\tonMouseLeave: PropTypes.func,\n\t/**\n\t * Triggered when an item in the menu is clicked.\n\t */\n\tonSelect: PropTypes.func,\n\t/**\n\t * Triggered when the dropdown is opened.\n\t */\n\tonOpen: PropTypes.func,\n\t/**\n\t * Triggered when the dropdown is closed.\n\t */\n\tonClose: PropTypes.func,\n\t/**\n\t * An array of menu item objects. `className` and `id` object keys are applied to the `li` DOM node. `divider` key can have a value of `top` or `bottom`. `rightIcon` and `leftIcon` are not actually `Icon` components, but prop objects that get passed to an `Icon` component. The `href` key will be added to the `a` and its default click event will be prevented. Here is a sample:\n\t * ```\n\t * [{\n\t * className: 'custom-li-class',\n\t * divider: 'bottom',\n\t * label: 'A Header',\n\t * type: 'header'\n\t * }, {\n\t * href: 'http://sfdc.co/',\n\t * id: 'custom-li-id',\n\t * label: 'Has a value',\n\t * leftIcon: {\n\t * name: 'settings',\n\t * category: 'utility'\n\t * },\n\t * rightIcon: {\n\t * name: 'settings',\n\t * category: 'utility'\n\t * },\n\t * type: 'item',\n\t * value: 'B0'\n\t * }, {\n\t * tooltipContent: 'Displays a tooltip when hovered over with this content. The `tooltipMenuItem` prop must be set for this to work.',\n\t * type: 'divider'\n\t * }]\n\t * ```\n\t */\n\toptions: PropTypes.array,\n\t/**\n\t * An object of CSS styles that are applied to the triggering button.\n\t */\n\tstyle: PropTypes.object,\n\t/**\n\t * Write <code>\"-1\"</code> if you don't want the user to tab to the button.\n\t */\n\ttabIndex: PropTypes.string,\n\t/**\n\t * If `true`, adds a transparent overlay when the menu is open to handle outside clicks. Allows clicks on iframes to be captured, but also forces a double-click to interact with other elements. If a function is passed, custom overlay logic may be defined by the app.\n\t */\n\toverlay: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n\t/**\n\t * Current selected menu item.\n\t */\n\tvalue: PropTypes.oneOfType([\n\t\tPropTypes.number,\n\t\tPropTypes.string,\n\t\tPropTypes.array,\n\t]),\n\t/**\n\t * This prop is passed onto the triggering `Button`. It creates a tooltip with the content of the `node` provided.\n\t */\n\ttooltip: PropTypes.node,\n\t/**\n\t * Accepts a `Tooltip` component to be used as the template for menu item tooltips that appear via the `tooltipContent` options object attribute. Must be present for `tooltipContent` to work\n\t */\n\ttooltipMenuItem: PropTypes.node,\n\t/**\n\t * CSS classes to be added to wrapping trigger `div` around the button.\n\t */\n\ttriggerClassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\t/**\n\t * Whether this dropdown supports multi select.\n\t */\n\tmultiple: PropTypes.bool,\n\t/**\n\t * To adjust the width of the menu dropdown\n\t */\n\twidth: PropTypes.oneOf([\n\t\t'xx-small',\n\t\t'x-small',\n\t\t'small',\n\t\t'medium',\n\t\t'bottom',\n\t\t'large',\n\t]),\n};\n\nconst defaultProps = {\n\talign: 'left',\n\thoverCloseDelay: 300,\n\tlength: '5',\n\tmenuPosition: 'absolute',\n\topenOn: 'click',\n\twidth: 'medium',\n\tinverse: false,\n};\n\n/**\n * The MenuDropdown component is a variant of the Lightning Design System Menu component. This component\n * may require a polyfill such as [classList](https://github.com/yola/classlist-polyfill) due to\n * [react-onclickoutside](https://github.com/Pomax/react-onclickoutside) if Internet Explorer 11\n * support is needed.\n *\n * This component is wrapped in a [higher order component to listen for clicks outside itself](https://github.com/kentor/react-click-outside) and thus requires use of `ReactDOM`.\n */\nclass MenuDropdown extends React.Component {\n\tstatic displayName = MENU_DROPDOWN;\n\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\t// `checkProps` issues warnings to developers about properties (similar to React's built in development tools)\n\t\tcheckProps(MENU_DROPDOWN, props, componentDoc);\n\n\t\tthis.generatedId = shortid.generate();\n\n\t\tconst currentSelectedIndices = this.getCurrentSelectedIndices(props);\n\n\t\tthis.state = {\n\t\t\tfocusedIndex: -1,\n\t\t\tselectedIndex: -1,\n\t\t\tselectedIndices: [],\n\t\t\t...currentSelectedIndices,\n\t\t};\n\n\t\tthis.navigableItems = getNavigableItems(props.options);\n\t}\n\n\tcomponentDidUpdate(prevProps) {\n\t\tif (prevProps.value !== this.props.value) {\n\t\t\tconst nextState = this.getCurrentSelectedIndices(this.props);\n\t\t\t// eslint-disable-next-line react/no-did-update-set-state\n\t\t\tthis.setState(nextState);\n\t\t}\n\n\t\tif (prevProps.isOpen !== this.props.isOpen) {\n\t\t\tthis.setFocus();\n\t\t}\n\n\t\tif (!isEqual(prevProps.options, this.props.options)) {\n\t\t\tthis.navigableItems = getNavigableItems(this.props.options);\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif (currentOpenDropdown === this) {\n\t\t\tcurrentOpenDropdown = undefined;\n\t\t}\n\t\tthis.isUnmounting = true;\n\t\tthis.renderOverlay(false);\n\t}\n\n\tgetId = () => this.props.id || this.generatedId;\n\n\tgetIsOpen = () =>\n\t\t!!(typeof this.props.isOpen === 'boolean'\n\t\t\t? this.props.isOpen\n\t\t\t: this.state.isOpen);\n\n\tgetIndexByValue = (value, options) => {\n\t\tlet foundIndex = -1;\n\n\t\tif (options && options.length) {\n\t\t\toptions.some((element, index) => {\n\t\t\t\tif (element && element.value === value) {\n\t\t\t\t\tfoundIndex = index;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\n\t\treturn foundIndex;\n\t};\n\n\tgetValueByIndex = (index) => this.props.options[index];\n\n\tgetListItemRenderer = () =>\n\t\tthis.props.listItemRenderer ? this.props.listItemRenderer : ListItemLabel;\n\n\tgetListItemId = (index) => {\n\t\tlet menuItemId;\n\n\t\tif (index !== undefined) {\n\t\t\tconst menuId = isFunction(this.getId) ? this.getId() : this.props.id;\n\t\t\tmenuItemId = `${menuId}-item-${index}`;\n\t\t}\n\n\t\treturn menuItemId;\n\t};\n\n\tsetFocus = () => {\n\t\tif (!this.isHover && !this.isUnmounting && this.trigger) {\n\t\t\tReactDOM.findDOMNode(this.trigger).focus(); // eslint-disable-line react/no-find-dom-node\n\t\t}\n\t};\n\n\tgetMenu = () => ReactDOM.findDOMNode(this.list); // eslint-disable-line react/no-find-dom-node\n\n\tgetMenuItem = (index) => {\n\t\tif (index !== undefined && this.listItems) {\n\t\t\treturn ReactDOM.findDOMNode(this.listItems[index]); // eslint-disable-line react/no-find-dom-node\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\tgetCurrentSelectedIndices = (nextProps) => {\n\t\tif (this.props.multiple === true) {\n\t\t\tlet values = [];\n\t\t\tlet currentIndices = [];\n\t\t\tif (!Array.isArray(nextProps.value)) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tvalues.push(nextProps.value);\n\t\t\t} else {\n\t\t\t\tvalues = nextProps.value;\n\t\t\t}\n\t\t\tvalues = values.filter(\n\t\t\t\t(value) => this.getIndexByValue(value, nextProps.options) !== -1\n\t\t\t);\n\t\t\tcurrentIndices = values.map((value) =>\n\t\t\t\tthis.getIndexByValue(value, nextProps.options)\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tselectedIndices: currentIndices,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tselectedIndex: this.getIndexByValue(nextProps.value, nextProps.options),\n\t\t};\n\t};\n\n\t// Trigger opens, closes, and recieves focus on close\n\tsaveRefToTrigger = (trigger) => {\n\t\tthis.trigger = trigger;\n\n\t\tif (!this.state.triggerRendered) {\n\t\t\tthis.setState({ triggerRendered: true });\n\t\t}\n\n\t\tif (trigger && this.props.requestFocus && this.props.onRequestFocus) {\n\t\t\tthis.props.onRequestFocus(trigger);\n\t\t}\n\t};\n\n\t// TriggerContainer is the wrapping outer DOM element which may differ from the actual trigger which is most likely a `button`.\n\tsaveRefToTriggerContainer = (triggerContainer) => {\n\t\tthis.triggerContainer = triggerContainer;\n\t\tif (!this.trigger) this.trigger = triggerContainer;\n\t};\n\n\tsaveRefToList = (list) => {\n\t\tthis.list = list;\n\t};\n\n\tsaveRefToListItem = (listItem, index) => {\n\t\tif (!this.listItems) {\n\t\t\tthis.listItems = {};\n\t\t}\n\n\t\tthis.listItems[index] = listItem;\n\n\t\tif (index === this.state.focusedIndex) {\n\t\t\tthis.handleKeyboardFocus(this.state.focusedIndex);\n\t\t}\n\t};\n\n\thandleClose = () => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (isOpen) {\n\t\t\tif (currentOpenDropdown === this) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\n\t\t\tthis.setState({\n\t\t\t\tisOpen: false,\n\t\t\t});\n\n\t\t\tthis.isHover = false;\n\n\t\t\tif (this.props.onClose) {\n\t\t\t\tthis.props.onClose();\n\t\t\t}\n\t\t}\n\t};\n\n\thandleOpen = () => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (!isOpen) {\n\t\t\tif (currentOpenDropdown && isFunction(currentOpenDropdown.handleClose)) {\n\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t}\n\n\t\t\tcurrentOpenDropdown = this;\n\n\t\t\tthis.setState({\n\t\t\t\tisOpen: true,\n\t\t\t});\n\n\t\t\tif (this.props.onOpen) {\n\t\t\t\tthis.props.onOpen();\n\t\t\t}\n\t\t}\n\t};\n\n\thandleMouseEnter = (event) => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tthis.isHover = true;\n\n\t\tif (!isOpen && this.props.openOn === 'hover') {\n\t\t\tthis.handleOpenForHover();\n\t\t} else {\n\t\t\t// we want this clear when openOn is hover or hybrid\n\t\t\tclearTimeout(this.isClosing);\n\t\t}\n\n\t\tif (this.props.onMouseEnter) {\n\t\t\tthis.props.onMouseEnter(event);\n\t\t}\n\t};\n\n\thandleMouseLeave = (event) => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (isOpen) {\n\t\t\tthis.isClosing = setTimeout(() => {\n\t\t\t\tthis.handleCloseForHover();\n\t\t\t}, this.props.hoverCloseDelay);\n\t\t}\n\n\t\tif (this.props.onMouseLeave) {\n\t\t\tthis.props.onMouseLeave(event);\n\t\t}\n\t};\n\n\t// Special handlers for openOn === hover\n\t// calling onClick inside onMouseEnter/Leave used to cause double clicking the trigger on hover which caused closing and reopening of the dropdown\n\thandleCloseForHover = () => {\n\t\tconst isOpen = this.getIsOpen();\n\t\tif (isOpen) {\n\t\t\tthis.handleClose();\n\t\t}\n\t};\n\n\thandleOpenForHover = () => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (!isOpen) {\n\t\t\tthis.handleOpen();\n\t\t\tthis.setFocus();\n\t\t}\n\t};\n\n\thandleClick = (event) => {\n\t\tconst isOpen = this.getIsOpen();\n\n\t\tif (!isOpen) {\n\t\t\tthis.handleOpen();\n\t\t\tthis.setFocus();\n\t\t} else {\n\t\t\tthis.handleClose();\n\t\t}\n\n\t\tif (this.props.onClick) {\n\t\t\tthis.props.onClick(event);\n\t\t}\n\t};\n\n\thandleFocus = (event) => {\n\t\tif (this.props.onFocus) {\n\t\t\tthis.props.onFocus(event);\n\t\t}\n\t};\n\n\thandleClickCustomContent = () => {\n\t\tthis.setFocus();\n\t\tthis.handleClose();\n\n\t\tif (this.props.onSelect) {\n\t\t\tthis.props.onSelect();\n\t\t}\n\t};\n\n\thandleSelect = (index) => {\n\t\tif (!this.props.multiple) {\n\t\t\tthis.setState({ selectedIndex: index });\n\t\t\tthis.handleClose();\n\t\t\tthis.setFocus();\n\t\t} else if (\n\t\t\tthis.props.multiple &&\n\t\t\tthis.state.selectedIndices.indexOf(index) === -1\n\t\t) {\n\t\t\t// eslint-disable-next-line react/no-access-state-in-setstate\n\t\t\tconst currentIndices = this.state.selectedIndices.concat(index);\n\t\t\tthis.setState({\n\t\t\t\tselectedIndices: currentIndices,\n\t\t\t});\n\t\t} else if (this.props.multiple) {\n\t\t\tconst deselectIndex = this.state.selectedIndices.indexOf(index);\n\t\t\t// eslint-disable-next-line react/no-access-state-in-setstate\n\t\t\tconst currentSelected = this.state.selectedIndices;\n\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\tcurrentSelected.splice(deselectIndex, 1);\n\t\t\tthis.setState({\n\t\t\t\tselectedIndices: currentSelected,\n\t\t\t});\n\t\t}\n\n\t\tif (this.props.onSelect) {\n\t\t\tconst option = this.getValueByIndex(index);\n\t\t\tthis.props.onSelect(option, { option, optionIndex: index });\n\t\t}\n\t};\n\n\thandleKeyDown = (event) => {\n\t\tif (event.keyCode) {\n\t\t\tif (event.keyCode === KEYS.TAB) {\n\t\t\t\tthis.handleCancel();\n\t\t\t} else if (\n\t\t\t\tevent.keyCode === KEYS.ENTER ||\n\t\t\t\tevent.keyCode === KEYS.SPACE ||\n\t\t\t\tevent.keyCode === KEYS.DOWN ||\n\t\t\t\tevent.keyCode === KEYS.UP ||\n\t\t\t\tevent.keyCode === KEYS.ESCAPE\n\t\t\t) {\n\t\t\t\tEventUtil.trap(event);\n\t\t\t\tconst isOpen = this.getIsOpen();\n\t\t\t\tthis.handleKeyboardNavigate({\n\t\t\t\t\tevent,\n\t\t\t\t\tisOpen,\n\t\t\t\t\tkey: event.key,\n\t\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\t\tonSelect: this.handleSelect,\n\t\t\t\t\ttarget: event.target,\n\t\t\t\t\ttoggleOpen: this.toggleOpen,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.props.onKeyDown) {\n\t\t\t\tthis.props.onKeyDown(event);\n\t\t\t}\n\t\t}\n\t};\n\n\thandleCancel = () => {\n\t\tthis.setFocus();\n\t\tthis.handleClose();\n\t};\n\n\thandleClickOutside = () => {\n\t\tthis.handleClose();\n\t};\n\n\t// Handling open / close toggling is optional, and a default implementation is provided for handling focus, but selection _must_ be handled\n\thandleKeyboardNavigate = ({\n\t\tevent,\n\t\tisOpen = true,\n\t\tkeyCode,\n\t\tonFocus = this.handleKeyboardFocus,\n\t\tonSelect,\n\t\ttarget,\n\t\ttoggleOpen = noop,\n\t}) => {\n\t\tkeyboardNavigate({\n\t\t\tcomponentContext: this,\n\t\t\tcurrentFocusedIndex: this.state.focusedIndex,\n\t\t\tevent,\n\t\t\tisOpen,\n\t\t\tkeyCode,\n\t\t\tnavigableItems: this.navigableItems,\n\t\t\tonFocus,\n\t\t\tonSelect,\n\t\t\ttarget,\n\t\t\ttoggleOpen,\n\t\t});\n\t};\n\n\t// This is a bit of an anti-pattern, but it has the upside of being a nice default. Component authors can always override to only set state and do their own focusing in their subcomponents.\n\thandleKeyboardFocus = (focusedIndex) => {\n\t\tif (this.state.focusedIndex !== focusedIndex) {\n\t\t\tthis.setState({ focusedIndex });\n\t\t}\n\n\t\tconst menu = isFunction(this.getMenu) ? this.getMenu() : getMenu(this);\n\n\t\tconst menuItem = isFunction(this.getMenuItem)\n\t\t\t? this.getMenuItem(focusedIndex, menu)\n\t\t\t: getMenuItem(this.getListItemId(focusedIndex));\n\n\t\tif (menuItem) {\n\t\t\tthis.focusMenuItem(menuItem);\n\t\t\tthis.scrollToMenuItem(menu, menuItem);\n\t\t}\n\t};\n\n\tfocusMenuItem = (menuItem) => {\n\t\tmenuItem.getElementsByTagName('a')[0].focus();\n\t};\n\n\tscrollToMenuItem = (menu, menuItem) => {\n\t\tif (menu && menuItem) {\n\t\t\tconst menuHeight = menu.offsetHeight;\n\n\t\t\tconst menuTop = menu.scrollTop;\n\t\t\tconst menuItemTop = menuItem.offsetTop - menu.offsetTop;\n\n\t\t\tif (menuItemTop < menuTop) {\n\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\tmenu.scrollTop = menuItemTop;\n\t\t\t} else {\n\t\t\t\tconst menuBottom = menuTop + menuHeight + menu.offsetTop;\n\t\t\t\tconst menuItemBottom =\n\t\t\t\t\tmenuItemTop + menuItem.offsetHeight + menu.offsetTop;\n\n\t\t\t\tif (menuItemBottom > menuBottom) {\n\t\t\t\t\t// eslint-disable-next-line no-param-reassign\n\t\t\t\t\tmenu.scrollTop = menuItemBottom - menuHeight - menu.offsetTop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\ttoggleOpen = () => {\n\t\tconst isOpen = this.getIsOpen();\n\t\tthis.setFocus();\n\n\t\tif (isOpen) {\n\t\t\tthis.handleClose();\n\t\t} else {\n\t\t\tthis.handleOpen();\n\t\t}\n\t};\n\n\trenderDefaultMenuContent = (customListProps) => (\n\t\t<List\n\t\t\tkey={`${this.getId()}-dropdown-list`}\n\t\t\tcheckmark={this.props.checkmark}\n\t\t\tgetListItemId={this.getListItemId}\n\t\t\titemRefs={this.saveRefToListItem}\n\t\t\titemRenderer={this.getListItemRenderer()}\n\t\t\tonCancel={this.handleCancel}\n\t\t\tonSelect={this.handleSelect}\n\t\t\toptions={this.props.options}\n\t\t\tref={this.saveRefToList}\n\t\t\tselectedIndex={\n\t\t\t\t!this.props.multiple ? this.state.selectedIndex : undefined\n\t\t\t}\n\t\t\tselectedIndices={\n\t\t\t\tthis.props.multiple ? this.state.selectedIndices : undefined\n\t\t\t}\n\t\t\ttooltipMenuItem={this.props.tooltipMenuItem}\n\t\t\ttriggerId={this.getId()}\n\t\t\tlength={this.props.length}\n\t\t\t{...customListProps}\n\t\t/>\n\t);\n\n\trenderMenuContent = (customContent) => {\n\t\t/**\n\t\t * Custom content for dropdown was a hack done in the past. If there's more than a listbox within a dropdown, then it should be a popover as explained for the `children` prop.\n\t\t *\n\t\t * This code block shows how things are done in the past:\n\t\t * ```\n\t\t * <Dropdown>\n\t\t * <Trigger>\n\t\t * <Button iconCategory=\"utility\" iconName=\"settings\" />\n\t\t * </Trigger>\n\t\t * <div>Look ma! This is Custom Content.</div>\n\t\t * <List options={[myArray]}/>\n\t\t * </Dropdown>\n\t\t * ```\n\t\t */\n\t\tlet customContentWithListPropInjection = [];\n\t\t// Dropdown can take a Trigger component as a child and then return it as the parent DOM element.\n\t\tReact.Children.forEach(customContent, (child) => {\n\t\t\tif (child && child.type.displayName === LIST) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tcustomContentWithListPropInjection.push(\n\t\t\t\t\tthis.renderDefaultMenuContent(child.props)\n\t\t\t\t);\n\t\t\t} else if (child) {\n\t\t\t\tconst clonedCustomContent = React.cloneElement(child, {\n\t\t\t\t\tonClick: this.handleClickCustomContent,\n\t\t\t\t\tkey: shortid.generate(),\n\t\t\t\t});\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tcustomContentWithListPropInjection.push(clonedCustomContent);\n\t\t\t}\n\t\t});\n\n\t\tif (customContentWithListPropInjection.length === 0) {\n\t\t\tcustomContentWithListPropInjection = null;\n\t\t}\n\n\t\treturn (\n\t\t\tcustomContentWithListPropInjection || this.renderDefaultMenuContent()\n\t\t);\n\t};\n\n\trenderDialog = (customContent, isOpen, outsideClickIgnoreClass) => {\n\t\tlet align = 'bottom';\n\t\tlet hasNubbin = false;\n\t\tlet positionClassName = '';\n\n\t\tif (this.props.nubbinPosition) {\n\t\t\thasNubbin = true;\n\t\t\talign = DropdownToDialogNubbinMapping[this.props.nubbinPosition];\n\t\t} else if (this.props.align) {\n\t\t\talign =\n\t\t\t\tthis.props.align === 'center' ? 'bottom' : `bottom ${this.props.align}`;\n\t\t}\n\n\t\tconst positions = DropdownToDialogNubbinMapping[align].split(' ');\n\t\tpositionClassName = classNames(\n\t\t\tpositions.map((position) => `slds-dropdown_${position}`)\n\t\t);\n\n\t\t// FOR BACKWARDS COMPATIBILITY\n\t\tconst menuPosition = this.props.isInline\n\t\t\t? 'relative'\n\t\t\t: this.props.menuPosition; // eslint-disable-line react/prop-types\n\n\t\tconst menuStylesBase = {};\n\t\tif (this.props.align === 'center' && !hasNubbin) {\n\t\t\tmenuStylesBase.transform = 'none';\n\t\t}\n\n\t\treturn isOpen ? (\n\t\t\t<Dialog\n\t\t\t\talign={align}\n\t\t\t\tclassName={classNames(this.props.containerClassName)}\n\t\t\t\tcloseOnTabKey\n\t\t\t\tcontentsClassName={classNames(\n\t\t\t\t\t'slds-dropdown',\n\t\t\t\t\t`slds-dropdown_${this.props.width}`,\n\t\t\t\t\t'slds-text-align_left',\n\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\tthis.props.className,\n\t\t\t\t\tpositionClassName,\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-dropdown_inverse': this.props.inverse,\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t\tcontext={this.context}\n\t\t\t\thasNubbin={hasNubbin}\n\t\t\t\thasStaticAlignment={this.props.hasStaticAlignment}\n\t\t\t\tinheritWidthOf={this.props.inheritTargetWidth ? 'target' : 'none'}\n\t\t\t\toffset={this.props.offset}\n\t\t\t\tonClose={this.handleClose}\n\t\t\t\tonKeyDown={this.handleKeyDown}\n\t\t\t\toutsideClickIgnoreClass={outsideClickIgnoreClass}\n\t\t\t\tposition={menuPosition}\n\t\t\t\tstyle={{\n\t\t\t\t\t...menuStylesBase,\n\t\t\t\t\t...this.props.menuStyle,\n\t\t\t\t}}\n\t\t\t\tonRequestTargetElement={() => this.trigger}\n\t\t\t>\n\t\t\t\t{this.renderMenuContent(customContent)}\n\t\t\t</Dialog>\n\t\t) : null;\n\t};\n\n\trenderOverlay = (isOpen) => {\n\t\tif (isFunction(overlay) && documentDefined) {\n\t\t\toverlay(isOpen, overlay);\n\t\t} else if (\n\t\t\tthis.props.overlay &&\n\t\t\tisOpen &&\n\t\t\t!this.overlay &&\n\t\t\tdocumentDefined\n\t\t) {\n\t\t\tthis.overlay = overlay;\n\t\t\tdocument.querySelector('body').appendChild(this.overlay);\n\t\t} else if (!isOpen && this.overlay && this.overlay.parentNode) {\n\t\t\tthis.overlay.parentNode.removeChild(this.overlay);\n\t\t\tthis.overlay = undefined;\n\t\t}\n\t};\n\n\trender() {\n\t\t// Dropdowns are used by other components. The default trigger is a button, but some other components use `li` elements. The following allows `MenuDropdown` to be extended by providing a child component with the displayName of `DropdownTrigger`.\n\t\tlet CurrentTrigger = DefaultTrigger;\n\n\t\tlet CustomTriggerChildProps = {};\n\n\t\t// Child elements that do not have the display name of the value of `MENU_DROPDOWN_TRIGGER` in `components/constants.js` will be considered custom content and rendered in the popover.\n\t\tlet customContent = [];\n\n\t\t// Dropdown can take a Trigger component as a child and then return it as the parent DOM element.\n\t\tReact.Children.forEach(this.props.children, (child) => {\n\t\t\tif (child && child.type.displayName === MENU_DROPDOWN_TRIGGER) {\n\t\t\t\t// `CustomTriggerChildProps` is not used by the default button Trigger, but by other triggers\n\t\t\t\tCustomTriggerChildProps = child.props;\n\t\t\t\tCurrentTrigger = child.type;\n\t\t\t} else if (child) {\n\t\t\t\t// eslint-disable-next-line fp/no-mutating-methods\n\t\t\t\tcustomContent.push(child);\n\t\t\t}\n\t\t});\n\n\t\tif (customContent.length === 0) {\n\t\t\tcustomContent = null;\n\t\t}\n\n\t\tconst outsideClickIgnoreClass = `ignore-click-${this.getId()}`;\n\t\tconst isOpen = !this.props.disabled && this.getIsOpen() && !!this.trigger;\n\n\t\tthis.renderOverlay(isOpen);\n\n\t\t/* Below are three sections of props:\n\t\t - The first are the props that may be given by the dropdown component. These may get deprecated in the future.\n\t\t - The next set of props (`CustomTriggerChildProps`) are props that can be overwritten by the end developer.\n\t\t - The final set are props that should not be overwritten, since they are ones that tie the trigger to the dropdown menu.\n\t\t*/\n\n\t\treturn (\n\t\t\t<CurrentTrigger\n\t\t\t\taria-haspopup\n\t\t\t\tassistiveText={this.props.assistiveText}\n\t\t\t\tclassName={classNames(\n\t\t\t\t\toutsideClickIgnoreClass,\n\t\t\t\t\tthis.props.buttonClassName\n\t\t\t\t)}\n\t\t\t\tdisabled={this.props.disabled}\n\t\t\t\thint={this.props.hint}\n\t\t\t\ticonCategory={this.props.iconCategory}\n\t\t\t\ticonName={this.props.iconName}\n\t\t\t\ticonPosition={this.props.iconPosition}\n\t\t\t\ticonSize={this.props.iconSize}\n\t\t\t\ticonVariant={this.props.iconVariant}\n\t\t\t\tid={this.getId()}\n\t\t\t\tinverse={this.props.buttonInverse}\n\t\t\t\tisOpen={isOpen}\n\t\t\t\tlabel={this.props.label}\n\t\t\t\tmenu={this.renderDialog(customContent, isOpen, outsideClickIgnoreClass)}\n\t\t\t\tonBlur={this.props.onBlur}\n\t\t\t\tonClick={\n\t\t\t\t\tthis.props.openOn === 'click' || this.props.openOn === 'hybrid'\n\t\t\t\t\t\t? this.handleClick\n\t\t\t\t\t\t: this.props.onClick\n\t\t\t\t}\n\t\t\t\tonFocus={this.handleFocus}\n\t\t\t\tonKeyDown={this.handleKeyDown}\n\t\t\t\tonMouseDown={this.props.onMouseDown}\n\t\t\t\tonMouseEnter={\n\t\t\t\t\tthis.props.openOn === 'hover' || this.props.openOn === 'hybrid'\n\t\t\t\t\t\t? this.handleMouseEnter\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t\tonMouseLeave={\n\t\t\t\t\tthis.props.openOn === 'hover' || this.props.openOn === 'hybrid'\n\t\t\t\t\t\t? this.handleMouseLeave\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t\topenOn={this.props.openOn}\n\t\t\t\tref={this.saveRefToTriggerContainer}\n\t\t\t\tstyle={this.props.style}\n\t\t\t\ttabIndex={this.props.tabIndex || (isOpen ? '-1' : '0')}\n\t\t\t\ttooltip={this.props.tooltip}\n\t\t\t\ttriggerClassName={this.props.triggerClassName}\n\t\t\t\ttriggerRef={this.saveRefToTrigger}\n\t\t\t\tvariant={this.props.buttonVariant}\n\t\t\t\t{...CustomTriggerChildProps}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nMenuDropdown.contextType = IconSettingsContext;\nMenuDropdown.propTypes = propTypes;\nMenuDropdown.defaultProps = defaultProps;\n\nexport default MenuDropdown;\nexport { ListItem, ListItemLabel, DropdownNubbinPositions };\n"],"file":"menu-dropdown.js"}
|
|
@@ -20,7 +20,7 @@ declare module '@salesforce/design-system-react/components/setup-assistant' {
|
|
|
20
20
|
/**
|
|
21
21
|
* Function to handle opening / closing of steps when the step is expandable. Passes event object and step `index`, `isOpen`, and `step` props as data.
|
|
22
22
|
*/
|
|
23
|
-
onStepToggleIsOpen?: (v: any) => any;
|
|
23
|
+
onStepToggleIsOpen?: (event: React.SyntheticEvent, v: any) => any;
|
|
24
24
|
/**
|
|
25
25
|
* Accepts a progress bar component, which will only be visible if `isCard` is enabled
|
|
26
26
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
|
|
2
|
+
|
|
3
|
+
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
|
+
export default {
|
|
5
|
+
"viewBox": "0 0 100 100",
|
|
6
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
7
|
+
"path": [{
|
|
8
|
+
"d": "M63.94 55.88A12.06 12.06 0 1076 67.94a12.06 12.06 0 00-12.1-12.06zm-.1 5.49h.06a1.8 1.8 0 11-1.8 1.8 1.77 1.77 0 011.74-1.8zM66.9 74a.54.54 0 01-.56.54H61.5a.56.56 0 01-.6-.5v-1.27a.65.65 0 01.6-.66.56.56 0 00.6-.5v-2.44a.65.65 0 00-.6-.66.56.56 0 01-.6-.5v-1.24a.65.65 0 01.6-.66h3.6a.66.66 0 01.6.66v4.8a.54.54 0 00.56.54.66.66 0 01.6.66z"
|
|
9
|
+
}, {
|
|
10
|
+
"d": "M63.55 51.55c1 0 2.78-.08 2.7-1.56-.07-1.15 0-6 0-8.08V22.39A2.39 2.39 0 0063.86 20H26.43A2.39 2.39 0 0024 22.35v49.74h22.13c1.38 0 1.73-1 1.65-2.43s-.61-7.82 3.73-12.85 11-5.26 12.04-5.26zM53.48 28.31a2.46 2.46 0 012.14-2.41h3.05a2.46 2.46 0 012.14 2.41v2.45a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44zm0 12a2.45 2.45 0 012.44-2.44h2.45a2.45 2.45 0 012.44 2.44v2.45a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44zM36.81 66.76a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44v-2.45a2.45 2.45 0 012.44-2.44h2.45a2.45 2.45 0 012.44 2.44zm0-12a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44v-2.45a2.45 2.45 0 012.44-2.44h2.45a2.45 2.45 0 012.44 2.44zm0-12a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44v-2.45a2.45 2.45 0 012.44-2.44h2.45a2.45 2.45 0 012.44 2.44zm0-12a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44v-2.45a2.46 2.46 0 012.14-2.41h3.05a2.46 2.46 0 012.14 2.41zm12 24a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44v-2.45a2.45 2.45 0 012.44-2.44h2.45a2.45 2.45 0 012.44 2.44zm0-12a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44v-2.45a2.45 2.45 0 012.44-2.44h2.45a2.45 2.45 0 012.44 2.44zm0-12a2.45 2.45 0 01-2.44 2.44h-2.45a2.45 2.45 0 01-2.44-2.44v-2.45a2.46 2.46 0 012.14-2.41h3.05a2.46 2.46 0 012.14 2.41z"
|
|
11
|
+
}]
|
|
12
|
+
};
|