@salesforce/design-system-react 0.10.35 → 0.10.39

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.
Files changed (172) hide show
  1. package/assets/styles/table.css +70 -0
  2. package/components/builder-header/utilities.d.ts +20 -0
  3. package/components/card/__docs__/__snapshots__/storybook-stories.storyshot +20 -5
  4. package/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  5. package/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
  6. package/components/combobox/combobox.jsx +20 -18
  7. package/components/component-docs.json +160 -0
  8. package/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +17997 -11862
  9. package/components/data-table/__docs__/storybook-stories.jsx +5 -1
  10. package/components/data-table/__examples__/advanced-single-select-fixed-header.jsx +1 -0
  11. package/components/data-table/__examples__/basic-fluid-headless.jsx +105 -0
  12. package/components/data-table/__examples__/interactive-elements.jsx +14 -0
  13. package/components/data-table/__examples__/joined-with-page-header.jsx +11 -18
  14. package/components/data-table/__examples__/resizable-columns.jsx +237 -0
  15. package/components/data-table/__tests__/data-table.browser-test.jsx +133 -0
  16. package/components/data-table/column.resizer.d.ts +1 -0
  17. package/components/data-table/component.json +11 -7
  18. package/components/data-table/index.jsx +431 -80
  19. package/components/data-table/private/head.jsx +8 -3
  20. package/components/data-table/private/header-cell.jsx +9 -1
  21. package/components/data-table.d.ts +8 -0
  22. package/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  23. package/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  24. package/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  25. package/components/index.d.ts +2 -0
  26. package/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
  27. package/components/menu-dropdown/__docs__/storybook-stories.jsx +4 -16
  28. package/components/menu-dropdown/__examples__/checkmark.jsx +48 -31
  29. package/components/menu-dropdown/__tests__/dropdown.browser-test.jsx +12 -7
  30. package/components/modal/__tests__/modal.browser-test.jsx +4 -10
  31. package/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  32. package/components/progress-indicator/__docs__/__snapshots__/storybook-stories.storyshot +161 -14
  33. package/components/progress-indicator/private/step-vertical.jsx +28 -2
  34. package/components/setup-assistant/__docs__/__snapshots__/storybook-stories.storyshot +180 -13
  35. package/components/site-stories.js +16 -4
  36. package/components/utilities/menu-list/index.jsx +3 -0
  37. package/components/utilities/menu-list/item.jsx +5 -2
  38. package/components/vertical-navigation/__docs__/__snapshots__/storybook-stories.storyshot +326 -0
  39. package/components/vertical-navigation/__docs__/storybook-stories.jsx +4 -0
  40. package/components/vertical-navigation/__examples__/icons.jsx +70 -0
  41. package/components/vertical-navigation/__examples__/notifications.jsx +66 -0
  42. package/components/vertical-navigation/component.json +8 -0
  43. package/components/vertical-navigation/private/item.d.ts +2 -0
  44. package/components/vertical-navigation/private/item.jsx +23 -1
  45. package/docs/PULL_REQUEST_TEMPLATE.md +1 -1
  46. package/lib/assets/styles/table.css +70 -0
  47. package/lib/components/builder-header/utilities.d.ts +20 -0
  48. package/lib/components/card/__docs__/__snapshots__/storybook-stories.storyshot +20 -5
  49. package/lib/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  50. package/lib/components/combobox/__tests__/combobox.browser-test.jsx +4 -5
  51. package/lib/components/combobox/combobox.js +27 -23
  52. package/lib/components/component-docs.json +160 -0
  53. package/lib/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +17997 -11862
  54. package/lib/components/data-table/__docs__/storybook-stories.jsx +5 -1
  55. package/lib/components/data-table/__examples__/advanced-single-select-fixed-header.jsx +1 -0
  56. package/lib/components/data-table/__examples__/basic-fluid-headless.jsx +105 -0
  57. package/lib/components/data-table/__examples__/interactive-elements.jsx +14 -0
  58. package/lib/components/data-table/__examples__/joined-with-page-header.jsx +11 -18
  59. package/lib/components/data-table/__examples__/resizable-columns.jsx +237 -0
  60. package/lib/components/data-table/__tests__/data-table.browser-test.jsx +133 -0
  61. package/lib/components/data-table/column.resizer.d.ts +1 -0
  62. package/lib/components/data-table/component.json +11 -7
  63. package/lib/components/data-table/index.js +444 -107
  64. package/lib/components/data-table/private/head.js +8 -3
  65. package/lib/components/data-table/private/header-cell.js +3 -1
  66. package/lib/components/data-table.d.ts +8 -0
  67. package/lib/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  68. package/lib/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  69. package/lib/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  70. package/lib/components/index.d.ts +2 -0
  71. package/lib/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
  72. package/lib/components/menu-dropdown/__docs__/storybook-stories.jsx +4 -16
  73. package/lib/components/menu-dropdown/__examples__/checkmark.jsx +48 -31
  74. package/lib/components/menu-dropdown/__tests__/dropdown.browser-test.jsx +12 -7
  75. package/lib/components/modal/__tests__/modal.browser-test.jsx +4 -10
  76. package/lib/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  77. package/lib/components/progress-indicator/__docs__/__snapshots__/storybook-stories.storyshot +161 -14
  78. package/lib/components/progress-indicator/private/step-vertical.js +18 -4
  79. package/lib/components/setup-assistant/__docs__/__snapshots__/storybook-stories.storyshot +180 -13
  80. package/lib/components/site-stories.js +12 -3
  81. package/lib/components/utilities/menu-list/index.js +5 -2
  82. package/lib/components/utilities/menu-list/item.js +3 -2
  83. package/lib/components/vertical-navigation/__docs__/__snapshots__/storybook-stories.storyshot +326 -0
  84. package/lib/components/vertical-navigation/__docs__/storybook-stories.jsx +4 -0
  85. package/lib/components/vertical-navigation/__examples__/icons.jsx +70 -0
  86. package/lib/components/vertical-navigation/__examples__/notifications.jsx +66 -0
  87. package/lib/components/vertical-navigation/component.json +8 -0
  88. package/lib/components/vertical-navigation/private/item.d.ts +2 -0
  89. package/lib/components/vertical-navigation/private/item.js +5 -1
  90. package/lib/docs/PULL_REQUEST_TEMPLATE.md +1 -1
  91. package/lib/package.json +19 -6
  92. package/module/assets/styles/table.css +70 -0
  93. package/module/components/builder-header/utilities.d.ts +20 -0
  94. package/module/components/card/__docs__/__snapshots__/storybook-stories.storyshot +20 -5
  95. package/module/components/combobox/__docs__/__snapshots__/storybook-stories.storyshot +178 -169
  96. package/module/components/combobox/__tests__/combobox.browser-test.js +5 -6
  97. package/module/components/combobox/__tests__/combobox.browser-test.js.map +1 -1
  98. package/module/components/combobox/combobox.js +27 -23
  99. package/module/components/combobox/combobox.js.map +1 -1
  100. package/module/components/component-docs.json +160 -0
  101. package/module/components/data-table/__docs__/__snapshots__/storybook-stories.storyshot +17997 -11862
  102. package/module/components/data-table/__docs__/storybook-stories.js +6 -0
  103. package/module/components/data-table/__docs__/storybook-stories.js.map +1 -1
  104. package/module/components/data-table/__examples__/advanced-single-select-fixed-header.js +1 -0
  105. package/module/components/data-table/__examples__/advanced-single-select-fixed-header.js.map +1 -1
  106. package/module/components/data-table/__examples__/basic-fluid-headless.js +152 -0
  107. package/module/components/data-table/__examples__/basic-fluid-headless.js.map +1 -0
  108. package/module/components/data-table/__examples__/interactive-elements.js +9 -0
  109. package/module/components/data-table/__examples__/interactive-elements.js.map +1 -1
  110. package/module/components/data-table/__examples__/joined-with-page-header.js +9 -20
  111. package/module/components/data-table/__examples__/joined-with-page-header.js.map +1 -1
  112. package/module/components/data-table/__examples__/resizable-columns.js +266 -0
  113. package/module/components/data-table/__examples__/resizable-columns.js.map +1 -0
  114. package/module/components/data-table/__tests__/data-table.browser-test.js +99 -0
  115. package/module/components/data-table/__tests__/data-table.browser-test.js.map +1 -1
  116. package/module/components/data-table/column.resizer.d.ts +1 -0
  117. package/module/components/data-table/component.json +11 -7
  118. package/module/components/data-table/index.js +443 -107
  119. package/module/components/data-table/index.js.map +1 -1
  120. package/module/components/data-table/private/head.js +8 -3
  121. package/module/components/data-table/private/head.js.map +1 -1
  122. package/module/components/data-table/private/header-cell.js +3 -1
  123. package/module/components/data-table/private/header-cell.js.map +1 -1
  124. package/module/components/data-table.d.ts +8 -0
  125. package/module/components/date-picker/__tests__/__snapshots__/datepicker.dom-snapshot-test.jsx.snap +17 -17
  126. package/module/components/expression/__docs__/__snapshots__/storybook-stories.storyshot +90 -90
  127. package/module/components/global-header/__docs__/__snapshots__/storybook-stories.storyshot +9 -9
  128. package/module/components/index.d.ts +2 -0
  129. package/module/components/menu-dropdown/__docs__/__snapshots__/storybook-stories.storyshot +552 -26
  130. package/module/components/menu-dropdown/__docs__/storybook-stories.js +9 -15
  131. package/module/components/menu-dropdown/__docs__/storybook-stories.js.map +1 -1
  132. package/module/components/menu-dropdown/__examples__/checkmark.js +53 -33
  133. package/module/components/menu-dropdown/__examples__/checkmark.js.map +1 -1
  134. package/module/components/menu-dropdown/__tests__/dropdown.browser-test.js +7 -4
  135. package/module/components/menu-dropdown/__tests__/dropdown.browser-test.js.map +1 -1
  136. package/module/components/modal/__tests__/modal.browser-test.js +4 -10
  137. package/module/components/modal/__tests__/modal.browser-test.js.map +1 -1
  138. package/module/components/portal-settings/__docs__/__snapshots__/storybook-stories.storyshot +6 -6
  139. package/module/components/progress-indicator/__docs__/__snapshots__/storybook-stories.storyshot +161 -14
  140. package/module/components/progress-indicator/private/step-vertical.js +18 -4
  141. package/module/components/progress-indicator/private/step-vertical.js.map +1 -1
  142. package/module/components/setup-assistant/__docs__/__snapshots__/storybook-stories.storyshot +180 -13
  143. package/module/components/site-stories.js +12 -3
  144. package/module/components/site-stories.js.map +1 -1
  145. package/module/components/utilities/menu-list/index.js +5 -2
  146. package/module/components/utilities/menu-list/index.js.map +1 -1
  147. package/module/components/utilities/menu-list/item.js +3 -2
  148. package/module/components/utilities/menu-list/item.js.map +1 -1
  149. package/module/components/vertical-navigation/__docs__/__snapshots__/storybook-stories.storyshot +326 -0
  150. package/module/components/vertical-navigation/__docs__/storybook-stories.js +10 -0
  151. package/module/components/vertical-navigation/__docs__/storybook-stories.js.map +1 -1
  152. package/module/components/vertical-navigation/__examples__/icons.js +149 -0
  153. package/module/components/vertical-navigation/__examples__/icons.js.map +1 -0
  154. package/module/components/vertical-navigation/__examples__/notifications.js +143 -0
  155. package/module/components/vertical-navigation/__examples__/notifications.js.map +1 -0
  156. package/module/components/vertical-navigation/component.json +8 -0
  157. package/module/components/vertical-navigation/private/item.d.ts +2 -0
  158. package/module/components/vertical-navigation/private/item.js +5 -1
  159. package/module/components/vertical-navigation/private/item.js.map +1 -1
  160. package/package.json +19 -6
  161. package/design-system-react-components.js +0 -62702
  162. package/design-system-react-components.js.map +0 -1
  163. package/design-system-react-components.min.js +0 -3
  164. package/design-system-react-components.min.js.LICENSE.txt +0 -83
  165. package/design-system-react-components.min.js.map +0 -1
  166. package/design-system-react.js +0 -73487
  167. package/design-system-react.js.map +0 -1
  168. package/design-system-react.min.js +0 -3
  169. package/design-system-react.min.js.LICENSE.txt +0 -83
  170. package/design-system-react.min.js.map +0 -1
  171. package/lib/design-system-react-components.min.js.LICENSE.txt +0 -83
  172. package/lib/design-system-react.min.js.LICENSE.txt +0 -83
