@radix-ui/react-progress 1.1.0-rc.1 → 1.1.0-rc.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/index.js CHANGED
@@ -1,137 +1,146 @@
1
1
  "use strict";
2
- (() => {
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
- }) : x)(function(x) {
12
- if (typeof require !== "undefined") return require.apply(this, arguments);
13
- throw Error('Dynamic require of "' + x + '" is not supported');
14
- });
15
- var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from))
18
- if (!__hasOwnProp.call(to, key) && key !== except)
19
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
- }
21
- return to;
22
- };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
- // If the importer is in node compatibility mode or this is not an ESM
25
- // file that has been converted to a CommonJS file using a Babel-
26
- // compatible transform (i.e. "__esModule" has not been set), then set
27
- // "default" to the CommonJS "module.exports" for node compatibility.
28
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
- mod
30
- ));
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
30
 
32
- // packages/react/progress/src/Progress.tsx
33
- var React = __toESM(__require("react"));
34
- var import_react_context = __require("@radix-ui/react-context");
35
- var import_react_primitive = __require("@radix-ui/react-primitive");
36
- var import_jsx_runtime = __require("react/jsx-runtime");
37
- var PROGRESS_NAME = "Progress";
38
- var DEFAULT_MAX = 100;
39
- var [createProgressContext, createProgressScope] = (0, import_react_context.createContextScope)(PROGRESS_NAME);
40
- var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
41
- var Progress = React.forwardRef(
42
- (props, forwardedRef) => {
43
- const {
44
- __scopeProgress,
45
- value: valueProp,
46
- max: maxProp,
47
- getValueLabel = defaultGetValueLabel,
48
- ...progressProps
49
- } = props;
50
- const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
51
- const value = isValidValueNumber(valueProp, max) ? valueProp : null;
52
- const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
53
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
- import_react_primitive.Primitive.div,
55
- {
56
- "aria-valuemax": max,
57
- "aria-valuemin": 0,
58
- "aria-valuenow": isNumber(value) ? value : void 0,
59
- "aria-valuetext": valueLabel,
60
- role: "progressbar",
61
- "data-state": getProgressState(value, max),
62
- "data-value": value ?? void 0,
63
- "data-max": max,
64
- ...progressProps,
65
- ref: forwardedRef
66
- }
67
- ) });
68
- }
69
- );
70
- Progress.displayName = PROGRESS_NAME;
71
- Progress.propTypes = {
72
- max(props, propName, componentName) {
73
- const propValue = props[propName];
74
- const strVal = String(propValue);
75
- if (propValue && !isValidMaxNumber(propValue)) {
76
- return new Error(getInvalidMaxError(strVal, componentName));
77
- }
78
- return null;
79
- },
80
- value(props, propName, componentName) {
81
- const valueProp = props[propName];
82
- const strVal = String(valueProp);
83
- const max = isValidMaxNumber(props.max) ? props.max : DEFAULT_MAX;
84
- if (valueProp != null && !isValidValueNumber(valueProp, max)) {
85
- return new Error(getInvalidValueError(strVal, componentName));
31
+ // packages/react/progress/src/index.ts
32
+ var src_exports = {};
33
+ __export(src_exports, {
34
+ Indicator: () => Indicator,
35
+ Progress: () => Progress,
36
+ ProgressIndicator: () => ProgressIndicator,
37
+ Root: () => Root,
38
+ createProgressScope: () => createProgressScope
39
+ });
40
+ module.exports = __toCommonJS(src_exports);
41
+
42
+ // packages/react/progress/src/Progress.tsx
43
+ var React = __toESM(require("react"));
44
+ var import_react_context = require("@radix-ui/react-context");
45
+ var import_react_primitive = require("@radix-ui/react-primitive");
46
+ var import_jsx_runtime = require("react/jsx-runtime");
47
+ var PROGRESS_NAME = "Progress";
48
+ var DEFAULT_MAX = 100;
49
+ var [createProgressContext, createProgressScope] = (0, import_react_context.createContextScope)(PROGRESS_NAME);
50
+ var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
51
+ var Progress = React.forwardRef(
52
+ (props, forwardedRef) => {
53
+ const {
54
+ __scopeProgress,
55
+ value: valueProp,
56
+ max: maxProp,
57
+ getValueLabel = defaultGetValueLabel,
58
+ ...progressProps
59
+ } = props;
60
+ const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
61
+ const value = isValidValueNumber(valueProp, max) ? valueProp : null;
62
+ const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
+ import_react_primitive.Primitive.div,
65
+ {
66
+ "aria-valuemax": max,
67
+ "aria-valuemin": 0,
68
+ "aria-valuenow": isNumber(value) ? value : void 0,
69
+ "aria-valuetext": valueLabel,
70
+ role: "progressbar",
71
+ "data-state": getProgressState(value, max),
72
+ "data-value": value ?? void 0,
73
+ "data-max": max,
74
+ ...progressProps,
75
+ ref: forwardedRef
86
76
  }
87
- return null;
77
+ ) });
78
+ }
79
+ );
80
+ Progress.displayName = PROGRESS_NAME;
81
+ Progress.propTypes = {
82
+ max(props, propName, componentName) {
83
+ const propValue = props[propName];
84
+ const strVal = String(propValue);
85
+ if (propValue && !isValidMaxNumber(propValue)) {
86
+ return new Error(getInvalidMaxError(strVal, componentName));
88
87
  }
89
- };
90
- var INDICATOR_NAME = "ProgressIndicator";
91
- var ProgressIndicator = React.forwardRef(
92
- (props, forwardedRef) => {
93
- const { __scopeProgress, ...indicatorProps } = props;
94
- const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
95
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
- import_react_primitive.Primitive.div,
97
- {
98
- "data-state": getProgressState(context.value, context.max),
99
- "data-value": context.value ?? void 0,
100
- "data-max": context.max,
101
- ...indicatorProps,
102
- ref: forwardedRef
103
- }
104
- );
88
+ return null;
89
+ },
90
+ value(props, propName, componentName) {
91
+ const valueProp = props[propName];
92
+ const strVal = String(valueProp);
93
+ const max = isValidMaxNumber(props.max) ? props.max : DEFAULT_MAX;
94
+ if (valueProp != null && !isValidValueNumber(valueProp, max)) {
95
+ return new Error(getInvalidValueError(strVal, componentName));
105
96
  }
106
- );
107
- ProgressIndicator.displayName = INDICATOR_NAME;
108
- function defaultGetValueLabel(value, max) {
109
- return `${Math.round(value / max * 100)}%`;
97
+ return null;
110
98
  }
111
- function getProgressState(value, maxValue) {
112
- return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
113
- }
114
- function isNumber(value) {
115
- return typeof value === "number";
116
- }
117
- function isValidMaxNumber(max) {
118
- return isNumber(max) && !isNaN(max) && max > 0;
119
- }
120
- function isValidValueNumber(value, max) {
121
- return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
122
- }
123
- function getInvalidMaxError(propValue, componentName) {
124
- return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`;
99
+ };
100
+ var INDICATOR_NAME = "ProgressIndicator";
101
+ var ProgressIndicator = React.forwardRef(
102
+ (props, forwardedRef) => {
103
+ const { __scopeProgress, ...indicatorProps } = props;
104
+ const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
105
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
+ import_react_primitive.Primitive.div,
107
+ {
108
+ "data-state": getProgressState(context.value, context.max),
109
+ "data-value": context.value ?? void 0,
110
+ "data-max": context.max,
111
+ ...indicatorProps,
112
+ ref: forwardedRef
113
+ }
114
+ );
125
115
  }
126
- function getInvalidValueError(propValue, componentName) {
127
- return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be:
116
+ );
117
+ ProgressIndicator.displayName = INDICATOR_NAME;
118
+ function defaultGetValueLabel(value, max) {
119
+ return `${Math.round(value / max * 100)}%`;
120
+ }
121
+ function getProgressState(value, maxValue) {
122
+ return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
123
+ }
124
+ function isNumber(value) {
125
+ return typeof value === "number";
126
+ }
127
+ function isValidMaxNumber(max) {
128
+ return isNumber(max) && !isNaN(max) && max > 0;
129
+ }
130
+ function isValidValueNumber(value, max) {
131
+ return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
132
+ }
133
+ function getInvalidMaxError(propValue, componentName) {
134
+ return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`;
135
+ }
136
+ function getInvalidValueError(propValue, componentName) {
137
+ return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be:
128
138
  - a positive number
129
139
  - less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set)
130
140
  - \`null\` if the progress is indeterminate.
131
141
 
132
142
  Defaulting to \`null\`.`;
133
- }
134
- var Root = Progress;
135
- var Indicator = ProgressIndicator;
136
- })();
143
+ }
144
+ var Root = Progress;
145
+ var Indicator = ProgressIndicator;
137
146
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/Progress.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Progress\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROGRESS_NAME = 'Progress';\nconst DEFAULT_MAX = 100;\n\ntype ScopedProps<P> = P & { __scopeProgress?: Scope };\nconst [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\n\ntype ProgressState = 'indeterminate' | 'complete' | 'loading';\ntype ProgressContextValue = { value: number | null; max: number };\nconst [ProgressProvider, useProgressContext] =\n createProgressContext<ProgressContextValue>(PROGRESS_NAME);\n\ntype ProgressElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ProgressProps extends PrimitiveDivProps {\n value?: number | null | undefined;\n max?: number;\n getValueLabel?(value: number, max: number): string;\n}\n\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>(\n (props: ScopedProps<ProgressProps>, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : undefined;\n\n return (\n <ProgressProvider scope={__scopeProgress} value={value} max={max}>\n <Primitive.div\n aria-valuemax={max}\n aria-valuemin={0}\n aria-valuenow={isNumber(value) ? value : undefined}\n aria-valuetext={valueLabel}\n role=\"progressbar\"\n data-state={getProgressState(value, max)}\n data-value={value ?? undefined}\n data-max={max}\n {...progressProps}\n ref={forwardedRef}\n />\n </ProgressProvider>\n );\n }\n);\n\nProgress.displayName = PROGRESS_NAME;\n\nProgress.propTypes = {\n max(props, propName, componentName) {\n const propValue = props[propName];\n const strVal = String(propValue);\n if (propValue && !isValidMaxNumber(propValue)) {\n return new Error(getInvalidMaxError(strVal, componentName));\n }\n return null;\n },\n value(props, propName, componentName) {\n const valueProp = props[propName];\n const strVal = String(valueProp);\n const max = isValidMaxNumber(props.max) ? props.max : DEFAULT_MAX;\n if (valueProp != null && !isValidValueNumber(valueProp, max)) {\n return new Error(getInvalidValueError(strVal, componentName));\n }\n return null;\n },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProgressIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ProgressIndicator';\n\ntype ProgressIndicatorElement = React.ElementRef<typeof Primitive.div>;\ninterface ProgressIndicatorProps extends PrimitiveDivProps {}\n\nconst ProgressIndicator = React.forwardRef<ProgressIndicatorElement, ProgressIndicatorProps>(\n (props: ScopedProps<ProgressIndicatorProps>, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return (\n <Primitive.div\n data-state={getProgressState(context.value, context.max)}\n data-value={context.value ?? undefined}\n data-max={context.max}\n {...indicatorProps}\n ref={forwardedRef}\n />\n );\n }\n);\n\nProgressIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction defaultGetValueLabel(value: number, max: number) {\n return `${Math.round((value / max) * 100)}%`;\n}\n\nfunction getProgressState(value: number | undefined | null, maxValue: number): ProgressState {\n return value == null ? 'indeterminate' : value === maxValue ? 'complete' : 'loading';\n}\n\nfunction isNumber(value: any): value is number {\n return typeof value === 'number';\n}\n\nfunction isValidMaxNumber(max: any): max is number {\n // prettier-ignore\n return (\n isNumber(max) &&\n !isNaN(max) &&\n max > 0\n );\n}\n\nfunction isValidValueNumber(value: any, max: number): value is number {\n // prettier-ignore\n return (\n isNumber(value) &&\n !isNaN(value) &&\n value <= max &&\n value >= 0\n );\n}\n\n// Split this out for clearer readability of the error message.\nfunction getInvalidMaxError(propValue: string, componentName: string) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\n\nfunction getInvalidValueError(propValue: string, componentName: string) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\n\nconst Root = Progress;\nconst Indicator = ProgressIndicator;\n\nexport {\n createProgressScope,\n //\n Progress,\n ProgressIndicator,\n //\n Root,\n Indicator,\n};\nexport type { ProgressProps, Pro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B;AACpE,WAAO,mCAAmC,SAAS,oBAAoB,aAAa,yEAAyE,WAAW;AAAA,EAC1K;AAEA,WAAS,qBAAqB,WAAmB,eAAuB;AACtE,WAAO,qCAAqC,SAAS,oBAAoB,aAAa;AAAA;AAAA,gDAExC,WAAW;AAAA;AAAA;AAAA;AAAA,EAI3D;AAEA,MAAM,OAAO;AACb,MAAM,YAAY;",
3
+ "sources": ["../src/index.ts", "../src/Progress.tsx"],
4
+ "sourcesContent": ["'use client';\nexport {\n createProgressScope,\n //\n Progress,\n ProgressIndicator,\n //\n Root,\n Indicator,\n} from './Progress';\nexport type { ProgressProps, ProgressIndicatorProps } from './Progress';\n", "import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Progress\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROGRESS_NAME = 'Progress';\nconst DEFAULT_MAX = 100;\n\ntype ScopedProps<P> = P & { __scopeProgress?: Scope };\nconst [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\n\ntype ProgressState = 'indeterminate' | 'complete' | 'loading';\ntype ProgressContextValue = { value: number | null; max: number };\nconst [ProgressProvider, useProgressContext] =\n createProgressContext<ProgressContextValue>(PROGRESS_NAME);\n\ntype ProgressElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ProgressProps extends PrimitiveDivProps {\n value?: number | null | undefined;\n max?: number;\n getValueLabel?(value: number, max: number): string;\n}\n\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>(\n (props: ScopedProps<ProgressProps>, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : undefined;\n\n return (\n <ProgressProvider scope={__scopeProgress} value={value} max={max}>\n <Primitive.div\n aria-valuemax={max}\n aria-valuemin={0}\n aria-valuenow={isNumber(value) ? value : undefined}\n aria-valuetext={valueLabel}\n role=\"progressbar\"\n data-state={getProgressState(value, max)}\n data-value={value ?? undefined}\n data-max={max}\n {...progressProps}\n ref={forwardedRef}\n />\n </ProgressProvider>\n );\n }\n);\n\nProgress.displayName = PROGRESS_NAME;\n\nProgress.propTypes = {\n max(props, propName, componentName) {\n const propValue = props[propName];\n const strVal = String(propValue);\n if (propValue && !isValidMaxNumber(propValue)) {\n return new Error(getInvalidMaxError(strVal, componentName));\n }\n return null;\n },\n value(props, propName, componentName) {\n const valueProp = props[propName];\n const strVal = String(valueProp);\n const max = isValidMaxNumber(props.max) ? props.max : DEFAULT_MAX;\n if (valueProp != null && !isValidValueNumber(valueProp, max)) {\n return new Error(getInvalidValueError(strVal, componentName));\n }\n return null;\n },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProgressIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ProgressIndicator';\n\ntype ProgressIndicatorElement = React.ElementRef<typeof Primitive.div>;\ninterface ProgressIndicatorProps extends PrimitiveDivProps {}\n\nconst ProgressIndicator = React.forwardRef<ProgressIndicatorElement, ProgressIndicatorProps>(\n (props: ScopedProps<ProgressIndicatorProps>, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return (\n <Primitive.div\n data-state={getProgressState(context.value, context.max)}\n data-value={context.value ?? undefined}\n data-max={context.max}\n {...indicatorProps}\n ref={forwardedRef}\n />\n );\n }\n);\n\nProgressIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction defaultGetValueLabel(value: number, max: number) {\n return `${Math.round((value / max) * 100)}%`;\n}\n\nfunction getProgressState(value: number | undefined | null, maxValue: number): ProgressState {\n return value == null ? 'indeterminate' : value === maxValue ? 'complete' : 'loading';\n}\n\nfunction isNumber(value: any): value is number {\n return typeof value === 'number';\n}\n\nfunction isValidMaxNumber(max: any): max is number {\n // prettier-ignore\n return (\n isNumber(max) &&\n !isNaN(max) &&\n max > 0\n );\n}\n\nfunction isValidValueNumber(value: any, max: number): value is number {\n // prettier-ignore\n return (\n isNumber(value) &&\n !isNaN(value) &&\n value <= max &&\n value >= 0\n );\n}\n\n// Split this out for clearer readability of the error message.\nfunction getInvalidMaxError(propValue: string, componentName: string) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\n\nfunction getInvalidValueError(propValue: string, componentName: string) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\n\nconst Root = Progress;\nconst Indicator = ProgressIndicator;\n\nexport {\n createProgressScope,\n //\n Progress,\n ProgressIndicator,\n //\n Root,\n Indicator,\n};\nexport type { ProgressProps, ProgressIndicatorProps };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,2BAAmC;AACnC,6BAA0B;AA4ClB;AAnCR,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAGpB,IAAM,CAAC,uBAAuB,mBAAmB,QAAI,yCAAmB,aAAa;AAIrF,IAAM,CAAC,kBAAkB,kBAAkB,IACzC,sBAA4C,aAAa;AAU3D,IAAM,WAAiB;AAAA,EACrB,CAAC,OAAm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AAKvB,IAAM,oBAA0B;AAAA,EAC9B,CAAC,OAA4C,iBAAiB;AAC5D,UAAM,EAAE,iBAAiB,GAAG,eAAe,IAAI;AAC/C,UAAM,UAAU,mBAAmB,gBAAgB,eAAe;AAClE,WACE;AAAA,MAAC,iCAAU;AAAA,MAAV;AAAA,QACC,cAAY,iBAAiB,QAAQ,OAAO,QAAQ,GAAG;AAAA,QACvD,cAAY,QAAQ,SAAS;AAAA,QAC7B,YAAU,QAAQ;AAAA,QACjB,GAAG;AAAA,QACJ,KAAK;AAAA;AAAA,IACP;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAIhC,SAAS,qBAAqB,OAAe,KAAa;AACxD,SAAO,GAAG,KAAK,MAAO,QAAQ,MAAO,GAAG,CAAC;AAC3C;AAEA,SAAS,iBAAiB,OAAkC,UAAiC;AAC3F,SAAO,SAAS,OAAO,kBAAkB,UAAU,WAAW,aAAa;AAC7E;AAEA,SAAS,SAAS,OAA6B;AAC7C,SAAO,OAAO,UAAU;AAC1B;AAEA,SAAS,iBAAiB,KAAyB;AAEjD,SACE,SAAS,GAAG,KACZ,CAAC,MAAM,GAAG,KACV,MAAM;AAEV;AAEA,SAAS,mBAAmB,OAAY,KAA8B;AAEpE,SACE,SAAS,KAAK,KACd,CAAC,MAAM,KAAK,KACZ,SAAS,OACT,SAAS;AAEb;AAGA,SAAS,mBAAmB,WAAmB,eAAuB;AACpE,SAAO,mCAAmC,SAAS,oBAAoB,aAAa,yEAAyE,WAAW;AAC1K;AAEA,SAAS,qBAAqB,WAAmB,eAAuB;AACtE,SAAO,qCAAqC,SAAS,oBAAoB,aAAa;AAAA;AAAA,gDAExC,WAAW;AAAA;AAAA;AAAA;AAI3D;AAEA,IAAM,OAAO;AACb,IAAM,YAAY;",
6
6
  "names": []
7
7
  }
package/dist/index.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  // packages/react/progress/src/Progress.tsx
2
4
  import * as React from "react";
3
5
  import { createContextScope } from "@radix-ui/react-context";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/Progress.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Progress\n * -----------------------------------------------------------------------------------------------*/\n\nconst PROGRESS_NAME = 'Progress';\nconst DEFAULT_MAX = 100;\n\ntype ScopedProps<P> = P & { __scopeProgress?: Scope };\nconst [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\n\ntype ProgressState = 'indeterminate' | 'complete' | 'loading';\ntype ProgressContextValue = { value: number | null; max: number };\nconst [ProgressProvider, useProgressContext] =\n createProgressContext<ProgressContextValue>(PROGRESS_NAME);\n\ntype ProgressElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ProgressProps extends PrimitiveDivProps {\n value?: number | null | undefined;\n max?: number;\n getValueLabel?(value: number, max: number): string;\n}\n\nconst Progress = React.forwardRef<ProgressElement, ProgressProps>(\n (props: ScopedProps<ProgressProps>, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : undefined;\n\n return (\n <ProgressProvider scope={__scopeProgress} value={value} max={max}>\n <Primitive.div\n aria-valuemax={max}\n aria-valuemin={0}\n aria-valuenow={isNumber(value) ? value : undefined}\n aria-valuetext={valueLabel}\n role=\"progressbar\"\n data-state={getProgressState(value, max)}\n data-value={value ?? undefined}\n data-max={max}\n {...progressProps}\n ref={forwardedRef}\n />\n </ProgressProvider>\n );\n }\n);\n\nProgress.displayName = PROGRESS_NAME;\n\nProgress.propTypes = {\n max(props, propName, componentName) {\n const propValue = props[propName];\n const strVal = String(propValue);\n if (propValue && !isValidMaxNumber(propValue)) {\n return new Error(getInvalidMaxError(strVal, componentName));\n }\n return null;\n },\n value(props, propName, componentName) {\n const valueProp = props[propName];\n const strVal = String(valueProp);\n const max = isValidMaxNumber(props.max) ? props.max : DEFAULT_MAX;\n if (valueProp != null && !isValidValueNumber(valueProp, max)) {\n return new Error(getInvalidValueError(strVal, componentName));\n }\n return null;\n },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProgressIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'ProgressIndicator';\n\ntype ProgressIndicatorElement = React.ElementRef<typeof Primitive.div>;\ninterface ProgressIndicatorProps extends PrimitiveDivProps {}\n\nconst ProgressIndicator = React.forwardRef<ProgressIndicatorElement, ProgressIndicatorProps>(\n (props: ScopedProps<ProgressIndicatorProps>, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return (\n <Primitive.div\n data-state={getProgressState(context.value, context.max)}\n data-value={context.value ?? undefined}\n data-max={context.max}\n {...indicatorProps}\n ref={forwardedRef}\n />\n );\n }\n);\n\nProgressIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nfunction defaultGetValueLabel(value: number, max: number) {\n return `${Math.round((value / max) * 100)}%`;\n}\n\nfunction getProgressState(value: number | undefined | null, maxValue: number): ProgressState {\n return value == null ? 'indeterminate' : value === maxValue ? 'complete' : 'loading';\n}\n\nfunction isNumber(value: any): value is number {\n return typeof value === 'number';\n}\n\nfunction isValidMaxNumber(max: any): max is number {\n // prettier-ignore\n return (\n isNumber(max) &&\n !isNaN(max) &&\n max > 0\n );\n}\n\nfunction isValidValueNumber(value: any, max: number): value is number {\n // prettier-ignore\n return (\n isNumber(value) &&\n !isNaN(value) &&\n value <= max &&\n value >= 0\n );\n}\n\n// Split this out for clearer readability of the error message.\nfunction getInvalidMaxError(propValue: string, componentName: string) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\n\nfunction getInvalidValueError(propValue: string, componentName: string) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\n\nconst Root = Progress;\nconst Indicator = ProgressIndicator;\n\nexport {\n createProgressScope,\n //\n Progress,\n ProgressIndicator,\n //\n Root,\n Indicator,\n};\nexport type { ProgressProps, ProgressIndicatorProps };\n"],
5
- "mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AA4ClB;AAnCR,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAGpB,IAAM,CAAC,uBAAuB,mBAAmB,IAAI,mBAAmB,aAAa;AAIrF,IAAM,CAAC,kBAAkB,kBAAkB,IACzC,sBAA4C,aAAa;AAU3D,IAAM,WAAiB;AAAA,EACrB,CAAC,OAAmC,iBAAiB;AACnD,UAAM;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,MACP,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,GAAG;AAAA,IACL,IAAI;AAEJ,UAAM,MAAM,iBAAiB,OAAO,IAAI,UAAU;AAClD,UAAM,QAAQ,mBAAmB,WAAW,GAAG,IAAI,YAAY;AAC/D,UAAM,aAAa,SAAS,KAAK,IAAI,cAAc,OAAO,GAAG,IAAI;AAEjE,WACE,oBAAC,oBAAiB,OAAO,iBAAiB,OAAc,KACtD;AAAA,MAAC,UAAU;AAAA,MAAV;AAAA,QACC,iBAAe;AAAA,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,cAAY,QAAQ,SAAS;AAAA,QAC7B,YAAU,QAAQ;AAAA,QACjB,GAAG;AAAA,QACJ,KAAK;AAAA;AAAA,IACP;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAIhC,SAAS,qBAAqB,OAAe,KAAa;AACxD,SAAO,GAAG,KAAK,MAAO,QAAQ,MAAO,GAAG,CAAC;AAC3C;AAEA,SAAS,iBAAiB,OAAkC,UAAiC;AAC3F,SAAO,SAAS,OAAO,kBAAkB,UAAU,WAAW,aAAa;AAC7E;AAEA,SAAS,SAAS,OAA6B;AAC7C,SAAO,OAAO,UAAU;AAC1B;AAEA,SAAS,iBAAiB,KAAyB;AAEjD,SACE,SAAS,GAAG,KACZ,CAAC,MAAM,GAAG,KACV,MAAM;AAEV;AAEA,SAAS,mBAAmB,OAAY,KAA8B;AAEpE,SACE,SAAS,KAAK,KACd,CAAC,MAAM,KAAK,KACZ,SAAS,OACT,SAAS;AAEb;AAGA,SAAS,mBAAmB,WAAmB,eAAuB;AACpE,SAAO,mCAAmC,SAAS,oBAAoB,aAAa,yEAAyE,WAAW;AAC1K;AAEA,SAAS,qBAAqB,WAAmB,eAAuB;AACtE,SAAO,qCAAqC,SAAS,oBAAoB,aAAa;AAAA;AAAA,gDAExC,WAAW;AAAA;AAAA;AAAA;AAI3D;AAEA,IAAM,OAAO;AACb,IAAM,YAAY;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-progress",
3
- "version": "1.1.0-rc.1",
3
+ "version": "1.1.0-rc.3",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -28,8 +28,8 @@
28
28
  "version": "yarn version"
29
29
  },
30
30
  "dependencies": {
31
- "@radix-ui/react-context": "1.1.0-rc.1",
32
- "@radix-ui/react-primitive": "1.1.0-rc.1"
31
+ "@radix-ui/react-context": "1.1.0-rc.3",
32
+ "@radix-ui/react-primitive": "1.1.0-rc.3"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@types/react": "*",