@ausbom/time-scrubber 0.6.0 → 0.7.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.
|
@@ -10,5 +10,5 @@ color=_styles.palette.primary.electricBlue}// Initialize the ariaLabel with the
|
|
|
10
10
|
var ariaLabel=step.displayLabel;// Check if the status of the step is 'missing'.
|
|
11
11
|
if(step.status==="missing"){// If the status is 'missing', append the status to the ariaLabel,
|
|
12
12
|
// separated by a comma and a space for better readability by screen readers.
|
|
13
|
-
ariaLabel+=", ".concat(step.status)}return/*#__PURE__*/_react["default"].createElement("div",{role:"button","aria-label":ariaLabel,className:(0,_classnames["default"])("bom-scrub-tl__track-segment",{"bom-scrub-tl__track-segment--marker":!!step.markerLabel}),"data-testid":"bom-scrub-segment",key:step.id,style:{background:color},onClick:function onClick(){onScrub(timeSteps[i])}},i===activeIndex&&playState===_types.ScrubberState.PLAYING&&/*#__PURE__*/ // NOTE: Pass the animateProgress prop as true to enable animation of segments (Beware, this is browser intensive)
|
|
13
|
+
ariaLabel+=", ".concat(step.status)}return/*#__PURE__*/_react["default"].createElement("div",{role:"button","data-id":step.id,"data-value":i,"aria-label":ariaLabel,className:(0,_classnames["default"])("bom-scrub-tl__track-segment",{"bom-scrub-tl__track-segment--marker":!!step.markerLabel}),"data-testid":"bom-scrub-segment",key:step.id,style:{background:color},onClick:function onClick(){onScrub(timeSteps[i])}},i===activeIndex&&playState===_types.ScrubberState.PLAYING&&/*#__PURE__*/ // NOTE: Pass the animateProgress prop as true to enable animation of segments (Beware, this is browser intensive)
|
|
14
14
|
_react["default"].createElement(_SubScrub["default"],{active:playState===_types.ScrubberState.PLAYING,getProgress:function getProgress(){var timePassed=Date.now()-_this2.stepStartTime;return timePassed/timePerStep}}))}),activeStepInRange&&/*#__PURE__*/_react["default"].createElement(_Thumb["default"],{label:activeStepObj?activeStepObj.displayLabel:null,xPos:"".concat(100/timeSteps.length*activeIndex+100/timeSteps.length/2,"%"),onGoLeft:function onGoLeft(){onScrub(_this2.getPreviousStep())},onGoRight:function onGoRight(){onScrub(_this2.getNextStep())}})))}}]);return Timeline}(_react["default"].Component);(0,_defineProperty2["default"])(Timeline,"defaultProps",{});var _default=Timeline;exports["default"]=_default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ausbom/time-scrubber",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@ausbom/styles": "^0.13.0",
|
|
43
43
|
"lodash.debounce": "4.0.8"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e1aa58f420f563d78420697bf81eb7e4bb43edac"
|
|
46
46
|
}
|