@tamagui/progress 1.89.26 → 1.89.27-1708113113238
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.native.js +158 -61
- package/dist/cjs/Progress.native.js.map +3 -3
- package/dist/cjs/index.native.js.map +2 -2
- package/dist/esm/Progress.native.js +157 -61
- package/dist/esm/Progress.native.js.map +3 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/jsx/Progress.native.js +157 -61
- package/dist/jsx/Progress.native.js.map +3 -3
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +9 -9
|
@@ -30,8 +30,108 @@ __export(Progress_exports, {
|
|
|
30
30
|
createProgressScope: () => createProgressScope
|
|
31
31
|
});
|
|
32
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_helpers = require("@tamagui/helpers"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react"))
|
|
34
|
-
|
|
33
|
+
var import_core = require("@tamagui/core"), import_create_context = require("@tamagui/create-context"), import_get_token = require("@tamagui/get-token"), import_helpers = require("@tamagui/helpers"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react"));
|
|
34
|
+
function _array_like_to_array(arr, len) {
|
|
35
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
36
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
37
|
+
arr2[i] = arr[i];
|
|
38
|
+
return arr2;
|
|
39
|
+
}
|
|
40
|
+
function _array_with_holes(arr) {
|
|
41
|
+
if (Array.isArray(arr))
|
|
42
|
+
return arr;
|
|
43
|
+
}
|
|
44
|
+
function _define_property(obj, key, value) {
|
|
45
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
46
|
+
value,
|
|
47
|
+
enumerable: !0,
|
|
48
|
+
configurable: !0,
|
|
49
|
+
writable: !0
|
|
50
|
+
}) : obj[key] = value, obj;
|
|
51
|
+
}
|
|
52
|
+
function _iterable_to_array_limit(arr, i) {
|
|
53
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
54
|
+
if (_i != null) {
|
|
55
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
56
|
+
try {
|
|
57
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
58
|
+
;
|
|
59
|
+
} catch (err) {
|
|
60
|
+
_d = !0, _e = err;
|
|
61
|
+
} finally {
|
|
62
|
+
try {
|
|
63
|
+
!_n && _i.return != null && _i.return();
|
|
64
|
+
} finally {
|
|
65
|
+
if (_d)
|
|
66
|
+
throw _e;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return _arr;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function _non_iterable_rest() {
|
|
73
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
74
|
+
}
|
|
75
|
+
function _object_spread(target) {
|
|
76
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
77
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
78
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
79
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
80
|
+
}))), ownKeys2.forEach(function(key) {
|
|
81
|
+
_define_property(target, key, source[key]);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return target;
|
|
85
|
+
}
|
|
86
|
+
function ownKeys(object, enumerableOnly) {
|
|
87
|
+
var keys = Object.keys(object);
|
|
88
|
+
if (Object.getOwnPropertySymbols) {
|
|
89
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
90
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
91
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
92
|
+
})), keys.push.apply(keys, symbols);
|
|
93
|
+
}
|
|
94
|
+
return keys;
|
|
95
|
+
}
|
|
96
|
+
function _object_spread_props(target, source) {
|
|
97
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
98
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
99
|
+
}), target;
|
|
100
|
+
}
|
|
101
|
+
function _object_without_properties(source, excluded) {
|
|
102
|
+
if (source == null)
|
|
103
|
+
return {};
|
|
104
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
105
|
+
if (Object.getOwnPropertySymbols) {
|
|
106
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
107
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
108
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
109
|
+
}
|
|
110
|
+
return target;
|
|
111
|
+
}
|
|
112
|
+
function _object_without_properties_loose(source, excluded) {
|
|
113
|
+
if (source == null)
|
|
114
|
+
return {};
|
|
115
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
116
|
+
for (i = 0; i < sourceKeys.length; i++)
|
|
117
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
118
|
+
return target;
|
|
119
|
+
}
|
|
120
|
+
function _sliced_to_array(arr, i) {
|
|
121
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
122
|
+
}
|
|
123
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
124
|
+
if (o) {
|
|
125
|
+
if (typeof o == "string")
|
|
126
|
+
return _array_like_to_array(o, minLen);
|
|
127
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
128
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
129
|
+
return Array.from(n);
|
|
130
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
131
|
+
return _array_like_to_array(o, minLen);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
var PROGRESS_NAME = "Progress", _createContextScope = _sliced_to_array((0, import_create_context.createContextScope)(PROGRESS_NAME), 2), createProgressContext = _createContextScope[0], createProgressScope = _createContextScope[1], _createProgressContext = _sliced_to_array(createProgressContext(PROGRESS_NAME), 2), ProgressProvider = _createProgressContext[0], useProgressContext = _createProgressContext[1], INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
35
135
|
name: INDICATOR_NAME,
|
|
36
136
|
variants: {
|
|
37
137
|
unstyled: {
|
|
@@ -46,26 +146,26 @@ const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] =
|
|
|
46
146
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
47
147
|
}
|
|
48
148
|
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
);
|
|
149
|
+
var __scopeProgress = props.__scopeProgress, indicatorProps = _object_without_properties(props, [
|
|
150
|
+
"__scopeProgress"
|
|
151
|
+
]), context = useProgressContext(INDICATOR_NAME, __scopeProgress), _context_value, pct = context.max - ((_context_value = context.value) !== null && _context_value !== void 0 ? _context_value : 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100), _context_value1;
|
|
152
|
+
return /* @__PURE__ */ React.createElement(ProgressIndicatorFrame, _object_spread_props(_object_spread({
|
|
153
|
+
"data-state": getProgressState(context.value, context.max),
|
|
154
|
+
"data-value": (_context_value1 = context.value) !== null && _context_value1 !== void 0 ? _context_value1 : void 0,
|
|
155
|
+
"data-max": context.max,
|
|
156
|
+
x,
|
|
157
|
+
width: context.width
|
|
158
|
+
}, !props.unstyled && {
|
|
159
|
+
animateOnly: [
|
|
160
|
+
"transform"
|
|
161
|
+
],
|
|
162
|
+
opacity: context.width === 0 ? 0 : 1
|
|
163
|
+
}, indicatorProps), {
|
|
164
|
+
ref: forwardedRef
|
|
165
|
+
}));
|
|
66
166
|
});
|
|
67
167
|
function defaultGetValueLabel(value, max) {
|
|
68
|
-
return
|
|
168
|
+
return "".concat(Math.round(value / max * 100), "%");
|
|
69
169
|
}
|
|
70
170
|
function getProgressState(value, maxValue) {
|
|
71
171
|
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
@@ -79,7 +179,7 @@ function isValidMaxNumber(max) {
|
|
|
79
179
|
function isValidValueNumber(value, max) {
|
|
80
180
|
return isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0;
|
|
81
181
|
}
|
|
82
|
-
|
|
182
|
+
var DEFAULT_MAX = 100, ProgressFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
|
|
83
183
|
name: "Progress",
|
|
84
184
|
variants: {
|
|
85
185
|
unstyled: {
|
|
@@ -90,8 +190,8 @@ const DEFAULT_MAX = 100, ProgressFrame = (0, import_core.styled)(import_stacks.T
|
|
|
90
190
|
}
|
|
91
191
|
},
|
|
92
192
|
size: {
|
|
93
|
-
"...size": (val)
|
|
94
|
-
|
|
193
|
+
"...size": function(val) {
|
|
194
|
+
var size = Math.round((0, import_core.getVariableValue)((0, import_get_token.getSize)(val)) * 0.25);
|
|
95
195
|
return {
|
|
96
196
|
height: size,
|
|
97
197
|
minWidth: (0, import_core.getVariableValue)(size) * 20,
|
|
@@ -103,44 +203,41 @@ const DEFAULT_MAX = 100, ProgressFrame = (0, import_core.styled)(import_stacks.T
|
|
|
103
203
|
defaultVariants: {
|
|
104
204
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
105
205
|
}
|
|
106
|
-
}), Progress = (0, import_helpers.withStaticProperties)(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
Indicator: ProgressIndicator
|
|
142
|
-
}
|
|
143
|
-
);
|
|
206
|
+
}), Progress = (0, import_helpers.withStaticProperties)(ProgressFrame.styleable(function(props, forwardedRef) {
|
|
207
|
+
var __scopeProgress = props.__scopeProgress, valueProp = props.value, maxProp = props.max, _props_getValueLabel = props.getValueLabel, getValueLabel = _props_getValueLabel === void 0 ? defaultGetValueLabel : _props_getValueLabel, _props_size = props.size, size = _props_size === void 0 ? "$true" : _props_size, progressProps = _object_without_properties(props, [
|
|
208
|
+
"__scopeProgress",
|
|
209
|
+
"value",
|
|
210
|
+
"max",
|
|
211
|
+
"getValueLabel",
|
|
212
|
+
"size"
|
|
213
|
+
]), max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, _React_useState = _sliced_to_array(React.useState(0), 2), width = _React_useState[0], setWidth = _React_useState[1];
|
|
214
|
+
return /* @__PURE__ */ React.createElement(ProgressProvider, {
|
|
215
|
+
scope: __scopeProgress,
|
|
216
|
+
value,
|
|
217
|
+
max,
|
|
218
|
+
width
|
|
219
|
+
}, /* @__PURE__ */ React.createElement(ProgressFrame, _object_spread_props(_object_spread({
|
|
220
|
+
"aria-valuemax": max,
|
|
221
|
+
"aria-valuemin": 0,
|
|
222
|
+
"aria-valuenow": isNumber(value) ? value : void 0,
|
|
223
|
+
"aria-valuetext": valueLabel,
|
|
224
|
+
// @ts-ignore
|
|
225
|
+
role: "progressbar",
|
|
226
|
+
"data-state": getProgressState(value, max),
|
|
227
|
+
"data-value": value ?? void 0,
|
|
228
|
+
"data-max": max
|
|
229
|
+
}, progressProps.unstyled !== !0 && {
|
|
230
|
+
size
|
|
231
|
+
}, progressProps), {
|
|
232
|
+
onLayout: function(e) {
|
|
233
|
+
var _progressProps_onLayout;
|
|
234
|
+
setWidth(e.nativeEvent.layout.width), (_progressProps_onLayout = progressProps.onLayout) === null || _progressProps_onLayout === void 0 || _progressProps_onLayout.call(progressProps, e);
|
|
235
|
+
},
|
|
236
|
+
ref: forwardedRef
|
|
237
|
+
})));
|
|
238
|
+
}), {
|
|
239
|
+
Indicator: ProgressIndicator
|
|
240
|
+
});
|
|
144
241
|
// Annotate the CommonJS export names for ESM import in node:
|
|
145
242
|
0 && (module.exports = {
|
|
146
243
|
Progress,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/Progress.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/progress/src/Progress.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;AAIA,kBAAyC,0BAEzC,wBAAmC,oCACnC,mBAAwB,+BACxB,iBAAqC,6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AA,yBAAAA,SAAgBC,uBAAAA,sBAAAA,cAGdR,MAFFhB,MAAAA,OAAAA,gBAAAA,SAAO,UAAA,aACJyB,gBAAAA,2BACDT,OAAAA;IANFE;IACAE;IACAE;IACAC;IACAvB;MAIIsB,MAAMI,iBAAiBL,OAAAA,IAAWA,UAAUhC,aAC5C+B,QAAQO,mBAAmBR,WAAWG,GAAAA,IAAOH,YAAY,MACzDS,aAAaC,SAAST,KAAAA,IAASG,cAAcH,OAAOE,GAAAA,IAAOQ,QACvCC,kBAAAA,iBAAAA,MAAMC,SAAS,CAAA,GAAA,CAAA,GAAlCxB,QAAmBuB,gBAAAA,CAAAA,GAAZE,WAAYF,gBAAAA,CAAAA;AAE1B,SACE,sBAAA,cAACG,kBAAAA;IAAiBC,OAAOjB;IAAiBE;IAAcE;IAAUd;KAChE,sBAAA,cAAClB,eAAAA,qBAAAA,eAAAA;IACC8C,iBAAed;IACfe,iBAAe;IACfC,iBAAeT,SAAST,KAAAA,IAASA,QAAQU;IACzCS,kBAAgBX;;IAEhBY,MAAK;IACLC,cAAYC,iBAAiBtB,OAAOE,GAAAA;IACpCqB,cAAYvB,SAASU;IACrBc,YAAUtB;KACLG,cAAc9B,aAAa,MAAQ;IACtCK;EACF,GACIyB,aAAAA,GAAAA;IACJoB,UAAU,SAACC,GAAAA;UAETrB;AADAQ,eAASa,EAAEC,YAAYC,OAAOxC,KAAK,IACnCiB,0BAAAA,cAAcoB,cAAQ,QAAtBpB,4BAAAA,UAAAA,wBAAAA,KAAAA,eAAyBqB,CAAAA;IAC3B;IACAG,KAAKhC;;AAIb,CAAA,GACA;EACEiC,WAAWC;AACb,CAAA;",
|
|
5
|
+
"names": ["PROGRESS_NAME", "createContextScope", "createProgressContext", "createProgressScope", "ProgressProvider", "useProgressContext", "INDICATOR_NAME", "ProgressIndicatorFrame", "styled", "ThemeableStack", "name", "variants", "unstyled", "false", "height", "width", "backgrounded", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "ProgressIndicator", "styleable", "props", "forwardedRef", "__scopeProgress", "indicatorProps", "context", "pct", "max", "value", "x", "data-state", "getProgressState", "data-value", "undefined", "data-max", "animateOnly", "opacity", "ref", "defaultGetValueLabel", "Math", "round", "maxValue", "isNumber", "isValidMaxNumber", "Number", "isNaN", "isValidValueNumber", "DEFAULT_MAX", "ProgressFrame", "styled", "ThemeableStack", "name", "variants", "unstyled", "false", "borderRadius", "overflow", "backgrounded", "size", "val", "Math", "round", "getVariableValue", "getSize", "height", "minWidth", "width", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "Progress", "withStaticProperties", "styleable", "props", "forwardedRef", "__scopeProgress", "valueProp", "value", "maxProp", "max", "getValueLabel", "defaultGetValueLabel", "progressProps", "isValidMaxNumber", "isValidValueNumber", "valueLabel", "isNumber", "undefined", "React", "useState", "setWidth", "ProgressProvider", "scope", "aria-valuemax", "aria-valuemin", "aria-valuenow", "aria-valuetext", "role", "data-state", "getProgressState", "data-value", "data-max", "onLayout", "e", "nativeEvent", "layout", "ref", "Indicator", "ProgressIndicator"]
|
|
6
6
|
}
|
|
@@ -4,8 +4,107 @@ import { getSize } from "@tamagui/get-token";
|
|
|
4
4
|
import { withStaticProperties } from "@tamagui/helpers";
|
|
5
5
|
import { ThemeableStack } from "@tamagui/stacks";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function _array_like_to_array(arr, len) {
|
|
8
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
9
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
10
|
+
arr2[i] = arr[i];
|
|
11
|
+
return arr2;
|
|
12
|
+
}
|
|
13
|
+
function _array_with_holes(arr) {
|
|
14
|
+
if (Array.isArray(arr))
|
|
15
|
+
return arr;
|
|
16
|
+
}
|
|
17
|
+
function _define_property(obj, key, value) {
|
|
18
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
19
|
+
value,
|
|
20
|
+
enumerable: !0,
|
|
21
|
+
configurable: !0,
|
|
22
|
+
writable: !0
|
|
23
|
+
}) : obj[key] = value, obj;
|
|
24
|
+
}
|
|
25
|
+
function _iterable_to_array_limit(arr, i) {
|
|
26
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
27
|
+
if (_i != null) {
|
|
28
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
29
|
+
try {
|
|
30
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
31
|
+
;
|
|
32
|
+
} catch (err) {
|
|
33
|
+
_d = !0, _e = err;
|
|
34
|
+
} finally {
|
|
35
|
+
try {
|
|
36
|
+
!_n && _i.return != null && _i.return();
|
|
37
|
+
} finally {
|
|
38
|
+
if (_d)
|
|
39
|
+
throw _e;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return _arr;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function _non_iterable_rest() {
|
|
46
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
47
|
+
}
|
|
48
|
+
function _object_spread(target) {
|
|
49
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
50
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
51
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
52
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
53
|
+
}))), ownKeys2.forEach(function(key) {
|
|
54
|
+
_define_property(target, key, source[key]);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return target;
|
|
58
|
+
}
|
|
59
|
+
function ownKeys(object, enumerableOnly) {
|
|
60
|
+
var keys = Object.keys(object);
|
|
61
|
+
if (Object.getOwnPropertySymbols) {
|
|
62
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
63
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
64
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
65
|
+
})), keys.push.apply(keys, symbols);
|
|
66
|
+
}
|
|
67
|
+
return keys;
|
|
68
|
+
}
|
|
69
|
+
function _object_spread_props(target, source) {
|
|
70
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
71
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
72
|
+
}), target;
|
|
73
|
+
}
|
|
74
|
+
function _object_without_properties(source, excluded) {
|
|
75
|
+
if (source == null)
|
|
76
|
+
return {};
|
|
77
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
78
|
+
if (Object.getOwnPropertySymbols) {
|
|
79
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
80
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
81
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
82
|
+
}
|
|
83
|
+
return target;
|
|
84
|
+
}
|
|
85
|
+
function _object_without_properties_loose(source, excluded) {
|
|
86
|
+
if (source == null)
|
|
87
|
+
return {};
|
|
88
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
89
|
+
for (i = 0; i < sourceKeys.length; i++)
|
|
90
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
91
|
+
return target;
|
|
92
|
+
}
|
|
93
|
+
function _sliced_to_array(arr, i) {
|
|
94
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
95
|
+
}
|
|
96
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
97
|
+
if (o) {
|
|
98
|
+
if (typeof o == "string")
|
|
99
|
+
return _array_like_to_array(o, minLen);
|
|
100
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
101
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
102
|
+
return Array.from(n);
|
|
103
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
104
|
+
return _array_like_to_array(o, minLen);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
var PROGRESS_NAME = "Progress", _createContextScope = _sliced_to_array(createContextScope(PROGRESS_NAME), 2), createProgressContext = _createContextScope[0], createProgressScope = _createContextScope[1], _createProgressContext = _sliced_to_array(createProgressContext(PROGRESS_NAME), 2), ProgressProvider = _createProgressContext[0], useProgressContext = _createProgressContext[1], INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = styled(ThemeableStack, {
|
|
9
108
|
name: INDICATOR_NAME,
|
|
10
109
|
variants: {
|
|
11
110
|
unstyled: {
|
|
@@ -20,26 +119,26 @@ const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] =
|
|
|
20
119
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
21
120
|
}
|
|
22
121
|
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
);
|
|
122
|
+
var __scopeProgress = props.__scopeProgress, indicatorProps = _object_without_properties(props, [
|
|
123
|
+
"__scopeProgress"
|
|
124
|
+
]), context = useProgressContext(INDICATOR_NAME, __scopeProgress), _context_value, pct = context.max - ((_context_value = context.value) !== null && _context_value !== void 0 ? _context_value : 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100), _context_value1;
|
|
125
|
+
return /* @__PURE__ */ React.createElement(ProgressIndicatorFrame, _object_spread_props(_object_spread({
|
|
126
|
+
"data-state": getProgressState(context.value, context.max),
|
|
127
|
+
"data-value": (_context_value1 = context.value) !== null && _context_value1 !== void 0 ? _context_value1 : void 0,
|
|
128
|
+
"data-max": context.max,
|
|
129
|
+
x,
|
|
130
|
+
width: context.width
|
|
131
|
+
}, !props.unstyled && {
|
|
132
|
+
animateOnly: [
|
|
133
|
+
"transform"
|
|
134
|
+
],
|
|
135
|
+
opacity: context.width === 0 ? 0 : 1
|
|
136
|
+
}, indicatorProps), {
|
|
137
|
+
ref: forwardedRef
|
|
138
|
+
}));
|
|
40
139
|
});
|
|
41
140
|
function defaultGetValueLabel(value, max) {
|
|
42
|
-
return
|
|
141
|
+
return "".concat(Math.round(value / max * 100), "%");
|
|
43
142
|
}
|
|
44
143
|
function getProgressState(value, maxValue) {
|
|
45
144
|
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
@@ -53,7 +152,7 @@ function isValidMaxNumber(max) {
|
|
|
53
152
|
function isValidValueNumber(value, max) {
|
|
54
153
|
return isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0;
|
|
55
154
|
}
|
|
56
|
-
|
|
155
|
+
var DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
57
156
|
name: "Progress",
|
|
58
157
|
variants: {
|
|
59
158
|
unstyled: {
|
|
@@ -64,8 +163,8 @@ const DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
|
64
163
|
}
|
|
65
164
|
},
|
|
66
165
|
size: {
|
|
67
|
-
"...size": (val)
|
|
68
|
-
|
|
166
|
+
"...size": function(val) {
|
|
167
|
+
var size = Math.round(getVariableValue(getSize(val)) * 0.25);
|
|
69
168
|
return {
|
|
70
169
|
height: size,
|
|
71
170
|
minWidth: getVariableValue(size) * 20,
|
|
@@ -77,44 +176,41 @@ const DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
|
77
176
|
defaultVariants: {
|
|
78
177
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
79
178
|
}
|
|
80
|
-
}), Progress = withStaticProperties(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
Indicator: ProgressIndicator
|
|
116
|
-
}
|
|
117
|
-
);
|
|
179
|
+
}), Progress = withStaticProperties(ProgressFrame.styleable(function(props, forwardedRef) {
|
|
180
|
+
var __scopeProgress = props.__scopeProgress, valueProp = props.value, maxProp = props.max, _props_getValueLabel = props.getValueLabel, getValueLabel = _props_getValueLabel === void 0 ? defaultGetValueLabel : _props_getValueLabel, _props_size = props.size, size = _props_size === void 0 ? "$true" : _props_size, progressProps = _object_without_properties(props, [
|
|
181
|
+
"__scopeProgress",
|
|
182
|
+
"value",
|
|
183
|
+
"max",
|
|
184
|
+
"getValueLabel",
|
|
185
|
+
"size"
|
|
186
|
+
]), max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, _React_useState = _sliced_to_array(React.useState(0), 2), width = _React_useState[0], setWidth = _React_useState[1];
|
|
187
|
+
return /* @__PURE__ */ React.createElement(ProgressProvider, {
|
|
188
|
+
scope: __scopeProgress,
|
|
189
|
+
value,
|
|
190
|
+
max,
|
|
191
|
+
width
|
|
192
|
+
}, /* @__PURE__ */ React.createElement(ProgressFrame, _object_spread_props(_object_spread({
|
|
193
|
+
"aria-valuemax": max,
|
|
194
|
+
"aria-valuemin": 0,
|
|
195
|
+
"aria-valuenow": isNumber(value) ? value : void 0,
|
|
196
|
+
"aria-valuetext": valueLabel,
|
|
197
|
+
// @ts-ignore
|
|
198
|
+
role: "progressbar",
|
|
199
|
+
"data-state": getProgressState(value, max),
|
|
200
|
+
"data-value": value ?? void 0,
|
|
201
|
+
"data-max": max
|
|
202
|
+
}, progressProps.unstyled !== !0 && {
|
|
203
|
+
size
|
|
204
|
+
}, progressProps), {
|
|
205
|
+
onLayout: function(e) {
|
|
206
|
+
var _progressProps_onLayout;
|
|
207
|
+
setWidth(e.nativeEvent.layout.width), (_progressProps_onLayout = progressProps.onLayout) === null || _progressProps_onLayout === void 0 || _progressProps_onLayout.call(progressProps, e);
|
|
208
|
+
},
|
|
209
|
+
ref: forwardedRef
|
|
210
|
+
})));
|
|
211
|
+
}), {
|
|
212
|
+
Indicator: ProgressIndicator
|
|
213
|
+
});
|
|
118
214
|
export {
|
|
119
215
|
Progress,
|
|
120
216
|
ProgressFrame,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/Progress.tsx"],
|
|
4
|
-
"mappings": "AAIA,
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/progress/src/Progress.tsx"],
|
|
4
|
+
"mappings": "AAIA,SAASA,kBAAkBC,cAAc;AAEzC,SAASC,0BAA0B;AACnC,SAASC,eAAe;AACxB,SAASC,4BAA4B;AACrC,SAASC,sBAAmC;AAC5C,YAAYC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IACAE;IACAE;IACAC;IACAvB;MAIIsB,MAAMI,iBAAiBL,OAAAA,IAAWA,UAAUhC,aAC5C+B,QAAQO,mBAAmBR,WAAWG,GAAAA,IAAOH,YAAY,MACzDS,aAAaC,SAAST,KAAAA,IAASG,cAAcH,OAAOE,GAAAA,IAAOQ,QACvCC,kBAAAA,iBAAAA,MAAMC,SAAS,CAAA,GAAA,CAAA,GAAlCxB,QAAmBuB,gBAAAA,CAAAA,GAAZE,WAAYF,gBAAAA,CAAAA;AAE1B,SACE,sBAAA,cAACG,kBAAAA;IAAiBC,OAAOjB;IAAiBE;IAAcE;IAAUd;KAChE,sBAAA,cAAClB,eAAAA,qBAAAA,eAAAA;IACC8C,iBAAed;IACfe,iBAAe;IACfC,iBAAeT,SAAST,KAAAA,IAASA,QAAQU;IACzCS,kBAAgBX;;IAEhBY,MAAK;IACLC,cAAYC,iBAAiBtB,OAAOE,GAAAA;IACpCqB,cAAYvB,SAASU;IACrBc,YAAUtB;KACLG,cAAc9B,aAAa,MAAQ;IACtCK;EACF,GACIyB,aAAAA,GAAAA;IACJoB,UAAU,SAACC,GAAAA;UAETrB;AADAQ,eAASa,EAAEC,YAAYC,OAAOxC,KAAK,IACnCiB,0BAAAA,cAAcoB,cAAQ,QAAtBpB,4BAAAA,UAAAA,wBAAAA,KAAAA,eAAyBqB,CAAAA;IAC3B;IACAG,KAAKhC;;AAIb,CAAA,GACA;EACEiC,WAAWC;AACb,CAAA;",
|
|
5
|
+
"names": ["getVariableValue", "styled", "createContextScope", "getSize", "withStaticProperties", "ThemeableStack", "React", "PROGRESS_NAME", "createProgressContext", "createProgressScope", "ProgressProvider", "useProgressContext", "INDICATOR_NAME", "ProgressIndicatorFrame", "name", "variants", "unstyled", "false", "height", "width", "backgrounded", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "ProgressIndicator", "styleable", "props", "forwardedRef", "__scopeProgress", "indicatorProps", "context", "pct", "max", "value", "x", "data-state", "getProgressState", "data-value", "undefined", "data-max", "animateOnly", "opacity", "ref", "defaultGetValueLabel", "Math", "round", "maxValue", "isNumber", "isValidMaxNumber", "Number", "isNaN", "isValidValueNumber", "DEFAULT_MAX", "ProgressFrame", "styled", "ThemeableStack", "name", "variants", "unstyled", "false", "borderRadius", "overflow", "backgrounded", "size", "val", "Math", "round", "getVariableValue", "getSize", "height", "minWidth", "width", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "Progress", "withStaticProperties", "styleable", "props", "forwardedRef", "__scopeProgress", "valueProp", "value", "maxProp", "max", "getValueLabel", "defaultGetValueLabel", "progressProps", "isValidMaxNumber", "isValidValueNumber", "valueLabel", "isNumber", "undefined", "React", "useState", "setWidth", "ProgressProvider", "scope", "aria-valuemax", "aria-valuemin", "aria-valuenow", "aria-valuetext", "role", "data-state", "getProgressState", "data-value", "data-max", "onLayout", "e", "nativeEvent", "layout", "ref", "Indicator", "ProgressIndicator"]
|
|
6
6
|
}
|
|
@@ -4,8 +4,107 @@ import { getSize } from "@tamagui/get-token";
|
|
|
4
4
|
import { withStaticProperties } from "@tamagui/helpers";
|
|
5
5
|
import { ThemeableStack } from "@tamagui/stacks";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function _array_like_to_array(arr, len) {
|
|
8
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
9
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
10
|
+
arr2[i] = arr[i];
|
|
11
|
+
return arr2;
|
|
12
|
+
}
|
|
13
|
+
function _array_with_holes(arr) {
|
|
14
|
+
if (Array.isArray(arr))
|
|
15
|
+
return arr;
|
|
16
|
+
}
|
|
17
|
+
function _define_property(obj, key, value) {
|
|
18
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
19
|
+
value,
|
|
20
|
+
enumerable: !0,
|
|
21
|
+
configurable: !0,
|
|
22
|
+
writable: !0
|
|
23
|
+
}) : obj[key] = value, obj;
|
|
24
|
+
}
|
|
25
|
+
function _iterable_to_array_limit(arr, i) {
|
|
26
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
27
|
+
if (_i != null) {
|
|
28
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
29
|
+
try {
|
|
30
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
31
|
+
;
|
|
32
|
+
} catch (err) {
|
|
33
|
+
_d = !0, _e = err;
|
|
34
|
+
} finally {
|
|
35
|
+
try {
|
|
36
|
+
!_n && _i.return != null && _i.return();
|
|
37
|
+
} finally {
|
|
38
|
+
if (_d)
|
|
39
|
+
throw _e;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return _arr;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function _non_iterable_rest() {
|
|
46
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
47
|
+
}
|
|
48
|
+
function _object_spread(target) {
|
|
49
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
50
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
51
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
52
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
53
|
+
}))), ownKeys2.forEach(function(key) {
|
|
54
|
+
_define_property(target, key, source[key]);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return target;
|
|
58
|
+
}
|
|
59
|
+
function ownKeys(object, enumerableOnly) {
|
|
60
|
+
var keys = Object.keys(object);
|
|
61
|
+
if (Object.getOwnPropertySymbols) {
|
|
62
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
63
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
64
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
65
|
+
})), keys.push.apply(keys, symbols);
|
|
66
|
+
}
|
|
67
|
+
return keys;
|
|
68
|
+
}
|
|
69
|
+
function _object_spread_props(target, source) {
|
|
70
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
71
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
72
|
+
}), target;
|
|
73
|
+
}
|
|
74
|
+
function _object_without_properties(source, excluded) {
|
|
75
|
+
if (source == null)
|
|
76
|
+
return {};
|
|
77
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
78
|
+
if (Object.getOwnPropertySymbols) {
|
|
79
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
80
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
81
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
82
|
+
}
|
|
83
|
+
return target;
|
|
84
|
+
}
|
|
85
|
+
function _object_without_properties_loose(source, excluded) {
|
|
86
|
+
if (source == null)
|
|
87
|
+
return {};
|
|
88
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
89
|
+
for (i = 0; i < sourceKeys.length; i++)
|
|
90
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
91
|
+
return target;
|
|
92
|
+
}
|
|
93
|
+
function _sliced_to_array(arr, i) {
|
|
94
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
95
|
+
}
|
|
96
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
97
|
+
if (o) {
|
|
98
|
+
if (typeof o == "string")
|
|
99
|
+
return _array_like_to_array(o, minLen);
|
|
100
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
101
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
102
|
+
return Array.from(n);
|
|
103
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
104
|
+
return _array_like_to_array(o, minLen);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
var PROGRESS_NAME = "Progress", _createContextScope = _sliced_to_array(createContextScope(PROGRESS_NAME), 2), createProgressContext = _createContextScope[0], createProgressScope = _createContextScope[1], _createProgressContext = _sliced_to_array(createProgressContext(PROGRESS_NAME), 2), ProgressProvider = _createProgressContext[0], useProgressContext = _createProgressContext[1], INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = styled(ThemeableStack, {
|
|
9
108
|
name: INDICATOR_NAME,
|
|
10
109
|
variants: {
|
|
11
110
|
unstyled: {
|
|
@@ -20,26 +119,26 @@ const PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] =
|
|
|
20
119
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
21
120
|
}
|
|
22
121
|
}), ProgressIndicator = ProgressIndicatorFrame.styleable(function(props, forwardedRef) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
);
|
|
122
|
+
var __scopeProgress = props.__scopeProgress, indicatorProps = _object_without_properties(props, [
|
|
123
|
+
"__scopeProgress"
|
|
124
|
+
]), context = useProgressContext(INDICATOR_NAME, __scopeProgress), _context_value, pct = context.max - ((_context_value = context.value) !== null && _context_value !== void 0 ? _context_value : 0), x = -(context.width === 0 ? 300 : context.width) * (pct / 100), _context_value1;
|
|
125
|
+
return /* @__PURE__ */ React.createElement(ProgressIndicatorFrame, _object_spread_props(_object_spread({
|
|
126
|
+
"data-state": getProgressState(context.value, context.max),
|
|
127
|
+
"data-value": (_context_value1 = context.value) !== null && _context_value1 !== void 0 ? _context_value1 : void 0,
|
|
128
|
+
"data-max": context.max,
|
|
129
|
+
x,
|
|
130
|
+
width: context.width
|
|
131
|
+
}, !props.unstyled && {
|
|
132
|
+
animateOnly: [
|
|
133
|
+
"transform"
|
|
134
|
+
],
|
|
135
|
+
opacity: context.width === 0 ? 0 : 1
|
|
136
|
+
}, indicatorProps), {
|
|
137
|
+
ref: forwardedRef
|
|
138
|
+
}));
|
|
40
139
|
});
|
|
41
140
|
function defaultGetValueLabel(value, max) {
|
|
42
|
-
return
|
|
141
|
+
return "".concat(Math.round(value / max * 100), "%");
|
|
43
142
|
}
|
|
44
143
|
function getProgressState(value, maxValue) {
|
|
45
144
|
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
@@ -53,7 +152,7 @@ function isValidMaxNumber(max) {
|
|
|
53
152
|
function isValidValueNumber(value, max) {
|
|
54
153
|
return isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0;
|
|
55
154
|
}
|
|
56
|
-
|
|
155
|
+
var DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
57
156
|
name: "Progress",
|
|
58
157
|
variants: {
|
|
59
158
|
unstyled: {
|
|
@@ -64,8 +163,8 @@ const DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
|
64
163
|
}
|
|
65
164
|
},
|
|
66
165
|
size: {
|
|
67
|
-
"...size": (val)
|
|
68
|
-
|
|
166
|
+
"...size": function(val) {
|
|
167
|
+
var size = Math.round(getVariableValue(getSize(val)) * 0.25);
|
|
69
168
|
return {
|
|
70
169
|
height: size,
|
|
71
170
|
minWidth: getVariableValue(size) * 20,
|
|
@@ -77,44 +176,41 @@ const DEFAULT_MAX = 100, ProgressFrame = styled(ThemeableStack, {
|
|
|
77
176
|
defaultVariants: {
|
|
78
177
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
79
178
|
}
|
|
80
|
-
}), Progress = withStaticProperties(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
Indicator: ProgressIndicator
|
|
116
|
-
}
|
|
117
|
-
);
|
|
179
|
+
}), Progress = withStaticProperties(ProgressFrame.styleable(function(props, forwardedRef) {
|
|
180
|
+
var __scopeProgress = props.__scopeProgress, valueProp = props.value, maxProp = props.max, _props_getValueLabel = props.getValueLabel, getValueLabel = _props_getValueLabel === void 0 ? defaultGetValueLabel : _props_getValueLabel, _props_size = props.size, size = _props_size === void 0 ? "$true" : _props_size, progressProps = _object_without_properties(props, [
|
|
181
|
+
"__scopeProgress",
|
|
182
|
+
"value",
|
|
183
|
+
"max",
|
|
184
|
+
"getValueLabel",
|
|
185
|
+
"size"
|
|
186
|
+
]), max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, _React_useState = _sliced_to_array(React.useState(0), 2), width = _React_useState[0], setWidth = _React_useState[1];
|
|
187
|
+
return /* @__PURE__ */ React.createElement(ProgressProvider, {
|
|
188
|
+
scope: __scopeProgress,
|
|
189
|
+
value,
|
|
190
|
+
max,
|
|
191
|
+
width
|
|
192
|
+
}, /* @__PURE__ */ React.createElement(ProgressFrame, _object_spread_props(_object_spread({
|
|
193
|
+
"aria-valuemax": max,
|
|
194
|
+
"aria-valuemin": 0,
|
|
195
|
+
"aria-valuenow": isNumber(value) ? value : void 0,
|
|
196
|
+
"aria-valuetext": valueLabel,
|
|
197
|
+
// @ts-ignore
|
|
198
|
+
role: "progressbar",
|
|
199
|
+
"data-state": getProgressState(value, max),
|
|
200
|
+
"data-value": value ?? void 0,
|
|
201
|
+
"data-max": max
|
|
202
|
+
}, progressProps.unstyled !== !0 && {
|
|
203
|
+
size
|
|
204
|
+
}, progressProps), {
|
|
205
|
+
onLayout: function(e) {
|
|
206
|
+
var _progressProps_onLayout;
|
|
207
|
+
setWidth(e.nativeEvent.layout.width), (_progressProps_onLayout = progressProps.onLayout) === null || _progressProps_onLayout === void 0 || _progressProps_onLayout.call(progressProps, e);
|
|
208
|
+
},
|
|
209
|
+
ref: forwardedRef
|
|
210
|
+
})));
|
|
211
|
+
}), {
|
|
212
|
+
Indicator: ProgressIndicator
|
|
213
|
+
});
|
|
118
214
|
export {
|
|
119
215
|
Progress,
|
|
120
216
|
ProgressFrame,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/Progress.tsx"],
|
|
4
|
-
"mappings": "AAIA,
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/progress/src/Progress.tsx"],
|
|
4
|
+
"mappings": "AAIA,SAASA,kBAAkBC,cAAc;AAEzC,SAASC,0BAA0B;AACnC,SAASC,eAAe;AACxB,SAASC,4BAA4B;AACrC,SAASC,sBAAmC;AAC5C,YAAYC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGvB,IAAMC,gBAAgB,YAE+BL,sBAAAA,iBAAAA,mBAAmBK,aAAAA,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AmBR,WAAWG,GAAAA,IAAOH,YAAY,MACzDS,aAAaC,SAAST,KAAAA,IAASG,cAAcH,OAAOE,GAAAA,IAAOQ,QACvCC,kBAAAA,iBAAAA,MAAMC,SAAS,CAAA,GAAA,CAAA,GAAlCxB,QAAmBuB,gBAAAA,CAAAA,GAAZE,WAAYF,gBAAAA,CAAAA;AAE1B,SACE,sBAAA,cAACG,kBAAAA;IAAiBC,OAAOjB;IAAiBE;IAAcE;IAAUd;KAChE,sBAAA,cAAClB,eAAAA,qBAAAA,eAAAA;IACC8C,iBAAed;IACfe,iBAAe;IACfC,iBAAeT,SAAST,KAAAA,IAASA,QAAQU;IACzCS,kBAAgBX;;IAEhBY,MAAK;IACLC,cAAYC,iBAAiBtB,OAAOE,GAAAA;IACpCqB,cAAYvB,SAASU;IACrBc,YAAUtB;KACLG,cAAc9B,aAAa,MAAQ;IACtCK;EACF,GACIyB,aAAAA,GAAAA;IACJoB,UAAU,SAACC,GAAAA;UAETrB;AADAQ,eAASa,EAAEC,YAAYC,OAAOxC,KAAK,IACnCiB,0BAAAA,cAAcoB,cAAQ,QAAtBpB,4BAAAA,UAAAA,wBAAAA,KAAAA,eAAyBqB,CAAAA;IAC3B;IACAG,KAAKhC;;AAIb,CAAA,GACA;EACEiC,WAAWC;AACb,CAAA;",
|
|
5
|
+
"names": ["getVariableValue", "styled", "createContextScope", "getSize", "withStaticProperties", "ThemeableStack", "React", "PROGRESS_NAME", "createProgressContext", "createProgressScope", "ProgressProvider", "useProgressContext", "INDICATOR_NAME", "ProgressIndicatorFrame", "name", "variants", "unstyled", "false", "height", "width", "backgrounded", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "ProgressIndicator", "styleable", "props", "forwardedRef", "__scopeProgress", "indicatorProps", "context", "pct", "max", "value", "x", "data-state", "getProgressState", "data-value", "undefined", "data-max", "animateOnly", "opacity", "ref", "defaultGetValueLabel", "Math", "round", "maxValue", "isNumber", "isValidMaxNumber", "Number", "isNaN", "isValidValueNumber", "DEFAULT_MAX", "ProgressFrame", "styled", "ThemeableStack", "name", "variants", "unstyled", "false", "borderRadius", "overflow", "backgrounded", "size", "val", "Math", "round", "getVariableValue", "getSize", "height", "minWidth", "width", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "Progress", "withStaticProperties", "styleable", "props", "forwardedRef", "__scopeProgress", "valueProp", "value", "maxProp", "max", "getValueLabel", "defaultGetValueLabel", "progressProps", "isValidMaxNumber", "isValidValueNumber", "valueLabel", "isNumber", "undefined", "React", "useState", "setWidth", "ProgressProvider", "scope", "aria-valuemax", "aria-valuemin", "aria-valuenow", "aria-valuetext", "role", "data-state", "getProgressState", "data-value", "data-max", "onLayout", "e", "nativeEvent", "layout", "ref", "Indicator", "ProgressIndicator"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/progress",
|
|
3
|
-
"version": "1.89.
|
|
3
|
+
"version": "1.89.27-1708113113238",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@tamagui/compose-refs": "1.89.
|
|
36
|
-
"@tamagui/core": "1.89.
|
|
37
|
-
"@tamagui/create-context": "1.89.
|
|
38
|
-
"@tamagui/get-token": "1.89.
|
|
39
|
-
"@tamagui/helpers": "1.89.
|
|
40
|
-
"@tamagui/stacks": "1.89.
|
|
35
|
+
"@tamagui/compose-refs": "1.89.27-1708113113238",
|
|
36
|
+
"@tamagui/core": "1.89.27-1708113113238",
|
|
37
|
+
"@tamagui/create-context": "1.89.27-1708113113238",
|
|
38
|
+
"@tamagui/get-token": "1.89.27-1708113113238",
|
|
39
|
+
"@tamagui/helpers": "1.89.27-1708113113238",
|
|
40
|
+
"@tamagui/stacks": "1.89.27-1708113113238"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": "*",
|
|
44
44
|
"react-native": "*"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@tamagui/build": "1.89.
|
|
47
|
+
"@tamagui/build": "1.89.27-1708113113238",
|
|
48
48
|
"react": "^18.2.0",
|
|
49
|
-
"react-native": "^0.
|
|
49
|
+
"react-native": "^0.73.4"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|