@react-types/progress 3.0.0-nightly-641446f65-240905

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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/package.json +21 -0
  3. package/src/index.d.ts +104 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @react-types/progress
2
+
3
+ This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@react-types/progress",
3
+ "version": "3.0.0-nightly-641446f65-240905",
4
+ "description": "Spectrum UI components in React",
5
+ "license": "Apache-2.0",
6
+ "types": "src/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/adobe/react-spectrum"
10
+ },
11
+ "dependencies": {
12
+ "@react-types/shared": "^3.0.0-nightly-641446f65-240905"
13
+ },
14
+ "peerDependencies": {
15
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "stableVersion": "3.5.6"
21
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,104 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+
13
+ import {AriaLabelingProps, DOMProps, LabelPosition, StyleProps} from '@react-types/shared';
14
+ import {ReactNode} from 'react';
15
+
16
+ interface ProgressBaseProps {
17
+ /**
18
+ * The current value (controlled).
19
+ * @default 0
20
+ */
21
+ value?: number,
22
+ /**
23
+ * The smallest value allowed for the input.
24
+ * @default 0
25
+ */
26
+ minValue?: number,
27
+ /**
28
+ * The largest value allowed for the input.
29
+ * @default 100
30
+ */
31
+ maxValue?: number
32
+ }
33
+
34
+ export interface ProgressBarBaseProps extends ProgressBaseProps {
35
+ /** The content to display as the label. */
36
+ label?: ReactNode,
37
+ /**
38
+ * The display format of the value label.
39
+ * @default {style: 'percent'}
40
+ */
41
+ formatOptions?: Intl.NumberFormatOptions,
42
+ /** The content to display as the value's label (e.g. 1 of 4). */
43
+ valueLabel?: ReactNode
44
+ }
45
+
46
+ export interface AriaProgressBarBaseProps extends ProgressBarBaseProps, DOMProps, AriaLabelingProps {}
47
+
48
+ export interface ProgressBarProps extends ProgressBarBaseProps {
49
+ /**
50
+ * Whether presentation is indeterminate when progress isn't known.
51
+ */
52
+ isIndeterminate?: boolean
53
+ }
54
+
55
+ export interface AriaProgressBarProps extends ProgressBarProps, DOMProps, AriaLabelingProps {}
56
+
57
+ export interface ProgressCircleProps extends ProgressBaseProps {
58
+ /**
59
+ * Whether presentation is indeterminate when progress isn't known.
60
+ */
61
+ isIndeterminate?: boolean
62
+ }
63
+
64
+ export interface AriaProgressCircleProps extends ProgressCircleProps, DOMProps, AriaLabelingProps {}
65
+ export interface SpectrumProgressCircleProps extends AriaProgressCircleProps, StyleProps {
66
+ /**
67
+ * What the ProgressCircle's diameter should be.
68
+ * @default 'M'
69
+ */
70
+ size?: 'S' | 'M' | 'L',
71
+ /** The static color style to apply. Useful when the button appears over a color background. */
72
+ staticColor?: 'white' | 'black',
73
+ /**
74
+ * The [visual style](https://spectrum.adobe.com/page/progress-circle/#Over-background-variant) of the ProgressCircle.
75
+ *
76
+ * @deprecated - use staticColor instead.
77
+ */
78
+ variant?: 'overBackground'
79
+ }
80
+
81
+ export interface SpectrumProgressBarBaseProps extends AriaProgressBarBaseProps, StyleProps {
82
+ /**
83
+ * How thick the bar should be.
84
+ * @default 'L'
85
+ */
86
+ size?: 'S' | 'L',
87
+ /**
88
+ * The label's overall position relative to the element it is labeling.
89
+ * @default 'top'
90
+ */
91
+ labelPosition?: LabelPosition,
92
+ /** Whether the value's label is displayed. True by default if there's a label, false by default if not. */
93
+ showValueLabel?: boolean
94
+ }
95
+
96
+ export interface SpectrumProgressBarProps extends SpectrumProgressBarBaseProps, ProgressBarProps {
97
+ /** The static color style to apply. Useful when the button appears over a color background. */
98
+ staticColor?: 'white' | 'black',
99
+ /**
100
+ * The [visual style](https://spectrum.adobe.com/page/progress-bar/#Over-background-variant) of the ProgressBar.
101
+ * @deprecated - use staticColor instead.
102
+ */
103
+ variant?: 'overBackground'
104
+ }