superdesk-ui-framework 3.0.0-rc12 → 3.0.0

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 (107) hide show
  1. package/.vscode/settings.json +5 -0
  2. package/app/fonts/sd_icons.eot +0 -0
  3. package/app/fonts/sd_icons.svg +1 -0
  4. package/app/fonts/sd_icons.ttf +0 -0
  5. package/app/fonts/sd_icons.woff +0 -0
  6. package/app/styles/_icon-font.scss +1 -0
  7. package/app/styles/_master-desk.scss +2 -2
  8. package/app/styles/_modals.scss +1 -0
  9. package/app/styles/app.scss +1 -0
  10. package/app/styles/components/_sd-pagination.scss +41 -0
  11. package/app/styles/grids/_grid-layout.scss +4 -14
  12. package/app/styles/menus/_sd-sidebar-menu.scss +1 -1
  13. package/app/styles/primereact/_pr-datepicker.scss +12 -0
  14. package/app/styles/primereact/_pr-dialog.scss +4 -0
  15. package/app/styles/variables/_colors.scss +37 -37
  16. package/app/template/search-handler.html +2 -2
  17. package/app-typescript/components/DatePicker.tsx +8 -9
  18. package/app-typescript/components/Layouts/CoreLayout.tsx +2 -1
  19. package/app-typescript/components/Layouts/CoreLayoutMain.tsx +4 -1
  20. package/app-typescript/components/Lists/ContentList.tsx +3 -2
  21. package/app-typescript/components/Lists/TableList.tsx +17 -8
  22. package/app-typescript/components/Modal.tsx +6 -2
  23. package/app-typescript/components/Navigation/SideBarMenu.tsx +30 -4
  24. package/app-typescript/dist/components/Alert.d.ts +16 -0
  25. package/app-typescript/dist/components/Autocomplete.d.ts +48 -0
  26. package/app-typescript/dist/components/Avatar.d.ts +33 -0
  27. package/app-typescript/dist/components/Badge.d.ts +13 -0
  28. package/app-typescript/dist/components/Button.d.ts +23 -0
  29. package/app-typescript/dist/components/ButtonGroup.d.ts +12 -0
  30. package/app-typescript/dist/components/CheckButtonGroup.d.ts +11 -0
  31. package/app-typescript/dist/components/CheckGroup.d.ts +9 -0
  32. package/app-typescript/dist/components/Checkbox.d.ts +19 -0
  33. package/app-typescript/dist/components/CheckboxButton.d.ts +19 -0
  34. package/app-typescript/dist/components/DatePicker.d.ts +37 -0
  35. package/app-typescript/dist/components/Divider.d.ts +9 -0
  36. package/app-typescript/dist/components/DonutChart.d.ts +12 -0
  37. package/app-typescript/dist/components/Dropdown.d.ts +28 -0
  38. package/app-typescript/dist/components/DropdownFirst.d.ts +42 -0
  39. package/app-typescript/dist/components/EmptyState.d.ts +11 -0
  40. package/app-typescript/dist/components/FormLabel.d.ts +9 -0
  41. package/app-typescript/dist/components/Genie.d.ts +13 -0
  42. package/app-typescript/dist/components/GridItem.d.ts +69 -0
  43. package/app-typescript/dist/components/GridList.d.ts +14 -0
  44. package/app-typescript/dist/components/HeadingText.d.ts +10 -0
  45. package/app-typescript/dist/components/HelloWorld.d.ts +8 -0
  46. package/app-typescript/dist/components/Icon.d.ts +12 -0
  47. package/app-typescript/dist/components/IconButton.d.ts +12 -0
  48. package/app-typescript/dist/components/IconLabel.d.ts +11 -0
  49. package/app-typescript/dist/components/Input.d.ts +24 -0
  50. package/app-typescript/dist/components/Label.d.ts +15 -0
  51. package/app-typescript/dist/components/LeftMenu.d.ts +26 -0
  52. package/app-typescript/dist/components/Loader.d.ts +8 -0
  53. package/app-typescript/dist/components/NavButton.d.ts +15 -0
  54. package/app-typescript/dist/components/Popover.d.ts +13 -0
  55. package/app-typescript/dist/components/PropsList.d.ts +15 -0
  56. package/app-typescript/dist/components/Radio.d.ts +19 -0
  57. package/app-typescript/dist/components/RadioButton.d.ts +20 -0
  58. package/app-typescript/dist/components/Select.d.ts +29 -0
  59. package/app-typescript/dist/components/SelectWithTemplate.d.ts +32 -0
  60. package/app-typescript/dist/components/SlidingToolbar.d.ts +8 -0
  61. package/app-typescript/dist/components/StrechBar.d.ts +4 -0
  62. package/app-typescript/dist/components/SubNav.d.ts +10 -0
  63. package/app-typescript/dist/components/Switch.d.ts +12 -0
  64. package/app-typescript/dist/components/TabCustom.d.ts +25 -0
  65. package/app-typescript/dist/components/TabList.d.ts +22 -0
  66. package/app-typescript/dist/components/Tag.d.ts +9 -0
  67. package/app-typescript/dist/components/TagInput.d.ts +7 -0
  68. package/app-typescript/dist/components/TagInputTest.d.ts +18 -0
  69. package/app-typescript/dist/components/TimePicker.d.ts +11 -0
  70. package/app-typescript/dist/components/Tooltip.d.ts +11 -0
  71. package/app-typescript/dist/components/_Positioner.d.ts +27 -0
  72. package/app-typescript/dist/index.d.ts +56 -0
  73. package/dist/examples.bundle.css +39 -0
  74. package/dist/examples.bundle.js +1905 -1471
  75. package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +505 -3
  76. package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +12 -9
  77. package/dist/playgrounds/react-playgrounds/Rundowns.tsx +6 -6
  78. package/dist/playgrounds/react-playgrounds/TestGround.tsx +29 -1
  79. package/dist/react/DatePicker.tsx +50 -2
  80. package/dist/react/Modal.tsx +154 -22
  81. package/dist/sd_icons.eot +0 -0
  82. package/dist/sd_icons.svg +1 -0
  83. package/dist/sd_icons.ttf +0 -0
  84. package/dist/sd_icons.woff +0 -0
  85. package/dist/superdesk-ui.bundle.css +175 -21
  86. package/dist/superdesk-ui.bundle.js +1059 -1033
  87. package/dist/vendor.bundle.js +7 -7
  88. package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +505 -3
  89. package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +12 -9
  90. package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +6 -6
  91. package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +29 -1
  92. package/examples/pages/react/DatePicker.tsx +50 -2
  93. package/examples/pages/react/Modal.tsx +154 -22
  94. package/package.json +1 -1
  95. package/react/components/DatePicker.d.ts +2 -2
  96. package/react/components/DatePicker.js +3 -3
  97. package/react/components/Layouts/CoreLayout.d.ts +1 -0
  98. package/react/components/Layouts/CoreLayout.js +1 -1
  99. package/react/components/Layouts/CoreLayoutMain.d.ts +1 -0
  100. package/react/components/Layouts/CoreLayoutMain.js +1 -1
  101. package/react/components/Lists/ContentList.js +3 -2
  102. package/react/components/Lists/TableList.js +12 -4
  103. package/react/components/Modal.d.ts +2 -0
  104. package/react/components/Modal.js +3 -3
  105. package/react/components/Navigation/SideBarMenu.d.ts +6 -0
  106. package/react/components/Navigation/SideBarMenu.js +19 -2
  107. package/yarn-error.log +111 -0
