superdesk-ui-framework 3.0.1-beta.5 → 3.0.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/styles/components/_sd-searchbar.scss +7 -0
- package/app/styles/form-elements/_inputs.scss +12 -0
- package/app/styles/primereact/_pr-dropdown.scss +17 -1
- package/app-typescript/components/DurationInput.tsx +52 -5
- package/app-typescript/components/Input.tsx +1 -1
- package/app-typescript/components/Lists/TableList.tsx +146 -142
- package/app-typescript/components/SearchBar.tsx +28 -9
- package/app-typescript/index.ts +2 -0
- package/dist/examples.bundle.js +28752 -28681
- package/dist/react/MultiSelect.tsx +1 -1
- package/dist/react/TableList.tsx +84 -82
- package/dist/superdesk-ui.bundle.css +51 -6
- package/dist/superdesk-ui.bundle.js +14337 -2518
- package/dist/vendor.bundle.js +23 -23
- package/examples/pages/react/MultiSelect.tsx +1 -1
- package/examples/pages/react/TableList.tsx +84 -82
- package/package.json +2 -1
- package/react/components/DurationInput.d.ts +2 -1
- package/react/components/DurationInput.js +51 -5
- package/react/components/Input.js +1 -1
- package/react/components/Lists/TableList.d.ts +42 -0
- package/react/components/Lists/TableList.js +145 -0
- package/react/components/SearchBar.d.ts +2 -1
- package/react/components/SearchBar.js +18 -2
- package/react/index.d.ts +2 -0
- package/react/index.js +7 -2
@@ -184,7 +184,7 @@ export class MultiselectDocs extends React.Component<{}, IState> {
|
|
184
184
|
<Prop name='filter' isRequired={false} type='boolean' default='false' description='When specified, displays an input field to filter the items on keyup.'/>
|
185
185
|
<Prop name='filterPlaceholder' isRequired={false} type='string' default='/' description='Placeholder text to show when filter input is empty.'/>
|
186
186
|
<Prop name='emptyFilterMessage' isRequired={false} type='string' default='No results found' description='Template to display when filtering does not return any results.'/>
|
187
|
-
<Prop name='maxSelectedLabels' isRequired={false} type='number' default='/' description='Decides how many selected item labels to show at most.'/>
|
187
|
+
<Prop name='maxSelectedLabels' isRequired={false} type='number' default='/' description='Decides how many selected item labels to show at most. Its necessary to use selectedItemTemplate.'/>
|
188
188
|
<Prop name='selectedItemsLabel' isRequired={false} type='string' default='{0} items selected' description='Label to display after exceeding max selected labels.'/>
|
189
189
|
<Prop name='ariaLabelledBy' isRequired={false} type='string' default='/' description='Establishes relationships between the component and label(s) where its value should be one or more element IDs.'/>
|
190
190
|
<Prop name='tabIndex' isRequired={false} type='string' default="'0'" description='Index of the element in tabbing order.'/>
|
package/dist/react/TableList.tsx
CHANGED
@@ -14,40 +14,40 @@ interface IProps {
|
|
14
14
|
export default class TableListDoc extends React.Component<IProps, IState> {
|
15
15
|
constructor(props: IState) {
|
16
16
|
super(props);
|
17
|
-
this.state={
|
17
|
+
this.state = {
|
18
18
|
array: [
|
19
19
|
{
|
20
20
|
start: <>
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
<Label style='translucent' text='aacc' />
|
22
|
+
<Label style='translucent' type='primary' text='prlg' />
|
23
|
+
</>,
|
24
24
|
center: <span>Item 1</span>,
|
25
25
|
end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
|
26
|
-
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
|
26
|
+
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />,
|
27
27
|
onClick: () => {
|
28
28
|
return false;
|
29
29
|
}
|
30
30
|
},
|
31
31
|
{
|
32
32
|
start: <>
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
<Label style='translucent' text='aacc' />
|
34
|
+
<Label style='translucent' type='primary' text='prlg' />
|
35
|
+
</>,
|
36
36
|
center: <span>Item 2</span>,
|
37
37
|
end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
|
38
|
-
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
|
38
|
+
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />,
|
39
39
|
onClick: () => {
|
40
40
|
return false;
|
41
41
|
}
|
42
42
|
},
|
43
43
|
{
|
44
44
|
start: <>
|
45
|
-
|
46
|
-
|
47
|
-
|
45
|
+
<Label style='translucent' text='aacc' />
|
46
|
+
<Label style='translucent' type='primary' text='prlg' />
|
47
|
+
</>,
|
48
48
|
center: <span>Item 3</span>,
|
49
49
|
end: <IconLabel style='translucent' text='Label success' type='success' icon='time' />,
|
50
|
-
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={()=> false} />,
|
50
|
+
action: <IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />,
|
51
51
|
onClick: () => {
|
52
52
|
return false;
|
53
53
|
}
|
@@ -61,7 +61,7 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
61
61
|
return (
|
62
62
|
<section className='docs-page__container'>
|
63
63
|
<h2 className='docs-page__h2'>TableList</h2>
|
64
|
-
|
64
|
+
|
65
65
|
<Markup.ReactMarkupCodePreview>{`
|
66
66
|
<TableList
|
67
67
|
dragAndDrop
|
@@ -82,50 +82,50 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
82
82
|
|
83
83
|
<TableList>
|
84
84
|
<TableListItem
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
85
|
+
start={
|
86
|
+
<>
|
87
|
+
<Label style='translucent' text='aacc' />
|
88
|
+
<Label style='translucent' type='primary' text='prlg' />
|
89
|
+
</>
|
90
|
+
}
|
91
|
+
center={
|
92
|
+
<span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
|
93
|
+
}
|
94
|
+
end={
|
95
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
96
|
+
}
|
97
|
+
action={
|
98
|
+
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />
|
99
|
+
} />
|
100
100
|
<TableListItem
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
101
|
+
start={
|
102
|
+
<>
|
103
|
+
<Label style='hollow' text='aacc' />
|
104
|
+
<Label style='filled' type='primary' text='prlg' />
|
105
|
+
</>
|
106
|
+
}
|
107
|
+
center={
|
108
|
+
<span>Nullam id dolor id nibh ultricies vehicula ut id elit.</span>
|
109
|
+
}
|
110
|
+
end={
|
111
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
112
|
+
} />
|
113
113
|
<TableListItem
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
114
|
+
start={
|
115
|
+
<>
|
116
|
+
<Label style='translucent' text='aacc' />
|
117
|
+
<Label style='translucent' type='primary' text='prlg' />
|
118
|
+
</>
|
119
|
+
}
|
120
|
+
center={
|
121
|
+
<span>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</span>
|
122
|
+
}
|
123
|
+
end={
|
124
|
+
<IconLabel style='translucent' text='Label success' type='success' icon='time' />
|
125
|
+
}
|
126
|
+
action={
|
127
|
+
<IconButton icon='dots-vertical' size='small' ariaValue='More actions' onClick={() => false} />
|
128
|
+
} />
|
129
129
|
</TableList>
|
130
130
|
|
131
131
|
</Markup.ReactMarkupPreview>
|
@@ -183,17 +183,18 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
183
183
|
<p className="docs-page__paragraph">With drag and drop functionality:</p>
|
184
184
|
<Markup.ReactMarkup>
|
185
185
|
<Markup.ReactMarkupPreview>
|
186
|
-
|
186
|
+
|
187
187
|
<TableList
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
188
|
+
dragAndDrop
|
189
|
+
addItem
|
190
|
+
array={this.state.array}
|
191
|
+
itemsDropdown={[
|
192
|
+
{ label: <Label style='translucent' type='primary' text='aacc' />, onSelect: () => 1 },
|
193
|
+
{ label: <Label style='translucent' text='prlg' />, onSelect: () => 1 },
|
194
|
+
{ label: <Label style='translucent' type='primary' text='prlg' />, onSelect: () => 1 },
|
195
|
+
]}
|
196
|
+
onClick={() => false}
|
197
|
+
onDrag={(start, end) => console.log(start, end)}
|
197
198
|
/>
|
198
199
|
|
199
200
|
</Markup.ReactMarkupPreview>
|
@@ -216,28 +217,29 @@ export default class TableListDoc extends React.Component<IProps, IState> {
|
|
216
217
|
<h3 className="docs-page__h3">Props</h3>
|
217
218
|
<p className="docs-page__paragraph">TableList</p>
|
218
219
|
<PropsList>
|
219
|
-
<Prop name='array' isRequired={false} type='Array' default='false' description='Array of object.'/>
|
220
|
-
<Prop name='children' isRequired={false} type='React.ReactNode' default='false' description='Children of component.'/>
|
221
|
-
<Prop name='addItem' isRequired={false} type='boolean' default='false' description='Functionality to add items to the list.'/>
|
222
|
-
<Prop name='dragAndDrop' isRequired={false} type='boolean' default='false' description='Drag&Drop functionality.'/>
|
223
|
-
<Prop name='itemsDropdown' isRequired={false} type='React.ReactNode | any' default='false' description='Dropdown for functionality to add items to the list.'/>
|
224
|
-
<Prop name='className' isRequired={false} type='string' default='false' description='Add class on TableList container.'/>
|
225
|
-
<Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.'/>
|
220
|
+
<Prop name='array' isRequired={false} type='Array' default='false' description='Array of object.' />
|
221
|
+
<Prop name='children' isRequired={false} type='React.ReactNode' default='false' description='Children of component.' />
|
222
|
+
<Prop name='addItem' isRequired={false} type='boolean' default='false' description='Functionality to add items to the list.' />
|
223
|
+
<Prop name='dragAndDrop' isRequired={false} type='boolean' default='false' description='Drag&Drop functionality.' />
|
224
|
+
<Prop name='itemsDropdown' isRequired={false} type='React.ReactNode | any' default='false' description='Dropdown for functionality to add items to the list.' />
|
225
|
+
<Prop name='className' isRequired={false} type='string' default='false' description='Add class on TableList container.' />
|
226
|
+
<Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.' />
|
227
|
+
<Prop name='onDrag' isRequired={false} type='function' default='false' description='Returns start and end position of draggable item' />
|
226
228
|
</PropsList>
|
227
229
|
<p className="docs-page__paragraph">array:</p>
|
228
230
|
<PropsList>
|
229
|
-
<Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
230
|
-
<Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
231
|
-
<Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
232
|
-
<Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.'/>
|
231
|
+
<Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
|
232
|
+
<Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
|
233
|
+
<Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
|
234
|
+
<Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.' />
|
233
235
|
</PropsList>
|
234
236
|
<p className="docs-page__paragraph">TableListItem</p>
|
235
237
|
<PropsList>
|
236
|
-
<Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
237
|
-
<Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
238
|
-
<Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.'/>
|
239
|
-
<Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.'/>
|
240
|
-
<Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.'/>
|
238
|
+
<Prop name='start' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
|
239
|
+
<Prop name='center' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
|
240
|
+
<Prop name='end' isRequired={false} type='React.ReactNode' default='false' description='Column of individual items of list.' />
|
241
|
+
<Prop name='action' isRequired={false} type='React.ReactNode' default='false' description='Column of individual list items that is displayed on hover.' />
|
242
|
+
<Prop name='onClick' isRequired={false} type='function' default='false' description='onClick functionality.' />
|
241
243
|
</PropsList>
|
242
244
|
|
243
245
|
</section>
|
@@ -40367,6 +40367,12 @@ a.text-link {
|
|
40367
40367
|
.sd-searchbar__search-btn:active i {
|
40368
40368
|
color: #fff; }
|
40369
40369
|
|
40370
|
+
.sd-searchbar__search-btn--active {
|
40371
|
+
background-color: var(--sd-colour-interactive);
|
40372
|
+
opacity: 1; }
|
40373
|
+
.sd-searchbar__search-btn--active i {
|
40374
|
+
color: #fff; }
|
40375
|
+
|
40370
40376
|
[dir="rtl"] .sd-searchbar__search-btn i.icon-chevron-right-thin {
|
40371
40377
|
transform: rotate(180deg); }
|
40372
40378
|
|
@@ -46437,7 +46443,9 @@ a.text-link {
|
|
46437
46443
|
color: var(--color-text);
|
46438
46444
|
text-align: end;
|
46439
46445
|
width: 2.5ch;
|
46440
|
-
font-size: 1.4rem;
|
46446
|
+
font-size: 1.4rem;
|
46447
|
+
padding: 0 !important;
|
46448
|
+
line-height: 3.2rem; }
|
46441
46449
|
.sd-input__duration-input input::-webkit-outer-spin-button, .sd-input__duration-input input::-webkit-inner-spin-button {
|
46442
46450
|
-webkit-appearance: none;
|
46443
46451
|
margin: 0; }
|
@@ -46485,6 +46493,13 @@ a.text-link {
|
|
46485
46493
|
.sd-input.sd-input--disabled .p-calendar .p-calendar-icon, .sd-input.sd-input--disabled:hover .p-calendar .p-calendar-icon {
|
46486
46494
|
pointer-events: none; }
|
46487
46495
|
|
46496
|
+
.blink_me {
|
46497
|
+
animation: blinker 1s linear infinite; }
|
46498
|
+
|
46499
|
+
@keyframes blinker {
|
46500
|
+
50% {
|
46501
|
+
opacity: 0; } }
|
46502
|
+
|
46488
46503
|
.sd-toggle, .sd-switch {
|
46489
46504
|
display: inline-block;
|
46490
46505
|
flex-shrink: 0;
|
@@ -58577,7 +58592,7 @@ i.sd-sidetab-menu__helper-icon {
|
|
58577
58592
|
background-color: var(--sd-colour-interactive--hover);
|
58578
58593
|
box-shadow: inset 0 2px 0 0 rgba(0, 0, 0, 0.2); }
|
58579
58594
|
|
58580
|
-
.p-dropdown
|
58595
|
+
.p-dropdown {
|
58581
58596
|
display: inline-flex;
|
58582
58597
|
align-items: center;
|
58583
58598
|
height: 3.2rem;
|
@@ -58592,10 +58607,32 @@ i.sd-sidetab-menu__helper-icon {
|
|
58592
58607
|
padding-inline-start: 8px;
|
58593
58608
|
padding-inline-end: 8px;
|
58594
58609
|
color: var(--color-text); }
|
58595
|
-
.p-dropdown:hover
|
58610
|
+
.p-dropdown:hover {
|
58596
58611
|
background-color: var(--color-input-bg--hover);
|
58597
58612
|
border-color: var(--color-input-border-hover); }
|
58598
|
-
.p-dropdown:focus, .p-dropdown:focus-within, .p-dropdown.p-focus
|
58613
|
+
.p-dropdown:focus, .p-dropdown:focus-within, .p-dropdown.p-focus {
|
58614
|
+
background-color: var(--sd-colour-interactive--alpha-20);
|
58615
|
+
box-shadow: 0 1px 0 0 var(--sd-colour-interactive);
|
58616
|
+
border-color: var(--sd-colour-interactive); }
|
58617
|
+
|
58618
|
+
.p-multiselect {
|
58619
|
+
display: inline-flex;
|
58620
|
+
align-items: center;
|
58621
|
+
height: 3.2rem;
|
58622
|
+
border-bottom: 1px solid var(--color-input-border);
|
58623
|
+
background-color: var(--color-input-bg);
|
58624
|
+
font-size: 1.4rem;
|
58625
|
+
transition: border linear 0.2s, box-shadow linear 0.2s;
|
58626
|
+
transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
|
58627
|
+
border-radius: var(--b-radius--x-small) var(--b-radius--x-small) 0 0;
|
58628
|
+
height: auto !important;
|
58629
|
+
min-height: 3.2rem !important;
|
58630
|
+
color: var(--color-text);
|
58631
|
+
padding: 0.4rem; }
|
58632
|
+
.p-multiselect:hover {
|
58633
|
+
background-color: var(--color-input-bg--hover);
|
58634
|
+
border-color: var(--color-input-border-hover); }
|
58635
|
+
.p-multiselect:focus, .p-multiselect:focus-within, .p-multiselect.p-focus {
|
58599
58636
|
background-color: var(--sd-colour-interactive--alpha-20);
|
58600
58637
|
box-shadow: 0 1px 0 0 var(--sd-colour-interactive);
|
58601
58638
|
border-color: var(--sd-colour-interactive); }
|
@@ -58674,11 +58711,19 @@ i.sd-sidetab-menu__helper-icon {
|
|
58674
58711
|
padding-inline-end: 8px; }
|
58675
58712
|
|
58676
58713
|
.p-multiselect-label {
|
58714
|
+
margin: 0;
|
58715
|
+
padding: 0;
|
58716
|
+
list-style-type: none;
|
58677
58717
|
display: flex;
|
58678
|
-
|
58718
|
+
justify-content: flex-start;
|
58719
|
+
align-items: center;
|
58720
|
+
flex-wrap: wrap;
|
58721
|
+
padding-inline-start: 0.4rem;
|
58722
|
+
gap: 0.4rem; }
|
58679
58723
|
|
58680
58724
|
.p-multiselect-token {
|
58681
|
-
cursor: default;
|
58725
|
+
cursor: default;
|
58726
|
+
margin: 0 !important; }
|
58682
58727
|
.p-multiselect-token .pi-times-circle {
|
58683
58728
|
overflow: inherit;
|
58684
58729
|
cursor: default;
|