@@ -289,3 +289,329 @@ exports[`DOM snapshots SLDSVerticalNavigation Default 1`] = `
289
289
  </div>
290
290
  </div>
291
291
  `;
292
+
293
+ exports[`DOM snapshots SLDSVerticalNavigation With icons 1`] = `
294
+ <div
295
+ className="slds-p-around_medium"
296
+ >
297
+ <div
298
+ style={
299
+ Object {
300
+ "width": "320px",
301
+ }
302
+ }
303
+ >
304
+ <nav
305
+ className="slds-nav-vertical"
306
+ id="sample-navigation"
307
+ >
308
+ <div
309
+ className="slds-nav-vertical__section"
310
+ >
311
+ <h2
312
+ className="slds-nav-vertical__title"
313
+ id="sample-navigation-reports"
314
+ >
315
+ Reports
316
+ </h2>
317
+ <ul>
318
+ <li
319
+ className="slds-nav-vertical__item slds-is-active"
320
+ >
321
+ <a
322
+ aria-current={true}
323
+ aria-describedby="sample-navigation-reports"
324
+ className="slds-nav-vertical__action"
325
+ data-id="recent_reports"
326
+ href="#"
327
+ onClick={[Function]}
328
+ >
329
+ Recent
330
+ </a>
331
+ </li>
332
+ <li
333
+ className="slds-nav-vertical__item"
334
+ >
335
+ <a
336
+ aria-describedby="sample-navigation-reports"
337
+ className="slds-nav-vertical__action"
338
+ data-id="my_reports"
339
+ href="#"
340
+ onClick={[Function]}
341
+ >
342
+ Created by Me
343
+ </a>
344
+ </li>
345
+ <li
346
+ className="slds-nav-vertical__item"
347
+ >
348
+ <a
349
+ aria-describedby="sample-navigation-reports"
350
+ className="slds-nav-vertical__action"
351
+ data-id="private_reports"
352
+ href="#"
353
+ onClick={[Function]}
354
+ >
355
+ Private Reports
356
+ </a>
357
+ </li>
358
+ <li
359
+ className="slds-nav-vertical__item"
360
+ >
361
+ <a
362
+ aria-describedby="sample-navigation-reports"
363
+ className="slds-nav-vertical__action"
364
+ data-id="public_reports"
365
+ href="#"
366
+ onClick={[Function]}
367
+ >
368
+ Public Reports
369
+ </a>
370
+ </li>
371
+ <li
372
+ className="slds-nav-vertical__item"
373
+ >
374
+ <a
375
+ aria-describedby="sample-navigation-reports"
376
+ className="slds-nav-vertical__action"
377
+ data-id="all_reports"
378
+ href="#"
379
+ onClick={[Function]}
380
+ >
381
+ All Reports
382
+ </a>
383
+ </li>
384
+ </ul>
385
+ </div>
386
+ <div
387
+ className="slds-nav-vertical__section"
388
+ >
389
+ <h2
390
+ className="slds-nav-vertical__title"
391
+ id="sample-navigation-folders"
392
+ >
393
+ Folders
394
+ </h2>
395
+ <ul>
396
+ <li
397
+ className="slds-nav-vertical__item"
398
+ >
399
+ <a
400
+ aria-describedby="sample-navigation-folders"
401
+ className="slds-nav-vertical__action"
402
+ data-id="my_folders"
403
+ href="#"
404
+ onClick={[Function]}
405
+ >
406
+ <span>
407
+ <svg
408
+ aria-hidden="true"
409
+ className="slds-m-right_x-small slds-icon slds-icon_x-small slds-icon-text-default"
410
+ >
411
+ <use
412
+ href="/assets/icons/utility-sprite/svg/symbols.svg#open_folder"
413
+ />
414
+ </svg>
415
+
416
+ </span>
417
+ Created by Me
418
+ </a>
419
+ </li>
420
+ <li
421
+ className="slds-nav-vertical__item"
422
+ >
423
+ <a
424
+ aria-describedby="sample-navigation-folders"
425
+ className="slds-nav-vertical__action"
426
+ data-id="shared_folders"
427
+ href="#"
428
+ onClick={[Function]}
429
+ >
430
+ <span>
431
+ <svg
432
+ aria-hidden="true"
433
+ className="slds-m-right_x-small slds-icon slds-icon_x-small slds-icon-text-default"
434
+ >
435
+ <use
436
+ href="/assets/icons/utility-sprite/svg/symbols.svg#open_folder"
437
+ />
438
+ </svg>
439
+
440
+ </span>
441
+ Shared with Me
442
+ </a>
443
+ </li>
444
+ <li
445
+ className="slds-nav-vertical__item"
446
+ >
447
+ <a
448
+ aria-describedby="sample-navigation-folders"
449
+ className="slds-nav-vertical__action"
450
+ data-id="all_folders"
451
+ href="#"
452
+ onClick={[Function]}
453
+ >
454
+ All Folders
455
+ </a>
456
+ </li>
457
+ </ul>
458
+ </div>
459
+ </nav>
460
+ </div>
461
+ </div>
462
+ `;
463
+
464
+ exports[`DOM snapshots SLDSVerticalNavigation With notifications 1`] = `
465
+ <div
466
+ className="slds-p-around_medium"
467
+ >
468
+ <div
469
+ style={
470
+ Object {
471
+ "width": "320px",
472
+ }
473
+ }
474
+ >
475
+ <nav
476
+ className="slds-nav-vertical"
477
+ id="sample-navigation"
478
+ >
479
+ <div
480
+ className="slds-nav-vertical__section"
481
+ >
482
+ <h2
483
+ className="slds-nav-vertical__title"
484
+ id="sample-navigation-reports"
485
+ >
486
+ Reports
487
+ </h2>
488
+ <ul>
489
+ <li
490
+ className="slds-nav-vertical__item slds-is-active"
491
+ >
492
+ <a
493
+ aria-current={true}
494
+ aria-describedby="sample-navigation-reports"
495
+ className="slds-nav-vertical__action"
496
+ data-id="recent_reports"
497
+ href="#"
498
+ onClick={[Function]}
499
+ >
500
+ Recent
501
+ </a>
502
+ </li>
503
+ <li
504
+ className="slds-nav-vertical__item"
505
+ >
506
+ <a
507
+ aria-describedby="sample-navigation-reports"
508
+ className="slds-nav-vertical__action"
509
+ data-id="my_reports"
510
+ href="#"
511
+ onClick={[Function]}
512
+ >
513
+ Created by Me
514
+ </a>
515
+ </li>
516
+ <li
517
+ className="slds-nav-vertical__item"
518
+ >
519
+ <a
520
+ aria-describedby="sample-navigation-reports"
521
+ className="slds-nav-vertical__action"
522
+ data-id="private_reports"
523
+ href="#"
524
+ onClick={[Function]}
525
+ >
526
+ Private Reports
527
+ </a>
528
+ </li>
529
+ <li
530
+ className="slds-nav-vertical__item"
531
+ >
532
+ <a
533
+ aria-describedby="sample-navigation-reports"
534
+ className="slds-nav-vertical__action"
535
+ data-id="public_reports"
536
+ href="#"
537
+ onClick={[Function]}
538
+ >
539
+ Public Reports
540
+ </a>
541
+ </li>
542
+ <li
543
+ className="slds-nav-vertical__item"
544
+ >
545
+ <a
546
+ aria-describedby="sample-navigation-reports"
547
+ className="slds-nav-vertical__action"
548
+ data-id="all_reports"
549
+ href="#"
550
+ onClick={[Function]}
551
+ >
552
+ All Reports
553
+ </a>
554
+ </li>
555
+ </ul>
556
+ </div>
557
+ <div
558
+ className="slds-nav-vertical__section"
559
+ >
560
+ <h2
561
+ className="slds-nav-vertical__title"
562
+ id="sample-navigation-folders"
563
+ >
564
+ Folders
565
+ </h2>
566
+ <ul>
567
+ <li
568
+ className="slds-nav-vertical__item"
569
+ >
570
+ <a
571
+ aria-describedby="sample-navigation-folders"
572
+ className="slds-nav-vertical__action"
573
+ data-id="my_folders"
574
+ href="#"
575
+ onClick={[Function]}
576
+ >
577
+ Created by Me
578
+ <span
579
+ className="slds-badge slds-col_bump-left"
580
+ id="notification-badge"
581
+ >
582
+ 3
583
+ </span>
584
+ </a>
585
+ </li>
586
+ <li
587
+ className="slds-nav-vertical__item"
588
+ >
589
+ <a
590
+ aria-describedby="sample-navigation-folders"
591
+ className="slds-nav-vertical__action"
592
+ data-id="shared_folders"
593
+ href="#"
594
+ onClick={[Function]}
595
+ >
596
+ Shared with Me
597
+ </a>
598
+ </li>
599
+ <li
600
+ className="slds-nav-vertical__item"
601
+ >
602
+ <a
603
+ aria-describedby="sample-navigation-folders"
604
+ className="slds-nav-vertical__action"
605
+ data-id="all_folders"
606
+ href="#"
607
+ onClick={[Function]}
608
+ >
609
+ All Folders
610
+ </a>
611
+ </li>
612
+ </ul>
613
+ </div>
614
+ </nav>
615
+ </div>
616
+ </div>
617
+ `;
@@ -6,6 +6,8 @@ import IconSettings from '../../icon-settings';
6
6
  import { VERTICAL_NAVIGATION } from '../../../utilities/constants';
