@pelatform/ui 1.5.9 → 1.6.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/base.cjs CHANGED
@@ -2049,9 +2049,7 @@ function ContextMenuPositioner({
2049
2049
  }
2050
2050
  );
2051
2051
  }
2052
- function ContextMenuPortal({
2053
- ...props
2054
- }) {
2052
+ function ContextMenuPortal({ ...props }) {
2055
2053
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _contextmenu.ContextMenu.Portal, { "data-slot": "context-menu-portal", ...props });
2056
2054
  }
2057
2055
 
@@ -3805,7 +3803,7 @@ function PopoverAnchor({ ...props }) {
3805
3803
  var _react2 = require('@base-ui-components/react');
3806
3804
 
3807
3805
  function PreviewCard({ ...props }) {
3808
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react2.PreviewCard.Root, { delay: 0, closeDelay: 0, "data-slot": "preview-card", ...props });
3806
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react2.PreviewCard.Trigger, { delay: 0, closeDelay: 0, "data-slot": "preview-card", ...props });
3809
3807
  }
3810
3808
  function PreviewCardTrigger({ ...props }) {
3811
3809
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react2.PreviewCard.Trigger, { "data-slot": "preview-card-trigger", ...props });
@@ -4578,11 +4576,9 @@ function Slider({
4578
4576
  }
4579
4577
  }, [value]);
4580
4578
  const handleValueChange = (newValue, eventDetails) => {
4581
- const values = Array.isArray(newValue) ? [...newValue] : [newValue];
4582
- setInternalValues(values);
4583
- if (onValueChange) {
4584
- onValueChange(values, eventDetails);
4585
- }
4579
+ const valuesArray = Array.isArray(newValue) ? [...newValue] : [newValue];
4580
+ setInternalValues(valuesArray);
4581
+ _optionalChain([onValueChange, 'optionalCall', _7 => _7(newValue, eventDetails)]);
4586
4582
  };
4587
4583
  const [showTooltipState, setShowTooltipState] = React11.useState(false);
