@hitachivantara/uikit-react-lab 3.51.0 → 3.51.3
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/dist/NotificationPanel/NotificationPanel.js +27 -129
- package/dist/NotificationPanel/NotificationPanel.js.map +1 -1
- package/dist/Slider/Slider.js +11 -17
- package/dist/Slider/Slider.js.map +1 -1
- package/dist/Slider/base.js +260 -0
- package/dist/Slider/base.js.map +1 -0
- package/dist/Slider/styles.js +5 -2
- package/dist/Slider/styles.js.map +1 -1
- package/dist/legacy/NotificationPanel/NotificationPanel.js +20 -109
- package/dist/legacy/NotificationPanel/NotificationPanel.js.map +1 -1
- package/dist/legacy/Slider/Slider.js +11 -4
- package/dist/legacy/Slider/Slider.js.map +1 -1
- package/dist/legacy/Slider/base.js +252 -0
- package/dist/legacy/Slider/base.js.map +1 -0
- package/dist/legacy/Slider/styles.js +5 -2
- package/dist/legacy/Slider/styles.js.map +1 -1
- package/dist/modern/NotificationPanel/NotificationPanel.js +1 -45
- package/dist/modern/NotificationPanel/NotificationPanel.js.map +1 -1
- package/dist/modern/Slider/Slider.js +11 -3
- package/dist/modern/Slider/Slider.js.map +1 -1
- package/dist/modern/Slider/base.js +252 -0
- package/dist/modern/Slider/base.js.map +1 -0
- package/dist/modern/Slider/styles.js +4 -1
- package/dist/modern/Slider/styles.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["React","PropTypes","Range","Handle","Tooltip","withStyles","KnobRing","styleCreator","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","Component","propTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","any","defaultProps","name","withTheme"],"sources":["../../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n\n import(\"rc-slider/assets/index.css\");\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,KAAT,EAAgBC,MAAhB,QAA8B,WAA9B;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B;EAAA,OACtCC,IAAI,CAACC,KAAL,CAAW,CAACJ,WAAW,GAAGC,aAAf,IAAgCC,gBAA3C,CADsC;AAAA,CAAxC;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMG,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,MAAD,EAASJ,gBAAT,EAA2BD,aAA3B,EAA6C;EAC1E,IAAMM,cAAc,GAAG,EAAvB;EACAD,MAAM,CAACE,OAAP,CAAe,UAACC,KAAD,EAAQC,KAAR,EAAkB;IAC/BH,cAAc,CAACG,KAAD,CAAd,GAAwBX,+BAA+B,CAACU,KAAD,EAAQR,aAAR,EAAuBC,gBA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AAA,OAAUA,IAAV;EAAA,CALU;EAMtB2C,aAAa,EAAE,uBAAC3C,IAAD;IAAA,OAAUA,IAAV;EAAA,CANO;EAOtBX,cAAc,EAAE,EAPM;EAQtBN,gBAAgB,EAAE,GARI;EAStBZ,aAAa,EAAE,CATO;EAUtBW,aAAa,EAAE,GAVO;EAWtB2D,cAAc,EAAE,0BAAM,CAAE,CAXF;EAYtBJ,QAAQ,EAAE,oBAAM,CAAE,CAZI;EAatBK,aAAa,EAAE,yBAAM,CAAE;AAbD,CAAxB;AAgBA,eAAe5E,UAAU,CAACE,YAAD,EAAe;EAAE+G,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAf,CAAV,CAAgE/F,QAAhE,CAAf"}
|
|
1
|
+
{"version":3,"file":"Slider.js","names":["React","PropTypes","Range","Handle","Tooltip","withStyles","KnobRing","styleCreator","scaledValueToKnobsPositionValue","scaledValue","minPointValue","inverseStepValue","Math","floor","transformKnobsPosition","values","knobsPositions","forEach","value","index","calculateStepValue","maxPointValue","divisionQuantity","abs","HvSlider","props","sliderValue","stepValue","markProperties","markstep","markDigits","formatMark","styles","marks","length","markProperty","position","label","style","mark","roundedMarkStep","labelValue","knobsPositionToScaledValue","toFixed","knobProperties","trackStyles","knobProperty","track","color","backgroundColor","trackColor","knobInner","knobOuterStyle","lastItem","knobOuter","hidden","knobHidden","knobHiddenLast","knobsCurrentPosition","newKnobsPosition","slice","knobsValues","noOverlap","state","duplicatedValue","findDuplicated","filter","item","indexOf","array","newArray","newPosition","previousValue","knobsPosition","knobs","generateKnobsPositionAndValues","onChange","defaultValues","fixed","setState","onBeforeChange","onAfterChange","formatTooltip","classes","dragging","restProps","knobValue","dragColor","sliderTooltip","hoverColor","markStep","theme","createTrackStyles","knobStyles","createKnobStyles","rangesCount","createMark","defaultKnobsPositions","sliderBase","createKnob","root","dot","onChangeHandler","onBeforeChangeHandler","onAfterChangeHandler","undefined","rail","Component","propTypes","arrayOf","number","isRequired","shape","string","defaultValue","bool","func","tooltipBase","any","defaultProps","name","withTheme"],"sources":["../../../src/Slider/Slider.js"],"sourcesContent":["/**\n * Note: https://github.com/react-component/slider/issues/504\n * Version must remain in \"8.6.3\" until this bug is fixed\n */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Range, Handle } from \"rc-slider\";\nimport Tooltip from \"rc-tooltip\";\nimport { withStyles } from \"@material-ui/core\";\nimport KnobRing from \"./KnobRing\";\nimport styleCreator from \"./styles\";\n\n/**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} scaledValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in\n * the slider from left to right.\n * @param {*} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n */\nconst scaledValueToKnobsPositionValue = (scaledValue, minPointValue, inverseStepValue) =>\n Math.floor((scaledValue - minPointValue) * inverseStepValue);\n\n/**\n * Transform the received knobs values into knob positions\n *\n * @param {Object} values - The values of the slider.\n * @param {Number} inverseStepValue - The inverse of calculated separation between\n * the value of the points that compose the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @returns {Array} - The position of the knobs.\n */\nconst transformKnobsPosition = (values, inverseStepValue, minPointValue) => {\n const knobsPositions = [];\n values.forEach((value, index) => {\n knobsPositions[index] = scaledValueToKnobsPositionValue(value, minPointValue, inverseStepValue);\n });\n return knobsPositions;\n};\n\n/**\n * Calculates the separation between each value in the slider.\n *\n * @param {*} maxPointValue - The value of the last point in the slider from left to right.\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} divisionQuantity - How many subdivisions there are in the slider.\n */\nconst calculateStepValue = (maxPointValue, minPointValue, divisionQuantity) =>\n Math.abs(maxPointValue - minPointValue) / divisionQuantity;\n\n/**\n * Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters. Still in development\n */\nclass HvSlider extends React.Component {\n constructor(props) {\n super(props);\n\n const {\n markProperties,\n markStep,\n markDigits,\n knobProperties,\n values,\n defaultValues,\n theme,\n maxPointValue,\n minPointValue,\n divisionQuantity,\n formatMark,\n } = props;\n\n const styles = styleCreator(theme);\n const stepValue = calculateStepValue(maxPointValue, minPointValue, divisionQuantity);\n const inverseStepValue = 1 / stepValue;\n\n this.state = {\n knobsPositions: transformKnobsPosition(\n values.length > 0 ? values : defaultValues,\n inverseStepValue,\n minPointValue\n ),\n trackStyles: this.createTrackStyles(knobProperties, styles),\n knobStyles: this.createKnobStyles(knobProperties, styles),\n rangesCount: knobProperties.length - 1,\n marks: this.createMark(\n markProperties,\n markStep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ),\n defaultKnobsPositions: transformKnobsPosition(defaultValues, inverseStepValue, minPointValue),\n styles,\n stepValue,\n inverseStepValue,\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n const stepValue = calculateStepValue(\n props.maxPointValue,\n props.minPointValue,\n props.divisionQuantity\n );\n\n if (props.values.length > 0) {\n return {\n ...state,\n knobsPositions: transformKnobsPosition(\n props.values.length > 0 ? props.values : props.defaultValues,\n 1 / stepValue,\n props.minPointValue\n ),\n };\n }\n return null;\n }\n\n /**\n * Transform the scaled values into knobs positions.\n *\n * @param {*} sliderValue - the value of the slider to be scaled\n * @param {*} minPointValue - The value of the first point in the slider from left to right.\n * @param {*} stepValue - The calculated separation between the values of the slider.\n */\n knobsPositionToScaledValue = (sliderValue, minPointValue, stepValue) =>\n minPointValue + stepValue * sliderValue;\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} markProperties - The object provided by the user with\n * the desired configuration for the marks.\n * @param {Integer} markstep - The separation between marks.\n * @param {Integer} divisionQuantity - How many subdivisions there are in the slider.\n * @param {Integer} minPointValue - The value of the first point in the slider from\n * left to right.\n * @param {Integer} stepValue - The calculated separation between the values of the slider.\n * @param {Integer} markDigits - How many decimals the mark will show.\n * @param {Function} formatMark - A function provided by the user that is going to\n * be executed to format the mark text.\n * @param {Object} styles - the default styles for the marks.\n * @returns {Object} - An object with the for the marks.\n * @memberof HvSlider\n */\n createMark = (\n markProperties,\n markstep,\n divisionQuantity,\n minPointValue,\n stepValue,\n markDigits,\n formatMark,\n styles\n ) => {\n const marks = {};\n if (markProperties.length > 0) {\n markProperties.forEach((markProperty) => {\n marks[markProperty.position] = {\n label: `${markProperty.label}`,\n style: {\n ...styles.mark,\n },\n };\n });\n } else {\n const roundedMarkStep = Math.floor(markstep);\n for (let index = 0; index <= divisionQuantity; index += roundedMarkStep) {\n let labelValue = this.knobsPositionToScaledValue(index, minPointValue, stepValue).toFixed(\n markDigits\n );\n labelValue = formatMark(labelValue);\n marks[index] = {\n label: `${labelValue}`,\n style: {\n ...styles.mark,\n },\n };\n }\n }\n return marks;\n };\n\n /**\n * Generates the inline styles used for the track of each knob, applying colors if necessary.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the tracks.\n * @returns {Object} - An object with the style for each track.\n * @memberof HvSlider\n */\n createTrackStyles = (knobProperties, styles) => {\n const trackStyles = [];\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n trackStyles[index] = { ...styles.track };\n if (knobProperty.color) {\n trackStyles[index].backgroundColor = knobProperty.trackColor;\n }\n });\n }\n return trackStyles;\n };\n\n /**\n * Generates the inline styles used for each knob, applying colors if specified.\n *\n * @param {Object} knobProperties - The object provided by the user with\n * the desired configuration for the knobs.\n * @param {Object} styles - the default styles for the knobs.\n * @returns {Object} - An object with both the inner and outer styles for the knob.\n * @memberof HvSlider\n */\n createKnobStyles = (knobProperties, styles) => {\n const knobInner = [];\n const knobOuterStyle = [];\n\n const lastItem = knobProperties.length - 1;\n if (knobProperties.length > 1) {\n knobProperties.forEach((knobProperty, index) => {\n knobInner[index] = { ...styles.knobInner };\n knobOuterStyle[index] = { ...styles.knobOuter };\n\n if (knobProperty.color) {\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index].backgroundColor = \"transparent\";\n }\n\n if (knobProperty.hidden) {\n knobInner[index] = styles.knobHidden;\n if (index === lastItem) {\n knobInner[index] = { ...styles.knobHiddenLast };\n knobInner[index].backgroundColor = knobProperty.color;\n knobOuterStyle[index] = { ...styles.knobHidden };\n knobOuterStyle[index].backgroundColor = knobProperty.color;\n }\n }\n });\n }\n\n return {\n knobInner,\n knobOuterStyle,\n };\n };\n\n /**\n * Generates an object which posses the current value and position of the knobs.\n *\n * @param {Array} knobsCurrentPosition - An array containing the current positions of the knobs.\n * @returns {Object} - An object with the positions and values of the knobs.\n * @memberof HvSlider\n */\n generateKnobsPositionAndValues = (knobsCurrentPosition) => {\n const newKnobsPosition = knobsCurrentPosition.slice();\n const knobsValues = [];\n const { minPointValue, noOverlap } = this.props;\n const { stepValue, knobsPositions } = this.state;\n\n let duplicatedValue = null;\n\n const findDuplicated = newKnobsPosition.filter(\n (item, index) => newKnobsPosition.indexOf(item) !== index\n );\n\n if (noOverlap && findDuplicated.length > 0) {\n [duplicatedValue] = findDuplicated;\n }\n newKnobsPosition.forEach((position, index, array) => {\n const newArray = array;\n let newPosition = position;\n\n if (noOverlap && newPosition === duplicatedValue) {\n const previousValue = knobsPositions[index];\n if (previousValue !== newPosition) {\n newPosition += newPosition > previousValue ? -1 : 1;\n newArray[index] = newPosition;\n }\n }\n\n knobsValues[index] = this.knobsPositionToScaledValue(newPosition, minPointValue, stepValue);\n }, this);\n\n return {\n knobsPosition: newKnobsPosition,\n knobsValues,\n };\n };\n\n /**\n * Function executed while the knobs changes.\n *\n * executes the callback provided by the user with the values and position of the knobs,\n * also lock the value of the knob in case one is fixed.\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onChangeHandler = (knobsPosition) => {\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n const { knobProperties, onChange, minPointValue, defaultValues } = this.props;\n const { inverseStepValue } = this.state;\n knobProperties.forEach((knobProperty, index) => {\n if (knobProperty.fixed) {\n knobs.knobsPosition[index] = scaledValueToKnobsPositionValue(\n defaultValues[index],\n minPointValue,\n inverseStepValue\n );\n }\n });\n\n onChange(knobs);\n\n this.setState({\n knobsPositions: knobs.knobsPosition,\n });\n };\n\n /**\n * Function executed before a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onBeforeChangeHandler = (knobsPosition) => {\n const { onBeforeChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onBeforeChange(knobs);\n };\n\n /**\n * Function executed after a change.\n *\n * executes the callback provided by the user with the values and position of the knobs\n *\n * @param {Array} knobsPosition - An array containing the current positions of the knobs.\n * @memberof HvSlider\n */\n onAfterChangeHandler = (knobsPosition) => {\n const { onAfterChange } = this.props;\n const knobs = this.generateKnobsPositionAndValues(knobsPosition);\n onAfterChange(knobs);\n };\n\n /**\n * Function used to create a custom knob for the slider.\n *\n * TODO: This should be isolated because is creating a sub component,\n * but there were some problems regarding the underlying component losing\n * references of the handlers disabling the focus.\n *\n * @param {Object} props - An object containing the properties of the knobs.\n * @memberof HvSlider\n */\n createKnob = (props) => {\n const { minPointValue, markDigits, knobProperties, formatTooltip, classes } = this.props;\n const { stepValue } = this.state;\n const { value, dragging, index, style, ...restProps } = props;\n\n const knobValue = this.knobsPositionToScaledValue(value, minPointValue, stepValue).toFixed(\n markDigits\n );\n if (dragging) {\n style.backgroundColor = knobProperties[index].dragColor;\n } else {\n style.backgroundColor = knobProperties[index].color;\n }\n\n return (\n <Tooltip\n prefixCls=\"rc-slider-tooltip\"\n overlay={formatTooltip(knobValue)}\n visible={dragging}\n placement=\"top\"\n key={index}\n overlayClassName={classes.sliderTooltip}\n >\n <Handle value={value} style={style} {...restProps}>\n <KnobRing hoverColor={knobProperties[index].hoverColor} dragging={dragging} />\n </Handle>\n </Tooltip>\n );\n };\n\n render() {\n const { divisionQuantity, classes } = this.props;\n\n const {\n knobsPositions,\n defaultKnobsPositions,\n rangesCount,\n knobStyles,\n trackStyles,\n marks,\n styles,\n } = this.state;\n\n return (\n <div className={classes.sliderBase}>\n <Range\n handle={this.createKnob}\n className={classes.root}\n min={0}\n max={divisionQuantity}\n step={1}\n marks={marks}\n dotStyle={styles.dot}\n onChange={this.onChangeHandler}\n onBeforeChange={this.onBeforeChangeHandler}\n onAfterChange={this.onAfterChangeHandler}\n value={knobsPositions.length > 0 ? knobsPositions : undefined}\n allowCross={false}\n defaultValue={defaultKnobsPositions}\n count={rangesCount}\n railStyle={styles.rail}\n handleStyle={knobStyles.knobInner}\n trackStyle={trackStyles}\n />\n </div>\n );\n }\n}\n\nHvSlider.propTypes = {\n /**\n * The values array to apply to the component\n */\n values: PropTypes.arrayOf(PropTypes.number),\n /**\n * The default values array to apply to the component\n */\n defaultValues: PropTypes.arrayOf(PropTypes.number).isRequired,\n /**\n * The object used to set the knob properties,\n * for every item in the array a new knob will be created.\n */\n knobProperties: PropTypes.arrayOf(\n PropTypes.shape({\n color: PropTypes.string,\n defaultValue: PropTypes.number,\n hidden: PropTypes.bool,\n fixed: PropTypes.bool,\n hoverColor: PropTypes.string,\n trackColor: PropTypes.string,\n dragColor: PropTypes.string,\n })\n ).isRequired,\n /**\n * The object used to set the mark properties individually.\n */\n markProperties: PropTypes.arrayOf(\n PropTypes.shape({\n position: PropTypes.number,\n label: PropTypes.string,\n })\n ),\n /**\n * the function executed before a change will ocurr in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onBeforeChange: PropTypes.func,\n /**\n * the function executed while a change is ocurring in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onChange: PropTypes.func,\n /**\n * the function executed after a change ocurred in the slider.\n * it will receive an object like\n * {\n * knobsPosition: [],\n * knobsValues: []\n * }\n */\n onAfterChange: PropTypes.func,\n /**\n * the separation in points between marks.\n * example: if 10 divisions and a markstep of 2 there will be 5 marks.\n */\n markStep: PropTypes.number,\n /**\n * how many subdivisions there are in the slider.\n */\n divisionQuantity: PropTypes.number,\n /**\n * the value of the first point in the slider from left to right.\n */\n minPointValue: PropTypes.number,\n /**\n * the value of the last point in the slider from left to right.\n */\n maxPointValue: PropTypes.number,\n /**\n * the nax number of decimals if no format function is applied\n */\n markDigits: PropTypes.number,\n /**\n * a formatting function used to add format to the marks in the track,\n * the function receives the mark text\n */\n formatMark: PropTypes.func,\n /**\n * a formatting function used to add format to the tooltip in the track,\n * the function receives the mark text\n */\n formatTooltip: PropTypes.func,\n /**\n * if `true` the knobs can't have the same value, if `false` knobs can have the same value.\n */\n noOverlap: PropTypes.bool,\n /**\n * the classes object to be applied into the root object.\n */\n classes: PropTypes.shape({\n /**\n * Base slider styles to avoid the css import from node_modules and enable SSR support.\n * import(\"rc-slider/assets/index.css\")\n */\n sliderBase: PropTypes.string,\n tooltipBase: PropTypes.string,\n /**\n * Style applied to the root of the component.\n */\n root: PropTypes.string,\n /**\n * Style applied to the dot.\n */\n dot: PropTypes.string,\n /**\n * Style applied to the rail.\n */\n rail: PropTypes.string,\n /**\n * Style applied to the inner of the knob.\n */\n knobInner: PropTypes.string,\n /**\n * Style applied to the outside of the knob.\n */\n knobOuter: PropTypes.string,\n /**\n * Style applied when the knob is hidden.\n */\n knobHidden: PropTypes.string,\n /**\n * Style applied last hidden knob.\n */\n knobHiddenLast: PropTypes.string,\n /**\n * Style applied to the track.\n */\n track: PropTypes.string,\n /**\n * Style applied to the mark.\n */\n mark: PropTypes.string,\n /**\n * Style applied to the tooltip.\n */\n sliderTooltip: PropTypes.string,\n }).isRequired,\n\n theme: PropTypes.any.isRequired,\n};\n\nHvSlider.defaultProps = {\n markStep: 1,\n markDigits: 0,\n noOverlap: true,\n values: [],\n formatMark: (mark) => mark,\n formatTooltip: (mark) => mark,\n markProperties: [],\n divisionQuantity: 100,\n minPointValue: 0,\n maxPointValue: 100,\n onBeforeChange: () => {},\n onChange: () => {},\n onAfterChange: () => {},\n};\n\nexport default withStyles(styleCreator, { name: \"HvSlider\", withTheme: true })(HvSlider);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,KAAT,EAAgBC,MAAhB,QAA8B,WAA9B;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,YAAP,MAAyB,UAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMC,+BAA+B,GAAG,SAAlCA,+BAAkC,CAACC,WAAD,EAAcC,aAAd,EAA6BC,gBAA7B;EAAA,OACtCC,IAAI,CAACC,KAAL,CAAW,CAACJ,WAAW,GAAGC,aAAf,IAAgCC,gBAA3C,CADsC;AAAA,CAAxC;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMG,sBAAsB,GAAG,SAAzBA,sBAAyB,CAACC,MAAD,EAASJ,gBAAT,EAA2BD,aAA3B,EAA6C;EAC1E,IAAMM,cAAc,GAAG,EAAvB;EACAD,MAAM,CAACE,OAAP,CAAe,UAACC,KAAD,EAAQC,KAAR,EAAkB;IAC/BH,cAAc,CAACG,KAAD,CAAd,GAAwBX,+BAA+B,CAACU,KAAD,EAAQR,aAAR,EAAuBC,gBAAvB,CAAvD;EACD,CAFD;EAGA,OAAOK,cAAP;AACD,CAND;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,aAAD,EAAgBX,aAAhB,EAA+BY,gBAA/B;EAAA,OACzBV,IAAI,CAACW,GAAL,CAASF,aAAa,GAAGX,aAAzB,IAA0CY,gBADjB;AAAA,CAA3B;AAGA;AACA;AACA;;;IACME,Q;;;;;EACJ,kBAAYC,M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,aAAa,EAAE,GAVO;EAWtB2D,cAAc,EAAE,0BAAM,CAAE,CAXF;EAYtBJ,QAAQ,EAAE,oBAAM,CAAE,CAZI;EAatBK,aAAa,EAAE,yBAAM,CAAE;AAbD,CAAxB;AAgBA,eAAe5E,UAAU,CAACE,YAAD,EAAe;EAAEiH,IAAI,EAAE,UAAR;EAAoBC,SAAS,EAAE;AAA/B,CAAf,CAAV,CAAgEjG,QAAhE,CAAf"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
export var sliderBase = {
|
|
2
|
+
"& .rc-slider": {
|
|
3
|
+
position: "relative",
|
|
4
|
+
width: "100%",
|
|
5
|
+
height: "14px",
|
|
6
|
+
padding: " 5px 0",
|
|
7
|
+
borderRadius: "6px",
|
|
8
|
+
touchAction: "none",
|
|
9
|
+
boxSizing: "border-box",
|
|
10
|
+
"-webkit-tap-highlight-color": "rgba(0, 0, 0, 0)"
|
|
11
|
+
},
|
|
12
|
+
"& .rc-slider *": {
|
|
13
|
+
boxSizing: "border-box",
|
|
14
|
+
"-webkit-tap-highlight-color": "rgba(0, 0, 0, 0)"
|
|
15
|
+
},
|
|
16
|
+
"& .rc-slider-rail": {
|
|
17
|
+
position: "absolute",
|
|
18
|
+
width: "100%",
|
|
19
|
+
height: "4px",
|
|
20
|
+
backgroundColor: "#e9e9e9",
|
|
21
|
+
borderRadius: "6px"
|
|
22
|
+
},
|
|
23
|
+
"& .rc-slider-track": {
|
|
24
|
+
position: "absolute",
|
|
25
|
+
height: "4px",
|
|
26
|
+
backgroundColor: "#abe2fb",
|
|
27
|
+
borderRadius: "6px"
|
|
28
|
+
},
|
|
29
|
+
"& .rc-slider-handle": {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
width: "14px",
|
|
32
|
+
height: "14px",
|
|
33
|
+
marginTop: "-5px",
|
|
34
|
+
backgroundColor: "#fff",
|
|
35
|
+
border: "solid 2px #96dbfa",
|
|
36
|
+
borderRadius: "50%",
|
|
37
|
+
// cursor: "pointer",
|
|
38
|
+
// cursor: "-webkit-grab",
|
|
39
|
+
cursor: "grab",
|
|
40
|
+
opacity: 0.8,
|
|
41
|
+
touchAction: "pan-x"
|
|
42
|
+
},
|
|
43
|
+
"& .rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging": {
|
|
44
|
+
borderColor: "#57c5f7",
|
|
45
|
+
boxShadow: "0 0 0 5px #96dbfa"
|
|
46
|
+
},
|
|
47
|
+
"& .rc-slider-handle:focus": {
|
|
48
|
+
outline: "none",
|
|
49
|
+
boxShadow: "none"
|
|
50
|
+
},
|
|
51
|
+
"& .rc-slider-handle:focus-visible": {
|
|
52
|
+
borderColor: "#2db7f5",
|
|
53
|
+
boxShadow: "0 0 0 3px #96dbfa"
|
|
54
|
+
},
|
|
55
|
+
"& .rc-slider-handle-click-focused:focus": {
|
|
56
|
+
borderColor: "#96dbfa",
|
|
57
|
+
boxShadow: "unset"
|
|
58
|
+
},
|
|
59
|
+
"& .rc-slider-handle:hover": {
|
|
60
|
+
borderColor: "#57c5f7"
|
|
61
|
+
},
|
|
62
|
+
"& .rc-slider-handle:active": {
|
|
63
|
+
borderColor: "#57c5f7",
|
|
64
|
+
boxShadow: "0 0 5px #57c5f7",
|
|
65
|
+
// cursor: "-webkit-grabbing",
|
|
66
|
+
cursor: "grabbing"
|
|
67
|
+
},
|
|
68
|
+
"& .rc-slider-mark": {
|
|
69
|
+
position: "absolute",
|
|
70
|
+
top: "18px",
|
|
71
|
+
left: 0,
|
|
72
|
+
width: "100%",
|
|
73
|
+
fontSize: "12px"
|
|
74
|
+
},
|
|
75
|
+
"& .rc-slider-mark-text": {
|
|
76
|
+
position: "absolute",
|
|
77
|
+
display: "inline-block",
|
|
78
|
+
color: "#999",
|
|
79
|
+
textAlign: "center",
|
|
80
|
+
verticalAlign: "middle",
|
|
81
|
+
cursor: "pointer"
|
|
82
|
+
},
|
|
83
|
+
"& .rc-slider-mark-text-active": {
|
|
84
|
+
color: "#666"
|
|
85
|
+
},
|
|
86
|
+
"& .rc-slider-step": {
|
|
87
|
+
position: "absolute",
|
|
88
|
+
width: "100%",
|
|
89
|
+
height: "4px",
|
|
90
|
+
background: "transparent",
|
|
91
|
+
pointerEvents: "none"
|
|
92
|
+
},
|
|
93
|
+
"& .rc-slider-dot": {
|
|
94
|
+
position: "absolute",
|
|
95
|
+
bottom: "-2px",
|
|
96
|
+
width: "8px",
|
|
97
|
+
height: "8px",
|
|
98
|
+
verticalAlign: "middle",
|
|
99
|
+
backgroundColor: "#fff",
|
|
100
|
+
border: "2px solid #e9e9e9",
|
|
101
|
+
borderRadius: "50%",
|
|
102
|
+
cursor: "pointer"
|
|
103
|
+
},
|
|
104
|
+
"& .rc-slider-dot-active": {
|
|
105
|
+
borderColor: "#96dbfa"
|
|
106
|
+
},
|
|
107
|
+
"& .rc-slider-dot-reverse": {
|
|
108
|
+
marginRight: "-4px"
|
|
109
|
+
},
|
|
110
|
+
"& .rc-slider-disabled": {
|
|
111
|
+
backgroundColor: "#e9e9e9"
|
|
112
|
+
},
|
|
113
|
+
"& .rc-slider-disabled .rc-slider-track": {
|
|
114
|
+
backgroundColor: "#ccc"
|
|
115
|
+
},
|
|
116
|
+
"& .rc-slider-disabled .rc-slider-handle": {
|
|
117
|
+
backgroundColor: "#fff",
|
|
118
|
+
borderColor: "#ccc",
|
|
119
|
+
boxShadow: "none",
|
|
120
|
+
cursor: "not-allowed"
|
|
121
|
+
},
|
|
122
|
+
"&.rc-slider-disabled .rc-slider-dot": {
|
|
123
|
+
backgroundColor: "#fff",
|
|
124
|
+
borderColor: "#ccc",
|
|
125
|
+
boxShadow: "none",
|
|
126
|
+
cursor: "not-allowed"
|
|
127
|
+
},
|
|
128
|
+
"& .rc-slider-disabled .rc-slider-mark-text": {
|
|
129
|
+
cursor: "not-allowed !important"
|
|
130
|
+
},
|
|
131
|
+
"& .rc-slider-disabled .rc-slider-dot": {
|
|
132
|
+
cursor: "not-allowed !important"
|
|
133
|
+
},
|
|
134
|
+
"& .rc-slider-vertical": {
|
|
135
|
+
width: "14px",
|
|
136
|
+
height: "100%",
|
|
137
|
+
padding: "0 5px"
|
|
138
|
+
},
|
|
139
|
+
"& .rc-slider-vertical .rc-slider-rail": {
|
|
140
|
+
width: "4px",
|
|
141
|
+
height: "100%"
|
|
142
|
+
},
|
|
143
|
+
"& .rc-slider-vertical .rc-slider-track": {
|
|
144
|
+
bottom: 0,
|
|
145
|
+
left: "5px",
|
|
146
|
+
width: "4px"
|
|
147
|
+
},
|
|
148
|
+
"& .rc-slider-vertical .rc-slider-handle": {
|
|
149
|
+
marginTop: 0,
|
|
150
|
+
marginLeft: "-5px",
|
|
151
|
+
touchAction: "pan-y"
|
|
152
|
+
},
|
|
153
|
+
"& .rc-slider-vertical .rc-slider-mark": {
|
|
154
|
+
top: 0,
|
|
155
|
+
left: "18px",
|
|
156
|
+
height: "100%"
|
|
157
|
+
},
|
|
158
|
+
"& .rc-slider-vertical .rc-slider-step": {
|
|
159
|
+
width: "4px",
|
|
160
|
+
height: "100%"
|
|
161
|
+
},
|
|
162
|
+
"& .rc-slider-vertical .rc-slider-dot": {
|
|
163
|
+
marginLeft: "-2px"
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
export var tooltipBase = {
|
|
167
|
+
"@global": {
|
|
168
|
+
".rc-slider-tooltip-zoom-down-enter": {
|
|
169
|
+
display: "block !important",
|
|
170
|
+
animationDuration: "0.3s",
|
|
171
|
+
animationFillMode: "both",
|
|
172
|
+
animationPlayState: "paused",
|
|
173
|
+
transform: "scale(0, 0)",
|
|
174
|
+
animationTimingFunction: "cubic-bezier(0.23, 1, 0.32, 1)"
|
|
175
|
+
},
|
|
176
|
+
".rc-slider-tooltip-zoom-down-appear": {
|
|
177
|
+
display: "block !important",
|
|
178
|
+
animationDuration: "0.3s",
|
|
179
|
+
animationFillMode: "both",
|
|
180
|
+
animationPlayState: "paused"
|
|
181
|
+
},
|
|
182
|
+
".rc-slider-tooltip-zoom-down-leave": {
|
|
183
|
+
display: "block !important",
|
|
184
|
+
animationDuration: "0.3s",
|
|
185
|
+
animationFillMode: "both",
|
|
186
|
+
animationPlayState: "paused",
|
|
187
|
+
animationTimingFunction: "cubic-bezier(0.755, 0.05, 0.855, 0.06)"
|
|
188
|
+
},
|
|
189
|
+
".rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active": {
|
|
190
|
+
animationName: "rcSliderTooltipZoomDownIn",
|
|
191
|
+
animationPlayState: "running"
|
|
192
|
+
},
|
|
193
|
+
".rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active": {
|
|
194
|
+
animationName: "rcSliderTooltipZoomDownIn",
|
|
195
|
+
animationPlayState: "running"
|
|
196
|
+
},
|
|
197
|
+
".rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active": {
|
|
198
|
+
animationName: "rcSliderTooltipZoomDownOut",
|
|
199
|
+
animationPlayState: "running"
|
|
200
|
+
},
|
|
201
|
+
" .rc-slider-tooltip-zoom-down-appear": {
|
|
202
|
+
transform: "scale(0, 0)",
|
|
203
|
+
animationTimingFunction: "cubic-bezier(0.23, 1, 0.32, 1)"
|
|
204
|
+
},
|
|
205
|
+
".rc-slider-tooltip": {
|
|
206
|
+
position: "absolute",
|
|
207
|
+
top: "-9999px",
|
|
208
|
+
left: "-9999px",
|
|
209
|
+
visibility: "visible",
|
|
210
|
+
boxSizing: "border-box",
|
|
211
|
+
"-webkit-tap-highlight-color": "rgba(0, 0, 0, 0)"
|
|
212
|
+
},
|
|
213
|
+
".rc-slider-tooltip *": {
|
|
214
|
+
boxSizing: "border-box",
|
|
215
|
+
"-webkit-tap-highlight-color": "rgba(0, 0, 0, 0)"
|
|
216
|
+
},
|
|
217
|
+
".rc-slider-tooltip-hidden": {
|
|
218
|
+
display: "none"
|
|
219
|
+
},
|
|
220
|
+
".rc-slider-tooltip-placement-top": {
|
|
221
|
+
padding: "4px 0 8px 0"
|
|
222
|
+
},
|
|
223
|
+
".rc-slider-tooltip-inner": {
|
|
224
|
+
minWidth: "24px",
|
|
225
|
+
height: "24px",
|
|
226
|
+
padding: "6px 2px",
|
|
227
|
+
color: "#fff",
|
|
228
|
+
fontSize: "12px",
|
|
229
|
+
lineHeight: 1,
|
|
230
|
+
textAlign: "center",
|
|
231
|
+
textDecoration: "none",
|
|
232
|
+
backgroundColor: "#6c6c6c",
|
|
233
|
+
borderRadius: "6px",
|
|
234
|
+
boxShadow: "0 0 4px #d9d9d9"
|
|
235
|
+
},
|
|
236
|
+
".rc-slider-tooltip-arrow": {
|
|
237
|
+
position: "absolute",
|
|
238
|
+
width: 0,
|
|
239
|
+
height: 0,
|
|
240
|
+
borderColor: "transparent",
|
|
241
|
+
borderStyle: "solid"
|
|
242
|
+
},
|
|
243
|
+
".rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow": {
|
|
244
|
+
bottom: "4px",
|
|
245
|
+
left: "50%",
|
|
246
|
+
marginLeft: "-4px",
|
|
247
|
+
borderWidth: "4px 4px 0",
|
|
248
|
+
borderTopColor: "#6c6c6c"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","names":["sliderBase","position","width","height","padding","borderRadius","touchAction","boxSizing","backgroundColor","marginTop","border","cursor","opacity","borderColor","boxShadow","outline","top","left","fontSize","display","color","textAlign","verticalAlign","background","pointerEvents","bottom","marginRight","marginLeft","tooltipBase","animationDuration","animationFillMode","animationPlayState","transform","animationTimingFunction","animationName","visibility","minWidth","lineHeight","textDecoration","borderStyle","borderWidth","borderTopColor"],"sources":["../../../src/Slider/base.js"],"sourcesContent":["export const sliderBase = {\n \"& .rc-slider\": {\n position: \"relative\",\n width: \"100%\",\n height: \"14px\",\n padding: \" 5px 0\",\n borderRadius: \"6px\",\n touchAction: \"none\",\n boxSizing: \"border-box\",\n \"-webkit-tap-highlight-color\": \"rgba(0, 0, 0, 0)\",\n },\n \"& .rc-slider *\": {\n boxSizing: \"border-box\",\n \"-webkit-tap-highlight-color\": \"rgba(0, 0, 0, 0)\",\n },\n \"& .rc-slider-rail\": {\n position: \"absolute\",\n width: \"100%\",\n height: \"4px\",\n backgroundColor: \"#e9e9e9\",\n borderRadius: \"6px\",\n },\n \"& .rc-slider-track\": {\n position: \"absolute\",\n height: \"4px\",\n backgroundColor: \"#abe2fb\",\n borderRadius: \"6px\",\n },\n \"& .rc-slider-handle\": {\n position: \"absolute\",\n width: \"14px\",\n height: \"14px\",\n marginTop: \"-5px\",\n backgroundColor: \"#fff\",\n border: \"solid 2px #96dbfa\",\n borderRadius: \"50%\",\n // cursor: \"pointer\",\n // cursor: \"-webkit-grab\",\n cursor: \"grab\",\n opacity: 0.8,\n touchAction: \"pan-x\",\n },\n \"& .rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging\": {\n borderColor: \"#57c5f7\",\n boxShadow: \"0 0 0 5px #96dbfa\",\n },\n \"& .rc-slider-handle:focus\": {\n outline: \"none\",\n boxShadow: \"none\",\n },\n \"& .rc-slider-handle:focus-visible\": {\n borderColor: \"#2db7f5\",\n boxShadow: \"0 0 0 3px #96dbfa\",\n },\n \"& .rc-slider-handle-click-focused:focus\": {\n borderColor: \"#96dbfa\",\n boxShadow: \"unset\",\n },\n \"& .rc-slider-handle:hover\": {\n borderColor: \"#57c5f7\",\n },\n \"& .rc-slider-handle:active\": {\n borderColor: \"#57c5f7\",\n boxShadow: \"0 0 5px #57c5f7\",\n // cursor: \"-webkit-grabbing\",\n cursor: \"grabbing\",\n },\n \"& .rc-slider-mark\": {\n position: \"absolute\",\n top: \"18px\",\n left: 0,\n width: \"100%\",\n fontSize: \"12px\",\n },\n \"& .rc-slider-mark-text\": {\n position: \"absolute\",\n display: \"inline-block\",\n color: \"#999\",\n textAlign: \"center\",\n verticalAlign: \"middle\",\n cursor: \"pointer\",\n },\n \"& .rc-slider-mark-text-active\": {\n color: \"#666\",\n },\n \"& .rc-slider-step\": {\n position: \"absolute\",\n width: \"100%\",\n height: \"4px\",\n background: \"transparent\",\n pointerEvents: \"none\",\n },\n \"& .rc-slider-dot\": {\n position: \"absolute\",\n bottom: \"-2px\",\n width: \"8px\",\n height: \"8px\",\n verticalAlign: \"middle\",\n backgroundColor: \"#fff\",\n border: \"2px solid #e9e9e9\",\n borderRadius: \"50%\",\n cursor: \"pointer\",\n },\n \"& .rc-slider-dot-active\": {\n borderColor: \"#96dbfa\",\n },\n \"& .rc-slider-dot-reverse\": {\n marginRight: \"-4px\",\n },\n \"& .rc-slider-disabled\": {\n backgroundColor: \"#e9e9e9\",\n },\n \"& .rc-slider-disabled .rc-slider-track\": {\n backgroundColor: \"#ccc\",\n },\n \"& .rc-slider-disabled .rc-slider-handle\": {\n backgroundColor: \"#fff\",\n borderColor: \"#ccc\",\n boxShadow: \"none\",\n cursor: \"not-allowed\",\n },\n \"&.rc-slider-disabled .rc-slider-dot\": {\n backgroundColor: \"#fff\",\n borderColor: \"#ccc\",\n boxShadow: \"none\",\n cursor: \"not-allowed\",\n },\n \"& .rc-slider-disabled .rc-slider-mark-text\": {\n cursor: \"not-allowed !important\",\n },\n \"& .rc-slider-disabled .rc-slider-dot\": {\n cursor: \"not-allowed !important\",\n },\n \"& .rc-slider-vertical\": {\n width: \"14px\",\n height: \"100%\",\n padding: \"0 5px\",\n },\n \"& .rc-slider-vertical .rc-slider-rail\": {\n width: \"4px\",\n height: \"100%\",\n },\n \"& .rc-slider-vertical .rc-slider-track\": {\n bottom: 0,\n left: \"5px\",\n width: \"4px\",\n },\n \"& .rc-slider-vertical .rc-slider-handle\": {\n marginTop: 0,\n marginLeft: \"-5px\",\n touchAction: \"pan-y\",\n },\n \"& .rc-slider-vertical .rc-slider-mark\": {\n top: 0,\n left: \"18px\",\n height: \"100%\",\n },\n \"& .rc-slider-vertical .rc-slider-step\": {\n width: \"4px\",\n height: \"100%\",\n },\n \"& .rc-slider-vertical .rc-slider-dot\": {\n marginLeft: \"-2px\",\n },\n};\n\nexport const tooltipBase = {\n \"@global\": {\n \".rc-slider-tooltip-zoom-down-enter\": {\n display: \"block !important\",\n animationDuration: \"0.3s\",\n animationFillMode: \"both\",\n animationPlayState: \"paused\",\n transform: \"scale(0, 0)\",\n animationTimingFunction: \"cubic-bezier(0.23, 1, 0.32, 1)\",\n },\n \".rc-slider-tooltip-zoom-down-appear\": {\n display: \"block !important\",\n animationDuration: \"0.3s\",\n animationFillMode: \"both\",\n animationPlayState: \"paused\",\n },\n \".rc-slider-tooltip-zoom-down-leave\": {\n display: \"block !important\",\n animationDuration: \"0.3s\",\n animationFillMode: \"both\",\n animationPlayState: \"paused\",\n animationTimingFunction: \"cubic-bezier(0.755, 0.05, 0.855, 0.06)\",\n },\n \".rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active\": {\n animationName: \"rcSliderTooltipZoomDownIn\",\n animationPlayState: \"running\",\n },\n \".rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active\": {\n animationName: \"rcSliderTooltipZoomDownIn\",\n animationPlayState: \"running\",\n },\n \".rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active\": {\n animationName: \"rcSliderTooltipZoomDownOut\",\n animationPlayState: \"running\",\n },\n \" .rc-slider-tooltip-zoom-down-appear\": {\n transform: \"scale(0, 0)\",\n animationTimingFunction: \"cubic-bezier(0.23, 1, 0.32, 1)\",\n },\n \".rc-slider-tooltip\": {\n position: \"absolute\",\n top: \"-9999px\",\n left: \"-9999px\",\n visibility: \"visible\",\n boxSizing: \"border-box\",\n \"-webkit-tap-highlight-color\": \"rgba(0, 0, 0, 0)\",\n },\n \".rc-slider-tooltip *\": {\n boxSizing: \"border-box\",\n \"-webkit-tap-highlight-color\": \"rgba(0, 0, 0, 0)\",\n },\n \".rc-slider-tooltip-hidden\": {\n display: \"none\",\n },\n \".rc-slider-tooltip-placement-top\": {\n padding: \"4px 0 8px 0\",\n },\n \".rc-slider-tooltip-inner\": {\n minWidth: \"24px\",\n height: \"24px\",\n padding: \"6px 2px\",\n color: \"#fff\",\n fontSize: \"12px\",\n lineHeight: 1,\n textAlign: \"center\",\n textDecoration: \"none\",\n backgroundColor: \"#6c6c6c\",\n borderRadius: \"6px\",\n boxShadow: \"0 0 4px #d9d9d9\",\n },\n \".rc-slider-tooltip-arrow\": {\n position: \"absolute\",\n width: 0,\n height: 0,\n borderColor: \"transparent\",\n borderStyle: \"solid\",\n },\n \".rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow\": {\n bottom: \"4px\",\n left: \"50%\",\n marginLeft: \"-4px\",\n borderWidth: \"4px 4px 0\",\n borderTopColor: \"#6c6c6c\",\n },\n },\n};\n"],"mappings":"AAAA,OAAO,IAAMA,UAAU,GAAG;EACxB,gBAAgB;IACdC,QAAQ,EAAE,UADI;IAEdC,KAAK,EAAE,MAFO;IAGdC,MAAM,EAAE,MAHM;IAIdC,OAAO,EAAE,QAJK;IAKdC,YAAY,EAAE,KALA;IAMdC,WAAW,EAAE,MANC;IAOdC,SAAS,EAAE,YAPG;IAQd,+BAA+B;EARjB,CADQ;EAWxB,kBAAkB;IAChBA,SAAS,EAAE,YADK;IAEhB,+BAA+B;EAFf,CAXM;EAexB,qBAAqB;IACnBN,QAAQ,EAAE,UADS;IAEnBC,KAAK,EAAE,MAFY;IAGnBC,MAAM,EAAE,KAHW;IAInBK,eAAe,EAAE,SAJE;IAKnBH,YAAY,EAAE;EALK,CAfG;EAsBxB,sBAAsB;IACpBJ,QAAQ,EAAE,UADU;IAEpBE,MAAM,EAAE,KAFY;IAGpBK,eAAe,EAAE,SAHG;IAIpBH,YAAY,EAAE;EAJM,CAtBE;EA4BxB,uBAAuB;IACrBJ,QAAQ,EAAE,UADW;IAErBC,KAAK,EAAE,MAFc;IAGrBC,MAAM,EAAE,MAHa;IAIrBM,SAAS,EAAE,MAJU;IAKrBD,eAAe,EAAE,MALI;IAMrBE,MAAM,EAAE,mB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MAEtB,+BAA+B;IAFT,CA9Cf;IAkDT,6BAA6B;MAC3BY,OAAO,EAAE;IADkB,CAlDpB;IAqDT,oCAAoC;MAClCf,OAAO,EAAE;IADyB,CArD3B;IAwDT,4BAA4B;MAC1BgC,QAAQ,EAAE,MADgB;MAE1BjC,MAAM,EAAE,MAFkB;MAG1BC,OAAO,EAAE,SAHiB;MAI1BgB,KAAK,EAAE,MAJmB;MAK1BF,QAAQ,EAAE,MALgB;MAM1BmB,UAAU,EAAE,CANc;MAO1BhB,SAAS,EAAE,QAPe;MAQ1BiB,cAAc,EAAE,MARU;MAS1B9B,eAAe,EAAE,SATS;MAU1BH,YAAY,EAAE,KAVY;MAW1BS,SAAS,EAAE;IAXe,CAxDnB;IAqET,4BAA4B;MAC1Bb,QAAQ,EAAE,UADgB;MAE1BC,KAAK,EAAE,CAFmB;MAG1BC,MAAM,EAAE,CAHkB;MAI1BU,WAAW,EAAE,aAJa;MAK1B0B,WAAW,EAAE;IALa,CArEnB;IA4ET,6DAA6D;MAC3Dd,MAAM,EAAE,KADmD;MAE3DR,IAAI,EAAE,KAFqD;MAG3DU,UAAU,EAAE,MAH+C;MAI3Da,WAAW,EAAE,WAJ8C;MAK3DC,cAAc,EAAE;IAL2C;EA5EpD;AADc,CAApB"}
|
|
@@ -11,8 +11,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
11
11
|
|
|
12
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
13
|
|
|
14
|
+
import { sliderBase, tooltipBase } from "./base";
|
|
15
|
+
|
|
14
16
|
var styles = function styles(theme) {
|
|
15
|
-
return {
|
|
17
|
+
return _objectSpread(_objectSpread({}, tooltipBase), {}, {
|
|
18
|
+
sliderBase: sliderBase,
|
|
16
19
|
root: {
|
|
17
20
|
"& .rc-slider-handle": {
|
|
18
21
|
cursor: "pointer",
|
|
@@ -100,7 +103,7 @@ var styles = function styles(theme) {
|
|
|
100
103
|
visibility: "hidden"
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
|
-
};
|
|
106
|
+
});
|
|
104
107
|
};
|
|
105
108
|
|
|
106
109
|
export default styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","cursor","marginTop","zIndex","dot","position","bottom","marginLeft","width","height","border","borderRadius","backgroundColor","hv","palette","atmosphere","atmo4","verticalAlign","rail","knobInner","borderColor","boxShadow","accent","acce1","knobOuter","top","left","knobHidden","display","knobHiddenLast","touchAction","track","mark","typography","vizText","fontFamily","sliderTooltip","background","atmo1","maxWidth","padding","spacing","sm","normalText","visibility"],"sources":["../../../src/Slider/styles.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"styles.js","names":["sliderBase","tooltipBase","styles","theme","root","cursor","marginTop","zIndex","dot","position","bottom","marginLeft","width","height","border","borderRadius","backgroundColor","hv","palette","atmosphere","atmo4","verticalAlign","rail","knobInner","borderColor","boxShadow","accent","acce1","knobOuter","top","left","knobHidden","display","knobHiddenLast","touchAction","track","mark","typography","vizText","fontFamily","sliderTooltip","background","atmo1","maxWidth","padding","spacing","sm","normalText","visibility"],"sources":["../../../src/Slider/styles.js"],"sourcesContent":["import { sliderBase, tooltipBase } from \"./base\";\n\nconst styles = (theme) => ({\n ...tooltipBase,\n sliderBase,\n root: {\n \"& .rc-slider-handle\": {\n cursor: \"pointer\",\n marginTop: \"-8px\",\n \"&:active\": {\n cursor: \"grab\",\n },\n },\n zIndex: 0,\n },\n dot: {\n position: \"absolute\",\n bottom: \"-1px\",\n marginLeft: \"0px\",\n width: \"1px\",\n height: \"4px\",\n border: \"none\",\n borderRadius: \"0%\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n cursor: \"pointer\",\n verticalAlign: \"middle\",\n zIndex: \"-3\",\n },\n rail: {\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n height: \"1px\",\n zIndex: \"-3\",\n },\n knobInner: {\n borderColor: \"transparent\",\n boxShadow: \"none\",\n backgroundColor: theme.hv.palette.accent.acce1,\n width: \"16px\",\n height: \"16px\",\n },\n knobOuter: {\n position: \"relative\",\n borderColor: \"transparent\",\n borderRadius: \"50%\",\n boxShadow: \"none\",\n backgroundColor: theme.hv.palette.atmosphere.atmo4,\n width: \"32px\",\n height: \"32px\",\n top: \"-80%\",\n left: \"-80%\",\n zIndex: \"-1\",\n },\n knobHidden: {\n display: \"none\",\n },\n knobHiddenLast: {\n borderColor: \"transparent\",\n height: \"3px\",\n width: \"2px\",\n marginLeft: \"-1px\",\n border: \"none\",\n borderRadius: \"0\",\n marginTop: \"0px\",\n left: \"100%\",\n touchAction: \"none\",\n cursor: \"default\",\n },\n track: {\n backgroundColor: theme.hv.palette.accent.acce1,\n height: \"3px\",\n zIndex: \"-1\",\n marginTop: \"-1px\",\n },\n mark: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n top: \"-2px\",\n },\n sliderTooltip: {\n \"& .rc-slider-tooltip-inner\": {\n background: theme.hv.palette.atmosphere.atmo1,\n borderRadius: 0,\n maxWidth: \"532px\",\n height: \"100%\",\n padding: `${theme.hv.spacing.sm}px`,\n ...theme.hv.typography.normalText,\n fontFamily: theme.hv.typography.fontFamily,\n boxShadow: \"none\",\n },\n \"& .rc-slider-tooltip-arrow\": {\n visibility: \"hidden\",\n },\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;AAAA,SAASA,UAAT,EAAqBC,WAArB,QAAwC,QAAxC;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,uCACVF,WADU;IAEbD,UAAU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
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
const _excluded = ["id", "className", "classes", "open", "footer", "notifications", "hasNewNotifications", "emptyStatePanelTitle", "emptyStatePanelMessage", "emptyStatePanelIcon", "labels", "newNotificationsButtonAction", "locale"];
|
|
4
|
-
import "core-js/modules/es.array.includes.js";
|
|
5
4
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
6
|
-
import React, { useState
|
|
5
|
+
import React, { useState } from "react";
|
|
7
6
|
import PropTypes from "prop-types";
|
|
8
7
|
import clsx from "clsx";
|
|
9
|
-
import dayjs from "dayjs";
|
|
10
8
|
import { deprecatedPropType, withStyles } from "@material-ui/core";
|
|
11
9
|
import { HvPanel, HvActionBar, HvDropDownMenu, setId, useLabels, useLocale } from "@hitachivantara/uikit-react-core";
|
|
12
10
|
import styles from "./styles";
|
|
@@ -23,35 +21,10 @@ const DEFAULT_LABELS = {
|
|
|
23
21
|
buttonLabel: "Update"
|
|
24
22
|
}
|
|
25
23
|
};
|
|
26
|
-
/**
|
|
27
|
-
* Obtains a simplified locale, if possible, e.g: "en-US" returns "en".
|
|
28
|
-
*
|
|
29
|
-
* @param {string} locale - The locale to be used
|
|
30
|
-
* @returns The more generic locale if found
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
export const getGenericLocale = locale => locale.includes("-") && locale.substr(0, locale.indexOf("-"));
|
|
34
|
-
/**
|
|
35
|
-
* Imports and load the received locale in order to be used by dayjs. If the provided locale or a generic one
|
|
36
|
-
* obtained is not possible to load, then dayjs will fallback to its default.
|
|
37
|
-
*
|
|
38
|
-
* @param {string} locale - The locale to be used
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
const importAndLoadLocale = async locale => {
|
|
42
|
-
await import(`dayjs/locale/${locale}.js`).then(() => {
|
|
43
|
-
dayjs.locale(locale);
|
|
44
|
-
}).catch(async () => {
|
|
45
|
-
const genericLocale = getGenericLocale(locale);
|
|
46
|
-
await import(`dayjs/locale/${genericLocale}.js`).then(() => dayjs.locale(genericLocale)) // eslint-disable-next-line no-console
|
|
47
|
-
.catch(() => console.warn(`Unable to load locale: ${locale}. Falling back to the default`));
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
24
|
/**
|
|
51
25
|
* Notification Panel displays all of read and unread notifications. Still in development
|
|
52
26
|
*/
|
|
53
27
|
|
|
54
|
-
|
|
55
28
|
const HvNotificationPanel = _ref => {
|
|
56
29
|
let {
|
|
57
30
|
id,
|
|
@@ -74,23 +47,6 @@ const HvNotificationPanel = _ref => {
|
|
|
74
47
|
const locale = localeProp || localeFromProvider;
|
|
75
48
|
const [highlighted, setHighlighted] = useState(undefined);
|
|
76
49
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
77
|
-
const [isLocaleLoaded, setIsLocaleLoaded] = useState(false);
|
|
78
|
-
useEffect(() => {
|
|
79
|
-
// We're using this mount logic to avoid potential memory leak problems.
|
|
80
|
-
let isMounted = true;
|
|
81
|
-
|
|
82
|
-
if (!isLocaleLoaded) {
|
|
83
|
-
importAndLoadLocale(locale).then(() => {
|
|
84
|
-
if (isMounted) {
|
|
85
|
-
setIsLocaleLoaded(true);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return () => {
|
|
91
|
-
isMounted = false;
|
|
92
|
-
};
|
|
93
|
-
});
|
|
94
50
|
const labels = useLabels(DEFAULT_LABELS, labelsProp);
|
|
95
51
|
|
|
96
52
|
const generateNotificationsActions = (notificationId, onToggle, actions) => {
|