@s-ui/react-atom-progress-bar
Advanced tools
Comparing version 2.6.0 to 2.7.0
# CHANGELOG | ||
# 2.7.0 (2022-03-21) | ||
### Bug Fixes | ||
* **components/atom/progressBar:** minor fixes ([a79a0bc](https://github.com/SUI-Components/sui-components/commit/a79a0bc3301e8700679badb7b82b6ceb8f654e45)) | ||
* **components/atom/progressBar:** minor fixes ([116209a](https://github.com/SUI-Components/sui-components/commit/116209ae6cfcbec36013480251124304219b7206)) | ||
# 2.6.0 (2022-01-28) | ||
@@ -4,0 +14,0 @@ |
@@ -7,3 +7,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import ProgressBarLine from './ProgressBarLine/index.js'; | ||
import { TYPES, SIZES } from './settings.js'; | ||
import { TYPES, SIZES, STATUS } from './settings.js'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
@@ -33,6 +33,6 @@ | ||
AtomProgressBar.defaultProps = { | ||
size: SIZES.LARGE, | ||
type: TYPES.LINE | ||
type: TYPES.LINE, | ||
status: STATUS.PROGRESS | ||
}; | ||
export default AtomProgressBar; | ||
export { TYPES as atomProgressBarTypes, SIZES as atomProgressBarSizes }; | ||
export { TYPES as atomProgressBarTypes, SIZES as atomProgressBarSizes, STATUS as atomProgressBarStatus }; |
import PropTypes from 'prop-types'; | ||
import cx from 'classnames'; | ||
import Circle from './Circle/index.js'; | ||
import { BASE_CLASS_NAME, SIZES, STATUS, SIZE_TO_WIDTH_LINE_MAP } from './settings.js'; | ||
import { BASE_CLASS_NAME, SIZE_TO_WIDTH_LINE_MAP } from './settings.js'; | ||
import { STATUS, SIZES } from '../settings.js'; | ||
import Indicator from './Indicator.js'; | ||
@@ -41,4 +42,5 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
status: STATUS.PROGRESS, | ||
hideIndicator: false | ||
hideIndicator: false, | ||
size: SIZES.LARGE | ||
}; | ||
export default ProgressBarCircle; |
import PropTypes from 'prop-types'; | ||
import cx from 'classnames'; | ||
import { INDICATOR_CLASS_NAME, SIZES, STATUS } from './settings.js'; | ||
import { SIZES, STATUS } from '../settings.js'; | ||
import { INDICATOR_CLASS_NAME } from './settings.js'; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
@@ -5,0 +6,0 @@ |
var _SIZE_TO_WIDTH_LINE_M; | ||
import { BASE_CLASS } from '../settings.js'; | ||
import { BASE_CLASS, SIZES } from '../settings.js'; | ||
export var BASE_CLASS_NAME = BASE_CLASS + "Circle"; | ||
export var INDICATOR_CLASS_NAME = BASE_CLASS_NAME + "-indicator"; | ||
export var SIZES = { | ||
LARGE: 'large', | ||
MEDIUM: 'medium', | ||
SMALL: 'small' | ||
}; | ||
export var STATUS = { | ||
LOADING: 'loading', | ||
PROGRESS: 'progress', | ||
ERROR: 'error' | ||
}; | ||
export var SIZE_TO_WIDTH_LINE_MAP = (_SIZE_TO_WIDTH_LINE_M = {}, _SIZE_TO_WIDTH_LINE_M[SIZES.LARGE] = 4, _SIZE_TO_WIDTH_LINE_M[SIZES.MEDIUM] = 8, _SIZE_TO_WIDTH_LINE_M[SIZES.SMALL] = 8, _SIZE_TO_WIDTH_LINE_M); |
import PropTypes from 'prop-types'; | ||
import cx from 'classnames'; | ||
import { BASE_CLASS, BASE_CLASS_LINE, CLASS_CONTAINER_BAR, BASE_CLASS_LINE_SIMPLE, BASE_CLASS_LINE_DOUBLE } from './settings.js'; | ||
import Line from './Line.js'; | ||
import { BASE_CLASS, CLASS_CONTAINER_BAR, BASE_CLASS_LINE_SIMPLE, BASE_CLASS_LINE_DOUBLE } from './settings.js'; | ||
import useIndicator from './useIndicator.js'; | ||
import usePercentage from './usePercentage.js'; | ||
import { SIZES, STATUS } from '../settings.js'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
@@ -11,2 +12,4 @@ import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
var ProgressBarLine = function ProgressBarLine(_ref) { | ||
var _cx; | ||
var hideIndicator = _ref.hideIndicator, | ||
@@ -18,3 +21,6 @@ indicatorBottom = _ref.indicatorBottom, | ||
mainBarPercentage = _ref.mainBarPercentage, | ||
extraBarPercentage = _ref.extraBarPercentage; | ||
extraBarPercentage = _ref.extraBarPercentage, | ||
status = _ref.status, | ||
_ref$size = _ref.size, | ||
size = _ref$size === void 0 ? SIZES.MEDIUM : _ref$size; | ||
var percentageArray = usePercentage({ | ||
@@ -38,5 +44,5 @@ percentage: percentage, | ||
children: [!hideIndicator && !indicatorBottom && indicatorTopElement, /*#__PURE__*/_jsx("div", { | ||
className: CLASS_CONTAINER_BAR, | ||
className: cx(CLASS_CONTAINER_BAR, (_cx = {}, _cx[CLASS_CONTAINER_BAR + "--size-" + size] = size, _cx)), | ||
children: percentageArray.map(function (percentageValue, currentIndex, array) { | ||
var _cx; | ||
var _cx2; | ||
@@ -46,3 +52,3 @@ var index = array.length - 1 - currentIndex; | ||
return /*#__PURE__*/_jsx(Line, { | ||
className: cx((_cx = {}, _cx[BASE_CLASS_LINE_SIMPLE] = array.length === 1, _cx[BASE_CLASS_LINE_DOUBLE] = array.length === 2, _cx)), | ||
className: cx((_cx2 = {}, _cx2[BASE_CLASS_LINE_SIMPLE] = array.length === 1, _cx2[BASE_CLASS_LINE_DOUBLE] = array.length === 2, _cx2[BASE_CLASS_LINE + "--status-" + status] = status, _cx2)), | ||
isAnimatedOnChange: isAnimatedOnChange, | ||
@@ -49,0 +55,0 @@ percentage: array[index], |
@@ -8,4 +8,10 @@ export var BASE_CLASS = 'sui-AtomProgressBarV2'; | ||
export var SIZES = { | ||
LARGE: 'large', | ||
SMALL: 'small' | ||
SMALL: 'small', | ||
MEDIUM: 'medium', | ||
LARGE: 'large' | ||
}; | ||
export var STATUS = { | ||
LOADING: 'loading', | ||
PROGRESS: 'progress', | ||
ERROR: 'error' | ||
}; |
{ | ||
"name": "@s-ui/react-atom-progress-bar", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
35972
320
0