@atlaskit/range 6.0.6 → 6.0.7
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/CHANGELOG.md +7 -0
- package/codemods/{4.0.0-lite-mode.ts → 4.0.0-lite-mode.tsx} +0 -0
- package/codemods/__tests__/{4.0.0-lite-mode.ts → 4.0.0-lite-mode.tsx} +0 -0
- package/dist/cjs/range.js +3 -1
- package/dist/cjs/styled.js +5 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/range.js +2 -2
- package/dist/es2019/styled.js +5 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/range.js +2 -2
- package/dist/esm/styled.js +5 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/range.d.ts +26 -8
- package/dist/types/styled.d.ts +4 -0
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/range
|
|
2
2
|
|
|
3
|
+
## 6.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8202e37941b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8202e37941b) - Internal code change turning on new linting rules.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 6.0.6
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
File without changes
|
|
File without changes
|
package/dist/cjs/range.js
CHANGED
|
@@ -19,6 +19,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
19
19
|
|
|
20
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
21
|
|
|
22
|
+
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
23
|
+
|
|
22
24
|
var _styled = require("./styled");
|
|
23
25
|
|
|
24
26
|
var _excluded = ["isDisabled", "defaultValue", "max", "min", "onChange", "step", "value", "testId"];
|
|
@@ -51,7 +53,7 @@ var getRoundedPercentValue = function getRoundedPercentValue(value, min, max, st
|
|
|
51
53
|
return percent;
|
|
52
54
|
};
|
|
53
55
|
|
|
54
|
-
var noop =
|
|
56
|
+
var noop = _noop.default;
|
|
55
57
|
|
|
56
58
|
var _default = /*#__PURE__*/(0, _react.forwardRef)(function Range(props, ref) {
|
|
57
59
|
var _props$isDisabled = props.isDisabled,
|
package/dist/cjs/styled.js
CHANGED
|
@@ -126,6 +126,11 @@ var baseStyles = (0, _core.css)({
|
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
var themeStyles = (0, _core.css)((_css = {}, (0, _defineProperty2.default)(_css, VAR_THUMB_BORDER_COLOR, theme.thumb.borderColor.default), (0, _defineProperty2.default)(_css, VAR_THUMB_SHADOW, theme.thumb.boxShadow.default), (0, _defineProperty2.default)(_css, VAR_TRACK_BACKGROUND_COLOR, theme.track.background.default), (0, _defineProperty2.default)(_css, VAR_TRACK_FOREGROUND_COLOR, theme.track.foreground.default), (0, _defineProperty2.default)(_css, ':active, :hover', (_activeHover = {}, (0, _defineProperty2.default)(_activeHover, VAR_TRACK_BACKGROUND_COLOR, theme.track.background.hovered), (0, _defineProperty2.default)(_activeHover, VAR_TRACK_FOREGROUND_COLOR, theme.track.foreground.hovered), _activeHover)), (0, _defineProperty2.default)(_css, ':focus', (0, _defineProperty2.default)({}, VAR_THUMB_BORDER_COLOR, theme.thumb.borderColor.focused)), (0, _defineProperty2.default)(_css, ':disabled', (_disabled = {}, (0, _defineProperty2.default)(_disabled, VAR_THUMB_SHADOW, theme.thumb.boxShadow.disabled), (0, _defineProperty2.default)(_disabled, VAR_TRACK_BACKGROUND_COLOR, theme.track.background.disabled), (0, _defineProperty2.default)(_disabled, VAR_TRACK_FOREGROUND_COLOR, theme.track.foreground.disabled), _disabled)), _css));
|
|
129
|
+
/**
|
|
130
|
+
* __Input__
|
|
131
|
+
* Internal-only styled input component.
|
|
132
|
+
*/
|
|
133
|
+
|
|
129
134
|
var Input = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
130
135
|
var valuePercent = props.valuePercent,
|
|
131
136
|
style = props.style,
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/range.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef, useCallback, useState } from 'react';
|
|
3
|
+
import __noop from '@atlaskit/ds-lib/noop';
|
|
3
4
|
import { Input } from './styled';
|
|
4
5
|
|
|
5
6
|
const snapToStep = (value, min, step) => {
|
|
@@ -22,8 +23,7 @@ const getRoundedPercentValue = (value, min, max, step) => {
|
|
|
22
23
|
return percent;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
const noop =
|
|
26
|
-
|
|
26
|
+
const noop = __noop;
|
|
27
27
|
export default /*#__PURE__*/forwardRef(function Range(props, ref) {
|
|
28
28
|
const {
|
|
29
29
|
isDisabled = false,
|
package/dist/es2019/styled.js
CHANGED
|
@@ -115,6 +115,11 @@ const themeStyles = css({
|
|
|
115
115
|
[VAR_TRACK_FOREGROUND_COLOR]: theme.track.foreground.disabled
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
|
+
/**
|
|
119
|
+
* __Input__
|
|
120
|
+
* Internal-only styled input component.
|
|
121
|
+
*/
|
|
122
|
+
|
|
118
123
|
export const Input = /*#__PURE__*/forwardRef((props, ref) => {
|
|
119
124
|
const {
|
|
120
125
|
valuePercent,
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/range.js
CHANGED
|
@@ -9,6 +9,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
9
|
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; }
|
|
10
10
|
|
|
11
11
|
import React, { forwardRef, useCallback, useState } from 'react';
|
|
12
|
+
import __noop from '@atlaskit/ds-lib/noop';
|
|
12
13
|
import { Input } from './styled';
|
|
13
14
|
|
|
14
15
|
var snapToStep = function snapToStep(value, min, step) {
|
|
@@ -31,8 +32,7 @@ var getRoundedPercentValue = function getRoundedPercentValue(value, min, max, st
|
|
|
31
32
|
return percent;
|
|
32
33
|
};
|
|
33
34
|
|
|
34
|
-
var noop =
|
|
35
|
-
|
|
35
|
+
var noop = __noop;
|
|
36
36
|
export default /*#__PURE__*/forwardRef(function Range(props, ref) {
|
|
37
37
|
var _props$isDisabled = props.isDisabled,
|
|
38
38
|
isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
|
package/dist/esm/styled.js
CHANGED
|
@@ -106,6 +106,11 @@ var baseStyles = css({
|
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
var themeStyles = css((_css = {}, _defineProperty(_css, VAR_THUMB_BORDER_COLOR, theme.thumb.borderColor.default), _defineProperty(_css, VAR_THUMB_SHADOW, theme.thumb.boxShadow.default), _defineProperty(_css, VAR_TRACK_BACKGROUND_COLOR, theme.track.background.default), _defineProperty(_css, VAR_TRACK_FOREGROUND_COLOR, theme.track.foreground.default), _defineProperty(_css, ':active, :hover', (_activeHover = {}, _defineProperty(_activeHover, VAR_TRACK_BACKGROUND_COLOR, theme.track.background.hovered), _defineProperty(_activeHover, VAR_TRACK_FOREGROUND_COLOR, theme.track.foreground.hovered), _activeHover)), _defineProperty(_css, ':focus', _defineProperty({}, VAR_THUMB_BORDER_COLOR, theme.thumb.borderColor.focused)), _defineProperty(_css, ':disabled', (_disabled = {}, _defineProperty(_disabled, VAR_THUMB_SHADOW, theme.thumb.boxShadow.disabled), _defineProperty(_disabled, VAR_TRACK_BACKGROUND_COLOR, theme.track.background.disabled), _defineProperty(_disabled, VAR_TRACK_FOREGROUND_COLOR, theme.track.foreground.disabled), _disabled)), _css));
|
|
109
|
+
/**
|
|
110
|
+
* __Input__
|
|
111
|
+
* Internal-only styled input component.
|
|
112
|
+
*/
|
|
113
|
+
|
|
109
114
|
export var Input = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
110
115
|
var valuePercent = props.valuePercent,
|
|
111
116
|
style = props.style,
|
package/dist/esm/version.json
CHANGED
package/dist/types/range.d.ts
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type OwnProps = {
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Sets the default value if range is not set.
|
|
5
|
+
*/
|
|
4
6
|
defaultValue?: number;
|
|
5
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Sets whether the field range is disabled.
|
|
9
|
+
*/
|
|
6
10
|
isDisabled?: boolean;
|
|
7
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Sets the maximum value of the range.
|
|
13
|
+
*/
|
|
8
14
|
max?: number;
|
|
9
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Sets the minimum value of the range.
|
|
17
|
+
*/
|
|
10
18
|
min?: number;
|
|
11
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Hook to be invoked on change of the range.
|
|
21
|
+
*/
|
|
12
22
|
onChange?: (value: number) => void;
|
|
13
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Sets the step value for the range.
|
|
25
|
+
*/
|
|
14
26
|
step?: number;
|
|
15
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* A `testId` prop is provided for specific elements. This is a unique string
|
|
29
|
+
* that appears as a data attribute `data-testid` in the rendered code and
|
|
30
|
+
* serves as a hook for automated tests.
|
|
31
|
+
*/
|
|
16
32
|
testId?: string;
|
|
17
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Sets the value of the range.
|
|
35
|
+
*/
|
|
18
36
|
value?: number;
|
|
19
37
|
};
|
|
20
38
|
declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
+
/**
|
|
4
|
+
* __Input__
|
|
5
|
+
* Internal-only styled input component.
|
|
6
|
+
*/
|
|
3
7
|
export declare const Input: import("react").ForwardRefExoticComponent<Pick<import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
4
8
|
ref: React.Ref<HTMLInputElement>;
|
|
5
9
|
valuePercent: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/range",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.7",
|
|
4
4
|
"description": "A range lets users choose an approximate value on a slider.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
15
|
"sideEffects": false,
|
|
16
|
-
"atlaskit:src": "src/index.
|
|
16
|
+
"atlaskit:src": "src/index.tsx",
|
|
17
17
|
"homepage": "https://atlassian.design/components/range/",
|
|
18
18
|
"atlassian": {
|
|
19
19
|
"team": "Design System Team",
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"af:exports": {
|
|
27
|
-
".": "./src/index.
|
|
27
|
+
".": "./src/index.tsx",
|
|
28
28
|
"./range": "./src/range.tsx",
|
|
29
29
|
"./styled": "./src/styled.tsx",
|
|
30
|
-
"./theme": "./src/theme.
|
|
30
|
+
"./theme": "./src/theme.tsx"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@atlaskit/ds-lib": "^2.1.0",
|
|
33
34
|
"@atlaskit/theme": "^12.1.0",
|
|
34
35
|
"@atlaskit/tokens": "^0.10.0",
|
|
35
36
|
"@babel/runtime": "^7.0.0",
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
"import-structure": "atlassian-conventions"
|
|
68
69
|
},
|
|
69
70
|
"@repo/internal": {
|
|
71
|
+
"design-system": "v1",
|
|
70
72
|
"dom-events": "use-bind-event-listener",
|
|
71
73
|
"ui-components": "lite-mode",
|
|
72
74
|
"analytics": "analytics-next",
|