7
7
 
8
8
  import Default from '../__examples__/default';
9
+ import IconExample from '../__examples__/icons';
10
+ import NotificationExample from '../__examples__/notifications';
9
11
  import SnaphotDefault from '../__examples__/snapshot-default';
10
12
 
11
13
  storiesOf(VERTICAL_NAVIGATION, module)
@@ -15,4 +17,6 @@ storiesOf(VERTICAL_NAVIGATION, module)
15
17
  </div>
16
18
  ))
17
19
  .add('Default', () => <Default action={action} />)
20
+ .add('With icons', () => <IconExample action={action} />)
21
+ .add('With notifications', () => <NotificationExample action={action} />)
18
22
  .add('DOM Snapshot', () => <SnaphotDefault />);
@@ -0,0 +1,70 @@
1
+ /* eslint-disable no-console, react/prop-types */
2
+ import React from 'react';
3
+
4
+ import IconSettings from '~/components/icon-settings';
5
+ import VerticalNavigation from '~/components/vertical-navigation';
6
+ import Icon from '~/components/icon';
7
+
8
+ const sampleReportWitchIconsCategories = [
9
+ {
10
+ id: 'reports',
11
+ label: 'Reports',
12
+ items: [
13
+ { id: 'recent_reports', label: 'Recent' },
14
+ { id: 'my_reports', label: 'Created by Me' },
15
+ { id: 'private_reports', label: 'Private Reports' },
16
+ { id: 'public_reports', label: 'Public Reports' },
17
+ { id: 'all_reports', label: 'All Reports' },
18
+ ],
19
+ },
20
+ {
21
+ id: 'folders',
22
+ label: 'Folders',
23
+ items: [
24
+ {
25
+ id: 'my_folders',
26
+ label: 'Created by Me',
27
+ icon: <Icon category="utility" name="open_folder" size="x-small" />,
28
+ },
29
+ {
30
+ id: 'shared_folders',
31
+ label: 'Shared with Me',
32
+ icon: <Icon category="utility" name="open_folder" size="x-small" />,
33
+ },
34
+ { id: 'all_folders', label: 'All Folders' },
35
+ ],
36
+ },
37
+ ];
38
+
39
+ class Example extends React.Component {
40
+ static displayName = 'NavigationExample';
41
+
42
+ state = {
43
+ selectedId: 'recent_reports',
44
+ };
45
+
46
+ render() {
47
+ return (
48
+ <IconSettings iconPath="/assets/icons">
49
+ <div style={{ width: '320px' }}>
50
+ <VerticalNavigation
51
+ id="sample-navigation"
52
+ categories={sampleReportWitchIconsCategories}
53
+ selectedId={this.state.selectedId}
54
+ onSelect={(event, data) => {
55
+ this.setState({ selectedId: data.item.id });
56
+ if (this.props.action) {
57
+ const dataAsArray = Object.keys(data).map((key) => data[key]);
58
+ this.props.action('onSelect')(event, data, ...dataAsArray);
59
+ } else if (console) {
60
+ console.log('[onSelect] (event, data)', event, data);
61
+ }
62
+ }}
63
+ />
64
+ </div>
65
+ </IconSettings>
66
+ );
67
+ }
68
+ }
69
+
70
+ export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
@@ -0,0 +1,66 @@
1
+ /* eslint-disable no-console, react/prop-types */
2
+ import React from 'react';
3
+
4
+ import IconSettings from '~/components/icon-settings';
5
+ import VerticalNavigation from '~/components/vertical-navigation';
6
+ import Badge from '~/components/badge';
7
+
8
+ const sampleReportWitchNotificationCategories = [
9
+ {
10
+ id: 'reports',
11
+ label: 'Reports',
12
+ items: [
13
+ { id: 'recent_reports', label: 'Recent' },
14
+ { id: 'my_reports', label: 'Created by Me' },
15
+ { id: 'private_reports', label: 'Private Reports' },
16
+ { id: 'public_reports', label: 'Public Reports' },
17
+ { id: 'all_reports', label: 'All Reports' },
18
+ ],
19
+ },
20
+ {
21
+ id: 'folders',
22
+ label: 'Folders',
23
+ items: [
24
+ {
25
+ id: 'my_folders',
26
+ label: 'Created by Me',
27
+ notificationBadge: <Badge content="3" id="notification-badge" />,
28
+ },
29
+ { id: 'shared_folders', label: 'Shared with Me' },
30
+ { id: 'all_folders', label: 'All Folders' },
31
+ ],
32
+ },
33
+ ];
34
+
35
+ class Example extends React.Component {
36
+ static displayName = 'NavigationExample';
37
+
38
+ state = {
39
+ selectedId: 'recent_reports',
40
+ };
41
+
42
+ render() {
43
+ return (
44
+ <IconSettings iconPath="/assets/icons">
45
+ <div style={{ width: '320px' }}>
46
+ <VerticalNavigation
47
+ id="sample-navigation"
48
+ categories={sampleReportWitchNotificationCategories}
49
+ selectedId={this.state.selectedId}
50
+ onSelect={(event, data) => {
51
+ this.setState({ selectedId: data.item.id });
52
+ if (this.props.action) {
53
+ const dataAsArray = Object.keys(data).map((key) => data[key]);
54
+ this.props.action('onSelect')(event, data, ...dataAsArray);
55
+ } else if (console) {
56
+ console.log('[onSelect] (event, data)', event, data);
57
+ }
58
+ }}
59
+ />
60
+ </div>
61
+ </IconSettings>
62
+ );
63
+ }
64
+ }
65
+
66
+ export default Example; // export is replaced with `ReactDOM.render(<Example />, mountNode);` at runtime
@@ -8,6 +8,14 @@
8
8
  {
9
9
  "heading": "Default",
10
10
  "path": "/__examples__/default.jsx"
11
+ },
12
+ {
13
+ "heading": "Items with Icons",
14
+ "path": "/__examples__/icons.jsx"
15
+ },
16
+ {
17
+ "heading": "Items with Notifications",
18
+ "path": "/__examples__/notifications.jsx"
11
19
  }
