superdesk-ui-framework 3.1.14 → 3.1.16
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/img/AvatarDefaultImage.svg +6 -0
- package/app/styles/_avatar.scss +28 -6
- package/app/styles/components/_sd-loader.scss +18 -5
- package/app/styles/design-tokens/_new-colors.scss +32 -17
- package/app-typescript/components/Button.tsx +1 -1
- package/app-typescript/components/DatePicker.tsx +6 -0
- package/app-typescript/components/Loader.tsx +23 -5
- package/app-typescript/components/avatar/avatar-group.tsx +2 -1
- package/app-typescript/components/avatar/avatar-image.tsx +1 -1
- package/app-typescript/components/avatar/avatar-placeholder.tsx +0 -1
- package/app-typescript/components/avatar/avatar-wrapper.tsx +14 -2
- package/app-typescript/components/avatar/avatar.tsx +8 -1
- package/dist/components/Avatar.tsx +97 -40
- package/dist/components/Buttons.tsx +5 -3
- package/dist/components/Index.tsx +157 -128
- package/dist/components/Loader.tsx +24 -0
- package/dist/examples.bundle.js +351 -243
- package/dist/playgrounds/react-playgrounds/TestGround.tsx +30 -10
- package/dist/superdesk-ui.bundle.css +68 -26
- package/dist/superdesk-ui.bundle.js +95 -84
- package/examples/pages/components/Avatar.tsx +97 -40
- package/examples/pages/components/Buttons.tsx +5 -3
- package/examples/pages/components/Index.tsx +157 -128
- package/examples/pages/components/Loader.tsx +24 -0
- package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +30 -10
- package/package.json +1 -1
- package/react/components/Button.js +1 -1
- package/react/components/DatePicker.js +4 -0
- package/react/components/Loader.d.ts +11 -3
- package/react/components/Loader.js +6 -2
- package/react/components/avatar/avatar-group.js +2 -2
- package/react/components/avatar/avatar-image.js +1 -1
- package/react/components/avatar/avatar-placeholder.js +1 -1
- package/react/components/avatar/avatar-wrapper.d.ts +4 -1
- package/react/components/avatar/avatar-wrapper.js +4 -2
- package/react/components/avatar/avatar.d.ts +4 -0
- package/react/components/avatar/avatar.js +2 -2
@@ -84,87 +84,129 @@ import { BorderUtilitiesDoc } from './utilities/BorderUtilities';
|
|
84
84
|
import { OpacityUtilitiesDoc } from './utilities/OpacityUtilities';
|
85
85
|
import { ObjectFitUtilitiesDoc } from './utilities/ObjectFitUtilities';
|
86
86
|
import { ObjectPositionUtilitiesDoc } from './utilities/ObjectPositionUtilities';
|
87
|
+
import LoaderDoc from './Loader';
|
87
88
|
|
88
|
-
|
89
|
+
|
90
|
+
interface IPages {
|
91
|
+
[group: string]: {
|
92
|
+
name: string;
|
93
|
+
items: {
|
94
|
+
[urlId: string]: {
|
95
|
+
name: string;
|
96
|
+
component: React.ComponentType<any>;
|
97
|
+
}
|
98
|
+
};
|
99
|
+
};
|
100
|
+
}
|
101
|
+
|
102
|
+
const pages: IPages = {
|
89
103
|
basicComponents: {
|
90
104
|
name: 'Basic Components',
|
91
105
|
items: {
|
92
106
|
'buttons': {
|
93
107
|
name: 'Buttons',
|
108
|
+
component: ButtonsDoc,
|
94
109
|
},
|
95
110
|
'icon-buttons': {
|
96
|
-
name: 'Icon Buttons'
|
111
|
+
name: 'Icon Buttons',
|
112
|
+
component: IconButtonDoc,
|
97
113
|
},
|
98
114
|
'button-groups': {
|
99
|
-
name: 'Button Group & Divider'
|
115
|
+
name: 'Button Group & Divider',
|
116
|
+
component: ButtonGroupsDoc,
|
100
117
|
},
|
101
118
|
'labels': {
|
102
119
|
name: 'Labels',
|
120
|
+
component: LabelsDoc,
|
103
121
|
},
|
104
122
|
'icon-labels': {
|
105
|
-
name: 'Icon Labels'
|
123
|
+
name: 'Icon Labels',
|
124
|
+
component: IconLabelDoc,
|
106
125
|
},
|
107
126
|
'badges': {
|
108
127
|
name: 'Badges',
|
128
|
+
component: BadgesDoc,
|
109
129
|
},
|
110
130
|
'alerts': {
|
111
|
-
name: 'Alerts'
|
131
|
+
name: 'Alerts',
|
132
|
+
component: AlertDoc,
|
112
133
|
},
|
113
134
|
'avatar': {
|
114
135
|
name: 'Avatar',
|
136
|
+
component: AvatarDoc,
|
115
137
|
},
|
116
138
|
'tooltips': {
|
117
|
-
name: 'Tooltips'
|
139
|
+
name: 'Tooltips',
|
140
|
+
component: TooltipDoc,
|
118
141
|
},
|
119
142
|
'tags': {
|
120
|
-
name: 'Tags'
|
143
|
+
name: 'Tags',
|
144
|
+
component: TagDoc,
|
121
145
|
},
|
122
146
|
'dropdowns': {
|
123
|
-
name: 'Dropdowns'
|
147
|
+
name: 'Dropdowns',
|
148
|
+
component: DropdownDoc,
|
124
149
|
},
|
125
150
|
'nav-buttons': {
|
126
|
-
name: 'Nav buttons'
|
151
|
+
name: 'Nav buttons',
|
152
|
+
component: NavButtonsDoc,
|
127
153
|
},
|
128
154
|
'toast': {
|
129
|
-
name: 'Toasts'
|
155
|
+
name: 'Toasts',
|
156
|
+
component: ToastsDoc,
|
130
157
|
},
|
131
158
|
'popover': {
|
132
|
-
name: 'Popover'
|
159
|
+
name: 'Popover',
|
160
|
+
component: PopoverDoc,
|
133
161
|
},
|
134
162
|
'modal': {
|
135
|
-
name: 'Modal'
|
163
|
+
name: 'Modal',
|
164
|
+
component: ModalDoc,
|
136
165
|
},
|
137
166
|
'carousel': {
|
138
|
-
name: 'Carousel'
|
167
|
+
name: 'Carousel',
|
168
|
+
component: CarouselDoc,
|
139
169
|
},
|
140
170
|
'menu': {
|
141
171
|
name: 'Menu',
|
172
|
+
component: MenuDocs,
|
142
173
|
},
|
143
174
|
'treemenu': {
|
144
175
|
name: 'TreeMenu',
|
176
|
+
component: TreeMenuDocs,
|
145
177
|
},
|
146
178
|
"drag-handle": {
|
147
|
-
name: 'Drag handle'
|
179
|
+
name: 'Drag handle',
|
180
|
+
component: DragHandleDocs,
|
148
181
|
},
|
149
182
|
"illustration-button": {
|
150
|
-
name: 'Illustration Button'
|
151
|
-
|
183
|
+
name: 'Illustration Button',
|
184
|
+
component: IllustrationButtonDoc,
|
185
|
+
},
|
186
|
+
"loader": {
|
187
|
+
name: 'Loader',
|
188
|
+
component: LoaderDoc,
|
189
|
+
},
|
152
190
|
}
|
153
191
|
},
|
154
192
|
navigationComponents: {
|
155
193
|
name: "Navigation",
|
156
194
|
items: {
|
157
195
|
'tab': {
|
158
|
-
name: 'Tabs'
|
196
|
+
name: 'Tabs',
|
197
|
+
component: TabsDoc,
|
159
198
|
},
|
160
199
|
'left-navigation': {
|
161
|
-
name: 'Left navigation'
|
200
|
+
name: 'Left navigation',
|
201
|
+
component: LeftNavigationsDoc,
|
162
202
|
},
|
163
|
-
'
|
164
|
-
name: 'Quick navigation bar'
|
203
|
+
'quick-navigation-bar': {
|
204
|
+
name: 'Quick navigation bar',
|
205
|
+
component: QuickNavBarDoc,
|
165
206
|
},
|
166
207
|
'sub-navigation': {
|
167
|
-
name: 'Sub navigation bar'
|
208
|
+
name: 'Sub navigation bar',
|
209
|
+
component: SubNavDoc,
|
168
210
|
},
|
169
211
|
}
|
170
212
|
},
|
@@ -172,16 +214,20 @@ const pages = {
|
|
172
214
|
name: "Containers",
|
173
215
|
items: {
|
174
216
|
'container': {
|
175
|
-
name: 'Container component'
|
217
|
+
name: 'Container component',
|
218
|
+
component: ContainerDoc,
|
176
219
|
},
|
177
220
|
'empty-states': {
|
178
|
-
name: 'Empty states'
|
221
|
+
name: 'Empty states',
|
222
|
+
component: EmptyStateDoc,
|
179
223
|
},
|
180
224
|
'grid-item': {
|
181
|
-
name: 'Grid Item'
|
225
|
+
name: 'Grid Item',
|
226
|
+
component: GridItemDoc,
|
182
227
|
},
|
183
228
|
'panel': {
|
184
|
-
name: 'Panel'
|
229
|
+
name: 'Panel',
|
230
|
+
component: PanelDoc,
|
185
231
|
},
|
186
232
|
}
|
187
233
|
},
|
@@ -189,13 +235,16 @@ const pages = {
|
|
189
235
|
name: "Layout",
|
190
236
|
items: {
|
191
237
|
'content-divider': {
|
192
|
-
name: 'Content Divider'
|
238
|
+
name: 'Content Divider',
|
239
|
+
component: ContentDividerDoc,
|
193
240
|
},
|
194
241
|
"togglebox": {
|
195
|
-
name: "Togglebox"
|
242
|
+
name: "Togglebox",
|
243
|
+
component: ToggleboxDocs,
|
196
244
|
},
|
197
245
|
"resizable-panels": {
|
198
|
-
name: "Resizable panels"
|
246
|
+
name: "Resizable panels",
|
247
|
+
component: ResizablePanelsDoc,
|
199
248
|
},
|
200
249
|
}
|
201
250
|
},
|
@@ -203,10 +252,12 @@ const pages = {
|
|
203
252
|
name: "Text",
|
204
253
|
items: {
|
205
254
|
'heading': {
|
206
|
-
name: 'Heading component'
|
255
|
+
name: 'Heading component',
|
256
|
+
component: HeadingDoc,
|
207
257
|
},
|
208
258
|
'text': {
|
209
|
-
name: 'Text component'
|
259
|
+
name: 'Text component',
|
260
|
+
component: TextDoc,
|
210
261
|
},
|
211
262
|
}
|
212
263
|
},
|
@@ -214,25 +265,32 @@ const pages = {
|
|
214
265
|
name: "Lists",
|
215
266
|
items: {
|
216
267
|
'grid-list': {
|
217
|
-
name: 'Grid List'
|
268
|
+
name: 'Grid List',
|
269
|
+
component: GridListDoc,
|
218
270
|
},
|
219
271
|
'list-items': {
|
220
|
-
name: 'List items'
|
272
|
+
name: 'List items',
|
273
|
+
component: ListItemsDoc,
|
221
274
|
},
|
222
275
|
'simple-list': {
|
223
|
-
name: 'Simple list'
|
276
|
+
name: 'Simple list',
|
277
|
+
component: SimpleListDoc,
|
224
278
|
},
|
225
279
|
'boxed-list': {
|
226
|
-
name: 'Boxed list'
|
280
|
+
name: 'Boxed list',
|
281
|
+
component: BoxedListDoc,
|
227
282
|
},
|
228
283
|
'table-list': {
|
229
|
-
name: 'Table list'
|
284
|
+
name: 'Table list',
|
285
|
+
component: TableListDoc,
|
230
286
|
},
|
231
287
|
'content-list': {
|
232
|
-
name: 'Content list'
|
288
|
+
name: 'Content list',
|
289
|
+
component: ContentListDoc,
|
233
290
|
},
|
234
291
|
'with-pagination': {
|
235
|
-
name: 'With pagination'
|
292
|
+
name: 'With pagination',
|
293
|
+
component: WithPaginationDocs,
|
236
294
|
},
|
237
295
|
}
|
238
296
|
},
|
@@ -241,57 +299,75 @@ const pages = {
|
|
241
299
|
items: {
|
242
300
|
'inputs': {
|
243
301
|
name: 'Inputs',
|
302
|
+
component: InputsDoc,
|
244
303
|
},
|
245
304
|
'autocomplete': {
|
246
305
|
name: 'Autocomplete',
|
306
|
+
component: AutocompleteDoc,
|
247
307
|
},
|
248
308
|
'tag-input': {
|
249
309
|
name: 'Tag Input',
|
310
|
+
component: TagInputDocs,
|
250
311
|
},
|
251
312
|
'select': {
|
252
313
|
name: 'Select',
|
314
|
+
component: SelectsDoc,
|
253
315
|
},
|
254
316
|
'select-grid': {
|
255
317
|
name: 'Select Grid',
|
318
|
+
component: SelectGridDocs,
|
256
319
|
},
|
257
320
|
'select-with-template': {
|
258
321
|
name: 'Select with template',
|
322
|
+
component: SelectWithTemplateDocs,
|
259
323
|
},
|
260
324
|
'with-size-observer': {
|
261
325
|
name: 'With size observer',
|
326
|
+
component: WithSizeObserverDocs,
|
262
327
|
},
|
263
328
|
'multiselect': {
|
264
329
|
name: 'MultiSelect',
|
330
|
+
component: MultiselectDocs,
|
265
331
|
},
|
266
332
|
'treeselect': {
|
267
333
|
name: 'TreeSelect',
|
334
|
+
component: TreeSelectDocs,
|
268
335
|
},
|
269
336
|
'date-picker': {
|
270
337
|
name: 'Date Picker',
|
338
|
+
component: DatePickerDoc,
|
271
339
|
},
|
272
340
|
'time-picker': {
|
273
341
|
name: 'Time Picker',
|
342
|
+
component: TimePickerDoc,
|
274
343
|
},
|
275
344
|
'icon-picker': {
|
276
345
|
name: 'Icon Picker',
|
346
|
+
component: IconPickerDocs,
|
277
347
|
},
|
278
348
|
'duration-input': {
|
279
349
|
name: 'Duration Input',
|
350
|
+
component: DurationInputDoc,
|
280
351
|
},
|
281
352
|
'switch': {
|
282
|
-
name: 'Switch'
|
353
|
+
name: 'Switch',
|
354
|
+
component: SwitchDoc,
|
283
355
|
},
|
284
356
|
'radiogroup': {
|
285
|
-
name: 'RadioGroup'
|
357
|
+
name: 'RadioGroup',
|
358
|
+
component: RadioGroupDoc,
|
286
359
|
},
|
287
360
|
'checkbox': {
|
288
|
-
name: 'Checkbox'
|
361
|
+
name: 'Checkbox',
|
362
|
+
component: CheckboxsDoc,
|
289
363
|
},
|
290
364
|
'dropzone': {
|
291
|
-
name: 'DropZone'
|
365
|
+
name: 'DropZone',
|
366
|
+
component: DropZoneDoc,
|
292
367
|
},
|
293
368
|
'create-button': {
|
294
|
-
name: 'CreateButton'
|
369
|
+
name: 'CreateButton',
|
370
|
+
component: CreateButtonDoc,
|
295
371
|
},
|
296
372
|
}
|
297
373
|
},
|
@@ -300,9 +376,11 @@ const pages = {
|
|
300
376
|
items: {
|
301
377
|
'icon-font': {
|
302
378
|
name: 'Icon font',
|
379
|
+
component: IconFontDoc,
|
303
380
|
},
|
304
381
|
'big-icon-font': {
|
305
|
-
name: 'Big icon font'
|
382
|
+
name: 'Big icon font',
|
383
|
+
component: BigIconFontDoc,
|
306
384
|
}
|
307
385
|
}
|
308
386
|
},
|
@@ -310,45 +388,65 @@ const pages = {
|
|
310
388
|
name: "Utility classes",
|
311
389
|
items: {
|
312
390
|
'border-utilities': {
|
313
|
-
name: 'Border'
|
391
|
+
name: 'Border',
|
392
|
+
component: BorderUtilitiesDoc,
|
314
393
|
},
|
315
394
|
'border-radius-utilities': {
|
316
|
-
name: 'Border Radius'
|
395
|
+
name: 'Border Radius',
|
396
|
+
component: BorderRadiusUtilitiesDoc,
|
317
397
|
},
|
318
398
|
'display-utilities': {
|
319
|
-
name: 'Display'
|
399
|
+
name: 'Display',
|
400
|
+
component: DisplayUtilitiesDoc,
|
320
401
|
},
|
321
402
|
'flex-and-grid-utilities': {
|
322
|
-
name: 'Flex & Grid'
|
403
|
+
name: 'Flex & Grid',
|
404
|
+
component: FlexAndGridUtilitiesDoc,
|
323
405
|
},
|
324
406
|
'object-fit-utilities': {
|
325
|
-
name: 'Object Fit'
|
407
|
+
name: 'Object Fit',
|
408
|
+
component: ObjectFitUtilitiesDoc,
|
326
409
|
},
|
327
410
|
'object-position-utilities': {
|
328
|
-
name: 'Object Position'
|
411
|
+
name: 'Object Position',
|
412
|
+
component: ObjectPositionUtilitiesDoc,
|
329
413
|
},
|
330
414
|
'opacity-utilities': {
|
331
|
-
name: 'Opacity'
|
415
|
+
name: 'Opacity',
|
416
|
+
component: OpacityUtilitiesDoc,
|
332
417
|
},
|
333
418
|
'overflow-utilities': {
|
334
|
-
name: 'Overflow'
|
419
|
+
name: 'Overflow',
|
420
|
+
component: OverflowUtilitiesDoc,
|
335
421
|
},
|
336
422
|
'position-utilities': {
|
337
|
-
name: 'Position'
|
423
|
+
name: 'Position',
|
424
|
+
component: PositionUtilitiesDoc,
|
338
425
|
},
|
339
426
|
'shadow-utilities': {
|
340
|
-
name: 'Shadow'
|
427
|
+
name: 'Shadow',
|
428
|
+
component: ShadowUtilitiesDoc,
|
341
429
|
},
|
342
430
|
'spacing-utilities': {
|
343
431
|
name: 'Spacing',
|
432
|
+
component: SpacingUtilitiesDoc,
|
344
433
|
},
|
345
434
|
'text-utilities': {
|
346
|
-
name: 'Text'
|
347
|
-
|
435
|
+
name: 'Text',
|
436
|
+
component: TextUtilitiesDoc,
|
437
|
+
},
|
348
438
|
}
|
349
439
|
}
|
350
440
|
}
|
351
441
|
|
442
|
+
const routes: Array<{path: string; component: React.ComponentType<any>}> = [];
|
443
|
+
|
444
|
+
for (const group of Object.values(pages)) {
|
445
|
+
for (const [id, value] of Object.entries(group.items)) {
|
446
|
+
routes.push({path: `/components/${id}`, component: value.component});
|
447
|
+
}
|
448
|
+
}
|
449
|
+
|
352
450
|
class ReactDoc extends React.Component {
|
353
451
|
render() {
|
354
452
|
return (
|
@@ -356,79 +454,10 @@ class ReactDoc extends React.Component {
|
|
356
454
|
<ReactNav pages={pages} />
|
357
455
|
<main className="docs-page__content docs-page__container-fluid">
|
358
456
|
<Switch>
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
<Route path="/components/icon-labels" component={IconLabelDoc} />
|
364
|
-
<Route path="/components/badges" component={BadgesDoc} />
|
365
|
-
<Route path="/components/alerts" component={AlertDoc} />
|
366
|
-
<Route path="/components/avatar" component={AvatarDoc} />
|
367
|
-
<Route path="/components/tooltips" component={TooltipDoc} />
|
368
|
-
<Route path="/components/tags" component={TagDoc} />
|
369
|
-
<Route path="/components/inputs" component={InputsDoc} />
|
370
|
-
<Route path="/components/autocomplete" component={AutocompleteDoc} />
|
371
|
-
<Route path="/components/select" component={SelectsDoc} />
|
372
|
-
<Route path="/components/select-with-template" component={SelectWithTemplateDocs} />
|
373
|
-
<Route path="/components/with-size-observer" component={WithSizeObserverDocs} />
|
374
|
-
<Route path="/components/multiselect" component={MultiselectDocs} />
|
375
|
-
<Route path="/components/treeselect" component={TreeSelectDocs} />
|
376
|
-
<Route path="/components/treemenu" component={TreeMenuDocs} />
|
377
|
-
<Route path="/components/duration-input" component={DurationInputDoc} />
|
378
|
-
<Route path="/components/with-pagination" component={WithPaginationDocs} />
|
379
|
-
<Route path="/components/popover" component={PopoverDoc} />
|
380
|
-
<Route path="/components/date-picker" component={DatePickerDoc} />
|
381
|
-
<Route path="/components/time-picker" component={TimePickerDoc} />
|
382
|
-
<Route path="/components/switch" component={SwitchDoc} />
|
383
|
-
<Route path="/components/radiogroup" component={RadioGroupDoc} />
|
384
|
-
<Route path="/components/checkbox" component={CheckboxsDoc} />
|
385
|
-
<Route path="/components/tab" component={TabsDoc} />
|
386
|
-
<Route path="/components/left-navigation" component={LeftNavigationsDoc} />
|
387
|
-
<Route path="/components/Quick-navigation-bar" component={QuickNavBarDoc} />
|
388
|
-
<Route path="/components/nav-buttons" component={NavButtonsDoc} />
|
389
|
-
<Route path="/components/icon-font" component={IconFontDoc} />
|
390
|
-
<Route path="/components/big-icon-font" component={BigIconFontDoc} />
|
391
|
-
<Route path="/components/sub-navigation" component={SubNavDoc} />
|
392
|
-
<Route path="/components/dropdowns" component={DropdownDoc} />
|
393
|
-
<Route path="/components/toast" component={ToastsDoc} />
|
394
|
-
<Route path="/components/drag-handle" component={DragHandleDocs} />
|
395
|
-
<Route path="/components/tag-input" component={TagInputDocs} />
|
396
|
-
<Route path="/components/empty-states" component={EmptyStateDoc} />
|
397
|
-
<Route path="/components/grid-list" component={GridListDoc} />
|
398
|
-
<Route path="/components/grid-item" component={GridItemDoc} />
|
399
|
-
<Route path="/components/modal" component={ModalDoc} />
|
400
|
-
<Route path="/components/carousel" component={CarouselDoc} />
|
401
|
-
<Route path="/components/content-divider" component={ContentDividerDoc} />
|
402
|
-
<Route path="/components/menu" component={MenuDocs} />
|
403
|
-
<Route path="/components/togglebox" component={ToggleboxDocs} />
|
404
|
-
<Route path="/components/list-items" component={ListItemsDoc} />
|
405
|
-
<Route path="/components/panel" component={PanelDoc} />
|
406
|
-
<Route path="/components/select-grid" component={SelectGridDocs} />
|
407
|
-
<Route path="/components/icon-picker" component={IconPickerDocs} />
|
408
|
-
<Route path="/components/simple-list" component={SimpleListDoc} />
|
409
|
-
<Route path="/components/boxed-list" component={BoxedListDoc} />
|
410
|
-
<Route path="/components/table-list" component={TableListDoc} />
|
411
|
-
<Route path="/components/content-list" component={ContentListDoc} />
|
412
|
-
<Route path="/components/heading" component={HeadingDoc} />
|
413
|
-
<Route path="/components/text" component={TextDoc} />
|
414
|
-
<Route path="/components/container" component={ContainerDoc} />
|
415
|
-
<Route path="/components/dropzone" component={DropZoneDoc} />
|
416
|
-
<Route path="/components/create-button" component={CreateButtonDoc} />
|
417
|
-
<Route path="/components/resizable-panels" component={ResizablePanelsDoc} />
|
418
|
-
<Route path="/components/illustration-button" component={IllustrationButtonDoc} />
|
419
|
-
{/* Utilities */}
|
420
|
-
<Route path="/components/spacing-utilities" component={SpacingUtilitiesDoc} />
|
421
|
-
<Route path="/components/text-utilities" component={TextUtilitiesDoc} />
|
422
|
-
<Route path="/components/shadow-utilities" component={ShadowUtilitiesDoc} />
|
423
|
-
<Route path="/components/position-utilities" component={PositionUtilitiesDoc} />
|
424
|
-
<Route path="/components/overflow-utilities" component={OverflowUtilitiesDoc} />
|
425
|
-
<Route path="/components/display-utilities" component={DisplayUtilitiesDoc} />
|
426
|
-
<Route path="/components/flex-and-grid-utilities" component={FlexAndGridUtilitiesDoc} />
|
427
|
-
<Route path="/components/border-radius-utilities" component={BorderRadiusUtilitiesDoc} />
|
428
|
-
<Route path="/components/border-utilities" component={BorderUtilitiesDoc} />
|
429
|
-
<Route path="/components/opacity-utilities" component={OpacityUtilitiesDoc} />
|
430
|
-
<Route path="/components/object-fit-utilities" component={ObjectFitUtilitiesDoc} />
|
431
|
-
<Route path="/components/object-position-utilities" component={ObjectPositionUtilitiesDoc} />
|
457
|
+
{
|
458
|
+
routes.map((route) => <Route key={route.path} path={route.path} component={route.component} />)
|
459
|
+
}
|
460
|
+
|
432
461
|
<Route path="/" component={ReactDefault} />
|
433
462
|
</Switch>
|
434
463
|
</main>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as Markup from '../../js/react';
|
3
|
+
import {Loader} from '../../../app-typescript';
|
4
|
+
|
5
|
+
export default class LoaderDoc extends React.Component {
|
6
|
+
render() {
|
7
|
+
return (
|
8
|
+
<section className='docs-page__container'>
|
9
|
+
<h2 className='docs-page__h2'>Loader</h2>
|
10
|
+
|
11
|
+
<Markup.ReactMarkup>
|
12
|
+
<Markup.ReactMarkupPreview>
|
13
|
+
<Loader />
|
14
|
+
</Markup.ReactMarkupPreview>
|
15
|
+
|
16
|
+
<Markup.ReactMarkupCode>{`
|
17
|
+
<Loader />
|
18
|
+
`}
|
19
|
+
</Markup.ReactMarkupCode>
|
20
|
+
</Markup.ReactMarkup>
|
21
|
+
</section>
|
22
|
+
)
|
23
|
+
}
|
24
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import * as Components from './components/Index';
|
3
|
-
import { Checkbox, RadioGroup, CheckboxButton, RadioButtonGroup, Button, Dropdown, Input, Label, Icon, IconButton, Badge, ThemeSelector, Container, IconLabel, Tooltip, Spinner, Divider, InputWrapper, InputNew, InputBase, Text, FormRowNew, ButtonGroup, Heading, SearchBar, Modal, BoxedList, BoxedListItem, TimePicker, TreeSelect, DatePicker, ContentDivider, Select, Option, AvatarGroup, Avatar, SvgIconIllustration, IllustrationButton, SubNav, NavButton } from '../../../../app-typescript/index';
|
3
|
+
import { Checkbox, RadioGroup, CheckboxButton, RadioButtonGroup, Button, Dropdown, Input, Label, Icon, IconButton, Badge, ThemeSelector, Container, IconLabel, Tooltip, Spinner, Divider, InputWrapper, InputNew, InputBase, Text, FormRowNew, ButtonGroup, Heading, SearchBar, Modal, BoxedList, BoxedListItem, TimePicker, TreeSelect, DatePicker, ContentDivider, Select, Option, AvatarGroup, Avatar, SvgIconIllustration, IllustrationButton, SubNav, NavButton, } from '../../../../app-typescript/index';
|
4
4
|
import { IAvatarInGroup } from '../../../../app-typescript/components/avatar/avatar-group';
|
5
5
|
import { FormLabel } from '../../../../app-typescript/components/Form/FormLabel';
|
6
6
|
|
@@ -104,29 +104,37 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
104
104
|
|
105
105
|
render() {
|
106
106
|
const avatars: Array<IAvatarInGroup> = [
|
107
|
+
{
|
108
|
+
imageUrl: null,
|
109
|
+
initials: null,
|
110
|
+
displayName: 'Unassigned',
|
111
|
+
icon:{name: 'video', color: 'var(--sd-colour-state--default)'},
|
112
|
+
statusDot:{color: 'var(--sd-colour-coverage-state--not-covering)'}
|
113
|
+
},
|
114
|
+
{
|
115
|
+
imageUrl: null,
|
116
|
+
initials: null,
|
117
|
+
displayName: 'Unassigned',
|
118
|
+
icon:{name: 'file', color: 'var(--sd-colour-state--unassigned)'},
|
119
|
+
statusDot:{color: 'var(--sd-colour-coverage-state--on-merit)'}
|
120
|
+
},
|
107
121
|
{
|
108
122
|
imageUrl: null,
|
109
123
|
initials: "VS",
|
110
124
|
displayName: 'Vladimir Stefanovic',
|
111
|
-
icon:{name: 'text', color: 'var(--sd-colour-
|
125
|
+
icon:{name: 'text', color: 'var(--sd-colour-state--in-progress)'},
|
112
126
|
},
|
113
127
|
{
|
114
128
|
imageUrl: null,
|
115
129
|
initials: "JL",
|
116
130
|
displayName: 'Jeffrey Lebowski',
|
117
|
-
icon:{name: 'photo', color: 'var(--sd-colour-
|
131
|
+
icon:{name: 'photo', color: 'var(--sd-colour-state--in-workflow)'}
|
118
132
|
},
|
119
133
|
{
|
120
134
|
imageUrl: null,
|
121
135
|
initials: "WS",
|
122
136
|
displayName: 'Walter Sobchak',
|
123
|
-
icon:{name: '
|
124
|
-
},
|
125
|
-
{
|
126
|
-
imageUrl: null,
|
127
|
-
initials: "ML",
|
128
|
-
displayName: 'Maude Lebowski',
|
129
|
-
icon:{name: 'file', color: 'var(--sd-colour-highlight)'}
|
137
|
+
icon:{name: 'text', color: 'var(--sd-colour-state--done)'},
|
130
138
|
},
|
131
139
|
];
|
132
140
|
|
@@ -159,6 +167,18 @@ export class TestGround extends React.Component<IProps, IState> {
|
|
159
167
|
|
160
168
|
<hr />
|
161
169
|
|
170
|
+
<Avatar
|
171
|
+
displayName="Jeffrey Lebowski"
|
172
|
+
imageUrl={null}
|
173
|
+
initials='JL'
|
174
|
+
size="small"
|
175
|
+
statusDot={{color: 'var(--sd-colour-coverage-state--on-merit)'}}
|
176
|
+
icon={{name: 'text'}}
|
177
|
+
/>
|
178
|
+
|
179
|
+
<hr />
|
180
|
+
|
181
|
+
|
162
182
|
<div style={{maxWidth: '600px'}} className={`sd-shadow--z1 new-collapse-box ${this.state.openCollapsibleOne ? 'new-collapse-box--open' : ''}`}>
|
163
183
|
{/* Header */}
|
164
184
|
<div className='new-collapse-box__header'>
|
package/package.json
CHANGED
@@ -67,7 +67,7 @@ var Button = /** @class */ (function (_super) {
|
|
67
67
|
_a));
|
68
68
|
return (React.createElement("button", { id: this.props.id, className: classes, tabIndex: 0, disabled: this.props.disabled || this.props.isLoading, "data-loading": this.props.isLoading, onClick: this.props.disabled ? function () { return false; } : function (event) { return _this.props.onClick(event); }, "aria-label": this.props.iconOnly ? this.props.text : '', "data-test-id": this.props['data-test-id'], title: this.props.tooltip },
|
69
69
|
this.props.isLoading ? React.createElement(Spinner_1.Spinner, { size: "mini" }) : null,
|
70
|
-
this.props.icon && !this.props.isLoading ? React.createElement(Icon_1.Icon, { name: this.props.icon }) : null,
|
70
|
+
this.props.icon && !this.props.isLoading ? React.createElement(Icon_1.Icon, { ariaHidden: true, name: this.props.icon }) : null,
|
71
71
|
this.props.iconOnly ? null : this.props.text));
|
72
72
|
};
|
73
73
|
return Button;
|
@@ -141,6 +141,10 @@ var DatePicker = /** @class */ (function (_super) {
|
|
141
141
|
React.createElement(calendar_1.Calendar, { footerTemplate: this.props.required !== true ? function () { return (React.createElement("div", { className: 'd-flex justify-end' },
|
142
142
|
React.createElement(Button_1.Button, { onClick: function () {
|
143
143
|
_this.props.onChange(null);
|
144
|
+
if (_this.instance != null
|
145
|
+
&& typeof _this.instance.hideOverlay === 'function') {
|
146
|
+
_this.instance.hideOverlay();
|
147
|
+
}
|
144
148
|
}, text: 'Clear', "data-test-id": 'clear-button' }))); } : undefined, inputId: this.htmlId, ariaLabelledBy: this.htmlId + 'label', ref: function (ref) {
|
145
149
|
_this.instance = ref;
|
146
150
|
var refAny = ref;
|
@@ -1,8 +1,16 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
interface
|
3
|
-
overlay
|
2
|
+
interface IPropsOverlay {
|
3
|
+
overlay: true;
|
4
|
+
backgroundColor?: React.CSSProperties['backgroundColor'];
|
4
5
|
}
|
6
|
+
interface IPropsInline {
|
7
|
+
overlay?: false;
|
8
|
+
width?: React.CSSProperties['width'];
|
9
|
+
height?: React.CSSProperties['height'];
|
10
|
+
backgroundColor?: React.CSSProperties['backgroundColor'];
|
11
|
+
}
|
12
|
+
type IProps = IPropsOverlay | IPropsInline;
|
5
13
|
export declare class Loader extends React.Component<IProps> {
|
6
|
-
render(): JSX.Element
|
14
|
+
render(): JSX.Element;
|
7
15
|
}
|
8
16
|
export {};
|