nuvox 0.1.2 → 0.1.3
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 +75 -0
- package/dist/{chunk-3F7OVF4J.js → chunk-KKRVJF3Y.js} +37 -4
- package/dist/chunk-KKRVJF3Y.js.map +1 -0
- package/dist/index.cjs +36 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.cjs +48 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.css +12 -2
- package/dist/react/index.css.map +1 -1
- package/dist/react/index.js +13 -4
- package/dist/react/index.js.map +1 -1
- package/dist/themes/generated.css +4 -4
- package/package.json +1 -1
- package/dist/chunk-3F7OVF4J.js.map +0 -1
package/dist/react/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
resolveTableState,
|
|
35
35
|
rgbToHex,
|
|
36
36
|
rgbToHsl
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-KKRVJF3Y.js";
|
|
38
38
|
|
|
39
39
|
// src/theme-engine/resolveColor.ts
|
|
40
40
|
function rawColorToBrandVars(color) {
|
|
@@ -15179,7 +15179,9 @@ function useClickOutside(isOpen, refs, onOutsideClick) {
|
|
|
15179
15179
|
function onPointerDown(e) {
|
|
15180
15180
|
const target = e.target;
|
|
15181
15181
|
const isInside = refs.some((ref) => ref.current?.contains(target));
|
|
15182
|
-
if (
|
|
15182
|
+
if (isInside) return;
|
|
15183
|
+
if (target instanceof Element && target.closest("[data-nuvox-portal]")) return;
|
|
15184
|
+
onOutsideClick();
|
|
15183
15185
|
}
|
|
15184
15186
|
document.addEventListener("pointerdown", onPointerDown, true);
|
|
15185
15187
|
return () => document.removeEventListener("pointerdown", onPointerDown, true);
|
|
@@ -15940,12 +15942,19 @@ function getKeyboardValue(key, current, state) {
|
|
|
15940
15942
|
if (key === "End") return state.max;
|
|
15941
15943
|
return null;
|
|
15942
15944
|
}
|
|
15943
|
-
function getRootClasses3(state, isRange, className) {
|
|
15945
|
+
function getRootClasses3(state, isRange, showValueLabel, className) {
|
|
15944
15946
|
return [
|
|
15945
15947
|
"nx-slider",
|
|
15946
15948
|
`nx-slider--${state.size}`,
|
|
15947
15949
|
isRange && "nx-slider--range",
|
|
15948
15950
|
state.isDisabled && "nx-slider--disabled",
|
|
15951
|
+
// The value-label bubble floats above the thumb (see
|
|
15952
|
+
// Slider.css) — with no room reserved for it, it overflows
|
|
15953
|
+
// .nx-slider's own box and lands on whatever's above it in
|
|
15954
|
+
// .nx-field, which for a slider with a `label` is the label
|
|
15955
|
+
// text itself. This adds the top margin the bubble actually
|
|
15956
|
+
// needs instead of relying on .nx-field's generic 4px gap.
|
|
15957
|
+
showValueLabel && "nx-slider--with-value-label",
|
|
15949
15958
|
className
|
|
15950
15959
|
].filter(Boolean).join(" ");
|
|
15951
15960
|
}
|
|
@@ -16076,7 +16085,7 @@ var SliderImpl = forwardRef20(function Slider({
|
|
|
16076
16085
|
}
|
|
16077
16086
|
const slider = /* @__PURE__ */ jsxs451("div", { className: "nx-field", style, children: [
|
|
16078
16087
|
label && /* @__PURE__ */ jsx525("span", { id: labelId, className: "nx-field__label", children: label }),
|
|
16079
|
-
/* @__PURE__ */ jsx525("div", { ref: forwardedRef, id: rootId, className: getRootClasses3(state, isRange, className), children: /* @__PURE__ */ jsxs451(
|
|
16088
|
+
/* @__PURE__ */ jsx525("div", { ref: forwardedRef, id: rootId, className: getRootClasses3(state, isRange, showValueLabel, className), children: /* @__PURE__ */ jsxs451(
|
|
16080
16089
|
"div",
|
|
16081
16090
|
{
|
|
16082
16091
|
ref: trackRef,
|