@nexub/react 1.4.0 → 1.5.1
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/dist/{chunk-T5BS4OIV.js → chunk-2ZBJOUJ7.js} +16 -19
- package/dist/chunk-5O34ZNC3.js +70 -0
- package/dist/chunk-64JDZWCV.js +47 -0
- package/dist/chunk-AXOKFS4K.js +48 -0
- package/dist/chunk-CIQHFMF6.js +44 -0
- package/dist/{chunk-RB4CVS22.js → chunk-HH7EHNOW.js} +3 -1
- package/dist/chunk-HI7GBSW2.js +1 -0
- package/dist/{chunk-UVWCZHLD.js → chunk-I4BHRVRL.js} +2 -29
- package/dist/chunk-JLUCMNVS.js +32 -0
- package/dist/{chunk-NDCNVQ47.js → chunk-LGQ737BP.js} +5 -11
- package/dist/chunk-LVPU7455.js +1 -0
- package/dist/chunk-YPHNHQYQ.js +61 -0
- package/dist/components/Amount/index.js +9 -0
- package/dist/components/ButtonGroup/index.js +2 -1
- package/dist/components/DropdownMenu/index.js +2 -1
- package/dist/components/FormField/index.js +2 -2
- package/dist/components/MoneyInput/index.js +13 -0
- package/dist/components/NavigationRail/index.js +8 -0
- package/dist/components/Rating/index.js +2 -1
- package/dist/components/SplitButton/index.js +14 -0
- package/dist/components/TextGradient/index.js +1 -1
- package/dist/components/Toolbar/index.js +2 -1
- package/dist/index.d.ts +82 -3
- package/dist/index.js +105 -84
- package/package.json +5 -5
- package/dist/{chunk-VTL3GJJG.js → chunk-7L3CGIRA.js} +0 -0
- package/dist/{chunk-OASFXI27.js → chunk-XI63BK3S.js} +3 -3
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
glassSurfaceClass
|
|
4
|
+
} from "./chunk-DEIBF3P7.js";
|
|
2
5
|
import {
|
|
3
6
|
cn
|
|
4
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -8,12 +11,15 @@ import * as React from "react";
|
|
|
8
11
|
import * as RadixToolbar from "@radix-ui/react-toolbar";
|
|
9
12
|
import { jsx } from "react/jsx-runtime";
|
|
10
13
|
var Root2 = React.forwardRef(
|
|
11
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
({ className, floating = false, placement, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12
15
|
RadixToolbar.Root,
|
|
13
16
|
{
|
|
14
17
|
ref,
|
|
18
|
+
"data-material": floating ? "glass" : void 0,
|
|
15
19
|
className: cn(
|
|
16
|
-
"flex items-center gap-1
|
|
20
|
+
"flex items-center gap-1 p-1",
|
|
21
|
+
floating ? ["rounded-shape-control p-1.5", glassSurfaceClass] : "rounded-shape-container bg-[var(--color-surface-container-low)]",
|
|
22
|
+
floating && placement === "bottom" && "fixed bottom-6 left-1/2 z-[var(--z-sticky,1100)] -translate-x-1/2",
|
|
17
23
|
className
|
|
18
24
|
),
|
|
19
25
|
...props
|
|
@@ -21,20 +27,12 @@ var Root2 = React.forwardRef(
|
|
|
21
27
|
)
|
|
22
28
|
);
|
|
23
29
|
Root2.displayName = "Toolbar.Root";
|
|
30
|
+
var item = [
|
|
31
|
+
"nx-state-layer nx-press relative inline-flex h-control-sm items-center justify-center gap-1.5 rounded-shape-control text-label-lg text-[var(--color-on-surface)] select-none",
|
|
32
|
+
"disabled:pointer-events-none disabled:text-[var(--color-text-disabled)]"
|
|
33
|
+
].join(" ");
|
|
24
34
|
var ToolbarButton = React.forwardRef(
|
|
25
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
26
|
-
RadixToolbar.Button,
|
|
27
|
-
{
|
|
28
|
-
ref,
|
|
29
|
-
className: cn(
|
|
30
|
-
"inline-flex h-8 items-center justify-center rounded-md px-3 text-sm font-medium transition-colors",
|
|
31
|
-
"hover:bg-[var(--color-bg-subtle)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
32
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
33
|
-
className
|
|
34
|
-
),
|
|
35
|
-
...props
|
|
36
|
-
}
|
|
37
|
-
)
|
|
35
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadixToolbar.Button, { ref, className: cn(item, "px-3", className), ...props })
|
|
38
36
|
);
|
|
39
37
|
ToolbarButton.displayName = "Toolbar.Button";
|
|
40
38
|
var Separator2 = React.forwardRef(
|
|
@@ -42,7 +40,7 @@ var Separator2 = React.forwardRef(
|
|
|
42
40
|
RadixToolbar.Separator,
|
|
43
41
|
{
|
|
44
42
|
ref,
|
|
45
|
-
className: cn("mx-1 w-px
|
|
43
|
+
className: cn("mx-1 h-5 w-px bg-[var(--color-outline-variant)]", className),
|
|
46
44
|
...props
|
|
47
45
|
}
|
|
48
46
|
)
|
|
@@ -65,9 +63,8 @@ var ToggleItem2 = React.forwardRef(
|
|
|
65
63
|
{
|
|
66
64
|
ref,
|
|
67
65
|
className: cn(
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-ring-default)]",
|
|
66
|
+
item,
|
|
67
|
+
"w-control-sm data-[state=on]:bg-[var(--color-secondary-container)] data-[state=on]:text-[var(--color-on-secondary-container)]",
|
|
71
68
|
className
|
|
72
69
|
),
|
|
73
70
|
...props
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
5
|
+
|
|
6
|
+
// src/components/NavigationRail/NavigationRail.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var Root = React.forwardRef(
|
|
11
|
+
({ className, header, children, "aria-label": ariaLabel = "Main", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
12
|
+
"nav",
|
|
13
|
+
{
|
|
14
|
+
ref,
|
|
15
|
+
"aria-label": ariaLabel,
|
|
16
|
+
className: cn("flex h-full w-20 shrink-0 flex-col items-center gap-3 py-4", className),
|
|
17
|
+
...props,
|
|
18
|
+
children: [
|
|
19
|
+
header && /* @__PURE__ */ jsx("div", { className: "mb-3 flex flex-col items-center", children: header }),
|
|
20
|
+
/* @__PURE__ */ jsx("ul", { className: "flex w-full flex-col items-center gap-1", role: "list", children })
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
Root.displayName = "NavigationRail.Root";
|
|
26
|
+
var Item = React.forwardRef(
|
|
27
|
+
({ className, icon, label, active, asChild, children, ...props }, ref) => {
|
|
28
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
"span",
|
|
31
|
+
{
|
|
32
|
+
className: cn(
|
|
33
|
+
"relative grid h-8 w-14 place-items-center rounded-full [&>svg]:h-5 [&>svg]:w-5",
|
|
34
|
+
"before:absolute before:inset-0 before:rounded-full before:bg-current before:opacity-0",
|
|
35
|
+
"before:transition-opacity before:duration-effects-fast before:ease-effects-fast",
|
|
36
|
+
"group-hover:before:opacity-[var(--state-hover)] group-active:before:opacity-[var(--state-pressed)]",
|
|
37
|
+
active ? "bg-[var(--color-secondary-container)] text-[var(--color-on-secondary-container)]" : "text-[var(--color-on-surface-variant)]"
|
|
38
|
+
),
|
|
39
|
+
children: icon
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
"span",
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"text-label-md",
|
|
47
|
+
active ? "text-[var(--color-on-surface)]" : "text-[var(--color-on-surface-variant)]"
|
|
48
|
+
),
|
|
49
|
+
children: label
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
const shared = {
|
|
54
|
+
ref,
|
|
55
|
+
"aria-current": active ? "page" : void 0,
|
|
56
|
+
className: cn(
|
|
57
|
+
"group flex w-full flex-col items-center gap-1 rounded-shape-container py-1 no-underline select-none outline-offset-0",
|
|
58
|
+
className
|
|
59
|
+
),
|
|
60
|
+
...props
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ jsx("li", { className: "w-full px-1", children: asChild && React.isValidElement(children) ? /* @__PURE__ */ jsx(Slot, { ...shared, children: React.cloneElement(children, void 0, inner) }) : /* @__PURE__ */ jsx("a", { ...shared, children: inner }) });
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
Item.displayName = "NavigationRail.Item";
|
|
66
|
+
var NavigationRail = { Root, Item };
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
NavigationRail
|
|
70
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
DropdownMenu
|
|
4
|
+
} from "./chunk-7L3CGIRA.js";
|
|
5
|
+
import {
|
|
6
|
+
ButtonGroup
|
|
7
|
+
} from "./chunk-LGQ737BP.js";
|
|
8
|
+
import {
|
|
9
|
+
Button
|
|
10
|
+
} from "./chunk-LMPGHWUA.js";
|
|
11
|
+
import {
|
|
12
|
+
cn
|
|
13
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
14
|
+
|
|
15
|
+
// src/components/SplitButton/SplitButton.tsx
|
|
16
|
+
import * as React from "react";
|
|
17
|
+
import { ChevronDown } from "@nexub/icons";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
var SplitButton = React.forwardRef(
|
|
20
|
+
({ menuLabel, menu, align = "end", variant, size, tone, disabled, loading, className, ...props }, ref) => {
|
|
21
|
+
const shared = { variant, size, tone, disabled: disabled || loading };
|
|
22
|
+
return /* @__PURE__ */ jsxs(ButtonGroup, { attached: true, className, children: [
|
|
23
|
+
/* @__PURE__ */ jsx(Button, { ref, ...shared, loading, ...props }),
|
|
24
|
+
/* @__PURE__ */ jsxs(DropdownMenu.Root, { modal: false, children: [
|
|
25
|
+
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
26
|
+
Button,
|
|
27
|
+
{
|
|
28
|
+
...shared,
|
|
29
|
+
"aria-label": menuLabel,
|
|
30
|
+
className: cn(
|
|
31
|
+
"px-3",
|
|
32
|
+
// The chevron flips while the menu is open.
|
|
33
|
+
"[&[data-state=open]>svg]:rotate-180 [&>svg]:transition-transform [&>svg]:duration-spatial-fast [&>svg]:ease-spatial-fast"
|
|
34
|
+
),
|
|
35
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { size: "sm", "aria-hidden": "true" })
|
|
36
|
+
}
|
|
37
|
+
) }),
|
|
38
|
+
/* @__PURE__ */ jsx(DropdownMenu.Content, { align, children: menu })
|
|
39
|
+
] })
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
SplitButton.displayName = "SplitButton";
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
SplitButton
|
|
47
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
moneyFormatter
|
|
4
|
+
} from "./chunk-CIQHFMF6.js";
|
|
5
|
+
import {
|
|
6
|
+
cn
|
|
7
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
8
|
+
|
|
9
|
+
// src/components/Amount/Amount.tsx
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var sizes = {
|
|
13
|
+
sm: "text-body-sm",
|
|
14
|
+
md: "text-body-md",
|
|
15
|
+
lg: "text-title-lg",
|
|
16
|
+
display: "font-display text-display-sm"
|
|
17
|
+
};
|
|
18
|
+
var Amount = React.forwardRef(
|
|
19
|
+
({ value, currency, locale, size = "md", tone = "neutral", signDisplay, className, ...props }, ref) => {
|
|
20
|
+
const parts = moneyFormatter(currency, locale, { signDisplay }).formatToParts(value);
|
|
21
|
+
const quiet = size === "display";
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
"span",
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
"data-value": value,
|
|
27
|
+
className: cn(
|
|
28
|
+
"whitespace-nowrap tabular-nums",
|
|
29
|
+
sizes[size],
|
|
30
|
+
tone === "auto" && value > 0 && "text-[var(--color-success)]",
|
|
31
|
+
tone === "auto" && value < 0 && "text-[var(--color-error)]",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
...props,
|
|
35
|
+
children: parts.map((p, i) => {
|
|
36
|
+
const text = p.type === "minusSign" ? "\u2212" : p.value;
|
|
37
|
+
const muted = quiet && (p.type === "currency" || p.type === "decimal" || p.type === "fraction");
|
|
38
|
+
return muted ? /* @__PURE__ */ jsx("span", { className: "text-[0.55em] font-semibold text-[var(--color-on-surface-variant)]", children: text }, i) : /* @__PURE__ */ jsx(React.Fragment, { children: text }, i);
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
Amount.displayName = "Amount";
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
Amount
|
|
48
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// src/utils/money.ts
|
|
4
|
+
function moneyFormatter(currency, locale, options = {}) {
|
|
5
|
+
return new Intl.NumberFormat(locale, { style: "currency", currency, currencyDisplay: "narrowSymbol", ...options });
|
|
6
|
+
}
|
|
7
|
+
function fractionDigits(currency, locale) {
|
|
8
|
+
return moneyFormatter(currency, locale).resolvedOptions().maximumFractionDigits ?? 2;
|
|
9
|
+
}
|
|
10
|
+
function currencySymbol(currency, locale) {
|
|
11
|
+
return moneyFormatter(currency, locale).formatToParts(0).find((p) => p.type === "currency")?.value ?? currency;
|
|
12
|
+
}
|
|
13
|
+
function formatForEditing(value, currency, locale) {
|
|
14
|
+
return new Intl.NumberFormat(locale, {
|
|
15
|
+
useGrouping: false,
|
|
16
|
+
maximumFractionDigits: fractionDigits(currency, locale)
|
|
17
|
+
}).format(value);
|
|
18
|
+
}
|
|
19
|
+
function formatForDisplay(value, currency, locale) {
|
|
20
|
+
const digits = fractionDigits(currency, locale);
|
|
21
|
+
return new Intl.NumberFormat(locale, { minimumFractionDigits: digits, maximumFractionDigits: digits }).format(value);
|
|
22
|
+
}
|
|
23
|
+
function parseMoney(text, currency, locale) {
|
|
24
|
+
const decimal = new Intl.NumberFormat(locale).formatToParts(1.1).find((p) => p.type === "decimal")?.value ?? ".";
|
|
25
|
+
const group = new Intl.NumberFormat(locale).formatToParts(1e4).find((p) => p.type === "group")?.value;
|
|
26
|
+
let s = text.trim().replace(/[\s\u00a0\u202f]/g, "");
|
|
27
|
+
if (group && group !== decimal) s = s.split(group).join("");
|
|
28
|
+
s = s.replace(decimal, ".").replace(/[−–]/g, "-").replace(/[^0-9.-]/g, "");
|
|
29
|
+
const negative = s.startsWith("-");
|
|
30
|
+
s = s.replace(/-/g, "");
|
|
31
|
+
if (!/\d/.test(s) || (s.match(/\./g) ?? []).length > 1) return null;
|
|
32
|
+
const n = Number(s);
|
|
33
|
+
if (!Number.isFinite(n)) return null;
|
|
34
|
+
const f = 10 ** fractionDigits(currency, locale);
|
|
35
|
+
return (negative ? -1 : 1) * (Math.round(n * f) / f);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
moneyFormatter,
|
|
40
|
+
currencySymbol,
|
|
41
|
+
formatForEditing,
|
|
42
|
+
formatForDisplay,
|
|
43
|
+
parseMoney
|
|
44
|
+
};
|
|
@@ -13,7 +13,9 @@ var TextGradient = React.forwardRef(
|
|
|
13
13
|
{
|
|
14
14
|
ref,
|
|
15
15
|
className: cn(
|
|
16
|
-
|
|
16
|
+
// Keep the `image:` hint: without it the arbitrary value compiles to
|
|
17
|
+
// background-color, which drops the gradient and hides the text.
|
|
18
|
+
"bg-[image:var(--gradient-brand-horizontal)] bg-clip-text text-transparent",
|
|
17
19
|
className
|
|
18
20
|
),
|
|
19
21
|
...rest,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
useControllableState
|
|
4
|
+
} from "./chunk-JLUCMNVS.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
7
|
} from "./chunk-Q7G5WGYV.js";
|
|
@@ -9,32 +9,6 @@ import {
|
|
|
9
9
|
// src/components/Rating/Rating.tsx
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { cva } from "class-variance-authority";
|
|
12
|
-
|
|
13
|
-
// src/hooks/useControllableState.ts
|
|
14
|
-
import { useState, useCallback, useRef } from "react";
|
|
15
|
-
function useControllableState({
|
|
16
|
-
value: controlledValue,
|
|
17
|
-
defaultValue,
|
|
18
|
-
onChange
|
|
19
|
-
}) {
|
|
20
|
-
const [uncontrolled, setUncontrolled] = useState(defaultValue);
|
|
21
|
-
const isControlled = controlledValue !== void 0;
|
|
22
|
-
const value = isControlled ? controlledValue : uncontrolled;
|
|
23
|
-
const onChangeRef = useRef(onChange);
|
|
24
|
-
useIsomorphicLayoutEffect(() => {
|
|
25
|
-
onChangeRef.current = onChange;
|
|
26
|
-
});
|
|
27
|
-
const setValue = useCallback(
|
|
28
|
-
(next) => {
|
|
29
|
-
if (!isControlled) setUncontrolled(next);
|
|
30
|
-
onChangeRef.current?.(next);
|
|
31
|
-
},
|
|
32
|
-
[isControlled]
|
|
33
|
-
);
|
|
34
|
-
return [value, setValue];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// src/components/Rating/Rating.tsx
|
|
38
12
|
import { jsx } from "react/jsx-runtime";
|
|
39
13
|
var ratingVariants = cva("inline-flex items-center gap-0.5", {
|
|
40
14
|
variants: {
|
|
@@ -147,7 +121,6 @@ function StarIcon({ filled, ...props }) {
|
|
|
147
121
|
}
|
|
148
122
|
|
|
149
123
|
export {
|
|
150
|
-
useControllableState,
|
|
151
124
|
ratingVariants,
|
|
152
125
|
Rating
|
|
153
126
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useIsomorphicLayoutEffect
|
|
4
|
+
} from "./chunk-NHUQLIHL.js";
|
|
5
|
+
|
|
6
|
+
// src/hooks/useControllableState.ts
|
|
7
|
+
import { useState, useCallback, useRef } from "react";
|
|
8
|
+
function useControllableState({
|
|
9
|
+
value: controlledValue,
|
|
10
|
+
defaultValue,
|
|
11
|
+
onChange
|
|
12
|
+
}) {
|
|
13
|
+
const [uncontrolled, setUncontrolled] = useState(defaultValue);
|
|
14
|
+
const isControlled = controlledValue !== void 0;
|
|
15
|
+
const value = isControlled ? controlledValue : uncontrolled;
|
|
16
|
+
const onChangeRef = useRef(onChange);
|
|
17
|
+
useIsomorphicLayoutEffect(() => {
|
|
18
|
+
onChangeRef.current = onChange;
|
|
19
|
+
});
|
|
20
|
+
const setValue = useCallback(
|
|
21
|
+
(next) => {
|
|
22
|
+
if (!isControlled) setUncontrolled(next);
|
|
23
|
+
onChangeRef.current?.(next);
|
|
24
|
+
},
|
|
25
|
+
[isControlled]
|
|
26
|
+
);
|
|
27
|
+
return [value, setValue];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
useControllableState
|
|
32
|
+
};
|
|
@@ -18,18 +18,12 @@ var ButtonGroup = React.forwardRef(
|
|
|
18
18
|
className: cn(
|
|
19
19
|
"flex",
|
|
20
20
|
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
21
|
+
// Connected (M3 Expressive): capsule outer ends, small inner corners, a 2px
|
|
22
|
+
// seam between segments so each keeps its own state layer and focus ring.
|
|
21
23
|
attached ? [
|
|
22
|
-
"gap-0",
|
|
23
|
-
"[&>*:not(:first-child):not(:last-child)]:rounded-
|
|
24
|
-
orientation === "horizontal" ? [
|
|
25
|
-
"[&>*:first-child]:rounded-r-none",
|
|
26
|
-
"[&>*:last-child]:rounded-l-none",
|
|
27
|
-
"[&>*:not(:first-child)]:border-l-0"
|
|
28
|
-
] : [
|
|
29
|
-
"[&>*:first-child]:rounded-b-none",
|
|
30
|
-
"[&>*:last-child]:rounded-t-none",
|
|
31
|
-
"[&>*:not(:first-child)]:border-t-0"
|
|
32
|
-
]
|
|
24
|
+
"gap-0.5",
|
|
25
|
+
"[&>*:not(:first-child):not(:last-child)]:rounded-[6px]",
|
|
26
|
+
orientation === "horizontal" ? ["[&>*:first-child]:rounded-r-[6px]", "[&>*:last-child]:rounded-l-[6px]"] : ["[&>*:first-child]:rounded-b-[6px]", "[&>*:last-child]:rounded-t-[6px]"]
|
|
33
27
|
] : "gap-2",
|
|
34
28
|
className
|
|
35
29
|
),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use client';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
useControllableState
|
|
4
|
+
} from "./chunk-JLUCMNVS.js";
|
|
5
|
+
import {
|
|
6
|
+
Input
|
|
7
|
+
} from "./chunk-IK23Q2OF.js";
|
|
8
|
+
import {
|
|
9
|
+
currencySymbol,
|
|
10
|
+
formatForDisplay,
|
|
11
|
+
formatForEditing,
|
|
12
|
+
parseMoney
|
|
13
|
+
} from "./chunk-CIQHFMF6.js";
|
|
14
|
+
import {
|
|
15
|
+
cn
|
|
16
|
+
} from "./chunk-Q7G5WGYV.js";
|
|
17
|
+
|
|
18
|
+
// src/components/MoneyInput/MoneyInput.tsx
|
|
19
|
+
import * as React from "react";
|
|
20
|
+
import { jsx } from "react/jsx-runtime";
|
|
21
|
+
var MoneyInput = React.forwardRef(
|
|
22
|
+
({ value: valueProp, defaultValue = null, onValueChange, currency, locale, onFocus, onBlur, className, ...props }, ref) => {
|
|
23
|
+
const [value, setValue] = useControllableState({
|
|
24
|
+
value: valueProp,
|
|
25
|
+
defaultValue,
|
|
26
|
+
onChange: onValueChange
|
|
27
|
+
});
|
|
28
|
+
const [draft, setDraft] = React.useState(null);
|
|
29
|
+
const shown = draft ?? (value == null ? "" : formatForDisplay(value, currency, locale));
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
Input,
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
inputMode: "decimal",
|
|
35
|
+
autoComplete: "off",
|
|
36
|
+
leadingIcon: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "text-body-md", children: currencySymbol(currency, locale) }),
|
|
37
|
+
className: cn("tabular-nums", className),
|
|
38
|
+
value: shown,
|
|
39
|
+
onFocus: (e) => {
|
|
40
|
+
setDraft(value == null ? "" : formatForEditing(value, currency, locale));
|
|
41
|
+
onFocus?.(e);
|
|
42
|
+
},
|
|
43
|
+
onChange: (e) => {
|
|
44
|
+
setDraft(e.target.value);
|
|
45
|
+
const next = parseMoney(e.target.value, currency, locale);
|
|
46
|
+
if (next !== value) setValue(next);
|
|
47
|
+
},
|
|
48
|
+
onBlur: (e) => {
|
|
49
|
+
setDraft(null);
|
|
50
|
+
onBlur?.(e);
|
|
51
|
+
},
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
MoneyInput.displayName = "MoneyInput";
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
MoneyInput
|
|
61
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
FormField
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-XI63BK3S.js";
|
|
5
5
|
import "../../chunk-NIX4SEKM.js";
|
|
6
|
-
import "../../chunk-UMC64NCT.js";
|
|
7
6
|
import "../../chunk-KM6Z3VTI.js";
|
|
7
|
+
import "../../chunk-UMC64NCT.js";
|
|
8
8
|
import "../../chunk-Q7G5WGYV.js";
|
|
9
9
|
export {
|
|
10
10
|
FormField
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
MoneyInput
|
|
4
|
+
} from "../../chunk-YPHNHQYQ.js";
|
|
5
|
+
import "../../chunk-JLUCMNVS.js";
|
|
6
|
+
import "../../chunk-NHUQLIHL.js";
|
|
7
|
+
import "../../chunk-IK23Q2OF.js";
|
|
8
|
+
import "../../chunk-7SXR4PGO.js";
|
|
9
|
+
import "../../chunk-CIQHFMF6.js";
|
|
10
|
+
import "../../chunk-Q7G5WGYV.js";
|
|
11
|
+
export {
|
|
12
|
+
MoneyInput
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
SplitButton
|
|
4
|
+
} from "../../chunk-64JDZWCV.js";
|
|
5
|
+
import "../../chunk-7L3CGIRA.js";
|
|
6
|
+
import "../../chunk-LGQ737BP.js";
|
|
7
|
+
import "../../chunk-KQPLFVFR.js";
|
|
8
|
+
import "../../chunk-LMPGHWUA.js";
|
|
9
|
+
import "../../chunk-7SXR4PGO.js";
|
|
10
|
+
import "../../chunk-DEIBF3P7.js";
|
|
11
|
+
import "../../chunk-Q7G5WGYV.js";
|
|
12
|
+
export {
|
|
13
|
+
SplitButton
|
|
14
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -74,6 +74,20 @@ interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
74
74
|
}
|
|
75
75
|
declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
76
76
|
|
|
77
|
+
interface SplitButtonProps extends Omit<ButtonProps, 'asChild' | 'trailingIcon' | 'fullWidth'> {
|
|
78
|
+
/** Accessible name of the menu toggle, e.g. "More save options". */
|
|
79
|
+
menuLabel: string;
|
|
80
|
+
/** `DropdownMenu.Item`s for the secondary actions. */
|
|
81
|
+
menu: React.ReactNode;
|
|
82
|
+
/** Menu alignment against the toggle. @default 'end' */
|
|
83
|
+
align?: 'start' | 'end';
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* A primary action with related secondary actions behind a chevron, as one
|
|
87
|
+
* connected control (M3 Expressive split button). The ref goes to the primary button.
|
|
88
|
+
*/
|
|
89
|
+
declare const SplitButton: React.ForwardRefExoticComponent<SplitButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
90
|
+
|
|
77
91
|
declare const iconButtonVariants: (props?: ({
|
|
78
92
|
variant?: "solid" | "subtle" | "outline" | "ghost" | null | undefined;
|
|
79
93
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
@@ -130,6 +144,43 @@ interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputEleme
|
|
|
130
144
|
}
|
|
131
145
|
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
132
146
|
|
|
147
|
+
interface MoneyInputProps extends Omit<InputProps, 'value' | 'defaultValue' | 'onChange' | 'type' | 'inputMode' | 'leadingIcon' | 'leadingAddon'> {
|
|
148
|
+
/** The amount, or null when empty. */
|
|
149
|
+
value?: number | null;
|
|
150
|
+
defaultValue?: number | null;
|
|
151
|
+
/** Called with the parsed amount (rounded to the currency's minor unit) as the person types. */
|
|
152
|
+
onValueChange?: (value: number | null) => void;
|
|
153
|
+
/** ISO 4217 code, e.g. 'USD'. */
|
|
154
|
+
currency: string;
|
|
155
|
+
/** BCP 47 locale for separators. Defaults to the user's. */
|
|
156
|
+
locale?: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* An amount field: the currency symbol leads, digits are tabular, the locale's
|
|
160
|
+
* separators parse correctly, and the value is grouped on blur
|
|
161
|
+
* (e.g. 1234.5 → "1,234.50"). Raw while editing so the caret never jumps.
|
|
162
|
+
*/
|
|
163
|
+
declare const MoneyInput: React.ForwardRefExoticComponent<MoneyInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
164
|
+
|
|
165
|
+
interface AmountProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
166
|
+
value: number;
|
|
167
|
+
/** ISO 4217 code, e.g. 'USD', 'EUR', 'INR'. */
|
|
168
|
+
currency: string;
|
|
169
|
+
/** BCP 47 locale. Defaults to the user's. */
|
|
170
|
+
locale?: string;
|
|
171
|
+
/** `display`: a hero figure in the brand face with a quieter symbol and minor units. */
|
|
172
|
+
size?: 'sm' | 'md' | 'lg' | 'display';
|
|
173
|
+
/** `auto` colours gains success and losses error (use with signDisplay). */
|
|
174
|
+
tone?: 'neutral' | 'auto';
|
|
175
|
+
/** e.g. 'exceptZero' to show "+" on gains. */
|
|
176
|
+
signDisplay?: Intl.NumberFormatOptions['signDisplay'];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* A money figure, honest by default (Calm Depth §3.5): tabular numerals, the
|
|
180
|
+
* currency's own minor unit, a true minus sign. Formatting is Intl.NumberFormat.
|
|
181
|
+
*/
|
|
182
|
+
declare const Amount: React.ForwardRefExoticComponent<AmountProps & React.RefAttributes<HTMLSpanElement>>;
|
|
183
|
+
|
|
133
184
|
interface SearchInputProps extends Omit<InputProps, 'leadingIcon' | 'trailingIcon'> {
|
|
134
185
|
onClear?: () => void;
|
|
135
186
|
}
|
|
@@ -480,7 +531,7 @@ interface AspectRatioProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
480
531
|
declare const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
|
|
481
532
|
|
|
482
533
|
declare const headingVariants: (props?: ({
|
|
483
|
-
size?: "display" | "
|
|
534
|
+
size?: "display" | "h2" | "h3" | "h1" | "h4" | "h5" | "h6" | null | undefined;
|
|
484
535
|
weight?: "bold" | "regular" | "medium" | "semibold" | "extrabold" | null | undefined;
|
|
485
536
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
486
537
|
type HeadingSize = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
@@ -645,6 +696,25 @@ declare const NavigationMenu: {
|
|
|
645
696
|
Indicator: React.ForwardRefExoticComponent<RadixNav.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
646
697
|
};
|
|
647
698
|
|
|
699
|
+
interface NavigationRailRootProps extends React.HTMLAttributes<HTMLElement> {
|
|
700
|
+
/** Accessible name for the landmark. @default 'Main' */
|
|
701
|
+
'aria-label'?: string;
|
|
702
|
+
/** Optional slot above the items, e.g. a primary action or logo. */
|
|
703
|
+
header?: React.ReactNode;
|
|
704
|
+
}
|
|
705
|
+
interface NavigationRailItemProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
706
|
+
icon: React.ReactNode;
|
|
707
|
+
label: React.ReactNode;
|
|
708
|
+
active?: boolean;
|
|
709
|
+
/** Render your link (e.g. a router `<Link>`) as the item: pass it as the only child. */
|
|
710
|
+
asChild?: boolean;
|
|
711
|
+
children?: React.ReactElement;
|
|
712
|
+
}
|
|
713
|
+
declare const NavigationRail: {
|
|
714
|
+
Root: React.ForwardRefExoticComponent<NavigationRailRootProps & React.RefAttributes<HTMLElement>>;
|
|
715
|
+
Item: React.ForwardRefExoticComponent<NavigationRailItemProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
716
|
+
};
|
|
717
|
+
|
|
648
718
|
interface DrawerRootProps {
|
|
649
719
|
children?: React.ReactNode;
|
|
650
720
|
open?: boolean;
|
|
@@ -922,8 +992,17 @@ interface ScrollAreaProps extends RadixScrollArea.ScrollAreaProps {
|
|
|
922
992
|
}
|
|
923
993
|
declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
|
|
924
994
|
|
|
995
|
+
interface ToolbarRootProps extends RadixToolbar.ToolbarProps {
|
|
996
|
+
/**
|
|
997
|
+
* Floating toolbar (Apple / M3 Expressive): a glass capsule for the control
|
|
998
|
+
* layer above content, e.g. editor or selection actions.
|
|
999
|
+
*/
|
|
1000
|
+
floating?: boolean;
|
|
1001
|
+
/** With `floating`: pin it to the bottom centre of the viewport. */
|
|
1002
|
+
placement?: 'bottom';
|
|
1003
|
+
}
|
|
925
1004
|
declare const Toolbar: {
|
|
926
|
-
Root: React.ForwardRefExoticComponent<
|
|
1005
|
+
Root: React.ForwardRefExoticComponent<ToolbarRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
927
1006
|
Button: React.ForwardRefExoticComponent<RadixToolbar.ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
928
1007
|
Separator: React.ForwardRefExoticComponent<RadixToolbar.ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
929
1008
|
ToggleGroup: React.ForwardRefExoticComponent<(RadixToolbar.ToolbarToggleGroupSingleProps | RadixToolbar.ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1369,4 +1448,4 @@ interface CollapseProps extends Omit<MotionBaseProps, 'easing'>, React.HTMLAttri
|
|
|
1369
1448
|
*/
|
|
1370
1449
|
declare const Collapse: React.ForwardRefExoticComponent<CollapseProps & React.RefAttributes<HTMLDivElement>>;
|
|
1371
1450
|
|
|
1372
|
-
export { Accordion, Alert, AlertDialog, type AlertProps, AppShell, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Callout, type CalloutProps, Card, type CardProps, CheckList, CheckListItem, type CheckListItemProps, type CheckListProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Code, type CodeProps, Collapse, type CollapseProps, Collapsible, Combobox, CommandPalette, type CommandPaletteRootProps, Container, type ContainerProps, ContextMenu, CountryBadge, type CountryBadgeProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, Drawer, type DrawerRootProps, DropdownMenu, EmptyState, ErrorState, type ErrorStateProps, EyebrowChip, type EyebrowChipProps, Fade, type FadeProps, FileUpload, type FileUploadRootProps, FilterChip, type FilterChipProps, Flag, type FlagProps, Flex, type FlexProps, FormError, type FormErrorProps, FormField, type FormFieldContextValue, type FormFieldRootProps, type GlassMode, GradientDivider, type GradientDividerProps, Grid, type GridProps, Heading, type HeadingProps, HelperText, type HelperTextProps, HoverCard, IconButton, type IconButtonProps, Input, type InputProps, Kbd, type KbdProps, KeyboardShortcut, type KeyboardShortcutProps, Label, type LabelProps, Link, type LinkProps, Logo, type LogoProps, Menubar, type MotionBaseProps, type MotionDuration, type MotionEasing, NavigationMenu, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, Progress, type ProgressProps, RadioGroup, Rating, type RatingProps, Scale, type ScaleProps, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, Select, Separator, type SeparatorProps, Sheet, Sidebar, type SidebarGroupProps, type SidebarHeaderProps, type SidebarItemProps, type SidebarRootProps, Skeleton, type SkeletonProps, Slide, type SlideDirection, type SlideProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackProps, StatusPill, type StatusPillProps, Switch, type SwitchProps, Table, Tabs, Tag, type TagProps, Text, TextGradient, type TextGradientProps, type TextProps, Textarea, type TextareaProps, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeScript, type ThemeScriptProps, Toast, type ToastItem, Toaster, Toggle, ToggleGroup, type ToggleProps, type ToneValue, Toolbar, Tooltip, Provider as TooltipProvider, TopNav, type TopNavItemProps, type TopNavRootProps, addonVariants, alertVariants, avatarGroupVariants, avatarVariants, badgeVariants, bannerVariants, buttonVariants, calloutVariants, cardVariants, chipVariants, cn, containerVariants, headingVariants, iconButtonVariants, inputVariants, inputWrapperVariants, labelVariants, linkVariants, logoVariants, progressFillVariants, progressTrackVariants, ratingVariants, sectionVariants, separatorVariants, skeletonVariants, spinnerVariants, statusPillVariants, tagVariants, textVariants, textareaVariants, toast, toggleVariants, useControllableState, useDisclosure, useIsomorphicLayoutEffect, useMediaQuery, useMergedRefs, useTheme, useToastStore };
|
|
1451
|
+
export { Accordion, Alert, AlertDialog, type AlertProps, Amount, type AmountProps, AppShell, AspectRatio, type AspectRatioProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Breadcrumb, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Callout, type CalloutProps, Card, type CardProps, CheckList, CheckListItem, type CheckListItemProps, type CheckListProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Code, type CodeProps, Collapse, type CollapseProps, Collapsible, Combobox, CommandPalette, type CommandPaletteRootProps, Container, type ContainerProps, ContextMenu, CountryBadge, type CountryBadgeProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, Drawer, type DrawerRootProps, DropdownMenu, EmptyState, ErrorState, type ErrorStateProps, EyebrowChip, type EyebrowChipProps, Fade, type FadeProps, FileUpload, type FileUploadRootProps, FilterChip, type FilterChipProps, Flag, type FlagProps, Flex, type FlexProps, FormError, type FormErrorProps, FormField, type FormFieldContextValue, type FormFieldRootProps, type GlassMode, GradientDivider, type GradientDividerProps, Grid, type GridProps, Heading, type HeadingProps, HelperText, type HelperTextProps, HoverCard, IconButton, type IconButtonProps, Input, type InputProps, Kbd, type KbdProps, KeyboardShortcut, type KeyboardShortcutProps, Label, type LabelProps, Link, type LinkProps, Logo, type LogoProps, Menubar, MoneyInput, type MoneyInputProps, type MotionBaseProps, type MotionDuration, type MotionEasing, NavigationMenu, NavigationRail, type NavigationRailItemProps, type NavigationRailRootProps, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, Progress, type ProgressProps, RadioGroup, Rating, type RatingProps, Scale, type ScaleProps, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Section, type SectionProps, SegmentedControl, type SegmentedControlItemProps, type SegmentedControlProps, Select, Separator, type SeparatorProps, Sheet, Sidebar, type SidebarGroupProps, type SidebarHeaderProps, type SidebarItemProps, type SidebarRootProps, Skeleton, type SkeletonProps, Slide, type SlideDirection, type SlideProps, Slider, type SliderProps, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, Stack, type StackProps, StatusPill, type StatusPillProps, Switch, type SwitchProps, Table, Tabs, Tag, type TagProps, Text, TextGradient, type TextGradientProps, type TextProps, Textarea, type TextareaProps, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeScript, type ThemeScriptProps, Toast, type ToastItem, Toaster, Toggle, ToggleGroup, type ToggleProps, type ToneValue, Toolbar, type ToolbarRootProps, Tooltip, Provider as TooltipProvider, TopNav, type TopNavItemProps, type TopNavRootProps, addonVariants, alertVariants, avatarGroupVariants, avatarVariants, badgeVariants, bannerVariants, buttonVariants, calloutVariants, cardVariants, chipVariants, cn, containerVariants, headingVariants, iconButtonVariants, inputVariants, inputWrapperVariants, labelVariants, linkVariants, logoVariants, progressFillVariants, progressTrackVariants, ratingVariants, sectionVariants, separatorVariants, skeletonVariants, spinnerVariants, statusPillVariants, tagVariants, textVariants, textareaVariants, toast, toggleVariants, useControllableState, useDisclosure, useIsomorphicLayoutEffect, useMediaQuery, useMergedRefs, useTheme, useToastStore };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
Toast,
|
|
4
|
+
Toaster,
|
|
5
|
+
toast,
|
|
6
|
+
useToastStore
|
|
7
|
+
} from "./chunk-TYTW4F3B.js";
|
|
8
|
+
import "./chunk-YJU4ZRQZ.js";
|
|
9
|
+
import {
|
|
10
|
+
ToggleGroup
|
|
11
|
+
} from "./chunk-DYWJ7BIK.js";
|
|
12
|
+
import {
|
|
13
|
+
Toggle,
|
|
14
|
+
toggleVariants
|
|
15
|
+
} from "./chunk-3TMIZQPR.js";
|
|
16
|
+
import {
|
|
17
|
+
Toolbar
|
|
18
|
+
} from "./chunk-2ZBJOUJ7.js";
|
|
2
19
|
import {
|
|
3
20
|
Provider,
|
|
4
21
|
Tooltip
|
|
@@ -10,15 +27,29 @@ import {
|
|
|
10
27
|
Root
|
|
11
28
|
} from "./chunk-ZXLACKEB.js";
|
|
12
29
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
30
|
+
AvatarGroup,
|
|
31
|
+
avatarGroupVariants
|
|
32
|
+
} from "./chunk-QCNLE27O.js";
|
|
33
|
+
import {
|
|
34
|
+
Switch
|
|
35
|
+
} from "./chunk-GHCV6UXG.js";
|
|
36
|
+
import {
|
|
37
|
+
Table
|
|
38
|
+
} from "./chunk-JSD3H7WV.js";
|
|
39
|
+
import {
|
|
40
|
+
Tabs
|
|
41
|
+
} from "./chunk-OJ2TLWYD.js";
|
|
42
|
+
import {
|
|
43
|
+
Tag,
|
|
44
|
+
tagVariants
|
|
45
|
+
} from "./chunk-P44EROBX.js";
|
|
15
46
|
import {
|
|
16
47
|
Text,
|
|
17
48
|
textVariants
|
|
18
49
|
} from "./chunk-7Q7ZF6BY.js";
|
|
19
50
|
import {
|
|
20
51
|
TextGradient
|
|
21
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-HH7EHNOW.js";
|
|
22
53
|
import {
|
|
23
54
|
Textarea,
|
|
24
55
|
textareaVariants
|
|
@@ -29,22 +60,16 @@ import {
|
|
|
29
60
|
useTheme
|
|
30
61
|
} from "./chunk-AEBYQKLS.js";
|
|
31
62
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
useToastStore
|
|
36
|
-
} from "./chunk-TYTW4F3B.js";
|
|
37
|
-
import "./chunk-YJU4ZRQZ.js";
|
|
38
|
-
import {
|
|
39
|
-
ToggleGroup
|
|
40
|
-
} from "./chunk-DYWJ7BIK.js";
|
|
63
|
+
Separator,
|
|
64
|
+
separatorVariants
|
|
65
|
+
} from "./chunk-6RBNM5RO.js";
|
|
41
66
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} from "./chunk-3TMIZQPR.js";
|
|
67
|
+
Sidebar
|
|
68
|
+
} from "./chunk-BFRX6X4O.js";
|
|
45
69
|
import {
|
|
46
|
-
|
|
47
|
-
|
|
70
|
+
Skeleton,
|
|
71
|
+
skeletonVariants
|
|
72
|
+
} from "./chunk-63DPMUMR.js";
|
|
48
73
|
import {
|
|
49
74
|
Slider
|
|
50
75
|
} from "./chunk-TNBBQ7IP.js";
|
|
@@ -52,6 +77,9 @@ import {
|
|
|
52
77
|
Spinner,
|
|
53
78
|
spinnerVariants
|
|
54
79
|
} from "./chunk-RLE5RN3T.js";
|
|
80
|
+
import {
|
|
81
|
+
SplitButton
|
|
82
|
+
} from "./chunk-64JDZWCV.js";
|
|
55
83
|
import {
|
|
56
84
|
Stack
|
|
57
85
|
} from "./chunk-BTRTORKU.js";
|
|
@@ -60,18 +88,17 @@ import {
|
|
|
60
88
|
statusPillVariants
|
|
61
89
|
} from "./chunk-J2T4GFFS.js";
|
|
62
90
|
import {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} from "./chunk-JSD3H7WV.js";
|
|
91
|
+
Progress,
|
|
92
|
+
progressFillVariants,
|
|
93
|
+
progressTrackVariants
|
|
94
|
+
} from "./chunk-2555JXCP.js";
|
|
68
95
|
import {
|
|
69
|
-
|
|
70
|
-
} from "./chunk-
|
|
96
|
+
RadioGroup
|
|
97
|
+
} from "./chunk-6SJPVQQW.js";
|
|
71
98
|
import {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} from "./chunk-
|
|
99
|
+
Rating,
|
|
100
|
+
ratingVariants
|
|
101
|
+
} from "./chunk-I4BHRVRL.js";
|
|
75
102
|
import {
|
|
76
103
|
ScrollArea
|
|
77
104
|
} from "./chunk-EZ23IA3H.js";
|
|
@@ -92,16 +119,17 @@ import {
|
|
|
92
119
|
Select
|
|
93
120
|
} from "./chunk-RTDUTWJ4.js";
|
|
94
121
|
import {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
122
|
+
Collapse,
|
|
123
|
+
Fade,
|
|
124
|
+
Scale,
|
|
125
|
+
Slide
|
|
126
|
+
} from "./chunk-FS4XKWFA.js";
|
|
98
127
|
import {
|
|
99
|
-
|
|
100
|
-
} from "./chunk-
|
|
128
|
+
NavigationMenu
|
|
129
|
+
} from "./chunk-QD7H3WV3.js";
|
|
101
130
|
import {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
} from "./chunk-63DPMUMR.js";
|
|
131
|
+
NavigationRail
|
|
132
|
+
} from "./chunk-5O34ZNC3.js";
|
|
105
133
|
import {
|
|
106
134
|
NumberInput
|
|
107
135
|
} from "./chunk-PQ6GU7SG.js";
|
|
@@ -117,22 +145,7 @@ import {
|
|
|
117
145
|
import {
|
|
118
146
|
Popover
|
|
119
147
|
} from "./chunk-GIGOTRXX.js";
|
|
120
|
-
import
|
|
121
|
-
Progress,
|
|
122
|
-
progressFillVariants,
|
|
123
|
-
progressTrackVariants
|
|
124
|
-
} from "./chunk-2555JXCP.js";
|
|
125
|
-
import {
|
|
126
|
-
RadioGroup
|
|
127
|
-
} from "./chunk-6SJPVQQW.js";
|
|
128
|
-
import {
|
|
129
|
-
Rating,
|
|
130
|
-
ratingVariants,
|
|
131
|
-
useControllableState
|
|
132
|
-
} from "./chunk-UVWCZHLD.js";
|
|
133
|
-
import {
|
|
134
|
-
useIsomorphicLayoutEffect
|
|
135
|
-
} from "./chunk-NHUQLIHL.js";
|
|
148
|
+
import "./chunk-NZ7UK3G6.js";
|
|
136
149
|
import "./chunk-KLTQJZOX.js";
|
|
137
150
|
import {
|
|
138
151
|
KeyboardShortcut
|
|
@@ -153,21 +166,31 @@ import {
|
|
|
153
166
|
Menubar
|
|
154
167
|
} from "./chunk-OJRSPDNJ.js";
|
|
155
168
|
import {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
Scale,
|
|
159
|
-
Slide
|
|
160
|
-
} from "./chunk-FS4XKWFA.js";
|
|
169
|
+
MoneyInput
|
|
170
|
+
} from "./chunk-YPHNHQYQ.js";
|
|
161
171
|
import {
|
|
162
|
-
|
|
163
|
-
} from "./chunk-
|
|
172
|
+
useControllableState
|
|
173
|
+
} from "./chunk-JLUCMNVS.js";
|
|
174
|
+
import {
|
|
175
|
+
useIsomorphicLayoutEffect
|
|
176
|
+
} from "./chunk-NHUQLIHL.js";
|
|
177
|
+
import {
|
|
178
|
+
Input,
|
|
179
|
+
addonVariants,
|
|
180
|
+
inputVariants,
|
|
181
|
+
inputWrapperVariants
|
|
182
|
+
} from "./chunk-IK23Q2OF.js";
|
|
183
|
+
import "./chunk-ADO2DB6Q.js";
|
|
164
184
|
import {
|
|
165
185
|
FormField
|
|
166
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-XI63BK3S.js";
|
|
167
187
|
import {
|
|
168
188
|
Label,
|
|
169
189
|
labelVariants
|
|
170
190
|
} from "./chunk-NIX4SEKM.js";
|
|
191
|
+
import {
|
|
192
|
+
FormError
|
|
193
|
+
} from "./chunk-KM6Z3VTI.js";
|
|
171
194
|
import {
|
|
172
195
|
GradientDivider
|
|
173
196
|
} from "./chunk-I4URNMI7.js";
|
|
@@ -189,13 +212,10 @@ import {
|
|
|
189
212
|
IconButton,
|
|
190
213
|
iconButtonVariants
|
|
191
214
|
} from "./chunk-LZB3KTSH.js";
|
|
192
|
-
import "./chunk-
|
|
215
|
+
import "./chunk-HI7GBSW2.js";
|
|
193
216
|
import {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
inputVariants,
|
|
197
|
-
inputWrapperVariants
|
|
198
|
-
} from "./chunk-IK23Q2OF.js";
|
|
217
|
+
DropdownMenu
|
|
218
|
+
} from "./chunk-7L3CGIRA.js";
|
|
199
219
|
import {
|
|
200
220
|
EmptyState
|
|
201
221
|
} from "./chunk-2FCSWBSM.js";
|
|
@@ -215,10 +235,10 @@ import "./chunk-BV3U3ATL.js";
|
|
|
215
235
|
import {
|
|
216
236
|
Flex
|
|
217
237
|
} from "./chunk-NCRFKPA4.js";
|
|
218
|
-
import "./chunk-ADO2DB6Q.js";
|
|
219
238
|
import {
|
|
220
|
-
|
|
221
|
-
|
|
239
|
+
Container,
|
|
240
|
+
containerVariants
|
|
241
|
+
} from "./chunk-E4JM3HUM.js";
|
|
222
242
|
import {
|
|
223
243
|
ContextMenu
|
|
224
244
|
} from "./chunk-6QLLH6ID.js";
|
|
@@ -245,8 +265,9 @@ import {
|
|
|
245
265
|
Sheet
|
|
246
266
|
} from "./chunk-SY6V3HAK.js";
|
|
247
267
|
import {
|
|
248
|
-
|
|
249
|
-
|
|
268
|
+
Card,
|
|
269
|
+
cardVariants
|
|
270
|
+
} from "./chunk-NMH5WSZG.js";
|
|
250
271
|
import {
|
|
251
272
|
CheckList,
|
|
252
273
|
CheckListItem
|
|
@@ -270,13 +291,8 @@ import {
|
|
|
270
291
|
} from "./chunk-V3TETH4J.js";
|
|
271
292
|
import "./chunk-47UGX37F.js";
|
|
272
293
|
import {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
} from "./chunk-E4JM3HUM.js";
|
|
276
|
-
import {
|
|
277
|
-
AvatarGroup,
|
|
278
|
-
avatarGroupVariants
|
|
279
|
-
} from "./chunk-QCNLE27O.js";
|
|
294
|
+
Accordion
|
|
295
|
+
} from "./chunk-W2NEXOTG.js";
|
|
280
296
|
import {
|
|
281
297
|
Badge,
|
|
282
298
|
badgeVariants
|
|
@@ -292,17 +308,14 @@ import {
|
|
|
292
308
|
Breadcrumb
|
|
293
309
|
} from "./chunk-4SSUM4CL.js";
|
|
294
310
|
import "./chunk-P26VJEIW.js";
|
|
311
|
+
import "./chunk-LVPU7455.js";
|
|
312
|
+
import {
|
|
313
|
+
ButtonGroup
|
|
314
|
+
} from "./chunk-LGQ737BP.js";
|
|
295
315
|
import {
|
|
296
316
|
Callout,
|
|
297
317
|
calloutVariants
|
|
298
318
|
} from "./chunk-XR4NBY54.js";
|
|
299
|
-
import {
|
|
300
|
-
Card,
|
|
301
|
-
cardVariants
|
|
302
|
-
} from "./chunk-NMH5WSZG.js";
|
|
303
|
-
import {
|
|
304
|
-
Accordion
|
|
305
|
-
} from "./chunk-W2NEXOTG.js";
|
|
306
319
|
import {
|
|
307
320
|
Alert,
|
|
308
321
|
alertVariants
|
|
@@ -317,6 +330,10 @@ import {
|
|
|
317
330
|
} from "./chunk-LMPGHWUA.js";
|
|
318
331
|
import "./chunk-7SXR4PGO.js";
|
|
319
332
|
import "./chunk-DEIBF3P7.js";
|
|
333
|
+
import {
|
|
334
|
+
Amount
|
|
335
|
+
} from "./chunk-AXOKFS4K.js";
|
|
336
|
+
import "./chunk-CIQHFMF6.js";
|
|
320
337
|
import {
|
|
321
338
|
AppShell
|
|
322
339
|
} from "./chunk-56FERRWW.js";
|
|
@@ -366,6 +383,7 @@ export {
|
|
|
366
383
|
Accordion,
|
|
367
384
|
Alert,
|
|
368
385
|
AlertDialog,
|
|
386
|
+
Amount,
|
|
369
387
|
AppShell,
|
|
370
388
|
AspectRatio,
|
|
371
389
|
Autocomplete,
|
|
@@ -420,7 +438,9 @@ export {
|
|
|
420
438
|
Link,
|
|
421
439
|
Logo,
|
|
422
440
|
Menubar,
|
|
441
|
+
MoneyInput,
|
|
423
442
|
NavigationMenu,
|
|
443
|
+
NavigationRail,
|
|
424
444
|
NumberInput,
|
|
425
445
|
PageHeader,
|
|
426
446
|
Pagination,
|
|
@@ -442,6 +462,7 @@ export {
|
|
|
442
462
|
Slide,
|
|
443
463
|
Slider,
|
|
444
464
|
Spinner,
|
|
465
|
+
SplitButton,
|
|
445
466
|
Stack,
|
|
446
467
|
StatusPill,
|
|
447
468
|
Switch,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexub/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "React component library for Nexub Design System — 90+ accessible, themeable UI components built on Radix UI primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"date-fns": "^4.1.0",
|
|
68
68
|
"react-day-picker": "^9.14.0",
|
|
69
69
|
"tailwind-merge": "^2.5.4",
|
|
70
|
-
"@nexub/icons": "1.
|
|
70
|
+
"@nexub/icons": "1.5.1"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": ">=18 <20",
|
|
74
74
|
"react-dom": ">=18 <20",
|
|
75
|
-
"@nexub/tokens": "^1.
|
|
75
|
+
"@nexub/tokens": "^1.5.1"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@playwright/test": "1.64.0",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"typescript": "^5.6.3",
|
|
97
97
|
"vaul": "1.1.2",
|
|
98
98
|
"vitest": "^2.1.8",
|
|
99
|
-
"@nexub/themes": "1.
|
|
100
|
-
"@nexub/tokens": "1.
|
|
99
|
+
"@nexub/themes": "1.5.1",
|
|
100
|
+
"@nexub/tokens": "1.5.1"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"build": "tsup && node scripts/check-dts.mjs",
|
|
File without changes
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Label
|
|
4
4
|
} from "./chunk-NIX4SEKM.js";
|
|
5
|
-
import {
|
|
6
|
-
HelperText
|
|
7
|
-
} from "./chunk-UMC64NCT.js";
|
|
8
5
|
import {
|
|
9
6
|
FormError
|
|
10
7
|
} from "./chunk-KM6Z3VTI.js";
|
|
8
|
+
import {
|
|
9
|
+
HelperText
|
|
10
|
+
} from "./chunk-UMC64NCT.js";
|
|
11
11
|
import {
|
|
12
12
|
cn
|
|
13
13
|
} from "./chunk-Q7G5WGYV.js";
|