superdesk-ui-framework 3.0.1-beta.28 → 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/styles/_big-icon-font.scss +1 -1
- package/app/styles/_labels.scss +0 -1
- package/app/styles/_simple-list.scss +0 -3
- package/app/styles/components/_sd-media-carousel.scss +37 -2
- package/app/styles/components/_subnav.scss +470 -470
- package/app/styles/design-tokens/_new-colors.scss +19 -7
- package/app/styles/primereact/_pr-datepicker.scss +4 -2
- package/app/styles/variables/_colors.scss +21 -21
- package/app-typescript/components/Lists/TableList.tsx +46 -41
- package/app-typescript/components/NavButton.tsx +2 -1
- package/dist/examples.bundle.css +62 -62
- package/dist/examples.bundle.js +20 -4
- package/dist/react/NavButtons.tsx +31 -1
- package/dist/superdesk-ui.bundle.css +210 -167
- package/dist/superdesk-ui.bundle.js +6 -2
- package/examples/css/docs-page.css +4 -4
- package/examples/pages/react/NavButtons.tsx +31 -1
- package/package.json +1 -1
- package/react/components/Lists/TableList.d.ts +1 -0
- package/react/components/Lists/TableList.js +6 -2
- package/react/components/NavButton.d.ts +1 -1
- 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/yarn-error.log +0 -111
@@ -564,7 +564,7 @@
|
|
564
564
|
|
565
565
|
|
566
566
|
--color-text: hsla(214, 13%, 20%, 1);
|
567
|
-
--color-text--inverse: hsla(
|
567
|
+
--color-text--inverse: hsla(214, 13%, 98%, 1);
|
568
568
|
--color-text-light: hsla(214, 13%, 40%, 1);
|
569
569
|
--color-text-lighter: hsla(214, 13%, 60%, 1);
|
570
570
|
--color-icon-default: hsla(214, 13%, 30%, 1);
|
@@ -615,14 +615,20 @@
|
|
615
615
|
--color-border-line--medium: hsla(0, 0%, 80%, 1);
|
616
616
|
|
617
617
|
// SubNav & Nav Buttons
|
618
|
-
--color-subnav-bg--00: hsla(
|
619
|
-
--color-subnav-bg--10: hsla(
|
618
|
+
--color-subnav-bg--00: hsla(214, 13%, 96%, 1);
|
619
|
+
--color-subnav-bg--10: hsla(214, 13%, 87%, 1);
|
620
620
|
--color-subnav-bg--blueGrey-00: hsla(200, 34%, 30%, 1);
|
621
621
|
--color-subnav-bg--blueGrey-10: hsla(200, 34%, 24%, 1);
|
622
|
-
--color-navbutton-bg-hover: hsla(
|
623
|
-
--color-navbutton-bg-active: hsla(
|
624
|
-
|
625
|
-
--color-navbutton-bg-100
|
622
|
+
--color-navbutton-bg-hover: hsla(214, 13%, 10%, 0.05);
|
623
|
+
--color-navbutton-bg-active: hsla(214, 13%, 100%, 1);
|
624
|
+
|
625
|
+
--color-navbutton-bg-100: hsla(214, 13%, 10%, 0.06);
|
626
|
+
--color-navbutton-bg-100-hover: hsla(214, 13%, 10%, 0.12);
|
627
|
+
|
628
|
+
--color-navbutton-bg-dark: hsla(214, 13%, 55%, 1);
|
629
|
+
--color-navbutton-bg-dark-hover: hsla(214, 13%, 60%, 1);
|
630
|
+
|
631
|
+
--color-navbutton-shadow-active: hsla(214, 13%, 5%, 0.12);
|
626
632
|
}
|
627
633
|
|
628
634
|
// CSS variables for dark theme
|
@@ -692,8 +698,14 @@
|
|
692
698
|
|
693
699
|
--color-navbutton-bg-hover: hsla(0, 0%, 0%, 0.1);
|
694
700
|
--color-navbutton-bg-active: hsla(0, 0%, 100%, 0.08);
|
701
|
+
|
695
702
|
--color-navbutton-bg-100: hsla(0, 0%, 0%, 0.1);
|
696
703
|
--color-navbutton-bg-100-hover: hsla(0, 0%, 0%, 0.2);
|
704
|
+
|
705
|
+
--color-navbutton-bg-dark: hsla(214, 13%, 30%, 1);
|
706
|
+
--color-navbutton-bg-dark-hover: hsla(214, 13%, 35%, 1);
|
707
|
+
|
708
|
+
--color-navbutton-shadow-active: hsla(214, 13%, 96%, 0.12);
|
697
709
|
|
698
710
|
[class^="big-icon--"],
|
699
711
|
[class*=" big-icon--"] {
|
@@ -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
|
}
|
@@ -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);
|
@@ -15,7 +15,7 @@ export interface IProps {
|
|
15
15
|
showDragHandle?: 'always' | 'onHover' | 'none'; // always default
|
16
16
|
append?: boolean;
|
17
17
|
onDrag?(start: number, end: number): void;
|
18
|
-
onAddItem?(index: number, item?: IPropsArrayItem
|
18
|
+
onAddItem?(index: number, item?: IPropsArrayItem): void;
|
19
19
|
itemsDropdown?(index?: number): Array<IMenuItem | ISubmenu | IMenuGroup | 'divider'>;
|
20
20
|
}
|
21
21
|
|
@@ -126,46 +126,46 @@ class TableList extends React.PureComponent<IProps, IState> {
|
|
126
126
|
<Draggable key={index} draggableId={`${index}`} index={index}>
|
127
127
|
{(provided2, snapshot) => (
|
128
128
|
this.props.append
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
dragAndDrop={this.props.dragAndDrop}
|
135
|
-
showDragHandle={this.props.showDragHandle}
|
136
|
-
addItem={this.props.addItem}
|
137
|
-
onAddItem={() => this.props.onAddItem
|
138
|
-
&& this.props.onAddItem(index, item)}
|
139
|
-
itemsDropdown={() => this.props.itemsDropdown
|
140
|
-
? this.props.itemsDropdown(index)
|
141
|
-
: []}
|
142
|
-
/>
|
143
|
-
: <div
|
144
|
-
ref={provided2.innerRef}
|
145
|
-
{...provided2.draggableProps}
|
146
|
-
{...provided2.dragHandleProps} >
|
147
|
-
<TableListItem
|
129
|
+
? <PortalItem
|
130
|
+
provided={provided2}
|
131
|
+
snapshot={snapshot}
|
132
|
+
item={item}
|
133
|
+
index={index}
|
148
134
|
dragAndDrop={this.props.dragAndDrop}
|
149
|
-
|
150
|
-
center={item.center}
|
151
|
-
end={item.end}
|
152
|
-
action={item.action}
|
153
|
-
onClick={item.onClick ? item.onClick : undefined}
|
154
|
-
onDoubleClick={item.onDoubleClick
|
155
|
-
? item.onDoubleClick
|
156
|
-
: undefined}
|
135
|
+
showDragHandle={this.props.showDragHandle}
|
157
136
|
addItem={this.props.addItem}
|
137
|
+
onAddItem={() => this.props.onAddItem
|
138
|
+
&& this.props.onAddItem(index, item)}
|
158
139
|
itemsDropdown={() => this.props.itemsDropdown
|
159
140
|
? this.props.itemsDropdown(index)
|
160
141
|
: []}
|
161
|
-
hexColor={item.hexColor}
|
162
|
-
locked={item.locked}
|
163
|
-
positionLocked={item.positionLocked}
|
164
|
-
onAddItem={() => this.props.onAddItem
|
165
|
-
&& this.props.onAddItem(index, item)}
|
166
|
-
showDragHandle={this.props.showDragHandle}
|
167
142
|
/>
|
168
|
-
|
143
|
+
: <div
|
144
|
+
ref={provided2.innerRef}
|
145
|
+
{...provided2.draggableProps}
|
146
|
+
{...provided2.dragHandleProps} >
|
147
|
+
<TableListItem
|
148
|
+
dragAndDrop={this.props.dragAndDrop}
|
149
|
+
start={item.start}
|
150
|
+
center={item.center}
|
151
|
+
end={item.end}
|
152
|
+
action={item.action}
|
153
|
+
onClick={item.onClick ? item.onClick : undefined}
|
154
|
+
onDoubleClick={item.onDoubleClick
|
155
|
+
? item.onDoubleClick
|
156
|
+
: undefined}
|
157
|
+
addItem={this.props.addItem}
|
158
|
+
itemsDropdown={() => this.props.itemsDropdown
|
159
|
+
? this.props.itemsDropdown(index)
|
160
|
+
: []}
|
161
|
+
hexColor={item.hexColor}
|
162
|
+
locked={item.locked}
|
163
|
+
positionLocked={item.positionLocked}
|
164
|
+
onAddItem={() => this.props.onAddItem
|
165
|
+
&& this.props.onAddItem(index, item)}
|
166
|
+
showDragHandle={this.props.showDragHandle}
|
167
|
+
/>
|
168
|
+
</div>
|
169
169
|
)}
|
170
170
|
</Draggable>
|
171
171
|
))}
|
@@ -223,7 +223,7 @@ class TableList extends React.PureComponent<IProps, IState> {
|
|
223
223
|
</Tooltip>
|
224
224
|
</div>
|
225
225
|
</div>
|
226
|
-
|
226
|
+
: null
|
227
227
|
);
|
228
228
|
}
|
229
229
|
}
|
@@ -272,6 +272,11 @@ class TableListItem extends React.PureComponent<IPropsItem> {
|
|
272
272
|
}, this.delay);
|
273
273
|
}
|
274
274
|
|
275
|
+
onActionMenuClick = (event: React.MouseEvent<HTMLElement>) => {
|
276
|
+
event.preventDefault();
|
277
|
+
event.stopPropagation();
|
278
|
+
}
|
279
|
+
|
275
280
|
render() {
|
276
281
|
|
277
282
|
let classes = classNames('table-list__item', {
|
@@ -291,7 +296,7 @@ class TableListItem extends React.PureComponent<IPropsItem> {
|
|
291
296
|
onClick={() => this.onSingleClick()}
|
292
297
|
onDoubleClick={() => this.onDoubleClick()}
|
293
298
|
className={classes}>
|
294
|
-
<div className='table-list__item-border' style={{backgroundColor: this.props.hexColor}}></div>
|
299
|
+
<div className='table-list__item-border' style={{ backgroundColor: this.props.hexColor }}></div>
|
295
300
|
<div className='table-list__item-content'>
|
296
301
|
<div className='table-list__item-content-block'>
|
297
302
|
{this.props.start && this.props.start}
|
@@ -303,7 +308,7 @@ class TableListItem extends React.PureComponent<IPropsItem> {
|
|
303
308
|
{this.props.end && this.props.end}
|
304
309
|
</div>
|
305
310
|
</div>
|
306
|
-
{this.props.action && <div className='table-list__slide-in-actions'>
|
311
|
+
{this.props.action && <div className='table-list__slide-in-actions' onClick={this.onActionMenuClick}>
|
307
312
|
{this.props.action}
|
308
313
|
</div>}
|
309
314
|
</div>
|
@@ -320,7 +325,7 @@ class TableListItem extends React.PureComponent<IPropsItem> {
|
|
320
325
|
size="small"
|
321
326
|
shape="round"
|
322
327
|
iconOnly={true}
|
323
|
-
onClick={() => false
|
328
|
+
onClick={() => false}
|
324
329
|
/>
|
325
330
|
</Dropdown>
|
326
331
|
</div>
|
@@ -332,7 +337,7 @@ class TableListItem extends React.PureComponent<IPropsItem> {
|
|
332
337
|
className={`${classes} table-list__item--margin`}
|
333
338
|
onClick={() => this.onSingleClick()}
|
334
339
|
onDoubleClick={() => this.onDoubleClick()}>
|
335
|
-
<div className='table-list__item-border' style={{backgroundColor: this.props.hexColor}}></div>
|
340
|
+
<div className='table-list__item-border' style={{ backgroundColor: this.props.hexColor }}></div>
|
336
341
|
<div className='table-list__item-content'>
|
337
342
|
<div className='table-list__item-content-block'>
|
338
343
|
{this.props.start && this.props.start}
|
@@ -344,7 +349,7 @@ class TableListItem extends React.PureComponent<IPropsItem> {
|
|
344
349
|
{this.props.end && this.props.end}
|
345
350
|
</div>
|
346
351
|
</div>
|
347
|
-
{this.props.action && <div className='table-list__slide-in-actions'>
|
352
|
+
{this.props.action && <div className='table-list__slide-in-actions' onClick={this.onActionMenuClick}>
|
348
353
|
{this.props.action}
|
349
354
|
</div>}
|
350
355
|
</div>
|
@@ -8,12 +8,13 @@ interface IProps {
|
|
8
8
|
text?: string;
|
9
9
|
iconSize?: 'small' | 'big'; // defaults to 'small'
|
10
10
|
theme?: 'light' | 'dark'; // defaults to 'light'
|
11
|
-
type?: 'default' | 'primary' | 'highlight' | 'darker';
|
11
|
+
type?: 'default' | 'primary' | 'highlight' | 'darker' | 'dark';
|
12
12
|
state?: 'normal' | 'active'; // defaults to 'normal'
|
13
13
|
value?: 'button' | 'submit' | 'reset'; // defaults to 'button'
|
14
14
|
onClick(): void;
|
15
15
|
badgeValue?: string;
|
16
16
|
}
|
17
|
+
|
17
18
|
export class NavButton extends React.PureComponent<IProps> {
|
18
19
|
render() {
|
19
20
|
let classes = classNames('sd-navbtn', {
|