@rubenpazch/numeric-up-picker 2.0.1 → 3.0.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/index.cjs.js +25 -25
- package/dist/index.esm.js +25 -25
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -132,7 +132,7 @@ function requireReactJsxRuntime_development () {
|
|
|
132
132
|
testStringCoercion(value);
|
|
133
133
|
var JSCompiler_inline_result = !1;
|
|
134
134
|
} catch (e) {
|
|
135
|
-
JSCompiler_inline_result =
|
|
135
|
+
JSCompiler_inline_result = true;
|
|
136
136
|
}
|
|
137
137
|
if (JSCompiler_inline_result) {
|
|
138
138
|
JSCompiler_inline_result = console;
|
|
@@ -176,29 +176,29 @@ function requireReactJsxRuntime_development () {
|
|
|
176
176
|
function hasValidKey(config) {
|
|
177
177
|
if (hasOwnProperty.call(config, "key")) {
|
|
178
178
|
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
179
|
-
if (getter && getter.isReactWarning) return
|
|
179
|
+
if (getter && getter.isReactWarning) return false;
|
|
180
180
|
}
|
|
181
181
|
return void 0 !== config.key;
|
|
182
182
|
}
|
|
183
183
|
function defineKeyPropWarningGetter(props, displayName) {
|
|
184
184
|
function warnAboutAccessingKey() {
|
|
185
185
|
specialPropKeyWarningShown ||
|
|
186
|
-
((specialPropKeyWarningShown =
|
|
186
|
+
((specialPropKeyWarningShown = true),
|
|
187
187
|
console.error(
|
|
188
188
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
189
189
|
displayName
|
|
190
190
|
));
|
|
191
191
|
}
|
|
192
|
-
warnAboutAccessingKey.isReactWarning =
|
|
192
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
193
193
|
Object.defineProperty(props, "key", {
|
|
194
194
|
get: warnAboutAccessingKey,
|
|
195
|
-
configurable:
|
|
195
|
+
configurable: true
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
function elementRefGetterWithDeprecationWarning() {
|
|
199
199
|
var componentName = getComponentNameFromType(this.type);
|
|
200
200
|
didWarnAboutElementRef[componentName] ||
|
|
201
|
-
((didWarnAboutElementRef[componentName] =
|
|
201
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
202
202
|
console.error(
|
|
203
203
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
204
204
|
));
|
|
@@ -216,33 +216,33 @@ function requireReactJsxRuntime_development () {
|
|
|
216
216
|
};
|
|
217
217
|
null !== (void 0 !== refProp ? refProp : null)
|
|
218
218
|
? Object.defineProperty(type, "ref", {
|
|
219
|
-
enumerable:
|
|
219
|
+
enumerable: false,
|
|
220
220
|
get: elementRefGetterWithDeprecationWarning
|
|
221
221
|
})
|
|
222
|
-
: Object.defineProperty(type, "ref", { enumerable:
|
|
222
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
223
223
|
type._store = {};
|
|
224
224
|
Object.defineProperty(type._store, "validated", {
|
|
225
|
-
configurable:
|
|
226
|
-
enumerable:
|
|
227
|
-
writable:
|
|
225
|
+
configurable: false,
|
|
226
|
+
enumerable: false,
|
|
227
|
+
writable: true,
|
|
228
228
|
value: 0
|
|
229
229
|
});
|
|
230
230
|
Object.defineProperty(type, "_debugInfo", {
|
|
231
|
-
configurable:
|
|
232
|
-
enumerable:
|
|
233
|
-
writable:
|
|
231
|
+
configurable: false,
|
|
232
|
+
enumerable: false,
|
|
233
|
+
writable: true,
|
|
234
234
|
value: null
|
|
235
235
|
});
|
|
236
236
|
Object.defineProperty(type, "_debugStack", {
|
|
237
|
-
configurable:
|
|
238
|
-
enumerable:
|
|
239
|
-
writable:
|
|
237
|
+
configurable: false,
|
|
238
|
+
enumerable: false,
|
|
239
|
+
writable: true,
|
|
240
240
|
value: debugStack
|
|
241
241
|
});
|
|
242
242
|
Object.defineProperty(type, "_debugTask", {
|
|
243
|
-
configurable:
|
|
244
|
-
enumerable:
|
|
245
|
-
writable:
|
|
243
|
+
configurable: false,
|
|
244
|
+
enumerable: false,
|
|
245
|
+
writable: true,
|
|
246
246
|
value: debugTask
|
|
247
247
|
});
|
|
248
248
|
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
@@ -291,7 +291,7 @@ function requireReactJsxRuntime_development () {
|
|
|
291
291
|
keys,
|
|
292
292
|
children
|
|
293
293
|
),
|
|
294
|
-
(didWarnAboutKeySpread[children + isStaticChildren] =
|
|
294
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
295
295
|
}
|
|
296
296
|
children = null;
|
|
297
297
|
void 0 !== maybeKey &&
|
|
@@ -383,7 +383,7 @@ function requireReactJsxRuntime_development () {
|
|
|
383
383
|
type,
|
|
384
384
|
config,
|
|
385
385
|
maybeKey,
|
|
386
|
-
|
|
386
|
+
false,
|
|
387
387
|
trackActualOwner
|
|
388
388
|
? Error("react-stack-top-frame")
|
|
389
389
|
: unknownOwnerDebugStack,
|
|
@@ -397,7 +397,7 @@ function requireReactJsxRuntime_development () {
|
|
|
397
397
|
type,
|
|
398
398
|
config,
|
|
399
399
|
maybeKey,
|
|
400
|
-
|
|
400
|
+
true,
|
|
401
401
|
trackActualOwner
|
|
402
402
|
? Error("react-stack-top-frame")
|
|
403
403
|
: unknownOwnerDebugStack,
|
|
@@ -433,7 +433,7 @@ var r,s={exports:{}},o={};var t,l,n={};
|
|
|
433
433
|
*
|
|
434
434
|
* This source code is licensed under the MIT license found in the
|
|
435
435
|
* LICENSE file in the root directory of this source tree.
|
|
436
|
-
*/function a(){return t||(t=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===$?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return "Fragment";case v:return "Profiler";case p:return "StrictMode";case k:return "Suspense";case y:return "SuspenseList";case C:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case u:return "Portal";case g:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case j:var s=e.render;return (e=e.displayName)||(e=""!==(e=s.displayName||s.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(s=e.displayName||null)?s:r(e.type)||"Memo";case N:s=e._payload,e=e._init;try{return r(e(s))}catch(e){}}return null}function s(e){return ""+e}function o(e){try{s(e);var r=!1;}catch(e){r
|
|
436
|
+
*/function a(){return t||(t=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===$?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return "Fragment";case v:return "Profiler";case p:return "StrictMode";case k:return "Suspense";case y:return "SuspenseList";case C:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case u:return "Portal";case g:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case j:var s=e.render;return (e=e.displayName)||(e=""!==(e=s.displayName||s.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(s=e.displayName||null)?s:r(e.type)||"Memo";case N:s=e._payload,e=e._init;try{return r(e(s))}catch(e){}}return null}function s(e){return ""+e}function o(e){try{s(e);var r=!1;}catch(e){r=true;}if(r){var o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),s(e)}}function t(e){if(e===x)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===N)return "<...>";try{var s=r(e);return s?"<"+s+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function a(){var e=r(this.type);return W[e]||(W[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function i(e,s,t,l,n,i){var h,m=s.children;if(void 0!==m)if(l)if(M(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(z.call(s,"key")){m=r(e);var u=Object.keys(s).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",V[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),V[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(s)&&(o(s.key),m=""+s.key),"key"in s)for(var x in t={},s)"key"!==x&&(t[x]=s[x]);else t=s;return m&&function(e,r){function s(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r));}s.isReactWarning=true,Object.defineProperty(e,"key",{get:s,configurable:true});}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,s,o,t,l){var n=s.ref;return e={$$typeof:w,type:e,key:r,props:s,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:false,get:a}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,m,t,null===(h=b.A)?null:h.getOwner(),n,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===N&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),b=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,M=Array.isArray,B=console.createTask?console.createTask:function(){return null},W={},_=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),H=B(t(l)),V={};n.Fragment=x,n.jsx=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,false,o?Error("react-stack-top-frame"):_,o?B(t(e)):H)},n.jsxs=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,true,o?Error("react-stack-top-frame"):_,o?B(t(e)):H)};}()),n}var i=(l||(l=1,"production"===process.env.NODE_ENV?s.exports=function(){if(r)return o;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function t(r,s,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==s.key&&(t=""+s.key),"key"in s)for(var l in o={},s)"key"!==l&&(o[l]=s[l]);else o=s;return s=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==s?s:null,props:o}}return o.Fragment=s,o.jsx=t,o.jsxs=t,o}():s.exports=a()),s.exports);function m({className:e="",size:r="md"}){const s=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`;return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:s,"aria-label":"Check",children:i.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}function g({className:e="",size:r="md",color:s="currentColor"}){return i.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}function R({className:e="",size:r="md",color:s="currentColor"}){return i.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M5 12h14"})})}function U({className:e="",size:r="md"}){const s=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`;return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,"aria-label":"Plus",children:i.jsx("path",{d:"M12 4v16m8-8H4"})})}
|
|
437
437
|
|
|
438
438
|
// CSS to hide native number input spinners
|
|
439
439
|
const hideSpinnersStyle = `
|
|
@@ -648,7 +648,7 @@ function NumericUpPicker({ label, value, onChange, onBlur, onFocus, placeholder,
|
|
|
648
648
|
if (alwaysNegative) {
|
|
649
649
|
// Clamp the absolute value within the absolute range
|
|
650
650
|
const absMin = Math.abs(max ?? -0.25); // max is the least negative (closest to 0)
|
|
651
|
-
const absMax = Math.abs(min ?? -10
|
|
651
|
+
const absMax = Math.abs(min ?? -10); // min is the most negative (farthest from 0)
|
|
652
652
|
if (numericValue < absMin) {
|
|
653
653
|
numericValue = absMin;
|
|
654
654
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -130,7 +130,7 @@ function requireReactJsxRuntime_development () {
|
|
|
130
130
|
testStringCoercion(value);
|
|
131
131
|
var JSCompiler_inline_result = !1;
|
|
132
132
|
} catch (e) {
|
|
133
|
-
JSCompiler_inline_result =
|
|
133
|
+
JSCompiler_inline_result = true;
|
|
134
134
|
}
|
|
135
135
|
if (JSCompiler_inline_result) {
|
|
136
136
|
JSCompiler_inline_result = console;
|
|
@@ -174,29 +174,29 @@ function requireReactJsxRuntime_development () {
|
|
|
174
174
|
function hasValidKey(config) {
|
|
175
175
|
if (hasOwnProperty.call(config, "key")) {
|
|
176
176
|
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
177
|
-
if (getter && getter.isReactWarning) return
|
|
177
|
+
if (getter && getter.isReactWarning) return false;
|
|
178
178
|
}
|
|
179
179
|
return void 0 !== config.key;
|
|
180
180
|
}
|
|
181
181
|
function defineKeyPropWarningGetter(props, displayName) {
|
|
182
182
|
function warnAboutAccessingKey() {
|
|
183
183
|
specialPropKeyWarningShown ||
|
|
184
|
-
((specialPropKeyWarningShown =
|
|
184
|
+
((specialPropKeyWarningShown = true),
|
|
185
185
|
console.error(
|
|
186
186
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
187
187
|
displayName
|
|
188
188
|
));
|
|
189
189
|
}
|
|
190
|
-
warnAboutAccessingKey.isReactWarning =
|
|
190
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
191
191
|
Object.defineProperty(props, "key", {
|
|
192
192
|
get: warnAboutAccessingKey,
|
|
193
|
-
configurable:
|
|
193
|
+
configurable: true
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
function elementRefGetterWithDeprecationWarning() {
|
|
197
197
|
var componentName = getComponentNameFromType(this.type);
|
|
198
198
|
didWarnAboutElementRef[componentName] ||
|
|
199
|
-
((didWarnAboutElementRef[componentName] =
|
|
199
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
200
200
|
console.error(
|
|
201
201
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
202
202
|
));
|
|
@@ -214,33 +214,33 @@ function requireReactJsxRuntime_development () {
|
|
|
214
214
|
};
|
|
215
215
|
null !== (void 0 !== refProp ? refProp : null)
|
|
216
216
|
? Object.defineProperty(type, "ref", {
|
|
217
|
-
enumerable:
|
|
217
|
+
enumerable: false,
|
|
218
218
|
get: elementRefGetterWithDeprecationWarning
|
|
219
219
|
})
|
|
220
|
-
: Object.defineProperty(type, "ref", { enumerable:
|
|
220
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
221
221
|
type._store = {};
|
|
222
222
|
Object.defineProperty(type._store, "validated", {
|
|
223
|
-
configurable:
|
|
224
|
-
enumerable:
|
|
225
|
-
writable:
|
|
223
|
+
configurable: false,
|
|
224
|
+
enumerable: false,
|
|
225
|
+
writable: true,
|
|
226
226
|
value: 0
|
|
227
227
|
});
|
|
228
228
|
Object.defineProperty(type, "_debugInfo", {
|
|
229
|
-
configurable:
|
|
230
|
-
enumerable:
|
|
231
|
-
writable:
|
|
229
|
+
configurable: false,
|
|
230
|
+
enumerable: false,
|
|
231
|
+
writable: true,
|
|
232
232
|
value: null
|
|
233
233
|
});
|
|
234
234
|
Object.defineProperty(type, "_debugStack", {
|
|
235
|
-
configurable:
|
|
236
|
-
enumerable:
|
|
237
|
-
writable:
|
|
235
|
+
configurable: false,
|
|
236
|
+
enumerable: false,
|
|
237
|
+
writable: true,
|
|
238
238
|
value: debugStack
|
|
239
239
|
});
|
|
240
240
|
Object.defineProperty(type, "_debugTask", {
|
|
241
|
-
configurable:
|
|
242
|
-
enumerable:
|
|
243
|
-
writable:
|
|
241
|
+
configurable: false,
|
|
242
|
+
enumerable: false,
|
|
243
|
+
writable: true,
|
|
244
244
|
value: debugTask
|
|
245
245
|
});
|
|
246
246
|
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
@@ -289,7 +289,7 @@ function requireReactJsxRuntime_development () {
|
|
|
289
289
|
keys,
|
|
290
290
|
children
|
|
291
291
|
),
|
|
292
|
-
(didWarnAboutKeySpread[children + isStaticChildren] =
|
|
292
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
293
293
|
}
|
|
294
294
|
children = null;
|
|
295
295
|
void 0 !== maybeKey &&
|
|
@@ -381,7 +381,7 @@ function requireReactJsxRuntime_development () {
|
|
|
381
381
|
type,
|
|
382
382
|
config,
|
|
383
383
|
maybeKey,
|
|
384
|
-
|
|
384
|
+
false,
|
|
385
385
|
trackActualOwner
|
|
386
386
|
? Error("react-stack-top-frame")
|
|
387
387
|
: unknownOwnerDebugStack,
|
|
@@ -395,7 +395,7 @@ function requireReactJsxRuntime_development () {
|
|
|
395
395
|
type,
|
|
396
396
|
config,
|
|
397
397
|
maybeKey,
|
|
398
|
-
|
|
398
|
+
true,
|
|
399
399
|
trackActualOwner
|
|
400
400
|
? Error("react-stack-top-frame")
|
|
401
401
|
: unknownOwnerDebugStack,
|
|
@@ -431,7 +431,7 @@ var r,s={exports:{}},o={};var t,l,n={};
|
|
|
431
431
|
*
|
|
432
432
|
* This source code is licensed under the MIT license found in the
|
|
433
433
|
* LICENSE file in the root directory of this source tree.
|
|
434
|
-
*/function a(){return t||(t=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===$?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return "Fragment";case v:return "Profiler";case p:return "StrictMode";case k:return "Suspense";case y:return "SuspenseList";case C:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case u:return "Portal";case g:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case j:var s=e.render;return (e=e.displayName)||(e=""!==(e=s.displayName||s.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(s=e.displayName||null)?s:r(e.type)||"Memo";case N:s=e._payload,e=e._init;try{return r(e(s))}catch(e){}}return null}function s(e){return ""+e}function o(e){try{s(e);var r=!1;}catch(e){r
|
|
434
|
+
*/function a(){return t||(t=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===$?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return "Fragment";case v:return "Profiler";case p:return "StrictMode";case k:return "Suspense";case y:return "SuspenseList";case C:return "Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case u:return "Portal";case g:return e.displayName||"Context";case f:return (e._context.displayName||"Context")+".Consumer";case j:var s=e.render;return (e=e.displayName)||(e=""!==(e=s.displayName||s.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(s=e.displayName||null)?s:r(e.type)||"Memo";case N:s=e._payload,e=e._init;try{return r(e(s))}catch(e){}}return null}function s(e){return ""+e}function o(e){try{s(e);var r=!1;}catch(e){r=true;}if(r){var o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),s(e)}}function t(e){if(e===x)return "<>";if("object"==typeof e&&null!==e&&e.$$typeof===N)return "<...>";try{var s=r(e);return s?"<"+s+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function a(){var e=r(this.type);return W[e]||(W[e]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function i(e,s,t,l,n,i){var h,m=s.children;if(void 0!==m)if(l)if(M(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(z.call(s,"key")){m=r(e);var u=Object.keys(s).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",V[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),V[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return false}return void 0!==e.key}(s)&&(o(s.key),m=""+s.key),"key"in s)for(var x in t={},s)"key"!==x&&(t[x]=s[x]);else t=s;return m&&function(e,r){function s(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r));}s.isReactWarning=true,Object.defineProperty(e,"key",{get:s,configurable:true});}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,s,o,t,l){var n=s.ref;return e={$$typeof:w,type:e,key:r,props:s,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:false,get:a}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,m,t,null===(h=b.A)?null:h.getOwner(),n,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===N&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),b=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,M=Array.isArray,B=console.createTask?console.createTask:function(){return null},W={},_=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),H=B(t(l)),V={};n.Fragment=x,n.jsx=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,false,o?Error("react-stack-top-frame"):_,o?B(t(e)):H)},n.jsxs=function(e,r,s){var o=1e4>b.recentlyCreatedOwnerStacks++;return i(e,r,s,true,o?Error("react-stack-top-frame"):_,o?B(t(e)):H)};}()),n}var i=(l||(l=1,"production"===process.env.NODE_ENV?s.exports=function(){if(r)return o;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function t(r,s,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==s.key&&(t=""+s.key),"key"in s)for(var l in o={},s)"key"!==l&&(o[l]=s[l]);else o=s;return s=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==s?s:null,props:o}}return o.Fragment=s,o.jsx=t,o.jsxs=t,o}():s.exports=a()),s.exports);function m({className:e="",size:r="md"}){const s=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`;return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:s,"aria-label":"Check",children:i.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}function g({className:e="",size:r="md",color:s="currentColor"}){return i.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M6 18L18 6M6 6l12 12"})})}function R({className:e="",size:r="md",color:s="currentColor"}){return i.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`,fill:"none",stroke:s,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:i.jsx("path",{d:"M5 12h14"})})}function U({className:e="",size:r="md"}){const s=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[r]} ${e}`;return i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,"aria-label":"Plus",children:i.jsx("path",{d:"M12 4v16m8-8H4"})})}
|
|
435
435
|
|
|
436
436
|
// CSS to hide native number input spinners
|
|
437
437
|
const hideSpinnersStyle = `
|
|
@@ -646,7 +646,7 @@ function NumericUpPicker({ label, value, onChange, onBlur, onFocus, placeholder,
|
|
|
646
646
|
if (alwaysNegative) {
|
|
647
647
|
// Clamp the absolute value within the absolute range
|
|
648
648
|
const absMin = Math.abs(max ?? -0.25); // max is the least negative (closest to 0)
|
|
649
|
-
const absMax = Math.abs(min ?? -10
|
|
649
|
+
const absMax = Math.abs(min ?? -10); // min is the most negative (farthest from 0)
|
|
650
650
|
if (numericValue < absMin) {
|
|
651
651
|
numericValue = absMin;
|
|
652
652
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubenpazch/numeric-up-picker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"repository": "https://github.com/rubenpazch/lbyte-ui-library.git",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"react-dom": "^19.0.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@rubenpazch/icons": "
|
|
27
|
+
"@rubenpazch/icons": "3.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rubenpazch/typescript-config": "
|
|
30
|
+
"@rubenpazch/typescript-config": "3.0.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "rollup -c",
|