@moontra/moonui 4.1.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +9 -9
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +21 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -15
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.global.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/use-intersection-observer.test.tsx +18 -4
- package/src/__tests__/use-local-storage.test.tsx +34 -20
- package/src/components/ui/__tests__/avatar.test.tsx +5 -7
- package/src/components/ui/__tests__/badge.test.tsx +24 -14
- package/src/components/ui/__tests__/breadcrumb.test.tsx +4 -7
- package/src/components/ui/__tests__/button.test.tsx +6 -3
- package/src/components/ui/__tests__/card.test.tsx +4 -1
- package/src/components/ui/__tests__/checkbox.test.tsx +4 -1
- package/src/components/ui/__tests__/command.test.tsx +268 -124
- package/src/components/ui/__tests__/data-table-basic.test.tsx +271 -0
- package/src/components/ui/__tests__/date-picker.test.tsx +184 -197
- package/src/components/ui/__tests__/progress.test.tsx +0 -1
- package/src/components/ui/__tests__/table.test.tsx +8 -2
- package/src/components/ui/__tests__/tabs.test.tsx +5 -3
- package/src/components/ui/__tests__/toast.test.tsx +461 -159
- package/src/components/ui/__tests__/tooltip.test.tsx +387 -264
- package/src/components/ui/badge.tsx +4 -4
- package/src/components/ui/command.tsx +11 -7
- package/src/components/ui/date-picker.tsx +12 -6
- package/src/components/ui/toast.tsx +3 -0
- package/src/styles/tokens.css +21 -6
- package/src/use-intersection-observer.tsx +9 -0
- package/src/use-local-storage.tsx +35 -1
- package/src/components/ui/__tests__/data-table.test.tsx +0 -256
- package/src/components/ui/data-table.stories.tsx +0 -511
package/dist/index.js
CHANGED
|
@@ -433,16 +433,16 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
433
433
|
"dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"
|
|
434
434
|
],
|
|
435
435
|
success: [
|
|
436
|
-
"border-transparent bg-success text-
|
|
436
|
+
"border-transparent bg-success text-success-foreground",
|
|
437
437
|
"hover:bg-success/90 dark:hover:bg-success/80",
|
|
438
438
|
"focus-visible:ring-success/30 dark:focus-visible:ring-success/25",
|
|
439
|
-
"dark:bg-success/90 dark:text-
|
|
439
|
+
"dark:bg-success/90 dark:text-success-foreground dark:shadow-inner dark:shadow-success/10"
|
|
440
440
|
],
|
|
441
441
|
warning: [
|
|
442
|
-
"border-transparent bg-warning text-
|
|
442
|
+
"border-transparent bg-warning text-warning-foreground",
|
|
443
443
|
"hover:bg-warning/90 dark:hover:bg-warning/80",
|
|
444
444
|
"focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25",
|
|
445
|
-
"dark:bg-warning/90 dark:text-
|
|
445
|
+
"dark:bg-warning/90 dark:text-warning-foreground dark:shadow-inner dark:shadow-warning/10"
|
|
446
446
|
],
|
|
447
447
|
ghost: [
|
|
448
448
|
"border border-gray-200 bg-gray-50/50 text-gray-700",
|
|
@@ -3569,7 +3569,7 @@ var Command = React24__namespace.forwardRef(({ className, variant, size, ...prop
|
|
|
3569
3569
|
...props
|
|
3570
3570
|
}
|
|
3571
3571
|
));
|
|
3572
|
-
Command.displayName =
|
|
3572
|
+
Command.displayName = "Command";
|
|
3573
3573
|
var CommandDialog = ({
|
|
3574
3574
|
children,
|
|
3575
3575
|
commandClassName,
|
|
@@ -3597,7 +3597,7 @@ var CommandInput = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3597
3597
|
}
|
|
3598
3598
|
)
|
|
3599
3599
|
] }));
|
|
3600
|
-
CommandInput.displayName =
|
|
3600
|
+
CommandInput.displayName = "CommandInput";
|
|
3601
3601
|
var CommandList = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3602
3602
|
cmdk.Command.List,
|
|
3603
3603
|
{
|
|
@@ -3606,7 +3606,7 @@ var CommandList = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3606
3606
|
...props
|
|
3607
3607
|
}
|
|
3608
3608
|
));
|
|
3609
|
-
CommandList.displayName =
|
|
3609
|
+
CommandList.displayName = "CommandList";
|
|
3610
3610
|
var CommandEmpty = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3611
3611
|
cmdk.Command.Empty,
|
|
3612
3612
|
{
|
|
@@ -3615,7 +3615,7 @@ var CommandEmpty = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3615
3615
|
...props
|
|
3616
3616
|
}
|
|
3617
3617
|
));
|
|
3618
|
-
CommandEmpty.displayName =
|
|
3618
|
+
CommandEmpty.displayName = "CommandEmpty";
|
|
3619
3619
|
var CommandGroup = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3620
3620
|
cmdk.Command.Group,
|
|
3621
3621
|
{
|
|
@@ -3627,7 +3627,7 @@ var CommandGroup = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3627
3627
|
...props
|
|
3628
3628
|
}
|
|
3629
3629
|
));
|
|
3630
|
-
CommandGroup.displayName =
|
|
3630
|
+
CommandGroup.displayName = "CommandGroup";
|
|
3631
3631
|
var CommandSeparator = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3632
3632
|
cmdk.Command.Separator,
|
|
3633
3633
|
{
|
|
@@ -3636,7 +3636,7 @@ var CommandSeparator = React24__namespace.forwardRef(({ className, ...props }, r
|
|
|
3636
3636
|
...props
|
|
3637
3637
|
}
|
|
3638
3638
|
));
|
|
3639
|
-
CommandSeparator.displayName =
|
|
3639
|
+
CommandSeparator.displayName = "CommandSeparator";
|
|
3640
3640
|
var CommandItem = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3641
3641
|
cmdk.Command.Item,
|
|
3642
3642
|
{
|
|
@@ -3648,7 +3648,7 @@ var CommandItem = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3648
3648
|
...props
|
|
3649
3649
|
}
|
|
3650
3650
|
));
|
|
3651
|
-
CommandItem.displayName =
|
|
3651
|
+
CommandItem.displayName = "CommandItem";
|
|
3652
3652
|
var CommandShortcut = ({
|
|
3653
3653
|
className,
|
|
3654
3654
|
...props
|
|
@@ -4303,7 +4303,10 @@ DateRangePicker.displayName = "DateRangePicker";
|
|
|
4303
4303
|
var DateTimePicker = React24__namespace.forwardRef(function DateTimePicker2({
|
|
4304
4304
|
value,
|
|
4305
4305
|
onChange,
|
|
4306
|
-
|
|
4306
|
+
// Saat ayrı bir <select> ile gösterildiği için buton yalnızca TARİHİ yazar;
|
|
4307
|
+
// varsayılan bu yüzden "PPP p" değil "PPP". (Eski hâlde "PPP p" alınıp hiç
|
|
4308
|
+
// kullanılmıyordu — çağıranın verdiği formatString sessizce yok sayılıyordu.)
|
|
4309
|
+
formatString = "PPP",
|
|
4307
4310
|
showTimePicker = true,
|
|
4308
4311
|
timeFormat = "24",
|
|
4309
4312
|
timeInterval = 15,
|
|
@@ -4361,7 +4364,7 @@ var DateTimePicker = React24__namespace.forwardRef(function DateTimePicker2({
|
|
|
4361
4364
|
...props,
|
|
4362
4365
|
value: date,
|
|
4363
4366
|
onChange: handleDateChange,
|
|
4364
|
-
formatString
|
|
4367
|
+
formatString,
|
|
4365
4368
|
showTodayButton: false
|
|
4366
4369
|
}
|
|
4367
4370
|
),
|
|
@@ -8202,7 +8205,7 @@ var ToastAction = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
8202
8205
|
}
|
|
8203
8206
|
));
|
|
8204
8207
|
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
8205
|
-
var ToastClose = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.
|
|
8208
|
+
var ToastClose = React24__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8206
8209
|
ToastPrimitives__namespace.Close,
|
|
8207
8210
|
{
|
|
8208
8211
|
ref,
|
|
@@ -8212,7 +8215,10 @@ var ToastClose = React24__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8212
8215
|
),
|
|
8213
8216
|
"toast-close": "",
|
|
8214
8217
|
...props,
|
|
8215
|
-
children:
|
|
8218
|
+
children: [
|
|
8219
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
8220
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
8221
|
+
]
|
|
8216
8222
|
}
|
|
8217
8223
|
));
|
|
8218
8224
|
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|