superdesk-ui-framework 3.1.5 → 3.1.7
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/app/styles/_expand-button.scss +31 -0
- package/app/styles/_helpers.scss +320 -151
- package/app/styles/app.scss +1 -0
- package/app/styles/components/_subnav.scss +1 -0
- package/app/styles/design-tokens/_design-tokens-general.scss +19 -7
- package/app/styles/design-tokens/_new-colors.scss +6 -1
- package/app/styles/grids/_grid-layout.scss +1 -0
- package/app/styles/interface-elements/_side-panel.scss +4 -0
- package/app-typescript/components/IconPicker.tsx +1 -1
- package/{examples/pages/react → dist/components}/Index.tsx +81 -63
- package/dist/components/utilities/SpacingUtilities.tsx +774 -0
- package/dist/components/utilities/TextUtilities.tsx +432 -0
- package/dist/components.html +6 -27
- package/dist/{components → components_deprecated}/text.html +7 -7
- package/dist/components_deprecated.html +38 -0
- package/dist/design/buttons.html +1 -11
- package/dist/design/checkbox-and-radio.html +3 -3
- package/dist/design/layout-principles.html +0 -1
- package/dist/design/switch.html +0 -10
- package/dist/design-patterns/Index.tsx +86 -0
- package/dist/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
- package/{examples/pages/react.html → dist/design-patterns.html} +3 -4
- package/dist/design.html +4 -4
- package/dist/examples.bundle.css +106 -20
- package/dist/examples.bundle.js +3233 -1443
- package/dist/main.html +17 -15
- package/dist/playgrounds/boxed-list.html +7 -7
- package/dist/playgrounds/master-desk.html +4 -4
- package/dist/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
- package/dist/playgrounds/planning-snippets/edit-planning.html +1 -1
- package/dist/playgrounds/planning.html +1 -1
- package/dist/playgrounds/publisher-content-analytics.html +25 -25
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +16 -1
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +46 -4
- package/dist/playgrounds/video-editor.html +1 -1
- package/dist/playgrounds.html +3 -6
- package/dist/superdesk-ui.bundle.css +345 -120
- package/dist/superdesk-ui.bundle.js +105 -101
- package/examples/css/docs-page.css +106 -20
- package/examples/index.js +89 -89
- package/examples/js/doc.js +16 -2
- package/examples/js/react.js +122 -19
- package/{dist/react → examples/pages/components}/Index.tsx +81 -63
- package/examples/pages/components/utilities/SpacingUtilities.tsx +774 -0
- package/examples/pages/components/utilities/TextUtilities.tsx +432 -0
- package/examples/pages/components.html +6 -27
- package/examples/pages/{components → components_deprecated}/text.html +7 -7
- package/examples/pages/components_deprecated.html +38 -0
- package/examples/pages/design/buttons.html +1 -11
- package/examples/pages/design/checkbox-and-radio.html +3 -3
- package/examples/pages/design/layout-principles.html +0 -1
- package/examples/pages/design/switch.html +0 -10
- package/examples/pages/design-patterns/Index.tsx +86 -0
- package/examples/pages/design-patterns/ThreePaneLayoutPattern.tsx +362 -0
- package/{dist/react.html → examples/pages/design-patterns.html} +3 -4
- package/examples/pages/design.html +4 -4
- package/examples/pages/main.html +17 -15
- package/examples/pages/playgrounds/boxed-list.html +7 -7
- package/examples/pages/playgrounds/master-desk.html +4 -4
- package/examples/pages/playgrounds/photo-snippets/edit-photo-metadata.html +1 -1
- package/examples/pages/playgrounds/planning-snippets/edit-planning.html +1 -1
- package/examples/pages/playgrounds/planning.html +1 -1
- package/examples/pages/playgrounds/publisher-content-analytics.html +25 -25
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +16 -1
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +46 -4
- package/examples/pages/playgrounds/video-editor.html +1 -1
- package/examples/pages/playgrounds.html +3 -6
- package/package.json +1 -1
- package/react/components/IconPicker.js +1 -1
- /package/dist/{react → components}/Alerts.tsx +0 -0
- /package/dist/{react → components}/Autocomplete.tsx +0 -0
- /package/dist/{react → components}/Avatar.tsx +0 -0
- /package/dist/{react → components}/Badges.tsx +0 -0
- /package/dist/{react → components}/BigIconFont.tsx +0 -0
- /package/dist/{react → components}/BoxedList.tsx +0 -0
- /package/dist/{react → components}/ButtonGroups.tsx +0 -0
- /package/dist/{react → components}/Buttons.tsx +0 -0
- /package/dist/{react → components}/Carousel.tsx +0 -0
- /package/dist/{react → components}/Checkboxs.tsx +0 -0
- /package/dist/{react → components}/Container.tsx +0 -0
- /package/dist/{react → components}/ContentDivider.tsx +0 -0
- /package/dist/{react → components}/ContentList.tsx +0 -0
- /package/dist/{react → components}/CreateButton.tsx +0 -0
- /package/dist/{react → components}/DatePicker.tsx +0 -0
- /package/dist/{react → components}/DragHandleDocs.tsx +0 -0
- /package/dist/{react → components}/DropZone.tsx +0 -0
- /package/dist/{react → components}/Dropdowns.tsx +0 -0
- /package/dist/{react → components}/DurationInput.tsx +0 -0
- /package/dist/{react → components}/EmptyStates.tsx +0 -0
- /package/dist/{react → components}/GridItem.tsx +0 -0
- /package/dist/{react → components}/GridList.tsx +0 -0
- /package/dist/{react → components}/Heading.tsx +0 -0
- /package/dist/{react → components}/IconButtons.tsx +0 -0
- /package/dist/{react → components}/IconFont.tsx +0 -0
- /package/dist/{react → components}/IconLabels.tsx +0 -0
- /package/dist/{react → components}/IconPicker.tsx +0 -0
- /package/dist/{react → components}/IllustrationButton.tsx +0 -0
- /package/dist/{react → components}/Inputs.tsx +0 -0
- /package/dist/{react → components}/Labels.tsx +0 -0
- /package/dist/{react → components}/LeftNavigations.tsx +0 -0
- /package/dist/{react → components}/ListItems.tsx +0 -0
- /package/dist/{react → components}/Menu.tsx +0 -0
- /package/dist/{react → components}/Modal.tsx +0 -0
- /package/dist/{react → components}/MultiSelect.tsx +0 -0
- /package/dist/{react → components}/NavButtons.tsx +0 -0
- /package/dist/{react → components}/Panel.tsx +0 -0
- /package/dist/{react → components}/Popover.tsx +0 -0
- /package/dist/{react → components}/QuickNavigationBar.tsx +0 -0
- /package/dist/{react → components}/RadioGroup.tsx +0 -0
- /package/dist/{react → components}/ResizablePanels.tsx +0 -0
- /package/dist/{react → components}/SelectGrid.tsx +0 -0
- /package/dist/{react → components}/SelectWithTemplate.tsx +0 -0
- /package/dist/{react → components}/Selects.tsx +0 -0
- /package/dist/{react → components}/SimpleList.tsx +0 -0
- /package/dist/{react → components}/SubNav.tsx +0 -0
- /package/dist/{react → components}/Switch.tsx +0 -0
- /package/dist/{react → components}/TableList.tsx +0 -0
- /package/dist/{react → components}/Tabs.tsx +0 -0
- /package/dist/{react → components}/TagInputDocs.tsx +0 -0
- /package/dist/{react → components}/Tags.tsx +0 -0
- /package/dist/{react → components}/Text.tsx +0 -0
- /package/dist/{react → components}/TimePicker.tsx +0 -0
- /package/dist/{react → components}/Toasts.tsx +0 -0
- /package/dist/{react → components}/Togglebox.tsx +0 -0
- /package/dist/{react → components}/Tooltips.tsx +0 -0
- /package/dist/{react → components}/TreeMenu.tsx +0 -0
- /package/dist/{react → components}/TreeSelect.tsx +0 -0
- /package/dist/{react → components}/WithPaginationDocs.tsx +0 -0
- /package/dist/{react → components}/WithSizeObserver.tsx +0 -0
- /package/dist/{react → components}/tree-select/TreeSelect.tsx +0 -0
- /package/dist/{react → components}/tree-select/example-1.tsx +0 -0
- /package/dist/{react → components}/tree-select/example-2.tsx +0 -0
- /package/dist/{components → components_deprecated}/alerts.html +0 -0
- /package/dist/{components → components_deprecated}/badge.html +0 -0
- /package/dist/{components → components_deprecated}/basic-grid.html +0 -0
- /package/dist/{components → components_deprecated}/big-icons.html +0 -0
- /package/dist/{components → components_deprecated}/buttons.html +0 -0
- /package/dist/{components → components_deprecated}/carousel.html +0 -0
- /package/dist/{components → components_deprecated}/checkbox.html +0 -0
- /package/dist/{components → components_deprecated}/colors.html +0 -0
- /package/dist/{components → components_deprecated}/dropdown.html +0 -0
- /package/dist/{components → components_deprecated}/form-layout.html +0 -0
- /package/dist/{components → components_deprecated}/icon-labels.html +0 -0
- /package/dist/{components → components_deprecated}/icons.html +0 -0
- /package/dist/{components → components_deprecated}/input.html +0 -0
- /package/dist/{components → components_deprecated}/labels.html +0 -0
- /package/dist/{components → components_deprecated}/layout-grid.html +0 -0
- /package/dist/{components → components_deprecated}/left-nav.html +0 -0
- /package/dist/{components → components_deprecated}/list-item.html +0 -0
- /package/dist/{components → components_deprecated}/loader.html +0 -0
- /package/dist/{components → components_deprecated}/modal-template.html +0 -0
- /package/dist/{components → components_deprecated}/modals.html +0 -0
- /package/dist/{components → components_deprecated}/other-elements.html +0 -0
- /package/dist/{components → components_deprecated}/panel-info.html +0 -0
- /package/dist/{components → components_deprecated}/radio.html +0 -0
- /package/dist/{components → components_deprecated}/select.html +0 -0
- /package/dist/{components → components_deprecated}/shadows.html +0 -0
- /package/dist/{components → components_deprecated}/sidebar-menu.html +0 -0
- /package/dist/{components → components_deprecated}/simple-list.html +0 -0
- /package/dist/{components → components_deprecated}/slider.html +0 -0
- /package/dist/{components → components_deprecated}/spacing.html +0 -0
- /package/dist/{components → components_deprecated}/switch.html +0 -0
- /package/dist/{components → components_deprecated}/tables.html +0 -0
- /package/dist/{components → components_deprecated}/tabs.html +0 -0
- /package/dist/{components → components_deprecated}/tag-input.html +0 -0
- /package/dist/{components → components_deprecated}/tag-labels.html +0 -0
- /package/dist/{components → components_deprecated}/toggle.html +0 -0
- /package/dist/{components → components_deprecated}/tooltips.html +0 -0
- /package/dist/{components → components_deprecated}/vertical-tabs.html +0 -0
- /package/dist/{components → components_deprecated}/wizard.html +0 -0
- /package/examples/pages/{react → components}/Alerts.tsx +0 -0
- /package/examples/pages/{react → components}/Autocomplete.tsx +0 -0
- /package/examples/pages/{react → components}/Avatar.tsx +0 -0
- /package/examples/pages/{react → components}/Badges.tsx +0 -0
- /package/examples/pages/{react → components}/BigIconFont.tsx +0 -0
- /package/examples/pages/{react → components}/BoxedList.tsx +0 -0
- /package/examples/pages/{react → components}/ButtonGroups.tsx +0 -0
- /package/examples/pages/{react → components}/Buttons.tsx +0 -0
- /package/examples/pages/{react → components}/Carousel.tsx +0 -0
- /package/examples/pages/{react → components}/Checkboxs.tsx +0 -0
- /package/examples/pages/{react → components}/Container.tsx +0 -0
- /package/examples/pages/{react → components}/ContentDivider.tsx +0 -0
- /package/examples/pages/{react → components}/ContentList.tsx +0 -0
- /package/examples/pages/{react → components}/CreateButton.tsx +0 -0
- /package/examples/pages/{react → components}/DatePicker.tsx +0 -0
- /package/examples/pages/{react → components}/DragHandleDocs.tsx +0 -0
- /package/examples/pages/{react → components}/DropZone.tsx +0 -0
- /package/examples/pages/{react → components}/Dropdowns.tsx +0 -0
- /package/examples/pages/{react → components}/DurationInput.tsx +0 -0
- /package/examples/pages/{react → components}/EmptyStates.tsx +0 -0
- /package/examples/pages/{react → components}/GridItem.tsx +0 -0
- /package/examples/pages/{react → components}/GridList.tsx +0 -0
- /package/examples/pages/{react → components}/Heading.tsx +0 -0
- /package/examples/pages/{react → components}/IconButtons.tsx +0 -0
- /package/examples/pages/{react → components}/IconFont.tsx +0 -0
- /package/examples/pages/{react → components}/IconLabels.tsx +0 -0
- /package/examples/pages/{react → components}/IconPicker.tsx +0 -0
- /package/examples/pages/{react → components}/IllustrationButton.tsx +0 -0
- /package/examples/pages/{react → components}/Inputs.tsx +0 -0
- /package/examples/pages/{react → components}/Labels.tsx +0 -0
- /package/examples/pages/{react → components}/LeftNavigations.tsx +0 -0
- /package/examples/pages/{react → components}/ListItems.tsx +0 -0
- /package/examples/pages/{react → components}/Menu.tsx +0 -0
- /package/examples/pages/{react → components}/Modal.tsx +0 -0
- /package/examples/pages/{react → components}/MultiSelect.tsx +0 -0
- /package/examples/pages/{react → components}/NavButtons.tsx +0 -0
- /package/examples/pages/{react → components}/Panel.tsx +0 -0
- /package/examples/pages/{react → components}/Popover.tsx +0 -0
- /package/examples/pages/{react → components}/QuickNavigationBar.tsx +0 -0
- /package/examples/pages/{react → components}/RadioGroup.tsx +0 -0
- /package/examples/pages/{react → components}/ResizablePanels.tsx +0 -0
- /package/examples/pages/{react → components}/SelectGrid.tsx +0 -0
- /package/examples/pages/{react → components}/SelectWithTemplate.tsx +0 -0
- /package/examples/pages/{react → components}/Selects.tsx +0 -0
- /package/examples/pages/{react → components}/SimpleList.tsx +0 -0
- /package/examples/pages/{react → components}/SubNav.tsx +0 -0
- /package/examples/pages/{react → components}/Switch.tsx +0 -0
- /package/examples/pages/{react → components}/TableList.tsx +0 -0
- /package/examples/pages/{react → components}/Tabs.tsx +0 -0
- /package/examples/pages/{react → components}/TagInputDocs.tsx +0 -0
- /package/examples/pages/{react → components}/Tags.tsx +0 -0
- /package/examples/pages/{react → components}/Text.tsx +0 -0
- /package/examples/pages/{react → components}/TimePicker.tsx +0 -0
- /package/examples/pages/{react → components}/Toasts.tsx +0 -0
- /package/examples/pages/{react → components}/Togglebox.tsx +0 -0
- /package/examples/pages/{react → components}/Tooltips.tsx +0 -0
- /package/examples/pages/{react → components}/TreeMenu.tsx +0 -0
- /package/examples/pages/{react → components}/TreeSelect.tsx +0 -0
- /package/examples/pages/{react → components}/WithPaginationDocs.tsx +0 -0
- /package/examples/pages/{react → components}/WithSizeObserver.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/TreeSelect.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/example-1.tsx +0 -0
- /package/examples/pages/{react → components}/tree-select/example-2.tsx +0 -0
- /package/examples/pages/{components → components_deprecated}/alerts.html +0 -0
- /package/examples/pages/{components → components_deprecated}/badge.html +0 -0
- /package/examples/pages/{components → components_deprecated}/basic-grid.html +0 -0
- /package/examples/pages/{components → components_deprecated}/big-icons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/buttons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/carousel.html +0 -0
- /package/examples/pages/{components → components_deprecated}/checkbox.html +0 -0
- /package/examples/pages/{components → components_deprecated}/colors.html +0 -0
- /package/examples/pages/{components → components_deprecated}/dropdown.html +0 -0
- /package/examples/pages/{components → components_deprecated}/form-layout.html +0 -0
- /package/examples/pages/{components → components_deprecated}/icon-labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/icons.html +0 -0
- /package/examples/pages/{components → components_deprecated}/input.html +0 -0
- /package/examples/pages/{components → components_deprecated}/labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/layout-grid.html +0 -0
- /package/examples/pages/{components → components_deprecated}/left-nav.html +0 -0
- /package/examples/pages/{components → components_deprecated}/list-item.html +0 -0
- /package/examples/pages/{components → components_deprecated}/loader.html +0 -0
- /package/examples/pages/{components → components_deprecated}/modal-template.html +0 -0
- /package/examples/pages/{components → components_deprecated}/modals.html +0 -0
- /package/examples/pages/{components → components_deprecated}/other-elements.html +0 -0
- /package/examples/pages/{components → components_deprecated}/panel-info.html +0 -0
- /package/examples/pages/{components → components_deprecated}/radio.html +0 -0
- /package/examples/pages/{components → components_deprecated}/select.html +0 -0
- /package/examples/pages/{components → components_deprecated}/shadows.html +0 -0
- /package/examples/pages/{components → components_deprecated}/sidebar-menu.html +0 -0
- /package/examples/pages/{components → components_deprecated}/simple-list.html +0 -0
- /package/examples/pages/{components → components_deprecated}/slider.html +0 -0
- /package/examples/pages/{components → components_deprecated}/spacing.html +0 -0
- /package/examples/pages/{components → components_deprecated}/switch.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tables.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tabs.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tag-input.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tag-labels.html +0 -0
- /package/examples/pages/{components → components_deprecated}/toggle.html +0 -0
- /package/examples/pages/{components → components_deprecated}/tooltips.html +0 -0
- /package/examples/pages/{components → components_deprecated}/vertical-tabs.html +0 -0
- /package/examples/pages/{components → components_deprecated}/wizard.html +0 -0
@@ -19,6 +19,7 @@
|
|
19
19
|
--docs-page-border__window-bar--top: hsla(0, 0%, 100%, 0.9);
|
20
20
|
--docs-page-border__window-bar--bottom: hsla(0, 0%, 88%, 1);
|
21
21
|
--docs-page-border__table: hsla(0, 0%, 0%, 0.16);
|
22
|
+
--docs-page-color-bg__table-divider-row: hsla(0, 0%, 100%, 0.8);
|
22
23
|
|
23
24
|
--docs-page-bg__table-tr-even: hsla(214, 13%, 50%, 0.08);
|
24
25
|
}
|
@@ -318,6 +319,15 @@ p.docs-page__paragraph b, div.docs-page__paragraph b {
|
|
318
319
|
background-color: var(--docs-page-color-bg__aside);
|
319
320
|
overflow-y: auto;
|
320
321
|
}
|
322
|
+
.docs-page__sidebar-searchbar-container {
|
323
|
+
position: sticky;
|
324
|
+
top: -20px;
|
325
|
+
margin-top: -20px;
|
326
|
+
padding-block: 16px 8px;
|
327
|
+
background-color: var(--docs-page-color-bg__aside);
|
328
|
+
z-index: 2;
|
329
|
+
}
|
330
|
+
|
321
331
|
.docs-page__sidebar.scroll {
|
322
332
|
top: 0;
|
323
333
|
margin-top: 0;
|
@@ -375,12 +385,37 @@ p.docs-page__paragraph b, div.docs-page__paragraph b {
|
|
375
385
|
color: var(--color-text);
|
376
386
|
font-size: 12px;
|
377
387
|
font-weight: 500;
|
378
|
-
letter-spacing: 0.
|
379
|
-
|
388
|
+
letter-spacing: 0.04em;
|
389
|
+
line-height: 1.2;
|
380
390
|
margin-block-start: 20px;
|
381
391
|
margin-block-end: 6px;
|
382
|
-
padding-inline-start:
|
392
|
+
padding-inline-start: 16px;
|
393
|
+
display: flex;
|
394
|
+
align-items: center;
|
395
|
+
gap: 4px;
|
396
|
+
transition: all 0.2s ease;
|
397
|
+
min-height: 16px;
|
398
|
+
}
|
399
|
+
.docs-page__nav-title:hover {
|
400
|
+
cursor: pointer;
|
401
|
+
color: var(--sd-colour-interactive);
|
402
|
+
}
|
403
|
+
|
404
|
+
.docs-page__nav-title-caret {
|
405
|
+
height: 16px;
|
406
|
+
width: 16px;
|
407
|
+
display: flex;
|
408
|
+
align-items: center;
|
409
|
+
justify-content: center;
|
410
|
+
opacity: 0.6;
|
411
|
+
margin-block-end: 2px;
|
412
|
+
transition: all 0.2s ease;
|
413
|
+
}
|
414
|
+
.docs-page__nav-title--open .docs-page__nav-title-caret {
|
415
|
+
transform: rotate(90deg)
|
416
|
+
|
383
417
|
}
|
418
|
+
|
384
419
|
.docs-page__nav > li:first-child .docs-page__nav-title {
|
385
420
|
margin-block-start: 0;
|
386
421
|
}
|
@@ -478,43 +513,41 @@ p.docs-page__paragraph b, div.docs-page__paragraph b {
|
|
478
513
|
}
|
479
514
|
.docs-page__small-text {
|
480
515
|
font-size: 1.3rem;
|
481
|
-
font-weight:
|
516
|
+
font-weight: 400;
|
482
517
|
color: var(--color-text-light);
|
483
518
|
opacity: 0.7;
|
484
519
|
}
|
485
520
|
|
486
521
|
.docs-page__nav-item {
|
487
|
-
position: relative;
|
488
|
-
font-size: 16px;
|
489
|
-
line-height: 24px;
|
490
|
-
font-weight: 300;
|
491
|
-
color: var(--color-text);
|
492
|
-
border-inline-start: 4px solid transparent;
|
522
|
+
position: relative;
|
493
523
|
}
|
494
524
|
.docs-page__nav-item a {
|
495
525
|
font-size: 14px;
|
496
526
|
line-height: 32px;
|
497
527
|
display: block;
|
498
|
-
|
528
|
+
margin-inline-start: 22px;
|
529
|
+
padding-inline-start: 12px;
|
499
530
|
color: var(--color-text-light);
|
500
531
|
background-color: rgba(255, 255, 255, 0);
|
501
532
|
cursor: pointer;
|
502
533
|
text-decoration: none;
|
503
|
-
transition: all ease
|
534
|
+
transition: all ease 0.2s;
|
535
|
+
border-inline-start: 1px solid var(--color-border-line--medium);
|
504
536
|
}
|
505
537
|
.docs-page__nav-item a:hover {
|
506
538
|
color: var(--color-text);
|
507
|
-
|
539
|
+
border-color: var(--color-border-line--strong);
|
540
|
+
/* background-color: var(--docs-page-color-bg-00); */
|
508
541
|
}
|
509
542
|
.docs-page__nav-item a:active {
|
510
|
-
color: var(--color-text
|
511
|
-
background-color: var(--sd-colour-interactive--alpha-20);
|
543
|
+
color: var(--color-text);
|
512
544
|
}
|
513
545
|
|
514
|
-
.docs-page__nav-item.docs-page__nav-item--active {
|
546
|
+
.docs-page__nav-item a.docs-page__nav-item--active {
|
515
547
|
border-color: var(--sd-colour-interactive);
|
516
|
-
background-color: var(--docs-page-color-bg-00);
|
517
548
|
font-weight: 400;
|
549
|
+
color: var(--sd-colour-interactive);
|
550
|
+
box-shadow: -1px 0 0 var(--sd-colour-interactive), inset 1px 0 0 var(--sd-colour-interactive);
|
518
551
|
}
|
519
552
|
|
520
553
|
.docs-page__nav-item.docs-page__nav-item--active a {
|
@@ -964,17 +997,70 @@ doc-gif-img:hover img {
|
|
964
997
|
border-color: var(--docs-page-border__table) !important;
|
965
998
|
}
|
966
999
|
|
967
|
-
.docs-page__container table tr td:nth-child(3) {
|
1000
|
+
.docs-page__container table:not(.utilities-table) tr td:nth-child(3) {
|
968
1001
|
white-space: nowrap;
|
969
1002
|
}
|
970
1003
|
|
971
|
-
.docs-page__container table tr:nth-child(even),
|
972
|
-
.docs-page__container table thead tr {
|
1004
|
+
.docs-page__container table:not(.utilities-table) tr:nth-child(even),
|
1005
|
+
.docs-page__container table:not(.utilities-table) thead tr {
|
973
1006
|
background-color: var(--docs-page-bg__table-tr-even);
|
974
1007
|
}
|
975
1008
|
|
976
1009
|
|
1010
|
+
.docs-page__container table.utilities-table {
|
1011
|
+
width: 100%;
|
1012
|
+
border-block-start: none !important;
|
1013
|
+
margin: 0;
|
1014
|
+
font-size: 14px;
|
1015
|
+
}
|
1016
|
+
.docs-page__container table.utilities-table thead th {
|
1017
|
+
font-size: 14px;
|
1018
|
+
position: sticky;
|
1019
|
+
top: 0;
|
1020
|
+
background-color: var(--docs-page-color-bg-00);
|
1021
|
+
border-bottom: ;
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
.docs-page__container table.utilities-table tbody td {
|
1025
|
+
width: 100%;
|
1026
|
+
font-family: monospace;
|
1027
|
+
line-height: 1.4;
|
1028
|
+
color: var(--color-text-light);
|
1029
|
+
}
|
1030
|
+
.docs-page__container table.utilities-table tbody td:first-child {
|
1031
|
+
min-width: 200px;
|
1032
|
+
width: auto;
|
1033
|
+
color: var(--color-text);
|
1034
|
+
}
|
1035
|
+
.docs-page__container table.utilities-table tbody td:nth-child(3){
|
1036
|
+
min-width: 200px;
|
1037
|
+
width: auto;
|
1038
|
+
text-align: end;
|
1039
|
+
padding-inline-end: var(--space--1-5);
|
1040
|
+
font-weight: 700;
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
.docs-page__container table.utilities-table tbody tr.utilities-table__divider-row td {
|
1044
|
+
color: var(--color-text);
|
1045
|
+
font-family: 'Roboto', sans-serif;
|
1046
|
+
font-size: 13px;
|
1047
|
+
letter-spacing: 0.025em;
|
1048
|
+
font-weight: 500;
|
1049
|
+
padding-block: 8px !important;
|
1050
|
+
background-color: var(--docs-page-color-bg__table-divider-row);
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
.utilities-table__container {
|
1054
|
+
position: relative;
|
1055
|
+
max-height: 438px;
|
1056
|
+
overflow-y: auto;
|
1057
|
+
border-block-start:1px solid var(--sd-colour-line--medium);
|
1058
|
+
margin-block-end: var(--space--4);
|
1059
|
+
}
|
977
1060
|
|
1061
|
+
.docs-page__container .doc-text--highlight {
|
1062
|
+
color: var(--docs-page-color-primary) !important;
|
1063
|
+
}
|
978
1064
|
|
979
1065
|
/* -------------- END COLOR SWATCHES -------------- */
|
980
1066
|
/* -------------- PrismJS overrides -------------- */
|
package/examples/index.js
CHANGED
@@ -250,12 +250,95 @@ export default angular.module('ui-docs', [
|
|
250
250
|
},
|
251
251
|
},
|
252
252
|
}
|
253
|
-
|
253
|
+
|
254
254
|
}))
|
255
255
|
|
256
256
|
.factory('playgrounds', () => ({
|
257
|
+
// React playgrounds
|
258
|
+
'react': {
|
259
|
+
'first-playground': {
|
260
|
+
name: 'First playground',
|
261
|
+
component: 'FirstPlayground'
|
262
|
+
},
|
263
|
+
'sams-playground': {
|
264
|
+
name: 'SAMS',
|
265
|
+
component: 'SamsPlayground'
|
266
|
+
},
|
267
|
+
'test-ground': {
|
268
|
+
name: 'Test Ground',
|
269
|
+
component: 'TestGround'
|
270
|
+
},
|
271
|
+
'ui-playground': {
|
272
|
+
name: 'UI',
|
273
|
+
component: 'UiPlayground'
|
274
|
+
},
|
275
|
+
'pagelayout-test': {
|
276
|
+
name: 'PageLayout Test',
|
277
|
+
component: 'PageLayoutTest'
|
278
|
+
},
|
279
|
+
'editor-test': {
|
280
|
+
name: 'Editor Layout Test',
|
281
|
+
component: 'EditorTest'
|
282
|
+
},
|
283
|
+
'personal-profile': {
|
284
|
+
name: 'Personal Profile',
|
285
|
+
component: 'PersonalProfile'
|
286
|
+
},
|
287
|
+
'rundown-editor': {
|
288
|
+
name: 'Rundown Editor',
|
289
|
+
component: 'RundownEditor'
|
290
|
+
},
|
291
|
+
'rundowns': {
|
292
|
+
name: 'Rundowns',
|
293
|
+
component: 'Rundowns'
|
294
|
+
},
|
295
|
+
'core-layout': {
|
296
|
+
name: 'Core Layout',
|
297
|
+
component: 'CoreLayout'
|
298
|
+
},
|
299
|
+
'multiedit': {
|
300
|
+
name: 'Multiedit',
|
301
|
+
component: 'Multiedit'
|
302
|
+
}
|
303
|
+
},
|
304
|
+
|
305
|
+
// Publisher playgrounds
|
306
|
+
publisher: {
|
307
|
+
'publisher-dashboard': {
|
308
|
+
name: 'Dashboard',
|
309
|
+
page: 'publisher-dashboard.html'
|
310
|
+
},
|
311
|
+
'publisher-content-lists': {
|
312
|
+
name: 'Content Lists',
|
313
|
+
page: 'publisher-content-lists.html'
|
314
|
+
},
|
315
|
+
'publisher-content-list-manual': {
|
316
|
+
name: 'Content List - Manual',
|
317
|
+
page: 'publisher-content-list-manual.html'
|
318
|
+
},
|
319
|
+
'publisher-content-list-automatic': {
|
320
|
+
name: 'Content List - Automatic',
|
321
|
+
page: 'publisher-content-list-automatic.html'
|
322
|
+
},
|
323
|
+
'publisher-output-control': {
|
324
|
+
name: 'Output Control',
|
325
|
+
page: 'publisher-output-control.html'
|
326
|
+
},
|
327
|
+
'publisher-content-analytics': {
|
328
|
+
name: 'Content Analytics',
|
329
|
+
page: 'publisher-content-analytics.html'
|
330
|
+
},
|
331
|
+
'publisher-website-settings': {
|
332
|
+
name: 'Website Settings',
|
333
|
+
page: 'publisher-website-settings.html'
|
334
|
+
},
|
335
|
+
'publisher-website-settings-general': {
|
336
|
+
name: 'Website Settings - General',
|
337
|
+
page: 'publisher-website-settings-general.html'
|
338
|
+
},
|
339
|
+
},
|
257
340
|
// Superdesk playgrounds
|
258
|
-
|
341
|
+
'archived': {
|
259
342
|
'planning': {
|
260
343
|
name: 'Planning',
|
261
344
|
page: 'buttons.html'
|
@@ -341,89 +424,6 @@ export default angular.module('ui-docs', [
|
|
341
424
|
page: 'editor-3-test.html'
|
342
425
|
},
|
343
426
|
},
|
344
|
-
// Publisher playgrounds
|
345
|
-
publisher: {
|
346
|
-
'publisher-dashboard': {
|
347
|
-
name: 'Dashboard',
|
348
|
-
page: 'publisher-dashboard.html'
|
349
|
-
},
|
350
|
-
'publisher-content-lists': {
|
351
|
-
name: 'Content Lists',
|
352
|
-
page: 'publisher-content-lists.html'
|
353
|
-
},
|
354
|
-
'publisher-content-list-manual': {
|
355
|
-
name: 'Content List - Manual',
|
356
|
-
page: 'publisher-content-list-manual.html'
|
357
|
-
},
|
358
|
-
'publisher-content-list-automatic': {
|
359
|
-
name: 'Content List - Automatic',
|
360
|
-
page: 'publisher-content-list-automatic.html'
|
361
|
-
},
|
362
|
-
'publisher-output-control': {
|
363
|
-
name: 'Output Control',
|
364
|
-
page: 'publisher-output-control.html'
|
365
|
-
},
|
366
|
-
'publisher-content-analytics': {
|
367
|
-
name: 'Content Analytics',
|
368
|
-
page: 'publisher-content-analytics.html'
|
369
|
-
},
|
370
|
-
'publisher-website-settings': {
|
371
|
-
name: 'Website Settings',
|
372
|
-
page: 'publisher-website-settings.html'
|
373
|
-
},
|
374
|
-
'publisher-website-settings-general': {
|
375
|
-
name: 'Website Settings - General',
|
376
|
-
page: 'publisher-website-settings-general.html'
|
377
|
-
},
|
378
|
-
},
|
379
|
-
|
380
|
-
// React playgrounds
|
381
|
-
react: {
|
382
|
-
'first-playground': {
|
383
|
-
name: 'First playground',
|
384
|
-
component: 'FirstPlayground'
|
385
|
-
},
|
386
|
-
'sams-playground': {
|
387
|
-
name: 'SAMS',
|
388
|
-
component: 'SamsPlayground'
|
389
|
-
},
|
390
|
-
'test-ground': {
|
391
|
-
name: 'Test Ground',
|
392
|
-
component: 'TestGround'
|
393
|
-
},
|
394
|
-
'ui-playground': {
|
395
|
-
name: 'UI',
|
396
|
-
component: 'UiPlayground'
|
397
|
-
},
|
398
|
-
'pagelayout-test': {
|
399
|
-
name: 'PageLayout Test',
|
400
|
-
component: 'PageLayoutTest'
|
401
|
-
},
|
402
|
-
'editor-test': {
|
403
|
-
name: 'Editor Layout Test',
|
404
|
-
component: 'EditorTest'
|
405
|
-
},
|
406
|
-
'personal-profile': {
|
407
|
-
name: 'Personal Profile',
|
408
|
-
component: 'PersonalProfile'
|
409
|
-
},
|
410
|
-
'rundown-editor': {
|
411
|
-
name: 'Rundown Editor',
|
412
|
-
component: 'RundownEditor'
|
413
|
-
},
|
414
|
-
'rundowns': {
|
415
|
-
name: 'Rundowns',
|
416
|
-
component: 'Rundowns'
|
417
|
-
},
|
418
|
-
'core-layout': {
|
419
|
-
name: 'Core Layout',
|
420
|
-
component: 'CoreLayout'
|
421
|
-
},
|
422
|
-
'multiedit': {
|
423
|
-
name: 'Multiedit',
|
424
|
-
component: 'Multiedit'
|
425
|
-
}
|
426
|
-
}
|
427
427
|
}))
|
428
428
|
|
429
429
|
.config(($routeProvider) => {
|
@@ -444,11 +444,11 @@ export default angular.module('ui-docs', [
|
|
444
444
|
.when('/components/:name*', {
|
445
445
|
template: require('../examples/pages/components.html')
|
446
446
|
})
|
447
|
-
.when('/
|
448
|
-
template: require('../examples/pages/
|
447
|
+
.when('/design-patterns', {
|
448
|
+
template: require('../examples/pages/design-patterns.html')
|
449
449
|
})
|
450
|
-
.when('/
|
451
|
-
template: require('../examples/pages/
|
450
|
+
.when('/design-patterns/:name*', {
|
451
|
+
template: require('../examples/pages/design-patterns.html')
|
452
452
|
})
|
453
453
|
.when('/playgrounds', {
|
454
454
|
template: require('../examples/pages/playgrounds.html')
|
package/examples/js/doc.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
/* eslint-disable */
|
2
2
|
/* global _, PR */
|
3
3
|
|
4
|
-
import { ReactDoc, ReactPlayground } from './../pages/
|
4
|
+
import { ReactDoc, ReactPlayground } from './../pages/components/Index';
|
5
|
+
import { DesignPatternsDoc } from './../pages/design-patterns/Index';
|
5
6
|
import { HashRouter } from 'react-router-dom';
|
6
7
|
|
7
8
|
import React from 'react';
|
@@ -115,7 +116,7 @@ function docModal($modal) {
|
|
115
116
|
|
116
117
|
scope.openTemplateModal = function () {
|
117
118
|
modal = $modal.open({
|
118
|
-
template: require('../pages/
|
119
|
+
template: require('../pages/components_deprecated/modal-template.html'),
|
119
120
|
controller: docModalController,
|
120
121
|
size: 'large'
|
121
122
|
});
|
@@ -152,6 +153,18 @@ function docReact() {
|
|
152
153
|
};
|
153
154
|
}
|
154
155
|
|
156
|
+
docDesignPatterns.$inject = [];
|
157
|
+
function docDesignPatterns() {
|
158
|
+
return {
|
159
|
+
link: function (scope, elem) {
|
160
|
+
ReactDOM.render(
|
161
|
+
<HashRouter>
|
162
|
+
<DesignPatternsDoc />
|
163
|
+
</HashRouter>, elem[0]);
|
164
|
+
}
|
165
|
+
};
|
166
|
+
}
|
167
|
+
|
155
168
|
docReactPlayground.$inject = ['playgrounds'];
|
156
169
|
function docReactPlayground(playgrounds) {
|
157
170
|
return {
|
@@ -199,5 +212,6 @@ export default angular.module('ui-docs.directives', [])
|
|
199
212
|
.directive('docNav', docNav)
|
200
213
|
.directive('docModal', docModal)
|
201
214
|
.directive('docReact', docReact)
|
215
|
+
.directive('docDesignPatterns', docDesignPatterns)
|
202
216
|
.directive('docReactPlayground', docReactPlayground)
|
203
217
|
.directive('docGifImg', docGifImg);
|
package/examples/js/react.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { NavLink } from 'react-router-dom';
|
2
3
|
|
3
4
|
import Prism from 'prismjs';
|
4
5
|
import NormalizeWhitespace from 'prismjs/plugins/normalize-whitespace/prism-normalize-whitespace';
|
@@ -6,25 +7,107 @@ import LineNumbers from 'prismjs/plugins/line-numbers/prism-line-numbers';
|
|
6
7
|
import Markdown from 'prismjs/components/prism-markdown';
|
7
8
|
import JSX from 'prismjs/components/prism-jsx';
|
8
9
|
|
9
|
-
import { Link } from 'react-router-dom';
|
10
|
-
|
11
10
|
class ReactNav extends React.PureComponent {
|
11
|
+
constructor(props) {
|
12
|
+
super(props);
|
13
|
+
this.state = {
|
14
|
+
searchTerm: '',
|
15
|
+
expandedSections: Object.keys(this.props.pages).reduce((sections, key) => {
|
16
|
+
sections[key] = true;
|
17
|
+
return sections;
|
18
|
+
}, {}),
|
19
|
+
};
|
20
|
+
|
21
|
+
this.activeRef = React.createRef();
|
22
|
+
|
23
|
+
this.handleSearchChange = this.handleSearchChange.bind(this);
|
24
|
+
this.toggleSection = this.toggleSection.bind(this);
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
componentDidMount() {
|
29
|
+
if (this.activeRef.current) {
|
30
|
+
this.activeRef.current.scrollIntoView({
|
31
|
+
block: 'center',
|
32
|
+
inline: 'nearest'
|
33
|
+
});
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
handleSearchChange(event) {
|
38
|
+
this.setState({
|
39
|
+
searchTerm: event.target.value,
|
40
|
+
expandedSections: Object.keys(this.props.pages).reduce((sections, key) => {
|
41
|
+
sections[key] = true;
|
42
|
+
return sections;
|
43
|
+
}, {})
|
44
|
+
});
|
45
|
+
}
|
46
|
+
|
47
|
+
toggleSection(section) {
|
48
|
+
this.setState(prevState => ({
|
49
|
+
expandedSections: {
|
50
|
+
...prevState.expandedSections,
|
51
|
+
[section]: !prevState.expandedSections[section],
|
52
|
+
},
|
53
|
+
}));
|
54
|
+
};
|
55
|
+
|
12
56
|
render() {
|
13
|
-
const pages = this.props
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
57
|
+
const { pages, base = 'components' } = this.props;
|
58
|
+
const { searchTerm } = this.state;
|
59
|
+
|
60
|
+
const filteredPages = Object.keys(pages).reduce((filtered, section) => {
|
61
|
+
const filteredItems = Object.keys(pages[section].items)
|
62
|
+
.filter(item => pages[section].items[item].name.toLowerCase().includes(searchTerm.toLowerCase()))
|
63
|
+
.reduce((obj, key) => {
|
64
|
+
obj[key] = pages[section].items[key];
|
65
|
+
return obj;
|
66
|
+
}, {});
|
67
|
+
|
68
|
+
if (Object.keys(filteredItems).length > 0) {
|
69
|
+
filtered[section] = { ...pages[section], items: filteredItems };
|
70
|
+
}
|
71
|
+
|
72
|
+
return filtered;
|
73
|
+
}, {});
|
74
|
+
|
75
|
+
const navigations = Object.keys(filteredPages).map((group) => (
|
76
|
+
<li key={group}>
|
77
|
+
<div
|
78
|
+
className={`docs-page__nav-title ${this.state.expandedSections[group] ? 'docs-page__nav-title--open' : ''}`}
|
79
|
+
onClick={() => this.toggleSection(group)}
|
80
|
+
>
|
81
|
+
<span className='docs-page__nav-title-caret'>
|
82
|
+
<i className="icon-chevron-right-thin" aria-label="chevron-right-thin" />
|
83
|
+
</span>
|
84
|
+
{filteredPages[group].name}
|
85
|
+
</div>
|
86
|
+
{this.state.expandedSections[group] && (
|
87
|
+
<ul className="docs-page__nav--sub-level">
|
88
|
+
{Object.keys(filteredPages[group].items).map((page) =>
|
89
|
+
<li key={page} className="docs-page__nav-item" ref={`/${base}/${page}` === location.hash.replace('#', '') ? this.activeRef : null}>
|
90
|
+
<NavLink to={{ pathname: `/${base}/${page}` }} activeClassName="docs-page__nav-item--active">{filteredPages[group].items[page].name}</NavLink>
|
91
|
+
</li>
|
92
|
+
)}
|
93
|
+
</ul>
|
22
94
|
)}
|
23
|
-
</
|
24
|
-
|
95
|
+
</li>
|
96
|
+
));
|
25
97
|
|
26
98
|
return (
|
27
99
|
<aside className="docs-page__sidebar">
|
100
|
+
<div className='docs-page__sidebar-searchbar-container'>
|
101
|
+
<div className="mx-2 mb-1-5 sd-searchbar sd-searchbar--expanded sd-searchbar--boxed">
|
102
|
+
<label className="sd-searchbar__icon"></label>
|
103
|
+
<input id="search-input" className="sd-searchbar__input" type="text" placeholder="Search" value={searchTerm} onChange={this.handleSearchChange} />
|
104
|
+
{this.state.searchTerm && (
|
105
|
+
<button className="sd-searchbar__cancel" onClick={() => this.setState({ searchTerm: '' })}>
|
106
|
+
<Icon name='remove-sign' />
|
107
|
+
</button>
|
108
|
+
)}
|
109
|
+
</div>
|
110
|
+
</div>
|
28
111
|
<ul className="docs-page__nav">{navigations}</ul>
|
29
112
|
</aside>
|
30
113
|
)
|
@@ -40,8 +123,25 @@ class ReactDefault extends React.PureComponent {
|
|
40
123
|
<img src="/illustration--react.svg" alt="React" />
|
41
124
|
</figure>
|
42
125
|
<h2 className="docs-page__hero-h2 docs-page__color--primary">Home of Superdesk React components</h2>
|
43
|
-
<p className="docs-page__hero-text">As the headline suggests
|
44
|
-
|
126
|
+
<p className="docs-page__hero-text">As the headline suggests, these where the React components live.</p>
|
127
|
+
</div>
|
128
|
+
</section>
|
129
|
+
)
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
class PatternsDefault extends React.PureComponent {
|
134
|
+
render() {
|
135
|
+
return (
|
136
|
+
<section className="docs-page__container">
|
137
|
+
<div className="docs-page__hero">
|
138
|
+
<figure className="docs-page__hero-image">
|
139
|
+
<img src="/illustration--components.svg" alt="React" />
|
140
|
+
</figure>
|
141
|
+
<h2 className="docs-page__hero-h2 docs-page__color--primary">Design Patterns</h2>
|
142
|
+
<p className="docs-page__hero-text">
|
143
|
+
Examples of reusable solutions for common UI patterns in Superdesk.
|
144
|
+
</p>
|
45
145
|
</div>
|
46
146
|
</section>
|
47
147
|
)
|
@@ -113,14 +213,17 @@ class ReactMarkupCodePreview extends React.PureComponent {
|
|
113
213
|
Prism.highlightAll();
|
114
214
|
}
|
115
215
|
render() {
|
216
|
+
const { limitHeight, children } = this.props;
|
217
|
+
const classes = `language-jsx ${limitHeight ? 'max-h-25' : ''}`;
|
218
|
+
|
116
219
|
return (
|
117
|
-
<pre>
|
118
|
-
<code className=
|
119
|
-
{
|
220
|
+
<pre className={limitHeight ? 'max-h-25' : ''}>
|
221
|
+
<code className={classes}>
|
222
|
+
{children}
|
120
223
|
</code>
|
121
224
|
</pre>
|
122
225
|
)
|
123
226
|
}
|
124
227
|
}
|
125
228
|
|
126
|
-
export { ReactNav, ReactDefault, ReactMarkup, ReactMarkupPreview, ReactMarkupCode, ReactMarkupCodePreview };
|
229
|
+
export { ReactNav, ReactDefault, ReactMarkup, ReactMarkupPreview, ReactMarkupCode, ReactMarkupCodePreview, PatternsDefault };
|