@@ -0,0 +1,5 @@
1
+ {
2
+ "cSpell.words": [
3
+ "qcode"
4
+ ]
5
+ }
Binary file
@@ -193,4 +193,5 @@
193
193
  <glyph unicode="&#xe6b7;" glyph-name="audio-cancel" d="M67.882 891.8l195.052-195.052 0.128 0.102 477.43-477.66c0.037 0.039 0.074 0.077 0.111 0.116l75.807-75.805-0.114-0.115 139.712-139.712-67.882-67.882-145.282 145.284c-48.898-33.743-104.339-58.713-164.049-72.639l-2.796-0.643v110.54c31.797 9.462 61.834 23.030 89.496 40.088l-153.496 153.496v-247.918l-320 256h-192v320h183.918l-183.918 183.918zM576 949c215.178-48.832 375.624-240.934 375.624-470.602 0-95.32-27.637-184.169-75.354-258.991l-78.258 78.258c29.502 53.629 46.29 115.232 46.29 180.733 0 168.403-110.971 311.035-263.662 358.648l-4.64 1.414zM576 694.648c79.418-39.708 134.152-121.272 134.152-216.252 0-27.892-4.72-54.628-13.4-79.473l-120.752 120.751zM512 896v-312.326l-173.516 173.514z" />
194
194
  <glyph unicode="&#xe6b8;" glyph-name="list-alt-cancel" d="M67.882 891.8l60.116-60.116 0.002 0.228 128-128-0.002-0.228 63.684-63.684h0.23l64.088-64.088-0.002-0.228 63.684-63.684h0.23l64-64h-0.23l64-64h0.23l64-64h-0.23l64-64h0.23l192.088-192.088-0.004-0.226 60.012-60.012-67.882-67.882-64.208 64.208h-631.918c-34.353 0-63.413 30.677-63.991 63.019l-0.009 0.981-0.002 631.92-127.998 127.998zM832 896c34.353 0 63.413-28.717 63.991-62.961l0.009-1.039v-632.324l-184.324 184.324h56.324v64h-120.324l-63.998 64h184.322v64h-248.322l-64 64h312.322v64h-376.322l-192 192zM567.918 256l-64 64h-119.918v-64zM320 320h-64v-64h64zM439.918 384l-55.92 55.92 0.002-55.92zM320 448h-64v-64h64zM255.998 567.92l0.002-55.92h55.918z" />
