@salesforce/design-system-react 0.10.40 → 0.10.44
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/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
- package/components/brand-band/__docs__/storybook-stories.jsx +4 -2
- package/components/brand-band/__examples__/{lightning-blue-theme.jsx → group-image.jsx} +1 -11
- package/components/brand-band/__examples__/no-image.jsx +1 -2
- package/{lib/components/brand-band/__examples__/lightning-blue-theme.jsx → components/brand-band/__examples__/user-image.jsx} +1 -11
- package/components/brand-band/check-props.js +18 -0
- package/components/brand-band/component.json +8 -4
- package/components/brand-band/index.jsx +23 -66
- package/components/brand-band.d.ts +1 -26
- package/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
- package/components/combobox/combobox.jsx +4 -1
- package/components/component-docs.json +13 -38
- 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/site-stories.js +8 -4
- 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/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
- package/lib/components/brand-band/__docs__/storybook-stories.jsx +4 -2
- package/lib/components/brand-band/__examples__/group-image.jsx +12 -0
- package/lib/components/brand-band/__examples__/no-image.jsx +1 -2
- package/lib/components/brand-band/__examples__/user-image.jsx +12 -0
- package/lib/components/brand-band/check-props.js +29 -0
- package/lib/components/brand-band/component.json +8 -4
- package/lib/components/brand-band/index.js +9 -50
- package/lib/components/brand-band.d.ts +1 -26
- package/lib/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
- package/lib/components/combobox/combobox.js +6 -2
- package/lib/components/component-docs.json +13 -38
- 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/site-stories.js +6 -3
- 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 +10 -6
- package/module/components/brand-band/__docs__/__snapshots__/storybook-stories.storyshot +47 -157
- package/module/components/brand-band/__docs__/storybook-stories.js +6 -3
- package/module/components/brand-band/__docs__/storybook-stories.js.map +1 -1
- package/module/components/brand-band/__examples__/{lightning-blue-theme.js → group-image.js} +4 -9
- package/module/components/brand-band/__examples__/group-image.js.map +1 -0
- package/module/components/brand-band/__examples__/no-image.js +2 -4
- package/module/components/brand-band/__examples__/no-image.js.map +1 -1
- package/module/components/brand-band/__examples__/user-image.js +52 -0
- package/module/components/brand-band/__examples__/user-image.js.map +1 -0
- package/module/components/brand-band/check-props.js +20 -0
- package/module/components/brand-band/check-props.js.map +1 -0
- package/module/components/brand-band/component.json +8 -4
- package/module/components/brand-band/index.js +10 -51
- package/module/components/brand-band/index.js.map +1 -1
- package/module/components/brand-band.d.ts +1 -26
- package/module/components/combobox/__tests__/combobox.browser-test.js +22 -0
- package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
- package/module/components/combobox/combobox.js +6 -2
- package/module/components/combobox/combobox.js.map +1 -1
- package/module/components/component-docs.json +13 -38
- 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/site-stories.js +6 -3
- package/module/components/site-stories.js.map +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 +10 -6
- package/module/components/brand-band/__examples__/lightning-blue-theme.js.map +0 -1
|
@@ -14,33 +14,13 @@ exports[`DOM snapshots SLDSBrandBand Default (medium) 1`] = `
|
|
|
14
14
|
}
|
|
15
15
|
>
|
|
16
16
|
<div
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"height": "100%",
|
|
21
|
-
"position": "relative",
|
|
22
|
-
"width": "100%",
|
|
23
|
-
"zIndex": 1,
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
>
|
|
27
|
-
<style>
|
|
28
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:before {
|
|
29
|
-
background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
|
|
30
|
-
}
|
|
31
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:after {
|
|
32
|
-
background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
35
|
-
<div
|
|
36
|
-
className="slds-brand-band slds-brand-band_medium dsr-brand-band_lightning-blue"
|
|
37
|
-
id="brand-band-default"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
17
|
+
className="slds-brand-band slds-brand-band_medium"
|
|
18
|
+
id="brand-band-default"
|
|
19
|
+
/>
|
|
40
20
|
</div>
|
|
41
21
|
`;
|
|
42
22
|
|
|
43
|
-
exports[`DOM snapshots SLDSBrandBand Image
|
|
23
|
+
exports[`DOM snapshots SLDSBrandBand Group Image 1`] = `
|
|
44
24
|
<div
|
|
45
25
|
style={
|
|
46
26
|
Object {
|
|
@@ -54,39 +34,13 @@ exports[`DOM snapshots SLDSBrandBand Image with background size cover 1`] = `
|
|
|
54
34
|
}
|
|
55
35
|
>
|
|
56
36
|
<div
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"height": "100%",
|
|
61
|
-
"position": "relative",
|
|
62
|
-
"width": "100%",
|
|
63
|
-
"zIndex": 1,
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
>
|
|
67
|
-
<style>
|
|
68
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:before {
|
|
69
|
-
background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
|
|
70
|
-
}
|
|
71
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:after {
|
|
72
|
-
background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
75
|
-
<div
|
|
76
|
-
className="slds-brand-band slds-brand-band_large slds-brand-band_cover dsr-brand-band_lightning-blue custom-brand-band-class"
|
|
77
|
-
id="brand-band-large"
|
|
78
|
-
>
|
|
79
|
-
<span
|
|
80
|
-
className="slds-assistive-text"
|
|
81
|
-
>
|
|
82
|
-
Hello World!
|
|
83
|
-
</span>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
37
|
+
className="slds-brand-band slds-brand-band_medium slds-brand-band_group"
|
|
38
|
+
id="brand-band-user-group"
|
|
39
|
+
/>
|
|
86
40
|
</div>
|
|
87
41
|
`;
|
|
88
42
|
|
|
89
|
-
exports[`DOM snapshots SLDSBrandBand
|
|
43
|
+
exports[`DOM snapshots SLDSBrandBand Image with background size cover 1`] = `
|
|
90
44
|
<div
|
|
91
45
|
style={
|
|
92
46
|
Object {
|
|
@@ -100,39 +54,19 @@ exports[`DOM snapshots SLDSBrandBand Large 1`] = `
|
|
|
100
54
|
}
|
|
101
55
|
>
|
|
102
56
|
<div
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"background": "rgb(176, 196, 223)",
|
|
106
|
-
"height": "100%",
|
|
107
|
-
"position": "relative",
|
|
108
|
-
"width": "100%",
|
|
109
|
-
"zIndex": 1,
|
|
110
|
-
}
|
|
111
|
-
}
|
|
57
|
+
className="slds-brand-band slds-brand-band_large slds-brand-band_cover custom-brand-band-class"
|
|
58
|
+
id="brand-band-large"
|
|
112
59
|
>
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
|
|
116
|
-
}
|
|
117
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:after {
|
|
118
|
-
background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
|
|
119
|
-
}
|
|
120
|
-
</style>
|
|
121
|
-
<div
|
|
122
|
-
className="slds-brand-band slds-brand-band_large dsr-brand-band_lightning-blue custom-brand-band-class"
|
|
123
|
-
id="brand-band-large"
|
|
60
|
+
<span
|
|
61
|
+
className="slds-assistive-text"
|
|
124
62
|
>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
>
|
|
128
|
-
Hello World!
|
|
129
|
-
</span>
|
|
130
|
-
</div>
|
|
63
|
+
Hello World!
|
|
64
|
+
</span>
|
|
131
65
|
</div>
|
|
132
66
|
</div>
|
|
133
67
|
`;
|
|
134
68
|
|
|
135
|
-
exports[`DOM snapshots SLDSBrandBand
|
|
69
|
+
exports[`DOM snapshots SLDSBrandBand Large 1`] = `
|
|
136
70
|
<div
|
|
137
71
|
style={
|
|
138
72
|
Object {
|
|
@@ -146,38 +80,14 @@ exports[`DOM snapshots SLDSBrandBand Lightning Blue Theme 1`] = `
|
|
|
146
80
|
}
|
|
147
81
|
>
|
|
148
82
|
<div
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"background": "rgb(176, 196, 223)",
|
|
152
|
-
"height": "100%",
|
|
153
|
-
"position": "relative",
|
|
154
|
-
"width": "100%",
|
|
155
|
-
"zIndex": 1,
|
|
156
|
-
}
|
|
157
|
-
}
|
|
83
|
+
className="slds-brand-band slds-brand-band_large custom-brand-band-class"
|
|
84
|
+
id="brand-band-large"
|
|
158
85
|
>
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
|
|
162
|
-
}
|
|
163
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:after {
|
|
164
|
-
background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
|
|
165
|
-
}
|
|
166
|
-
</style>
|
|
167
|
-
<div
|
|
168
|
-
className="slds-brand-band slds-brand-band_medium dsr-brand-band_lightning-blue slds-p-around_small"
|
|
169
|
-
id="brand-band-lightning-blue"
|
|
86
|
+
<span
|
|
87
|
+
className="slds-assistive-text"
|
|
170
88
|
>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
>
|
|
174
|
-
<h3
|
|
175
|
-
className="slds-text-heading_label slds-truncate"
|
|
176
|
-
>
|
|
177
|
-
My App
|
|
178
|
-
</h3>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
89
|
+
Hello World!
|
|
90
|
+
</span>
|
|
181
91
|
</div>
|
|
182
92
|
</div>
|
|
183
93
|
`;
|
|
@@ -196,35 +106,15 @@ exports[`DOM snapshots SLDSBrandBand No Image 1`] = `
|
|
|
196
106
|
}
|
|
197
107
|
>
|
|
198
108
|
<div
|
|
109
|
+
className="slds-brand-band slds-brand-band_medium slds-brand-band_none"
|
|
110
|
+
id="brand-band-no-image"
|
|
199
111
|
style={
|
|
200
112
|
Object {
|
|
201
|
-
"
|
|
202
|
-
"border": "1px solid #eee",
|
|
203
|
-
"height": "100%",
|
|
204
|
-
"position": "relative",
|
|
205
|
-
"width": "100%",
|
|
113
|
+
"backgroundColor": "#eef4ff",
|
|
206
114
|
"zIndex": 1,
|
|
207
115
|
}
|
|
208
116
|
}
|
|
209
|
-
|
|
210
|
-
<style>
|
|
211
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:before {
|
|
212
|
-
background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
|
|
213
|
-
}
|
|
214
|
-
.slds-brand-band.dsr-brand-band_lightning-blue:after {
|
|
215
|
-
background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
|
|
216
|
-
}
|
|
217
|
-
</style>
|
|
218
|
-
<div
|
|
219
|
-
className="slds-brand-band slds-brand-band_medium slds-brand-band_none dsr-brand-band_lightning-blue"
|
|
220
|
-
id="brand-band-no-image"
|
|
221
|
-
style={
|
|
222
|
-
Object {
|
|
223
|
-
"zIndex": 1,
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
/>
|
|
227
|
-
</div>
|
|
117
|
+
/>
|
|
228
118
|
</div>
|
|
229
119
|
`;
|
|
230
120
|
|
|
@@ -242,28 +132,28 @@ exports[`DOM snapshots SLDSBrandBand Small 1`] = `
|
|
|
242
132
|
}
|
|
243
133
|
>
|
|
244
134
|
<div
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
135
|
+
className="slds-brand-band slds-brand-band_small"
|
|
136
|
+
id="brand-band-small"
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
exports[`DOM snapshots SLDSBrandBand User Image 1`] = `
|
|
142
|
+
<div
|
|
143
|
+
style={
|
|
144
|
+
Object {
|
|
145
|
+
"bottom": "1rem",
|
|
146
|
+
"left": "1rem",
|
|
147
|
+
"overflow": "auto",
|
|
148
|
+
"position": "absolute",
|
|
149
|
+
"right": "1rem",
|
|
150
|
+
"top": "1rem",
|
|
253
151
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
|
|
261
|
-
}
|
|
262
|
-
</style>
|
|
263
|
-
<div
|
|
264
|
-
className="slds-brand-band slds-brand-band_small dsr-brand-band_lightning-blue"
|
|
265
|
-
id="brand-band-small"
|
|
266
|
-
/>
|
|
267
|
-
</div>
|
|
152
|
+
}
|
|
153
|
+
>
|
|
154
|
+
<div
|
|
155
|
+
className="slds-brand-band slds-brand-band_medium slds-brand-band_user"
|
|
156
|
+
id="brand-band-user-image"
|
|
157
|
+
/>
|
|
268
158
|
</div>
|
|
269
159
|
`;
|
|
@@ -4,10 +4,11 @@ import { storiesOf } from '@storybook/react'; // import IconSettings from '../..
|
|
|
4
4
|
import { BRAND_BAND } from '../../../utilities/constants';
|
|
5
5
|
import Default from '../__examples__/default';
|
|
6
6
|
import Large from '../__examples__/large';
|
|
7
|
-
import LightningBlueTheme from '../__examples__/lightning-blue-theme';
|
|
8
7
|
import NoImage from '../__examples__/no-image';
|
|
9
8
|
import Small from '../__examples__/small';
|
|
10
9
|
import BackgroundCover from '../__examples__/background-cover';
|
|
10
|
+
import UserImage from '../__examples__/user-image';
|
|
11
|
+
import GroupImage from '../__examples__/group-image';
|
|
11
12
|
storiesOf(BRAND_BAND, module).addDecorator(function (getStory) {
|
|
12
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
13
14
|
style: {
|
|
@@ -27,8 +28,10 @@ storiesOf(BRAND_BAND, module).addDecorator(function (getStory) {
|
|
|
27
28
|
return /*#__PURE__*/React.createElement(Large, null);
|
|
28
29
|
}).add('No Image', function () {
|
|
29
30
|
return /*#__PURE__*/React.createElement(NoImage, null);
|
|
30
|
-
}).add('
|
|
31
|
-
return /*#__PURE__*/React.createElement(
|
|
31
|
+
}).add('User Image', function () {
|
|
32
|
+
return /*#__PURE__*/React.createElement(UserImage, null);
|
|
33
|
+
}).add('Group Image', function () {
|
|
34
|
+
return /*#__PURE__*/React.createElement(GroupImage, null);
|
|
32
35
|
}).add('Image with background size cover', function () {
|
|
33
36
|
return /*#__PURE__*/React.createElement(BackgroundCover, null);
|
|
34
37
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../.tmp-es/components/brand-band/__docs__/storybook-stories.jsx"],"names":["React","storiesOf","BRAND_BAND","Default","Large","
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/brand-band/__docs__/storybook-stories.jsx"],"names":["React","storiesOf","BRAND_BAND","Default","Large","NoImage","Small","BackgroundCover","UserImage","GroupImage","module","addDecorator","getStory","bottom","left","overflow","position","right","top","add"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,SAAT,QAA0B,kBAA1B,C,CACA;;AAEA,SAASC,UAAT,QAA2B,8BAA3B;AACA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,KAAP,MAAkB,uBAAlB;AACA,OAAOC,OAAP,MAAoB,0BAApB;AACA,OAAOC,KAAP,MAAkB,uBAAlB;AACA,OAAOC,eAAP,MAA4B,kCAA5B;AACA,OAAOC,SAAP,MAAsB,4BAAtB;AACA,OAAOC,UAAP,MAAuB,6BAAvB;AAEAR,SAAS,CAACC,UAAD,EAAaQ,MAAb,CAAT,CACEC,YADF,CACe,UAACC,QAAD;AAAA,sBACb;AACC,IAAA,KAAK,EAAE;AACNC,MAAAA,MAAM,EAAE,MADF;AAENC,MAAAA,IAAI,EAAE,MAFA;AAGNC,MAAAA,QAAQ,EAAE,MAHJ;AAINC,MAAAA,QAAQ,EAAE,UAJJ;AAKNC,MAAAA,KAAK,EAAE,MALD;AAMNC,MAAAA,GAAG,EAAE;AANC;AADR,KAUEN,QAAQ,EAVV,CADa;AAAA,CADf,EAeEO,GAfF,CAeM,kBAfN,EAe0B;AAAA,sBAAM,oBAAC,OAAD,OAAN;AAAA,CAf1B,EAgBEA,GAhBF,CAgBM,OAhBN,EAgBe;AAAA,sBAAM,oBAAC,KAAD,OAAN;AAAA,CAhBf,EAiBEA,GAjBF,CAiBM,OAjBN,EAiBe;AAAA,sBAAM,oBAAC,KAAD,OAAN;AAAA,CAjBf,EAkBEA,GAlBF,CAkBM,UAlBN,EAkBkB;AAAA,sBAAM,oBAAC,OAAD,OAAN;AAAA,CAlBlB,EAmBEA,GAnBF,CAmBM,YAnBN,EAmBoB;AAAA,sBAAM,oBAAC,SAAD,OAAN;AAAA,CAnBpB,EAoBEA,GApBF,CAoBM,aApBN,EAoBqB;AAAA,sBAAM,oBAAC,UAAD,OAAN;AAAA,CApBrB,EAqBEA,GArBF,CAqBM,kCArBN,EAqB0C;AAAA,sBAAM,oBAAC,eAAD,OAAN;AAAA,CArB1C","sourcesContent":["import React from 'react';\nimport { storiesOf } from '@storybook/react';\n// import IconSettings from '../../icon-settings';\n\nimport { BRAND_BAND } from '../../../utilities/constants';\nimport Default from '../__examples__/default';\nimport Large from '../__examples__/large';\nimport NoImage from '../__examples__/no-image';\nimport Small from '../__examples__/small';\nimport BackgroundCover from '../__examples__/background-cover';\nimport UserImage from '../__examples__/user-image';\nimport GroupImage from '../__examples__/group-image';\n\nstoriesOf(BRAND_BAND, module)\n\t.addDecorator((getStory) => (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\tbottom: '1rem',\n\t\t\t\tleft: '1rem',\n\t\t\t\toverflow: 'auto',\n\t\t\t\tposition: 'absolute',\n\t\t\t\tright: '1rem',\n\t\t\t\ttop: '1rem',\n\t\t\t}}\n\t\t>\n\t\t\t{getStory()}\n\t\t</div>\n\t))\n\t.add('Default (medium)', () => <Default />)\n\t.add('Small', () => <Small />)\n\t.add('Large', () => <Large />)\n\t.add('No Image', () => <NoImage />)\n\t.add('User Image', () => <UserImage />)\n\t.add('Group Image', () => <GroupImage />)\n\t.add('Image with background size cover', () => <BackgroundCover />);\n"],"file":"storybook-stories.js"}
|
package/module/components/brand-band/__examples__/{lightning-blue-theme.js → group-image.js}
RENAMED
|
@@ -38,14 +38,9 @@ var Example = /*#__PURE__*/function (_React$Component) {
|
|
|
38
38
|
key: "render",
|
|
39
39
|
value: function render() {
|
|
40
40
|
return /*#__PURE__*/React.createElement(BrandBand, {
|
|
41
|
-
id: "brand-band-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
className: "slds-box slds-theme_default"
|
|
46
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
47
|
-
className: "slds-text-heading_label slds-truncate"
|
|
48
|
-
}, "My App")));
|
|
41
|
+
id: "brand-band-user-group",
|
|
42
|
+
image: "group"
|
|
43
|
+
});
|
|
49
44
|
}
|
|
50
45
|
}]);
|
|
51
46
|
|
|
@@ -54,4 +49,4 @@ var Example = /*#__PURE__*/function (_React$Component) {
|
|
|
54
49
|
|
|
55
50
|
Example.displayName = 'BrandBandExample';
|
|
56
51
|
export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
|
|
57
|
-
//# sourceMappingURL=
|
|
52
|
+
//# sourceMappingURL=group-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/brand-band/__examples__/group-image.jsx"],"names":["React","BrandBand","Example","Component","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,mCAAtB,C,CAAiD;;IAE3CC,O;;;;;;;;;;;;;WACL,kBAAS;AACR,0BAAO,oBAAC,SAAD;AAAW,QAAA,EAAE,EAAC,uBAAd;AAAsC,QAAA,KAAK,EAAC;AAA5C,QAAP;AACA;;;;EAHoBF,KAAK,CAACG,S;;AAM5BD,OAAO,CAACE,WAAR,GAAsB,kBAAtB;AAEA,eAAeF,OAAf,C,CAAwB","sourcesContent":["import React from 'react';\nimport BrandBand from '~/components/brand-band'; // `~` is replaced with design-system-react at runtime\n\nclass Example extends React.Component {\n\trender() {\n\t\treturn <BrandBand id=\"brand-band-user-group\" image=\"group\" />;\n\t}\n}\n\nExample.displayName = 'BrandBandExample';\n\nexport default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime\n"],"file":"group-image.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../.tmp-es/components/brand-band/__examples__/no-image.jsx"],"names":["React","BrandBand","Example","zIndex","
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/brand-band/__examples__/no-image.jsx"],"names":["React","BrandBand","Example","zIndex","backgroundColor","Component","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,mCAAtB,C,CAAiD;;IAE3CC,O;;;;;;;;;;;;;WACL,kBAAS;AACR,0BACC,oBAAC,SAAD;AACC,QAAA,EAAE,EAAC,qBADJ;AAEC,QAAA,KAAK,EAAC,MAFP;AAGC,QAAA,KAAK,EAAE;AAAEC,UAAAA,MAAM,EAAE,CAAV;AAAaC,UAAAA,eAAe,EAAE;AAA9B;AAHR,QADD;AAOA;;;;EAToBJ,KAAK,CAACK,S;;AAY5BH,OAAO,CAACI,WAAR,GAAsB,kBAAtB;AAEA,eAAeJ,OAAf,C,CAAwB","sourcesContent":["import React from 'react';\nimport BrandBand from '~/components/brand-band'; // `~` is replaced with design-system-react at runtime\n\nclass Example extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t<BrandBand\n\t\t\t\tid=\"brand-band-no-image\"\n\t\t\t\timage=\"none\"\n\t\t\t\tstyle={{ zIndex: 1, backgroundColor: '#eef4ff' }}\n\t\t\t/>\n\t\t);\n\t}\n}\n\nExample.displayName = 'BrandBandExample';\n\nexport default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime\n"],"file":"no-image.js"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
import React from 'react';
|
|
24
|
+
import BrandBand from "../../../../components/brand-band"; // `~` is replaced with design-system-react at runtime
|
|
25
|
+
|
|
26
|
+
var Example = /*#__PURE__*/function (_React$Component) {
|
|
27
|
+
_inherits(Example, _React$Component);
|
|
28
|
+
|
|
29
|
+
var _super = _createSuper(Example);
|
|
30
|
+
|
|
31
|
+
function Example() {
|
|
32
|
+
_classCallCheck(this, Example);
|
|
33
|
+
|
|
34
|
+
return _super.apply(this, arguments);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
_createClass(Example, [{
|
|
38
|
+
key: "render",
|
|
39
|
+
value: function render() {
|
|
40
|
+
return /*#__PURE__*/React.createElement(BrandBand, {
|
|
41
|
+
id: "brand-band-user-image",
|
|
42
|
+
image: "user"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}]);
|
|
46
|
+
|
|
47
|
+
return Example;
|
|
48
|
+
}(React.Component);
|
|
49
|
+
|
|
50
|
+
Example.displayName = 'BrandBandExample';
|
|
51
|
+
export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
|
|
52
|
+
//# sourceMappingURL=user-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../.tmp-es/components/brand-band/__examples__/user-image.jsx"],"names":["React","BrandBand","Example","Component","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,mCAAtB,C,CAAiD;;IAE3CC,O;;;;;;;;;;;;;WACL,kBAAS;AACR,0BAAO,oBAAC,SAAD;AAAW,QAAA,EAAE,EAAC,uBAAd;AAAsC,QAAA,KAAK,EAAC;AAA5C,QAAP;AACA;;;;EAHoBF,KAAK,CAACG,S;;AAM5BD,OAAO,CAACE,WAAR,GAAsB,kBAAtB;AAEA,eAAeF,OAAf,C,CAAwB","sourcesContent":["import React from 'react';\nimport BrandBand from '~/components/brand-band'; // `~` is replaced with design-system-react at runtime\n\nclass Example extends React.Component {\n\trender() {\n\t\treturn <BrandBand id=\"brand-band-user-image\" image=\"user\" />;\n\t}\n}\n\nExample.displayName = 'BrandBandExample';\n\nexport default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime\n"],"file":"user-image.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
|
|
5
|
+
/* eslint-disable import/no-mutable-exports */
|
|
6
|
+
|
|
7
|
+
/* eslint-disable max-len */
|
|
8
|
+
import sunsetProperty from '../../utilities/warning/sunset-property';
|
|
9
|
+
|
|
10
|
+
var checkProps = function checkPropsFunction() {};
|
|
11
|
+
|
|
12
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
13
|
+
checkProps = function checkPropsFunction(COMPONENT, props) {
|
|
14
|
+
sunsetProperty(COMPONENT, props.styleContainer, 'styleContainer');
|
|
15
|
+
sunsetProperty(COMPONENT, props.theme, 'theme');
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default checkProps;
|
|
20
|
+
//# sourceMappingURL=check-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../.tmp-es/components/brand-band/check-props.js"],"names":["sunsetProperty","checkProps","checkPropsFunction","process","env","NODE_ENV","COMPONENT","props","styleContainer","theme"],"mappings":"AAAA;;AACA;;AACA;;AACA;AAEA,OAAOA,cAAP,MAA2B,yCAA3B;;AAEA,IAAIC,UAAU,GAAG,SAASC,kBAAT,GAA8B,CAAE,CAAjD;;AAEA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AAC1CJ,EAAAA,UAAU,GAAG,SAASC,kBAAT,CAA4BI,SAA5B,EAAuCC,KAAvC,EAA8C;AAC1DP,IAAAA,cAAc,CAACM,SAAD,EAAYC,KAAK,CAACC,cAAlB,EAAkC,gBAAlC,CAAd;AAEAR,IAAAA,cAAc,CAACM,SAAD,EAAYC,KAAK,CAACE,KAAlB,EAAyB,OAAzB,CAAd;AACA,GAJD;AAKA;;AAED,eAAeR,UAAf","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/* eslint-disable import/no-mutable-exports */\n/* eslint-disable max-len */\n\nimport sunsetProperty from '../../utilities/warning/sunset-property';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props) {\n\t\tsunsetProperty(COMPONENT, props.styleContainer, 'styleContainer');\n\n\t\tsunsetProperty(COMPONENT, props.theme, 'theme');\n\t};\n}\n\nexport default checkProps;\n"],"file":"check-props.js"}
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"SLDS-component-path": "/components/brand-band",
|
|
11
11
|
"site-stories": [
|
|
12
|
-
{
|
|
13
|
-
"heading": "Lightning Blue",
|
|
14
|
-
"path": "/__examples__/lightning-blue-theme.jsx"
|
|
15
|
-
},
|
|
16
12
|
{
|
|
17
13
|
"heading": "Default",
|
|
18
14
|
"path": "/__examples__/default.jsx"
|
|
@@ -28,6 +24,14 @@
|
|
|
28
24
|
{
|
|
29
25
|
"heading": "No Image",
|
|
30
26
|
"path": "/__examples__/no-image.jsx"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"heading": "User Image",
|
|
30
|
+
"path": "/__examples__/user-image.jsx"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"heading": "Group Image",
|
|
34
|
+
"path": "/__examples__/group-image.jsx"
|
|
31
35
|
}
|
|
32
36
|
],
|
|
33
37
|
"url-slug": "brand-band"
|
|
@@ -1,11 +1,5 @@
|
|
|
1
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
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
3
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
4
|
|
|
11
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); } }
|
|
@@ -42,25 +36,13 @@ import shortid from 'shortid'; // ### classNames
|
|
|
42
36
|
// [github.com/JedWatson/classnames](https://github.com/JedWatson/classnames)
|
|
43
37
|
// A simple javascript utility for conditionally joining classNames together.
|
|
44
38
|
|
|
45
|
-
import classNames from '../../utilities/class-names'; //
|
|
39
|
+
import classNames from '../../utilities/class-names'; // This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)
|
|
40
|
+
|
|
41
|
+
import checkProps from './check-props'; // ## Constants
|
|
46
42
|
|
|
47
43
|
import { BRAND_BAND } from '../../utilities/constants';
|
|
48
44
|
/**
|
|
49
45
|
* The brand band provides theming capability that adds personality and improves information density and contrast.
|
|
50
|
-
*
|
|
51
|
-
* NOTE: you may find that themes other than 'default' fail to load the appropriate styling in your application.
|
|
52
|
-
* If this occurs the cause is very likely to be CSP settings on the server hosting your application protecting against style injections.
|
|
53
|
-
* Changing these settings is not recommended. Instead, add the following styles to any stylesheet provided by the server itself (such as an external stylesheet):
|
|
54
|
-
*
|
|
55
|
-
* When using 'lightning-theme':
|
|
56
|
-
* .slds-brand-band.dsr-brand-band_lightning-blue:before {
|
|
57
|
-
* background-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);
|
|
58
|
-
* }
|
|
59
|
-
* .slds-brand-band.dsr-brand-band_lightning-blue:after {
|
|
60
|
-
* background-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);
|
|
61
|
-
* }
|
|
62
|
-
*
|
|
63
|
-
* For more information on the problem, [see this Stack Overflow question](https://stackoverflow.com/questions/17766817/refused-to-apply-inline-style-because-it-violates-the-following-content-security)
|
|
64
46
|
*/
|
|
65
47
|
|
|
66
48
|
var BrandBand = /*#__PURE__*/function (_React$Component) {
|
|
@@ -74,6 +56,7 @@ var BrandBand = /*#__PURE__*/function (_React$Component) {
|
|
|
74
56
|
_classCallCheck(this, BrandBand);
|
|
75
57
|
|
|
76
58
|
_this = _super.call(this, props);
|
|
59
|
+
checkProps(BRAND_BAND, _this.props);
|
|
77
60
|
_this.generatedId = shortid.generate();
|
|
78
61
|
return _this;
|
|
79
62
|
}
|
|
@@ -88,30 +71,18 @@ var BrandBand = /*#__PURE__*/function (_React$Component) {
|
|
|
88
71
|
value: function render() {
|
|
89
72
|
var props = this.props;
|
|
90
73
|
return /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
style: _objectSpread({
|
|
92
|
-
background: 'rgb(176, 196, 223)',
|
|
93
|
-
height: '100%',
|
|
94
|
-
position: 'relative',
|
|
95
|
-
width: '100%',
|
|
96
|
-
zIndex: 1
|
|
97
|
-
}, props.styleContainer)
|
|
98
|
-
}, BrandBand.injectLightningBlueStyles(), /*#__PURE__*/React.createElement("div", {
|
|
99
74
|
className: classNames('slds-brand-band', {
|
|
100
75
|
'slds-brand-band_small': props.size === 'small',
|
|
101
76
|
'slds-brand-band_medium': props.size === 'medium',
|
|
102
77
|
'slds-brand-band_large': props.size === 'large',
|
|
103
78
|
'slds-brand-band_cover': props.backgroundSize === 'cover',
|
|
104
79
|
'slds-brand-band_none': props.image === 'none',
|
|
105
|
-
'
|
|
80
|
+
'slds-brand-band_group': props.image === 'group',
|
|
81
|
+
'slds-brand-band_user': props.image === 'user'
|
|
106
82
|
}, props.className),
|
|
107
83
|
id: this.getId(),
|
|
108
84
|
style: props.style
|
|
109
|
-
}, props.children)
|
|
110
|
-
}
|
|
111
|
-
}], [{
|
|
112
|
-
key: "injectLightningBlueStyles",
|
|
113
|
-
value: function injectLightningBlueStyles() {
|
|
114
|
-
return /*#__PURE__*/React.createElement("style", null, ".slds-brand-band.dsr-brand-band_lightning-blue:before {\n\tbackground-image: url(/assets/images/themes/oneSalesforce/banner-brand-default.png), linear-gradient(to top, rgba(175, 197, 222, 0) 0, #1B5F9E);\n}\n.slds-brand-band.dsr-brand-band_lightning-blue:after {\n\tbackground-image: linear-gradient(to bottom, rgba(175, 197, 222, 0) 60%, #AFC5DE);\n}");
|
|
85
|
+
}, props.children);
|
|
115
86
|
}
|
|
116
87
|
}]);
|
|
117
88
|
|
|
@@ -138,7 +109,7 @@ BrandBand.propTypes = {
|
|
|
138
109
|
/**
|
|
139
110
|
* Image of the brand band
|
|
140
111
|
*/
|
|
141
|
-
image: PropTypes.oneOf(['default', 'none']),
|
|
112
|
+
image: PropTypes.oneOf(['default', 'none', 'group', 'user']),
|
|
142
113
|
|
|
143
114
|
/**
|
|
144
115
|
* Background size of the brand band. Default is 'contain'
|
|
@@ -153,24 +124,12 @@ BrandBand.propTypes = {
|
|
|
153
124
|
/**
|
|
154
125
|
* Custom styles to be passed to the component
|
|
155
126
|
*/
|
|
156
|
-
style: PropTypes.object
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Custom styles to be passed to the component container
|
|
160
|
-
*/
|
|
161
|
-
styleContainer: PropTypes.object,
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Different brand band styling.
|
|
165
|
-
* NOTE: using 'lightning-blue' may result in incorrect styling depending on server CSP settings. See opening component documentation above for details.
|
|
166
|
-
*/
|
|
167
|
-
theme: PropTypes.oneOf(['default', 'lightning-blue'])
|
|
127
|
+
style: PropTypes.object
|
|
168
128
|
};
|
|
169
129
|
BrandBand.defaultProps = {
|
|
170
130
|
backgroundSize: 'contain',
|
|
171
131
|
image: 'default',
|
|
172
|
-
size: 'medium'
|
|
173
|
-
theme: 'default'
|
|
132
|
+
size: 'medium'
|
|
174
133
|
};
|
|
175
134
|
export default BrandBand;
|
|
176
135
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../.tmp-es/components/brand-band/index.jsx"],"names":["React","PropTypes","shortid","classNames","BRAND_BAND","BrandBand","props","generatedId","generate","id","
|
|
1
|
+
{"version":3,"sources":["../../../.tmp-es/components/brand-band/index.jsx"],"names":["React","PropTypes","shortid","classNames","checkProps","BRAND_BAND","BrandBand","props","generatedId","generate","id","size","backgroundSize","image","className","getId","style","children","Component","displayName","propTypes","node","oneOfType","array","object","string","oneOf","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;AAEA;AAEA;AAEA;AAEA;AACA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB,C,CAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,SAApB,C,CAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,6BAAvB,C,CAEA;;AACA,OAAOC,UAAP,MAAuB,eAAvB,C,CAEA;;AACA,SAASC,UAAT,QAA2B,2BAA3B;AAEA;AACA;AACA;;IACMC,S;;;;;AACL,qBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AAClB,8BAAMA,KAAN;AAEAH,IAAAA,UAAU,CAACC,UAAD,EAAa,MAAKE,KAAlB,CAAV;AACA,UAAKC,WAAL,GAAmBN,OAAO,CAACO,QAAR,EAAnB;AAJkB;AAKlB;;;;WAED,iBAAQ;AACP,aAAO,KAAKF,KAAL,CAAWG,EAAX,IAAiB,KAAKF,WAA7B;AACA;;;WAED,kBAAS;AACR,UAAQD,KAAR,GAAkB,IAAlB,CAAQA,KAAR;AAEA,0BACC;AACC,QAAA,SAAS,EAAEJ,UAAU,CACpB,iBADoB,EAEpB;AACC,mCAAyBI,KAAK,CAACI,IAAN,KAAe,OADzC;AAEC,oCAA0BJ,KAAK,CAACI,IAAN,KAAe,QAF1C;AAGC,mCAAyBJ,KAAK,CAACI,IAAN,KAAe,OAHzC;AAIC,mCAAyBJ,KAAK,CAACK,cAAN,KAAyB,OAJnD;AAKC,kCAAwBL,KAAK,CAACM,KAAN,KAAgB,MALzC;AAMC,mCAAyBN,KAAK,CAACM,KAAN,KAAgB,OAN1C;AAOC,kCAAwBN,KAAK,CAACM,KAAN,KAAgB;AAPzC,SAFoB,EAWpBN,KAAK,CAACO,SAXc,CADtB;AAcC,QAAA,EAAE,EAAE,KAAKC,KAAL,EAdL;AAeC,QAAA,KAAK,EAAER,KAAK,CAACS;AAfd,SAiBET,KAAK,CAACU,QAjBR,CADD;AAqBA;;;;EApCsBjB,KAAK,CAACkB,S;;AAuC9BZ,SAAS,CAACa,WAAV,GAAwBd,UAAxB;AAEAC,SAAS,CAACc,SAAV,GAAsB;AACrB;AACD;AACA;AACCH,EAAAA,QAAQ,EAAEhB,SAAS,CAACoB,IAJC;;AAMrB;AACD;AACA;AACCP,EAAAA,SAAS,EAAEb,SAAS,CAACqB,SAAV,CAAoB,CAC9BrB,SAAS,CAACsB,KADoB,EAE9BtB,SAAS,CAACuB,MAFoB,EAG9BvB,SAAS,CAACwB,MAHoB,CAApB,CATU;;AAerB;AACD;AACA;AACCf,EAAAA,EAAE,EAAET,SAAS,CAACwB,MAlBO;;AAoBrB;AACD;AACA;AACCZ,EAAAA,KAAK,EAAEZ,SAAS,CAACyB,KAAV,CAAgB,CAAC,SAAD,EAAY,MAAZ,EAAoB,OAApB,EAA6B,MAA7B,CAAhB,CAvBc;;AAyBrB;AACD;AACA;AACCd,EAAAA,cAAc,EAAEX,SAAS,CAACyB,KAAV,CAAgB,CAAC,SAAD,EAAY,OAAZ,CAAhB,CA5BK;;AA8BrB;AACD;AACA;AACCf,EAAAA,IAAI,EAAEV,SAAS,CAACyB,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,OAApB,CAAhB,CAjCe;;AAmCrB;AACD;AACA;AACCV,EAAAA,KAAK,EAAEf,SAAS,CAACuB;AAtCI,CAAtB;AAyCAlB,SAAS,CAACqB,YAAV,GAAyB;AACxBf,EAAAA,cAAc,EAAE,SADQ;AAExBC,EAAAA,KAAK,EAAE,SAFiB;AAGxBF,EAAAA,IAAI,EAAE;AAHkB,CAAzB;AAMA,eAAeL,SAAf","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// # Brand Band Component\n\n// Implements the [Brand Band design pattern](https://latest-216.lightningdesignsystem.com/components/brand-band/) in React.\n\n// ## Dependencies\n\n// ### React\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\n// ### shortid\n// [npmjs.com/package/shortid](https://www.npmjs.com/package/shortid)\n// shortid is a short, non-sequential, url-friendly, unique id generator\nimport shortid from 'shortid';\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// This component's `checkProps` which issues warnings to developers about properties when in development mode (similar to React's built in development tools)\nimport checkProps from './check-props';\n\n// ## Constants\nimport { BRAND_BAND } from '../../utilities/constants';\n\n/**\n * The brand band provides theming capability that adds personality and improves information density and contrast.\n */\nclass BrandBand extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\n\t\tcheckProps(BRAND_BAND, this.props);\n\t\tthis.generatedId = shortid.generate();\n\t}\n\n\tgetId() {\n\t\treturn this.props.id || this.generatedId;\n\t}\n\n\trender() {\n\t\tconst { props } = this;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\t'slds-brand-band',\n\t\t\t\t\t{\n\t\t\t\t\t\t'slds-brand-band_small': props.size === 'small',\n\t\t\t\t\t\t'slds-brand-band_medium': props.size === 'medium',\n\t\t\t\t\t\t'slds-brand-band_large': props.size === 'large',\n\t\t\t\t\t\t'slds-brand-band_cover': props.backgroundSize === 'cover',\n\t\t\t\t\t\t'slds-brand-band_none': props.image === 'none',\n\t\t\t\t\t\t'slds-brand-band_group': props.image === 'group',\n\t\t\t\t\t\t'slds-brand-band_user': props.image === 'user',\n\t\t\t\t\t},\n\t\t\t\t\tprops.className\n\t\t\t\t)}\n\t\t\t\tid={this.getId()}\n\t\t\t\tstyle={props.style}\n\t\t\t>\n\t\t\t\t{props.children}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nBrandBand.displayName = BRAND_BAND;\n\nBrandBand.propTypes = {\n\t/**\n\t * Primary application grid layout or a white background component such as a `Card` should be passed into this component.\n\t */\n\tchildren: PropTypes.node,\n\n\t/**\n\t * CSS classes that are applied to the component\n\t */\n\tclassName: PropTypes.oneOfType([\n\t\tPropTypes.array,\n\t\tPropTypes.object,\n\t\tPropTypes.string,\n\t]),\n\n\t/**\n\t * Id of component, if desired. If not provided an id is automatically generated\n\t */\n\tid: PropTypes.string,\n\n\t/**\n\t * Image of the brand band\n\t */\n\timage: PropTypes.oneOf(['default', 'none', 'group', 'user']),\n\n\t/**\n\t * Background size of the brand band. Default is 'contain'\n\t */\n\tbackgroundSize: PropTypes.oneOf(['contain', 'cover']),\n\n\t/**\n\t * Size of the brand band. Default is 'medium'\n\t */\n\tsize: PropTypes.oneOf(['small', 'medium', 'large']),\n\n\t/**\n\t * Custom styles to be passed to the component\n\t */\n\tstyle: PropTypes.object,\n};\n\nBrandBand.defaultProps = {\n\tbackgroundSize: 'contain',\n\timage: 'default',\n\tsize: 'medium',\n};\n\nexport default BrandBand;\n"],"file":"index.js"}
|