@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.mjs CHANGED
@@ -3531,7 +3531,7 @@ var Command = React24.forwardRef(({ className, variant, size, ...props }, ref) =
3531
3531
  ...props
3532
3532
  }
3533
3533
  ));
3534
- Command.displayName = Command$1.displayName;
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 = Command$1.Input.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 = Command$1.List.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 = Command$1.Empty.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 = Command$1.Group.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 = Command$1.Separator.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 = Command$1.Item.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
- formatString = "PPP p",
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: "PPP",
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__ */ jsx(
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: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
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;