195
195
  <glyph unicode="&#xe6b9;" glyph-name="post-cancel" d="M67.882 891.8l59.8-59.8 0.228 0.002 128.090-128.092v-0.228l63.68-63.68h0.228l64-64h-0.228l64-64h0.228l64-64h-0.228l64-64h0.23l128-128h-0.23l252.328-252.328-67.882-67.882-320.21 320.21-311.916-0.002-192-192v695.918l-64 64zM896 832c34.353 0 63.413-28.717 63.991-62.961l0.009-1.039v-448c0-34.353-28.717-63.413-62.961-63.991l-1.039-0.009-56.326 0.002-256.002 256 184.328-0.002v64l-248.328 0.002-64 64 312.328-0.002v64l-376.328 0.002-128 128zM439.916 384.002l-64 64-119.916-0.002v-64zM311.916 512.002l-55.916 55.916v-55.918z" />
196
+ <glyph unicode="&#xe6ba;" glyph-name="text-block" d="M896 543.95v-191.9c0-53.012-43.038-96.050-96.050-96.050h-575.9c-53.012 0-96.050 43.038-96.050 96.050v191.9c0 53.012 43.039 96.050 96.050 96.050h575.9c53.012 0 96.050-43.038 96.050-96.050zM256 384h512v128h-512zM128 768h768v128h-768zM128 0h768v128h-768z" />
196
197
  </font></defs></svg>
Binary file
Binary file
@@ -292,6 +292,7 @@ $sd-icon-font: (
292
292
  audio-cancel: "\e6b7",
293
293
  list-alt-cancel: "\e6b8",
294
294
  post-cancel: "\e6b9",
295
+ text-block: "\e6ba",
295
296
  );
296
297
 
297
298
  @each $name, $value in $sd-icon-font {
@@ -99,14 +99,14 @@ $board-header-border-color: var(--color-kanban-border);
99
99
  line-height: 1.4;
100
100
  text-transform: uppercase;
101
101
  font-weight: 400;
102
- color: $gray--400;
102
+ color: var(--sd-colour-bg--10);
103
103
  max-width: 10rem;
104
104
  &--l {
105
105
  max-width: 14rem;
106
106
  }
107
107
  strong {
108
108
  font-weight: 500;
109
- color: $gray--700;
109
+ color: var(--sd-colour-bg--07);
110
110
  font-size: 1.3rem;
111
111
  }
112
112
  }
@@ -217,6 +217,7 @@ $modal-sizes: (
217
217
  border-top: 1px solid $modal-line-color;
218
218
  text-align: end;
219
219
  min-height: $modal-footer-height;
220
+ display: flex;
220
221
  }
221
222
  }
