@recursica/mui-adapter 0.30.0 → 0.32.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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @recursica/mui-adapter
2
2
 
3
+ ## 0.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b7f76d8: Slider: added two-thumb range mode via a `[number, number]` value/onChange, fixed `trailingIcon` rendering after the numeric input instead of before it, and fixed marks (mantine) and mark labels (mantine, mui) rendering off Mantine/MUI internal defaults instead of recursica tokens, leaving marks vertically off-center and label spacing too tight.
8
+
9
+ ### Patch Changes
10
+
11
+ - d8a0da1: Fix Tree's chevron button stealing DOM focus on click while `aria-hidden`, which browsers flag as an accessibility violation.
12
+ - Updated dependencies [b7f76d8]
13
+ - @recursica/adapter-common@0.23.0
14
+
15
+ ## 0.31.0
16
+
17
+ ### Minor Changes
18
+
19
+ - e4759d1: Slider: fixed the raw numeric value duplicating next to the track when `tooltipLabel` is a formatter (now reuses the same formatter), added `minLabel`/`maxLabel` overrides for the track's end labels, and added a `trailingIcon` prop alongside the existing leading `icon`.
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [e4759d1]
24
+ - @recursica/adapter-common@0.22.0
25
+
3
26
  ## 0.30.0
4
27
 
5
28
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -2248,7 +2248,7 @@ export declare interface RecursicaSegmentedControlProps {
2248
2248
  */
2249
2249
  export declare type RecursicaSize = "small" | "default" | "large";
2250
2250
 
2251
- export declare interface RecursicaSliderProps extends Omit<SliderProps, "size" | "color" | "classes" | "onChange" | "onChangeCommitted">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth" | "error" | "required" | "withAsterisk" | keyof SliderProps>, ReadOnlyControlProps, RecursicaSliderProps_2 {
2251
+ export declare interface RecursicaSliderProps extends Omit<SliderProps, "size" | "color" | "classes" | "onChange" | "onChangeCommitted" | "value" | "defaultValue">, Omit<RecursicaFormControlWrapperProps, "controlMaxWidth" | "controlMinWidth" | "error" | "required" | "withAsterisk" | keyof SliderProps>, ReadOnlyControlProps, RecursicaSliderProps_2 {
2252
2252
  }
2253
2253
 
2254
2254
  /**
@@ -2261,20 +2261,30 @@ declare interface RecursicaSliderProps_2 {
2261
2261
  required?: boolean;
2262
2262
  /** Render visual asterisk */
2263
2263
  withAsterisk?: boolean;
2264
+ /** Controlled value. Pass a `[number, number]` tuple to render a two-thumb range slider. */
2265
+ value?: number | [number, number];
2266
+ /** Uncontrolled initial value. Pass a `[number, number]` tuple to render a two-thumb range slider. */
2267
+ defaultValue?: number | [number, number];
2264
2268
  /** Callback triggered when slider value changes */
2265
- onChange?: (value: number) => void;
2269
+ onChange?: (value: number | [number, number]) => void;
2266
2270
  /** Callback triggered when dragging ends */
2267
- onChangeEnd?: (value: number) => void;
2271
+ onChangeEnd?: (value: number | [number, number]) => void;
2268
2272
  /** Visual form label above track */
2269
2273
  label?: default_2.ReactNode;
2270
2274
  /** Custom formatter function or React node for tooltip label */
2271
2275
  tooltipLabel?: default_2.ReactNode | ((value: number) => default_2.ReactNode);
2272
2276
  /** Icon shown to the left of the slider track */
2273
2277
  icon?: default_2.ReactNode;
2278
+ /** Icon shown to the right of the slider track */
2279
+ trailingIcon?: default_2.ReactNode;
2274
2280
  /** Render numeric input side-by-side or stacked */
2275
2281
  showInput?: boolean;
2276
2282
  /** Show min and max labels below track */
2277
2283
  showMinMaxLabels?: boolean;
2284
+ /** Override the label shown at the minimum end of the track. Defaults to the numeric `min`. */
2285
+ minLabel?: default_2.ReactNode;
2286
+ /** Override the label shown at the maximum end of the track. Defaults to the numeric `max`. */
2287
+ maxLabel?: default_2.ReactNode;
2278
2288
  }
2279
2289
 
2280
2290
  /**
@@ -2697,8 +2707,13 @@ export declare const Slider: typeof rawComponents.Slider;
2697
2707
  /**
2698
2708
  * Recursica Slider component wrapping Mui's Slider.
2699
2709
  *
2710
+ * MUI's own `Slider` already renders two thumbs natively when given a tuple `value`, so range
2711
+ * mode here is a typing/handler concern rather than a different underlying component (contrast
2712
+ * with the mantine-adapter, which swaps in Mantine's separate `RangeSlider`).
2713
+ *
2700
2714
  * Implements a bidirectional text input field next to the slider track, responsive layouts,
2701
- * custom typography-bound min/max labels, an optional leading icon, and an explicit read-only layout.
2715
+ * custom typography-bound min/max labels (optionally overridden via `minLabel`/`maxLabel`),
2716
+ * optional leading/trailing icons, and an explicit read-only layout.
2702
2717
  */
2703
2718
  declare const Slider_2: default_2.ForwardRefExoticComponent<(Omit<Omit<WithRecursicaSpacing<RecursicaSliderProps>, BlockedStylingKeys> & ForbiddenStyles & {
2704
2719
  overStyled?: false | undefined;