@atlaskit/range 6.0.5 → 6.0.8

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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/range
2
2
 
3
+ ## 6.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
8
+
9
+ ## 6.0.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8202e37941b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8202e37941b) - Internal code change turning on new linting rules.
14
+ - Updated dependencies
15
+
16
+ ## 6.0.6
17
+
18
+ ### Patch Changes
19
+
20
+ - [`45ebe7af434`](https://bitbucket.org/atlassian/atlassian-frontend/commits/45ebe7af434) - Moved to using declarative entrypoints internally. Public API is unchanged.
21
+
3
22
  ## 6.0.5
4
23
 
5
24
  ### Patch 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 = function 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,
@@ -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,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "6.0.5",
3
+ "version": "6.0.8",
4
4
  "sideEffects": false
5
5
  }
@@ -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,
@@ -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,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "6.0.5",
3
+ "version": "6.0.8",
4
4
  "sideEffects": false
5
5
  }
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 = function 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,
@@ -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,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "6.0.5",
3
+ "version": "6.0.8",
4
4
  "sideEffects": false
5
5
  }
@@ -1,23 +1,41 @@
1
1
  import React from 'react';
2
2
  export declare type OwnProps = {
3
- /** Sets the default value if range is not set. */
3
+ /**
4
+ * Sets the default value if range is not set.
5
+ */
4
6
  defaultValue?: number;
5
- /** Sets whether the field range is disabled. */
7
+ /**
8
+ * Sets whether the field range is disabled.
9
+ */
6
10
  isDisabled?: boolean;
7
- /** Sets the maximum value of the range. */
11
+ /**
12
+ * Sets the maximum value of the range.
13
+ */
8
14
  max?: number;
9
- /** Sets the minimum value of the range.*/
15
+ /**
16
+ * Sets the minimum value of the range.
17
+ */
10
18
  min?: number;
11
- /** Hook to be invoked on change of the range. */
19
+ /**
20
+ * Hook to be invoked on change of the range.
21
+ */
12
22
  onChange?: (value: number) => void;
13
- /** Sets the step value for the range. */
23
+ /**
24
+ * Sets the step value for the range.
25
+ */
14
26
  step?: number;
15
- /** A `testId` prop is provided for specific elements. This is a unique string that appears as a data attribute `data-testid` in the rendered code and serves as a hook for automated tests. */
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
- /** Sets the value of the range. */
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;
21
39
  export declare type RangeProps = Combine<Omit<React.InputHTMLAttributes<HTMLInputElement>, 'disabled' | 'required' | 'checked'>, OwnProps>;
22
- declare const _default: React.ForwardRefExoticComponent<Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "checked" | "disabled" | "required">, keyof OwnProps> & OwnProps & React.RefAttributes<HTMLInputElement>>;
40
+ declare const _default: React.ForwardRefExoticComponent<Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "disabled" | "checked" | "required">, keyof OwnProps> & OwnProps & React.RefAttributes<HTMLInputElement>>;
23
41
  export default _default;
@@ -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,11 +1,11 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "6.0.5",
3
+ "version": "6.0.8",
4
4
  "description": "A range lets users choose an approximate value on a slider.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
9
  "author": "Atlassian Pty Ltd",
10
10
  "license": "Apache-2.0",
11
11
  "main": "dist/cjs/index.js",
@@ -13,17 +13,24 @@
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.ts",
16
+ "atlaskit:src": "src/index.tsx",
17
17
  "homepage": "https://atlassian.design/components/range/",
18
18
  "atlassian": {
19
19
  "team": "Design System Team",
20
- "deprecatedAutoEntryPoints": true,
21
20
  "releaseModel": "scheduled",
22
21
  "website": {
23
- "name": "Range"
22
+ "name": "Range",
23
+ "category": "Components"
24
24
  }
25
25
  },
26
+ "af:exports": {
27
+ ".": "./src/index.tsx",
28
+ "./range": "./src/range.tsx",
29
+ "./styled": "./src/styled.tsx",
30
+ "./theme": "./src/theme.tsx"
31
+ },
26
32
  "dependencies": {
33
+ "@atlaskit/ds-lib": "^2.1.0",
27
34
  "@atlaskit/theme": "^12.1.0",
28
35
  "@atlaskit/tokens": "^0.10.0",
29
36
  "@babel/runtime": "^7.0.0",
@@ -49,7 +56,7 @@
49
56
  "lodash": "^4.17.21",
50
57
  "react-dom": "^16.8.0",
51
58
  "storybook-addon-performance": "^0.16.0",
52
- "typescript": "4.2.4"
59
+ "typescript": "4.3.5"
53
60
  },
54
61
  "keywords": [
55
62
  "atlaskit",
@@ -61,6 +68,8 @@
61
68
  "import-structure": "atlassian-conventions"
62
69
  },
63
70
  "@repo/internal": {
71
+ "design-system": "v1",
72
+ "dom-events": "use-bind-event-listener",
64
73
  "ui-components": "lite-mode",
65
74
  "analytics": "analytics-next",
66
75
  "theming": "tokens",
package/report.api.md ADDED
@@ -0,0 +1,51 @@
1
+ ## API Report File for "@atlaskit/range"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+ import { default as React_2 } from 'react';
7
+
8
+ declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
9
+
10
+ declare const _default: React_2.ForwardRefExoticComponent<
11
+ Omit<
12
+ Omit<
13
+ React_2.InputHTMLAttributes<HTMLInputElement>,
14
+ 'checked' | 'disabled' | 'required'
15
+ >,
16
+ keyof OwnProps
17
+ > &
18
+ OwnProps &
19
+ React_2.RefAttributes<HTMLInputElement>
20
+ >;
21
+ export default _default;
22
+
23
+ declare type OwnProps = {
24
+ /** Sets the default value if range is not set. */
25
+ defaultValue?: number;
26
+ /** Sets whether the field range is disabled. */
27
+ isDisabled?: boolean;
28
+ /** Sets the maximum value of the range. */
29
+ max?: number;
30
+ /** Sets the minimum value of the range.*/
31
+ min?: number;
32
+ /** Hook to be invoked on change of the range. */
33
+ onChange?: (value: number) => void;
34
+ /** Sets the step value for the range. */
35
+ step?: number;
36
+ /** A `testId` prop is provided for specific elements. This is a unique string that appears as a data attribute `data-testid` in the rendered code and serves as a hook for automated tests. */
37
+ testId?: string;
38
+ /** Sets the value of the range. */
39
+ value?: number;
40
+ };
41
+
42
+ export declare type RangeProps = Combine<
43
+ Omit<
44
+ React_2.InputHTMLAttributes<HTMLInputElement>,
45
+ 'disabled' | 'required' | 'checked'
46
+ >,
47
+ OwnProps
48
+ >;
49
+
50
+ export {};
51
+ ```