@salesforce/design-system-react 0.10.43 → 0.10.46
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/button/__tests__/button.browser-test.jsx +0 -1
- package/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
- package/components/combobox/combobox.d.ts +3 -0
- package/components/combobox/combobox.jsx +7 -1
- package/components/component-docs.json +14 -39
- package/components/data-table/cell.jsx +2 -2
- package/components/data-table/index.jsx +134 -85
- package/components/data-table/private/context-helper.js +26 -14
- package/components/data-table/private/head.jsx +269 -260
- package/components/data-table/private/header-cell.jsx +204 -230
- package/components/data-table/private/row.jsx +140 -105
- package/components/data-table/row-actions.jsx +2 -2
- package/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/components/pill-container/private/selected-listbox.jsx +1 -0
- package/components/site-stories.js +8 -4
- package/components/slider.d.ts +10 -4
- package/components/utilities/truncate/index.jsx +1 -1
- 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/button/__tests__/button.browser-test.jsx +0 -1
- package/lib/components/combobox/__tests__/combobox.browser-test.jsx +18 -0
- package/lib/components/combobox/combobox.d.ts +3 -0
- package/lib/components/combobox/combobox.js +9 -2
- package/lib/components/component-docs.json +14 -39
- package/lib/components/data-table/cell.js +6 -6
- package/lib/components/data-table/index.js +131 -99
- package/lib/components/data-table/private/context-helper.js +13 -14
- package/lib/components/data-table/private/head.js +233 -252
- package/lib/components/data-table/private/header-cell.js +185 -221
- package/lib/components/data-table/private/row.js +97 -89
- package/lib/components/data-table/row-actions.js +6 -6
- package/lib/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/lib/components/pill-container/private/selected-listbox.js +3 -0
- package/lib/components/site-stories.js +6 -3
- package/lib/components/slider.d.ts +10 -4
- package/lib/components/utilities/truncate/index.js +2 -2
- package/lib/package.json +14 -10
- 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/button/__tests__/button.browser-test.js +0 -1
- package/module/components/button/__tests__/button.browser-test.js.map +1 -1
- 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.d.ts +3 -0
- package/module/components/combobox/combobox.js +9 -2
- package/module/components/combobox/combobox.js.map +1 -1
- package/module/components/component-docs.json +14 -39
- package/module/components/data-table/cell.js +6 -6
- package/module/components/data-table/cell.js.map +1 -1
- package/module/components/data-table/index.js +124 -95
- package/module/components/data-table/index.js.map +1 -1
- package/module/components/data-table/private/context-helper.js +12 -12
- package/module/components/data-table/private/context-helper.js.map +1 -1
- package/module/components/data-table/private/head.js +230 -255
- package/module/components/data-table/private/head.js.map +1 -1
- package/module/components/data-table/private/header-cell.js +184 -225
- package/module/components/data-table/private/header-cell.js.map +1 -1
- package/module/components/data-table/private/row.js +95 -87
- package/module/components/data-table/private/row.js.map +1 -1
- package/module/components/data-table/row-actions.js +6 -6
- package/module/components/data-table/row-actions.js.map +1 -1
- package/module/components/pill-container/__docs__/__snapshots__/storybook-stories.storyshot +15 -15
- package/module/components/pill-container/private/selected-listbox.js +3 -0
- package/module/components/pill-container/private/selected-listbox.js.map +1 -1
- package/module/components/site-stories.js +6 -3
- package/module/components/site-stories.js.map +1 -1
- package/module/components/slider.d.ts +10 -4
- package/module/components/utilities/truncate/index.js +1 -1
- package/module/components/utilities/truncate/index.js.map +1 -1
- package/package.json +14 -10
- package/module/components/brand-band/__examples__/lightning-blue-theme.js.map +0 -1
|
@@ -25,7 +25,7 @@ var _cellContext = _interopRequireDefault(require("./private/cell-context"));
|
|
|
25
25
|
|
|
26
26
|
var _tableContext = _interopRequireDefault(require("./private/table-context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _contextHelper = _interopRequireDefault(require("./private/context-helper"));
|
|
29
29
|
|
|
30
30
|
var _constants = require("../../utilities/constants");
|
|
31
31
|
|
|
@@ -99,11 +99,11 @@ var DataTableRowActions = function DataTableRowActions(props) {
|
|
|
99
99
|
var tableContext = (0, _react.useContext)(_tableContext.default);
|
|
100
100
|
var cellContext = (0, _react.useContext)(_cellContext.default);
|
|
101
101
|
|
|
102
|
-
var
|
|
103
|
-
tabIndex =
|
|
104
|
-
hasFocus =
|
|
105
|
-
handleFocus =
|
|
106
|
-
handleKeyDown =
|
|
102
|
+
var _useContextHelper = (0, _contextHelper.default)(tableContext, cellContext, props.fixedLayout),
|
|
103
|
+
tabIndex = _useContextHelper.tabIndex,
|
|
104
|
+
hasFocus = _useContextHelper.hasFocus,
|
|
105
|
+
handleFocus = _useContextHelper.handleFocus,
|
|
106
|
+
handleKeyDown = _useContextHelper.handleKeyDown;
|
|
107
107
|
|
|
108
108
|
var handleClick = function handleClick(e) {
|
|
109
109
|
_event.default.trap(e);
|
|
@@ -43,7 +43,7 @@ exports[`DOM snapshots SLDSPillContainer Bare Pill Container 1`] = `
|
|
|
43
43
|
>
|
|
44
44
|
<span
|
|
45
45
|
className="slds-pill__label"
|
|
46
|
-
title="
|
|
46
|
+
title="Full pill label verbiage mirrored here"
|
|
47
47
|
>
|
|
48
48
|
Pill Label 1
|
|
49
49
|
</span>
|
|
@@ -89,7 +89,7 @@ exports[`DOM snapshots SLDSPillContainer Bare Pill Container 1`] = `
|
|
|
89
89
|
>
|
|
90
90
|
<span
|
|
91
91
|
className="slds-pill__label"
|
|
92
|
-
title="
|
|
92
|
+
title="Full pill label verbiage mirrored here"
|
|
93
93
|
>
|
|
94
94
|
Pill Label 2
|
|
95
95
|
</span>
|
|
@@ -169,7 +169,7 @@ exports[`DOM snapshots SLDSPillContainer Base Pill Container 1`] = `
|
|
|
169
169
|
>
|
|
170
170
|
<span
|
|
171
171
|
className="slds-pill__label"
|
|
172
|
-
title="
|
|
172
|
+
title="Full pill label verbiage mirrored here"
|
|
173
173
|
>
|
|
174
174
|
Pill Label 1
|
|
175
175
|
</span>
|
|
@@ -215,7 +215,7 @@ exports[`DOM snapshots SLDSPillContainer Base Pill Container 1`] = `
|
|
|
215
215
|
>
|
|
216
216
|
<span
|
|
217
217
|
className="slds-pill__label"
|
|
218
|
-
title="
|
|
218
|
+
title="Full pill label verbiage mirrored here"
|
|
219
219
|
>
|
|
220
220
|
Pill Label 2
|
|
221
221
|
</span>
|
|
@@ -311,7 +311,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Avatars 1`] = `
|
|
|
311
311
|
</span>
|
|
312
312
|
<span
|
|
313
313
|
className="slds-pill__label"
|
|
314
|
-
title="
|
|
314
|
+
title="Full pill label verbiage mirrored here"
|
|
315
315
|
>
|
|
316
316
|
Pill Label 1
|
|
317
317
|
</span>
|
|
@@ -373,7 +373,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Avatars 1`] = `
|
|
|
373
373
|
</span>
|
|
374
374
|
<span
|
|
375
375
|
className="slds-pill__label"
|
|
376
|
-
title="
|
|
376
|
+
title="Full pill label verbiage mirrored here"
|
|
377
377
|
>
|
|
378
378
|
Pill Label 2
|
|
379
379
|
</span>
|
|
@@ -471,7 +471,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
471
471
|
</span>
|
|
472
472
|
<span
|
|
473
473
|
className="slds-pill__label"
|
|
474
|
-
title="
|
|
474
|
+
title="Full pill label verbiage mirrored here"
|
|
475
475
|
>
|
|
476
476
|
Pill Label 1
|
|
477
477
|
</span>
|
|
@@ -535,7 +535,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
535
535
|
</span>
|
|
536
536
|
<span
|
|
537
537
|
className="slds-pill__label"
|
|
538
|
-
title="
|
|
538
|
+
title="Full pill label verbiage mirrored here"
|
|
539
539
|
>
|
|
540
540
|
Pill Label 2
|
|
541
541
|
</span>
|
|
@@ -598,7 +598,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
598
598
|
</span>
|
|
599
599
|
<span
|
|
600
600
|
className="slds-pill__label"
|
|
601
|
-
title="
|
|
601
|
+
title="Full pill label verbiage mirrored here"
|
|
602
602
|
>
|
|
603
603
|
Pill Label 3
|
|
604
604
|
</span>
|
|
@@ -662,7 +662,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
662
662
|
</span>
|
|
663
663
|
<span
|
|
664
664
|
className="slds-pill__label"
|
|
665
|
-
title="
|
|
665
|
+
title="Full pill label verbiage mirrored here"
|
|
666
666
|
>
|
|
667
667
|
Pill Label 4
|
|
668
668
|
</span>
|
|
@@ -726,7 +726,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
726
726
|
</span>
|
|
727
727
|
<span
|
|
728
728
|
className="slds-pill__label"
|
|
729
|
-
title="
|
|
729
|
+
title="Full pill label verbiage mirrored here"
|
|
730
730
|
>
|
|
731
731
|
Pill Label 5
|
|
732
732
|
</span>
|
|
@@ -790,7 +790,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
790
790
|
</span>
|
|
791
791
|
<span
|
|
792
792
|
className="slds-pill__label"
|
|
793
|
-
title="
|
|
793
|
+
title="Full pill label verbiage mirrored here"
|
|
794
794
|
>
|
|
795
795
|
Pill Label 6
|
|
796
796
|
</span>
|
|
@@ -854,7 +854,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
854
854
|
</span>
|
|
855
855
|
<span
|
|
856
856
|
className="slds-pill__label"
|
|
857
|
-
title="
|
|
857
|
+
title="Full pill label verbiage mirrored here"
|
|
858
858
|
>
|
|
859
859
|
Pill Label 7
|
|
860
860
|
</span>
|
|
@@ -918,7 +918,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
918
918
|
</span>
|
|
919
919
|
<span
|
|
920
920
|
className="slds-pill__label"
|
|
921
|
-
title="
|
|
921
|
+
title="Full pill label verbiage mirrored here"
|
|
922
922
|
>
|
|
923
923
|
Pill Label 8
|
|
924
924
|
</span>
|
|
@@ -982,7 +982,7 @@ exports[`DOM snapshots SLDSPillContainer Pill Container With Icons 1`] = `
|
|
|
982
982
|
</span>
|
|
983
983
|
<span
|
|
984
984
|
className="slds-pill__label"
|
|
985
|
-
title="
|
|
985
|
+
title="Full pill label verbiage mirrored here"
|
|
986
986
|
>
|
|
987
987
|
Pill Label 9
|
|
988
988
|
</span>
|
|
@@ -217,6 +217,8 @@ var SelectedListBox = function SelectedListBox(props) {
|
|
|
217
217
|
role: props.listboxRole,
|
|
218
218
|
"aria-orientation": props.listboxAriaOrientation
|
|
219
219
|
}, props.selection.map(function (option, renderIndex) {
|
|
220
|
+
var _option$title;
|
|
221
|
+
|
|
220
222
|
var hasTabIndex = renderIndex === props.activeOptionIndex;
|
|
221
223
|
var icon = getIcon(option);
|
|
222
224
|
var avatar = !icon ? getAvatar(option) : null;
|
|
@@ -260,6 +262,7 @@ var SelectedListBox = function SelectedListBox(props) {
|
|
|
260
262
|
icon: icon,
|
|
261
263
|
labels: {
|
|
262
264
|
label: option.label,
|
|
265
|
+
title: (_option$title = option.title) !== null && _option$title !== void 0 ? _option$title : option.label,
|
|
263
266
|
removeTitle: props.labels.removePillTitle
|
|
264
267
|
},
|
|
265
268
|
requestFocus: props.listboxHasFocus,
|
|
@@ -62,9 +62,6 @@ var documentationSiteLiveExamples = {
|
|
|
62
62
|
path: require('raw-loader!@salesforce/design-system-react/components/badge/__examples__/with-icon.jsx')
|
|
63
63
|
}],
|
|
64
64
|
'brand-band': [{
|
|
65
|
-
heading: 'Lightning Blue',
|
|
66
|
-
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/lightning-blue-theme.jsx')
|
|
67
|
-
}, {
|
|
68
65
|
heading: 'Default',
|
|
69
66
|
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/default.jsx')
|
|
70
67
|
}, {
|
|
@@ -76,6 +73,12 @@ var documentationSiteLiveExamples = {
|
|
|
76
73
|
}, {
|
|
77
74
|
heading: 'No Image',
|
|
78
75
|
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/no-image.jsx')
|
|
76
|
+
}, {
|
|
77
|
+
heading: 'User Image',
|
|
78
|
+
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/user-image.jsx')
|
|
79
|
+
}, {
|
|
80
|
+
heading: 'Group Image',
|
|
81
|
+
path: require('raw-loader!@salesforce/design-system-react/components/brand-band/__examples__/group-image.jsx')
|
|
79
82
|
}],
|
|
80
83
|
breadcrumb: [{
|
|
81
84
|
heading: 'Base',
|
|
@@ -55,13 +55,19 @@ declare module '@salesforce/design-system-react/components/slider' {
|
|
|
55
55
|
*/
|
|
56
56
|
name?: string;
|
|
57
57
|
/**
|
|
58
|
-
* This event fires whenever the user has modified the data of the control. This callback recieves the following parameters `event, { value:
|
|
58
|
+
* This event fires whenever the user has modified the data of the control. This callback recieves the following parameters `event, { value: number }`.
|
|
59
59
|
*/
|
|
60
|
-
onChange?: (
|
|
60
|
+
onChange?: (
|
|
61
|
+
event: React.ChangeEvent<HTMLInputElement>,
|
|
62
|
+
{ value: number }
|
|
63
|
+
) => void;
|
|
61
64
|
/**
|
|
62
|
-
* This event fires when the value is committed. This callback recieves the following parameters `event, { value:
|
|
65
|
+
* This event fires when the value is committed. This callback recieves the following parameters `event, { value: number }`.
|
|
63
66
|
*/
|
|
64
|
-
onInput?: (
|
|
67
|
+
onInput?: (
|
|
68
|
+
event: React.ChangeEvent<HTMLInputElement>,
|
|
69
|
+
{ value: number }
|
|
70
|
+
) => void;
|
|
65
71
|
/**
|
|
66
72
|
* Size of the slider.
|
|
67
73
|
*/
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
@@ -57,7 +57,7 @@ if (documentDefined) {
|
|
|
57
57
|
docFragment = document.createDocumentFragment();
|
|
58
58
|
docFragment.appendChild(canvas);
|
|
59
59
|
canvasContext = canvas.getContext('2d');
|
|
60
|
-
measureWidth = (0,
|
|
60
|
+
measureWidth = (0, _memoizeOne.default)(function (text, font) {
|
|
61
61
|
canvasContext.font = font;
|
|
62
62
|
return canvasContext.measureText(text).width;
|
|
63
63
|
});
|
package/lib/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "design-system-react",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.46",
|
|
4
4
|
"description": "Salesforce Lightning Design System for React",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "BSD-3-Clause",
|
|
6
6
|
"engines": {},
|
|
7
7
|
"husky": {
|
|
8
8
|
"hooks": {
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"lodash.isdate": "^4.0.1",
|
|
45
45
|
"lodash.isequal": "^4.5.0",
|
|
46
46
|
"lodash.isfunction": "^3.0.9",
|
|
47
|
-
"lodash.memoize": "^4.1.2",
|
|
48
47
|
"lodash.reject": "^4.6.0",
|
|
48
|
+
"memoize-one": "^6.0.0",
|
|
49
49
|
"popper.js": "^1.10.8",
|
|
50
50
|
"prop-types": ">=15.7.2",
|
|
51
51
|
"react-contenteditable": "^3.3.5",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@salesforce-ux/design-system": "^2.14.3",
|
|
62
|
-
"react": ">=16.
|
|
63
|
-
"react-dom": ">=16.
|
|
62
|
+
"react": ">=16.8",
|
|
63
|
+
"react-dom": ">=16.8"
|
|
64
64
|
},
|
|
65
65
|
"components": [
|
|
66
66
|
{
|
|
@@ -222,10 +222,6 @@
|
|
|
222
222
|
},
|
|
223
223
|
"SLDS-component-path": "/components/brand-band",
|
|
224
224
|
"site-stories": [
|
|
225
|
-
{
|
|
226
|
-
"heading": "Lightning Blue",
|
|
227
|
-
"path": "/__examples__/lightning-blue-theme.jsx"
|
|
228
|
-
},
|
|
229
225
|
{
|
|
230
226
|
"heading": "Default",
|
|
231
227
|
"path": "/__examples__/default.jsx"
|
|
@@ -241,6 +237,14 @@
|
|
|
241
237
|
{
|
|
242
238
|
"heading": "No Image",
|
|
243
239
|
"path": "/__examples__/no-image.jsx"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"heading": "User Image",
|
|
243
|
+
"path": "/__examples__/user-image.jsx"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"heading": "Group Image",
|
|
247
|
+
"path": "/__examples__/group-image.jsx"
|
|
244
248
|
}
|
|
245
249
|
],
|
|
246
250
|
"url-slug": "brand-band"
|
|
@@ -1845,6 +1849,6 @@
|
|
|
1845
1849
|
}
|
|
1846
1850
|
},
|
|
1847
1851
|
"SLDS": {
|
|
1848
|
-
"gitURL": "^2.
|
|
1852
|
+
"gitURL": "^2.14.3"
|
|
1849
1853
|
}
|
|
1850
1854
|
}
|
|
@@ -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"}
|