4588
4584
  const handlePointerDown = () => {
@@ -4608,6 +4604,7 @@ function Slider({
4608
4604
  _slider.Slider.Thumb,
4609
4605
  {
4610
4606
  "data-slot": "slider-thumb",
4607
+ index,
4611
4608
  className: _chunkCJXIPSTGcjs.cn.call(void 0,
4612
4609
  "block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm outline-none ring-ring/20 transition-[color,box-shadow] hover:ring-4 disabled:pointer-events-none disabled:opacity-50 data-dragging:ring-4 data-focused:ring-4 data-touched:ring-4"
4613
4610
  ),
@@ -5018,7 +5015,7 @@ function ToastProvider({
5018
5015
  ] });
5019
5016
  }
5020
5017
  function isCustomToast(toast) {
5021
- return _optionalChain([toast, 'access', _7 => _7.data, 'optionalAccess', _8 => _8.content]) !== void 0;
5018
+ return _optionalChain([toast, 'access', _8 => _8.data, 'optionalAccess', _9 => _9.content]) !== void 0;
5022
5019
  }
5023
5020
  function getDefaultSwipeDirection(position) {
5024
5021
  switch (position) {
@@ -5040,7 +5037,7 @@ function ToastList({ position, swipeDirection, showCloseButton }) {
5040
5037
  const { toasts } = _chunkZDR3OZ7Zcjs.useToast.call(void 0, );
5041
5038
  const toastsByPosition = toasts.reduce(
5042
5039
  (groups, toast) => {
5043
- const toastPosition = _optionalChain([toast, 'access', _9 => _9.data, 'optionalAccess', _10 => _10.position]) || position;
5040
+ const toastPosition = _optionalChain([toast, 'access', _10 => _10.data, 'optionalAccess', _11 => _11.position]) || position;
5044
5041
  if (!groups[toastPosition]) {
5045
5042
  groups[toastPosition] = [];
5046
5043
  }
@@ -5116,7 +5113,7 @@ function ToastList({ position, swipeDirection, showCloseButton }) {
5116
5113
  )
5117
5114
  ] })
5118
5115
  ] }),
5119
- (_optionalChain([toast, 'access', _11 => _11.data, 'optionalAccess', _12 => _12.close]) || showCloseButton) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5116
+ (_optionalChain([toast, 'access', _12 => _12.data, 'optionalAccess', _13 => _13.close]) || showCloseButton) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5120
5117
  _toast.Toast.Close,
5121
5118
  {
5122
5119
  className: _chunkCJXIPSTGcjs.cn.call(void 0,
package/dist/base.d.cts CHANGED
@@ -254,7 +254,7 @@ declare function ContextMenuGroupLabel({ className, inset, ...props }: React$1.C
254
254
  declare function ContextMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof ContextMenu$1.Separator>): react_jsx_runtime.JSX.Element;
255
255
  declare function ContextMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
256
256
  declare function ContextMenuPositioner({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Positioner>): react_jsx_runtime.JSX.Element;
257
- declare function ContextMenuPortal({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Positioner>): react_jsx_runtime.JSX.Element;
257
+ declare function ContextMenuPortal({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Portal>): react_jsx_runtime.JSX.Element;
258
258
 
259
259
  declare function Dialog({ ...props }: React$1.ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime.JSX.Element;
260
260
  declare function DialogTrigger(props: React$1.ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime.JSX.Element;
package/dist/base.d.ts CHANGED
@@ -254,7 +254,7 @@ declare function ContextMenuGroupLabel({ className, inset, ...props }: React$1.C
254
254
  declare function ContextMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof ContextMenu$1.Separator>): react_jsx_runtime.JSX.Element;
255
255
  declare function ContextMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
256
256
  declare function ContextMenuPositioner({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Positioner>): react_jsx_runtime.JSX.Element;
257
- declare function ContextMenuPortal({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Positioner>): react_jsx_runtime.JSX.Element;
257
+ declare function ContextMenuPortal({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Portal>): react_jsx_runtime.JSX.Element;
258
258
 
259
259
  declare function Dialog({ ...props }: React$1.ComponentProps<typeof Dialog$1.Root>): react_jsx_runtime.JSX.Element;
260
260
  declare function DialogTrigger(props: React$1.ComponentProps<typeof Dialog$1.Trigger>): react_jsx_runtime.JSX.Element;
package/dist/base.js CHANGED
@@ -2049,9 +2049,7 @@ function ContextMenuPositioner({
2049
2049
  }
2050
2050
  );
2051
2051
  }
2052
- function ContextMenuPortal({
2053
- ...props
2054
- }) {
2052
+ function ContextMenuPortal({ ...props }) {
2055
2053
  return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
2056
2054
  }
2057
2055
 
@@ -3805,7 +3803,7 @@ function PopoverAnchor({ ...props }) {
3805
3803
  import { PreviewCard as BasePreviewCard } from "@base-ui-components/react";
3806
3804
  import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
3807
3805
  function PreviewCard({ ...props }) {
3808
- return /* @__PURE__ */ jsx28(BasePreviewCard.Root, { delay: 0, closeDelay: 0, "data-slot": "preview-card", ...props });
3806
+ return /* @__PURE__ */ jsx28(BasePreviewCard.Trigger, { delay: 0, closeDelay: 0, "data-slot": "preview-card", ...props });
3809
3807
  }
3810
3808
  function PreviewCardTrigger({ ...props }) {
3811
3809
  return /* @__PURE__ */ jsx28(BasePreviewCard.Trigger, { "data-slot": "preview-card-trigger", ...props });
@@ -4578,11 +4576,9 @@ function Slider({
4578
4576
  }
4579
4577
  }, [value]);
4580
4578
  const handleValueChange = (newValue, eventDetails) => {
4581
- const values = Array.isArray(newValue) ? [...newValue] : [newValue];
4582
- setInternalValues(values);
4583
- if (onValueChange) {
4584
- onValueChange(values, eventDetails);
4585
- }
4579
+ const valuesArray = Array.isArray(newValue) ? [...newValue] : [newValue];
4580
+ setInternalValues(valuesArray);
4581
+ onValueChange?.(newValue, eventDetails);
4586
4582
  };
4587
4583
  const [showTooltipState, setShowTooltipState] = React11.useState(false);
4588
4584
  const handlePointerDown = () => {
@@ -4608,6 +4604,7 @@ function Slider({
4608
4604
  SliderPrimitive.Thumb,
4609
4605
  {
4610
4606
  "data-slot": "slider-thumb",
4607
+ index,
4611
4608
  className: cn(
4612
4609
  "block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm outline-none ring-ring/20 transition-[color,box-shadow] hover:ring-4 disabled:pointer-events-none disabled:opacity-50 data-dragging:ring-4 data-focused:ring-4 data-touched:ring-4"
4613
4610
  ),
@@ -1063,7 +1063,7 @@ declare function SheetClose({ ...props }: React$1.ComponentProps<typeof Dialog$1
1063
1063
  declare function SheetPortal({ ...props }: React$1.ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime.JSX.Element;
1064
1064
  declare function SheetOverlay({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Overlay>): react_jsx_runtime.JSX.Element;
1065
1065
  declare const sheetVariants: (props?: ({
1066
- side?: "top" | "bottom" | "left" | "right" | null | undefined;
1066
+ side?: "left" | "right" | "bottom" | "top" | null | undefined;
1067
1067
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1068
1068
  interface SheetContentProps extends React$1.ComponentProps<typeof Dialog$1.Content>, VariantProps<typeof sheetVariants> {
1069
1069
  overlay?: boolean;
package/dist/default.d.ts CHANGED
@@ -1063,7 +1063,7 @@ declare function SheetClose({ ...props }: React$1.ComponentProps<typeof Dialog$1
1063
1063
  declare function SheetPortal({ ...props }: React$1.ComponentProps<typeof Dialog$1.Portal>): react_jsx_runtime.JSX.Element;
1064
1064
  declare function SheetOverlay({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Overlay>): react_jsx_runtime.JSX.Element;
1065
1065
  declare const sheetVariants: (props?: ({
1066
- side?: "top" | "bottom" | "left" | "right" | null | undefined;
1066
+ side?: "left" | "right" | "bottom" | "top" | null | undefined;
1067
1067
  } & class_variance_authority_types.ClassProp) | undefined) => string;
1068
1068
  interface SheetContentProps extends React$1.ComponentProps<typeof Dialog$1.Content>, VariantProps<typeof sheetVariants> {
1069
1069
  overlay?: boolean;
package/dist/hooks.d.cts CHANGED
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { DragEvent, ChangeEvent, InputHTMLAttributes, RefObject } from 'react';
3
3
  import { M as MenuItem, a as MenuConfig } from './menu-GmSRfRGB.cjs';
4
4
  import { M as META_THEME_COLORS } from './colors-CUDWvz1g.cjs';
5
+ import * as _base_ui_components_react from '@base-ui-components/react';
5
6
  import { Toast } from '@base-ui-components/react/toast';
6
7
 
7
8
  /**
@@ -1066,11 +1067,6 @@ declare function useSliderInput({ minValue, maxValue, initialValue }: UseSliderI
1066
1067
  validateAndUpdateValue: (value: number, index: 0 | 1) => void;
1067
1068
  };
1068
1069
 
1069
- /**
1070
- * Toast notification hook and manager for React components
1071
- * Provides a simple API to trigger and manage toast messages across the app
1072
- */
1073
-
1074
1070
  /**
1075
1071
  * Global toast manager instance
1076
1072
  *
@@ -1085,7 +1081,7 @@ declare function useSliderInput({ minValue, maxValue, initialValue }: UseSliderI
1085
1081
  * toastManager.show({ content: 'Profile updated', duration: 3000 });
1086
1082
  * ```
1087
1083
  */
1088
- declare const toastManager: Toast.createToastManager.ToastManager;
1084
+ declare const toastManager: _base_ui_components_react.ToastManager;
1089
1085
  /**
1090
1086
  * React hook to access the toast manager within components
1091
1087
  *
package/dist/hooks.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { DragEvent, ChangeEvent, InputHTMLAttributes, RefObject } from 'react';
3
3
  import { M as MenuItem, a as MenuConfig } from './menu-GmSRfRGB.js';
4
4
  import { M as META_THEME_COLORS } from './colors-CUDWvz1g.js';
5
+ import * as _base_ui_components_react from '@base-ui-components/react';
5
6
  import { Toast } from '@base-ui-components/react/toast';
6
7
 
7
8
  /**
@@ -1066,11 +1067,6 @@ declare function useSliderInput({ minValue, maxValue, initialValue }: UseSliderI
1066
1067
  validateAndUpdateValue: (value: number, index: 0 | 1) => void;
1067
1068
  };
1068
1069
 
1069
- /**
1070
- * Toast notification hook and manager for React components
1071
- * Provides a simple API to trigger and manage toast messages across the app
1072
- */
1073
-
1074
1070
  /**
1075
1071
  * Global toast manager instance
1076
1072
  *
@@ -1085,7 +1081,7 @@ declare function useSliderInput({ minValue, maxValue, initialValue }: UseSliderI
1085
1081
  * toastManager.show({ content: 'Profile updated', duration: 3000 });
1086
1082
  * ```
1087
1083
  */
1088
- declare const toastManager: Toast.createToastManager.ToastManager;
1084
+ declare const toastManager: _base_ui_components_react.ToastManager;
1089
1085
  /**
1090
1086
  * React hook to access the toast manager within components
1091
1087
  *