@salilvnair/dui 1.0.9 → 1.0.10

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.
@@ -1,5 +1,23 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { DuiSize, DuiRadius } from '../../core/DuiTypes';
3
+ /**
4
+ * How many characters the value field has to hold.
5
+ *
6
+ * ── Why this is not a function of the height ──
7
+ *
8
+ * It was: the field was `height * 1.4`, which is 37px at every size — room for
9
+ * two digits. A stepper bounded at 300 therefore displayed its own maximum as
10
+ * `3(`, clipped mid-glyph, and no caller could widen it because the width was
11
+ * computed inside.
12
+ *
13
+ * A stepper knows its range. The longest thing it can ever show is the longer
14
+ * of its two bounds, sign and decimals included, so that is what it makes room
15
+ * for — and a range with no bounds gets enough for a number somebody would
16
+ * plausibly type.
17
+ *
18
+ * Exported so the rule can be held to by a test rather than by looking at it.
19
+ */
20
+ export declare function stepperValueChars(min: number, max: number, step?: number): number;
3
21
  export interface StepperInputViewProps {
4
22
  /**
5
23
  * A stable hook for tests and automation.
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salilvnair/dui",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Daakia UI component library — shared across ck8t and daakia",
5
5
  "type": "module",
6
6
  "license": "MIT",