@moontra/moonui 6.24.0 → 6.26.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/cdn/moonui.css +2 -2
- package/dist/cdn/moonui.esm.js +12 -12
- package/dist/cdn/moonui.global.js +12 -12
- package/dist/index.d.mts +24 -6
- package/dist/index.d.ts +24 -6
- package/dist/index.js +436 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +437 -95
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/issue-544-kontrast.test.tsx +153 -145
- package/src/__tests__/issue-645-overlay-tab-focus.test.tsx +262 -0
- package/src/__tests__/issue-646-dark-scope-override.test.tsx +297 -0
- package/src/__tests__/issue-661-a11y.test.tsx +113 -0
- package/src/__tests__/issue-661-token-kontrast.test.tsx +82 -0
- package/src/components/ui/__tests__/accent-foreground-contrast.test.ts +197 -0
- package/src/components/ui/__tests__/accordion.test.tsx +6 -4
- package/src/components/ui/__tests__/alert.test.tsx +4 -1
- package/src/components/ui/__tests__/button.test.tsx +6 -1
- package/src/components/ui/__tests__/dark-token-contrast.test.ts +18 -18
- package/src/components/ui/__tests__/heading-level-policy.test.tsx +4 -4
- package/src/components/ui/__tests__/issue-643-card-token-parite.test.tsx +113 -0
- package/src/components/ui/__tests__/issue-649-button-aschild.test.tsx +199 -0
- package/src/components/ui/__tests__/issue-664-separator-dekoratif-rol.test.tsx +41 -0
- package/src/components/ui/__tests__/preset-color-shadowing.test.ts +10 -10
- package/src/components/ui/__tests__/primary-subtle-token.test.ts +7 -7
- package/src/components/ui/__tests__/progress-secondary-contrast.test.ts +38 -38
- package/src/components/ui/__tests__/progress-warning-error-contrast.test.ts +64 -64
- package/src/components/ui/__tests__/quality-group-de.test.tsx +2 -2
- package/src/components/ui/__tests__/responsive-color-invariance.test.ts +20 -20
- package/src/components/ui/__tests__/select.test.tsx +6 -1
- package/src/components/ui/__tests__/semantic-token-usage.test.ts +23 -23
- package/src/components/ui/__tests__/size-scale-convention.test.ts +10 -10
- package/src/components/ui/__tests__/slider-accent-contrast.test.ts +142 -136
- package/src/components/ui/__tests__/slider-secondary-contrast.test.ts +60 -60
- package/src/components/ui/__tests__/slider-warning-error-contrast.test.ts +100 -100
- package/src/components/ui/__tests__/switch-variant-contrast.test.tsx +103 -103
- package/src/components/ui/__tests__/tooltip.test.tsx +122 -0
- package/src/components/ui/accordion.tsx +16 -3
- package/src/components/ui/alert.tsx +1 -1
- package/src/components/ui/badge.tsx +12 -1
- package/src/components/ui/button.tsx +95 -24
- package/src/components/ui/card.tsx +59 -5
- package/src/components/ui/dropdown-menu.tsx +99 -5
- package/src/components/ui/file-upload.tsx +4 -0
- package/src/components/ui/index.ts +4 -1
- package/src/components/ui/popover-pro.tsx +41 -0
- package/src/components/ui/popover.tsx +162 -7
- package/src/components/ui/rating.tsx +24 -2
- package/src/components/ui/select.tsx +4 -4
- package/src/components/ui/simple-editor.tsx +3 -18
- package/src/components/ui/tabs.tsx +16 -1
- package/src/components/ui/textarea.tsx +6 -1
- package/src/components/ui/toast.tsx +17 -2
- package/src/components/ui/tooltip.tsx +154 -2
- package/src/styles/tokens.css +34 -2
package/dist/index.js
CHANGED
|
@@ -95,7 +95,7 @@ var AccordionItem = React12__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
95
95
|
AccordionPrimitive__namespace.Item,
|
|
96
96
|
{
|
|
97
97
|
ref,
|
|
98
|
-
className: cn("moonui-theme", "border-b border-
|
|
98
|
+
className: cn("moonui-theme", "border-b border-border", className),
|
|
99
99
|
...props
|
|
100
100
|
}
|
|
101
101
|
));
|
|
@@ -105,7 +105,9 @@ var AccordionTrigger = React12__namespace.forwardRef(({ className, children, ...
|
|
|
105
105
|
{
|
|
106
106
|
ref,
|
|
107
107
|
className: cn(
|
|
108
|
-
|
|
108
|
+
// #661-17: `dark:text-gray-100` KALDIRILDI — tetikleyici artık iki temada
|
|
109
|
+
// da `--foreground`u miras alır (koyu temada 213 31% 91% ≈ gray-100).
|
|
110
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all",
|
|
109
111
|
"hover:underline hover:text-primary",
|
|
110
112
|
"[&[data-state=open]>svg]:rotate-180",
|
|
111
113
|
className
|
|
@@ -123,7 +125,13 @@ var AccordionContent = React12__namespace.forwardRef(({ className, children, ...
|
|
|
123
125
|
{
|
|
124
126
|
ref,
|
|
125
127
|
className: cn(
|
|
126
|
-
|
|
128
|
+
// #661-17: ham `text-gray-700 dark:text-gray-300` → `text-foreground/80`.
|
|
129
|
+
// Ölçüldü (iki tema, kart zemini): açık 10.30 → 11.48, koyu 12.19 → 9.44.
|
|
130
|
+
// İkisi de AA'nın (4.5) çok üstünde, yani eşik geçilmiyor — `#545 ihlal
|
|
131
|
+
// takası` sınıfı bir gerileme YOK. `text-muted-foreground` bilerek
|
|
132
|
+
// SEÇİLMEDİ: açık temada 4.76'ya inip gövde metnini görünür biçimde
|
|
133
|
+
// soldururdu (§9 estetik değişiklik olurdu).
|
|
134
|
+
"overflow-hidden text-sm text-foreground/80 transition-all",
|
|
127
135
|
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
128
136
|
className
|
|
129
137
|
),
|
|
@@ -140,7 +148,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
140
148
|
default: "bg-background text-foreground border-border",
|
|
141
149
|
primary: "bg-primary/10 text-primary border-primary/30",
|
|
142
150
|
success: "bg-success/10 text-success border-success/30",
|
|
143
|
-
warning: "bg-warning/10 text-warning border-warning/30",
|
|
151
|
+
warning: "bg-warning/10 text-warning-subtle-foreground border-warning/30",
|
|
144
152
|
error: "bg-destructive/10 text-destructive border-destructive/30",
|
|
145
153
|
// `--info` token'ı (tokens.css) blue-500 ile birebir aynı değeri
|
|
146
154
|
// taşır → görsel değişiklik yok, ancak varyant artık temaya ve
|
|
@@ -428,11 +436,22 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
428
436
|
// aynı varyant pro pakette token'lıydı → free ve pro `primary` için
|
|
429
437
|
// farklı renk üretiyordu. Artık token'a bağlı (tema/karanlık moda duyarlı).
|
|
430
438
|
// `primary` VARSAYILAN varyant olduğu için görünür bir renk değişimidir.
|
|
439
|
+
// #646: `dark:bg-primary/90` KALDIRILDI. `primary` VARSAYILAN varyant olduğu
|
|
440
|
+
// için varyant verilmeyen HER `<Badge>` bu sınıfı alıyordu; `tailwind-merge`
|
|
441
|
+
// `dark:` önekli arka planı tüketicinin ÖNEKSİZ `bg-*` sınıfıyla aynı grupta
|
|
442
|
+
// görmediğinden ikisi birden hayatta kalıyor ve koyu temada `dark:` özgüllükle
|
|
443
|
+
// kazanıyordu. Sonuç: `<Badge className="bg-green-500/20 text-green-300">`
|
|
444
|
+
// koyu temada near-white zemin + açık yeşil metin = 1.10:1 (ölçüldü,
|
|
445
|
+
// magnetic-button "Pending"; swipe-actions'ta 6 rozet 1.10–1.48 aralığında).
|
|
446
|
+
// ÖNEKSİZ `bg-primary` bırakıldı: tüketici sınıfıyla AYNI grupta çakışır ve
|
|
447
|
+
// doğru şekilde ezilir. Rozetin kendi görünümü BOZULMAZ — koyu temada
|
|
448
|
+
// `bg-primary` + `text-primary-foreground` 16.16 → 19.80'e çıkar
|
|
449
|
+
// (yarı saydamlık kalktığı için); açık temada değişiklik yok.
|
|
431
450
|
primary: [
|
|
432
451
|
"border-transparent bg-primary text-primary-foreground",
|
|
433
452
|
"hover:bg-primary/90",
|
|
434
453
|
"focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40",
|
|
435
|
-
"dark:
|
|
454
|
+
"dark:shadow-inner dark:shadow-primary/10"
|
|
436
455
|
],
|
|
437
456
|
secondary: [
|
|
438
457
|
"border-transparent bg-secondary text-secondary-foreground",
|
|
@@ -854,10 +873,15 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
854
873
|
"transition-all duration-200"
|
|
855
874
|
],
|
|
856
875
|
success: [
|
|
876
|
+
// Koyu temada `--success` (#16a34a) foreground'uyla 3.15 veriyordu (AA 4.5
|
|
877
|
+
// ister) — `--destructive`in #544'teki birebir aynı kusuru. Açık tema
|
|
878
|
+
// dokunulmadı (#442 kuralı: geçen yüzeyde regresyon riski açma).
|
|
879
|
+
// Dolgu opak `success` skalasına bağlandı: -600 hâlâ 3.15, ölçümle geçen
|
|
880
|
+
// en açık kademe -700 (4.79).
|
|
857
881
|
"bg-success text-success-foreground",
|
|
858
|
-
"dark:bg-success dark:text-success-foreground",
|
|
859
|
-
"hover:bg-success/90 dark:hover:bg-success
|
|
860
|
-
"active:bg-success/80 dark:active:bg-success
|
|
882
|
+
"dark:bg-success-700 dark:text-success-foreground",
|
|
883
|
+
"hover:bg-success/90 dark:hover:bg-success-800",
|
|
884
|
+
"active:bg-success/80 dark:active:bg-success-900",
|
|
861
885
|
"shadow-sm hover:shadow-md",
|
|
862
886
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
863
887
|
"transition-all duration-200"
|
|
@@ -879,11 +903,16 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
879
903
|
"transition-all duration-300"
|
|
880
904
|
],
|
|
881
905
|
glow: [
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
"
|
|
886
|
-
|
|
906
|
+
// blue-500 (#3b82f6) beyaz metinle 3.68 veriyordu (AA 4.5 ister).
|
|
907
|
+
// Ölçümle geçen en açık kademe blue-600 (#2563eb → 5.17); parıltı
|
|
908
|
+
// gölgesi `--glow-blue-rgb` üzerinden AYNI kaldı, yalnız dolgu koyulaştı.
|
|
909
|
+
"bg-blue-600 text-white",
|
|
910
|
+
// #664 S3: rgba(59,130,246,…) → --glow-blue-rgb (tokens.css). Değer AYNI
|
|
911
|
+
// (Tailwind blue-500), yalnız merkezi token'a taşındı — görsel değişiklik yok.
|
|
912
|
+
"shadow-[0_0_30px_rgba(var(--glow-blue-rgb),0.5)]",
|
|
913
|
+
"hover:shadow-[0_0_40px_rgba(var(--glow-blue-rgb),0.7)]",
|
|
914
|
+
"active:shadow-[0_0_20px_rgba(var(--glow-blue-rgb),0.4)]",
|
|
915
|
+
"hover:bg-blue-700",
|
|
887
916
|
"focus-visible:ring-blue-500/50",
|
|
888
917
|
"transition-all duration-300"
|
|
889
918
|
],
|
|
@@ -892,7 +921,12 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
892
921
|
"hover:bg-primary/20",
|
|
893
922
|
"active:bg-primary/30",
|
|
894
923
|
"focus-visible:ring-primary/50",
|
|
895
|
-
|
|
924
|
+
// Koyu temada `bg-primary/20` + `text-primary-foreground` 1.76 veriyordu:
|
|
925
|
+
// dark `--primary` neredeyse beyaz olduğu için /20 açık-gri bir zemin
|
|
926
|
+
// üretiyor, `--primary-foreground` ise koyu — ikisi birbirini yiyordu.
|
|
927
|
+
// #354'ün sidebar'da kanıtlanmış çözümü: subtle token ÇİFTİ (zemin+metin
|
|
928
|
+
// birlikte tanımlı, koyu temada koyu zemin + açık metin).
|
|
929
|
+
"dark:bg-primary-subtle dark:text-primary-subtle-foreground",
|
|
896
930
|
"dark:hover:bg-primary/30 dark:active:bg-primary/40",
|
|
897
931
|
"transition-colors duration-200"
|
|
898
932
|
],
|
|
@@ -911,8 +945,9 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
911
945
|
"bg-transparent text-green-400",
|
|
912
946
|
"border-2 border-green-400",
|
|
913
947
|
"hover:bg-green-400 hover:text-gray-900",
|
|
914
|
-
|
|
915
|
-
"
|
|
948
|
+
// #664 S3: rgba(74,222,128,…) → --glow-green-rgb (tokens.css), piksel-özdeş.
|
|
949
|
+
"hover:shadow-[0_0_30px_rgba(var(--glow-green-rgb),0.6)]",
|
|
950
|
+
"active:shadow-[0_0_15px_rgba(var(--glow-green-rgb),0.4)]",
|
|
916
951
|
"focus-visible:ring-green-400/50",
|
|
917
952
|
"transition-all duration-300"
|
|
918
953
|
]
|
|
@@ -959,22 +994,40 @@ var Button = React12__namespace.forwardRef(
|
|
|
959
994
|
rightIcon,
|
|
960
995
|
children,
|
|
961
996
|
disabled,
|
|
997
|
+
onClick,
|
|
962
998
|
...props
|
|
963
999
|
}, ref) => {
|
|
964
|
-
const
|
|
1000
|
+
const renderAsSlot = asChild && React12__namespace.isValidElement(children);
|
|
1001
|
+
const Comp = renderAsSlot ? reactSlot.Slot : "button";
|
|
1002
|
+
const isDisabled = disabled || loading;
|
|
1003
|
+
const disabledProps = renderAsSlot ? {
|
|
1004
|
+
"aria-disabled": isDisabled || void 0,
|
|
1005
|
+
"data-disabled": isDisabled ? "" : void 0
|
|
1006
|
+
} : { disabled: isDisabled };
|
|
1007
|
+
const handleClick = renderAsSlot && isDisabled ? (event) => {
|
|
1008
|
+
event.preventDefault();
|
|
1009
|
+
event.stopPropagation();
|
|
1010
|
+
} : onClick;
|
|
965
1011
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
966
1012
|
Comp,
|
|
967
1013
|
{
|
|
968
|
-
className: cn(
|
|
1014
|
+
className: cn(
|
|
1015
|
+
"moonui-theme",
|
|
1016
|
+
buttonVariants({ variant, size, rounded, fullWidth, className }),
|
|
1017
|
+
// `:disabled` eşleşmediği için görsel/etkileşimsel devre dışılık Slot
|
|
1018
|
+
// dalında açık sınıflarla verilir.
|
|
1019
|
+
renderAsSlot && isDisabled && "opacity-50 cursor-not-allowed pointer-events-none"
|
|
1020
|
+
),
|
|
969
1021
|
ref,
|
|
970
|
-
|
|
1022
|
+
...disabledProps,
|
|
971
1023
|
"aria-busy": loading || void 0,
|
|
972
1024
|
"data-loading": loading ? "" : void 0,
|
|
973
1025
|
...props,
|
|
1026
|
+
onClick: handleClick,
|
|
974
1027
|
children: [
|
|
975
1028
|
loading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-4 h-4 animate-spin", "aria-hidden": "true" }),
|
|
976
1029
|
!loading && leftIcon,
|
|
977
|
-
children,
|
|
1030
|
+
renderAsSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children }) : children,
|
|
978
1031
|
!loading && rightIcon
|
|
979
1032
|
]
|
|
980
1033
|
}
|
|
@@ -1125,16 +1178,16 @@ var skeletonAnimation = {
|
|
|
1125
1178
|
}
|
|
1126
1179
|
};
|
|
1127
1180
|
var cardVariants = classVarianceAuthority.cva(
|
|
1128
|
-
"rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-
|
|
1181
|
+
"rounded-lg border border-border bg-card text-card-foreground shadow-sm dark:shadow-black/20 transition-all duration-200",
|
|
1129
1182
|
{
|
|
1130
1183
|
variants: {
|
|
1131
1184
|
variant: {
|
|
1132
1185
|
default: "",
|
|
1133
|
-
outline: "border border-border shadow-none bg-transparent dark:
|
|
1134
|
-
filled: "border-none bg-secondary dark:bg-
|
|
1135
|
-
elevated: "border-none shadow-md dark:shadow-lg dark:shadow-
|
|
1186
|
+
outline: "border border-border shadow-none bg-transparent dark:bg-transparent",
|
|
1187
|
+
filled: "border-none bg-secondary dark:bg-muted dark:shadow-inner dark:shadow-black/10",
|
|
1188
|
+
elevated: "border-none shadow-md dark:shadow-lg dark:shadow-black/30 dark:bg-card",
|
|
1136
1189
|
gradient: "border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",
|
|
1137
|
-
glass: "border border-white/20 bg-white/10 backdrop-blur-md dark:border-
|
|
1190
|
+
glass: "border border-white/20 bg-white/10 backdrop-blur-md dark:border-white/10 dark:bg-black/10"
|
|
1138
1191
|
},
|
|
1139
1192
|
size: {
|
|
1140
1193
|
md: "",
|
|
@@ -2336,7 +2389,76 @@ var popoverContentVariants = classVarianceAuthority.cva(
|
|
|
2336
2389
|
}
|
|
2337
2390
|
}
|
|
2338
2391
|
);
|
|
2339
|
-
var
|
|
2392
|
+
var PopoverModalContext = React12__namespace.createContext(false);
|
|
2393
|
+
var POPOVER_TAB_STOP_SELECTOR = "a[href],button,input,select,textarea,[tabindex],audio[controls],video[controls],[contenteditable]";
|
|
2394
|
+
function isPopoverElementHidden(node) {
|
|
2395
|
+
const view = node.ownerDocument.defaultView;
|
|
2396
|
+
if (!view)
|
|
2397
|
+
return false;
|
|
2398
|
+
if (view.getComputedStyle(node).visibility === "hidden")
|
|
2399
|
+
return true;
|
|
2400
|
+
let current = node;
|
|
2401
|
+
while (current) {
|
|
2402
|
+
if (view.getComputedStyle(current).display === "none")
|
|
2403
|
+
return true;
|
|
2404
|
+
current = current.parentElement;
|
|
2405
|
+
}
|
|
2406
|
+
return false;
|
|
2407
|
+
}
|
|
2408
|
+
function isPopoverTabStop(node) {
|
|
2409
|
+
if (node.hasAttribute("data-radix-focus-guard"))
|
|
2410
|
+
return false;
|
|
2411
|
+
if (node.tabIndex < 0)
|
|
2412
|
+
return false;
|
|
2413
|
+
if (node.disabled)
|
|
2414
|
+
return false;
|
|
2415
|
+
if (node.hidden)
|
|
2416
|
+
return false;
|
|
2417
|
+
if (node.getAttribute("aria-hidden") === "true")
|
|
2418
|
+
return false;
|
|
2419
|
+
if (node.closest("[inert]"))
|
|
2420
|
+
return false;
|
|
2421
|
+
return !isPopoverElementHidden(node);
|
|
2422
|
+
}
|
|
2423
|
+
function getPopoverTabStopsWithin(container) {
|
|
2424
|
+
return Array.from(
|
|
2425
|
+
container.querySelectorAll(POPOVER_TAB_STOP_SELECTOR)
|
|
2426
|
+
).filter(isPopoverTabStop);
|
|
2427
|
+
}
|
|
2428
|
+
function getPopoverTrigger(content) {
|
|
2429
|
+
if (!content.id)
|
|
2430
|
+
return null;
|
|
2431
|
+
const id = typeof CSS !== "undefined" && typeof CSS.escape === "function" ? CSS.escape(content.id) : content.id;
|
|
2432
|
+
return content.ownerDocument.querySelector(
|
|
2433
|
+
`[aria-controls="${id}"]`
|
|
2434
|
+
);
|
|
2435
|
+
}
|
|
2436
|
+
function getPopoverTabStopOutside(reference, content, direction) {
|
|
2437
|
+
const candidates = Array.from(
|
|
2438
|
+
content.ownerDocument.querySelectorAll(
|
|
2439
|
+
POPOVER_TAB_STOP_SELECTOR
|
|
2440
|
+
)
|
|
2441
|
+
).filter((node) => !content.contains(node) && isPopoverTabStop(node));
|
|
2442
|
+
if (direction === "next") {
|
|
2443
|
+
return candidates.find(
|
|
2444
|
+
(node) => Boolean(
|
|
2445
|
+
reference.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING
|
|
2446
|
+
)
|
|
2447
|
+
) ?? null;
|
|
2448
|
+
}
|
|
2449
|
+
let previous = null;
|
|
2450
|
+
for (const node of candidates) {
|
|
2451
|
+
const relation = reference.compareDocumentPosition(node);
|
|
2452
|
+
if (node === reference || relation & Node.DOCUMENT_POSITION_PRECEDING) {
|
|
2453
|
+
previous = node;
|
|
2454
|
+
} else {
|
|
2455
|
+
break;
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
return previous;
|
|
2459
|
+
}
|
|
2460
|
+
var Popover = ({ modal = false, children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(PopoverModalContext.Provider, { value: modal, children: /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { ...props, modal, children }) });
|
|
2461
|
+
Popover.displayName = "Popover";
|
|
2340
2462
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
2341
2463
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
2342
2464
|
var PopoverContent = React12__namespace.forwardRef(({
|
|
@@ -2351,42 +2473,79 @@ var PopoverContent = React12__namespace.forwardRef(({
|
|
|
2351
2473
|
closeOnInteractOutside = true,
|
|
2352
2474
|
overlayBackdrop = false,
|
|
2353
2475
|
sideOffset = 4,
|
|
2476
|
+
onKeyDown,
|
|
2354
2477
|
...props
|
|
2355
|
-
}, ref) =>
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2478
|
+
}, ref) => {
|
|
2479
|
+
const isModal = React12__namespace.useContext(PopoverModalContext);
|
|
2480
|
+
const handleKeyDown = (event) => {
|
|
2481
|
+
onKeyDown?.(event);
|
|
2482
|
+
if (event.defaultPrevented)
|
|
2483
|
+
return;
|
|
2484
|
+
if (isModal)
|
|
2485
|
+
return;
|
|
2486
|
+
if (event.key !== "Tab")
|
|
2487
|
+
return;
|
|
2488
|
+
if (event.altKey || event.ctrlKey || event.metaKey)
|
|
2489
|
+
return;
|
|
2490
|
+
const content = event.currentTarget;
|
|
2491
|
+
const active = content.ownerDocument.activeElement;
|
|
2492
|
+
if (!active || active !== content && !content.contains(active))
|
|
2493
|
+
return;
|
|
2494
|
+
const tabStops = getPopoverTabStopsWithin(content);
|
|
2495
|
+
const forward = !event.shiftKey;
|
|
2496
|
+
const atEdge = tabStops.length === 0 ? active === content : active === (forward ? tabStops[tabStops.length - 1] : tabStops[0]);
|
|
2497
|
+
if (!atEdge)
|
|
2498
|
+
return;
|
|
2499
|
+
const reference = getPopoverTrigger(content) ?? content;
|
|
2500
|
+
const target = getPopoverTabStopOutside(
|
|
2501
|
+
reference,
|
|
2502
|
+
content,
|
|
2503
|
+
forward ? "next" : "previous"
|
|
2504
|
+
);
|
|
2505
|
+
event.preventDefault();
|
|
2506
|
+
if (target) {
|
|
2507
|
+
target.focus();
|
|
2508
|
+
} else {
|
|
2509
|
+
active.blur();
|
|
2387
2510
|
}
|
|
2388
|
-
|
|
2389
|
-
|
|
2511
|
+
};
|
|
2512
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2513
|
+
overlayBackdrop && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2514
|
+
"div",
|
|
2515
|
+
{
|
|
2516
|
+
className: "fixed inset-0 z-40 bg-black/50"
|
|
2517
|
+
}
|
|
2518
|
+
),
|
|
2519
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2520
|
+
PopoverPrimitive__namespace.Content,
|
|
2521
|
+
{
|
|
2522
|
+
ref,
|
|
2523
|
+
side,
|
|
2524
|
+
sideOffset,
|
|
2525
|
+
collisionPadding: 8,
|
|
2526
|
+
onInteractOutside: (e) => {
|
|
2527
|
+
if (!closeOnInteractOutside) {
|
|
2528
|
+
e.preventDefault();
|
|
2529
|
+
}
|
|
2530
|
+
},
|
|
2531
|
+
onKeyDown: handleKeyDown,
|
|
2532
|
+
className: cn(
|
|
2533
|
+
popoverContentVariants({
|
|
2534
|
+
variant,
|
|
2535
|
+
size,
|
|
2536
|
+
side,
|
|
2537
|
+
position,
|
|
2538
|
+
radius,
|
|
2539
|
+
shadow
|
|
2540
|
+
}),
|
|
2541
|
+
backdrop && "backdrop-blur-md bg-opacity-80",
|
|
2542
|
+
className
|
|
2543
|
+
),
|
|
2544
|
+
...props
|
|
2545
|
+
}
|
|
2546
|
+
)
|
|
2547
|
+
] });
|
|
2548
|
+
});
|
|
2390
2549
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
2391
2550
|
var PopoverClose = PopoverPrimitive__namespace.Close;
|
|
2392
2551
|
var PopoverSeparator = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2478,7 +2637,22 @@ var tabsTriggerVariants = classVarianceAuthority.cva(
|
|
|
2478
2637
|
variant: {
|
|
2479
2638
|
default: "rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",
|
|
2480
2639
|
underline: "rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",
|
|
2481
|
-
|
|
2640
|
+
// #646: `dark:data-[state=active]:text-white` KALDIRILDI. `--primary` koyu
|
|
2641
|
+
// temada BİLİNÇLİ near-white'tır (tokens.css:500, #368 kararı — DEĞİŞMEZ),
|
|
2642
|
+
// dolayısıyla aktif pill'e açıkça beyaz metin yazmak beyaz-üstüne-beyaz
|
|
2643
|
+
// demekti: ölçülen 1.28:1 (gerçek tarayıcı, /docs/components/tabs, koyu tema).
|
|
2644
|
+
// Sınıf kalkınca öneksiz `data-[state=active]:text-primary-foreground`
|
|
2645
|
+
// (koyu temada near-black) devreye girer → 15.91:1. Açık temada hiçbir
|
|
2646
|
+
// değişiklik yok (`dark:` sınıfı orada zaten uygulanmıyordu; ölçülen 4.70:1).
|
|
2647
|
+
//
|
|
2648
|
+
// ⚠️ `dark:data-[state=active]:bg-primary/90` BİLEREK KORUNDU: onu da
|
|
2649
|
+
// kaldırmak #545'in "ihlal takası" tuzağına düşürüyor. Aynı varyanttaki
|
|
2650
|
+
// `dark:bg-gray-800` (inaktif zemin) ile `data-[state=active]:bg-primary`
|
|
2651
|
+
// ÖZGÜLLÜKÇE EŞİT (0,2,0); kaynak sırası nedeniyle `dark:bg-gray-800`
|
|
2652
|
+
// kazanıyor ve aktif pill koyu temada inaktif görünüyordu — near-black metin
|
|
2653
|
+
// gray-800 üstünde 1.41:1 ile YENİ bir ihlal (ölçüldü). Koyu temada aktif
|
|
2654
|
+
// durumun zemini bu yüzden `dark:` özgüllüğünde kalmak ZORUNDA.
|
|
2655
|
+
pills: "rounded-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:border-primary",
|
|
2482
2656
|
cards: "rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",
|
|
2483
2657
|
minimal: "rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"
|
|
2484
2658
|
},
|
|
@@ -4861,7 +5035,61 @@ function DraggableList({
|
|
|
4861
5035
|
keyExtractor(item)
|
|
4862
5036
|
)) });
|
|
4863
5037
|
}
|
|
4864
|
-
var
|
|
5038
|
+
var DropdownMenuCloseContext = React12__namespace.createContext(null);
|
|
5039
|
+
var DropdownMenu = ({
|
|
5040
|
+
open,
|
|
5041
|
+
defaultOpen,
|
|
5042
|
+
onOpenChange,
|
|
5043
|
+
children,
|
|
5044
|
+
...props
|
|
5045
|
+
}) => {
|
|
5046
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React12__namespace.useState(
|
|
5047
|
+
defaultOpen ?? false
|
|
5048
|
+
);
|
|
5049
|
+
const isControlled = open !== void 0;
|
|
5050
|
+
const currentOpen = isControlled ? open : uncontrolledOpen;
|
|
5051
|
+
const handleOpenChange = React12__namespace.useCallback(
|
|
5052
|
+
(nextOpen) => {
|
|
5053
|
+
if (!isControlled)
|
|
5054
|
+
setUncontrolledOpen(nextOpen);
|
|
5055
|
+
onOpenChange?.(nextOpen);
|
|
5056
|
+
},
|
|
5057
|
+
[isControlled, onOpenChange]
|
|
5058
|
+
);
|
|
5059
|
+
const close = React12__namespace.useCallback(() => handleOpenChange(false), [
|
|
5060
|
+
handleOpenChange
|
|
5061
|
+
]);
|
|
5062
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5063
|
+
DropdownMenuPrimitive__namespace.Root,
|
|
5064
|
+
{
|
|
5065
|
+
...props,
|
|
5066
|
+
open: currentOpen,
|
|
5067
|
+
onOpenChange: handleOpenChange,
|
|
5068
|
+
children
|
|
5069
|
+
}
|
|
5070
|
+
) });
|
|
5071
|
+
};
|
|
5072
|
+
DropdownMenu.displayName = "DropdownMenu";
|
|
5073
|
+
function useDropdownMenuTabDismiss(onKeyDown) {
|
|
5074
|
+
const close = React12__namespace.useContext(DropdownMenuCloseContext);
|
|
5075
|
+
return (event) => {
|
|
5076
|
+
onKeyDown?.(event);
|
|
5077
|
+
if (event.defaultPrevented)
|
|
5078
|
+
return;
|
|
5079
|
+
if (event.key !== "Tab")
|
|
5080
|
+
return;
|
|
5081
|
+
if (event.altKey || event.ctrlKey || event.metaKey)
|
|
5082
|
+
return;
|
|
5083
|
+
if (!close)
|
|
5084
|
+
return;
|
|
5085
|
+
const target = event.target;
|
|
5086
|
+
if (target?.closest("[data-radix-menu-content]") !== event.currentTarget) {
|
|
5087
|
+
return;
|
|
5088
|
+
}
|
|
5089
|
+
event.preventDefault();
|
|
5090
|
+
close();
|
|
5091
|
+
};
|
|
5092
|
+
}
|
|
4865
5093
|
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
4866
5094
|
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
4867
5095
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
@@ -4884,30 +5112,38 @@ var DropdownMenuSubTrigger = React12__namespace.forwardRef(({ className, inset,
|
|
|
4884
5112
|
}
|
|
4885
5113
|
));
|
|
4886
5114
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
4887
|
-
var DropdownMenuSubContent = React12__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
)
|
|
5115
|
+
var DropdownMenuSubContent = React12__namespace.forwardRef(({ className, onKeyDown, ...props }, ref) => {
|
|
5116
|
+
const handleKeyDown = useDropdownMenuTabDismiss(onKeyDown);
|
|
5117
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5118
|
+
DropdownMenuPrimitive__namespace.SubContent,
|
|
5119
|
+
{
|
|
5120
|
+
ref,
|
|
5121
|
+
onKeyDown: handleKeyDown,
|
|
5122
|
+
className: cn(
|
|
5123
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
5124
|
+
className
|
|
5125
|
+
),
|
|
5126
|
+
...props
|
|
5127
|
+
}
|
|
5128
|
+
);
|
|
5129
|
+
});
|
|
4898
5130
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
4899
|
-
var DropdownMenuContent = React12__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) =>
|
|
4900
|
-
|
|
4901
|
-
{
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
)
|
|
5131
|
+
var DropdownMenuContent = React12__namespace.forwardRef(({ className, sideOffset = 4, onKeyDown, ...props }, ref) => {
|
|
5132
|
+
const handleKeyDown = useDropdownMenuTabDismiss(onKeyDown);
|
|
5133
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5134
|
+
DropdownMenuPrimitive__namespace.Content,
|
|
5135
|
+
{
|
|
5136
|
+
ref,
|
|
5137
|
+
sideOffset,
|
|
5138
|
+
onKeyDown: handleKeyDown,
|
|
5139
|
+
className: cn(
|
|
5140
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
5141
|
+
className
|
|
5142
|
+
),
|
|
5143
|
+
...props
|
|
5144
|
+
}
|
|
5145
|
+
) });
|
|
5146
|
+
});
|
|
4911
5147
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
4912
5148
|
var DropdownMenuItem = React12__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4913
5149
|
DropdownMenuPrimitive__namespace.Item,
|
|
@@ -5391,6 +5627,10 @@ var FileUpload = React12__namespace.default.forwardRef(
|
|
|
5391
5627
|
{
|
|
5392
5628
|
className: cn(
|
|
5393
5629
|
"relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",
|
|
5630
|
+
// #661-2: dosya girdisi `opacity-0` ile tum alani kapliyor; klavyeyle
|
|
5631
|
+
// Tab'landiginda HICBIR gorsel iz yoktu (WCAG 2.4.7). Odak halkasi
|
|
5632
|
+
// sarmalayiciya `focus-within` ile bagli — kutunun kendisi odaklanamaz.
|
|
5633
|
+
"focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
5394
5634
|
isDragOver && "border-primary bg-primary/5",
|
|
5395
5635
|
disabled && "opacity-50 cursor-not-allowed",
|
|
5396
5636
|
!disabled && "hover:border-primary/50 cursor-pointer"
|
|
@@ -6306,7 +6546,7 @@ var selectTriggerVariants = classVarianceAuthority.cva(
|
|
|
6306
6546
|
);
|
|
6307
6547
|
var SelectTrigger = React12__namespace.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => {
|
|
6308
6548
|
const icerikId = React12__namespace.useId();
|
|
6309
|
-
const
|
|
6549
|
+
const isNamed = props["aria-label"] != null || props["aria-labelledby"] != null;
|
|
6310
6550
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6311
6551
|
SelectPrimitive__namespace.Trigger,
|
|
6312
6552
|
{
|
|
@@ -6325,7 +6565,7 @@ var SelectTrigger = React12__namespace.forwardRef(({ className, children, varian
|
|
|
6325
6565
|
"data-error": error ? true : void 0,
|
|
6326
6566
|
"data-success": success ? true : void 0,
|
|
6327
6567
|
"data-loading": loading ? true : void 0,
|
|
6328
|
-
"aria-labelledby":
|
|
6568
|
+
"aria-labelledby": isNamed ? props["aria-labelledby"] : icerikId,
|
|
6329
6569
|
children: [
|
|
6330
6570
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { id: icerikId, className: "flex items-center flex-1 gap-2", children: [
|
|
6331
6571
|
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center text-muted-foreground", children: leftIcon }),
|
|
@@ -6433,8 +6673,8 @@ var SelectItem = React12__namespace.forwardRef(({ className, children, variant =
|
|
|
6433
6673
|
variant === "default" && "focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",
|
|
6434
6674
|
variant === "subtle" && "focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",
|
|
6435
6675
|
variant === "destructive" && "text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",
|
|
6436
|
-
variant === "success" && "text-success
|
|
6437
|
-
variant === "warning" && "text-warning dark:text-
|
|
6676
|
+
variant === "success" && "text-success focus:bg-success/10 focus:text-success",
|
|
6677
|
+
variant === "warning" && "text-warning-700 dark:text-warning-500 focus:bg-warning/10 focus:text-warning-700 dark:focus:text-warning-500",
|
|
6438
6678
|
className
|
|
6439
6679
|
),
|
|
6440
6680
|
...props,
|
|
@@ -7207,8 +7447,100 @@ var tooltipVariants = classVarianceAuthority.cva(
|
|
|
7207
7447
|
}
|
|
7208
7448
|
}
|
|
7209
7449
|
);
|
|
7210
|
-
var
|
|
7211
|
-
|
|
7450
|
+
var TooltipFocusHoldContext = React12__namespace.createContext(null);
|
|
7451
|
+
function isKeyboardFocus(element) {
|
|
7452
|
+
if (!element)
|
|
7453
|
+
return false;
|
|
7454
|
+
try {
|
|
7455
|
+
return element.matches(":focus-visible");
|
|
7456
|
+
} catch {
|
|
7457
|
+
return true;
|
|
7458
|
+
}
|
|
7459
|
+
}
|
|
7460
|
+
var Tooltip = ({
|
|
7461
|
+
open,
|
|
7462
|
+
defaultOpen,
|
|
7463
|
+
onOpenChange,
|
|
7464
|
+
children,
|
|
7465
|
+
...props
|
|
7466
|
+
}) => {
|
|
7467
|
+
const isControlled = open !== void 0;
|
|
7468
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React12__namespace.useState(defaultOpen ?? false);
|
|
7469
|
+
const resolvedOpen = isControlled ? open : uncontrolledOpen;
|
|
7470
|
+
const isFocusHeldRef = React12__namespace.useRef(false);
|
|
7471
|
+
const hold = React12__namespace.useCallback(() => {
|
|
7472
|
+
isFocusHeldRef.current = true;
|
|
7473
|
+
}, []);
|
|
7474
|
+
const release = React12__namespace.useCallback(() => {
|
|
7475
|
+
isFocusHeldRef.current = false;
|
|
7476
|
+
}, []);
|
|
7477
|
+
const setOpen = React12__namespace.useCallback(
|
|
7478
|
+
(next) => {
|
|
7479
|
+
if (!isControlled)
|
|
7480
|
+
setUncontrolledOpen(next);
|
|
7481
|
+
onOpenChange?.(next);
|
|
7482
|
+
},
|
|
7483
|
+
[isControlled, onOpenChange]
|
|
7484
|
+
);
|
|
7485
|
+
const handleOpenChange = React12__namespace.useCallback(
|
|
7486
|
+
(next) => {
|
|
7487
|
+
if (!next && isFocusHeldRef.current)
|
|
7488
|
+
return;
|
|
7489
|
+
setOpen(next);
|
|
7490
|
+
},
|
|
7491
|
+
[setOpen]
|
|
7492
|
+
);
|
|
7493
|
+
React12__namespace.useEffect(() => {
|
|
7494
|
+
if (!resolvedOpen)
|
|
7495
|
+
return;
|
|
7496
|
+
const handleEscape = (event) => {
|
|
7497
|
+
if (event.key !== "Escape")
|
|
7498
|
+
return;
|
|
7499
|
+
isFocusHeldRef.current = false;
|
|
7500
|
+
setOpen(false);
|
|
7501
|
+
};
|
|
7502
|
+
document.addEventListener("keydown", handleEscape, true);
|
|
7503
|
+
return () => document.removeEventListener("keydown", handleEscape, true);
|
|
7504
|
+
}, [resolvedOpen, setOpen]);
|
|
7505
|
+
const focusHold = React12__namespace.useMemo(
|
|
7506
|
+
() => ({ hold, release }),
|
|
7507
|
+
[hold, release]
|
|
7508
|
+
);
|
|
7509
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipFocusHoldContext.Provider, { value: focusHold, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7510
|
+
TooltipPrimitive__namespace.Root,
|
|
7511
|
+
{
|
|
7512
|
+
...props,
|
|
7513
|
+
open: resolvedOpen,
|
|
7514
|
+
onOpenChange: handleOpenChange,
|
|
7515
|
+
children
|
|
7516
|
+
}
|
|
7517
|
+
) });
|
|
7518
|
+
};
|
|
7519
|
+
Tooltip.displayName = "Tooltip";
|
|
7520
|
+
var TooltipTrigger = React12__namespace.forwardRef(({ onFocus, onBlur, onPointerDown, ...props }, ref) => {
|
|
7521
|
+
const focusHold = React12__namespace.useContext(TooltipFocusHoldContext);
|
|
7522
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7523
|
+
TooltipPrimitive__namespace.Trigger,
|
|
7524
|
+
{
|
|
7525
|
+
ref,
|
|
7526
|
+
...props,
|
|
7527
|
+
onFocus: (event) => {
|
|
7528
|
+
if (isKeyboardFocus(event.currentTarget))
|
|
7529
|
+
focusHold?.hold();
|
|
7530
|
+
onFocus?.(event);
|
|
7531
|
+
},
|
|
7532
|
+
onBlur: (event) => {
|
|
7533
|
+
focusHold?.release();
|
|
7534
|
+
onBlur?.(event);
|
|
7535
|
+
},
|
|
7536
|
+
onPointerDown: (event) => {
|
|
7537
|
+
focusHold?.release();
|
|
7538
|
+
onPointerDown?.(event);
|
|
7539
|
+
}
|
|
7540
|
+
}
|
|
7541
|
+
);
|
|
7542
|
+
});
|
|
7543
|
+
TooltipTrigger.displayName = TooltipPrimitive__namespace.Trigger.displayName;
|
|
7212
7544
|
var TooltipArrow = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7213
7545
|
TooltipPrimitive__namespace.Arrow,
|
|
7214
7546
|
{
|
|
@@ -8587,7 +8919,7 @@ var Textarea = React12__namespace.forwardRef(
|
|
|
8587
8919
|
children: errorMessage || successMessage
|
|
8588
8920
|
}
|
|
8589
8921
|
),
|
|
8590
|
-
showCharCount && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground
|
|
8922
|
+
showCharCount && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground ml-auto", children: [
|
|
8591
8923
|
currentLength,
|
|
8592
8924
|
maxLength !== void 0 && ` / ${maxLength}`
|
|
8593
8925
|
] })
|
|
@@ -8934,6 +9266,12 @@ var Rating = React12__namespace.forwardRef(
|
|
|
8934
9266
|
},
|
|
8935
9267
|
[readOnly, max, currentValue, step, commit]
|
|
8936
9268
|
);
|
|
9269
|
+
const reactId = React12__namespace.useId();
|
|
9270
|
+
const optionId = React12__namespace.useCallback(
|
|
9271
|
+
(optionValue) => `${reactId}-option-${String(optionValue).replace(".", "-")}`,
|
|
9272
|
+
[reactId]
|
|
9273
|
+
);
|
|
9274
|
+
const activeValue = currentValue >= step && currentValue <= max ? currentValue : step;
|
|
8937
9275
|
const renderIcon = (filled) => {
|
|
8938
9276
|
if (React12__namespace.isValidElement(icon)) {
|
|
8939
9277
|
const element = icon;
|
|
@@ -8963,6 +9301,7 @@ var Rating = React12__namespace.forwardRef(
|
|
|
8963
9301
|
"aria-label": ariaLabel,
|
|
8964
9302
|
"aria-orientation": "horizontal",
|
|
8965
9303
|
"aria-readonly": readOnly || void 0,
|
|
9304
|
+
"aria-activedescendant": readOnly ? void 0 : optionId(activeValue),
|
|
8966
9305
|
tabIndex: readOnly ? void 0 : 0,
|
|
8967
9306
|
onKeyDown: handleKeyDown,
|
|
8968
9307
|
onMouseLeave: () => setHoverValue(null),
|
|
@@ -8985,7 +9324,7 @@ var Rating = React12__namespace.forwardRef(
|
|
|
8985
9324
|
"span",
|
|
8986
9325
|
{
|
|
8987
9326
|
"aria-hidden": "true",
|
|
8988
|
-
className: "pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-
|
|
9327
|
+
className: "pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-[rgb(var(--rating-star-rgb))]",
|
|
8989
9328
|
style: { width: `${fraction * 100}%` },
|
|
8990
9329
|
children: renderIcon(true)
|
|
8991
9330
|
}
|
|
@@ -8996,6 +9335,7 @@ var Rating = React12__namespace.forwardRef(
|
|
|
8996
9335
|
{
|
|
8997
9336
|
type: "button",
|
|
8998
9337
|
role: "radio",
|
|
9338
|
+
id: optionId(halfValue),
|
|
8999
9339
|
"aria-checked": currentValue === halfValue,
|
|
9000
9340
|
"aria-label": `${halfValue} stars`,
|
|
9001
9341
|
tabIndex: -1,
|
|
@@ -9009,6 +9349,7 @@ var Rating = React12__namespace.forwardRef(
|
|
|
9009
9349
|
{
|
|
9010
9350
|
type: "button",
|
|
9011
9351
|
role: "radio",
|
|
9352
|
+
id: optionId(starValue),
|
|
9012
9353
|
"aria-checked": currentValue === starValue,
|
|
9013
9354
|
"aria-label": `${starValue} stars`,
|
|
9014
9355
|
tabIndex: -1,
|
|
@@ -9023,6 +9364,7 @@ var Rating = React12__namespace.forwardRef(
|
|
|
9023
9364
|
{
|
|
9024
9365
|
type: "button",
|
|
9025
9366
|
role: "radio",
|
|
9367
|
+
id: optionId(starValue),
|
|
9026
9368
|
"aria-checked": currentValue === starValue,
|
|
9027
9369
|
"aria-label": `${starValue} ${starValue === 1 ? "star" : "stars"}`,
|
|
9028
9370
|
tabIndex: -1,
|
|
@@ -9630,6 +9972,7 @@ exports.moonUIInputOTPSlotVariants = inputOTPSlotVariants;
|
|
|
9630
9972
|
exports.moonUIKbdVariants = kbdVariants;
|
|
9631
9973
|
exports.moonUIPopoverContentVariants = popoverContentVariants;
|
|
9632
9974
|
exports.moonUIRatingVariants = ratingVariants;
|
|
9975
|
+
exports.moonUISeparatorVariants = separatorVariants;
|
|
9633
9976
|
exports.moonUISkeletonVariants = skeletonVariants;
|
|
9634
9977
|
exports.moonUISpinnerVariants = spinnerVariants;
|
|
9635
9978
|
exports.moonUIToggleVariants = toggleVariants;
|