@nexub/react 1.4.0 → 1.5.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/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-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/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/Toolbar/index.js +2 -1
- package/dist/index.d.ts +82 -3
- package/dist/index.js +82 -61
- package/package.json +5 -5
- /package/dist/{chunk-VTL3GJJG.js → chunk-7L3CGIRA.js} +0 -0
|
@@ -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
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import {
|
|
3
|
+
ToggleGroup
|
|
4
|
+
} from "./chunk-DYWJ7BIK.js";
|
|
5
|
+
import {
|
|
6
|
+
Toolbar
|
|
7
|
+
} from "./chunk-2ZBJOUJ7.js";
|
|
2
8
|
import {
|
|
3
9
|
Provider,
|
|
4
10
|
Tooltip
|
|
@@ -9,9 +15,21 @@ import {
|
|
|
9
15
|
import {
|
|
10
16
|
Root
|
|
11
17
|
} from "./chunk-ZXLACKEB.js";
|
|
18
|
+
import "./chunk-IZ6ZPEZ2.js";
|
|
12
19
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
Container,
|
|
21
|
+
containerVariants
|
|
22
|
+
} from "./chunk-E4JM3HUM.js";
|
|
23
|
+
import {
|
|
24
|
+
ContextMenu
|
|
25
|
+
} from "./chunk-6QLLH6ID.js";
|
|
26
|
+
import {
|
|
27
|
+
Tabs
|
|
28
|
+
} from "./chunk-OJ2TLWYD.js";
|
|
29
|
+
import {
|
|
30
|
+
Tag,
|
|
31
|
+
tagVariants
|
|
32
|
+
} from "./chunk-P44EROBX.js";
|
|
15
33
|
import {
|
|
16
34
|
Text,
|
|
17
35
|
textVariants
|
|
@@ -35,16 +53,14 @@ import {
|
|
|
35
53
|
useToastStore
|
|
36
54
|
} from "./chunk-TYTW4F3B.js";
|
|
37
55
|
import "./chunk-YJU4ZRQZ.js";
|
|
38
|
-
import {
|
|
39
|
-
ToggleGroup
|
|
40
|
-
} from "./chunk-DYWJ7BIK.js";
|
|
41
56
|
import {
|
|
42
57
|
Toggle,
|
|
43
58
|
toggleVariants
|
|
44
59
|
} from "./chunk-3TMIZQPR.js";
|
|
45
60
|
import {
|
|
46
|
-
|
|
47
|
-
|
|
61
|
+
Skeleton,
|
|
62
|
+
skeletonVariants
|
|
63
|
+
} from "./chunk-63DPMUMR.js";
|
|
48
64
|
import {
|
|
49
65
|
Slider
|
|
50
66
|
} from "./chunk-TNBBQ7IP.js";
|
|
@@ -52,6 +68,9 @@ import {
|
|
|
52
68
|
Spinner,
|
|
53
69
|
spinnerVariants
|
|
54
70
|
} from "./chunk-RLE5RN3T.js";
|
|
71
|
+
import {
|
|
72
|
+
SplitButton
|
|
73
|
+
} from "./chunk-64JDZWCV.js";
|
|
55
74
|
import {
|
|
56
75
|
Stack
|
|
57
76
|
} from "./chunk-BTRTORKU.js";
|
|
@@ -66,12 +85,9 @@ import {
|
|
|
66
85
|
Table
|
|
67
86
|
} from "./chunk-JSD3H7WV.js";
|
|
68
87
|
import {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Tag,
|
|
73
|
-
tagVariants
|
|
74
|
-
} from "./chunk-P44EROBX.js";
|
|
88
|
+
Rating,
|
|
89
|
+
ratingVariants
|
|
90
|
+
} from "./chunk-I4BHRVRL.js";
|
|
75
91
|
import {
|
|
76
92
|
ScrollArea
|
|
77
93
|
} from "./chunk-EZ23IA3H.js";
|
|
@@ -99,9 +115,8 @@ import {
|
|
|
99
115
|
Sidebar
|
|
100
116
|
} from "./chunk-BFRX6X4O.js";
|
|
101
117
|
import {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
} from "./chunk-63DPMUMR.js";
|
|
118
|
+
NavigationRail
|
|
119
|
+
} from "./chunk-5O34ZNC3.js";
|
|
105
120
|
import {
|
|
106
121
|
NumberInput
|
|
107
122
|
} from "./chunk-PQ6GU7SG.js";
|
|
@@ -125,21 +140,9 @@ import {
|
|
|
125
140
|
import {
|
|
126
141
|
RadioGroup
|
|
127
142
|
} 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";
|
|
136
|
-
import "./chunk-KLTQJZOX.js";
|
|
137
143
|
import {
|
|
138
144
|
KeyboardShortcut
|
|
139
145
|
} from "./chunk-HG6HTUWU.js";
|
|
140
|
-
import {
|
|
141
|
-
Kbd
|
|
142
|
-
} from "./chunk-A4IMFAZX.js";
|
|
143
146
|
import "./chunk-EV43I5J6.js";
|
|
144
147
|
import {
|
|
145
148
|
Link,
|
|
@@ -152,6 +155,15 @@ import {
|
|
|
152
155
|
import {
|
|
153
156
|
Menubar
|
|
154
157
|
} from "./chunk-OJRSPDNJ.js";
|
|
158
|
+
import {
|
|
159
|
+
MoneyInput
|
|
160
|
+
} from "./chunk-YPHNHQYQ.js";
|
|
161
|
+
import {
|
|
162
|
+
useControllableState
|
|
163
|
+
} from "./chunk-JLUCMNVS.js";
|
|
164
|
+
import {
|
|
165
|
+
useIsomorphicLayoutEffect
|
|
166
|
+
} from "./chunk-NHUQLIHL.js";
|
|
155
167
|
import {
|
|
156
168
|
Collapse,
|
|
157
169
|
Fade,
|
|
@@ -161,13 +173,6 @@ import {
|
|
|
161
173
|
import {
|
|
162
174
|
NavigationMenu
|
|
163
175
|
} from "./chunk-QD7H3WV3.js";
|
|
164
|
-
import {
|
|
165
|
-
FormField
|
|
166
|
-
} from "./chunk-OASFXI27.js";
|
|
167
|
-
import {
|
|
168
|
-
Label,
|
|
169
|
-
labelVariants
|
|
170
|
-
} from "./chunk-NIX4SEKM.js";
|
|
171
176
|
import {
|
|
172
177
|
GradientDivider
|
|
173
178
|
} from "./chunk-I4URNMI7.js";
|
|
@@ -179,9 +184,6 @@ import {
|
|
|
179
184
|
headingVariants
|
|
180
185
|
} from "./chunk-SVQCINRE.js";
|
|
181
186
|
import "./chunk-PICMOOAZ.js";
|
|
182
|
-
import {
|
|
183
|
-
HelperText
|
|
184
|
-
} from "./chunk-UMC64NCT.js";
|
|
185
187
|
import {
|
|
186
188
|
HoverCard
|
|
187
189
|
} from "./chunk-5URGARPH.js";
|
|
@@ -196,9 +198,10 @@ import {
|
|
|
196
198
|
inputVariants,
|
|
197
199
|
inputWrapperVariants
|
|
198
200
|
} from "./chunk-IK23Q2OF.js";
|
|
201
|
+
import "./chunk-KLTQJZOX.js";
|
|
199
202
|
import {
|
|
200
|
-
|
|
201
|
-
} from "./chunk-
|
|
203
|
+
Kbd
|
|
204
|
+
} from "./chunk-A4IMFAZX.js";
|
|
202
205
|
import {
|
|
203
206
|
ErrorState
|
|
204
207
|
} from "./chunk-72I7EVOL.js";
|
|
@@ -216,12 +219,19 @@ import {
|
|
|
216
219
|
Flex
|
|
217
220
|
} from "./chunk-NCRFKPA4.js";
|
|
218
221
|
import "./chunk-ADO2DB6Q.js";
|
|
222
|
+
import {
|
|
223
|
+
FormField
|
|
224
|
+
} from "./chunk-OASFXI27.js";
|
|
225
|
+
import {
|
|
226
|
+
Label,
|
|
227
|
+
labelVariants
|
|
228
|
+
} from "./chunk-NIX4SEKM.js";
|
|
229
|
+
import {
|
|
230
|
+
HelperText
|
|
231
|
+
} from "./chunk-UMC64NCT.js";
|
|
219
232
|
import {
|
|
220
233
|
FormError
|
|
221
234
|
} from "./chunk-KM6Z3VTI.js";
|
|
222
|
-
import {
|
|
223
|
-
ContextMenu
|
|
224
|
-
} from "./chunk-6QLLH6ID.js";
|
|
225
235
|
import {
|
|
226
236
|
CountryBadge
|
|
227
237
|
} from "./chunk-PWBPHGM3.js";
|
|
@@ -244,9 +254,17 @@ import {
|
|
|
244
254
|
Drawer,
|
|
245
255
|
Sheet
|
|
246
256
|
} from "./chunk-SY6V3HAK.js";
|
|
257
|
+
import "./chunk-HI7GBSW2.js";
|
|
247
258
|
import {
|
|
248
259
|
DropdownMenu
|
|
249
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-7L3CGIRA.js";
|
|
261
|
+
import {
|
|
262
|
+
EmptyState
|
|
263
|
+
} from "./chunk-2FCSWBSM.js";
|
|
264
|
+
import {
|
|
265
|
+
Card,
|
|
266
|
+
cardVariants
|
|
267
|
+
} from "./chunk-NMH5WSZG.js";
|
|
250
268
|
import {
|
|
251
269
|
CheckList,
|
|
252
270
|
CheckListItem
|
|
@@ -269,14 +287,14 @@ import {
|
|
|
269
287
|
CommandPalette
|
|
270
288
|
} from "./chunk-V3TETH4J.js";
|
|
271
289
|
import "./chunk-47UGX37F.js";
|
|
272
|
-
import {
|
|
273
|
-
Container,
|
|
274
|
-
containerVariants
|
|
275
|
-
} from "./chunk-E4JM3HUM.js";
|
|
276
290
|
import {
|
|
277
291
|
AvatarGroup,
|
|
278
292
|
avatarGroupVariants
|
|
279
293
|
} from "./chunk-QCNLE27O.js";
|
|
294
|
+
import {
|
|
295
|
+
Avatar,
|
|
296
|
+
avatarVariants
|
|
297
|
+
} from "./chunk-FHFVBOF3.js";
|
|
280
298
|
import {
|
|
281
299
|
Badge,
|
|
282
300
|
badgeVariants
|
|
@@ -292,21 +310,17 @@ import {
|
|
|
292
310
|
Breadcrumb
|
|
293
311
|
} from "./chunk-4SSUM4CL.js";
|
|
294
312
|
import "./chunk-P26VJEIW.js";
|
|
313
|
+
import "./chunk-LVPU7455.js";
|
|
314
|
+
import {
|
|
315
|
+
ButtonGroup
|
|
316
|
+
} from "./chunk-LGQ737BP.js";
|
|
295
317
|
import {
|
|
296
318
|
Callout,
|
|
297
319
|
calloutVariants
|
|
298
320
|
} from "./chunk-XR4NBY54.js";
|
|
299
|
-
import {
|
|
300
|
-
Card,
|
|
301
|
-
cardVariants
|
|
302
|
-
} from "./chunk-NMH5WSZG.js";
|
|
303
321
|
import {
|
|
304
322
|
Accordion
|
|
305
323
|
} from "./chunk-W2NEXOTG.js";
|
|
306
|
-
import {
|
|
307
|
-
Alert,
|
|
308
|
-
alertVariants
|
|
309
|
-
} from "./chunk-IIPYF6ZQ.js";
|
|
310
324
|
import {
|
|
311
325
|
AlertDialog
|
|
312
326
|
} from "./chunk-RHOYF7MO.js";
|
|
@@ -317,6 +331,14 @@ import {
|
|
|
317
331
|
} from "./chunk-LMPGHWUA.js";
|
|
318
332
|
import "./chunk-7SXR4PGO.js";
|
|
319
333
|
import "./chunk-DEIBF3P7.js";
|
|
334
|
+
import {
|
|
335
|
+
Alert,
|
|
336
|
+
alertVariants
|
|
337
|
+
} from "./chunk-IIPYF6ZQ.js";
|
|
338
|
+
import {
|
|
339
|
+
Amount
|
|
340
|
+
} from "./chunk-AXOKFS4K.js";
|
|
341
|
+
import "./chunk-CIQHFMF6.js";
|
|
320
342
|
import {
|
|
321
343
|
AppShell
|
|
322
344
|
} from "./chunk-56FERRWW.js";
|
|
@@ -329,11 +351,6 @@ import {
|
|
|
329
351
|
import {
|
|
330
352
|
Combobox
|
|
331
353
|
} from "./chunk-Z3IG5WRA.js";
|
|
332
|
-
import "./chunk-IZ6ZPEZ2.js";
|
|
333
|
-
import {
|
|
334
|
-
Avatar,
|
|
335
|
-
avatarVariants
|
|
336
|
-
} from "./chunk-FHFVBOF3.js";
|
|
337
354
|
import {
|
|
338
355
|
cn
|
|
339
356
|
} from "./chunk-Q7G5WGYV.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.0",
|
|
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.0"
|
|
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.0"
|
|
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.0",
|
|
100
|
+
"@nexub/tokens": "1.5.0"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|
|
103
103
|
"build": "tsup && node scripts/check-dts.mjs",
|
|
File without changes
|