12
20
  ],
13
21
  "url-slug": "vertical-navigation"
@@ -8,6 +8,8 @@ declare module '@salesforce/design-system-react/components/vertical-navigation/p
8
8
  id: string /*.isRequired*/;
9
9
  label: string /*.isRequired*/;
10
10
  url?: string;
11
+ icon?: any;
12
+ notificationBadge?: any;
11
13
  }>;
12
14
  /**
13
15
  * Whether item is selected or not.
@@ -43,7 +43,29 @@ const Item = (props) => (
43
43
  handleClick(event, props);
44
44
  }}
45
45
  >
46
- {props.item.label}
46
+ {props.item.icon ? (
47
+ <React.Fragment>
48
+ {React.cloneElement(props.item.icon, {
49
+ className: classNames(
50
+ props.item.icon.props.className,
51
+ `slds-m-right_${props.item.icon.props.size || 'medium'}`
52
+ ),
53
+ })}
54
+ {props.item.label}
55
+ </React.Fragment>
56
+ ) : (
57
+ props.item.label
58
+ )}
59
+ {props.item.notificationBadge ? (
60
+ React.cloneElement(props.item.notificationBadge, {
61
+ className: classNames(
62
+ props.item.notificationBadge.props.className,
63
+ 'slds-col_bump-left'
64
+ ),
65
+ })
66
+ ) : (
67
+ <React.Fragment />
68
+ )}
47
69
  </a>
48
70
  </li>
49
71
  );
@@ -17,7 +17,7 @@ Please complete for every pull request
17
17
 
18
18
  ### REVIEWER checklist (do not remove)
19
19
 
20
- * [ ] TravisCI tests pass. This includes linting, Mocha, Jest, Storyshots, and `components/component-docs.json` tests.
20
+ * [ ] CircleCI tests pass. This includes linting, Mocha, Jest, Storyshots, and `components/component-docs.json` tests.
21
21
  * [ ] Tests have been added for new props to prevent regressions in the future. See [readme](https://github.com/salesforce/design-system-react/blob/master/tests/README.md).
22
22
  * [ ] Review the appropriate Storybook stories. Open [http://localhost:9001/](http://localhost:9001/).
23
23
  * [ ] The Accessibility panel of each Storybook story has 0 violations (aXe). Open [http://localhost:9001/](http://localhost:9001/).
@@ -0,0 +1,70 @@
1
+ .slds-table-column-resizer{
2
+ border-left: 1px solid #0176d3;
3
+ }
4
+
5
+ .grip-handle:hover, .grip-handle-active{
6
+ border-left: 1px solid #0176d3;
7
+ }
8
+
9
+ .grip-handle:hover:before, .grip-handle-active:before{
10
+ background-color: #0176d3;
11
+ width: .25rem;
12
+ height: 100%;
13
+ content: " ";
14
+ position: absolute;
15
+ height: 33px;
16
+ right: -1.4px;
17
+ }
18
+
19
+ .grip-handle:active:before{
20
+ background-color: #0176d3;
21
+ width: .25rem;
22
+ height: 100%;
23
+ content: " ";
24
+ position: absolute;
25
+ height: 33px;
26
+ right: -1.4px;
27
+ }
28
+
29
+ .grip-handle .grip-resizable {
30
+ background-color: #0176d3;
31
+ width: 1px;
32
+ height: 100vh;
33
+ opacity: 0;
34
+ }
35
+
36
+ .slds-table_fixed-layout .grip-handle {
37
+ position: absolute;
38
+ z-index: 9;
39
+ background-color: #0176d3;
40
+ width: 1px;
41
+ height: 100vh;
42
+ opacity: 0;
43
+ top: -33px;
44
+ z-index: 9;
45
+ }
46
+
47
+ .slds-table_fixed-layout .grip-container {
48
+ position: absolute;
49
+ }
50
+
51
+ .slds-table_header-fixed_container .grip-handle {
52
+ position: absolute;
53
+ top: -33px;
54
+ z-index: 9;
55
+ }
56
+
57
+ .slds-table_header-fixed_container .grip-container {
58
+ position: absolute;
59
+ }
60
+
61
+ .slds-table th:focus .slds-cell-fixed, .slds-table th.slds-has-focus .slds-cell-fixed, .slds-table [role="gridcell"]:focus , .slds-table [role="gridcell"].slds-has-focus{
62
+ box-shadow: #0070d2 0 0 0 1px inset;
63
+ }
64
+
65
+ th > div > .slds-truncate {
66
+ padding-left: 0.5rem;
67
+ padding-right: 0.5rem;
68
+ padding: 0.25rem 0.5rem;
69
+ height: 2rem;
70
+ }
@@ -0,0 +1,20 @@
1
+ declare module '@salesforce/design-system-react/components/builder-header/utilities' {
2
+ import React from 'react';
3
+ type Props = {
4
+ /**
5
+ * Provide children of the types `<BuilderHeaderNavLink />` or `<BuilderHeaderNavDropdown />` to define the structure of the utilities section.
6
+ * ```
7
+ * <BuilderHeader>
8
+ * <BuilderHeaderUtilities>
9
+ * <BuilderHeaderNavLink />
10
+ * <BuilderHeaderNavDropdown />
11
+ * </BuilderHeaderUtilities>
12
+ * </BuilderHeader>
13
+ * ```
14
+ */
15
+ children?: React.ReactNode,
16
+ };
17
+
18
+ function Component(props: Props): JSX.Element;
19
+ export default Component;
20
+ }