@hanzogui/progress 3.0.2 → 7.3.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.
@@ -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
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
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
- import_gui_core = require("@hanzogui/core"),
34
- import_gui_create_context = require("@hanzogui/create-context"),
35
- import_gui_get_token = require("@hanzogui/get-token"),
36
- import_gui_helpers = require("@hanzogui/helpers"),
37
- import_gui_stacks = require("@hanzogui/stacks"),
38
- import_react = require("react"),
39
- PROGRESS_NAME = "Progress",
40
- [createProgressContext, createProgressScope] = (0, import_gui_create_context.createContextScope)(PROGRESS_NAME),
41
- [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME),
42
- INDICATOR_NAME = "ProgressIndicator",
43
- ProgressIndicatorFrame = (0, import_gui_core.styled)(import_gui_stacks.YStack, {
44
- name: INDICATOR_NAME,
45
- variants: {
46
- unstyled: {
47
- false: {
48
- height: "100%",
49
- width: "100%",
50
- backgroundColor: "$background"
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
- var _context_value1;
73
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ProgressIndicatorFrame, {
74
- "data-state": getProgressState(context.value, context.max),
75
- "data-value": (_context_value1 = context.value) !== null && _context_value1 !== void 0 ? _context_value1 : void 0,
76
- "data-max": context.max,
77
- x,
78
- width: "200%",
79
- ...(!props.unstyled && {
80
- animateOnly: ["transform"],
81
- // on native, hide until we have width measurement
82
- ...(!import_gui_core.isWeb && context.width === 0 && {
83
- opacity: 0
84
- })
85
- }),
86
- ...indicatorProps,
87
- ref: forwardedRef,
88
- transition: !import_gui_core.isWeb && !context.width ? null : transition
89
- });
55
+ },
56
+ defaultVariants: {
57
+ unstyled: process.env.GUI_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 == "number";
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
- ProgressFrame = (0, import_gui_core.styled)(import_gui_stacks.YStack, {
108
- name: "Progress",
109
- variants: {
110
- unstyled: {
111
- false: {
112
- borderRadius: 1e5,
113
- overflow: "hidden",
114
- backgroundColor: "$background"
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
- defaultVariants: {
129
- unstyled: process.env.HANZO_GUI_HEADLESS === "1"
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
- Progress = (0, import_gui_helpers.withStaticProperties)(ProgressFrame.styleable(function (props, forwardedRef) {
133
- var {
134
- // @ts-expect-error
135
- __scopeProgress,
136
- value: valueProp,
137
- max: maxProp,
138
- getValueLabel = defaultGetValueLabel,
139
- size = "$true",
140
- ...progressProps
141
- } = props,
142
- max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX,
143
- value = isValidValueNumber(valueProp, max) ? Math.round(valueProp) : null,
144
- valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0,
145
- [width, setWidth] = (0, import_react.useState)(0);
146
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ProgressProvider, {
147
- scope: __scopeProgress,
148
- value,
149
- max,
150
- width,
151
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(ProgressFrame, {
152
- "aria-valuemax": max,
153
- "aria-valuemin": 0,
154
- "aria-valuenow": isNumber(value) ? value : void 0,
155
- "aria-valuetext": valueLabel,
156
- // @ts-ignore
157
- role: "progressbar",
158
- "data-state": getProgressState(value, max),
159
- "data-value": value ?? void 0,
160
- "data-max": max,
161
- ...(progressProps.unstyled !== !0 && {
162
- size
163
- }),
164
- ...progressProps,
165
- ...(!import_gui_core.isWeb && {
166
- onLayout: function (e) {
167
- var _progressProps_onLayout,
168
- newWidth = Math.round(e.nativeEvent.layout.width);
169
- newWidth !== width && setWidth(newWidth), (_progressProps_onLayout = progressProps.onLayout) === null || _progressProps_onLayout === void 0 || _progressProps_onLayout.call(progressProps, e);
131
+ },
132
+ defaultVariants: {
133
+ unstyled: process.env.GUI_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
- ref: forwardedRef
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":["__toCommonJS","mod","__copyProps","__defProp","value","Progress_exports","__export","Progress","ProgressFrame","ProgressIndicator","ProgressIndicatorFrame","createProgressScope","module","exports","import_jsx_runtime","require","import_gui_core","import_gui_create_context","import_gui_get_token","import_gui_helpers","import_gui_stacks","import_react","PROGRESS_NAME","createProgressContext","createContextScope","ProgressProvider","useProgressContext","INDICATOR_NAME","styled","YStack","name","variants","unstyled","false","height","width","backgroundColor","defaultVariants","process","env","HANZO_GUI_HEADLESS","styleable","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","valueProp","maxProp","getValueLabel","progressProps","valueLabel","setWidth","useState","scope","children","role","onLayout","e","_progressProps_onLayout","newWidth","nativeEvent","layout","call"],"sources":["../../src/Progress.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,sBAAA,EAAAA,CAAA,KAAAA,sBAAA;EAAAC,mBAAA,EAAAA,CAAA,KAAAA;AAAA;AAIAC,MAAA,CAAAC,OAAA,GAAAb,YAAgD,CAAAK,gBAAA;AAQhD,IAAAS,kBAAsB,GAAAC,OAAA,oBAEf;EAAAC,eAAuB,GAAAD,OAAmB,kBAAI;EAAAE,yBAAA,GAAAF,OAAmB,4BAQjE;EAAkBG,oBAAkB,GACzCH,OAAA,uBAA4C;EAAaI,kBAMrD,GAAiBJ,OAAA,qBAEV;EAAAK,iBAAA,GAAyBL,OAAA,oBAAO;EAAAM,YAAA,GAAAN,OAAQ;EAAAO,aAAA;EAAA,CAAAC,qBAAA,EAAAZ,mBAAA,QAAAM,yBAAA,CAAAO,kBAAA,EAAAF,aAAA;EAAA,CAAAG,gBAAA,EAAAC,kBAAA,IAAAH,qBAAA,CAAAD,aAAA;EAAAK,cAAA;EAAAjB,sBAAA,OAAAM,eAAA,CAAAY,MAAA,EAAAR,iBA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AAA8C,GAAA;QAAA,IACHiC,aAAK,CAAAnD,QAAA,MAAS;UAAAyC;QAEX;QACA,GAAAU,aAAI;QAGsB,KAC5BnE,eAAA,CAAAoC,KAAA;UACFsC,QAAA,WAAAA,CAAAC,CAAA;YACA,IAAKC,uBAAA;cAAAC,QAAA,GAAAvC,IAAA,CAAAS,KAAA,CAAA4B,CAAA,CAAAG,WAAA,CAAAC,MAAA,CAAA5D,KAAA;YAAA0D,QAAA,KAAA1D,KAAA,IAAAkD,QAAA,CAAAQ,QAAA,IAAAD,uBAAA,GAAAT,aAAA,CAAAO,QAAA,cAAAE,uBAAA,eAAAA,uBAAA,CAAAI,IAAA,CAAAb,aAAA,EAAAQ,CAAA;UAET;QAEH;QACD9B,GAAA,EAAAlB;MACE;IACF;EACF","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Progress_exports","__export","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","name","variants","unstyled","false","height","width","backgroundColor","defaultVariants","process","env","GUI_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","children","role","onLayout","e","_progressProps_onLayout","newWidth","nativeEvent","layout","call"],"sources":["../../src/Progress.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,G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GAAAT,aAAA,CAAAO,QAAA,cAAAE,uBAAA,uBAAAA,uBAAA,CAAAI,IAAA,CAAAb,aAAA,EAAAQ,CAAA;QACb;MACF","ignoreList":[]}
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -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
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
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: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}