@moontra/moonui 5.0.0 → 5.1.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.
Files changed (43) hide show
  1. package/dist/hooks/index.d.mts +15 -0
  2. package/dist/hooks/index.d.ts +15 -0
  3. package/dist/hooks/index.global.js +38 -0
  4. package/dist/hooks/index.global.js.map +1 -0
  5. package/dist/hooks/index.js +128 -0
  6. package/dist/hooks/index.js.map +1 -0
  7. package/dist/hooks/index.mjs +106 -0
  8. package/dist/hooks/index.mjs.map +1 -0
  9. package/dist/index.d.mts +2 -2
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.global.js +9 -9
  12. package/dist/index.global.js.map +1 -1
  13. package/dist/index.js +17 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +17 -11
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/lib/theme.global.js.map +1 -1
  18. package/package.json +8 -3
  19. package/src/__tests__/hooks-exports-contract.test.ts +22 -0
  20. package/src/__tests__/use-intersection-observer.test.tsx +18 -4
  21. package/src/__tests__/use-local-storage.test.tsx +34 -20
  22. package/src/components/ui/__tests__/avatar.test.tsx +5 -7
  23. package/src/components/ui/__tests__/badge.test.tsx +19 -12
  24. package/src/components/ui/__tests__/breadcrumb.test.tsx +4 -7
  25. package/src/components/ui/__tests__/button.test.tsx +6 -3
  26. package/src/components/ui/__tests__/card.test.tsx +4 -1
  27. package/src/components/ui/__tests__/checkbox.test.tsx +4 -1
  28. package/src/components/ui/__tests__/command.test.tsx +268 -124
  29. package/src/components/ui/__tests__/data-table-basic.test.tsx +271 -0
  30. package/src/components/ui/__tests__/date-picker.test.tsx +184 -197
  31. package/src/components/ui/__tests__/progress.test.tsx +0 -1
  32. package/src/components/ui/__tests__/table.test.tsx +8 -2
  33. package/src/components/ui/__tests__/tabs.test.tsx +5 -3
  34. package/src/components/ui/__tests__/toast.test.tsx +461 -159
  35. package/src/components/ui/__tests__/tooltip.test.tsx +387 -264
  36. package/src/components/ui/command.tsx +11 -7
  37. package/src/components/ui/date-picker.tsx +12 -6
  38. package/src/components/ui/toast.tsx +3 -0
  39. package/src/hooks/index.ts +24 -0
  40. package/src/use-intersection-observer.tsx +10 -1
  41. package/src/use-local-storage.tsx +35 -1
  42. package/src/components/ui/__tests__/data-table.test.tsx +0 -256
  43. package/src/components/ui/data-table.stories.tsx +0 -511
package/dist/index.js CHANGED
@@ -3569,7 +3569,7 @@ var Command = React24__namespace.forwardRef(({ className, variant, size, ...prop
3569
3569
  ...props
3570
3570
  }
3571
3571
  ));
3572
- Command.displayName = cmdk.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 = cmdk.Command.Input.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 = cmdk.Command.List.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 = cmdk.Command.Empty.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 = cmdk.Command.Group.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 = cmdk.Command.Separator.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 = cmdk.Command.Item.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
- formatString = "PPP p",
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: "PPP",
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.jsx(
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: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
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;