@micromag/screen-timeline 0.3.829 → 0.4.4

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.
@@ -1 +1 @@
1
- .micromag-screen-timeline-container .micromag-screen-timeline-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-timeline-container .micromag-screen-timeline-empty{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-timeline-container{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-background{z-index:0}.micromag-screen-timeline-container .micromag-screen-timeline-content{z-index:1}.micromag-screen-timeline-container .micromag-screen-timeline-empty{height:50px;margin-right:10px}.micromag-screen-timeline-container .micromag-screen-timeline-emptyTitle{width:100%}.micromag-screen-timeline-container .micromag-screen-timeline-item{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-element{display:-ms-flexbox;display:flex}.micromag-screen-timeline-container .micromag-screen-timeline-element.micromag-screen-timeline-hidden .micromag-screen-timeline-body{display:none;visibility:hidden}.micromag-screen-timeline-container .micromag-screen-timeline-timeline{-webkit-box-sizing:content-box;box-sizing:content-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;padding-right:20px;width:15px}.micromag-screen-timeline-container .micromag-screen-timeline-line{-ms-flex-positive:1;flex-grow:1;width:1px}.micromag-screen-timeline-container .micromag-screen-timeline-line.micromag-screen-timeline-hidden{width:auto}.micromag-screen-timeline-container .micromag-screen-timeline-bullet{border-style:solid;border-width:1px;height:15px;margin:2px 0;width:15px}.micromag-screen-timeline-container .micromag-screen-timeline-body{-ms-flex-positive:1;flex-grow:1}.micromag-screen-timeline-container .micromag-screen-timeline-description,.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container .micromag-screen-timeline-title{padding:8px 0}.micromag-screen-timeline-container .micromag-screen-timeline-image,.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container .micromag-screen-timeline-video{position:relative}.micromag-screen-timeline-container .micromag-screen-timeline-imageContainer{overflow:hidden}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction a{padding:0}.micromag-screen-timeline-container .micromag-screen-timeline-callToAction.micromag-screen-timeline-disabled{opacity:0;pointer-events:none}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-scroll{padding:10px}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-timeline{padding-right:0}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-bullet{background-color:hsla(0,0%,100%,.6);border-color:hsla(0,0%,100%,.6);height:10px;mix-blend-mode:difference;width:10px}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-description,.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-imageContainer,.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-title{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;height:100%;justify-content:center;padding:2px 0}.micromag-screen-timeline-container.micromag-screen-timeline-isPlaceholder .micromag-screen-timeline-line{background-color:hsla(0,0%,100%,.6);mix-blend-mode:difference}.micromag-screen-timeline-container.micromag-screen-timeline-circleBulletShape .micromag-screen-timeline-bullet{border-radius:50%}.micromag-screen-timeline-container.micromag-screen-timeline-withoutLines .micromag-screen-timeline-timeline{visibility:hidden}
1
+ .container{position:relative}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .empty{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);height:50px;margin:5px 10px 5px auto}.container .emptyTitle{width:100%}.container .item{position:relative}.container .element{display:-ms-flexbox;display:flex}.container .element.hidden .body{display:none;visibility:hidden}.container .timeline{-webkit-box-sizing:content-box;box-sizing:content-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:15px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;padding-right:20px}.container .line{width:1px;-ms-flex-positive:1;flex-grow:1}.container .line.hidden{width:auto}.container .bullet{border-style:solid;border-width:1px;height:15px;margin:2px 0;width:15px}.container .body{-ms-flex-positive:1;flex-grow:1}.container .description,.container .imageContainer,.container .title{padding:8px 0}.container .image,.container .imageContainer,.container .video{position:relative}.container .imageContainer{overflow:hidden}.container .callToAction{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.container .callToAction a{padding:0}.container .callToAction.disabled{opacity:0;pointer-events:none}.container.isPlaceholder .scroll{padding:10px}.container.isPlaceholder .timeline{padding-right:0}.container.isPlaceholder .bullet{background-color:hsla(0,0%,100%,.6);border-color:hsla(0,0%,100%,.6);height:10px;mix-blend-mode:difference;width:10px}.container.isPlaceholder .description,.container.isPlaceholder .imageContainer,.container.isPlaceholder .title{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;-ms-flex-pack:center;justify-content:center;padding:2px 0}.container.isPlaceholder .line{background-color:hsla(0,0%,100%,.6);mix-blend-mode:difference}.container.circleBulletShape .bullet{border-radius:50%}.container.withoutLines .timeline{visibility:hidden}
package/es/index.d.ts ADDED
@@ -0,0 +1,472 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HeadingElement, TextElement, TextStyle, Color, Header, Footer, BackgroundElement, Alternatives } from '@micromag/core';
3
+
4
+ interface TimelineProps {
5
+ layout?: 'normal' | 'title-description-image' | 'title-image-description' | 'image-title-description';
6
+ title?: HeadingElement | null;
7
+ items?: TextElement[];
8
+ itemTitleStyle?: TextStyle | null;
9
+ itemDescriptionStyle?: TextStyle | null;
10
+ withoutLine?: boolean;
11
+ bulletColor?: Color | null;
12
+ lineColor?: Color | null;
13
+ bulletShape?: 'circle' | 'square';
14
+ bulletFilled?: boolean;
15
+ illustrated?: boolean;
16
+ spacing?: number | null;
17
+ header?: Header | null;
18
+ footer?: Footer | null;
19
+ background?: BackgroundElement | null;
20
+ alternatives?: Alternatives | null;
21
+ current?: boolean;
22
+ active?: boolean;
23
+ preload?: boolean;
24
+ type?: string | null;
25
+ className?: string | null;
26
+ }
27
+ declare function Timeline({ layout, title, items, itemTitleStyle, itemDescriptionStyle, withoutLine, bulletColor, lineColor, bulletShape, bulletFilled, illustrated, spacing: initialSpacing, itemBottomSpacing: initialItemBottomSpacing, header, footer, background, alternatives, current, active, preload, type, className, }: TimelineProps): react_jsx_runtime.JSX.Element;
28
+
29
+ declare function TimelineIllustratedScreen({ ...props }: {
30
+ [x: string]: any;
31
+ }): react_jsx_runtime.JSX.Element;
32
+
33
+ declare const _default: ({
34
+ id: string;
35
+ type: string;
36
+ group: {
37
+ label: {
38
+ defaultMessage: string;
39
+ description: string;
40
+ };
41
+ order: number;
42
+ };
43
+ title: {
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ component: typeof Timeline;
48
+ layouts: string[];
49
+ fields: ({
50
+ name: string;
51
+ type: string;
52
+ theme: {
53
+ textStyle: string;
54
+ title?: undefined;
55
+ description?: undefined;
56
+ badge?: undefined;
57
+ callToAction?: undefined;
58
+ };
59
+ label: {
60
+ defaultMessage: string;
61
+ description: string;
62
+ };
63
+ defaultValue?: undefined;
64
+ isHorizontal?: undefined;
65
+ isList?: undefined;
66
+ fields?: undefined;
67
+ options?: undefined;
68
+ } | {
69
+ name: string;
70
+ type: string;
71
+ theme: {
72
+ title: {
73
+ textStyle: string;
74
+ };
75
+ description: {
76
+ textStyle: string;
77
+ };
78
+ textStyle?: undefined;
79
+ badge?: undefined;
80
+ callToAction?: undefined;
81
+ };
82
+ label: {
83
+ defaultMessage: string;
84
+ description: string;
85
+ };
86
+ defaultValue?: undefined;
87
+ isHorizontal?: undefined;
88
+ isList?: undefined;
89
+ fields?: undefined;
90
+ options?: undefined;
91
+ } | {
92
+ name: string;
93
+ type: string;
94
+ defaultValue: number;
95
+ isHorizontal: boolean;
96
+ label: {
97
+ defaultMessage: string;
98
+ description: string;
99
+ };
100
+ theme?: undefined;
101
+ isList?: undefined;
102
+ fields?: undefined;
103
+ options?: undefined;
104
+ } | {
105
+ type: string;
106
+ label: {
107
+ defaultMessage: string;
108
+ description: string;
109
+ };
110
+ isList: boolean;
111
+ fields: ({
112
+ name: string;
113
+ type: string;
114
+ label: {
115
+ defaultMessage: string;
116
+ description: string;
117
+ };
118
+ defaultValue?: undefined;
119
+ isHorizontal?: undefined;
120
+ } | {
121
+ name: string;
122
+ type: string;
123
+ defaultValue: number;
124
+ isHorizontal: boolean;
125
+ label: {
126
+ defaultMessage: string;
127
+ description: string;
128
+ };
129
+ })[];
130
+ name?: undefined;
131
+ theme?: undefined;
132
+ defaultValue?: undefined;
133
+ isHorizontal?: undefined;
134
+ options?: undefined;
135
+ } | {
136
+ name: string;
137
+ type: string;
138
+ defaultValue: string;
139
+ options: {
140
+ value: string;
141
+ label: {
142
+ defaultMessage: string;
143
+ description: string;
144
+ };
145
+ }[];
146
+ label: {
147
+ defaultMessage: string;
148
+ description: string;
149
+ };
150
+ theme?: undefined;
151
+ isHorizontal?: undefined;
152
+ isList?: undefined;
153
+ fields?: undefined;
154
+ } | {
155
+ name: string;
156
+ type: string;
157
+ defaultValue: boolean;
158
+ label: {
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ theme?: undefined;
163
+ isHorizontal?: undefined;
164
+ isList?: undefined;
165
+ fields?: undefined;
166
+ options?: undefined;
167
+ } | {
168
+ name: string;
169
+ type: string;
170
+ defaultValue: {
171
+ alpha: number;
172
+ color: string;
173
+ };
174
+ label: {
175
+ defaultMessage: string;
176
+ description: string;
177
+ };
178
+ theme?: undefined;
179
+ isHorizontal?: undefined;
180
+ isList?: undefined;
181
+ fields?: undefined;
182
+ options?: undefined;
183
+ } | {
184
+ name: string;
185
+ type: string;
186
+ label: {
187
+ defaultMessage: string;
188
+ description: string;
189
+ };
190
+ theme?: undefined;
191
+ defaultValue?: undefined;
192
+ isHorizontal?: undefined;
193
+ isList?: undefined;
194
+ fields?: undefined;
195
+ options?: undefined;
196
+ } | {
197
+ name: string;
198
+ type: string;
199
+ label: {
200
+ defaultMessage: string;
201
+ description: string;
202
+ };
203
+ theme: {
204
+ badge: {
205
+ label: {
206
+ textStyle: string;
207
+ };
208
+ boxStyle: string;
209
+ };
210
+ textStyle?: undefined;
211
+ title?: undefined;
212
+ description?: undefined;
213
+ callToAction?: undefined;
214
+ };
215
+ defaultValue?: undefined;
216
+ isHorizontal?: undefined;
217
+ isList?: undefined;
218
+ fields?: undefined;
219
+ options?: undefined;
220
+ } | {
221
+ name: string;
222
+ type: string;
223
+ label: {
224
+ defaultMessage: string;
225
+ description: string;
226
+ };
227
+ theme: {
228
+ callToAction: {
229
+ label: {
230
+ textStyle: string;
231
+ };
232
+ boxStyle: string;
233
+ };
234
+ textStyle?: undefined;
235
+ title?: undefined;
236
+ description?: undefined;
237
+ badge?: undefined;
238
+ };
239
+ defaultValue?: undefined;
240
+ isHorizontal?: undefined;
241
+ isList?: undefined;
242
+ fields?: undefined;
243
+ options?: undefined;
244
+ })[];
245
+ } | {
246
+ id: string;
247
+ type: string;
248
+ group: {
249
+ label: {
250
+ defaultMessage: string;
251
+ description: string;
252
+ };
253
+ order: number;
254
+ };
255
+ title: {
256
+ defaultMessage: string;
257
+ description: string;
258
+ };
259
+ component: typeof TimelineIllustratedScreen;
260
+ layouts: string[];
261
+ fields: ({
262
+ name: string;
263
+ type: string;
264
+ theme: {
265
+ textStyle: string;
266
+ title?: undefined;
267
+ description?: undefined;
268
+ badge?: undefined;
269
+ callToAction?: undefined;
270
+ };
271
+ label: {
272
+ defaultMessage: string;
273
+ description: string;
274
+ };
275
+ defaultValue?: undefined;
276
+ isHorizontal?: undefined;
277
+ isList?: undefined;
278
+ fields?: undefined;
279
+ options?: undefined;
280
+ } | {
281
+ name: string;
282
+ type: string;
283
+ defaultValue: string;
284
+ label: {
285
+ defaultMessage: string;
286
+ description: string;
287
+ };
288
+ theme?: undefined;
289
+ isHorizontal?: undefined;
290
+ isList?: undefined;
291
+ fields?: undefined;
292
+ options?: undefined;
293
+ } | {
294
+ name: string;
295
+ type: string;
296
+ theme: {
297
+ title: {
298
+ textStyle: string;
299
+ };
300
+ description: {
301
+ textStyle: string;
302
+ };
303
+ textStyle?: undefined;
304
+ badge?: undefined;
305
+ callToAction?: undefined;
306
+ };
307
+ label: {
308
+ defaultMessage: string;
309
+ description: string;
310
+ };
311
+ defaultValue?: undefined;
312
+ isHorizontal?: undefined;
313
+ isList?: undefined;
314
+ fields?: undefined;
315
+ options?: undefined;
316
+ } | {
317
+ name: string;
318
+ type: string;
319
+ defaultValue: number;
320
+ isHorizontal: boolean;
321
+ label: {
322
+ defaultMessage: string;
323
+ description: string;
324
+ };
325
+ theme?: undefined;
326
+ isList?: undefined;
327
+ fields?: undefined;
328
+ options?: undefined;
329
+ } | {
330
+ type: string;
331
+ label: {
332
+ defaultMessage: string;
333
+ description: string;
334
+ };
335
+ isList: boolean;
336
+ fields: ({
337
+ name: string;
338
+ type: string;
339
+ label: {
340
+ defaultMessage: string;
341
+ description: string;
342
+ };
343
+ defaultValue?: undefined;
344
+ isHorizontal?: undefined;
345
+ } | {
346
+ name: string;
347
+ type: string;
348
+ defaultValue: number;
349
+ isHorizontal: boolean;
350
+ label: {
351
+ defaultMessage: string;
352
+ description: string;
353
+ };
354
+ })[];
355
+ name?: undefined;
356
+ theme?: undefined;
357
+ defaultValue?: undefined;
358
+ isHorizontal?: undefined;
359
+ options?: undefined;
360
+ } | {
361
+ name: string;
362
+ type: string;
363
+ defaultValue: boolean;
364
+ label: {
365
+ defaultMessage: string;
366
+ description: string;
367
+ };
368
+ theme?: undefined;
369
+ isHorizontal?: undefined;
370
+ isList?: undefined;
371
+ fields?: undefined;
372
+ options?: undefined;
373
+ } | {
374
+ name: string;
375
+ type: string;
376
+ defaultValue: string;
377
+ options: {
378
+ value: string;
379
+ label: {
380
+ defaultMessage: string;
381
+ description: string;
382
+ };
383
+ }[];
384
+ label: {
385
+ defaultMessage: string;
386
+ description: string;
387
+ };
388
+ theme?: undefined;
389
+ isHorizontal?: undefined;
390
+ isList?: undefined;
391
+ fields?: undefined;
392
+ } | {
393
+ name: string;
394
+ type: string;
395
+ defaultValue: {
396
+ alpha: number;
397
+ color: string;
398
+ };
399
+ label: {
400
+ defaultMessage: string;
401
+ description: string;
402
+ };
403
+ theme?: undefined;
404
+ isHorizontal?: undefined;
405
+ isList?: undefined;
406
+ fields?: undefined;
407
+ options?: undefined;
408
+ } | {
409
+ name: string;
410
+ type: string;
411
+ label: {
412
+ defaultMessage: string;
413
+ description: string;
414
+ };
415
+ theme?: undefined;
416
+ defaultValue?: undefined;
417
+ isHorizontal?: undefined;
418
+ isList?: undefined;
419
+ fields?: undefined;
420
+ options?: undefined;
421
+ } | {
422
+ name: string;
423
+ type: string;
424
+ label: {
425
+ defaultMessage: string;
426
+ description: string;
427
+ };
428
+ theme: {
429
+ badge: {
430
+ label: {
431
+ textStyle: string;
432
+ };
433
+ boxStyle: string;
434
+ };
435
+ textStyle?: undefined;
436
+ title?: undefined;
437
+ description?: undefined;
438
+ callToAction?: undefined;
439
+ };
440
+ defaultValue?: undefined;
441
+ isHorizontal?: undefined;
442
+ isList?: undefined;
443
+ fields?: undefined;
444
+ options?: undefined;
445
+ } | {
446
+ name: string;
447
+ type: string;
448
+ label: {
449
+ defaultMessage: string;
450
+ description: string;
451
+ };
452
+ theme: {
453
+ callToAction: {
454
+ label: {
455
+ textStyle: string;
456
+ };
457
+ boxStyle: string;
458
+ };
459
+ textStyle?: undefined;
460
+ title?: undefined;
461
+ description?: undefined;
462
+ badge?: undefined;
463
+ };
464
+ defaultValue?: undefined;
465
+ isHorizontal?: undefined;
466
+ isList?: undefined;
467
+ fields?: undefined;
468
+ options?: undefined;
469
+ })[];
470
+ })[];
471
+
472
+ export { TimelineIllustratedScreen, Timeline as TimelineScreen, _default as default };
package/es/index.js CHANGED
@@ -4,9 +4,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
5
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
6
6
  import classNames from 'classnames';
7
- import PropTypes from 'prop-types';
8
7
  import React, { useMemo, useState, useEffect, useCallback, useRef } from 'react';
9
- import { PropTypes as PropTypes$1 } from '@micromag/core';
10
8
  import { ScreenElement } from '@micromag/core/components';
11
9
  import { useScreenSize, useViewerContext, useViewerWebView, useScreenRenderContext, usePlaybackContext, usePlaybackMediaRef, useViewerContainer } from '@micromag/core/contexts';
12
10
  import { useTrackScreenEvent, useActivityDetector, useDebounce, useTrackScreenMedia, useDimensionObserver } from '@micromag/core/hooks';
@@ -24,79 +22,53 @@ import Visual from '@micromag/element-visual';
24
22
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
25
23
  import _extends from '@babel/runtime/helpers/extends';
26
24
 
27
- var styles = {"container":"micromag-screen-timeline-container","background":"micromag-screen-timeline-background","empty":"micromag-screen-timeline-empty","content":"micromag-screen-timeline-content","emptyTitle":"micromag-screen-timeline-emptyTitle","item":"micromag-screen-timeline-item","element":"micromag-screen-timeline-element","hidden":"micromag-screen-timeline-hidden","body":"micromag-screen-timeline-body","timeline":"micromag-screen-timeline-timeline","line":"micromag-screen-timeline-line","bullet":"micromag-screen-timeline-bullet","title":"micromag-screen-timeline-title","description":"micromag-screen-timeline-description","imageContainer":"micromag-screen-timeline-imageContainer","image":"micromag-screen-timeline-image","video":"micromag-screen-timeline-video","callToAction":"micromag-screen-timeline-callToAction","disabled":"micromag-screen-timeline-disabled","isPlaceholder":"micromag-screen-timeline-isPlaceholder","scroll":"micromag-screen-timeline-scroll","circleBulletShape":"micromag-screen-timeline-circleBulletShape","withoutLines":"micromag-screen-timeline-withoutLines"};
25
+ var styles = {"container":"container","background":"background","content":"content","empty":"empty","emptyTitle":"emptyTitle","item":"item","element":"element","hidden":"hidden","body":"body","timeline":"timeline","line":"line","bullet":"bullet","title":"title","description":"description","imageContainer":"imageContainer","image":"image","video":"video","callToAction":"callToAction","disabled":"disabled","isPlaceholder":"isPlaceholder","scroll":"scroll","circleBulletShape":"circleBulletShape","withoutLines":"withoutLines"};
28
26
 
29
- var propTypes = {
30
- layout: PropTypes.oneOf(['normal', 'title-description-image', 'title-image-description', 'image-title-description']),
31
- title: PropTypes$1.headingElement,
32
- items: PropTypes.arrayOf(PropTypes$1.textElement),
33
- itemTitleStyle: PropTypes$1.textStyle,
34
- itemDescriptionStyle: PropTypes$1.textStyle,
35
- withoutLine: PropTypes.bool,
36
- bulletColor: PropTypes$1.color,
37
- lineColor: PropTypes$1.color,
38
- bulletShape: PropTypes.oneOf(['circle', 'square']),
39
- bulletFilled: PropTypes.bool,
40
- illustrated: PropTypes.bool,
41
- spacing: PropTypes.number,
42
- header: PropTypes$1.header,
43
- footer: PropTypes$1.footer,
44
- background: PropTypes$1.backgroundElement,
45
- alternatives: PropTypes$1.alternatives,
46
- current: PropTypes.bool,
47
- active: PropTypes.bool,
48
- preload: PropTypes.bool,
49
- type: PropTypes.string,
50
- className: PropTypes.string
51
- };
52
- var defaultProps = {
53
- layout: 'normal',
54
- title: null,
55
- items: [null],
56
- itemTitleStyle: null,
57
- itemDescriptionStyle: null,
58
- withoutLine: false,
59
- bulletColor: null,
60
- lineColor: null,
61
- bulletShape: 'circle',
62
- bulletFilled: true,
63
- illustrated: false,
64
- spacing: 20,
65
- header: null,
66
- footer: null,
67
- background: null,
68
- alternatives: null,
69
- current: true,
70
- active: true,
71
- preload: true,
72
- type: null,
73
- className: null
74
- };
75
- var Timeline = function Timeline(_ref) {
76
- var layout = _ref.layout,
77
- title = _ref.title,
78
- items = _ref.items,
79
- itemTitleStyle = _ref.itemTitleStyle,
80
- itemDescriptionStyle = _ref.itemDescriptionStyle,
81
- withoutLine = _ref.withoutLine,
82
- bulletColor = _ref.bulletColor,
83
- lineColor = _ref.lineColor,
84
- bulletShape = _ref.bulletShape,
85
- bulletFilled = _ref.bulletFilled,
86
- illustrated = _ref.illustrated,
27
+ function Timeline(_ref) {
28
+ var _ref$layout = _ref.layout,
29
+ layout = _ref$layout === void 0 ? 'normal' : _ref$layout,
30
+ _ref$title = _ref.title,
31
+ title = _ref$title === void 0 ? null : _ref$title,
32
+ _ref$items = _ref.items,
33
+ items = _ref$items === void 0 ? [null] : _ref$items,
34
+ _ref$itemTitleStyle = _ref.itemTitleStyle,
35
+ itemTitleStyle = _ref$itemTitleStyle === void 0 ? null : _ref$itemTitleStyle,
36
+ _ref$itemDescriptionS = _ref.itemDescriptionStyle,
37
+ itemDescriptionStyle = _ref$itemDescriptionS === void 0 ? null : _ref$itemDescriptionS,
38
+ _ref$withoutLine = _ref.withoutLine,
39
+ withoutLine = _ref$withoutLine === void 0 ? false : _ref$withoutLine,
40
+ _ref$bulletColor = _ref.bulletColor,
41
+ bulletColor = _ref$bulletColor === void 0 ? null : _ref$bulletColor,
42
+ _ref$lineColor = _ref.lineColor,
43
+ lineColor = _ref$lineColor === void 0 ? null : _ref$lineColor,
44
+ _ref$bulletShape = _ref.bulletShape,
45
+ bulletShape = _ref$bulletShape === void 0 ? 'circle' : _ref$bulletShape,
46
+ _ref$bulletFilled = _ref.bulletFilled,
47
+ bulletFilled = _ref$bulletFilled === void 0 ? true : _ref$bulletFilled,
48
+ _ref$illustrated = _ref.illustrated,
49
+ illustrated = _ref$illustrated === void 0 ? false : _ref$illustrated,
87
50
  _ref$spacing = _ref.spacing,
88
51
  initialSpacing = _ref$spacing === void 0 ? null : _ref$spacing,
89
52
  _ref$itemBottomSpacin = _ref.itemBottomSpacing,
90
53
  initialItemBottomSpacing = _ref$itemBottomSpacin === void 0 ? null : _ref$itemBottomSpacin,
91
- header = _ref.header,
92
- footer = _ref.footer,
93
- background = _ref.background,
94
- alternatives = _ref.alternatives,
95
- current = _ref.current,
96
- active = _ref.active,
97
- preload = _ref.preload,
98
- type = _ref.type,
99
- className = _ref.className;
54
+ _ref$header = _ref.header,
55
+ header = _ref$header === void 0 ? null : _ref$header,
56
+ _ref$footer = _ref.footer,
57
+ footer = _ref$footer === void 0 ? null : _ref$footer,
58
+ _ref$background = _ref.background,
59
+ background = _ref$background === void 0 ? null : _ref$background,
60
+ _ref$alternatives = _ref.alternatives,
61
+ alternatives = _ref$alternatives === void 0 ? null : _ref$alternatives,
62
+ _ref$current = _ref.current,
63
+ current = _ref$current === void 0 ? true : _ref$current,
64
+ _ref$active = _ref.active,
65
+ active = _ref$active === void 0 ? true : _ref$active,
66
+ _ref$preload = _ref.preload,
67
+ preload = _ref$preload === void 0 ? true : _ref$preload,
68
+ _ref$type = _ref.type,
69
+ type = _ref$type === void 0 ? null : _ref$type,
70
+ _ref$className = _ref.className,
71
+ className = _ref$className === void 0 ? null : _ref$className;
100
72
  var trackScreenEvent = useTrackScreenEvent(type);
101
73
  var _useScreenSize = useScreenSize(),
102
74
  width = _useScreenSize.width,
@@ -548,16 +520,14 @@ var Timeline = function Timeline(_ref) {
548
520
  withoutVideo: isPreview,
549
521
  className: styles.background
550
522
  }) : null);
551
- };
552
- Timeline.propTypes = propTypes;
553
- Timeline.defaultProps = defaultProps;
523
+ }
554
524
 
555
- var TimelineIllustratedScreen = function TimelineIllustratedScreen(_ref) {
525
+ function TimelineIllustratedScreen(_ref) {
556
526
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
557
527
  return /*#__PURE__*/React.createElement(Timeline, Object.assign({}, props, {
558
528
  illustrated: true
559
529
  }));
560
- };
530
+ }
561
531
 
562
532
  var definition = [{
563
533
  id: 'timeline',
package/es/styles.css ADDED
@@ -0,0 +1 @@
1
+ .container{position:relative}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .empty{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);height:50px;margin:5px 10px 5px auto}.container .emptyTitle{width:100%}.container .item{position:relative}.container .element{display:-ms-flexbox;display:flex}.container .element.hidden .body{display:none;visibility:hidden}.container .timeline{-webkit-box-sizing:content-box;box-sizing:content-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:15px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;padding-right:20px}.container .line{width:1px;-ms-flex-positive:1;flex-grow:1}.container .line.hidden{width:auto}.container .bullet{border-style:solid;border-width:1px;height:15px;margin:2px 0;width:15px}.container .body{-ms-flex-positive:1;flex-grow:1}.container .description,.container .imageContainer,.container .title{padding:8px 0}.container .image,.container .imageContainer,.container .video{position:relative}.container .imageContainer{overflow:hidden}.container .callToAction{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.container .callToAction a{padding:0}.container .callToAction.disabled{opacity:0;pointer-events:none}.container.isPlaceholder .scroll{padding:10px}.container.isPlaceholder .timeline{padding-right:0}.container.isPlaceholder .bullet{background-color:hsla(0,0%,100%,.6);border-color:hsla(0,0%,100%,.6);height:10px;mix-blend-mode:difference;width:10px}.container.isPlaceholder .description,.container.isPlaceholder .imageContainer,.container.isPlaceholder .title{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;-ms-flex-pack:center;justify-content:center;padding:2px 0}.container.isPlaceholder .line{background-color:hsla(0,0%,100%,.6);mix-blend-mode:difference}.container.circleBulletShape .bullet{border-radius:50%}.container.withoutLines .timeline{visibility:hidden}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-timeline",
3
- "version": "0.3.829",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -35,6 +35,7 @@
35
35
  "style": "assets/css/styles.css",
36
36
  "exports": {
37
37
  ".": {
38
+ "types": "./es/index.d.ts",
38
39
  "import": "./es/index.js"
39
40
  },
40
41
  "./assets/css/styles": "./assets/css/styles.css",
@@ -48,38 +49,38 @@
48
49
  "scripts": {
49
50
  "clean": "rm -rf es && rm -rf lib && rm -rf assets",
50
51
  "prepublishOnly": "npm run build",
51
- "build": "../../scripts/prepare-package.sh"
52
+ "build": "../../scripts/prepare-package.sh --types"
52
53
  },
53
54
  "devDependencies": {
54
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
55
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
55
+ "react": "^19.2.0",
56
+ "react-dom": "^18.3.0 || ^19.0.0"
56
57
  },
57
58
  "peerDependencies": {
58
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
59
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
59
+ "react": "^19.2.0",
60
+ "react-dom": "^18.3.0 || ^19.0.0"
60
61
  },
61
62
  "dependencies": {
62
63
  "@babel/runtime": "^7.13.10",
63
- "@micromag/core": "^0.3.824",
64
- "@micromag/element-background": "^0.3.824",
65
- "@micromag/element-container": "^0.3.824",
66
- "@micromag/element-footer": "^0.3.829",
67
- "@micromag/element-header": "^0.3.824",
68
- "@micromag/element-heading": "^0.3.824",
69
- "@micromag/element-layout": "^0.3.824",
70
- "@micromag/element-scroll": "^0.3.824",
71
- "@micromag/element-text": "^0.3.824",
72
- "@micromag/element-visual": "^0.3.824",
73
- "@micromag/transforms": "^0.3.824",
64
+ "@micromag/core": "^0.4.4",
65
+ "@micromag/element-background": "^0.4.4",
66
+ "@micromag/element-container": "^0.4.4",
67
+ "@micromag/element-footer": "^0.4.4",
68
+ "@micromag/element-header": "^0.4.4",
69
+ "@micromag/element-heading": "^0.4.4",
70
+ "@micromag/element-layout": "^0.4.4",
71
+ "@micromag/element-scroll": "^0.4.4",
72
+ "@micromag/element-text": "^0.4.4",
73
+ "@micromag/element-visual": "^0.4.4",
74
+ "@micromag/transforms": "^0.4.4",
74
75
  "classnames": "^2.2.6",
75
- "lodash": "^4.17.21",
76
- "prop-types": "^15.7.2",
77
- "react-intl": "^6.6.4",
76
+ "lodash": "^4.17.23",
77
+ "react-intl": "^8.1.3",
78
78
  "uuid": "^9.0.0"
79
79
  },
80
80
  "publishConfig": {
81
81
  "access": "public",
82
82
  "registry": "https://registry.npmjs.org/"
83
83
  },
84
- "gitHead": "35fb9241ce6f9580397150bd05115f9a6f4048c8"
84
+ "gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
85
+ "types": "es/index.d.ts"
85
86
  }