@trading-game/design-intelligence-layer 1.0.6 → 1.0.7
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 +12 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/docs/components/stepper.md +9 -6
- package/docs/foundations/typography.md +12 -0
- package/package.json +1 -1
- package/src/styles.css +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -825,7 +825,7 @@ interface SlideToConfirmProps extends Omit<React$1.ComponentProps<"div">, "onDra
|
|
|
825
825
|
declare function SlideToConfirm({ onConfirm, label, confirmedLabel, disabled, confirmed: controlledConfirmed, className, ...props }: SlideToConfirmProps): react_jsx_runtime.JSX.Element;
|
|
826
826
|
|
|
827
827
|
interface StepperProps {
|
|
828
|
-
/**
|
|
828
|
+
/** Sentence-case caption above the amount, e.g. "Stake (USDT)". */
|
|
829
829
|
label?: React$1.ReactNode;
|
|
830
830
|
value?: number;
|
|
831
831
|
defaultValue?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -825,7 +825,7 @@ interface SlideToConfirmProps extends Omit<React$1.ComponentProps<"div">, "onDra
|
|
|
825
825
|
declare function SlideToConfirm({ onConfirm, label, confirmedLabel, disabled, confirmed: controlledConfirmed, className, ...props }: SlideToConfirmProps): react_jsx_runtime.JSX.Element;
|
|
826
826
|
|
|
827
827
|
interface StepperProps {
|
|
828
|
-
/**
|
|
828
|
+
/** Sentence-case caption above the amount, e.g. "Stake (USDT)". */
|
|
829
829
|
label?: React$1.ReactNode;
|
|
830
830
|
value?: number;
|
|
831
831
|
defaultValue?: number;
|
package/dist/index.js
CHANGED
|
@@ -7033,11 +7033,18 @@ function Stepper({
|
|
|
7033
7033
|
}
|
|
7034
7034
|
}, [currentValue, decimalPlaces, isFocused]);
|
|
7035
7035
|
function commit(next) {
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7036
|
+
let committed;
|
|
7037
|
+
if (next <= min) {
|
|
7038
|
+
committed = min;
|
|
7039
|
+
} else if (next >= max) {
|
|
7040
|
+
committed = max;
|
|
7041
|
+
} else {
|
|
7042
|
+
const rounded = decimalPlaces > 0 ? parseFloat(next.toFixed(decimalPlaces)) : Math.round(next);
|
|
7043
|
+
committed = clamp(rounded, min, max);
|
|
7044
|
+
}
|
|
7045
|
+
if (!isControlled) setInternalValue(committed);
|
|
7046
|
+
setDisplayString(formatValue(committed, decimalPlaces));
|
|
7047
|
+
onValueChange == null ? void 0 : onValueChange(committed);
|
|
7041
7048
|
}
|
|
7042
7049
|
function handleDecrement() {
|
|
7043
7050
|
commit(currentValue - step);
|