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.
Files changed (262) hide show
  1. package/app/fonts/sd_icons.eot +0 -0
  2. package/app/fonts/sd_icons.svg +14 -7
  3. package/app/fonts/sd_icons.ttf +0 -0
  4. package/app/fonts/sd_icons.woff +0 -0
  5. package/app/scripts/toggleBoxNext.js +1 -1
  6. package/app/styles/_big-icon-font.scss +1 -1
  7. package/app/styles/_buttons.scss +11 -6
  8. package/app/styles/_content-divider.scss +63 -8
  9. package/app/styles/_helpers.scss +24 -1
  10. package/app/styles/_icon-font.scss +17 -10
  11. package/app/styles/_labels.scss +0 -1
  12. package/app/styles/_master-desk.scss +3 -2
  13. package/app/styles/_modals.scss +6 -3
  14. package/app/styles/_normalize.scss +4 -0
  15. package/app/styles/_sd-tag-input.scss +256 -296
  16. package/app/styles/_simple-list.scss +0 -2
  17. package/app/styles/_table-list.scss +116 -12
  18. package/app/styles/app.scss +1 -0
  19. package/app/styles/components/_list-item.scss +36 -17
  20. package/app/styles/components/_sd-collapse-box.scss +6 -6
  21. package/app/styles/components/_sd-comment-box.scss +8 -4
  22. package/app/styles/components/_sd-editor-popup.scss +4 -4
  23. package/app/styles/components/_sd-grid-item.scss +30 -16
  24. package/app/styles/components/_sd-media-carousel.scss +37 -2
  25. package/app/styles/components/_sd-photo-preview.scss +3 -3
  26. package/app/styles/components/_sd-searchbar.scss +7 -0
  27. package/app/styles/components/_subnav.scss +470 -470
  28. package/app/styles/design-tokens/_design-tokens-general.scss +1 -1
  29. package/app/styles/design-tokens/_new-colors.scss +30 -13
  30. package/app/styles/dropdowns/_basic-dropdown.scss +6 -0
  31. package/app/styles/form-elements/_forms-general.scss +81 -7
  32. package/app/styles/form-elements/_input-wrap.scss +138 -0
  33. package/app/styles/form-elements/_inputs.scss +368 -110
  34. package/app/styles/grids/_grid-layout.scss +34 -1
  35. package/app/styles/interface-elements/_side-panel.scss +1 -1
  36. package/app/styles/layout/_basic-layout.scss +2 -2
  37. package/app/styles/layout/_editor.scss +10 -4
  38. package/app/styles/primereact/_pr-datepicker.scss +4 -2
  39. package/app/styles/primereact/_pr-dialog.scss +5 -0
  40. package/app/styles/primereact/_pr-dropdown.scss +17 -1
  41. package/app/styles/primereact/_pr-menu.scss +6 -5
  42. package/app/styles/variables/_colors.scss +21 -21
  43. package/app-typescript/components/Badge.tsx +3 -2
  44. package/app-typescript/components/ContentDivider.tsx +3 -0
  45. package/app-typescript/components/DatePicker.tsx +40 -52
  46. package/app-typescript/components/Dropdown.tsx +127 -82
  47. package/app-typescript/components/DurationInput.tsx +400 -0
  48. package/app-typescript/components/EmptyState.tsx +2 -1
  49. package/app-typescript/components/Form/FormLabel.tsx +8 -1
  50. package/app-typescript/components/Form/FormRowNew.tsx +41 -0
  51. package/app-typescript/components/Form/InputBase.tsx +95 -0
  52. package/app-typescript/components/Form/InputNew.tsx +107 -0
  53. package/app-typescript/components/Form/InputWrapper.tsx +79 -0
  54. package/app-typescript/components/Form/index.tsx +4 -0
  55. package/app-typescript/components/Input.tsx +28 -45
  56. package/app-typescript/components/Label.tsx +65 -10
  57. package/app-typescript/components/Layouts/AuthoringContainer.tsx +2 -1
  58. package/app-typescript/components/Layouts/AuthoringFrame.tsx +2 -1
  59. package/app-typescript/components/Layouts/AuthoringFrameRightBar.tsx +21 -2
  60. package/app-typescript/components/Layouts/AuthoringInnerHeader.tsx +1 -1
  61. package/app-typescript/components/Layouts/AuthoringMain.tsx +4 -2
  62. package/app-typescript/components/Layouts/CoreLayout.tsx +2 -1
  63. package/app-typescript/components/Layouts/CoreLayoutMain.tsx +7 -1
  64. package/app-typescript/components/Layouts/Layout.tsx +1 -1
  65. package/app-typescript/components/LeftMenu.tsx +127 -122
  66. package/app-typescript/components/Lists/ContentList.tsx +66 -33
  67. package/app-typescript/components/Lists/TableList.tsx +348 -151
  68. package/app-typescript/components/Menu.tsx +2 -2
  69. package/app-typescript/components/MultiSelect.tsx +37 -50
  70. package/app-typescript/components/NavButton.tsx +2 -1
  71. package/app-typescript/components/Navigation/BottomNav.tsx +3 -2
  72. package/app-typescript/components/SearchBar.tsx +39 -12
  73. package/app-typescript/components/Select.tsx +23 -41
  74. package/app-typescript/components/SelectWithTemplate.tsx +32 -7
  75. package/app-typescript/components/Spacer.tsx +87 -0
  76. package/app-typescript/components/TimePicker.tsx +38 -15
  77. package/app-typescript/components/TreeSelect.tsx +546 -212
  78. package/app-typescript/index.ts +6 -1
  79. package/dist/examples.bundle.css +344 -71
  80. package/dist/examples.bundle.js +48203 -45174
  81. package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +65 -54
  82. package/dist/playgrounds/react-playgrounds/Index.tsx +1 -0
  83. package/dist/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
  84. package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +26 -23
  85. package/dist/playgrounds/react-playgrounds/Rundowns.tsx +20 -21
  86. package/dist/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
  87. package/dist/playgrounds/react-playgrounds/TestGround.tsx +379 -25
  88. package/dist/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
  89. package/dist/react/Badges.tsx +18 -0
  90. package/dist/react/ContentDivider.tsx +22 -18
  91. package/dist/react/ContentList.tsx +200 -18
  92. package/dist/react/DatePicker.tsx +21 -1
  93. package/dist/react/Dropdowns.tsx +580 -48
  94. package/dist/react/DurationInput.tsx +108 -0
  95. package/dist/react/Index.tsx +5 -0
  96. package/dist/react/Inputs.tsx +147 -2
  97. package/dist/react/Labels.tsx +51 -1
  98. package/dist/react/LeftNavigations.tsx +71 -44
  99. package/dist/react/MultiSelect.tsx +10 -7
  100. package/dist/react/NavButtons.tsx +31 -1
  101. package/dist/react/SelectWithTemplate.tsx +6 -1
  102. package/dist/react/TableList.tsx +79 -186
  103. package/dist/react/TimePicker.tsx +22 -12
  104. package/dist/react/Togglebox.tsx +1 -1
  105. package/dist/react/TreeSelect.tsx +295 -51
  106. package/dist/react/tree-select/TreeSelect.tsx +273 -0
  107. package/dist/react/tree-select/example-1.tsx +71 -0
  108. package/dist/react/tree-select/example-2.tsx +59 -0
  109. package/dist/sd_icons.eot +0 -0
  110. package/dist/sd_icons.svg +14 -7
  111. package/dist/sd_icons.ttf +0 -0
  112. package/dist/sd_icons.woff +0 -0
  113. package/dist/superdesk-ui.bundle.css +2282 -782
  114. package/dist/superdesk-ui.bundle.js +37312 -21800
  115. package/dist/vendor.bundle.js +27 -27
  116. package/examples/css/docs-page.css +4 -4
  117. package/examples/index.js +4 -0
  118. package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +65 -54
  119. package/examples/pages/playgrounds/react-playgrounds/Index.tsx +1 -0
  120. package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +321 -0
  121. package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +26 -23
  122. package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +20 -21
  123. package/examples/pages/playgrounds/react-playgrounds/SamsPlayground.tsx +12 -3
  124. package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +379 -25
  125. package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +1 -1
  126. package/examples/pages/react/Badges.tsx +18 -0
  127. package/examples/pages/react/ContentDivider.tsx +22 -18
  128. package/examples/pages/react/ContentList.tsx +200 -18
  129. package/examples/pages/react/DatePicker.tsx +21 -1
  130. package/examples/pages/react/Dropdowns.tsx +580 -48
  131. package/examples/pages/react/DurationInput.tsx +108 -0
  132. package/examples/pages/react/Index.tsx +5 -0
  133. package/examples/pages/react/Inputs.tsx +147 -2
  134. package/examples/pages/react/Labels.tsx +51 -1
  135. package/examples/pages/react/LeftNavigations.tsx +71 -44
  136. package/examples/pages/react/MultiSelect.tsx +10 -7
  137. package/examples/pages/react/NavButtons.tsx +31 -1
  138. package/examples/pages/react/SelectWithTemplate.tsx +6 -1
  139. package/examples/pages/react/TableList.tsx +79 -186
  140. package/examples/pages/react/TimePicker.tsx +22 -12
  141. package/examples/pages/react/Togglebox.tsx +1 -1
  142. package/examples/pages/react/TreeSelect.tsx +295 -51
  143. package/examples/pages/react/tree-select/TreeSelect.tsx +273 -0
  144. package/examples/pages/react/tree-select/example-1.tsx +71 -0
  145. package/examples/pages/react/tree-select/example-2.tsx +59 -0
  146. package/package.json +5 -5
  147. package/react/components/Badge.d.ts +1 -0
  148. package/react/components/Badge.js +2 -2
  149. package/react/components/ContentDivider.d.ts +1 -0
  150. package/react/components/ContentDivider.js +2 -0
  151. package/react/components/DatePicker.d.ts +1 -0
  152. package/react/components/DatePicker.js +6 -22
  153. package/react/components/Dropdown.d.ts +6 -5
  154. package/react/components/Dropdown.js +57 -30
  155. package/react/components/DurationInput.d.ts +42 -0
  156. package/react/components/DurationInput.js +364 -0
  157. package/react/components/EmptyState.d.ts +1 -0
  158. package/react/components/EmptyState.js +1 -1
  159. package/react/components/Form/FormLabel.d.ts +4 -1
  160. package/react/components/Form/FormLabel.js +9 -3
  161. package/react/components/Form/FormRowNew.d.ts +12 -0
  162. package/react/components/Form/FormRowNew.js +67 -0
  163. package/react/components/Form/InputBase.d.ts +41 -0
  164. package/react/components/Form/InputBase.js +86 -0
  165. package/react/components/Form/InputNew.d.ts +45 -0
  166. package/react/components/Form/InputNew.js +75 -0
  167. package/react/components/Form/InputWrapper.d.ts +28 -0
  168. package/react/components/Form/InputWrapper.js +91 -0
  169. package/react/components/Form/index.d.ts +4 -0
  170. package/react/components/Form/index.js +9 -1
  171. package/react/components/Input.js +5 -34
  172. package/react/components/Label.d.ts +2 -0
  173. package/react/components/Label.js +34 -3
  174. package/react/components/Layouts/AuthoringContainer.d.ts +1 -0
  175. package/react/components/Layouts/AuthoringContainer.js +1 -1
  176. package/react/components/Layouts/AuthoringFrame.d.ts +1 -0
  177. package/react/components/Layouts/AuthoringFrame.js +1 -1
  178. package/react/components/Layouts/AuthoringFrameRightBar.d.ts +9 -2
  179. package/react/components/Layouts/AuthoringFrameRightBar.js +14 -3
  180. package/react/components/Layouts/AuthoringInnerHeader.js +1 -1
  181. package/react/components/Layouts/AuthoringMain.js +1 -1
  182. package/react/components/Layouts/CoreLayout.d.ts +1 -0
  183. package/react/components/Layouts/CoreLayout.js +1 -1
  184. package/react/components/Layouts/CoreLayoutMain.d.ts +1 -0
  185. package/react/components/Layouts/CoreLayoutMain.js +8 -1
  186. package/react/components/Layouts/Layout.js +1 -1
  187. package/react/components/LeftMenu.d.ts +3 -1
  188. package/react/components/LeftMenu.js +8 -1
  189. package/react/components/Lists/ContentList.d.ts +51 -0
  190. package/react/components/Lists/ContentList.js +110 -0
  191. package/react/components/Lists/TableList.d.ts +64 -0
  192. package/react/components/Lists/TableList.js +240 -0
  193. package/react/components/Menu.js +1 -1
  194. package/react/components/MultiSelect.d.ts +40 -0
  195. package/react/components/MultiSelect.js +70 -0
  196. package/react/components/NavButton.d.ts +1 -1
  197. package/react/components/Navigation/BottomNav.d.ts +1 -0
  198. package/react/components/Navigation/BottomNav.js +2 -2
  199. package/react/components/SearchBar.d.ts +3 -2
  200. package/react/components/SearchBar.js +28 -4
  201. package/react/components/Select.d.ts +1 -1
  202. package/react/components/Select.js +4 -26
  203. package/react/components/SelectWithTemplate.d.ts +11 -1
  204. package/react/components/SelectWithTemplate.js +19 -10
  205. package/react/components/TimePicker.d.ts +11 -1
  206. package/react/components/TimePicker.js +10 -3
  207. package/react/components/TreeSelect.d.ts +82 -0
  208. package/react/components/TreeSelect.js +521 -0
  209. package/react/index.d.ts +6 -0
  210. package/react/index.js +16 -3
  211. package/.vscode/settings.json +0 -5
  212. package/app-typescript/dist/components/Alert.d.ts +0 -16
  213. package/app-typescript/dist/components/Autocomplete.d.ts +0 -48
  214. package/app-typescript/dist/components/Avatar.d.ts +0 -33
  215. package/app-typescript/dist/components/Badge.d.ts +0 -13
  216. package/app-typescript/dist/components/Button.d.ts +0 -23
  217. package/app-typescript/dist/components/ButtonGroup.d.ts +0 -12
  218. package/app-typescript/dist/components/CheckButtonGroup.d.ts +0 -11
  219. package/app-typescript/dist/components/CheckGroup.d.ts +0 -9
  220. package/app-typescript/dist/components/Checkbox.d.ts +0 -19
  221. package/app-typescript/dist/components/CheckboxButton.d.ts +0 -19
  222. package/app-typescript/dist/components/DatePicker.d.ts +0 -37
  223. package/app-typescript/dist/components/Divider.d.ts +0 -9
  224. package/app-typescript/dist/components/DonutChart.d.ts +0 -12
  225. package/app-typescript/dist/components/Dropdown.d.ts +0 -28
  226. package/app-typescript/dist/components/DropdownFirst.d.ts +0 -42
  227. package/app-typescript/dist/components/EmptyState.d.ts +0 -11
  228. package/app-typescript/dist/components/FormLabel.d.ts +0 -9
  229. package/app-typescript/dist/components/Genie.d.ts +0 -13
  230. package/app-typescript/dist/components/GridItem.d.ts +0 -69
  231. package/app-typescript/dist/components/GridList.d.ts +0 -14
  232. package/app-typescript/dist/components/HeadingText.d.ts +0 -10
  233. package/app-typescript/dist/components/HelloWorld.d.ts +0 -8
  234. package/app-typescript/dist/components/Icon.d.ts +0 -12
  235. package/app-typescript/dist/components/IconButton.d.ts +0 -12
  236. package/app-typescript/dist/components/IconLabel.d.ts +0 -11
  237. package/app-typescript/dist/components/Input.d.ts +0 -24
  238. package/app-typescript/dist/components/Label.d.ts +0 -15
  239. package/app-typescript/dist/components/LeftMenu.d.ts +0 -26
  240. package/app-typescript/dist/components/Loader.d.ts +0 -8
  241. package/app-typescript/dist/components/NavButton.d.ts +0 -15
  242. package/app-typescript/dist/components/Popover.d.ts +0 -13
  243. package/app-typescript/dist/components/PropsList.d.ts +0 -15
  244. package/app-typescript/dist/components/Radio.d.ts +0 -19
  245. package/app-typescript/dist/components/RadioButton.d.ts +0 -20
  246. package/app-typescript/dist/components/Select.d.ts +0 -29
  247. package/app-typescript/dist/components/SelectWithTemplate.d.ts +0 -32
  248. package/app-typescript/dist/components/SlidingToolbar.d.ts +0 -8
  249. package/app-typescript/dist/components/StrechBar.d.ts +0 -4
  250. package/app-typescript/dist/components/SubNav.d.ts +0 -10
  251. package/app-typescript/dist/components/Switch.d.ts +0 -12
  252. package/app-typescript/dist/components/TabCustom.d.ts +0 -25
  253. package/app-typescript/dist/components/TabList.d.ts +0 -22
  254. package/app-typescript/dist/components/Tag.d.ts +0 -9
  255. package/app-typescript/dist/components/TagInput.d.ts +0 -7
  256. package/app-typescript/dist/components/TagInputTest.d.ts +0 -18
  257. package/app-typescript/dist/components/TimePicker.d.ts +0 -11
  258. package/app-typescript/dist/components/Tooltip.d.ts +0 -11
  259. package/app-typescript/dist/components/_Positioner.d.ts +0 -27
  260. package/app-typescript/dist/index.d.ts +0 -56
  261. package/patches/@superdesk+primereact+5.0.2-4.patch +0 -57
  262. 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--xx-large{
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;
@@ -15,7 +15,7 @@ $side-panel-Bg-200: var(--sd-colour-panel-bg--200);
15
15
  .side-panel__header {
16
16
  grid-column: 1/2;
17
17
  grid-row: 1/2;
18
- z-index: 1;
18
+ z-index: 2;
19
19
  position: relative;
20
20
  min-height: 4.8rem;
21
21
  display: flex;
@@ -38,10 +38,10 @@
38
38
 
39
39
  .sd-page__sidebar {
40
40
  & + .sd-page__main-content {
41
- left: 200px;
41
+ left: 240px;
42
42
  }
43
43
  & + .sd-content-navigation-panel {
44
- left: 200px;
44
+ left: 240px;
45
45
  top: 0;
46
46
  bottom: 0;
47
47
  position: absolute;
@@ -82,7 +82,7 @@
82
82
  overflow: visible;
83
83
  .sidetabs-content-overlay__inner {
84
84
  opacity: 1;
85
- width: 320px;
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
- //min-width: 45%;
369
- //max-width: 1200px;
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: $sd-colour-background__menu-item--hover;
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: $sd-colour-background__menu-item--active;
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, .p-multiselect {
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: $sd-text;
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
- .p-menuitem-icon {
34
- margin-right: 0.8rem;
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: #000;
85
- $grayDarker: #222;
86
- $grayDark: #333333;
87
- $grayMedium: #444;
88
- $gray: #666;
89
- $grayNeutral: #7b7b7b;
90
- $grayText: #747474;
91
- $grayLight: #999;
92
- $grayLighter: #F5F5F5;
93
- $white: #fff;
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: #333;
97
- $gray--800: #444;
98
- $gray--700: #555;
99
- $gray--600: #666;
100
- $gray--500: #747474;
101
- $gray--400: #888;
102
- $gray--300: #999;
103
- $gray--200: #ccc;
104
- $gray--100: #dedede;
105
- $gray--75: #ededed;
106
- $grey--50: #F5F5F5;
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
- <div className={classes}>
163
- <label className={labelClasses} htmlFor={htmlId} id={htmlId + 'label'}
164
- tabIndex={this.props.tabindex === undefined ? undefined : -1}>
165
- {this.props.label}
166
- </label>
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
- value={new Date(this.props.value)}
241
- onChange={(value) => {
242
- if (value === null) {
243
- this.props.onChange('');
244
- } else {
245
- this.props.onChange(format(value, 'yyyy-MM-dd'));
246
- }
247
- }}
248
- disabled={this.props.disabled}
249
- shortcuts={this.props.shortcuts}
250
- dateFormat={this.props.dateFormat}
251
- locale={this.props.locale}
252
- inlineLabel={this.props.inlineLabel}
253
- required={this.props.required}
254
- fullWidth={this.props.fullWidth}
255
- invalid={this.props.invalid}
256
- labelHidden={this.props.labelHidden}
257
- tabindex={this.props.tabindex}
258
- label={this.props.label}
259
- info={this.props.info}
260
- error={this.props.error}
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
  }