@refraction-ui/react 0.12.1 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{applicationinsights-web-62HUCH3W.js → applicationinsights-web-H7OBLIVJ.js} +199 -68
- package/dist/applicationinsights-web-H7OBLIVJ.js.map +1 -0
- package/dist/index.cjs +236 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -9
- package/dist/index.js.map +1 -1
- package/dist/internal/button/index.d.cts +12 -3
- package/dist/internal/button/index.d.ts +12 -3
- package/dist/internal/react-status-indicator/index.d.cts +5 -18
- package/dist/internal/react-status-indicator/index.d.ts +5 -18
- package/dist/internal/react-theme/index.d.cts +19 -1
- package/dist/internal/react-theme/index.d.ts +19 -1
- package/dist/internal/theme/index.d.cts +35 -1
- package/dist/internal/theme/index.d.ts +35 -1
- package/dist/theme.cjs +27 -4
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.js +27 -4
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/dist/applicationinsights-web-62HUCH3W.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -662,6 +662,13 @@ var Breadcrumbs = React11.forwardRef(
|
|
|
662
662
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
663
663
|
|
|
664
664
|
// ../button/dist/index.js
|
|
665
|
+
var BUTTON_VARIANT_ALIASES = {
|
|
666
|
+
primary: "default"
|
|
667
|
+
};
|
|
668
|
+
function resolveButtonVariant(variant) {
|
|
669
|
+
if (!variant) return variant;
|
|
670
|
+
return BUTTON_VARIANT_ALIASES[variant] ?? variant;
|
|
671
|
+
}
|
|
665
672
|
function createButton(props = {}) {
|
|
666
673
|
const { disabled = false, loading = false } = props;
|
|
667
674
|
const isInteractive = !disabled && !loading;
|
|
@@ -710,6 +717,10 @@ var buttonVariants = cva({
|
|
|
710
717
|
variants: {
|
|
711
718
|
variant: {
|
|
712
719
|
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
720
|
+
// Alias for `default` — see resolveButtonVariant + issue #201. Same classes
|
|
721
|
+
// so styling stays identical even if a consumer reaches into `buttonVariants`
|
|
722
|
+
// directly without going through resolveButtonVariant.
|
|
723
|
+
primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
713
724
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
714
725
|
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
715
726
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
@@ -1019,8 +1030,9 @@ function ShortcutBadge({ keys, platform = true, className }) {
|
|
|
1019
1030
|
ShortcutBadge.displayName = "ShortcutBadge";
|
|
1020
1031
|
var Button = React11.forwardRef(
|
|
1021
1032
|
({ variant, size, loading, asChild, className, disabled, children, shortcut, action, ...props }, ref) => {
|
|
1033
|
+
const resolvedVariant = resolveButtonVariant(variant);
|
|
1022
1034
|
const api = createButton({ disabled, loading, type: props.type });
|
|
1023
|
-
const classes = cn(buttonVariants({ variant, size }), className);
|
|
1035
|
+
const classes = cn(buttonVariants({ variant: resolvedVariant, size }), className);
|
|
1024
1036
|
const internalRef = React11.useRef(null);
|
|
1025
1037
|
const mergedRef = React11.useCallback(
|
|
1026
1038
|
(node) => {
|
|
@@ -3688,7 +3700,11 @@ ${sel}
|
|
|
3688
3700
|
h(
|
|
3689
3701
|
"div",
|
|
3690
3702
|
{
|
|
3691
|
-
className:
|
|
3703
|
+
className: (
|
|
3704
|
+
// Subtle focus: slight border darkening + a soft shadow lift — no
|
|
3705
|
+
// bright colored ring (matches Claude/ChatGPT).
|
|
3706
|
+
"overflow-hidden rounded-2xl border border-border bg-background shadow-sm transition-shadow focus-within:border-foreground/25 focus-within:shadow-md"
|
|
3707
|
+
)
|
|
3692
3708
|
},
|
|
3693
3709
|
// error banner
|
|
3694
3710
|
error ? h(
|
|
@@ -14010,22 +14026,36 @@ var statusPulseVariants = cva({
|
|
|
14010
14026
|
}
|
|
14011
14027
|
});
|
|
14012
14028
|
var statusLabelStyles = "text-sm text-muted-foreground";
|
|
14013
|
-
|
|
14014
|
-
|
|
14029
|
+
function deriveAriaLabel(label, children, fallback) {
|
|
14030
|
+
if (label) return label;
|
|
14031
|
+
if (typeof children === "string" || typeof children === "number") {
|
|
14032
|
+
return String(children);
|
|
14033
|
+
}
|
|
14034
|
+
return fallback;
|
|
14035
|
+
}
|
|
14015
14036
|
function StatusIndicator({
|
|
14016
14037
|
type,
|
|
14017
14038
|
label,
|
|
14039
|
+
children,
|
|
14018
14040
|
pulse,
|
|
14019
14041
|
showLabel = true,
|
|
14020
14042
|
className
|
|
14021
14043
|
}) {
|
|
14022
14044
|
const api = createStatusIndicator({ type, label, pulse });
|
|
14045
|
+
const ariaLabel = deriveAriaLabel(label, children, api.label);
|
|
14046
|
+
const visibleLabel = label ?? children ?? api.label;
|
|
14023
14047
|
const dotClassName = api.pulse ? statusPulseVariants({ type }) : statusDotVariants({ type });
|
|
14024
|
-
return
|
|
14048
|
+
return /* @__PURE__ */ jsxs(
|
|
14025
14049
|
"span",
|
|
14026
|
-
{
|
|
14027
|
-
|
|
14028
|
-
|
|
14050
|
+
{
|
|
14051
|
+
...api.ariaProps,
|
|
14052
|
+
"aria-label": ariaLabel,
|
|
14053
|
+
className: cn(statusContainerStyles, className),
|
|
14054
|
+
children: [
|
|
14055
|
+
/* @__PURE__ */ jsx("span", { className: dotClassName }),
|
|
14056
|
+
showLabel && /* @__PURE__ */ jsx("span", { className: statusLabelStyles, children: visibleLabel })
|
|
14057
|
+
]
|
|
14058
|
+
}
|
|
14029
14059
|
);
|
|
14030
14060
|
}
|
|
14031
14061
|
StatusIndicator.displayName = "StatusIndicator";
|
|
@@ -16458,7 +16488,7 @@ function createClientSdkSink(opts) {
|
|
|
16458
16488
|
}
|
|
16459
16489
|
const mod = await import(
|
|
16460
16490
|
/* @vite-ignore */
|
|
16461
|
-
'./applicationinsights-web-
|
|
16491
|
+
'./applicationinsights-web-H7OBLIVJ.js'
|
|
16462
16492
|
);
|
|
16463
16493
|
const ai = new mod.ApplicationInsights({
|
|
16464
16494
|
config: {
|