@particle-academy/react-fancy 4.4.1 → 4.4.3

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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @particle-academy/react-fancy
2
2
 
3
+ [![Fancified](art/fancified.svg)](https://particle.academy)
4
+
3
5
  React UI component library for **Human+ UX** — controlled, agent-bridgeable primitives that humans and agents share. Every component exposes `value` / `onChange`, stable handles, and JSON-friendly props so MCP bridges can drive the UI without DOM scraping.
4
6
 
5
7
  ## Inertia.js integration
package/dist/index.cjs CHANGED
@@ -2975,18 +2975,18 @@ function Field({
2975
2975
  ] });
2976
2976
  }
2977
2977
  var insidePaddingLeft = {
2978
- xs: "pl-7",
2979
- sm: "pl-8",
2980
- md: "pl-9",
2981
- lg: "pl-10",
2982
- xl: "pl-11"
2978
+ xs: "[&_input]:pl-7 [&_select]:pl-7 [&_textarea]:pl-7",
2979
+ sm: "[&_input]:pl-8 [&_select]:pl-8 [&_textarea]:pl-8",
2980
+ md: "[&_input]:pl-9 [&_select]:pl-9 [&_textarea]:pl-9",
2981
+ lg: "[&_input]:pl-10 [&_select]:pl-10 [&_textarea]:pl-10",
2982
+ xl: "[&_input]:pl-11 [&_select]:pl-11 [&_textarea]:pl-11"
2983
2983
  };
2984
2984
  var insidePaddingRight = {
2985
- xs: "pr-7",
2986
- sm: "pr-8",
2987
- md: "pr-9",
2988
- lg: "pr-10",
2989
- xl: "pr-11"
2985
+ xs: "[&_input]:pr-7 [&_select]:pr-7 [&_textarea]:pr-7",
2986
+ sm: "[&_input]:pr-8 [&_select]:pr-8 [&_textarea]:pr-8",
2987
+ md: "[&_input]:pr-9 [&_select]:pr-9 [&_textarea]:pr-9",
2988
+ lg: "[&_input]:pr-10 [&_select]:pr-10 [&_textarea]:pr-10",
2989
+ xl: "[&_input]:pr-11 [&_select]:pr-11 [&_textarea]:pr-11"
2990
2990
  };
2991
2991
  var affixOutsideClasses = "inline-flex items-center border border-zinc-300 bg-zinc-50 px-3 text-sm text-zinc-500 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400";
2992
2992
  function InputWrapper({
@@ -3025,7 +3025,7 @@ function InputWrapper({
3025
3025
  hasOutsidePrefix && !hasOutsideSuffix && "[&_input]:rounded-l-none [&_select]:rounded-l-none [&_textarea]:rounded-l-none",
3026
3026
  !hasOutsidePrefix && hasOutsideSuffix && "[&_input]:rounded-r-none [&_select]:rounded-r-none [&_textarea]:rounded-r-none",
3027
3027
  hasOutsidePrefix && hasOutsideSuffix && "[&_input]:rounded-none [&_select]:rounded-none [&_textarea]:rounded-none",
3028
- hasInsidePrefix && `[&_input]:${insidePaddingLeft[size]} [&_select]:${insidePaddingLeft[size]} [&_textarea]:${insidePaddingLeft[size]}`
3028
+ hasInsidePrefix && insidePaddingLeft[size]
3029
3029
  ),
3030
3030
  children
3031
3031
  }
@@ -3044,8 +3044,8 @@ function InputWrapper({
3044
3044
  {
3045
3045
  className: cn(
3046
3046
  "w-full",
3047
- hasInsidePrefix && `[&_input]:${insidePaddingLeft[size]} [&_select]:${insidePaddingLeft[size]} [&_textarea]:${insidePaddingLeft[size]}`,
3048
- hasInsideSuffix && `[&_input]:${insidePaddingRight[size]} [&_select]:${insidePaddingRight[size]} [&_textarea]:${insidePaddingRight[size]}`
3047
+ hasInsidePrefix && insidePaddingLeft[size],
3048
+ hasInsideSuffix && insidePaddingRight[size]
3049
3049
  ),
3050
3050
  children
3051
3051
  }
@@ -5524,7 +5524,7 @@ function TableRow({
5524
5524
  hasTray && expanded && /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "bg-zinc-50/50 dark:bg-zinc-800/30", children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 999, children: tray }) })
5525
5525
  ] });
5526
5526
  }
5527
- function TableCell({ children, className, header }) {
5527
+ function TableCell({ children, className, header, ...rest }) {
5528
5528
  const Tag = header ? "th" : "td";
5529
5529
  return /* @__PURE__ */ jsxRuntime.jsx(
5530
5530
  Tag,
@@ -5535,6 +5535,7 @@ function TableCell({ children, className, header }) {
5535
5535
  header && "text-left font-medium text-zinc-500 dark:text-zinc-400",
5536
5536
  className
5537
5537
  ),
5538
+ ...rest,
5538
5539
  children
5539
5540
  }
5540
5541
  );
@@ -7930,7 +7931,8 @@ function ModalRoot({
7930
7931
  open,
7931
7932
  onClose,
7932
7933
  size = "md",
7933
- className
7934
+ className,
7935
+ ...rest
7934
7936
  }) {
7935
7937
  const panelRef = react.useRef(null);
7936
7938
  const close = react.useCallback(() => onClose(), [onClose]);
@@ -7971,6 +7973,7 @@ function ModalRoot({
7971
7973
  "data-react-fancy-modal": "",
7972
7974
  role: "dialog",
7973
7975
  "aria-modal": "true",
7976
+ ...rest,
7974
7977
  className: cn(
7975
7978
  "relative flex w-full flex-col overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-xl dark:border-zinc-700 dark:bg-zinc-900",
7976
7979
  SIZE_MAP[size],
@@ -8338,7 +8341,9 @@ function TabsTab({
8338
8341
  children,
8339
8342
  value,
8340
8343
  disabled = false,
8341
- className
8344
+ className,
8345
+ onClick,
8346
+ ...rest
8342
8347
  }) {
8343
8348
  const { activeTab, setActiveTab, variant } = useTabs();
8344
8349
  const isActive = activeTab === value;
@@ -8351,7 +8356,11 @@ function TabsTab({
8351
8356
  disabled,
8352
8357
  "aria-selected": isActive,
8353
8358
  tabIndex: isActive ? 0 : -1,
8354
- onClick: () => !disabled && setActiveTab(value),
8359
+ onClick: (e) => {
8360
+ if (!disabled) setActiveTab(value);
8361
+ onClick?.(e);
8362
+ },
8363
+ ...rest,
8355
8364
  className: cn(
8356
8365
  "text-sm font-medium transition-colors",
8357
8366
  disabled && "cursor-not-allowed opacity-50",