superdesk-ui-framework 3.0.1-beta.3 → 3.0.1-beta.30
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/fonts/sd_icons.eot +0 -0
- package/app/fonts/sd_icons.svg +14 -7
- package/app/fonts/sd_icons.ttf +0 -0
- package/app/fonts/sd_icons.woff +0 -0
- package/app/scripts/toggleBoxNext.js +1 -1
- package/app/styles/_big-icon-font.scss +1 -1
- package/app/styles/_buttons.scss +11 -6
- package/app/styles/_content-divider.scss +63 -8
- package/app/styles/_helpers.scss +24 -1
- package/app/styles/_icon-font.scss +17 -10
- package/app/styles/_labels.scss +0 -1
- package/app/styles/_master-desk.scss +3 -2
- package/app/styles/_modals.scss +6 -3
- package/app/styles/_normalize.scss +4 -0
- package/app/styles/_sd-tag-input.scss +256 -296
- package/app/styles/_simple-list.scss +0 -2
- package/app/styles/_table-list.scss +116 -12
- package/app/styles/app.scss +1 -0
- package/app/styles/components/_list-item.scss +36 -17
- package/app/styles/components/_sd-collapse-box.scss +6 -6
- package/app/styles/components/_sd-comment-box.scss +8 -4
- package/app/styles/components/_sd-editor-popup.scss +4 -4
- package/app/styles/components/_sd-grid-item.scss +30 -16
- package/app/styles/components/_sd-media-carousel.scss +37 -2
- package/app/styles/components/_sd-photo-preview.scss +3 -3
- package/app/styles/components/_sd-searchbar.scss +7 -0
- package/app/styles/components/_subnav.scss +470 -470
- package/app/styles/design-tokens/_design-tokens-general.scss +1 -1
- package/app/styles/design-tokens/_new-colors.scss +30 -13
- package/app/styles/dropdowns/_basic-dropdown.scss +6 -0
- package/app/styles/form-elements/_forms-general.scss +81 -7
- package/app/styles/form-elements/_input-wrap.scss +138 -0
- package/app/styles/form-elements/_inputs.scss +368 -110
- package/app/styles/grids/_grid-layout.scss +34 -1
- package/app/styles/interface-elements/_side-panel.scss +1 -1
- package/app/styles/layout/_basic-layout.scss +2 -2
- package/app/styles/layout/_editor.scss +10 -4
- package/app/styles/primereact/_pr-datepicker.scss +4 -2
- package/app/styles/primereact/_pr-dialog.scss +5 -0
- package/app/styles/primereact/_pr-dropdown.scss +17 -1
- package/app/styles/primereact/_pr-menu.scss +6 -5
- package/app/styles/variables/_colors.scss +21 -21
- package/app-typescript/components/Badge.tsx +3 -2
- package/app-typescript/components/ContentDivider.tsx +3 -0
- package/app-typescript/components/DatePicker.tsx +40 -52
- package/app-typescript/components/Dropdown.tsx +127 -82
- package/app-typescript/components/DurationInput.tsx +400 -0
- package/app-typescript/components/EmptyState.tsx +2 -1
- package/app-typescript/components/Form/FormLabel.tsx +8 -1
- package/app-typescript/components/Form/FormRowNew.tsx +41 -0
- package/app-typescript/components/Form/InputBase.tsx +95 -0
- package/app-typescript/components/Form/InputNew.tsx +107 -0
- package/app-typescript/components/Form/InputWrapper.tsx +79 -0
- package/app-typescript/components/Form/index.tsx +4 -0
- package/app-typescript/components/Input.tsx +28 -45
- package/app-typescript/components/Label.tsx +65 -10
- package/app-typescript/components/Layouts/AuthoringContainer.tsx +2 -1
- package/app-typescript/components/Layouts/AuthoringFrame.tsx +2 -1
- package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +21 -2
- package/app-typescript/components/Layouts/AuthoringInnerHeader.tsx +1 -1
- package/app-typescript/components/Layouts/AuthoringMain.tsx +4 -2
- package/app-typescript/components/Layouts/CoreLayout.tsx +2 -1
- package/app-typescript/components/Layouts/CoreLayoutMain.tsx +7 -1
- package/app-typescript/components/Layouts/Layout.tsx +1 -1
- package/app-typescript/components/LeftMenu.tsx +127 -122
- package/app-typescript/components/Lists/ContentList.tsx +66 -33
- package/app-typescript/components/Lists/TableList.tsx +348 -151
- package/app-typescript/components/Menu.tsx +2 -2
- package/app-typescript/components/MultiSelect.tsx +37 -50
- package/app-typescript/components/NavButton.tsx +2 -1
- package/app-typescript/components/Navigation/BottomNav.tsx +3 -2
- package/app-typescript/components/SearchBar.tsx +39 -12
- package/app-typescript/components/Select.tsx +23 -41
- package/app-typescript/components/SelectWithTemplate.tsx +32 -7
- package/app-typescript/components/Spacer.tsx +87 -0
- package/app-typescript/components/TimePicker.tsx +38 -15
- package/app-typescript/components/TreeSelect.tsx +546 -212
- package/app-typescript/index.ts +6 -1
- package/dist/examples.bundle.css +344 -71
- package/dist/examples.bundle.js +48203 -45174
- package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +65 -54
- package/dist/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/dist/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
- package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +26 -23
- package/dist/playgrounds/react-playgrounds/Rundowns.tsx +20 -21
- package/dist/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +379 -25
- package/dist/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/dist/react/Badges.tsx +18 -0
- package/dist/react/ContentDivider.tsx +22 -18
- package/dist/react/ContentList.tsx +200 -18
- package/dist/react/DatePicker.tsx +21 -1
- package/dist/react/Dropdowns.tsx +580 -48
- package/dist/react/DurationInput.tsx +108 -0
- package/dist/react/Index.tsx +5 -0
- package/dist/react/Inputs.tsx +147 -2
- package/dist/react/Labels.tsx +51 -1
- package/dist/react/LeftNavigations.tsx +71 -44
- package/dist/react/MultiSelect.tsx +10 -7
- package/dist/react/NavButtons.tsx +31 -1
- package/dist/react/SelectWithTemplate.tsx +6 -1
- package/dist/react/TableList.tsx +79 -186
- package/dist/react/TimePicker.tsx +22 -12
- package/dist/react/Togglebox.tsx +1 -1
- package/dist/react/TreeSelect.tsx +295 -51
- package/dist/react/tree-select/TreeSelect.tsx +273 -0
- package/dist/react/tree-select/example-1.tsx +71 -0
- package/dist/react/tree-select/example-2.tsx +59 -0
- package/dist/sd_icons.eot +0 -0
- package/dist/sd_icons.svg +14 -7
- package/dist/sd_icons.ttf +0 -0
- package/dist/sd_icons.woff +0 -0
- package/dist/superdesk-ui.bundle.css +2282 -782
- package/dist/superdesk-ui.bundle.js +37312 -21800
- package/dist/vendor.bundle.js +27 -27
- package/examples/css/docs-page.css +4 -4
- package/examples/index.js +4 -0
- package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +65 -54
- package/examples/pages/playgrounds/react-playgrounds/Index.tsx +1 -0
- package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
- package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +26 -23
- package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +20 -21
- package/examples/pages/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +379 -25
- package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
- package/examples/pages/react/Badges.tsx +18 -0
- package/examples/pages/react/ContentDivider.tsx +22 -18
- package/examples/pages/react/ContentList.tsx +200 -18
- package/examples/pages/react/DatePicker.tsx +21 -1
- package/examples/pages/react/Dropdowns.tsx +580 -48
- package/examples/pages/react/DurationInput.tsx +108 -0
- package/examples/pages/react/Index.tsx +5 -0
- package/examples/pages/react/Inputs.tsx +147 -2
- package/examples/pages/react/Labels.tsx +51 -1
- package/examples/pages/react/LeftNavigations.tsx +71 -44
- package/examples/pages/react/MultiSelect.tsx +10 -7
- package/examples/pages/react/NavButtons.tsx +31 -1
- package/examples/pages/react/SelectWithTemplate.tsx +6 -1
- package/examples/pages/react/TableList.tsx +79 -186
- package/examples/pages/react/TimePicker.tsx +22 -12
- package/examples/pages/react/Togglebox.tsx +1 -1
- package/examples/pages/react/TreeSelect.tsx +295 -51
- package/examples/pages/react/tree-select/TreeSelect.tsx +273 -0
- package/examples/pages/react/tree-select/example-1.tsx +71 -0
- package/examples/pages/react/tree-select/example-2.tsx +59 -0
- package/package.json +5 -5
- package/react/components/Badge.d.ts +1 -0
- package/react/components/Badge.js +2 -2
- package/react/components/ContentDivider.d.ts +1 -0
- package/react/components/ContentDivider.js +2 -0
- package/react/components/DatePicker.d.ts +1 -0
- package/react/components/DatePicker.js +6 -22
- package/react/components/Dropdown.d.ts +6 -5
- package/react/components/Dropdown.js +57 -30
- package/react/components/DurationInput.d.ts +42 -0
- package/react/components/DurationInput.js +364 -0
- package/react/components/EmptyState.d.ts +1 -0
- package/react/components/EmptyState.js +1 -1
- package/react/components/Form/FormLabel.d.ts +4 -1
- package/react/components/Form/FormLabel.js +9 -3
- package/react/components/Form/FormRowNew.d.ts +12 -0
- package/react/components/Form/FormRowNew.js +67 -0
- package/react/components/Form/InputBase.d.ts +41 -0
- package/react/components/Form/InputBase.js +86 -0
- package/react/components/Form/InputNew.d.ts +45 -0
- package/react/components/Form/InputNew.js +75 -0
- package/react/components/Form/InputWrapper.d.ts +28 -0
- package/react/components/Form/InputWrapper.js +91 -0
- package/react/components/Form/index.d.ts +4 -0
- package/react/components/Form/index.js +9 -1
- package/react/components/Input.js +5 -34
- package/react/components/Label.d.ts +2 -0
- package/react/components/Label.js +34 -3
- package/react/components/Layouts/AuthoringContainer.d.ts +1 -0
- package/react/components/Layouts/AuthoringContainer.js +1 -1
- package/react/components/Layouts/AuthoringFrame.d.ts +1 -0
- package/react/components/Layouts/AuthoringFrame.js +1 -1
- package/react/components/Layouts/AuthoringFrameRightBar.d.ts +9 -2
- package/react/components/Layouts/AuthoringFrameRightBar.js +14 -3
- package/react/components/Layouts/AuthoringInnerHeader.js +1 -1
- package/react/components/Layouts/AuthoringMain.js +1 -1
- package/react/components/Layouts/CoreLayout.d.ts +1 -0
- package/react/components/Layouts/CoreLayout.js +1 -1
- package/react/components/Layouts/CoreLayoutMain.d.ts +1 -0
- package/react/components/Layouts/CoreLayoutMain.js +8 -1
- package/react/components/Layouts/Layout.js +1 -1
- package/react/components/LeftMenu.d.ts +3 -1
- package/react/components/LeftMenu.js +8 -1
- package/react/components/Lists/ContentList.d.ts +51 -0
- package/react/components/Lists/ContentList.js +110 -0
- package/react/components/Lists/TableList.d.ts +64 -0
- package/react/components/Lists/TableList.js +240 -0
- package/react/components/Menu.js +1 -1
- package/react/components/MultiSelect.d.ts +40 -0
- package/react/components/MultiSelect.js +70 -0
- package/react/components/NavButton.d.ts +1 -1
- package/react/components/Navigation/BottomNav.d.ts +1 -0
- package/react/components/Navigation/BottomNav.js +2 -2
- package/react/components/SearchBar.d.ts +3 -2
- package/react/components/SearchBar.js +28 -4
- package/react/components/Select.d.ts +1 -1
- package/react/components/Select.js +4 -26
- package/react/components/SelectWithTemplate.d.ts +11 -1
- package/react/components/SelectWithTemplate.js +19 -10
- package/react/components/TimePicker.d.ts +11 -1
- package/react/components/TimePicker.js +10 -3
- package/react/components/TreeSelect.d.ts +82 -0
- package/react/components/TreeSelect.js +521 -0
- package/react/index.d.ts +6 -0
- package/react/index.js +16 -3
- package/.vscode/settings.json +0 -5
- package/app-typescript/dist/components/Alert.d.ts +0 -16
- package/app-typescript/dist/components/Autocomplete.d.ts +0 -48
- package/app-typescript/dist/components/Avatar.d.ts +0 -33
- package/app-typescript/dist/components/Badge.d.ts +0 -13
- package/app-typescript/dist/components/Button.d.ts +0 -23
- package/app-typescript/dist/components/ButtonGroup.d.ts +0 -12
- package/app-typescript/dist/components/CheckButtonGroup.d.ts +0 -11
- package/app-typescript/dist/components/CheckGroup.d.ts +0 -9
- package/app-typescript/dist/components/Checkbox.d.ts +0 -19
- package/app-typescript/dist/components/CheckboxButton.d.ts +0 -19
- package/app-typescript/dist/components/DatePicker.d.ts +0 -37
- package/app-typescript/dist/components/Divider.d.ts +0 -9
- package/app-typescript/dist/components/DonutChart.d.ts +0 -12
- package/app-typescript/dist/components/Dropdown.d.ts +0 -28
- package/app-typescript/dist/components/DropdownFirst.d.ts +0 -42
- package/app-typescript/dist/components/EmptyState.d.ts +0 -11
- package/app-typescript/dist/components/FormLabel.d.ts +0 -9
- package/app-typescript/dist/components/Genie.d.ts +0 -13
- package/app-typescript/dist/components/GridItem.d.ts +0 -69
- package/app-typescript/dist/components/GridList.d.ts +0 -14
- package/app-typescript/dist/components/HeadingText.d.ts +0 -10
- package/app-typescript/dist/components/HelloWorld.d.ts +0 -8
- package/app-typescript/dist/components/Icon.d.ts +0 -12
- package/app-typescript/dist/components/IconButton.d.ts +0 -12
- package/app-typescript/dist/components/IconLabel.d.ts +0 -11
- package/app-typescript/dist/components/Input.d.ts +0 -24
- package/app-typescript/dist/components/Label.d.ts +0 -15
- package/app-typescript/dist/components/LeftMenu.d.ts +0 -26
- package/app-typescript/dist/components/Loader.d.ts +0 -8
- package/app-typescript/dist/components/NavButton.d.ts +0 -15
- package/app-typescript/dist/components/Popover.d.ts +0 -13
- package/app-typescript/dist/components/PropsList.d.ts +0 -15
- package/app-typescript/dist/components/Radio.d.ts +0 -19
- package/app-typescript/dist/components/RadioButton.d.ts +0 -20
- package/app-typescript/dist/components/Select.d.ts +0 -29
- package/app-typescript/dist/components/SelectWithTemplate.d.ts +0 -32
- package/app-typescript/dist/components/SlidingToolbar.d.ts +0 -8
- package/app-typescript/dist/components/StrechBar.d.ts +0 -4
- package/app-typescript/dist/components/SubNav.d.ts +0 -10
- package/app-typescript/dist/components/Switch.d.ts +0 -12
- package/app-typescript/dist/components/TabCustom.d.ts +0 -25
- package/app-typescript/dist/components/TabList.d.ts +0 -22
- package/app-typescript/dist/components/Tag.d.ts +0 -9
- package/app-typescript/dist/components/TagInput.d.ts +0 -7
- package/app-typescript/dist/components/TagInputTest.d.ts +0 -18
- package/app-typescript/dist/components/TimePicker.d.ts +0 -11
- package/app-typescript/dist/components/Tooltip.d.ts +0 -11
- package/app-typescript/dist/components/_Positioner.d.ts +0 -27
- package/app-typescript/dist/index.d.ts +0 -56
- package/patches/@superdesk+primereact+5.0.2-4.patch +0 -57
- package/yarn-error.log +0 -111
@@ -216,6 +216,12 @@
|
|
216
216
|
transition-delay: 0;
|
217
217
|
}
|
218
218
|
}
|
219
|
+
&.sd-column-box__slide-in-column--light {
|
220
|
+
background-color: var(--sd-colour-panel-bg--000);
|
221
|
+
.sd-column-box__slide-in-column-inner {
|
222
|
+
background-color: var(--sd-colour-panel-bg--000);
|
223
|
+
}
|
224
|
+
}
|
219
225
|
}
|
220
226
|
.sd-slide-in-panel {
|
221
227
|
display: flex;
|
@@ -685,9 +691,33 @@ $planningEditor-width: 53rem;
|
|
685
691
|
.side-panel__container {
|
686
692
|
width: var(--width__container--medium);
|
687
693
|
overflow-y: auto;
|
688
|
-
&.side-panel__container--
|
694
|
+
&.side-panel__container--xxx-small {
|
695
|
+
width: var(--width__container--xxx-small);
|
696
|
+
}
|
697
|
+
&.side-panel__container--xx-small {
|
698
|
+
width: var(--width__container--xx-small);
|
699
|
+
}
|
700
|
+
&.side-panel__container--x-small {
|
701
|
+
width: var(--width__container--x-small);
|
702
|
+
}
|
703
|
+
&.side-panel__container--small {
|
704
|
+
width: var(--width__container--small);
|
705
|
+
}
|
706
|
+
&.side-panel__container--large {
|
707
|
+
width: var(--width__container--large);
|
708
|
+
}
|
709
|
+
&.side-panel__container--x-large {
|
710
|
+
width: var(--width__container--x-large);
|
711
|
+
}
|
712
|
+
&.side-panel__container--xx-large {
|
689
713
|
width: var(--width__container--xx-large);
|
690
714
|
}
|
715
|
+
&.side-panel__container--xxx-large {
|
716
|
+
width: var(--width__container--xxx-large);
|
717
|
+
}
|
718
|
+
&.side-panel__container--full {
|
719
|
+
width: var(--width__container--full);
|
720
|
+
}
|
691
721
|
.side-panel {
|
692
722
|
opacity: 1;
|
693
723
|
}
|
@@ -717,6 +747,9 @@ $planningEditor-width: 53rem;
|
|
717
747
|
.sd-main-content-grid {
|
718
748
|
grid-column: contentArea;
|
719
749
|
}
|
750
|
+
&--editor-full {
|
751
|
+
grid-template-columns: [sideTabsLeft] auto [contentArea] auto [contentSplitter] auto [authoringArea] 1fr;
|
752
|
+
}
|
720
753
|
}
|
721
754
|
.sd-content-wrapper__left-tabs {
|
722
755
|
grid-column: sideTabsLeft;
|
@@ -82,7 +82,7 @@
|
|
82
82
|
overflow: visible;
|
83
83
|
.sidetabs-content-overlay__inner {
|
84
84
|
opacity: 1;
|
85
|
-
width:
|
85
|
+
width: auto;
|
86
86
|
position: absolute;
|
87
87
|
overflow: hidden;
|
88
88
|
inset-inline-end: 0;
|
@@ -365,12 +365,18 @@
|
|
365
365
|
overflow-y: auto;
|
366
366
|
width: auto;
|
367
367
|
min-width: 45vw;
|
368
|
-
|
369
|
-
|
370
|
-
|
368
|
+
max-width: 45vw;
|
369
|
+
&.sd-editor__container--large {
|
370
|
+
min-width: 52vw;
|
371
|
+
}
|
371
372
|
}
|
372
373
|
}
|
373
374
|
|
375
|
+
.sd-content-wrapper--editor-full .open-editor .sd-editor__container {
|
376
|
+
min-width: auto;
|
377
|
+
max-width: none;
|
378
|
+
}
|
379
|
+
|
374
380
|
.sd-editor__input--title {
|
375
381
|
-webkit-appearance: none;
|
376
382
|
-moz-appearance: none;
|
@@ -78,11 +78,13 @@
|
|
78
78
|
// add background when hovering a selectable date
|
79
79
|
.p-datepicker table td > span {
|
80
80
|
&:not(.p-highlight):not(.p-disabled) {
|
81
|
+
transition: all ease 0.2s;
|
81
82
|
&:hover {
|
82
|
-
background-color:
|
83
|
+
background-color: var(--sd-colour-interactive--alpha-10);
|
84
|
+
box-shadow: inset 0 0 0 1px var(--sd-colour-interactive);
|
83
85
|
}
|
84
86
|
&:active {
|
85
|
-
background-color:
|
87
|
+
background-color: var(--sd-colour-interactive--alpha-20);
|
86
88
|
}
|
87
89
|
}
|
88
90
|
}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
background-color: hsla(214, 13%, 16%, 0.5) !important;
|
3
3
|
backdrop-filter: blur(1px);
|
4
4
|
-webkit-backdrop-filter: blur(1px);
|
5
|
+
z-index: 1000;
|
5
6
|
}
|
6
7
|
|
7
8
|
|
@@ -42,6 +43,10 @@
|
|
42
43
|
overflow-y: auto;
|
43
44
|
}
|
44
45
|
|
46
|
+
.p-dialog-flex {
|
47
|
+
display: flex;
|
48
|
+
}
|
49
|
+
|
45
50
|
.p-dialog-header {
|
46
51
|
display: flex;
|
47
52
|
align-items: center;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
@import './../tag-labels';
|
2
2
|
@import './../form-elements/checkbox';
|
3
3
|
|
4
|
-
.p-dropdown
|
4
|
+
.p-dropdown {
|
5
5
|
@include pr-input-item-base;
|
6
6
|
padding-block-start: 6px;
|
7
7
|
padding-block-end: 6px;
|
@@ -10,6 +10,14 @@
|
|
10
10
|
color: $sd-text;
|
11
11
|
}
|
12
12
|
|
13
|
+
.p-multiselect {
|
14
|
+
@include pr-input-item-base;
|
15
|
+
height: auto !important;
|
16
|
+
min-height: 3.2rem !important;
|
17
|
+
color: $sd-text;
|
18
|
+
padding: 0.4rem;
|
19
|
+
}
|
20
|
+
|
13
21
|
.p-dropdown-clear-icon,
|
14
22
|
.p-multiselect-clear-icon {
|
15
23
|
position: static;
|
@@ -69,13 +77,21 @@
|
|
69
77
|
}
|
70
78
|
|
71
79
|
.p-multiselect-label {
|
80
|
+
margin: 0;
|
81
|
+
padding: 0;
|
82
|
+
list-style-type: none;
|
72
83
|
display: flex;
|
84
|
+
justify-content: flex-start;
|
73
85
|
align-items: center;
|
86
|
+
flex-wrap: wrap;
|
87
|
+
padding-inline-start: 0.4rem;
|
88
|
+
gap: 0.4rem;
|
74
89
|
}
|
75
90
|
|
76
91
|
.p-multiselect-token {
|
77
92
|
@extend .tag-label;
|
78
93
|
cursor: default;
|
94
|
+
margin: 0 !important;
|
79
95
|
|
80
96
|
.pi-times-circle {
|
81
97
|
overflow: inherit;
|
@@ -23,13 +23,14 @@
|
|
23
23
|
padding: .8rem 1.6rem;
|
24
24
|
min-width: 100px;
|
25
25
|
font-size: 14px;
|
26
|
-
color:
|
26
|
+
color: var(--color-text);
|
27
|
+
width: 100%;
|
27
28
|
|
28
29
|
&:hover, &:focus-visible {
|
29
30
|
background: $sd-colour-background__menu-item--hover;
|
30
31
|
}
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
.p-menuitem-icon {
|
33
|
+
margin-right: 0.8rem;
|
34
|
+
color: var(--color-icon-default);
|
35
|
+
}
|
35
36
|
}
|
@@ -81,29 +81,29 @@ $yellow: hsla(45, 100%, 53%, 1);
|
|
81
81
|
$orange: hsla(35, 100%, 43%, 1);
|
82
82
|
$purple: hsla(291, 64%, 42%, 1);
|
83
83
|
|
84
|
-
$black:
|
85
|
-
$grayDarker:
|
86
|
-
$grayDark:
|
87
|
-
$grayMedium:
|
88
|
-
$gray:
|
89
|
-
$grayNeutral:
|
90
|
-
$grayText:
|
91
|
-
$grayLight:
|
92
|
-
$grayLighter:
|
93
|
-
$white:
|
84
|
+
$black: hsl(214, 13%, 0%);
|
85
|
+
$grayDarker: hsl(214, 13%, 13%);
|
86
|
+
$grayDark: hsl(214, 13%, 20%);
|
87
|
+
$grayMedium: hsl(214, 13%, 27%);
|
88
|
+
$gray: hsl(214, 13%, 40%);
|
89
|
+
$grayNeutral: hsl(214, 13%, 48%);
|
90
|
+
$grayText: hsl(214, 13%, 45%);
|
91
|
+
$grayLight: hsl(214, 13%, 60%);
|
92
|
+
$grayLighter: hsl(214, 13%, 96%);
|
93
|
+
$white: hsl(214, 13%, 100%);
|
94
94
|
|
95
95
|
// Greys
|
96
|
-
$gray--900:
|
97
|
-
$gray--800:
|
98
|
-
$gray--700:
|
99
|
-
$gray--600:
|
100
|
-
$gray--500:
|
101
|
-
$gray--400:
|
102
|
-
$gray--300:
|
103
|
-
$gray--200:
|
104
|
-
$gray--100:
|
105
|
-
$gray--75:
|
106
|
-
$grey--50:
|
96
|
+
$gray--900: hsl(214, 13%, 20%);
|
97
|
+
$gray--800: hsl(214, 13%, 27%);
|
98
|
+
$gray--700: hsl(214, 13%, 33%);
|
99
|
+
$gray--600: hsl(214, 13%, 40%);
|
100
|
+
$gray--500: hsl(214, 13%, 45%);
|
101
|
+
$gray--400: hsl(214, 13%, 53%);
|
102
|
+
$gray--300: hsl(214, 13%, 60%);
|
103
|
+
$gray--200: hsl(214, 13%, 80%);
|
104
|
+
$gray--100: hsl(214, 13%, 87%);
|
105
|
+
$gray--75: hsl(214, 13%, 93%);
|
106
|
+
$grey--50: hsl(214, 13%, 96%);
|
107
107
|
|
108
108
|
// Extended colors
|
109
109
|
$fernGreen: hsla(91, 47%, 34%, 1);
|
@@ -6,6 +6,7 @@ interface IProps {
|
|
6
6
|
color?: string; // https://ui-framework.superdesk.org/#/components/colors
|
7
7
|
shape?: 'round' | 'square'; // defaults to 'round'
|
8
8
|
children?: React.ReactNode;
|
9
|
+
hexColor?: string;
|
9
10
|
'data-test-id'?: string;
|
10
11
|
}
|
11
12
|
|
@@ -21,11 +22,11 @@ export class Badge extends React.PureComponent<IProps> {
|
|
21
22
|
return (
|
22
23
|
<div className='element-with-badge' data-test-id={this.props['data-test-id']}>
|
23
24
|
{this.props.children}
|
24
|
-
<span className={classes} data-test-id="badge-content">{this.props.text}</span>
|
25
|
+
<span className={classes} style={{backgroundColor: this.props.hexColor}} data-test-id="badge-content">{this.props.text}</span>
|
25
26
|
</div>
|
26
27
|
);
|
27
28
|
} else {
|
28
|
-
return <span className={classes} data-test-id={this.props['data-test-id']}>{this.props.text}</span>;
|
29
|
+
return <span className={classes} style={{backgroundColor: this.props.hexColor}} data-test-id={this.props['data-test-id']}>{this.props.text}</span>;
|
29
30
|
}
|
30
31
|
}
|
31
32
|
}
|
@@ -6,6 +6,7 @@ interface IProps {
|
|
6
6
|
orientation?: 'horizontal' |'vertical'; // defaults to 'horizontal'
|
7
7
|
align?: 'center' | 'left' | 'right'; // defaults to 'center'
|
8
8
|
border?: boolean;
|
9
|
+
margin?: 'x-small' | 'small' |'medium' | 'large' | 'none';
|
9
10
|
children?: React.ReactNode;
|
10
11
|
}
|
11
12
|
|
@@ -19,6 +20,8 @@ export class ContentDivider extends React.PureComponent<IProps> {
|
|
19
20
|
[`sd-content-divider--text-${this.props.align}`]: this.props.align || this.props.align !== undefined,
|
20
21
|
[`sd-content-divider--${this.props.orientation}`]:
|
21
22
|
this.props.orientation || this.props.orientation !== undefined,
|
23
|
+
'sd-content-divider--margin-medium': this.props.margin === undefined,
|
24
|
+
[`sd-content-divider--margin-${this.props.margin}`]: this.props.margin || this.props.margin !== undefined,
|
22
25
|
});
|
23
26
|
|
24
27
|
if (this.props.children) {
|
@@ -3,8 +3,9 @@ import addDays from 'date-fns/addDays';
|
|
3
3
|
import format from 'date-fns/format';
|
4
4
|
import {Calendar, LocaleSettings, CalendarProps} from '@superdesk/primereact/calendar';
|
5
5
|
import {throttle} from 'lodash';
|
6
|
-
import classNames from 'classnames';
|
6
|
+
// import classNames from 'classnames';
|
7
7
|
import nextId from "react-id-generator";
|
8
|
+
import { InputWrapper } from './Form';
|
8
9
|
|
9
10
|
export type DatePickerLocaleSettings = Omit<LocaleSettings, 'today' | 'clear'>;
|
10
11
|
|
@@ -79,7 +80,6 @@ function parseFromPrimeReactCalendarFormat(value: CalendarProps['value']): IDate
|
|
79
80
|
return null;
|
80
81
|
} else {
|
81
82
|
// at this point value is a free input string that can't be parsed to a Date inside primereact/calendar
|
82
|
-
|
83
83
|
return 'failed-to-parse';
|
84
84
|
}
|
85
85
|
}
|
@@ -91,10 +91,10 @@ function parseToPrimeReactCalendarFormat(value: IDatePicker['value']): CalendarP
|
|
91
91
|
export class DatePicker extends React.PureComponent<IDatePicker, IState> {
|
92
92
|
private instance: IPrivatePrimeReactCalendarApi | undefined;
|
93
93
|
hidePopupOnScroll: () => void;
|
94
|
+
private htmlId = nextId();
|
94
95
|
|
95
96
|
constructor(props: IDatePicker) {
|
96
97
|
super(props);
|
97
|
-
|
98
98
|
this.state = {
|
99
99
|
value: parseToPrimeReactCalendarFormat(this.props.value),
|
100
100
|
valid: true,
|
@@ -137,7 +137,6 @@ export class DatePicker extends React.PureComponent<IDatePicker, IState> {
|
|
137
137
|
|
138
138
|
render() {
|
139
139
|
let locale: LocaleSettings | undefined;
|
140
|
-
|
141
140
|
if (this.props.locale != null) {
|
142
141
|
locale = {
|
143
142
|
...this.props.locale,
|
@@ -145,26 +144,23 @@ export class DatePicker extends React.PureComponent<IDatePicker, IState> {
|
|
145
144
|
clear: 'clear',
|
146
145
|
};
|
147
146
|
}
|
148
|
-
const classes = classNames('sd-input', {
|
149
|
-
'sd-input--inline-label': this.props.inlineLabel,
|
150
|
-
'sd-input--required': this.props.required,
|
151
|
-
'sd-input--disabled': this.props.disabled,
|
152
|
-
'sd-input--full-width': this.props.fullWidth,
|
153
|
-
'sd-input--invalid': this.props.invalid || this.state.invalid,
|
154
|
-
});
|
155
|
-
const labelClasses = classNames('sd-input__label', {
|
156
|
-
'a11y-only': this.props.labelHidden,
|
157
|
-
});
|
158
|
-
|
159
|
-
let htmlId = nextId();
|
160
147
|
|
161
148
|
return (
|
162
|
-
<
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
149
|
+
<InputWrapper
|
150
|
+
label={this.props.label}
|
151
|
+
error={this.props.error}
|
152
|
+
required={this.props.required}
|
153
|
+
disabled={this.props.disabled}
|
154
|
+
invalid={this.state.invalid}
|
155
|
+
info={this.props.info}
|
156
|
+
inlineLabel={this.props.inlineLabel}
|
157
|
+
labelHidden={this.props.labelHidden}
|
158
|
+
fullWidth={this.props.fullWidth}
|
159
|
+
htmlId={this.htmlId}
|
160
|
+
tabindex={this.props.tabindex}>
|
167
161
|
<Calendar
|
162
|
+
inputId={this.htmlId}
|
163
|
+
ariaLabelledBy={this.htmlId + 'label'}
|
168
164
|
ref={(ref) => {
|
169
165
|
this.instance = ref as unknown as IPrivatePrimeReactCalendarApi;
|
170
166
|
}}
|
@@ -214,16 +210,8 @@ export class DatePicker extends React.PureComponent<IDatePicker, IState> {
|
|
214
210
|
// restoring internal state to current props value
|
215
211
|
this.setState({valid: true, value: parseToPrimeReactCalendarFormat(this.props.value)});
|
216
212
|
}
|
217
|
-
}}
|
218
|
-
|
219
|
-
<div className='sd-input__message-box'>
|
220
|
-
{this.props.info && !this.props.invalid && !this.state.invalid ?
|
221
|
-
<div className='sd-input__hint'>{this.props.info}</div> : null}
|
222
|
-
{this.props.invalid || this.state.invalid ?
|
223
|
-
<div className='sd-input__message'>{this.props.error}</div>
|
224
|
-
: null}
|
225
|
-
</div>
|
226
|
-
</div>
|
213
|
+
}} />
|
214
|
+
</InputWrapper>
|
227
215
|
);
|
228
216
|
}
|
229
217
|
}
|
@@ -237,27 +225,27 @@ export class DatePickerISO extends React.PureComponent<IDatePickerISO> {
|
|
237
225
|
render() {
|
238
226
|
return (
|
239
227
|
<DatePicker
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
228
|
+
value={new Date(this.props.value)}
|
229
|
+
onChange={(value) => {
|
230
|
+
if (value === null) {
|
231
|
+
this.props.onChange('');
|
232
|
+
} else {
|
233
|
+
this.props.onChange(format(value, 'yyyy-MM-dd'));
|
234
|
+
}
|
235
|
+
}}
|
236
|
+
disabled={this.props.disabled}
|
237
|
+
shortcuts={this.props.shortcuts}
|
238
|
+
dateFormat={this.props.dateFormat}
|
239
|
+
locale={this.props.locale}
|
240
|
+
inlineLabel={this.props.inlineLabel}
|
241
|
+
required={this.props.required}
|
242
|
+
fullWidth={this.props.fullWidth}
|
243
|
+
invalid={this.props.invalid}
|
244
|
+
labelHidden={this.props.labelHidden}
|
245
|
+
tabindex={this.props.tabindex}
|
246
|
+
label={this.props.label}
|
247
|
+
info={this.props.info}
|
248
|
+
error={this.props.error}
|
261
249
|
/>
|
262
250
|
);
|
263
251
|
}
|