@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.mjs
CHANGED
|
@@ -395,16 +395,16 @@ var badgeVariants = cva(
|
|
|
395
395
|
"dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"
|
|
396
396
|
],
|
|
397
397
|
success: [
|
|
398
|
-
"border-transparent bg-success text-
|
|
398
|
+
"border-transparent bg-success text-success-foreground",
|
|
399
399
|
"hover:bg-success/90 dark:hover:bg-success/80",
|
|
400
400
|
"focus-visible:ring-success/30 dark:focus-visible:ring-success/25",
|
|
401
|
-
"dark:bg-success/90 dark:text-
|
|
401
|
+
"dark:bg-success/90 dark:text-success-foreground dark:shadow-inner dark:shadow-success/10"
|
|
402
402
|
],
|
|
403
403
|
warning: [
|
|
404
|
-
"border-transparent bg-warning text-
|
|
404
|
+
"border-transparent bg-warning text-warning-foreground",
|
|
405
405
|
"hover:bg-warning/90 dark:hover:bg-warning/80",
|
|
406
406
|
"focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25",
|
|
407
|
-
"dark:bg-warning/90 dark:text-
|
|
407
|
+
"dark:bg-warning/90 dark:text-warning-foreground dark:shadow-inner dark:shadow-warning/10"
|
|
408
408
|
],
|
|
409
409
|
ghost: [
|
|
410
410
|
"border border-gray-200 bg-gray-50/50 text-gray-700",
|
|
@@ -3531,7 +3531,7 @@ var Command = React24.forwardRef(({ className, variant, size, ...props }, ref) =
|
|
|
3531
3531
|
...props
|
|
3532
3532
|
}
|
|
3533
3533
|
));
|
|
3534
|
-
Command.displayName = Command
|
|
3534
|
+
Command.displayName = "Command";
|
|
3535
3535
|
var CommandDialog = ({
|
|
3536
3536
|
children,
|
|
3537
3537
|
commandClassName,
|
|
@@ -3559,7 +3559,7 @@ var CommandInput = React24.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3559
3559
|
}
|
|
3560
3560
|
)
|
|
3561
3561
|
] }));
|
|
3562
|
-
CommandInput.displayName =
|
|
3562
|
+
CommandInput.displayName = "CommandInput";
|
|
3563
3563
|
var CommandList = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3564
3564
|
Command$1.List,
|
|
3565
3565
|
{
|
|
@@ -3568,7 +3568,7 @@ var CommandList = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3568
3568
|
...props
|
|
3569
3569
|
}
|
|
3570
3570
|
));
|
|
3571
|
-
CommandList.displayName =
|
|
3571
|
+
CommandList.displayName = "CommandList";
|
|
3572
3572
|
var CommandEmpty = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3573
3573
|
Command$1.Empty,
|
|
3574
3574
|
{
|
|
@@ -3577,7 +3577,7 @@ var CommandEmpty = React24.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3577
3577
|
...props
|
|
3578
3578
|
}
|
|
3579
3579
|
));
|
|
3580
|
-
CommandEmpty.displayName =
|
|
3580
|
+
CommandEmpty.displayName = "CommandEmpty";
|
|
3581
3581
|
var CommandGroup = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3582
3582
|
Command$1.Group,
|
|
3583
3583
|
{
|
|
@@ -3589,7 +3589,7 @@ var CommandGroup = React24.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3589
3589
|
...props
|
|
3590
3590
|
}
|
|
3591
3591
|
));
|
|
3592
|
-
CommandGroup.displayName =
|
|
3592
|
+
CommandGroup.displayName = "CommandGroup";
|
|
3593
3593
|
var CommandSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3594
3594
|
Command$1.Separator,
|
|
3595
3595
|
{
|
|
@@ -3598,7 +3598,7 @@ var CommandSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3598
3598
|
...props
|
|
3599
3599
|
}
|
|
3600
3600
|
));
|
|
3601
|
-
CommandSeparator.displayName =
|
|
3601
|
+
CommandSeparator.displayName = "CommandSeparator";
|
|
3602
3602
|
var CommandItem = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3603
3603
|
Command$1.Item,
|
|
3604
3604
|
{
|
|
@@ -3610,7 +3610,7 @@ var CommandItem = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3610
3610
|
...props
|
|
3611
3611
|
}
|
|
3612
3612
|
));
|
|
3613
|
-
CommandItem.displayName =
|
|
3613
|
+
CommandItem.displayName = "CommandItem";
|
|
3614
3614
|
var CommandShortcut = ({
|
|
3615
3615
|
className,
|
|
3616
3616
|
...props
|
|
@@ -4265,7 +4265,10 @@ DateRangePicker.displayName = "DateRangePicker";
|
|
|
4265
4265
|
var DateTimePicker = React24.forwardRef(function DateTimePicker2({
|
|
4266
4266
|
value,
|
|
4267
4267
|
onChange,
|
|
4268
|
-
|
|
4268
|
+
// Saat ayrı bir <select> ile gösterildiği için buton yalnızca TARİHİ yazar;
|
|
4269
|
+
// varsayılan bu yüzden "PPP p" değil "PPP". (Eski hâlde "PPP p" alınıp hiç
|
|
4270
|
+
// kullanılmıyordu — çağıranın verdiği formatString sessizce yok sayılıyordu.)
|
|
4271
|
+
formatString = "PPP",
|
|
4269
4272
|
showTimePicker = true,
|
|
4270
4273
|
timeFormat = "24",
|
|
4271
4274
|
timeInterval = 15,
|
|
@@ -4323,7 +4326,7 @@ var DateTimePicker = React24.forwardRef(function DateTimePicker2({
|
|
|
4323
4326
|
...props,
|
|
4324
4327
|
value: date,
|
|
4325
4328
|
onChange: handleDateChange,
|
|
4326
|
-
formatString
|
|
4329
|
+
formatString,
|
|
4327
4330
|
showTodayButton: false
|
|
4328
4331
|
}
|
|
4329
4332
|
),
|
|
@@ -8164,7 +8167,7 @@ var ToastAction = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
8164
8167
|
}
|
|
8165
8168
|
));
|
|
8166
8169
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
8167
|
-
var ToastClose = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
8170
|
+
var ToastClose = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
8168
8171
|
ToastPrimitives.Close,
|
|
8169
8172
|
{
|
|
8170
8173
|
ref,
|
|
@@ -8174,7 +8177,10 @@ var ToastClose = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
8174
8177
|
),
|
|
8175
8178
|
"toast-close": "",
|
|
8176
8179
|
...props,
|
|
8177
|
-
children:
|
|
8180
|
+
children: [
|
|
8181
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
8182
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
8183
|
+
]
|
|
8178
8184
|
}
|
|
8179
8185
|
));
|
|
8180
8186
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|