@atlaskit/range 7.1.1 → 7.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/range
2
2
 
3
+ ## 7.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
8
+
9
+ ## 7.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
14
+
3
15
  ## 7.1.1
4
16
 
5
17
  ### Patch Changes
@@ -56,6 +56,7 @@ var browserStyles = {
56
56
  WebkitAppearance: 'none',
57
57
  // Hides the slider so that custom slider can be made
58
58
  '::-webkit-slider-thumb': _objectSpread(_objectSpread({}, sliderThumbStyles), {}, {
59
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
59
60
  marginTop: -(theme.thumb.size - theme.track.height) / 2,
60
61
  WebkitAppearance: 'none'
61
62
  }),
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "7.1.1",
3
+ "version": "7.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -43,6 +43,7 @@ const browserStyles = {
43
43
  // Hides the slider so that custom slider can be made
44
44
  '::-webkit-slider-thumb': {
45
45
  ...sliderThumbStyles,
46
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
46
47
  marginTop: -(theme.thumb.size - theme.track.height) / 2,
47
48
  WebkitAppearance: 'none'
48
49
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "7.1.1",
3
+ "version": "7.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -48,6 +48,7 @@ var browserStyles = {
48
48
  WebkitAppearance: 'none',
49
49
  // Hides the slider so that custom slider can be made
50
50
  '::-webkit-slider-thumb': _objectSpread(_objectSpread({}, sliderThumbStyles), {}, {
51
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
51
52
  marginTop: -(theme.thumb.size - theme.track.height) / 2,
52
53
  WebkitAppearance: 'none'
53
54
  }),
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "7.1.1",
3
+ "version": "7.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,2 @@
1
+ export { default } from './range';
2
+ export type { RangeProps } from './range';
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ export type OwnProps = {
3
+ /**
4
+ * Sets the default value if range is not set.
5
+ */
6
+ defaultValue?: number;
7
+ /**
8
+ * Sets whether the field range is disabled.
9
+ */
10
+ isDisabled?: boolean;
11
+ /**
12
+ * Sets the maximum value of the range.
13
+ */
14
+ max?: number;
15
+ /**
16
+ * Sets the minimum value of the range.
17
+ */
18
+ min?: number;
19
+ /**
20
+ * Hook to be invoked on change of the range.
21
+ */
22
+ onChange?: (value: number) => void;
23
+ /**
24
+ * Sets the step value for the range.
25
+ */
26
+ step?: number;
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
+ */
32
+ testId?: string;
33
+ /**
34
+ * Sets the value of the range.
35
+ */
36
+ value?: number;
37
+ };
38
+ type Combine<First, Second> = Omit<First, keyof Second> & Second;
39
+ export type RangeProps = Combine<Omit<React.InputHTMLAttributes<HTMLInputElement>, 'disabled' | 'required' | 'checked'>, OwnProps>;
40
+ declare const _default: React.ForwardRefExoticComponent<Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "checked" | "disabled" | "required">, keyof OwnProps> & OwnProps & React.RefAttributes<HTMLInputElement>>;
41
+ export default _default;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ /**
4
+ * __Input__
5
+ * Internal-only styled input component.
6
+ */
7
+ export declare const Input: import("react").ForwardRefExoticComponent<Pick<import("react").InputHTMLAttributes<HTMLInputElement> & {
8
+ ref: React.Ref<HTMLInputElement>;
9
+ valuePercent: string;
10
+ }, keyof import("react").InputHTMLAttributes<HTMLInputElement> | "valuePercent"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,37 @@
1
+ export declare const transitionDuration = "0.2s";
2
+ export declare const input: {
3
+ height: number;
4
+ };
5
+ export declare const thumb: {
6
+ readonly size: 16;
7
+ readonly borderWidth: 2;
8
+ readonly background: {
9
+ readonly default: "var(--ds-background-neutral-bold)";
10
+ readonly hovered: "var(--ds-background-neutral-bold-hovered)";
11
+ readonly pressed: "var(--ds-background-neutral-bold-pressed)";
12
+ };
13
+ readonly borderColor: {
14
+ readonly default: "transparent";
15
+ readonly focused: "var(--ds-border-focused)";
16
+ };
17
+ readonly boxShadow: {
18
+ readonly default: "var(--ds-UNSAFE-transparent)";
19
+ readonly disabled: "var(--ds-shadow-raised)";
20
+ };
21
+ };
22
+ export declare const track: {
23
+ readonly height: 4;
24
+ /**
25
+ * borderRadius >= height / 2 to create a pill shape.
26
+ * Using '50%' creates an ellipse.
27
+ */
28
+ readonly borderRadius: 2;
29
+ readonly background: {
30
+ readonly default: "var(--ds-background-neutral)";
31
+ readonly hovered: "var(--ds-background-neutral-hovered)";
32
+ };
33
+ readonly foreground: {
34
+ readonly default: "var(--ds-background-neutral-bold)";
35
+ readonly hovered: "var(--ds-background-neutral-bold-hovered)";
36
+ };
37
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/range",
3
- "version": "7.1.1",
3
+ "version": "7.1.3",
4
4
  "description": "A range lets users choose an approximate value on a slider.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -81,7 +81,8 @@
81
81
  "ui-components": "lite-mode",
82
82
  "analytics": "analytics-next",
83
83
  "design-tokens": [
84
- "color"
84
+ "color",
85
+ "spacing"
85
86
  ],
86
87
  "deprecation": "no-deprecated-imports",
87
88
  "styling": [