@antadesign/anta 0.3.31 → 0.3.33

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.
Files changed (39) hide show
  1. package/dist/avatar-core.d.ts +7 -2
  2. package/dist/box-types.d.ts +12 -1
  3. package/dist/bundle.css +1 -1
  4. package/dist/bundle.js +148 -73
  5. package/dist/components/Box.d.ts +18 -6
  6. package/dist/components/Box.js +4 -0
  7. package/dist/components/Expander.d.ts +17 -9
  8. package/dist/components/Expander.js +14 -1
  9. package/dist/components/Input.d.ts +9 -3
  10. package/dist/components/Input.js +2 -0
  11. package/dist/components/Slider.d.ts +22 -10
  12. package/dist/components/Slider.js +9 -5
  13. package/dist/elements/a-box.css +1 -1
  14. package/dist/elements/a-box.d.ts +2 -0
  15. package/dist/elements/a-box.js +74 -32
  16. package/dist/elements/a-button.js +2 -4
  17. package/dist/elements/a-dialog.js +2 -0
  18. package/dist/elements/a-expander.css +1 -1
  19. package/dist/elements/a-expander.js +118 -39
  20. package/dist/elements/a-input-time.js +1 -2
  21. package/dist/elements/a-input.css +1 -1
  22. package/dist/elements/a-input.js +11 -8
  23. package/dist/elements/a-menu.d.ts +1 -1
  24. package/dist/elements/a-menu.js +57 -7
  25. package/dist/elements/a-slider.d.ts +7 -5
  26. package/dist/elements/a-slider.js +256 -59
  27. package/dist/general_types.d.ts +27 -10
  28. package/dist/index.d.ts +2 -2
  29. package/dist/theme-antune.css +1 -1
  30. package/docs/changelog.md +59 -0
  31. package/docs/components/box.md +81 -24
  32. package/docs/components/button.md +9 -6
  33. package/docs/components/expander.md +88 -47
  34. package/docs/components/input.md +29 -9
  35. package/docs/components/panel.md +3 -2
  36. package/docs/components/select-faceted.md +40 -26
  37. package/docs/components/slider.md +139 -4
  38. package/docs/packages/plot.md +392 -38
  39. package/package.json +4 -2
@@ -18,8 +18,13 @@ export declare function mulberry32(seed: number): () => number;
18
18
  /** Build a PRNG straight from a seed string. */
19
19
  export declare const rngFromSeed: (seed: string) => (() => number);
20
20
  /**
21
- * Up to `max` letters for the initials fallback: the first letter of each of the
22
- * first `max` whitespace-separated words, uppercased. `"Vlad Korobov"` → `"VK"`.
21
+ * Get the first letter of each of the first whitespace-separated words,
22
+ * uppercased. `"Vlad Korobov"` → `"VK"`.
23
+ *
24
+ * @param max - Maximum number of words to use, starting with the first.
25
+ * Defaults to 3.
26
+ *
27
+ * @author Vlad Korobov
23
28
  */
24
29
  export declare function getInitials(name: string | undefined | null, max?: number): string;
25
30
  /** Largest in-sRGB chroma at this lightness and hue (binary search). */
@@ -120,11 +120,22 @@ export interface BoxContext {
120
120
  * own background is not behind it. */
121
121
  backgroundColor: string;
122
122
  }
123
- /** Current box dimensions and its content-overflow state. */
123
+ /** A descendant's border box, in CSS pixels from the Box's top-left border edge. */
124
+ export interface BoxRect {
125
+ top: number;
126
+ right: number;
127
+ bottom: number;
128
+ left: number;
129
+ width: number;
130
+ height: number;
131
+ }
132
+ /** Current box dimensions, matching descendant rects, and content-overflow state. */
124
133
  export interface BoxMeasurement {
125
134
  /** Border-box width and height in CSS pixels. */
126
135
  width: number;
127
136
  height: number;
137
+ /** Matches for `includeRectsFor`, in document order. Empty when omitted. */
138
+ rects: BoxRect[];
128
139
  /** Padding-box dimensions, matching the browser's `clientWidth` / `clientHeight`. */
129
140
  clientWidth: number;
130
141
  clientHeight: number;