@hanzogui/progress 3.0.2 → 102.0.0-rc.41-hanzoai.1
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.cjs +138 -131
- package/dist/cjs/Progress.native.js +141 -134
- package/dist/cjs/Progress.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Progress.mjs +118 -113
- package/dist/esm/Progress.mjs.map +1 -1
- package/dist/esm/Progress.native.js +122 -117
- package/dist/esm/Progress.native.js.map +1 -1
- package/dist/jsx/Progress.mjs +118 -113
- package/dist/jsx/Progress.mjs.map +1 -1
- package/dist/jsx/Progress.native.js +141 -134
- package/dist/jsx/Progress.native.js.map +1 -1
- package/dist/jsx/index.native.js +7 -5
- package/package.json +12 -12
- package/src/Progress.tsx +2 -2
- package/types/Progress.d.ts +36 -36
- package/types/Progress.d.ts.map +1 -0
- package/types/index.d.ts.map +1 -0
|
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var Progress_exports = {};
|
|
24
26
|
__export(Progress_exports, {
|
|
@@ -29,65 +31,67 @@ __export(Progress_exports, {
|
|
|
29
31
|
createProgressScope: () => createProgressScope
|
|
30
32
|
});
|
|
31
33
|
module.exports = __toCommonJS(Progress_exports);
|
|
32
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var import_core = require("@hanzogui/core");
|
|
36
|
+
var import_create_context = require("@hanzogui/create-context");
|
|
37
|
+
var import_get_token = require("@hanzogui/get-token");
|
|
38
|
+
var import_helpers = require("@hanzogui/helpers");
|
|
39
|
+
var import_stacks = require("@hanzogui/stacks");
|
|
40
|
+
var import_react = require("react");
|
|
41
|
+
var PROGRESS_NAME = "Progress";
|
|
42
|
+
var [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME);
|
|
43
|
+
var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
|
|
44
|
+
var INDICATOR_NAME = "ProgressIndicator";
|
|
45
|
+
var ProgressIndicatorFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
46
|
+
name: INDICATOR_NAME,
|
|
47
|
+
variants: {
|
|
48
|
+
unstyled: {
|
|
49
|
+
false: {
|
|
50
|
+
height: "100%",
|
|
51
|
+
width: "100%",
|
|
52
|
+
backgroundColor: "$background"
|
|
52
53
|
}
|
|
53
|
-
},
|
|
54
|
-
defaultVariants: {
|
|
55
|
-
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
56
|
-
}
|
|
57
|
-
}),
|
|
58
|
-
ProgressIndicator = ProgressIndicatorFrame.styleable(function (props, forwardedRef) {
|
|
59
|
-
var {
|
|
60
|
-
__scopeProgress,
|
|
61
|
-
transition,
|
|
62
|
-
...indicatorProps
|
|
63
|
-
} = props,
|
|
64
|
-
context = useProgressContext(INDICATOR_NAME, __scopeProgress),
|
|
65
|
-
_context_value,
|
|
66
|
-
progressRatio = ((_context_value = context.value) !== null && _context_value !== void 0 ? _context_value : 0) / context.max,
|
|
67
|
-
x;
|
|
68
|
-
if (import_gui_core.isWeb) x = `${-100 + progressRatio * 50}%`;else {
|
|
69
|
-
var baseWidth = context.width || 0;
|
|
70
|
-
x = Math.ceil(-baseWidth * (2 - progressRatio));
|
|
71
54
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
unstyled: process.env.HANZOGUI_HEADLESS === "1"
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
var ProgressIndicator = ProgressIndicatorFrame.styleable(function ProgressIndicator2(props, forwardedRef) {
|
|
61
|
+
var {
|
|
62
|
+
__scopeProgress,
|
|
63
|
+
transition,
|
|
64
|
+
...indicatorProps
|
|
65
|
+
} = props;
|
|
66
|
+
var context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
67
|
+
var _context_value;
|
|
68
|
+
var progressRatio = ((_context_value = context.value) !== null && _context_value !== void 0 ? _context_value : 0) / context.max;
|
|
69
|
+
var x;
|
|
70
|
+
if (import_core.isWeb) {
|
|
71
|
+
x = `${-100 + progressRatio * 50}%`;
|
|
72
|
+
} else {
|
|
73
|
+
var baseWidth = context.width || 0;
|
|
74
|
+
x = Math.ceil(-baseWidth * (2 - progressRatio));
|
|
75
|
+
}
|
|
76
|
+
var _context_value1;
|
|
77
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ProgressIndicatorFrame, {
|
|
78
|
+
"data-state": getProgressState(context.value, context.max),
|
|
79
|
+
"data-value": (_context_value1 = context.value) !== null && _context_value1 !== void 0 ? _context_value1 : void 0,
|
|
80
|
+
"data-max": context.max,
|
|
81
|
+
x,
|
|
82
|
+
width: "200%",
|
|
83
|
+
...(!props.unstyled && {
|
|
84
|
+
animateOnly: ["transform"],
|
|
85
|
+
// on native, hide until we have width measurement
|
|
86
|
+
...(!import_core.isWeb && context.width === 0 && {
|
|
87
|
+
opacity: 0
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
90
|
+
...indicatorProps,
|
|
91
|
+
ref: forwardedRef,
|
|
92
|
+
transition: !import_core.isWeb && !context.width ? null : transition
|
|
90
93
|
});
|
|
94
|
+
});
|
|
91
95
|
function defaultGetValueLabel(value, max) {
|
|
92
96
|
return `${Math.round(value / max * 100)}%`;
|
|
93
97
|
}
|
|
@@ -95,7 +99,7 @@ function getProgressState(value, maxValue) {
|
|
|
95
99
|
return value == null ? "indeterminate" : value === maxValue ? "complete" : "loading";
|
|
96
100
|
}
|
|
97
101
|
function isNumber(value) {
|
|
98
|
-
return typeof value
|
|
102
|
+
return typeof value === "number";
|
|
99
103
|
}
|
|
100
104
|
function isValidMaxNumber(max) {
|
|
101
105
|
return isNumber(max) && !Number.isNaN(max) && max > 0;
|
|
@@ -103,76 +107,79 @@ function isValidMaxNumber(max) {
|
|
|
103
107
|
function isValidValueNumber(value, max) {
|
|
104
108
|
return isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0;
|
|
105
109
|
}
|
|
106
|
-
var DEFAULT_MAX = 100
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
size: {
|
|
118
|
-
"...size": function (val) {
|
|
119
|
-
var size = Math.round((0, import_gui_core.getVariableValue)((0, import_gui_get_token.getSize)(val)) * 0.25);
|
|
120
|
-
return {
|
|
121
|
-
height: size,
|
|
122
|
-
minWidth: (0, import_gui_core.getVariableValue)(size) * 20,
|
|
123
|
-
width: "100%"
|
|
124
|
-
};
|
|
125
|
-
}
|
|
110
|
+
var DEFAULT_MAX = 100;
|
|
111
|
+
var ProgressFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
112
|
+
name: "Progress",
|
|
113
|
+
variants: {
|
|
114
|
+
unstyled: {
|
|
115
|
+
false: {
|
|
116
|
+
borderRadius: 1e5,
|
|
117
|
+
overflow: "hidden",
|
|
118
|
+
backgroundColor: "$background"
|
|
126
119
|
}
|
|
127
120
|
},
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
size: {
|
|
122
|
+
"...size": function (val) {
|
|
123
|
+
var size = Math.round((0, import_core.getVariableValue)((0, import_get_token.getSize)(val)) * 0.25);
|
|
124
|
+
return {
|
|
125
|
+
height: size,
|
|
126
|
+
minWidth: (0, import_core.getVariableValue)(size) * 20,
|
|
127
|
+
width: "100%"
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
130
|
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
131
|
+
},
|
|
132
|
+
defaultVariants: {
|
|
133
|
+
unstyled: process.env.HANZOGUI_HEADLESS === "1"
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
var Progress = (0, import_helpers.withStaticProperties)(ProgressFrame.styleable(function Progress2(props, forwardedRef) {
|
|
137
|
+
var {
|
|
138
|
+
// @ts-expect-error
|
|
139
|
+
__scopeProgress,
|
|
140
|
+
value: valueProp,
|
|
141
|
+
max: maxProp,
|
|
142
|
+
getValueLabel = defaultGetValueLabel,
|
|
143
|
+
size = "$true",
|
|
144
|
+
...progressProps
|
|
145
|
+
} = props;
|
|
146
|
+
var max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;
|
|
147
|
+
var value = isValidValueNumber(valueProp, max) ? Math.round(valueProp) : null;
|
|
148
|
+
var valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
|
|
149
|
+
var [width, setWidth] = (0, import_react.useState)(0);
|
|
150
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ProgressProvider, {
|
|
151
|
+
scope: __scopeProgress,
|
|
152
|
+
value,
|
|
153
|
+
max,
|
|
154
|
+
width,
|
|
155
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(ProgressFrame, {
|
|
156
|
+
"aria-valuemax": max,
|
|
157
|
+
"aria-valuemin": 0,
|
|
158
|
+
"aria-valuenow": isNumber(value) ? value : void 0,
|
|
159
|
+
"aria-valuetext": valueLabel,
|
|
160
|
+
// @ts-ignore
|
|
161
|
+
role: "progressbar",
|
|
162
|
+
"data-state": getProgressState(value, max),
|
|
163
|
+
"data-value": value !== null && value !== void 0 ? value : void 0,
|
|
164
|
+
"data-max": max,
|
|
165
|
+
...(progressProps.unstyled !== true && {
|
|
166
|
+
size
|
|
167
|
+
}),
|
|
168
|
+
...progressProps,
|
|
169
|
+
...(!import_core.isWeb && {
|
|
170
|
+
onLayout: function (e) {
|
|
171
|
+
var _progressProps_onLayout;
|
|
172
|
+
var newWidth = Math.round(e.nativeEvent.layout.width);
|
|
173
|
+
if (newWidth !== width) {
|
|
174
|
+
setWidth(newWidth);
|
|
170
175
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
Indicator: ProgressIndicator
|
|
176
|
+
(_progressProps_onLayout = progressProps.onLayout) === null || _progressProps_onLayout === void 0 ? void 0 : _progressProps_onLayout.call(progressProps, e);
|
|
177
|
+
}
|
|
178
|
+
}),
|
|
179
|
+
ref: forwardedRef
|
|
180
|
+
})
|
|
177
181
|
});
|
|
182
|
+
}), {
|
|
183
|
+
Indicator: ProgressIndicator
|
|
184
|
+
});
|
|
178
185
|
//# sourceMappingURL=Progress.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","Progress_exports","Progress","ProgressFrame","ProgressIndicator","ProgressIndicatorFrame","createProgressScope","module","exports","import_jsx_runtime","require","
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","Progress_exports","Progress","ProgressFrame","ProgressIndicator","ProgressIndicatorFrame","createProgressScope","module","exports","import_jsx_runtime","require","import_core","import_create_context","import_get_token","import_helpers","import_stacks","import_react","PROGRESS_NAME","createProgressContext","createContextScope","ProgressProvider","useProgressContext","INDICATOR_NAME","styled","YStack","variants","unstyled","false","height","width","backgroundColor","defaultVariants","process","env","HANZOGUI_HEADLESS","styleable","ProgressIndicator2","props","forwardedRef","__scopeProgress","transition","indicatorProps","context","_context_value","progressRatio","max","x","isWeb","baseWidth","Math","ceil","_context_value1","jsx","getProgressState","animateOnly","opacity","ref","defaultGetValueLabel","round","maxValue","isNumber","isValidMaxNumber","Number","isNaN","isValidValueNumber","DEFAULT_MAX","borderRadius","overflow","size","...size","val","getVariableValue","getSize","minWidth","withStaticProperties","Progress2","valueProp","maxProp","getValueLabel","progressProps","valueLabel","setWidth","useState","scope"],"sources":["../../src/Progress.tsx"],"sourcesContent":[null],"mappings":"AAIA,YAAS;;AAET,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAA0B;AACnC,IAAAC,gBAAS,GAAAF,MAAe,CAAAG,wBAAA;AACxB,IAAAC,iBAAS,GAAAJ,MAAA,CAAAK,mBAA4B;AACrC,IAAAC,YAAS,GAAAN,MAAc,CAAAO,SAAA,CAAAC,cAAA;AACvB,IAAAC,QAAS,GAAAA,CAAAC,MAAA,EAAAC,GAAgB;EAoErB,SAAAC,IAAA,IAAAD,GAAA,EAlEJZ,SAAM,CAAAW,MAAA,EAAgBE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAEtB;AAQA,IAAAC,WAAO,GAAAA,CAAAC,EAAA,EAAAC,IAAkB,EAAAC,MAAA,EAAAC,IAAA,KAAkB;EAO3C,IAAMF,IAAA,WAAAA,IAAiB,wBAAAA,IAAA;IAEhB,KAAM,IAAAG,GAAA,IAAAhB,iBAAyB,CAAOa,IAAA,GAC3C,IAAM,CAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EAENnB,SAAU,CAAAiB,EAAA,EAAAI,GAAA;MAAA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AAY,cAAS,CAAA4D,oBAAA,EAAAvE,aAAA,CAAAgC,SAAA,UAAAwC,UAAAtC,KAAA,EAAAC,YAAA;EAAA;IAEX;IACAC,eAAI;IACFvC,KAAA,EAAA4E,SAAA;IAAiB/B,GAAA,EAAAgC,OACnB;IACAC,aAAA,GAAArB,oBAA0B;IAAAW,IAAA,GAC5B;IAAA,GAAAW;EACF,IAAA1C,KACA;EAAK,IAAAQ,GAAA,GAAAgB,gBAAA,CAAAgB,OAAA,IAAAA,OAAA,GAAAZ,WAAA;EAAA,IACPjE,KACF,GAAAgE,kBAAA,CAAAY,SAAA,EAAA/B,GAAA,IAAAI,IAAA,CAAAS,KAAA,CAAAkB,SAAA;EAEJ,IAACI,UAAA,GAAApB,QAAA,CAAA5D,KAAA,IAAA8E,aAAA,CAAA9E,KAAA,EAAA6C,GAAA;EACD,KAAAhB,KAAA,EAAAoD,QAAA,QAAAjE,YAAA,CAAAkE,QAAA;EAAA,OACE,eAAW,IAAAzE,kBAAA,CAAA2C,GAAA,EAAAhC,gBAAA;IACb+D,KAAA,EAAA5C,eAAA;IACFvC,KAAA","ignoreList":[]}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/progress",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "102.0.0-rc.41-hanzoai.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "
|
|
34
|
-
"watch": "
|
|
35
|
-
"clean": "
|
|
36
|
-
"clean:build": "
|
|
33
|
+
"build": "hanzogui-build",
|
|
34
|
+
"watch": "hanzogui-build --watch",
|
|
35
|
+
"clean": "hanzogui-build clean",
|
|
36
|
+
"clean:build": "hanzogui-build clean:build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@hanzogui/compose-refs": "
|
|
40
|
-
"@hanzogui/core": "
|
|
41
|
-
"@hanzogui/create-context": "
|
|
42
|
-
"@hanzogui/get-token": "
|
|
43
|
-
"@hanzogui/helpers": "
|
|
44
|
-
"@hanzogui/stacks": "
|
|
39
|
+
"@hanzogui/compose-refs": "102.0.0-rc.41-hanzoai.1",
|
|
40
|
+
"@hanzogui/core": "102.0.0-rc.41-hanzoai.1",
|
|
41
|
+
"@hanzogui/create-context": "102.0.0-rc.41-hanzoai.1",
|
|
42
|
+
"@hanzogui/get-token": "102.0.0-rc.41-hanzoai.1",
|
|
43
|
+
"@hanzogui/helpers": "102.0.0-rc.41-hanzoai.1",
|
|
44
|
+
"@hanzogui/stacks": "102.0.0-rc.41-hanzoai.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@hanzogui/build": "
|
|
47
|
+
"@hanzogui/build": "102.0.0-rc.41-hanzoai.1",
|
|
48
48
|
"react": ">=19",
|
|
49
49
|
"react-native": "0.83.2"
|
|
50
50
|
},
|
package/src/Progress.tsx
CHANGED
|
@@ -43,7 +43,7 @@ export const ProgressIndicatorFrame = styled(YStack, {
|
|
|
43
43
|
} as const,
|
|
44
44
|
|
|
45
45
|
defaultVariants: {
|
|
46
|
-
unstyled: process.env.
|
|
46
|
+
unstyled: process.env.HANZOGUI_HEADLESS === '1',
|
|
47
47
|
},
|
|
48
48
|
})
|
|
49
49
|
|
|
@@ -154,7 +154,7 @@ export const ProgressFrame = styled(YStack, {
|
|
|
154
154
|
} as const,
|
|
155
155
|
|
|
156
156
|
defaultVariants: {
|
|
157
|
-
unstyled: process.env.
|
|
157
|
+
unstyled: process.env.HANZOGUI_HEADLESS === '1',
|
|
158
158
|
},
|
|
159
159
|
})
|
|
160
160
|
|
package/types/Progress.d.ts
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import type { GetProps } from '@
|
|
2
|
-
declare const createProgressScope: import("@
|
|
3
|
-
export declare const ProgressIndicatorFrame: import("@
|
|
1
|
+
import type { GetProps } from '@hanzogui/core';
|
|
2
|
+
declare const createProgressScope: import("@hanzogui/create-context").CreateScope;
|
|
3
|
+
export declare const ProgressIndicatorFrame: import("@hanzogui/core").HanzoguiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").HanzoguiElement, import("@hanzogui/core").RNHanzoguiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
4
4
|
unstyled?: boolean | undefined;
|
|
5
|
-
elevation?: number | import("@
|
|
5
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
6
6
|
fullscreen?: boolean | undefined;
|
|
7
|
-
}, import("@
|
|
7
|
+
}, import("@hanzogui/core").StaticConfigPublic>;
|
|
8
8
|
export type ProgressIndicatorProps = GetProps<typeof ProgressIndicatorFrame>;
|
|
9
|
-
declare const ProgressIndicator: import("@
|
|
9
|
+
declare const ProgressIndicator: import("@hanzogui/core").HanzoguiComponent<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNHanzoguiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
10
10
|
unstyled?: boolean | undefined;
|
|
11
|
-
elevation?: number | import("@
|
|
11
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
12
12
|
fullscreen?: boolean | undefined;
|
|
13
|
-
}>, import("@
|
|
13
|
+
}>, import("@hanzogui/core").HanzoguiElement, import("@hanzogui/core").RNHanzoguiViewNonStyleProps & void, import("@hanzogui/core").StackStyleBase, {
|
|
14
14
|
unstyled?: boolean | undefined;
|
|
15
|
-
elevation?: number | import("@
|
|
15
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
16
16
|
fullscreen?: boolean | undefined;
|
|
17
|
-
}, import("@
|
|
18
|
-
export declare const ProgressFrame: import("@
|
|
17
|
+
}, import("@hanzogui/core").StaticConfigPublic>;
|
|
18
|
+
export declare const ProgressFrame: import("@hanzogui/core").HanzoguiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").HanzoguiElement, import("@hanzogui/core").RNHanzoguiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
19
19
|
unstyled?: boolean | undefined;
|
|
20
|
-
elevation?: number | import("@
|
|
20
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
21
21
|
fullscreen?: boolean | undefined;
|
|
22
|
-
size?: import("@
|
|
23
|
-
}, import("@
|
|
22
|
+
size?: import("@hanzogui/core").SizeTokens | undefined;
|
|
23
|
+
}, import("@hanzogui/core").StaticConfigPublic>;
|
|
24
24
|
export interface ProgressExtraProps {
|
|
25
25
|
value?: number | null | undefined;
|
|
26
26
|
max?: number;
|
|
27
27
|
getValueLabel?(value: number, max: number): string;
|
|
28
28
|
}
|
|
29
29
|
export type ProgressProps = GetProps<typeof ProgressFrame> & ProgressExtraProps;
|
|
30
|
-
declare const Progress: import("react").ForwardRefExoticComponent<Omit<import("@
|
|
30
|
+
declare const Progress: import("react").ForwardRefExoticComponent<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNHanzoguiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
31
31
|
unstyled?: boolean | undefined;
|
|
32
|
-
elevation?: number | import("@
|
|
32
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
33
33
|
fullscreen?: boolean | undefined;
|
|
34
|
-
size?: import("@
|
|
35
|
-
}>, keyof ProgressExtraProps> & ProgressExtraProps & import("react").RefAttributes<import("@
|
|
34
|
+
size?: import("@hanzogui/core").SizeTokens | undefined;
|
|
35
|
+
}>, keyof ProgressExtraProps> & ProgressExtraProps & import("react").RefAttributes<import("@hanzogui/core").HanzoguiElement>> & import("@hanzogui/core").StaticComponentObject<Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNHanzoguiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
36
36
|
unstyled?: boolean | undefined;
|
|
37
|
-
elevation?: number | import("@
|
|
37
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
38
38
|
fullscreen?: boolean | undefined;
|
|
39
|
-
size?: import("@
|
|
40
|
-
}>, keyof ProgressExtraProps> & ProgressExtraProps, import("@
|
|
39
|
+
size?: import("@hanzogui/core").SizeTokens | undefined;
|
|
40
|
+
}>, keyof ProgressExtraProps> & ProgressExtraProps, import("@hanzogui/core").HanzoguiElement, import("@hanzogui/core").RNHanzoguiViewNonStyleProps & ProgressExtraProps, import("@hanzogui/core").StackStyleBase, {
|
|
41
41
|
unstyled?: boolean | undefined;
|
|
42
|
-
elevation?: number | import("@
|
|
42
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
43
43
|
fullscreen?: boolean | undefined;
|
|
44
|
-
size?: import("@
|
|
45
|
-
}, import("@
|
|
46
|
-
__tama: [Omit<import("@
|
|
44
|
+
size?: import("@hanzogui/core").SizeTokens | undefined;
|
|
45
|
+
}, import("@hanzogui/core").StaticConfigPublic> & Omit<import("@hanzogui/core").StaticConfigPublic, "staticConfig" | "styleable"> & {
|
|
46
|
+
__tama: [Omit<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNHanzoguiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
47
47
|
unstyled?: boolean | undefined;
|
|
48
|
-
elevation?: number | import("@
|
|
48
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
49
49
|
fullscreen?: boolean | undefined;
|
|
50
|
-
size?: import("@
|
|
51
|
-
}>, keyof ProgressExtraProps> & ProgressExtraProps, import("@
|
|
50
|
+
size?: import("@hanzogui/core").SizeTokens | undefined;
|
|
51
|
+
}>, keyof ProgressExtraProps> & ProgressExtraProps, import("@hanzogui/core").HanzoguiElement, import("@hanzogui/core").RNHanzoguiViewNonStyleProps & ProgressExtraProps, import("@hanzogui/core").StackStyleBase, {
|
|
52
52
|
unstyled?: boolean | undefined;
|
|
53
|
-
elevation?: number | import("@
|
|
53
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
54
54
|
fullscreen?: boolean | undefined;
|
|
55
|
-
size?: import("@
|
|
56
|
-
}, import("@
|
|
55
|
+
size?: import("@hanzogui/core").SizeTokens | undefined;
|
|
56
|
+
}, import("@hanzogui/core").StaticConfigPublic];
|
|
57
57
|
} & {
|
|
58
|
-
Indicator: import("@
|
|
58
|
+
Indicator: import("@hanzogui/core").HanzoguiComponent<import("@hanzogui/core").GetFinalProps<import("@hanzogui/core").RNHanzoguiViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
|
|
59
59
|
unstyled?: boolean | undefined;
|
|
60
|
-
elevation?: number | import("@
|
|
60
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
61
61
|
fullscreen?: boolean | undefined;
|
|
62
|
-
}>, import("@
|
|
62
|
+
}>, import("@hanzogui/core").HanzoguiElement, import("@hanzogui/core").RNHanzoguiViewNonStyleProps & void, import("@hanzogui/core").StackStyleBase, {
|
|
63
63
|
unstyled?: boolean | undefined;
|
|
64
|
-
elevation?: number | import("@
|
|
64
|
+
elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
|
|
65
65
|
fullscreen?: boolean | undefined;
|
|
66
|
-
}, import("@
|
|
66
|
+
}, import("@hanzogui/core").StaticConfigPublic>;
|
|
67
67
|
};
|
|
68
68
|
export { createProgressScope, Progress, ProgressIndicator };
|
|
69
69
|
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../src/Progress.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAW9C,QAAA,MAA8B,mBAAmB,gDAAqC,CAAA;AAiBtF,eAAO,MAAM,sBAAsB;;;;+CAgBjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE5E,QAAA,MAAM,iBAAiB;;;;;;;;+CA2CrB,CAAA;AAqCF,eAAO,MAAM,aAAa;;;;;+CA2BxB,CAAA;AAEF,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACnD;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,GAAG,kBAAkB,CAAA;AAE/E,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDb,CAAA;AAED,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|