222
223
  p {
@@ -69,6 +69,7 @@
69
69
  @import 'components/theme-selector';
70
70
  @import 'components/sd-dropzone';
71
71
  @import 'components/sd-notification-panel';
72
+ @import 'components/sd-pagination';
72
73
 
73
74
  // Dropdowns
74
75
  @import 'dropdowns/basic-dropdown';
@@ -0,0 +1,41 @@
1
+ .sd-pagination {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: var(--gap--small);
6
+ &--align-start {
7
+ justify-content: flex-start;
8
+ }
9
+ &--align-end {
10
+ justify-content: flex-end;
11
+ }
12
+ }
13
+ .sd-pagination__item {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ height: $sd-base-increment * 4;
18
+ min-width: $sd-base-increment * 4;
19
+ border-radius: var(--b-radius--full);
20
+ transition: all 0.2s ease;
21
+ border: 1px solid transparent;
22
+ &:hover {
23
+ border: 1px solid var(--sd-colour-interactive--alpha-30);
24
+ }
25
+ &:active {
26
+ background-color: var(--sd-colour-interactive--alpha-10);
27
+ border: 1px solid var(--sd-colour-interactive);
28
+ }
29
+ &--active {
30
+ background-color: var(--sd-colour-interactive--alpha-10);
31
+ color: var(--sd-colour-interactive);
32
+ }
33
+ &:disabled,
34
+ &--disabled {
35
+ opacity: 0.5;
36
+ pointer-events: none;
37
+ }
38
+ &--more {
39
+ pointer-events: none;
40
+ }
41
+ }
@@ -961,8 +961,8 @@ $planningEditor-width: 53rem;
961
961
  top: 0;
962
962
  bottom: 0;
963
963
  width: 0;
964
- background: $panel-bg--03;
965
- color: $sd-text;
964
+ background: var(--sd-colour-panel-bg--100);
965
+ color: var(--color-text);
966
966
  overflow: hidden;
967
967
  transition: all 0.1s ease-out;
968
968
  .side-panel {
@@ -971,23 +971,13 @@ $planningEditor-width: 53rem;
971
971
  transition-delay: 0;
972
972
  }
973
973
  &--left {
974
- box-shadow: 2px 0px 0px 0px rgba(102, 102, 102, 1), 2px 0px 12px 0px rgba(0, 0, 0, 0.3);
974
+ box-shadow: 2px 0px 0px 0px hsl(0, 0%, 40%), 2px 0px 12px 0px hsla(0, 0%, 0%, 0.3);
975
975
  left:0;
976
976
  }
977
977
  &--right {
978
- box-shadow: -2px 0px 0px 0px rgba(102, 102, 102, 1), -2px 0px 12px 0px rgba(0, 0, 0, 0.3);
978
+ box-shadow: -2px 0px 0px 0px hsl(0, 0%, 40%), -2px 0px 12px 0px hsla(0, 0%, 0%, 0.3);
979
979
  right:0;
980
980
  }
981
- &--dark-ui {
982
- background-color: $sd-background-darkUI;
983
- color: $white;
984
- &.sd-overlay-panel-2--left {
985
- box-shadow: 2px 0px 12px 0px rgba(0, 0, 0, 0.3);
986
- }
987
- &.sd-overlay-panel-2--right {
988
- box-shadow: -2px 0px 12px 0px rgba(0, 0, 0, 0.3);
989
- }
990
- }
991
981
  &--open {
992
982
  width:32.8rem;
993
983
  overflow: auto;
@@ -83,7 +83,7 @@ $sd-sideTabMenu-background: var(--sd-colour-sidebar-menu--20);
83
83
  }
84
84
 
85
85
 
86
- .authoring-active {
86
+ .authoring-active__item {
87
87
  .sd-sidebar-menu__btn--active {
88
88
  .sd-sidebar-menu__main-icon, .sd-sidebar-menu__helper-icon {
89
89
  color: #fff;
@@ -45,6 +45,18 @@
45
45
  }
46
46
 
47
47
  }
48
+ .datepicker-header-toolbar {
49
+ width: 100%;
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ margin-bottom: 16px;
54
+ gap: $sd-base-increment;
55
+
56
+ button {
57
+ flex: 1 1;
58
+ }
59
+ }
48
60
  }
49
61
 
50
62
  table {
@@ -168,6 +168,7 @@
168
168
 
169
169
  .p-dialog-maximized .p-dialog-content {
170
170
  flex-grow: 1;
171
+ width: 100%;
171
172
  }
172
173
 
173
174
  /* Position */
@@ -348,6 +349,9 @@
348
349
  &--l-padding {
349
350
  padding: $sd-base-increment * 4;
350
351
  }
352
+ }
353
+
354
+ .p-dialog-content-bg {
351
355
  &--default {
352
356
  background-color: transparent !important;
353
357
  }
@@ -2,30 +2,30 @@
2
2
  // -------------------------------------------------------------------------
3
3
 
4
4
  // Refernce Colours
5
- $ref-color-primary: hsla(198, 50%, 50%, 1);
6
- $ref-color-success: hsla(120, 40%, 50%, 1);
7
- $ref-color-alert: hsla(358, 79%, 50%, 1);
8
- $ref-color-warning: hsla(35, 100%, 50%, 1);
9
- $ref-color-highlight: hsla(291, 64%, 50%, 1);
10
- $ref-color-neutral: hsla(0, 0%, 50%, 1);
5
+ // $ref-color-primary: hsla(198, 50%, 50%, 1);
6
+ // $ref-color-success: hsla(120, 40%, 50%, 1);
7
+ // $ref-color-alert: hsla(358, 79%, 50%, 1);
8
+ // $ref-color-warning: hsla(35, 100%, 50%, 1);
9
+ // $ref-color-highlight: hsla(291, 64%, 50%, 1);
10
+ // $ref-color-neutral: hsla(0, 0%, 50%, 1);
11
11
 
12
12
  // Refernce Colours -- DARK BGs & Lines
13
- $ref-color-cool-grey--00: hsl(214, 13%, 12%);
14
- $ref-color-cool-grey--01: hsl(214, 13%, 16%);
15
- $ref-color-cool-grey--02: hsl(214, 13%, 20%);
16
- $ref-color-cool-grey--03: hsl(214, 13%, 25%);
17
- $ref-color-cool-grey--04: hsl(214, 13%, 30%);
13
+ // $ref-color-cool-grey--00: hsl(214, 13%, 12%);
14
+ // $ref-color-cool-grey--01: hsl(214, 13%, 16%);
15
+ // $ref-color-cool-grey--02: hsl(214, 13%, 20%);
16
+ // $ref-color-cool-grey--03: hsl(214, 13%, 25%);
17
+ // $ref-color-cool-grey--04: hsl(214, 13%, 30%);
18
18
 
19
19
  // Refernce Colours -- LIGHT BGs & Lines
20
- $ref-color-light-grey--00: hsl(214, 13%, 100%);
21
- $ref-color-light-grey--01: hsl(214, 13%, 96%);
22
- $ref-color-light-grey--02: hsl(214, 13%, 92%);
23
- $ref-color-light-grey--03: hsl(214, 13%, 85%);
24
- $ref-color-light-grey--04: hsl(214, 13%, 80%);
25
- $ref-color-light-grey--05: hsl(214, 13%, 75%);
26
- $ref-color-light-grey--06: hsl(214, 13%, 70%);
27
- $ref-color-light-grey--07: hsl(214, 13%, 65%);
28
- $ref-color-light-grey--08: hsl(214, 13%, 60%);
20
+ // $ref-color-light-grey--00: hsl(214, 13%, 100%);
21
+ // $ref-color-light-grey--01: hsl(214, 13%, 96%);
22
+ // $ref-color-light-grey--02: hsl(214, 13%, 92%);
23
+ // $ref-color-light-grey--03: hsl(214, 13%, 85%);
24
+ // $ref-color-light-grey--04: hsl(214, 13%, 80%);
25
+ // $ref-color-light-grey--05: hsl(214, 13%, 75%);
26
+ // $ref-color-light-grey--06: hsl(214, 13%, 70%);
27
+ // $ref-color-light-grey--07: hsl(214, 13%, 65%);
28
+ // $ref-color-light-grey--08: hsl(214, 13%, 60%);
29
29
 
30
30
  ///// ==============
31
31
 
@@ -93,17 +93,17 @@ $grayLighter: hsl(214, 13%, 96%);
93
93
  $white: hsl(214, 13%, 100%);
94
94
 
95
95
  // Greys
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%);
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);
@@ -116,12 +116,12 @@ $darkViolet: hsla(280, 100%, 34%, 1);
116
116
  $navy: hsla(240, 100%, 25%, 1);
117
117
 
118
118
  // Panel backgrounds
119
- $panel-bg--00: #fff;
120
- $panel-bg--01: #f8f8f8;
121
- $panel-bg--02: #f5f5f5;
122
- $panel-bg--03: #ededed;
123
- $panel-bg--04: #dedede;
124
- $panel-bg--05: #a1a1a1;
119
+ // $panel-bg--00: #fff;
120
+ // $panel-bg--01: #f8f8f8;
121
+ // $panel-bg--02: #f5f5f5;
122
+ // $panel-bg--03: #ededed;
123
+ // $panel-bg--04: #dedede;
124
+ // $panel-bg--05: #a1a1a1;
125
125
 
126
126
  // Text specific colors
127
127
  //Subnav colours
@@ -1,6 +1,6 @@
1
- <div class="flat-searchbar" ng-class="{extended: extended}">
1
+ <div class="flat-searchbar extended">
2
2
  <div class="search-handler" ng-class="{'search-handler--left-border': borderleft}">
3
- <label for="search-input" class="trigger-icon" ng-click="extended = !extended"><i class="icon-search"></i></label>
3
+ <label for="search-input" class="trigger-icon"><i class="icon-search"></i></label>
4
4
  <input id="search-input" type="text" placeholder="{{ :: label || 'Search' }}" ng-model="model" ng-model-options="{debounce: debounce}">
5
5
  <button class="search-close" ng-if="model.length" ng-click="clearInput()" ng-class="{visible: model.length}"><i class="icon-remove-sign"></i></button>
6
6
 
@@ -10,12 +10,11 @@ import { InputWrapper } from './Form';
10
10
  export type DatePickerLocaleSettings = Omit<LocaleSettings, 'today' | 'clear'>;
11
11
 
12
12
  interface IDatePickerBase {
13
- disabled?: boolean;
14
13
  dateFormat: string; // a combination of YYYY, MM, and DD with a custom separator e.g. 'MM/DD/YYYY'
15
14
 
16
15
  // shortcuts can be used to jump to a date relative to today
17
16
  // for example [{label: 'tomorrow', days: 1}, {label: 'yesterday', days: -1}]
18
- shortcuts?: Array<{days: number, label: string}>;
17
+ headerButtonBar?: Array<{days: number, label: string}>;
19
18
 
20
19
  // ability to provide localisation. for example (see https://primefaces.org/primereact/showcase/#/calendar):
21
20
  /*
@@ -34,6 +33,7 @@ interface IDatePickerBase {
34
33
  locale?: DatePickerLocaleSettings;
35
34
 
36
35
  // label props
36
+ disabled?: boolean;
37
37
  inlineLabel?: boolean;
38
38
  required?: boolean;
39
39
  fullWidth?: boolean;
@@ -180,23 +180,22 @@ export class DatePicker extends React.PureComponent<IDatePicker, IState> {
180
180
  dateFormat={this.props.dateFormat.replace('YYYY', 'yy').replace('MM', 'mm').replace('DD', 'dd')}
181
181
  showIcon={true}
182
182
  icon="icon-calendar"
183
- headerTemplate={() => this.props.shortcuts == null ? null : (
183
+ headerTemplate={() => this.props.headerButtonBar == null ? null : (
184
184
  <div
185
- style={{width: '100%', display: 'flex', justifyContent: 'space-between', marginBottom: 10}}>
186
- {this.props.shortcuts.map(({label, days}, i) => (
185
+ className="datepicker-header-toolbar">
186
+ {this.props.headerButtonBar.map(({label, days}, i) => (
187
187
  <button
188
188
  key={i}
189
- className="btn btn--hollow btn--small"
189
+ className="btn btn--small"
190
190
  onClick={() => {
191
191
  this.props.onChange(addDays(new Date(), days));
192
-
193
192
  if (this.instance != null && typeof this.instance.hideOverlay === 'function') {
194
193
  this.instance.hideOverlay();
195
194
  }
196
195
  }}>
197
196
  {label}
198
197
  </button>
199
- ))}
198
+ ))}
200
199
  </div>
201
200
  )}
202
201
  appendTo={document.body} // making it work inside `overflow:hidden`
@@ -234,7 +233,7 @@ export class DatePickerISO extends React.PureComponent<IDatePickerISO> {
234
233
  }
235
234
  }}
236
235
  disabled={this.props.disabled}
237
- shortcuts={this.props.shortcuts}
236
+ headerButtonBar={this.props.headerButtonBar}
238
237
  dateFormat={this.props.dateFormat}
239
238
  locale={this.props.locale}
240
239
  inlineLabel={this.props.inlineLabel}
@@ -23,6 +23,7 @@ interface IProps {
23
23
  ariaControls?: string;
24
24
  buttonAnimation?: 'spin' | 'squeeze' | 'none';
25
25
  editorFullWidth?: boolean;
26
+ openPanel?: boolean;
26
27
  }
27
28
 
28
29
  export class CoreLayout extends React.PureComponent<IProps> {
@@ -44,7 +45,7 @@ export class CoreLayout extends React.PureComponent<IProps> {
44
45
  {this.props.topMenu}
45
46
  </CoreLayoutTopMenu>
46
47
  )}
47
- <CoreLayoutMain editorFullWidth={this.props.editorFullWidth}>
48
+ <CoreLayoutMain editorFullWidth={this.props.editorFullWidth} openPanel={this.props.openPanel}>
48
49
  {this.props.children}
49
50
  </CoreLayoutMain>
50
51
  {this.props.footer && (
@@ -5,6 +5,7 @@ interface IProps {
5
5
  children?: React.ReactNode;
6
6
  id?: string;
7
7
  editorFullWidth?: boolean;
8
+ openPanel?: boolean;
8
9
  }
9
10
 
10
11
  export class CoreLayoutMain extends React.PureComponent<IProps> {
@@ -14,7 +15,9 @@ export class CoreLayoutMain extends React.PureComponent<IProps> {
14
15
  },
15
16
  );
16
17
  return (
17
- <section id={this.props.id} className={classes}>
18
+ <section
19
+ id={this.props.id}
20
+ className={classes + (this.props.openPanel ? ' sd-content-wrapper--editor-full' : '')}>
18
21
  {this.props.children}
19
22
  </section>
20
23
  );
@@ -20,9 +20,10 @@ class ContentListItem extends React.PureComponent<IPropsItem> {
20
20
  private prevent = false;
21
21
 
22
22
  onSingleClick = () => {
23
+ let selection = window.getSelection();
23
24
  this.timer = setTimeout(() => {
24
- if (!this.prevent) {
25
- if (this.props.onClick) {
25
+ if (!this.prevent && this.props.onClick && selection) {
26
+ if (selection.toString().length < 1) {
26
27
  this.props.onClick();
27
28
  }
28
29
  }
@@ -252,10 +252,15 @@ class TableListItem extends React.PureComponent<IPropsItem> {
252
252
  private prevent = false;
253
253
 
254
254
  onSingleClick = () => {
255
+ let selection = window.getSelection();
255
256
  this.timer = setTimeout(() => {
256
- if (!this.prevent) {
257
- if (this.props.onClick) {
257
+ if (!this.prevent && this.props.onClick && selection) {
258
+ if (this.props.dragAndDrop) {
258
259
  this.props.onClick();
260
+ } else {
261
+ if (selection.toString().length < 1) {
262
+ this.props.onClick();
263
+ }
259
264
  }
260
265
  }
261
266
  }, this.delay);
@@ -308,9 +313,11 @@ class TableListItem extends React.PureComponent<IPropsItem> {
308
313
  {this.props.end && this.props.end}
309
314
  </div>
310
315
  </div>
311
- {this.props.action && <div className='table-list__slide-in-actions' onClick={this.onActionMenuClick}>
312
- {this.props.action}
313
- </div>}
316
+ {this.props.action &&
317
+ <div className='table-list__slide-in-actions'
318
+ onClick={this.onActionMenuClick}>
319
+ {this.props.action}
320
+ </div>}
314
321
  </div>
315
322
  <div className='table-list__add-bar-container'>
316
323
  <Tooltip text='Add item' flow='top' appendToBody={true}>
@@ -349,9 +356,11 @@ class TableListItem extends React.PureComponent<IPropsItem> {
349
356
  {this.props.end && this.props.end}
350
357
  </div>
351
358
  </div>
352
- {this.props.action && <div className='table-list__slide-in-actions' onClick={this.onActionMenuClick}>
353
- {this.props.action}
354
- </div>}
359
+ {this.props.action &&
360
+ <div className='table-list__slide-in-actions'
361
+ onClick={this.onActionMenuClick}>
362
+ {this.props.action}
363
+ </div>}
355
364
  </div>
356
365
  );
357
366
  }
@@ -10,7 +10,9 @@ interface IProps {
10
10
  contentBg?: 'default' | 'medium' | 'dark';
11
11
  contentPadding?: 'none' | 'small' | 'medium' | 'large';
12
12
  size?: 'small' | 'medium' | 'large' | 'x-large';
13
+ position?: "center" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
13
14
  maximized?: boolean;
15
+ maximizable?: boolean;
14
16
  headerTemplate?: JSX.Element | string;
15
17
  footerTemplate?: JSX.Element | string;
16
18
  closeOnEscape?: boolean;
@@ -23,8 +25,8 @@ export class Modal extends React.Component<IProps, {}> {
23
25
  render() {
24
26
  let classes = classNames({
25
27
  [`p-dialog-content--${this.props.size}`]: this.props.size,
26
- 'p-dialog-content--default': this.props.contentBg === undefined,
27
- [`p-dialog-content--${this.props.contentBg}`]: this.props.contentBg,
28
+ 'p-dialog-content-bg--default': this.props.contentBg === undefined,
29
+ [`p-dialog-content-bg--${this.props.contentBg}`]: this.props.contentBg,
28
30
  'p-dialog-content--s-padding': this.props.contentPadding === undefined,
29
31
  [`p-dialog-content--${this.props.contentPadding}`]: this.props.contentPadding,
30
32
  }, this.props.className);
@@ -38,10 +40,12 @@ export class Modal extends React.Component<IProps, {}> {
38
40
  footer={this.props.footerTemplate}
39
41
  closeOnEscape={this.props.closeOnEscape}
40
42
  maximized={this.props.maximized}
43
+ maximizable={this.props.maximizable}
41
44
  contentClassName={classes}
42
45
  onShow={this.props.onShow}
43
46
  onHide={this.props.onHide}
44
47
  zIndex={this.props.zIndex}
48
+ position={this.props.position && this.props.position}
45
49
  >
46
50
  {this.props.children}
47
51
  </PrimeDialog>
@@ -4,6 +4,8 @@ import { Icon } from '../Icon';
4
4
  interface IProps {
5
5
  items: Array<IItem | 'divider'>;
6
6
  side?: 'none' | 'left' | 'right';
7
+ hover?: boolean;
8
+ onCLick?(): void;
7
9
  }
8
10
 
9
11
  interface IItem {
@@ -11,11 +13,14 @@ interface IItem {
11
13
  size: 'small' | 'big'; // defaults to 'small'
12
14
  tooltip?: string;
13
15
  active?: boolean;
16
+ hover?: boolean;
17
+ onCLick?(): void;
14
18
  }
15
19
 
16
20
  interface IState {
17
21
  index: number;
18
22
  closeIndex: number;
23
+ hover: boolean;
19
24
  }
20
25
 
21
26
  export class SideBarMenu extends React.PureComponent<IProps, IState> {
@@ -24,8 +29,10 @@ export class SideBarMenu extends React.PureComponent<IProps, IState> {
24
29
  this.state = {
25
30
  index: -1,
26
31
  closeIndex: -1,
32
+ hover: this.props.hover ? this.props.hover : false,
27
33
  };
28
34
  this.handleClick = this.handleClick.bind(this);
35
+ this.handleArrows = this.handleArrows.bind(this);
29
36
  }
30
37
 
31
38
  handleClick(indexNumber: number) {
@@ -39,10 +46,16 @@ export class SideBarMenu extends React.PureComponent<IProps, IState> {
39
46
  }
40
47
  }
41
48
 
49
+ handleArrows() {
50
+ this.setState({
51
+ hover: !this.state.hover,
52
+ });
53
+ }
54
+
42
55
  render() {
43
56
  return (
44
57
  <div className='sd-sidebar-menu sd-content-wrapper__left-tabs'>
45
- <ul className='authoring-active'>
58
+ <ul className={'authoring-active'}>
46
59
  {this.props.items.map((item, index) => {
47
60
  if (item === 'divider') {
48
61
  return (
@@ -50,9 +63,22 @@ export class SideBarMenu extends React.PureComponent<IProps, IState> {
50
63
  );
51
64
  } else {
52
65
  return (
53
- <li key={index} data-sd-tooltip={item['tooltip']} data-flow='right'>
54
- <a className={'sd-sidebar-menu__btn' + (index === this.state.closeIndex ? ' sd-sidebar-menu__btn--closed ' : '') + (item['active'] ? ' sd-sidebar-menu__btn--active' : (index === this.state.index ? ' sd-sidebar-menu__btn--active' : ''))}
55
- onClick={() => this.handleClick(index)}>
66
+ <li key={index}
67
+ data-sd-tooltip={item['tooltip']}
68
+ data-flow='right'
69
+ className={item.hover ? 'authoring-active__item' : ''}>
70
+ <a className={'sd-sidebar-menu__btn'
71
+ + (this.state.hover ? ' sd-sidebar-menu__btn--closed ' : '')
72
+ + (item['active'] ? ' sd-sidebar-menu__btn--active' : (index === this.state.index ? ' sd-sidebar-menu__btn--active' : ''))}
73
+ onClick={() => {
74
+ this.handleClick(index);
75
+ if (item.hover) {
76
+ this.handleArrows();
77
+ if (item.onCLick) {
78
+ item.onCLick();
79
+ }
80
+ }
81
+ }}>
56
82
  <span className='sd-sidebar-menu__main-icon '>
57
83
  <Icon size={item['size']} name={item['icon']} />
58
84
  </span>
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ type?: 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'sd-green';
4
+ style?: 'filled' | 'hollow';
5
+ size?: 'normal' | 'small';
6
+ restoreIcon?: 'info' | 'help';
7
+ }
8
+ interface IState {
9
+ open: boolean;
10
+ }
11
+ export declare class Alert extends React.PureComponent<IProps, IState> {
12
+ constructor(props: IProps);
13
+ onToggle(): void;
14
+ render(): JSX.Element;
15
+ }
16
+ export {};
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ interface IProps {
3
+ items: Array<any>;
4
+ keyValue?: string;
5
+ minLength?: number;
6
+ value?: string | object;
7
+ label?: string;
8
+ placeholder?: string;
9
+ info?: string;
10
+ error?: string;
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ invalid?: boolean;
14
+ inlineLabel?: boolean;
15
+ isSearchField?: boolean;
16
+ listItemTemplate?(value: any): any;
17
+ search?(searhString: string, callback: (result: Array<any>) => void): {
18
+ cancel: () => void;
19
+ };
20
+ onChange(newValue: string): void;
21
+ onSelect?(suggestion: string): void;
22
+ }
23
+ interface IState {
24
+ selectedItem: any;
25
+ filteredItems: any;
26
+ invalid: boolean;
27
+ focused: boolean;
28
+ }
29
+ export declare class Autocomplete extends React.Component<IProps, IState> {
30
+ latestCall?: {
31
+ cancel: () => void;
32
+ };
33
+ constructor(props: IProps);
34
+ htmlId: string;
35
+ search(term: string): void;
36
+ searchItem(event: any): void;
37
+ handleChange(event: {
38
+ originalEvent: Event;
39
+ value: any;
40
+ }): void;
41
+ handleSelect(event: {
42
+ originalEvent: Event;
43
+ value: any;
44
+ }): void;
45
+ handleInputClear(): void;
46
+ render(): JSX.Element;
47
+ }
48
+ export {};