@tamagui/progress 1.61.2 → 1.62.0
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/cjs/Progress.js +22 -60
- package/dist/cjs/Progress.js.map +2 -2
- package/dist/cjs/Progress.native.js +150 -0
- package/dist/cjs/Progress.native.js.map +6 -0
- package/dist/cjs/index.js +4 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +20 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/esm/Progress.js +15 -42
- package/dist/esm/Progress.js.map +2 -2
- package/dist/jsx/Progress.js +14 -40
- package/dist/jsx/Progress.js.map +2 -2
- package/dist/jsx/Progress.native.js +115 -0
- package/dist/jsx/Progress.native.js.map +6 -0
- package/dist/jsx/index.native.js +2 -0
- package/dist/jsx/index.native.js.map +6 -0
- package/package.json +7 -7
package/dist/cjs/Progress.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable:
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
14
11
|
for (let key of __getOwnPropNames(from))
|
|
15
|
-
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
13
|
return to;
|
|
19
14
|
};
|
|
20
15
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
@@ -22,10 +17,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
17
|
// file that has been converted to a CommonJS file using a Babel-
|
|
23
18
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
19
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable:
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
26
21
|
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
29
23
|
var Progress_exports = {};
|
|
30
24
|
__export(Progress_exports, {
|
|
31
25
|
Progress: () => Progress,
|
|
@@ -35,36 +29,23 @@ __export(Progress_exports, {
|
|
|
35
29
|
createProgressScope: () => createProgressScope
|
|
36
30
|
});
|
|
37
31
|
module.exports = __toCommonJS(Progress_exports);
|
|
38
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
|
|
40
|
-
var import_create_context = require("@tamagui/create-context");
|
|
41
|
-
var import_get_token = require("@tamagui/get-token");
|
|
42
|
-
var import_stacks = require("@tamagui/stacks");
|
|
43
|
-
var React = __toESM(require("react"));
|
|
44
|
-
const PROGRESS_NAME = "Progress";
|
|
45
|
-
const [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME);
|
|
46
|
-
const [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
|
|
47
|
-
const INDICATOR_NAME = "ProgressIndicator";
|
|
48
|
-
const ProgressIndicatorFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
32
|
+
var import_core = require("@tamagui/core"), import_create_context = require("@tamagui/create-context"), import_get_token = require("@tamagui/get-token"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react")), import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
49
34
|
name: INDICATOR_NAME,
|
|
50
35
|
variants: {
|
|
51
36
|
unstyled: {
|
|
52
37
|
false: {
|
|
53
38
|
height: "100%",
|
|
54
39
|
width: "100%",
|
|
55
|
-
backgrounded:
|
|
40
|
+
backgrounded: !0
|
|
56
41
|
}
|
|
57
42
|
}
|
|
58
43
|
},
|
|
59
44
|
defaultVariants: {
|
|
60
|
-
unstyled:
|
|
45
|
+
unstyled: !1
|
|
61
46
|
}
|
|
62
|
-
})
|
|
63
|
-
const
|
|
64
|
-
const { __scopeProgress, ...indicatorProps } = props;
|
|
65
|
-
const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
66
|
-
const pct = context.max - (context.value ?? 0);
|
|
67
|
-
const x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
47
|
+
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
48
|
+
const { __scopeProgress, ...indicatorProps } = props, context = useProgressContext(INDICATOR_NAME, __scopeProgress), pct = context.max - (context.value ?? 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
68
49
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
50
|
ProgressIndicatorFrame,
|
|
70
51
|
{
|
|
@@ -89,7 +70,7 @@ function getProgressState(value, maxValue) {
|
|
|
89
70
|
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
90
71
|
}
|
|
91
72
|
function isNumber(value) {
|
|
92
|
-
return typeof value
|
|
73
|
+
return typeof value == "number";
|
|
93
74
|
}
|
|
94
75
|
function isValidMaxNumber(max) {
|
|
95
76
|
return isNumber(max) && !isNaN(max) && max > 0;
|
|
@@ -97,26 +78,14 @@ function isValidMaxNumber(max) {
|
|
|
97
78
|
function isValidValueNumber(value, max) {
|
|
98
79
|
return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
|
|
99
80
|
}
|
|
100
|
-
|
|
101
|
-
return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`;
|
|
102
|
-
}
|
|
103
|
-
function getInvalidValueError(propValue, componentName) {
|
|
104
|
-
return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be:
|
|
105
|
-
- a positive number
|
|
106
|
-
- less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set)
|
|
107
|
-
- \`null\` if the progress is indeterminate.
|
|
108
|
-
|
|
109
|
-
Defaulting to \`null\`.`;
|
|
110
|
-
}
|
|
111
|
-
const DEFAULT_MAX = 100;
|
|
112
|
-
const ProgressFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
81
|
+
const DEFAULT_MAX = 100, ProgressFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
113
82
|
name: "Progress",
|
|
114
83
|
variants: {
|
|
115
84
|
unstyled: {
|
|
116
85
|
false: {
|
|
117
86
|
borderRadius: 1e5,
|
|
118
87
|
overflow: "hidden",
|
|
119
|
-
backgrounded:
|
|
88
|
+
backgrounded: !0
|
|
120
89
|
}
|
|
121
90
|
},
|
|
122
91
|
size: {
|
|
@@ -131,11 +100,10 @@ const ProgressFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
|
131
100
|
}
|
|
132
101
|
},
|
|
133
102
|
defaultVariants: {
|
|
134
|
-
unstyled:
|
|
103
|
+
unstyled: !1
|
|
135
104
|
}
|
|
136
|
-
})
|
|
137
|
-
|
|
138
|
-
ProgressFrame.styleable(function Progress2(props, forwardedRef) {
|
|
105
|
+
}), Progress = (0, import_core.withStaticProperties)(
|
|
106
|
+
ProgressFrame.styleable(function(props, forwardedRef) {
|
|
139
107
|
const {
|
|
140
108
|
__scopeProgress,
|
|
141
109
|
value: valueProp,
|
|
@@ -143,11 +111,7 @@ const Progress = (0, import_core.withStaticProperties)(
|
|
|
143
111
|
getValueLabel = defaultGetValueLabel,
|
|
144
112
|
size = "$true",
|
|
145
113
|
...progressProps
|
|
146
|
-
} = props;
|
|
147
|
-
const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
|
|
148
|
-
const value = isValidValueNumber(valueProp, max) ? valueProp : null;
|
|
149
|
-
const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
|
|
150
|
-
const [width, setWidth] = React.useState(0);
|
|
114
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] = React.useState(0);
|
|
151
115
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressProvider, { scope: __scopeProgress, value, max, width, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
152
116
|
ProgressFrame,
|
|
153
117
|
{
|
|
@@ -159,14 +123,12 @@ const Progress = (0, import_core.withStaticProperties)(
|
|
|
159
123
|
"data-state": getProgressState(value, max),
|
|
160
124
|
"data-value": value ?? void 0,
|
|
161
125
|
"data-max": max,
|
|
162
|
-
...progressProps.unstyled !==
|
|
126
|
+
...progressProps.unstyled !== !0 && {
|
|
163
127
|
size
|
|
164
128
|
},
|
|
165
129
|
...progressProps,
|
|
166
130
|
onLayout: (e) => {
|
|
167
|
-
|
|
168
|
-
setWidth(e.nativeEvent.layout.width);
|
|
169
|
-
(_a = progressProps.onLayout) == null ? void 0 : _a.call(progressProps, e);
|
|
131
|
+
setWidth(e.nativeEvent.layout.width), progressProps.onLayout?.(e);
|
|
170
132
|
},
|
|
171
133
|
ref: forwardedRef
|
|
172
134
|
}
|
package/dist/cjs/Progress.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Progress.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAyE,0BACzE,wBAA0C,oCAC1C,mBAAwB,+BACxB,gBAA4C,4BAC5C,QAAuB,2BA8CnB;AA3CJ,MAAM,gBAAgB,YAEhB,CAAC,uBAAuB,mBAAmB,QAAI,0CAAmB,aAAa,GAE/E,CAAC,kBAAkB,kBAAkB,IACzC,sBAA4C,aAAa,GAMrD,iBAAiB,qBAEV,6BAAyB,oBAAO,8BAAgB;AAAA,EAC3D,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU;AAAA,EACZ;AACF,CAAC,GAIK,oBAAoB,uBAAuB,UAAU,SACzD,OACA,cACA;AACA,QAAM,EAAE,iBAAiB,GAAG,eAAe,IAAI,OACzC,UAAU,mBAAmB,gBAAgB,eAAe,GAC5D,MAAM,QAAQ,OAAO,QAAQ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U,8BAAiB,IAAI,IAAI;AAAA,UACnC,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU;AAAA,EACZ;AACF,CAAC,GAQK,eAAW;AAAA,EACf,cAAc,UAAyB,SACrC,OACA,cACA;AACA,UAAM;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,MACP,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,GAAG;AAAA,IACL,IAAI,OAEE,MAAM,iBAAiB,OAAO,IAAI,UAAU,aAC5C,QAAQ,mBAAmB,WAAW,GAAG,IAAI,YAAY,MACzD,aAAa,SAAS,KAAK,IAAI,cAAc,OAAO,GAAG,IAAI,QAC3D,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,CAAC;AAE1C,WACE,4CAAC,oBAAiB,OAAO,iBAAiB,OAAc,KAAU,OAChE;AAAA,MAAC;AAAA;AAAA,QACC,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,iBAAe,SAAS,KAAK,IAAI,QAAQ;AAAA,QACzC,kBAAgB;AAAA,QAEhB,MAAK;AAAA,QACL,cAAY,iBAAiB,OAAO,GAAG;AAAA,QACvC,cAAY,SAAS;AAAA,QACrB,YAAU;AAAA,QACT,GAAI,cAAc,aAAa,MAAQ;AAAA,UACtC;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QACJ,UAAU,CAAC,MAAM;AACf,mBAAS,EAAE,YAAY,OAAO,KAAK,GACnC,cAAc,WAAW,CAAC;AAAA,QAC5B;AAAA,QACA,KAAK;AAAA;AAAA,IACP,GACF;AAAA,EAEJ,CAAC;AAAA,EACD;AAAA,IACE,WAAW;AAAA,EACb;AACF;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
+
mod
|
|
23
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
+
var Progress_exports = {};
|
|
25
|
+
__export(Progress_exports, {
|
|
26
|
+
Progress: () => Progress,
|
|
27
|
+
ProgressFrame: () => ProgressFrame,
|
|
28
|
+
ProgressIndicator: () => ProgressIndicator,
|
|
29
|
+
ProgressIndicatorFrame: () => ProgressIndicatorFrame,
|
|
30
|
+
createProgressScope: () => createProgressScope
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(Progress_exports);
|
|
33
|
+
var import_core = require("@tamagui/core"), import_create_context = require("@tamagui/create-context"), import_get_token = require("@tamagui/get-token"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react")), import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
35
|
+
name: INDICATOR_NAME,
|
|
36
|
+
variants: {
|
|
37
|
+
unstyled: {
|
|
38
|
+
false: {
|
|
39
|
+
height: "100%",
|
|
40
|
+
width: "100%",
|
|
41
|
+
backgrounded: !0
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
unstyled: !1
|
|
47
|
+
}
|
|
48
|
+
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
49
|
+
const { __scopeProgress, ...indicatorProps } = props, context = useProgressContext(INDICATOR_NAME, __scopeProgress), pct = context.max - (context.value ?? 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
ProgressIndicatorFrame,
|
|
52
|
+
{
|
|
53
|
+
"data-state": getProgressState(context.value, context.max),
|
|
54
|
+
"data-value": context.value ?? void 0,
|
|
55
|
+
"data-max": context.max,
|
|
56
|
+
x,
|
|
57
|
+
width: context.width,
|
|
58
|
+
...!props.unstyled && {
|
|
59
|
+
animateOnly: ["transform"],
|
|
60
|
+
opacity: context.width === 0 ? 0 : 1
|
|
61
|
+
},
|
|
62
|
+
...indicatorProps,
|
|
63
|
+
ref: forwardedRef
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
function defaultGetValueLabel(value, max) {
|
|
68
|
+
return `${Math.round(value / max * 100)}%`;
|
|
69
|
+
}
|
|
70
|
+
function getProgressState(value, maxValue) {
|
|
71
|
+
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
72
|
+
}
|
|
73
|
+
function isNumber(value) {
|
|
74
|
+
return typeof value == "number";
|
|
75
|
+
}
|
|
76
|
+
function isValidMaxNumber(max) {
|
|
77
|
+
return isNumber(max) && !isNaN(max) && max > 0;
|
|
78
|
+
}
|
|
79
|
+
function isValidValueNumber(value, max) {
|
|
80
|
+
return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
|
|
81
|
+
}
|
|
82
|
+
const DEFAULT_MAX = 100, ProgressFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
83
|
+
name: "Progress",
|
|
84
|
+
variants: {
|
|
85
|
+
unstyled: {
|
|
86
|
+
false: {
|
|
87
|
+
borderRadius: 1e5,
|
|
88
|
+
overflow: "hidden",
|
|
89
|
+
backgrounded: !0
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
size: {
|
|
93
|
+
"...size": (val) => {
|
|
94
|
+
const size = Math.round((0, import_core.getVariableValue)((0, import_get_token.getSize)(val)) * 0.25);
|
|
95
|
+
return {
|
|
96
|
+
height: size,
|
|
97
|
+
minWidth: (0, import_core.getVariableValue)(size) * 20,
|
|
98
|
+
width: "100%"
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
defaultVariants: {
|
|
104
|
+
unstyled: !1
|
|
105
|
+
}
|
|
106
|
+
}), Progress = (0, import_core.withStaticProperties)(
|
|
107
|
+
ProgressFrame.styleable(function(props, forwardedRef) {
|
|
108
|
+
const {
|
|
109
|
+
__scopeProgress,
|
|
110
|
+
value: valueProp,
|
|
111
|
+
max: maxProp,
|
|
112
|
+
getValueLabel = defaultGetValueLabel,
|
|
113
|
+
size = "$true",
|
|
114
|
+
...progressProps
|
|
115
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] = React.useState(0);
|
|
116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgressProvider, { scope: __scopeProgress, value, max, width, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
+
ProgressFrame,
|
|
118
|
+
{
|
|
119
|
+
"aria-valuemax": max,
|
|
120
|
+
"aria-valuemin": 0,
|
|
121
|
+
"aria-valuenow": isNumber(value) ? value : void 0,
|
|
122
|
+
"aria-valuetext": valueLabel,
|
|
123
|
+
role: "progressbar",
|
|
124
|
+
"data-state": getProgressState(value, max),
|
|
125
|
+
"data-value": value ?? void 0,
|
|
126
|
+
"data-max": max,
|
|
127
|
+
...progressProps.unstyled !== !0 && {
|
|
128
|
+
size
|
|
129
|
+
},
|
|
130
|
+
...progressProps,
|
|
131
|
+
onLayout: (e) => {
|
|
132
|
+
setWidth(e.nativeEvent.layout.width), progressProps.onLayout?.(e);
|
|
133
|
+
},
|
|
134
|
+
ref: forwardedRef
|
|
135
|
+
}
|
|
136
|
+
) });
|
|
137
|
+
}),
|
|
138
|
+
{
|
|
139
|
+
Indicator: ProgressIndicator
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
143
|
+
0 && (module.exports = {
|
|
144
|
+
Progress,
|
|
145
|
+
ProgressFrame,
|
|
146
|
+
ProgressIndicator,
|
|
147
|
+
ProgressIndicatorFrame,
|
|
148
|
+
createProgressScope
|
|
149
|
+
});
|
|
150
|
+
//# sourceMappingURL=Progress.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Progress.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAyE,0BACzE,wBAA0C,oCAC1C,mBAAwB,+BACxB,gBAA4C,4BAC5C,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AAA,QACzC,kBAAgB;AAAA,QAEhB,MAAK;AAAA,QACL,cAAY,iBAAiB,OAAO,GAAG;AAAA,QACvC,cAAY,SAAS;AAAA,QACrB,YAAU;AAAA,QACT,GAAI,cAAc,aAAa,MAAQ;AAAA,UACtC;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QACJ,UAAU,CAAC,MAAM;AACf,mBAAS,EAAE,YAAY,OAAO,KAAK,GACnC,cAAc,WAAW,CAAC;AAAA,QAC5B;AAAA,QACA,KAAK;AAAA;AAAA,IACP,GACF;AAAA,EAEJ,CAAC;AAAA,EACD;AAAA,IACE,WAAW;AAAA,EACb;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
5
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
7
|
for (let key of __getOwnPropNames(from))
|
|
9
|
-
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
9
|
return to;
|
|
13
|
-
};
|
|
14
|
-
var
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
12
|
var src_exports = {};
|
|
17
13
|
module.exports = __toCommonJS(src_exports);
|
|
18
14
|
__reExport(src_exports, require("./Progress"), module.exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
+
var src_exports = {};
|
|
14
|
+
module.exports = __toCommonJS(src_exports);
|
|
15
|
+
__reExport(src_exports, require("./Progress"), module.exports);
|
|
16
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
+
0 && (module.exports = {
|
|
18
|
+
...require("./Progress")
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/dist/esm/Progress.js
CHANGED
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
1
|
import { getVariableValue, styled, withStaticProperties } from "@tamagui/core";
|
|
3
2
|
import { createContextScope } from "@tamagui/create-context";
|
|
4
3
|
import { getSize } from "@tamagui/get-token";
|
|
5
4
|
import { ThemeableStack } from "@tamagui/stacks";
|
|
6
5
|
import * as React from "react";
|
|
7
|
-
|
|
8
|
-
const [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME)
|
|
9
|
-
const [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
|
|
10
|
-
const INDICATOR_NAME = "ProgressIndicator";
|
|
11
|
-
const ProgressIndicatorFrame = styled(ThemeableStack, {
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = styled(ThemeableStack, {
|
|
12
8
|
name: INDICATOR_NAME,
|
|
13
9
|
variants: {
|
|
14
10
|
unstyled: {
|
|
15
11
|
false: {
|
|
16
12
|
height: "100%",
|
|
17
13
|
width: "100%",
|
|
18
|
-
backgrounded:
|
|
14
|
+
backgrounded: !0
|
|
19
15
|
}
|
|
20
16
|
}
|
|
21
17
|
},
|
|
22
18
|
defaultVariants: {
|
|
23
|
-
unstyled:
|
|
19
|
+
unstyled: !1
|
|
24
20
|
}
|
|
25
|
-
})
|
|
26
|
-
const
|
|
27
|
-
const { __scopeProgress, ...indicatorProps } = props;
|
|
28
|
-
const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
29
|
-
const pct = context.max - (context.value ?? 0);
|
|
30
|
-
const x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
21
|
+
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
22
|
+
const { __scopeProgress, ...indicatorProps } = props, context = useProgressContext(INDICATOR_NAME, __scopeProgress), pct = context.max - (context.value ?? 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
31
23
|
return /* @__PURE__ */ jsx(
|
|
32
24
|
ProgressIndicatorFrame,
|
|
33
25
|
{
|
|
@@ -52,7 +44,7 @@ function getProgressState(value, maxValue) {
|
|
|
52
44
|
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
53
45
|
}
|
|
54
46
|
function isNumber(value) {
|
|
55
|
-
return typeof value
|
|
47
|
+
return typeof value == "number";
|
|
56
48
|
}
|
|
57
49
|
function isValidMaxNumber(max) {
|
|
58
50
|
return isNumber(max) && !isNaN(max) && max > 0;
|
|
@@ -60,26 +52,14 @@ function isValidMaxNumber(max) {
|
|
|
60
52
|
function isValidValueNumber(value, max) {
|
|
61
53
|
return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
|
|
62
54
|
}
|
|
63
|
-
|
|
64
|
-
return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`;
|
|
65
|
-
}
|
|
66
|
-
function getInvalidValueError(propValue, componentName) {
|
|
67
|
-
return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be:
|
|
68
|
-
- a positive number
|
|
69
|
-
- less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set)
|
|
70
|
-
- \`null\` if the progress is indeterminate.
|
|
71
|
-
|
|
72
|
-
Defaulting to \`null\`.`;
|
|
73
|
-
}
|
|
74
|
-
const DEFAULT_MAX = 100;
|
|
75
|
-
const ProgressFrame = styled(ThemeableStack, {
|
|
55
|
+
const DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
76
56
|
name: "Progress",
|
|
77
57
|
variants: {
|
|
78
58
|
unstyled: {
|
|
79
59
|
false: {
|
|
80
60
|
borderRadius: 1e5,
|
|
81
61
|
overflow: "hidden",
|
|
82
|
-
backgrounded:
|
|
62
|
+
backgrounded: !0
|
|
83
63
|
}
|
|
84
64
|
},
|
|
85
65
|
size: {
|
|
@@ -94,11 +74,10 @@ const ProgressFrame = styled(ThemeableStack, {
|
|
|
94
74
|
}
|
|
95
75
|
},
|
|
96
76
|
defaultVariants: {
|
|
97
|
-
unstyled:
|
|
77
|
+
unstyled: !1
|
|
98
78
|
}
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
ProgressFrame.styleable(function Progress2(props, forwardedRef) {
|
|
79
|
+
}), Progress = withStaticProperties(
|
|
80
|
+
ProgressFrame.styleable(function(props, forwardedRef) {
|
|
102
81
|
const {
|
|
103
82
|
__scopeProgress,
|
|
104
83
|
value: valueProp,
|
|
@@ -106,11 +85,7 @@ const Progress = withStaticProperties(
|
|
|
106
85
|
getValueLabel = defaultGetValueLabel,
|
|
107
86
|
size = "$true",
|
|
108
87
|
...progressProps
|
|
109
|
-
} = props;
|
|
110
|
-
const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
|
|
111
|
-
const value = isValidValueNumber(valueProp, max) ? valueProp : null;
|
|
112
|
-
const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
|
|
113
|
-
const [width, setWidth] = React.useState(0);
|
|
88
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] = React.useState(0);
|
|
114
89
|
return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, width, children: /* @__PURE__ */ jsx(
|
|
115
90
|
ProgressFrame,
|
|
116
91
|
{
|
|
@@ -122,14 +97,12 @@ const Progress = withStaticProperties(
|
|
|
122
97
|
"data-state": getProgressState(value, max),
|
|
123
98
|
"data-value": value ?? void 0,
|
|
124
99
|
"data-max": max,
|
|
125
|
-
...progressProps.unstyled !==
|
|
100
|
+
...progressProps.unstyled !== !0 && {
|
|
126
101
|
size
|
|
127
102
|
},
|
|
128
103
|
...progressProps,
|
|
129
104
|
onLayout: (e) => {
|
|
130
|
-
|
|
131
|
-
setWidth(e.nativeEvent.layout.width);
|
|
132
|
-
(_a = progressProps.onLayout) == null ? void 0 : _a.call(progressProps, e);
|
|
105
|
+
setWidth(e.nativeEvent.layout.width), progressProps.onLayout?.(e);
|
|
133
106
|
},
|
|
134
107
|
ref: forwardedRef
|
|
135
108
|
}
|
package/dist/esm/Progress.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Progress.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": "AAGA,SAAmB,kBAAkB,QAAQ,4BAA4B;AACzE,SAAgB,0BAA0B;AAC1C,SAAS,eAAe;AACxB,SAAS,sBAAmC;AAC5C,YAAY,WAAW;AA8CnB;AA3CJ,MAAM,gBAAgB,YAEhB,CAAC,uBAAuB,mBAAmB,IAAI,mBAAmB,aAAa,GAE/E,CAAC,kBAAkB,kBAAkB,IACzC,sBAA4C,aAAa,GAMrD,iBAAiB,qBAEV,yBAAyB,OAAO,gBAAgB;AAAA,EAC3D,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU;AAAA,EACZ;AACF,CAAC,GAIK,oBAAoB,uBAAuB,UAAU,SACzD,OACA,cACA;AACA,QAAM,EAAE,iBAAiB,GAAG,eAAe,IAAI,OACzC,UAAU,mBAAmB,gBAAgB,eAAe,GAC5D,MAAM,QAAQ,OAAO,QAAQ,SAAS,IAEtC,IAAI,EAAE,QAAQ,UAAU,IAAI,MAAM,QAAQ,UAAU,MAAM;AAChE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY,iBAAiB,QAAQ,OAAO,QAAQ,GAAG;AAAA,MACvD,cAAY,QAAQ,SAAS;AAAA,MAC7B,YAAU,QAAQ;AAAA,MAClB;AAAA,MACA,OAAO,QAAQ;AAAA,MACd,GAAI,CAAC,MAAM,YAAY;AAAA,QACtB,a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MACP,GAAG;AAAA,IACL,IAAI,OAEE,MAAM,iBAAiB,OAAO,IAAI,UAAU,aAC5C,QAAQ,mBAAmB,WAAW,GAAG,IAAI,YAAY,MACzD,aAAa,SAAS,KAAK,IAAI,cAAc,OAAO,GAAG,IAAI,QAC3D,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,CAAC;AAE1C,WACE,oBAAC,oBAAiB,OAAO,iBAAiB,OAAc,KAAU,OAChE;AAAA,MAAC;AAAA;AAAA,QACC,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,iBAAe,SAAS,KAAK,IAAI,QAAQ;AAAA,QACzC,kBAAgB;AAAA,QAEhB,MAAK;AAAA,QACL,cAAY,iBAAiB,OAAO,GAAG;AAAA,QACvC,cAAY,SAAS;AAAA,QACrB,YAAU;AAAA,QACT,GAAI,cAAc,aAAa,MAAQ;AAAA,UACtC;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QACJ,UAAU,CAAC,MAAM;AACf,mBAAS,EAAE,YAAY,OAAO,KAAK,GACnC,cAAc,WAAW,CAAC;AAAA,QAC5B;AAAA,QACA,KAAK;AAAA;AAAA,IACP,GACF;AAAA,EAEJ,CAAC;AAAA,EACD;AAAA,IACE,WAAW;AAAA,EACb;AACF;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
package/dist/jsx/Progress.js
CHANGED
|
@@ -3,30 +3,22 @@ import { createContextScope } from "@tamagui/create-context";
|
|
|
3
3
|
import { getSize } from "@tamagui/get-token";
|
|
4
4
|
import { ThemeableStack } from "@tamagui/stacks";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
const PROGRESS_NAME = "Progress"
|
|
7
|
-
const [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);
|
|
8
|
-
const [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
|
|
9
|
-
const INDICATOR_NAME = "ProgressIndicator";
|
|
10
|
-
const ProgressIndicatorFrame = styled(ThemeableStack, {
|
|
6
|
+
const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = styled(ThemeableStack, {
|
|
11
7
|
name: INDICATOR_NAME,
|
|
12
8
|
variants: {
|
|
13
9
|
unstyled: {
|
|
14
10
|
false: {
|
|
15
11
|
height: "100%",
|
|
16
12
|
width: "100%",
|
|
17
|
-
backgrounded:
|
|
13
|
+
backgrounded: !0
|
|
18
14
|
}
|
|
19
15
|
}
|
|
20
16
|
},
|
|
21
17
|
defaultVariants: {
|
|
22
|
-
unstyled:
|
|
18
|
+
unstyled: !1
|
|
23
19
|
}
|
|
24
|
-
})
|
|
25
|
-
const
|
|
26
|
-
const { __scopeProgress, ...indicatorProps } = props;
|
|
27
|
-
const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
28
|
-
const pct = context.max - (context.value ?? 0);
|
|
29
|
-
const x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
20
|
+
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
21
|
+
const { __scopeProgress, ...indicatorProps } = props, context = useProgressContext(INDICATOR_NAME, __scopeProgress), pct = context.max - (context.value ?? 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
30
22
|
return <ProgressIndicatorFrame
|
|
31
23
|
data-state={getProgressState(context.value, context.max)}
|
|
32
24
|
data-value={context.value ?? void 0}
|
|
@@ -48,7 +40,7 @@ function getProgressState(value, maxValue) {
|
|
|
48
40
|
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
49
41
|
}
|
|
50
42
|
function isNumber(value) {
|
|
51
|
-
return typeof value
|
|
43
|
+
return typeof value == "number";
|
|
52
44
|
}
|
|
53
45
|
function isValidMaxNumber(max) {
|
|
54
46
|
return isNumber(max) && !isNaN(max) && max > 0;
|
|
@@ -56,26 +48,14 @@ function isValidMaxNumber(max) {
|
|
|
56
48
|
function isValidValueNumber(value, max) {
|
|
57
49
|
return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
|
|
58
50
|
}
|
|
59
|
-
|
|
60
|
-
return `Invalid prop \`max\` of value \`${propValue}\` supplied to \`${componentName}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DEFAULT_MAX}\`.`;
|
|
61
|
-
}
|
|
62
|
-
function getInvalidValueError(propValue, componentName) {
|
|
63
|
-
return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be:
|
|
64
|
-
- a positive number
|
|
65
|
-
- less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set)
|
|
66
|
-
- \`null\` if the progress is indeterminate.
|
|
67
|
-
|
|
68
|
-
Defaulting to \`null\`.`;
|
|
69
|
-
}
|
|
70
|
-
const DEFAULT_MAX = 100;
|
|
71
|
-
const ProgressFrame = styled(ThemeableStack, {
|
|
51
|
+
const DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
72
52
|
name: "Progress",
|
|
73
53
|
variants: {
|
|
74
54
|
unstyled: {
|
|
75
55
|
false: {
|
|
76
56
|
borderRadius: 1e5,
|
|
77
57
|
overflow: "hidden",
|
|
78
|
-
backgrounded:
|
|
58
|
+
backgrounded: !0
|
|
79
59
|
}
|
|
80
60
|
},
|
|
81
61
|
size: {
|
|
@@ -90,11 +70,10 @@ const ProgressFrame = styled(ThemeableStack, {
|
|
|
90
70
|
}
|
|
91
71
|
},
|
|
92
72
|
defaultVariants: {
|
|
93
|
-
unstyled:
|
|
73
|
+
unstyled: !1
|
|
94
74
|
}
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
ProgressFrame.styleable(function Progress2(props, forwardedRef) {
|
|
75
|
+
}), Progress = withStaticProperties(
|
|
76
|
+
ProgressFrame.styleable(function(props, forwardedRef) {
|
|
98
77
|
const {
|
|
99
78
|
__scopeProgress,
|
|
100
79
|
value: valueProp,
|
|
@@ -102,11 +81,7 @@ const Progress = withStaticProperties(
|
|
|
102
81
|
getValueLabel = defaultGetValueLabel,
|
|
103
82
|
size = "$true",
|
|
104
83
|
...progressProps
|
|
105
|
-
} = props;
|
|
106
|
-
const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
|
|
107
|
-
const value = isValidValueNumber(valueProp, max) ? valueProp : null;
|
|
108
|
-
const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
|
|
109
|
-
const [width, setWidth] = React.useState(0);
|
|
84
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] = React.useState(0);
|
|
110
85
|
return <ProgressProvider scope={__scopeProgress} value={value} max={max} width={width}><ProgressFrame
|
|
111
86
|
aria-valuemax={max}
|
|
112
87
|
aria-valuemin={0}
|
|
@@ -116,13 +91,12 @@ const Progress = withStaticProperties(
|
|
|
116
91
|
data-state={getProgressState(value, max)}
|
|
117
92
|
data-value={value ?? void 0}
|
|
118
93
|
data-max={max}
|
|
119
|
-
{...progressProps.unstyled !==
|
|
94
|
+
{...progressProps.unstyled !== !0 && {
|
|
120
95
|
size
|
|
121
96
|
}}
|
|
122
97
|
{...progressProps}
|
|
123
98
|
onLayout={(e) => {
|
|
124
|
-
setWidth(e.nativeEvent.layout.width);
|
|
125
|
-
progressProps.onLayout?.(e);
|
|
99
|
+
setWidth(e.nativeEvent.layout.width), progressProps.onLayout?.(e);
|
|
126
100
|
}}
|
|
127
101
|
ref={forwardedRef}
|
|
128
102
|
/></ProgressProvider>;
|
package/dist/jsx/Progress.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Progress.tsx"],
|
|
4
|
-
"mappings": "AAGA,SAAmB,kBAAkB,QAAQ,4BAA4B;AACzE,SAAgB,0BAA0B;AAC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Q,IAAI,MAAM,SAAS,CAAC;AAE1C,WACE,CAAC,iBAAiB,OAAO,iBAAiB,OAAO,OAAO,KAAK,KAAK,OAAO,OACvE,CAAC;AAAA,MACC,eAAe;AAAA,MACf,eAAe;AAAA,MACf,eAAe,SAAS,KAAK,IAAI,QAAQ;AAAA,MACzC,gBAAgB;AAAA,MAEhB,KAAK;AAAA,MACL,YAAY,iBAAiB,OAAO,GAAG;AAAA,MACvC,YAAY,SAAS;AAAA,MACrB,UAAU;AAAA,UACL,cAAc,aAAa,MAAQ;AAAA,QACtC;AAAA,MACF;AAAA,UACI;AAAA,MACJ,UAAU,CAAC,MAAM;AACf,iBAAS,EAAE,YAAY,OAAO,KAAK,GACnC,cAAc,WAAW,CAAC;AAAA,MAC5B;AAAA,MACA,KAAK;AAAA,IACP,EACF,EArBC;AAAA,EAuBL,CAAC;AAAA,EACD;AAAA,IACE,WAAW;AAAA,EACb;AACF;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { getVariableValue, styled, withStaticProperties } from "@tamagui/core";
|
|
2
|
+
import { createContextScope } from "@tamagui/create-context";
|
|
3
|
+
import { getSize } from "@tamagui/get-token";
|
|
4
|
+
import { ThemeableStack } from "@tamagui/stacks";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = styled(ThemeableStack, {
|
|
7
|
+
name: INDICATOR_NAME,
|
|
8
|
+
variants: {
|
|
9
|
+
unstyled: {
|
|
10
|
+
false: {
|
|
11
|
+
height: "100%",
|
|
12
|
+
width: "100%",
|
|
13
|
+
backgrounded: !0
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
unstyled: !1
|
|
19
|
+
}
|
|
20
|
+
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
21
|
+
const { __scopeProgress, ...indicatorProps } = props, context = useProgressContext(INDICATOR_NAME, __scopeProgress), pct = context.max - (context.value ?? 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100);
|
|
22
|
+
return <ProgressIndicatorFrame
|
|
23
|
+
data-state={getProgressState(context.value, context.max)}
|
|
24
|
+
data-value={context.value ?? void 0}
|
|
25
|
+
data-max={context.max}
|
|
26
|
+
x={x}
|
|
27
|
+
width={context.width}
|
|
28
|
+
{...!props.unstyled && {
|
|
29
|
+
animateOnly: ["transform"],
|
|
30
|
+
opacity: context.width === 0 ? 0 : 1
|
|
31
|
+
}}
|
|
32
|
+
{...indicatorProps}
|
|
33
|
+
ref={forwardedRef}
|
|
34
|
+
/>;
|
|
35
|
+
});
|
|
36
|
+
function defaultGetValueLabel(value, max) {
|
|
37
|
+
return `${Math.round(value / max * 100)}%`;
|
|
38
|
+
}
|
|
39
|
+
function getProgressState(value, maxValue) {
|
|
40
|
+
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
41
|
+
}
|
|
42
|
+
function isNumber(value) {
|
|
43
|
+
return typeof value == "number";
|
|
44
|
+
}
|
|
45
|
+
function isValidMaxNumber(max) {
|
|
46
|
+
return isNumber(max) && !isNaN(max) && max > 0;
|
|
47
|
+
}
|
|
48
|
+
function isValidValueNumber(value, max) {
|
|
49
|
+
return isNumber(value) && !isNaN(value) && value <= max && value >= 0;
|
|
50
|
+
}
|
|
51
|
+
const DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
52
|
+
name: "Progress",
|
|
53
|
+
variants: {
|
|
54
|
+
unstyled: {
|
|
55
|
+
false: {
|
|
56
|
+
borderRadius: 1e5,
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
backgrounded: !0
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
size: {
|
|
62
|
+
"...size": (val) => {
|
|
63
|
+
const size = Math.round(getVariableValue(getSize(val)) * 0.25);
|
|
64
|
+
return {
|
|
65
|
+
height: size,
|
|
66
|
+
minWidth: getVariableValue(size) * 20,
|
|
67
|
+
width: "100%"
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
unstyled: !1
|
|
74
|
+
}
|
|
75
|
+
}), Progress = withStaticProperties(
|
|
76
|
+
ProgressFrame.styleable(function(props, forwardedRef) {
|
|
77
|
+
const {
|
|
78
|
+
__scopeProgress,
|
|
79
|
+
value: valueProp,
|
|
80
|
+
max: maxProp,
|
|
81
|
+
getValueLabel = defaultGetValueLabel,
|
|
82
|
+
size = "$true",
|
|
83
|
+
...progressProps
|
|
84
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] = React.useState(0);
|
|
85
|
+
return <ProgressProvider scope={__scopeProgress} value={value} max={max} width={width}><ProgressFrame
|
|
86
|
+
aria-valuemax={max}
|
|
87
|
+
aria-valuemin={0}
|
|
88
|
+
aria-valuenow={isNumber(value) ? value : void 0}
|
|
89
|
+
aria-valuetext={valueLabel}
|
|
90
|
+
role="progressbar"
|
|
91
|
+
data-state={getProgressState(value, max)}
|
|
92
|
+
data-value={value ?? void 0}
|
|
93
|
+
data-max={max}
|
|
94
|
+
{...progressProps.unstyled !== !0 && {
|
|
95
|
+
size
|
|
96
|
+
}}
|
|
97
|
+
{...progressProps}
|
|
98
|
+
onLayout={(e) => {
|
|
99
|
+
setWidth(e.nativeEvent.layout.width), progressProps.onLayout?.(e);
|
|
100
|
+
}}
|
|
101
|
+
ref={forwardedRef}
|
|
102
|
+
/></ProgressProvider>;
|
|
103
|
+
}),
|
|
104
|
+
{
|
|
105
|
+
Indicator: ProgressIndicator
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
export {
|
|
109
|
+
Progress,
|
|
110
|
+
ProgressFrame,
|
|
111
|
+
ProgressIndicator,
|
|
112
|
+
ProgressIndicatorFrame,
|
|
113
|
+
createProgressScope
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=Progress.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Progress.tsx"],
|
|
4
|
+
"mappings": "AAGA,SAAmB,kBAAkB,QAAQ,4BAA4B;AACzE,SAAgB,0BAA0B;AAC1C,SAAS,eAAe;AACxB,SAAS,sBAAmC;AAC5C,YAAY,WAAW;AAGvB,MAAM,gBAAgB,YAEhB,CAAC,uBAAuB,mBAAmB,IAAI,mBAAmB,aAAa,GAE/E,CAAC,kBAAkB,kBAAkB,IACzC,sBAA4C,aAAa,GAMrD,iBAAiB,qBAEV,yBAAyB,OAAO,gBAAgB;AAAA,EAC3D,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU;AAAA,EACZ;AACF,CAAC,GAIK,oBAAoB,uBAAuB,UAAU,SACzD,OACA,cACA;AACA,QAAM,EAAE,iBAAiB,GAAG,eAAe,IAAI,OACzC,UAAU,mBAAmB,gBAAgB,eAAe,GAC5D,MAAM,QAAQ,OAAO,QAAQ,SAAS,IAEtC,IAAI,EAAE,QAAQ,UAAU,IAAI,MAAM,QAAQ,UAAU,MAAM;AAChE,SACE,CAAC;AAAA,IACC,YAAY,iBAAiB,QAAQ,OAAO,QAAQ,GAAG;AAAA,IACvD,YAAY,QAAQ,SAAS;AAAA,IAC7B,UAAU,QAAQ;AAAA,IAClB,GAAG;AAAA,IACH,OAAO,QAAQ;AAAA,QACV,CAAC,MAAM,YAAY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A,MACP,GAAG;AAAA,IACL,IAAI,OAEE,MAAM,iBAAiB,OAAO,IAAI,UAAU,aAC5C,QAAQ,mBAAmB,WAAW,GAAG,IAAI,YAAY,MACzD,aAAa,SAAS,KAAK,IAAI,cAAc,OAAO,GAAG,IAAI,QAC3D,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,CAAC;AAE1C,WACE,CAAC,iBAAiB,OAAO,iBAAiB,OAAO,OAAO,KAAK,KAAK,OAAO,OACvE,CAAC;AAAA,MACC,eAAe;AAAA,MACf,eAAe;AAAA,MACf,eAAe,SAAS,KAAK,IAAI,QAAQ;AAAA,MACzC,gBAAgB;AAAA,MAEhB,KAAK;AAAA,MACL,YAAY,iBAAiB,OAAO,GAAG;AAAA,MACvC,YAAY,SAAS;AAAA,MACrB,UAAU;AAAA,UACL,cAAc,aAAa,MAAQ;AAAA,QACtC;AAAA,MACF;AAAA,UACI;AAAA,MACJ,UAAU,CAAC,MAAM;AACf,iBAAS,EAAE,YAAY,OAAO,KAAK,GACnC,cAAc,WAAW,CAAC;AAAA,MAC5B;AAAA,MACA,KAAK;AAAA,IACP,EACF,EArBC;AAAA,EAuBL,CAAC;AAAA,EACD;AAAA,IACE,WAAW;AAAA,EACb;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/progress",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.62.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@tamagui/compose-refs": "1.
|
|
35
|
-
"@tamagui/core": "1.
|
|
36
|
-
"@tamagui/create-context": "1.
|
|
37
|
-
"@tamagui/get-token": "1.
|
|
38
|
-
"@tamagui/stacks": "1.
|
|
34
|
+
"@tamagui/compose-refs": "1.62.0",
|
|
35
|
+
"@tamagui/core": "1.62.0",
|
|
36
|
+
"@tamagui/create-context": "1.62.0",
|
|
37
|
+
"@tamagui/get-token": "1.62.0",
|
|
38
|
+
"@tamagui/stacks": "1.62.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": "*",
|
|
42
42
|
"react-native": "*"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@tamagui/build": "1.
|
|
45
|
+
"@tamagui/build": "1.62.0",
|
|
46
46
|
"react": "^18.2.0",
|
|
47
47
|
"react-native": "^0.72.1"
|
|
48
48
|
},
|