@viraui/react 2026.0.27 → 2026.0.28

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.
@@ -37,8 +37,8 @@ export type SliderProps = SliderRoot.Props & FieldRoot.Props & {
37
37
  /**
38
38
  * Shows the current value beside the label.
39
39
  *
40
- * Pass `true` for Base UI default formatting, or a function matching
41
- * `Slider.Value` `children` to customize the printed label.
40
+ * Pass `true` for Base UI default formatting inside styled `Text`, or a
41
+ * function matching `Slider.Value` `children` to own the value slot (no `Text`).
42
42
  *
43
43
  * @default Value UI is hidden.
44
44
  */
@@ -37,7 +37,7 @@
37
37
  "description": "Marks the slider as required and shows a required indicator on the label."
38
38
  },
39
39
  "renderValue": {
40
- "description": "Shows the current value beside the label. Pass `true` for Base UI default formatting, or a function matching `Slider.Value` `children` to customize the printed label."
40
+ "description": "Shows the current value beside the label. Pass `true` for Base UI default formatting inside styled `Text`, or a function matching `Slider.Value` `children` to own the value slot (no `Text`)."
41
41
  },
42
42
  "thumbAriaLabel": {
43
43
  "description": "Accessible name for the thumb when `label` is omitted. Pass a string to name the first thumb (single-thumb slider, or the minimum thumb on a range). Pass a two-element tuple to name each range thumb in order; on a single-thumb slider only the first tuple value is applied."
@@ -14,7 +14,6 @@ import { Slider } from "@base-ui/react/slider";
14
14
  var Slider$1 = ({ className, defaultValue, description, dirty, disabled, error, invalid, label, name, orientation = "horizontal", renderValue, thumbAlignment = "edge", thumbAriaLabel, touched, validate, validationDebounceTime, validationMode, value, ref, ...sliderRootProps }) => {
15
15
  const isRange = isRangeSlider(value, defaultValue);
16
16
  const isVertical = orientation === "vertical";
17
- const showRenderedValue = renderValue === true || typeof renderValue === "function";
18
17
  return /* @__PURE__ */ jsxs(Field.Root, {
19
18
  className: slider_module_default.Slider,
20
19
  dirty,
@@ -46,8 +45,7 @@ var Slider$1 = ({ className, defaultValue, description, dirty, disabled, error,
46
45
  vAlign: isVertical ? "stretch" : "center",
47
46
  hAlign: isVertical ? "center" : "initial"
48
47
  }),
49
- children: [(label || showRenderedValue) && /* @__PURE__ */ jsxs(Stack, {
50
- fillChildren: true,
48
+ children: [(label || renderValue) && /* @__PURE__ */ jsxs(Stack, {
51
49
  className: slider_module_default.SliderHeader,
52
50
  direction: isVertical ? "column" : "row",
53
51
  columnGap: "small",
@@ -56,7 +54,10 @@ var Slider$1 = ({ className, defaultValue, description, dirty, disabled, error,
56
54
  children: [label && /* @__PURE__ */ jsx(Field.Label, {
57
55
  className: slider_module_default.Label,
58
56
  children: /* @__PURE__ */ jsx(FieldLabel, { children: label })
59
- }), showRenderedValue && /* @__PURE__ */ jsx(Text, {
57
+ }), renderValue && (typeof renderValue === "function" ? /* @__PURE__ */ jsx(Slider.Value, {
58
+ className: slider_module_default.Value,
59
+ children: renderValue
60
+ }) : /* @__PURE__ */ jsx(Text, {
60
61
  className: slider_module_default.Value,
61
62
  size: "small",
62
63
  tone: "muted",
@@ -64,8 +65,8 @@ var Slider$1 = ({ className, defaultValue, description, dirty, disabled, error,
64
65
  whiteSpace: "nowrap",
65
66
  selection: false,
66
67
  align: isVertical ? "center" : "end",
67
- render: /* @__PURE__ */ jsx(Slider.Value, { children: typeof renderValue === "function" ? renderValue : void 0 })
68
- })]
68
+ render: /* @__PURE__ */ jsx(Slider.Value, {})
69
+ }))]
69
70
  }), /* @__PURE__ */ jsx(SliderControl, {
70
71
  isRange,
71
72
  orientation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viraui/react",
3
- "version": "2026.0.27",
3
+ "version": "2026.0.28",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
@@ -35,7 +35,7 @@
35
35
  "unplugin-dts": "1.0.3",
36
36
  "vite": "8.1.4",
37
37
  "vite-plugin-static-copy": "4.1.1",
38
- "@viraui/foundation": "2026.0.27",
38
+ "@viraui/foundation": "2026.0.28",
39
39
  "@viraui/icons": "2026.0.0",
40
40
  "@viraui/postcss-config": "2026.0.0",
41
41
  "@viraui/tsconfig": "2026.0.0"