@primereact/core 11.0.0-rc.1 → 11.0.0-rc.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.
Files changed (121) hide show
  1. package/api/{index.d.mts → FilterMatchMode.d.ts} +2 -10
  2. package/api/FilterOperator.d.ts +5 -0
  3. package/api/index.d.ts +2 -0
  4. package/api/index.mjs +0 -1
  5. package/base/index.d.ts +1 -0
  6. package/base/index.mjs +1 -2
  7. package/base/{index.d.mts → useBase.d.ts} +2 -5
  8. package/component/Component.d.ts +11 -0
  9. package/component/Component.props.d.ts +3 -0
  10. package/component/Component.utils.d.ts +12 -0
  11. package/component/index.d.ts +4 -0
  12. package/component/index.mjs +1 -2
  13. package/component/useComponent.d.ts +30 -0
  14. package/component/useComponentPT.d.ts +9 -0
  15. package/component/useComponentStyle.d.ts +10 -0
  16. package/component/useComponentStyleHandler.d.ts +51 -0
  17. package/component/withComponent.d.ts +24 -0
  18. package/config/PrimeReact.context.d.ts +4 -0
  19. package/config/PrimeReact.props.d.ts +2 -0
  20. package/config/index.d.ts +3 -0
  21. package/config/index.mjs +3 -2
  22. package/config/usePrimeReact.d.ts +6 -0
  23. package/dnd/announcements.d.ts +5 -0
  24. package/dnd/collision.d.ts +39 -0
  25. package/dnd/createDnd.d.ts +15 -0
  26. package/dnd/index.d.ts +3 -0
  27. package/dnd/index.mjs +1 -2
  28. package/dnd/sortable.d.ts +56 -0
  29. package/dnd/utils.d.ts +21 -0
  30. package/headless/index.d.ts +2 -0
  31. package/headless/index.mjs +0 -1
  32. package/headless/useHeadless.d.ts +9 -0
  33. package/headless/withHeadless.d.ts +15 -0
  34. package/icon/Icon.d.ts +4 -0
  35. package/icon/Icon.props.d.ts +2 -0
  36. package/icon/Icon.style.d.ts +2 -0
  37. package/icon/index.d.ts +5 -0
  38. package/icon/index.mjs +3 -2
  39. package/icon/useIcon.d.ts +6 -0
  40. package/icon/withIcon.d.ts +24 -0
  41. package/{index.d.mts → index.d.ts} +1 -0
  42. package/index.mjs +0 -1
  43. package/license/index.d.ts +1 -0
  44. package/license/index.mjs +1 -2
  45. package/license/{index.d.mts → licensebanner.d.ts} +1 -3
  46. package/locale/Locale.context.d.ts +4 -0
  47. package/locale/Locale.props.d.ts +2 -0
  48. package/locale/defaultLocale.d.ts +125 -0
  49. package/locale/index.d.ts +5 -0
  50. package/locale/index.mjs +3 -2
  51. package/locale/useLocale.d.ts +6 -0
  52. package/motion/Motion.context.d.ts +5 -0
  53. package/motion/Motion.d.ts +4 -0
  54. package/motion/Motion.props.d.ts +2 -0
  55. package/motion/Motion.utils.d.ts +4 -0
  56. package/motion/index.d.ts +5 -0
  57. package/motion/index.mjs +3 -2
  58. package/motion/useMotion.d.ts +23 -0
  59. package/motion/useMotion.props.d.ts +2 -0
  60. package/overlay-manager/{index.d.mts → OverlayManager.d.ts} +7 -10
  61. package/overlay-manager/index.d.ts +1 -0
  62. package/overlay-manager/index.mjs +1 -2
  63. package/package.json +14 -11
  64. package/passthrough/PassThrough.context.d.ts +4 -0
  65. package/passthrough/PassThrough.props.d.ts +2 -0
  66. package/passthrough/index.d.ts +3 -0
  67. package/passthrough/index.mjs +2 -1
  68. package/passthrough/usePassThrough.d.ts +1 -0
  69. package/stylesheet/PrimeReactStyleSheet.d.ts +7 -0
  70. package/stylesheet/index.d.ts +1 -0
  71. package/stylesheet/index.mjs +1 -2
  72. package/theme/Theme.context.d.ts +4 -0
  73. package/theme/Theme.props.d.ts +2 -0
  74. package/theme/index.d.ts +3 -0
  75. package/theme/index.mjs +3 -2
  76. package/theme/useTheme.d.ts +1 -0
  77. package/umd/index.js +5 -4
  78. package/use-style/index.d.ts +2 -0
  79. package/use-style/index.mjs +1 -2
  80. package/use-style/useStyle.d.ts +2 -0
  81. package/use-style/useStyle.props.d.ts +1 -0
  82. package/utils/ConnectedOverlayScrollHandler.d.ts +10 -0
  83. package/utils/combinedRefs.d.ts +2 -0
  84. package/utils/createContext.d.ts +9 -0
  85. package/utils/env.d.ts +1 -0
  86. package/utils/index.d.ts +10 -0
  87. package/utils/index.mjs +3 -2
  88. package/utils/mergeRefs.d.ts +11 -0
  89. package/utils/overlayEventBus.d.ts +9 -0
  90. package/utils/stylePreloadRegistry.d.ts +33 -0
  91. package/utils/styleRegistry.d.ts +19 -0
  92. package/api/index.mjs.map +0 -1
  93. package/base/index.mjs.map +0 -1
  94. package/component/index.d.mts +0 -71
  95. package/component/index.mjs.map +0 -1
  96. package/config/index.d.mts +0 -17
  97. package/config/index.mjs.map +0 -1
  98. package/dnd/index.d.mts +0 -69
  99. package/dnd/index.mjs.map +0 -1
  100. package/headless/index.d.mts +0 -28
  101. package/headless/index.mjs.map +0 -1
  102. package/icon/index.d.mts +0 -40
  103. package/icon/index.mjs.map +0 -1
  104. package/index.mjs.map +0 -1
  105. package/license/index.mjs.map +0 -1
  106. package/locale/index.d.mts +0 -12
  107. package/locale/index.mjs.map +0 -1
  108. package/motion/index.d.mts +0 -42
  109. package/motion/index.mjs.map +0 -1
  110. package/overlay-manager/index.mjs.map +0 -1
  111. package/passthrough/index.d.mts +0 -12
  112. package/passthrough/index.mjs.map +0 -1
  113. package/stylesheet/index.d.mts +0 -10
  114. package/stylesheet/index.mjs.map +0 -1
  115. package/theme/index.d.mts +0 -12
  116. package/theme/index.mjs.map +0 -1
  117. package/umd/index.js.map +0 -1
  118. package/use-style/index.d.mts +0 -7
  119. package/use-style/index.mjs.map +0 -1
  120. package/utils/index.d.mts +0 -104
  121. package/utils/index.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ export * from './useStyle';
2
+ export * from './useStyle.props';
@@ -1,2 +1 @@
1
- import{ThemeContext as m}from"@primereact/core/theme";import{isClient as y,isNotEmpty as f}from"@primeuix/utils";import*as n from"react";function R(){let t=n.useContext(m),i=n.useCallback((o={})=>{let{name:e,css:s,element:r,options:a={}}=o;if(y()&&f(s)){let l=r==null?void 0:r.getRootNode();(!l||l===document)&&(l=document.head);let c=l.querySelector(`style[data-primereact-style-id="${e}"]`)||document.createElement("style");c.isConnected||(a!=null&&a.first?l.prepend(c):l.appendChild(c),c.setAttribute("data-primereact-style-id",e||""));let d=s!=null?s:"";return c.textContent!==d&&(c.textContent=d),c}},[]),p=n.useCallback((o={})=>{var r,a;let{name:e,css:s}=o;if(f(o.css))return e&&!((r=t==null?void 0:t.stylesheet)!=null&&r.has(e))&&!y()&&e!=="layer-order"&&((a=t==null?void 0:t.stylesheet)==null||a.add(e,s)),i(o)},[t,i]),u=n.useCallback(()=>{t!=null&&t.stylesheet&&t.stylesheet.clear()},[t]);return n.useInsertionEffect(()=>{var o,e;(e=(o=t==null?void 0:t.stylesheet)==null?void 0:o.getStyles())==null||e.forEach((s,r)=>{i({name:r,css:s==null?void 0:s.css})})},[t,i]),[p,u]}var E={};export{E as defaultUseStyleProps,R as useStyle};
2
- //# sourceMappingURL=index.mjs.map
1
+ import{ThemeContext as f}from"@primereact/core/theme";import{isClient as i,isNotEmpty as m}from"@primeuix/utils";import*as s from"react";function x(){let t=s.useContext(f),a=s.useCallback((o={})=>{let{name:e,css:c,element:p,options:y={}}=o;if(i()&&m(c)){let r=p?.getRootNode();(!r||r===document)&&(r=document.head);let n=r.querySelector(`style[data-primereact-style-id="${e}"]`)||document.createElement("style");n.isConnected||(y?.first?r.prepend(n):r.appendChild(n),n.setAttribute("data-primereact-style-id",e||""));let l=c??"";return n.textContent!==l&&(n.textContent=l),n}},[]),d=s.useCallback((o={})=>{let{name:e,css:c}=o;if(m(o.css))return e&&!t?.stylesheet?.has(e)&&!i()&&e!=="layer-order"&&t?.stylesheet?.add(e,c),a(o)},[t,a]),u=s.useCallback(()=>{t?.stylesheet&&t.stylesheet.clear()},[t]);return s.useInsertionEffect(()=>{t?.stylesheet?.getStyles()?.forEach((o,e)=>{a({name:e,css:o?.css})})},[t,a]),[d,u]}var S={};export{S as defaultUseStyleProps,x as useStyle};
@@ -0,0 +1,2 @@
1
+ import type { useStyleLoadOptions } from '@primereact/types/core';
2
+ export declare function useStyle(): (((loadOptions?: useStyleLoadOptions) => Element | undefined) | (() => void))[];
@@ -0,0 +1 @@
1
+ export declare const defaultUseStyleProps: {};
@@ -0,0 +1,10 @@
1
+ export declare class ConnectedOverlayScrollHandler {
2
+ private element;
3
+ private listener;
4
+ private scrollableParents;
5
+ private isBound;
6
+ constructor(element: HTMLElement | null, listener?: () => void);
7
+ bindScrollListener(): void;
8
+ unbindScrollListener(): void;
9
+ destroy(): void;
10
+ }
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const combinedRefs: <I = unknown>(innerRef?: React.Ref<I>, forwardRef?: React.Ref<unknown>) => void;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export declare function createSafeContext<T>(defaultValue?: T, message?: string): readonly [({ value, children }: {
3
+ value: T;
4
+ children: React.ReactNode;
5
+ }) => React.JSX.Element, () => T | undefined];
6
+ export declare function createOptionalContext<T>(defaultValue?: T): readonly [({ value, children }: {
7
+ value: T;
8
+ children: React.ReactNode;
9
+ }) => React.JSX.Element, () => T | undefined];
package/utils/env.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const isDev: boolean;
@@ -0,0 +1,10 @@
1
+ export * from './combinedRefs';
2
+ export * from './ConnectedOverlayScrollHandler';
3
+ export * from './createContext';
4
+ export * from './env';
5
+ export * from './mergeRefs';
6
+ export * from './overlayEventBus';
7
+ export * from './stylePreloadRegistry';
8
+ export * from './styleRegistry';
9
+ export declare function isValidElement(obj: any): obj is React.ReactElement;
10
+ export declare function isElementOfType(obj: any, name: string): boolean;
package/utils/index.mjs CHANGED
@@ -1,2 +1,3 @@
1
- var P=(e,t)=>{e&&t&&t!==e&&(typeof t=="function"?t(e&&"current"in e?e.current:null):"current"in t&&"current"in e&&t.current!==e.current&&(t.current=e&&"current"in e?e.current:null))};import{getScrollableParents as p}from"@primeuix/utils/dom";var c=class{constructor(t,r=()=>{}){this.scrollableParents=null;this.isBound=!1;this.element=t,this.listener=r}bindScrollListener(){if(this.element){this.isBound&&this.unbindScrollListener(),this.scrollableParents=p(this.element);for(let t=0;t<this.scrollableParents.length;t++){let r=this.scrollableParents[t];r&&this.listener&&r.addEventListener("scroll",this.listener)}this.isBound=!0}}unbindScrollListener(){if(this.scrollableParents&&this.listener)for(let t=0;t<this.scrollableParents.length;t++){let r=this.scrollableParents[t];r&&r.removeEventListener("scroll",this.listener)}this.scrollableParents=null,this.isBound=!1}destroy(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null,this.isBound=!1}};import{resolve as m}from"@primeuix/utils";import*as n from"react";function u(e,t){let r=n.createContext(e);return[({value:o,children:a})=>{let y=n.useMemo(()=>m(a,o),[a,o]);return n.createElement(r.Provider,{value:o},y)},()=>{let o=n.useContext(r);return o===void 0?t==null?void 0:t():o}]}function T(e,t){return u(e,()=>{throw new Error(t||"Context must be used within a Provider")})}function _(e){return u(e,()=>e)}var d,b=typeof process!="undefined"&&((d=process.env)==null?void 0:d.NODE_ENV)!=="production";function A(...e){return t=>{for(let r of e)if(r!=null)if(typeof r=="function")r(t);else try{r.current=t}catch(s){}}}import{EventBus as h}from"@primeuix/utils/eventbus";var f=h(),$=f;var S=e=>{var t,r;return{id:e.id,css:e.css,phase:(t=e.phase)!=null?t:"both",priority:(r=e.priority)!=null?r:0}},l=e=>e.sort((t,r)=>{let s=t.priority-r.priority;return s!==0?s:t.id.localeCompare(r.id)}),w={_entries:new Map,register(e){!e.id||!e.css||this._entries.set(e.id,S(e))},registerMany(e=[]){e.forEach(t=>this.register(t))},has(e){return this._entries.has(e)},getAll(){return l([...this._entries.values()])},getForSSR(){return l([...this._entries.values()].filter(e=>e.phase!=="client"))},getForClient(){return l([...this._entries.values()].filter(e=>e.phase!=="ssr"))},clear(){this._entries.clear()}},I=(e,t)=>{t.forEach(r=>{e!=null&&e.has(r.id)||e==null||e.add(r.id,r.css)})},O=e=>{e.forEach(t=>{let r=document.head.querySelector(`style[data-primereact-style-id="${t.id}"]`)||document.createElement("style");r.isConnected||(document.head.appendChild(r),r.setAttribute("data-primereact-style-id",t.id)),r.textContent=t.css})};var D={_loadedStyleNames:new Set,_styleRefCount:new Map,getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){var t;return((t=this._styleRefCount.get(e))!=null?t:0)>0},getStyleRefCount(e){var t;return(t=this._styleRefCount.get(e))!=null?t:0},retainStyleName(e){let t=this.getStyleRefCount(e),r=t+1;return this._styleRefCount.set(e,r),this._loadedStyleNames.add(e),t===0},releaseStyleName(e){let t=this.getStyleRefCount(e);return t<=1?(this._styleRefCount.delete(e),this._loadedStyleNames.delete(e),!0):(this._styleRefCount.set(e,t-1),!1)},setLoadedStyleName(e){this.retainStyleName(e)},deleteLoadedStyleName(e){this._styleRefCount.delete(e),this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._styleRefCount.clear(),this._loadedStyleNames.clear()},getStats(){return{totalStyles:this._loadedStyleNames.size,styleRefCounts:Array.from(this._styleRefCount.entries()).map(([e,t])=>({name:e,refCount:t}))}}};var g=Symbol.for("react.element"),E=Symbol.for("react.transitional.element");function H(e){return typeof e=="object"&&e!==null&&(e.$$typeof===g||e.$$typeof===E)}function q(e,t){var s,i;if(typeof e!="object"||e===null)return!1;let r=e.displayName||((s=e.type)==null?void 0:s.displayName)||((i=e.type)==null?void 0:i.name);return r===t||(r==null?void 0:r.includes(`PrimeReact.${t}`))||(r==null?void 0:r.includes(`PrimeReact.UI${t}`))}export{c as ConnectedOverlayScrollHandler,$ as OverlayEventBus,w as StylePreloadRegistry,D as StyleRegistry,I as addStylePreloadsToStyleSheet,P as combinedRefs,_ as createOptionalContext,T as createSafeContext,b as isDev,q as isElementOfType,H as isValidElement,A as mergeRefs,O as upsertStylePreloadsToHead};
2
- //# sourceMappingURL=index.mjs.map
1
+ 'use client';
2
+
3
+ var E=(e,t)=>{e&&t&&t!==e&&(typeof t=="function"?t(e&&"current"in e?e.current:null):"current"in t&&"current"in e&&t.current!==e.current&&(t.current=e&&"current"in e?e.current:null))};import{getScrollableParents as u}from"@primeuix/utils/dom";var a=class{constructor(t,r=()=>{}){this.scrollableParents=null;this.isBound=!1;this.element=t,this.listener=r}bindScrollListener(){if(this.element){this.isBound&&this.unbindScrollListener(),this.scrollableParents=u(this.element);for(let t=0;t<this.scrollableParents.length;t++){let r=this.scrollableParents[t];r&&this.listener&&r.addEventListener("scroll",this.listener)}this.isBound=!0}}unbindScrollListener(){if(this.scrollableParents&&this.listener)for(let t=0;t<this.scrollableParents.length;t++){let r=this.scrollableParents[t];r&&r.removeEventListener("scroll",this.listener)}this.scrollableParents=null,this.isBound=!1}destroy(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null,this.isBound=!1}};import{resolve as y}from"@primeuix/utils";import*as s from"react";function c(e,t){let r=s.createContext(e);return[({value:n,children:l})=>{let d=s.useMemo(()=>y(l,n),[l,n]);return s.createElement(r.Provider,{value:n},d)},()=>{let n=s.useContext(r);return n===void 0?t?.():n}]}function N(e,t){return c(e,()=>{throw new Error(t||"Context must be used within a Provider")})}function R(e){return c(e,()=>e)}var _=typeof process<"u"&&process.env?.NODE_ENV!=="production";function L(...e){return t=>{for(let r of e)if(r!=null)if(typeof r=="function")r(t);else try{r.current=t}catch{}}}import{EventBus as p}from"@primeuix/utils/eventbus";var m=p(),k=m;var h=e=>({id:e.id,css:e.css,phase:e.phase??"both",priority:e.priority??0}),i=e=>e.sort((t,r)=>{let o=t.priority-r.priority;return o!==0?o:t.id.localeCompare(r.id)}),$={_entries:new Map,register(e){!e.id||!e.css||this._entries.set(e.id,h(e))},registerMany(e=[]){e.forEach(t=>this.register(t))},has(e){return this._entries.has(e)},getAll(){return i([...this._entries.values()])},getForSSR(){return i([...this._entries.values()].filter(e=>e.phase!=="client"))},getForClient(){return i([...this._entries.values()].filter(e=>e.phase!=="ssr"))},clear(){this._entries.clear()}},z=(e,t)=>{t.forEach(r=>{e?.has(r.id)||e?.add(r.id,r.css)})},w=e=>{e.forEach(t=>{let r=document.head.querySelector(`style[data-primereact-style-id="${t.id}"]`)||document.createElement("style");r.isConnected||(document.head.appendChild(r),r.setAttribute("data-primereact-style-id",t.id)),r.textContent=t.css})};var O={_loadedStyleNames:new Set,_styleRefCount:new Map,getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return(this._styleRefCount.get(e)??0)>0},getStyleRefCount(e){return this._styleRefCount.get(e)??0},retainStyleName(e){let t=this.getStyleRefCount(e),r=t+1;return this._styleRefCount.set(e,r),this._loadedStyleNames.add(e),t===0},releaseStyleName(e){let t=this.getStyleRefCount(e);return t<=1?(this._styleRefCount.delete(e),this._loadedStyleNames.delete(e),!0):(this._styleRefCount.set(e,t-1),!1)},setLoadedStyleName(e){this.retainStyleName(e)},deleteLoadedStyleName(e){this._styleRefCount.delete(e),this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._styleRefCount.clear(),this._loadedStyleNames.clear()},getStats(){return{totalStyles:this._loadedStyleNames.size,styleRefCounts:Array.from(this._styleRefCount.entries()).map(([e,t])=>({name:e,refCount:t}))}}};var f=Symbol.for("react.element"),S=Symbol.for("react.transitional.element");function F(e){return typeof e=="object"&&e!==null&&(e.$$typeof===f||e.$$typeof===S)}function H(e,t){if(typeof e!="object"||e===null)return!1;let r=e.displayName||e.type?.displayName||e.type?.name;return r===t||r?.includes(`PrimeReact.${t}`)||r?.includes(`PrimeReact.UI${t}`)}export{a as ConnectedOverlayScrollHandler,k as OverlayEventBus,$ as StylePreloadRegistry,O as StyleRegistry,z as addStylePreloadsToStyleSheet,E as combinedRefs,R as createOptionalContext,N as createSafeContext,_ as isDev,H as isElementOfType,F as isValidElement,L as mergeRefs,w as upsertStylePreloadsToHead};
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Merge multiple React refs (callback refs and ref objects, mixed) into a
4
+ * single callback ref. Each ref is updated whenever React assigns or clears
5
+ * the underlying value.
6
+ *
7
+ * Use this in component wrappers when you need to forward the rendered
8
+ * element / instance both to the local `elementRef` (used for styles, DOM
9
+ * access, composition) and to a ref the caller passed in via props.
10
+ */
11
+ export declare function mergeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
@@ -0,0 +1,9 @@
1
+ export interface OverlayClickPayload {
2
+ originalEvent: Event | React.SyntheticEvent;
3
+ target?: Element | null;
4
+ }
5
+ export declare const OverlayEventBus: {
6
+ emit: (name: string, payload?: unknown) => void;
7
+ on: (name: string, cb: (payload: unknown) => void) => void;
8
+ off: (name: string, cb: (payload: unknown) => void) => void;
9
+ };
@@ -0,0 +1,33 @@
1
+ import type { ThemeProps } from '@primereact/types/core';
2
+ export type StylePreloadPhase = 'ssr' | 'client' | 'both';
3
+ export type StylePreloadEntry = {
4
+ id: string;
5
+ css: string;
6
+ phase?: StylePreloadPhase;
7
+ priority?: number;
8
+ };
9
+ type NormalizedStylePreloadEntry = {
10
+ id: string;
11
+ css: string;
12
+ phase: StylePreloadPhase;
13
+ priority: number;
14
+ };
15
+ export declare const StylePreloadRegistry: {
16
+ _entries: Map<string, NormalizedStylePreloadEntry>;
17
+ register(entry: StylePreloadEntry): void;
18
+ registerMany(entries?: StylePreloadEntry[]): void;
19
+ has(id: string): boolean;
20
+ getAll(): NormalizedStylePreloadEntry[];
21
+ getForSSR(): NormalizedStylePreloadEntry[];
22
+ getForClient(): NormalizedStylePreloadEntry[];
23
+ clear(): void;
24
+ };
25
+ export declare const addStylePreloadsToStyleSheet: (stylesheet: ThemeProps["stylesheet"], styles: {
26
+ id: string;
27
+ css: string;
28
+ }[]) => void;
29
+ export declare const upsertStylePreloadsToHead: (styles: {
30
+ id: string;
31
+ css: string;
32
+ }[]) => void;
33
+ export {};
@@ -0,0 +1,19 @@
1
+ export declare const StyleRegistry: {
2
+ _loadedStyleNames: Set<string>;
3
+ _styleRefCount: Map<string, number>;
4
+ getLoadedStyleNames(): Set<string>;
5
+ isStyleNameLoaded(name: string): boolean;
6
+ getStyleRefCount(name: string): number;
7
+ retainStyleName(name: string): boolean;
8
+ releaseStyleName(name: string): boolean;
9
+ setLoadedStyleName(name: string): void;
10
+ deleteLoadedStyleName(name: string): void;
11
+ clearLoadedStyleNames(): void;
12
+ getStats(): {
13
+ totalStyles: number;
14
+ styleRefCounts: {
15
+ name: string;
16
+ refCount: number;
17
+ }[];
18
+ };
19
+ };
package/api/index.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/api/FilterMatchMode.ts","../../src/api/FilterOperator.ts"],"sourcesContent":["export const FilterMatchMode = Object.freeze({\n STARTS_WITH: 'startsWith',\n CONTAINS: 'contains',\n NOT_CONTAINS: 'notContains',\n ENDS_WITH: 'endsWith',\n EQUALS: 'equals',\n NOT_EQUALS: 'notEquals',\n IN: 'in',\n LESS_THAN: 'lt',\n LESS_THAN_OR_EQUAL_TO: 'lte',\n GREATER_THAN: 'gt',\n GREATER_THAN_OR_EQUAL_TO: 'gte',\n BETWEEN: 'between',\n DATE_IS: 'dateIs',\n DATE_IS_NOT: 'dateIsNot',\n DATE_BEFORE: 'dateBefore',\n DATE_AFTER: 'dateAfter',\n CUSTOM: 'custom'\n} as const);\n\nexport declare type FilterMatchModeType = (typeof FilterMatchMode)[keyof typeof FilterMatchMode];\n","export const FilterOperator = Object.freeze({ AND: 'and', OR: 'or' });\n\nexport declare type FilterOperatorType = (typeof FilterOperator)[keyof typeof FilterOperator];\n"],"mappings":"AAAO,IAAMA,EAAkB,OAAO,OAAO,CACzC,YAAa,aACb,SAAU,WACV,aAAc,cACd,UAAW,WACX,OAAQ,SACR,WAAY,YACZ,GAAI,KACJ,UAAW,KACX,sBAAuB,MACvB,aAAc,KACd,yBAA0B,MAC1B,QAAS,UACT,QAAS,SACT,YAAa,YACb,YAAa,aACb,WAAY,YACZ,OAAQ,QACZ,CAAU,EClBH,IAAMC,EAAiB,OAAO,OAAO,CAAE,IAAK,MAAO,GAAI,IAAK,CAAC","names":["FilterMatchMode","FilterOperator"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/base/useBase.ts"],"sourcesContent":["import { usePrimeReact } from '@primereact/core/config';\nimport { useAttrSelector, useId, useProps } from '@primereact/hooks';\nimport type { BaseInstance, BaseSetup, CommonInstance, Instance, useBaseOptions } from '@primereact/types/core';\nimport { resolve, toKebabCase } from '@primeuix/utils';\nimport * as React from 'react';\n\n/**\n * A custom hook for creating a base instance.\n * This hook is used to initialize a base instance with common properties and methods.\n * It handles props, attributes, and provides a setup function for additional configuration.\n * @param name The name of the base instance.\n * @param options The options for the base instance.\n * @returns The base instance.\n */\nexport const useBase = <IProps extends { id?: string; ref?: React.Ref<unknown> }, DProps, Exposes extends Record<PropertyKey, unknown>>(name: string = 'UnknownBase', options: useBaseOptions<IProps, DProps, Exposes>) => {\n const $primereact = usePrimeReact();\n const { type, inProps, defaultProps, setup } = options || {};\n\n const id = useId(inProps?.id as string | undefined);\n const $attrSelector = useAttrSelector('pc_');\n const [scope, part] = React.useMemo(() => name.toLowerCase().split('.'), [name]);\n\n const ref = React.useRef(null);\n const elementRef = React.useRef<HTMLElement | undefined>(undefined);\n\n const base = React.useMemo<BaseInstance<IProps>>(() => {\n return {\n ref,\n elementRef,\n id,\n name,\n type,\n scope,\n part: toKebabCase(part),\n inProps,\n $attrSelector,\n $primereact\n };\n }, [id, inProps, $attrSelector, $primereact, name, type]);\n\n const globalDefaultsConfig = $primereact.config?.defaults;\n const computedDefaultProps = React.useMemo<DProps>(() => {\n const globalDefaults = resolve(globalDefaultsConfig?.[name] || globalDefaultsConfig?.[name.toLowerCase()], base) as { props?: DProps } | undefined;\n\n return { ...defaultProps, ...globalDefaults?.props } as DProps;\n }, [defaultProps, globalDefaultsConfig, name]);\n\n const { props, attrs } = useProps(computedDefaultProps, inProps);\n\n const common = React.useMemo<CommonInstance<typeof props, IProps>>(\n () => ({\n ...base,\n props,\n attrs\n }),\n [base, props, attrs]\n );\n\n const $computedSetup = resolve(setup as BaseSetup<typeof props, IProps, Exposes>, common) as Exposes;\n\n const instance = React.useMemo<Instance<typeof props, IProps, Record<PropertyKey, unknown>, Exposes>>(\n () => ({\n state: {},\n $computedSetup,\n ...$computedSetup,\n ...common,\n elementRef: ($computedSetup?.elementRef ?? elementRef) as React.RefObject<HTMLElement | undefined>\n }),\n [$computedSetup, common]\n );\n\n /*React.useEffect(() => {\n combinedRefs(ref, inProps?.ref);\n }, [inProps?.ref]);\n\n combinedRefs(ref, inProps?.ref);*/\n\n React.useImperativeHandle(ref as React.Ref<Instance<typeof props, IProps, typeof instance.state, Exposes>>, () => instance, [instance]);\n\n return instance;\n};\n"],"mappings":"6aAAA,OAAS,iBAAAA,MAAqB,0BAC9B,OAAS,mBAAAC,EAAiB,SAAAC,EAAO,YAAAC,MAAgB,oBAEjD,OAAS,WAAAC,EAAS,eAAAC,MAAmB,kBACrC,UAAYC,MAAW,QAUhB,IAAMC,EAAU,CAAiHC,EAAe,cAAeC,IAAqD,CAd3N,IAAAC,EAeI,IAAMC,EAAcC,EAAc,EAC5B,CAAE,KAAAC,EAAM,QAAAC,EAAS,aAAAC,EAAc,MAAAC,CAAM,EAAIP,GAAW,CAAC,EAErDQ,EAAKC,EAAMJ,GAAA,YAAAA,EAAS,EAAwB,EAC5CK,EAAgBC,EAAgB,KAAK,EACrC,CAACC,EAAOC,CAAI,EAAU,UAAQ,IAAMd,EAAK,YAAY,EAAE,MAAM,GAAG,EAAG,CAACA,CAAI,CAAC,EAEzEe,EAAY,SAAO,IAAI,EACvBC,EAAmB,SAAgC,MAAS,EAE5DC,EAAa,UAA8B,KACtC,CACH,IAAAF,EACA,WAAAC,EACA,GAAAP,EACA,KAAAT,EACA,KAAAK,EACA,MAAAQ,EACA,KAAMK,EAAYJ,CAAI,EACtB,QAAAR,EACA,cAAAK,EACA,YAAAR,CACJ,GACD,CAACM,EAAIH,EAASK,EAAeR,EAAaH,EAAMK,CAAI,CAAC,EAElDc,GAAuBjB,EAAAC,EAAY,SAAZ,YAAAD,EAAoB,SAC3CkB,EAA6B,UAAgB,IAAM,CACrD,IAAMC,EAAiBC,GAAQH,GAAA,YAAAA,EAAuBnB,MAASmB,GAAA,YAAAA,EAAuBnB,EAAK,YAAY,IAAIiB,CAAI,EAE/G,OAAOM,IAAA,GAAKhB,GAAiBc,GAAA,YAAAA,EAAgB,MACjD,EAAG,CAACd,EAAcY,EAAsBnB,CAAI,CAAC,EAEvC,CAAE,MAAAwB,EAAO,MAAAC,CAAM,EAAIC,EAASN,EAAsBd,CAAO,EAEzDqB,EAAe,UACjB,IAAOC,EAAAL,EAAA,GACAN,GADA,CAEH,MAAAO,EACA,MAAAC,CACJ,GACA,CAACR,EAAMO,EAAOC,CAAK,CACvB,EAEMI,EAAiBP,EAAQd,EAAmDmB,CAAM,EAElFG,EAAiB,UACnB,IAAG,CA7DX,IAAA5B,EA6De,OAAA0B,EAAAL,IAAA,CACH,MAAO,CAAC,EACR,eAAAM,GACGA,GACAF,GAJA,CAKH,YAAazB,EAAA2B,GAAA,YAAAA,EAAgB,aAAhB,KAAA3B,EAA8Bc,CAC/C,IACA,CAACa,EAAgBF,CAAM,CAC3B,EAQA,OAAM,sBAAoBZ,EAAkF,IAAMe,EAAU,CAACA,CAAQ,CAAC,EAE/HA,CACX","names":["usePrimeReact","useAttrSelector","useId","useProps","resolve","toKebabCase","React","useBase","name","options","_a","$primereact","usePrimeReact","type","inProps","defaultProps","setup","id","useId","$attrSelector","useAttrSelector","scope","part","ref","elementRef","base","toKebabCase","globalDefaultsConfig","computedDefaultProps","globalDefaults","resolve","__spreadValues","props","attrs","useProps","common","__spreadProps","$computedSetup","instance"]}
@@ -1,71 +0,0 @@
1
- import * as _primereact_types_core from '@primereact/types/core';
2
- import { ComponentInstance, ComponentProps, GlobalComponentProps, useComponentOptions, InComponentInstance, withComponentOptions } from '@primereact/types/core';
3
- import * as React from 'react';
4
- import * as _primereact_types_types from '@primereact/types/types';
5
- import * as _primereact_types_styles from '@primereact/types/styles';
6
- import { StylesOptions } from '@primereact/types/styles';
7
- import * as _primereact_types from '@primereact/types';
8
-
9
- /**
10
- * A component wrapper for rendering elements with additional props and attributes.
11
- * @param inProps The properties to pass to the component.
12
- * @returns A React element or null if `pIf` is false.
13
- */
14
- declare function Component<I extends ComponentInstance = ComponentInstance>(inProps?: ComponentProps<I>): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<React.ReactNode> | React.JSX.Element | null | undefined;
15
- declare namespace Component {
16
- var displayName: string;
17
- }
18
-
19
- declare const globalProps: GlobalComponentProps;
20
- declare const defaultComponentProps: ComponentProps;
21
-
22
- /**
23
- * A hook for creating a component instance.
24
- * This hook initializes a component with properties, attributes, and styles, and provides methods for handling pass-through options and styles.
25
- * It also supports custom setup functions for additional configuration.
26
- *
27
- * @param name The name of the component, used for debugging and identification.
28
- * @param options The options to customize the component instance.
29
- * @returns The component instance.
30
- */
31
- declare function useComponent<IProps, DProps, Exposes extends Record<PropertyKey, unknown>, Styles>(name?: string, options?: useComponentOptions<IProps, DProps, Exposes, Styles>): InComponentInstance<_primereact_types_types.SafeRecord<Pick<{
32
- ref?: React.Ref<unknown> | undefined;
33
- pIf?: boolean | undefined;
34
- style?: React.CSSProperties | ((instance?: _primereact_types_core.ComponentInstance<Record<PropertyKey, unknown>, Record<PropertyKey, unknown>, Record<PropertyKey, unknown>> | undefined) => React.CSSProperties | undefined) | undefined;
35
- className?: string | ((instance?: _primereact_types_core.ComponentInstance<Record<PropertyKey, unknown>, Record<PropertyKey, unknown>, Record<PropertyKey, unknown>> | undefined) => string | undefined) | undefined;
36
- as?: string | number | bigint | boolean | React.ComponentClass<any, any> | React.FunctionComponent<any> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
37
- asChild?: boolean | undefined;
38
- instance?: _primereact_types_core.ComponentInstance<Record<PropertyKey, unknown>, Record<PropertyKey, unknown>, Record<PropertyKey, unknown>> | undefined;
39
- pt?: Record<PropertyKey, unknown> | undefined;
40
- ptOptions?: _primereact_types_core.PassThroughOptions | undefined;
41
- unstyled?: boolean | undefined;
42
- dt?: unknown;
43
- styles?: _primereact_types_styles.StylesOptions | undefined;
44
- render?: ((instance: _primereact_types_core.ComponentInstance<Record<PropertyKey, unknown>, Record<PropertyKey, unknown>, Record<PropertyKey, unknown>>) => React.ReactNode) | undefined;
45
- children?: any;
46
- } & IProps & {
47
- id?: string;
48
- ref?: React.Ref<unknown>;
49
- }, "dt" | "style" | "children" | "ref" | "pIf" | "className" | "as" | "asChild" | "instance" | "pt" | "ptOptions" | "unstyled" | "styles" | "render">>, IProps, Record<PropertyKey, unknown>, Exposes>;
50
-
51
- /**
52
- * A higher-order component for enhancing a component with additional features.
53
- *
54
- * @template IProps The interface for the component's input properties.
55
- * @template DProps The interface for the component's default properties.
56
- * @template Exposes The interface for the properties that the component exposes.
57
- * @template Styles The styles options for the component.
58
- * @template CData Additional data to expose on the component.
59
- *
60
- * @param options The options for the component.
61
- * @param options.name The name of the component, used for debugging and identification.
62
- * @param options.defaultProps The default properties for the component.
63
- * @param options.styles The styles to apply to the component.
64
- * @param options.components Additional components to include in the component.
65
- * @param options.setup A setup function for additional configuration of the component.
66
- * @param options.render A render function for the component.
67
- * @returns A React component wrapped with the specified options.
68
- */
69
- declare function withComponent<IProps, DProps, Exposes extends Record<PropertyKey, unknown> = Record<PropertyKey, unknown>, Styles = StylesOptions, CData = Record<string, unknown>>({ name, type, defaultProps, styles, components, setup, render }: withComponentOptions<IProps, DProps, Exposes, Styles, CData>): (<I extends ComponentInstance, T extends React.ElementType>(inProps?: IProps & _primereact_types_core.GlobalComponentProps<I, unknown, T, unknown, unknown> & {} & {} & Omit<_primereact_types.ExtractProps<T>, keyof _primereact_types_core.GlobalComponentProps<I_1, P, T_1, unknown, unknown> | keyof IProps> & DProps) => React.JSX.Element | null) & CData & React.FC<{}>;
70
-
71
- export { Component, defaultComponentProps, globalProps, useComponent, withComponent };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/component/Component.tsx","../../src/component/Component.props.ts","../../src/component/useComponent.ts","../../src/component/useComponentPT.ts","../../src/component/Component.utils.ts","../../src/component/useComponentStyle.ts","../../src/component/useComponentStyleHandler.ts","../../src/component/withComponent.tsx"],"sourcesContent":["import { isValidElement, mergeRefs } from '@primereact/core/utils';\nimport type { ComponentInstance, ComponentProps } from '@primereact/types/core';\nimport { cn, resolve } from '@primeuix/utils';\nimport * as React from 'react';\n\n/**\n * A component wrapper for rendering elements with additional props and attributes.\n * @param inProps The properties to pass to the component.\n * @returns A React element or null if `pIf` is false.\n */\nexport function Component<I extends ComponentInstance = ComponentInstance>(inProps: ComponentProps<I> = {}) {\n const { pIf = true, style, className, as, asChild, instance, render, ...props } = inProps;\n\n if (pIf === false) return null;\n\n const AsComponent = (as || instance?.props?.as || React.Fragment) as React.ElementType;\n const renderAsChild = render || asChild || instance?.props?.asChild;\n const isFragment = AsComponent === React.Fragment;\n\n const { ref: propRef, children, attrs: inAttrs, ...restAttrs } = props;\n const attrs = { ...inAttrs, ...restAttrs } as React.HTMLAttributes<HTMLElement> & React.RefAttributes<unknown>;\n const content = resolve(render ?? children, instance, attrs) as React.ReactNode;\n const styles = resolve(style || instance?.props?.style, instance) as React.CSSProperties | undefined;\n const classNames = resolve(className || instance?.props?.className, instance) as string | undefined;\n\n if (renderAsChild || isFragment) {\n return <React.Fragment>{content}</React.Fragment>;\n } else if (isValidElement(AsComponent)) {\n return resolve(AsComponent, instance);\n } else {\n const asProps = {\n ...attrs,\n style: { ...attrs.style, ...styles },\n className: cn(attrs.className, classNames)\n } as React.HTMLAttributes<HTMLElement>;\n\n // Merge refs so the rendered child fans its instance out to:\n // 1. `instance.elementRef` — drives styles, composition, `toElement` chains\n // 2. caller-supplied refs (`attrs.ref`, `props.ref`, `instance.props.ref`)\n // For nested wrappers (e.g. `<DatePicker.Input as={InputText}>`), this\n // ensures the outer wrapper's `elementRef.current` actually receives\n // the inner instance once it commits.\n const asRef = mergeRefs(instance?.elementRef as React.Ref<unknown> | undefined, attrs.ref as React.Ref<unknown> | undefined, propRef as React.Ref<unknown> | undefined, (instance?.props as { ref?: React.Ref<unknown> } | undefined)?.ref);\n\n return asProps.children ? (\n <AsComponent {...asProps} ref={asRef} />\n ) : (\n <AsComponent {...asProps} ref={asRef}>\n {content}\n </AsComponent>\n );\n }\n}\n\nComponent.displayName = 'PrimeReact.Component';\n","import type { ComponentProps, GlobalComponentProps } from '@primereact/types/core';\nimport { omit } from '@primeuix/utils';\n\nexport const globalProps: GlobalComponentProps = Object.freeze({\n ref: undefined,\n pIf: true,\n style: undefined,\n className: undefined,\n as: undefined,\n asChild: false,\n instance: undefined,\n pt: undefined,\n ptOptions: undefined,\n unstyled: undefined,\n dt: undefined,\n styles: undefined,\n render: undefined,\n children: undefined\n});\n\nexport const defaultComponentProps: ComponentProps = Object.freeze({\n ...(omit(globalProps, 'pt', 'ptOptions', 'dt', 'styles') as Record<PropertyKey, unknown>),\n attrs: undefined\n});\n","import { useBase } from '@primereact/core/base';\nimport type { InComponentInstance, useBaseOptions, useComponentOptions } from '@primereact/types/core';\nimport * as React from 'react';\nimport { globalProps } from './Component.props';\nimport { useComponentPT } from './useComponentPT';\nimport { useComponentStyle } from './useComponentStyle';\n\n/**\n * A hook for creating a component instance.\n * This hook initializes a component with properties, attributes, and styles, and provides methods for handling pass-through options and styles.\n * It also supports custom setup functions for additional configuration.\n *\n * @param name The name of the component, used for debugging and identification.\n * @param options The options to customize the component instance.\n * @returns The component instance.\n */\nexport function useComponent<IProps, DProps, Exposes extends Record<PropertyKey, unknown>, Styles>(name: string = 'UnknownComponent', options: useComponentOptions<IProps, DProps, Exposes, Styles> = {}) {\n const defaultProps = React.useMemo(() => ({ ...globalProps, ...options.defaultProps }), [options.defaultProps]);\n const baseInstance = useBase(name, {\n type: options.type,\n inProps: options.inProps,\n defaultProps,\n setup: options.setup\n } as useBaseOptions<IProps & { id?: string; ref?: React.Ref<unknown> }, typeof defaultProps, Exposes>);\n\n const { ref, props } = baseInstance;\n const $params = React.useMemo(() => {\n return {\n instance: baseInstance,\n props: baseInstance.props,\n attrs: baseInstance.attrs,\n state: baseInstance.state\n };\n }, [baseInstance.props, baseInstance.attrs, baseInstance.state]);\n\n const ptx = useComponentPT(baseInstance, $params);\n const stx = useComponentStyle(baseInstance, props.styles || options.styles, $params);\n\n const instance = React.useMemo<InComponentInstance<typeof props, IProps, typeof baseInstance.state, Exposes>>(\n () => ({\n ...baseInstance,\n ...ptx,\n ...stx\n }),\n [baseInstance, ptx, stx]\n );\n\n React.useImperativeHandle(ref as React.Ref<InComponentInstance<typeof props, IProps, typeof baseInstance.state, Exposes>>, () => instance, [instance]);\n\n return instance;\n}\n","import { useMountEffect, useUnmountEffect, useUpdateEffect } from '@primereact/hooks';\nimport type { GlobalComponentProps, Instance, PassThroughOptions, useComponentPTReturnType } from '@primereact/types/core';\nimport { mergeProps as primeuix_mergeProps } from '@primeuix/utils/mergeprops';\nimport { getKeyValue, isNotEmpty, isString, resolve } from '@primeuix/utils/object';\nimport * as React from 'react';\nimport { getPT, getPTClassValue, mergeProps } from './Component.utils';\n\n/**\n * A hook for managing pass-through options for a component.\n *\n * @param instance The instance of the component.\n * @param $params Additional parameters for the hook.\n * @returns An object containing the pass-through options.\n */\nexport function useComponentPT<Props extends GlobalComponentProps, IProps, Params>(instance: Instance<Props, IProps>, $params?: Params): useComponentPTReturnType {\n const { id, name, scope, part, props, attrs, $primereact, $attrSelector } = instance || {};\n const passthrough = $primereact?.passthrough;\n const passthroughValue = passthrough?.value;\n const passthroughOptions = passthrough?.options;\n\n const _usePT = React.useCallback(\n <Fn>(pt: Record<string, unknown>, fn: Fn, key: string = '', params?: Record<string, unknown>) => {\n const vfn = (value: unknown) => (fn as (...args: unknown[]) => unknown)(value, key, params);\n\n if (pt && Object.hasOwn(pt, '_usept')) {\n const { mergeSections = true, mergeProps: useMergeProps = false } = (pt['_usept'] || passthroughOptions || {}) as PassThroughOptions;\n const originalValue = vfn(pt.originalValue);\n const value = vfn(pt.value);\n\n if (originalValue === undefined && value === undefined) return undefined;\n else if (isString(value)) return value;\n else if (isString(originalValue)) return originalValue;\n\n return mergeSections || (!mergeSections && value) ? mergeProps(useMergeProps, originalValue, value) : value;\n }\n\n return vfn(pt);\n },\n [passthroughOptions]\n );\n\n const _hook = React.useCallback(\n (hookName: string) => {\n const selfHook = _usePT(getPT(props.pt, name, name), getKeyValue, `hooks.${hookName}`) as (() => void) | undefined;\n const defaultHook = _usePT(getPT(passthroughValue, undefined, name), getKeyValue, `hooks.${hookName}`) as (() => void) | undefined;\n\n selfHook?.();\n defaultHook?.();\n },\n [props.pt, name, _usePT, passthroughValue]\n );\n\n // computed values\n const $globalPT = React.useMemo(() => getPT(passthroughValue, undefined, name, (value) => resolve(value, instance)), [passthroughValue, name]);\n const $defaultPT = React.useMemo(() => getPT(passthroughValue, undefined, name, (value) => getKeyValue(value as Record<string, unknown>, name, instance) || resolve(value, instance)), [passthroughValue, name]);\n\n const $attrsPT = React.useMemo(() => {\n return Object.entries(attrs || {})\n .filter(([key]) => key?.startsWith('pt-'))\n .reduce<Record<string, unknown>>((result, [key, value]) => {\n const [, slot, ...rest] = key.split('-');\n\n [slot, rest?.join('-')].filter(Boolean).reduce((currentObj, nestedKey, index, array) => {\n if (!currentObj[nestedKey]) {\n currentObj[nestedKey] = index === array.length - 1 ? value : {};\n }\n\n return currentObj[nestedKey] as Record<string, unknown>;\n }, result);\n\n return result;\n }, {});\n }, [attrs]);\n\n const $attrsWithoutPT = React.useMemo(() => {\n return Object.entries(attrs || {})\n .filter(([key]) => !key?.startsWith('pt-'))\n .reduce<Record<string, unknown>>((acc, [key, value]) => {\n acc[key] = value;\n\n return acc;\n }, {});\n }, [attrs]);\n\n const _getPTDatasets = React.useCallback(\n (key = '') => {\n const datasetPrefix = 'data-';\n const isExtended = key === 'root' && isNotEmpty(attrs?.['data-scope']);\n\n return isExtended\n ? {\n [`${datasetPrefix}extend`]: scope,\n [`${datasetPrefix}styled`]: scope\n }\n : {\n [`${datasetPrefix}scope`]: scope,\n ...(key === 'root' && {\n [`${datasetPrefix}part`]: part,\n [`${datasetPrefix}id`]: $attrSelector,\n [`${datasetPrefix}styled`]: scope\n }),\n [`${datasetPrefix}slot`]: key\n };\n },\n [scope, part, $attrSelector, attrs]\n );\n\n const _getPTSelf = React.useCallback(\n <Fn>(obj: Record<string, unknown> = {}, fn: Fn, key: string = '', params?: Record<string, unknown>) => {\n const componentPT = _usePT(getPT(obj, name, name), fn, key, params) as Record<PropertyKey, unknown> | undefined;\n const attrsPT = _usePT($attrsPT, fn, key, params) as Record<PropertyKey, unknown> | undefined;\n\n return mergeProps(\n true,\n componentPT ?? {}, // Exp; <PRComponent pt={{ [passthrough_key]: { [attribute]: value } }}>\n attrsPT ?? {} // Exp; <PRComponent pt:[passthrough_key]:[attribute]={value}> or <PRComponent pt:[passthrough_key]={() =>{value}}>\n );\n },\n [$attrsPT, _usePT, name]\n );\n\n const _useGlobalPT = React.useCallback(\n <Fn>(fn: Fn, key: string = '', params?: Record<string, unknown>) => {\n return _usePT($globalPT, fn, key, params);\n },\n [$globalPT, _usePT]\n );\n\n const _useDefaultPT = React.useCallback(\n <Fn>(fn: Fn, key: string, params?: Record<string, unknown>) => {\n return _usePT($defaultPT, fn, key, params);\n },\n [$defaultPT, _usePT]\n );\n\n const _getPTValue = React.useCallback(\n (obj = {}, key = '', params: Record<string, unknown> = {}, searchInDefaultPT = true) => {\n const searchOut = key.includes('.') && !!params[key.split('.')[0]];\n const { mergeSections = true, mergeProps: useMergeProps = false } = props?.ptOptions || passthroughOptions || {};\n const global = searchInDefaultPT ? (searchOut ? _useGlobalPT(getPTClassValue, key, params) : _useDefaultPT(getPTClassValue, key, params)) : undefined;\n const self = searchOut ? undefined : _getPTSelf(obj, getPTClassValue, key, { ...params, global: global || {} });\n const datasets = _getPTDatasets(key);\n\n return mergeSections || (!mergeSections && self) ? mergeProps(useMergeProps, global, self, datasets) : { ...self, ...datasets };\n },\n [props.ptOptions, _useGlobalPT, _useDefaultPT, _getPTSelf, _getPTDatasets]\n );\n\n // exposed methods\n const ptm = React.useCallback(\n (key = '', params: Record<string, unknown> | undefined = {}) => {\n return _getPTValue(props.pt, key, { ...$params, ...params }) as Record<string, unknown>;\n },\n [props.pt, $params, _getPTValue]\n );\n\n const ptmi = React.useCallback(\n (key = '', params: Record<string, unknown> | undefined = {}) => {\n const _attrs = primeuix_mergeProps($attrsWithoutPT, ptm(key, params)) as Record<string, unknown>;\n\n if (_attrs && Object.hasOwn(_attrs, 'id')) {\n _attrs.id ??= id;\n }\n\n return _attrs as Record<string, unknown>;\n },\n [ptm, id, $attrsWithoutPT]\n );\n\n const ptmo = React.useCallback(\n (obj: Record<string, unknown> = {}, key = '', params: Record<string, unknown> | undefined = {}) => {\n return _getPTValue(obj, key, { ...$params, ...params }, false) as Record<string, unknown>;\n },\n [$params, _getPTValue]\n );\n\n // hooks\n useMountEffect(() => _hook('onMounted'));\n useUpdateEffect(() => _hook('onUpdated'));\n useUnmountEffect(() => _hook('onUnmounted'));\n\n return React.useMemo(\n () => ({\n ptm,\n ptmi,\n ptmo\n }),\n [ptm, ptmi, ptmo]\n );\n}\n","import { mergeProps as primeuix_mergeProps } from '@primeuix/utils/mergeprops';\nimport { getKeyValue, isArray, isFunction, isString, toFlatCase } from '@primeuix/utils/object';\n\n/**\n * Merges props based on the merge function or merge flag.\n */\nexport function mergeProps<T extends unknown[], R = Record<PropertyKey, unknown>>(fn: ((...args: T) => R | undefined) | boolean, ...args: T): R {\n return (isFunction(fn) ? fn(...args) : fn ? primeuix_mergeProps(...args) : Object.assign({}, ...args)) as R;\n}\n\n/**\n * Resolves a PT class value — wraps string/array values in { className }.\n */\nexport function getPTClassValue(obj: Record<string, unknown> = {}, key = '', params?: Record<string, unknown>) {\n const value = getKeyValue(obj, key, params);\n\n return isString(value) || isArray(value) ? { className: value } : value;\n}\n\n/**\n * Extracts pass-through value for a given component name from the PT object.\n */\nexport function getPT<Fn extends (...args: unknown[]) => unknown>(pt: Record<string, unknown> | undefined, key: string | undefined, name: string | undefined, fn?: Fn) {\n const getValue = (value: unknown, checkSameKey = false) => {\n const computedValue = (fn ? fn(value) : value) as Record<string, unknown>;\n const _key = toFlatCase(key ?? '');\n const _cKey = toFlatCase(name ?? '');\n\n return ((checkSameKey ? (_key !== _cKey ? computedValue?.[_key] : undefined) : computedValue?.[_key]) ?? computedValue) as Record<string, unknown>;\n };\n\n return pt && Object.hasOwn(pt, '_usept')\n ? {\n _usept: pt['_usept'],\n originalValue: getValue(pt.originalValue),\n value: getValue(pt.value)\n }\n : getValue(pt, true);\n}\n","import { isDev, StyleRegistry } from '@primereact/core/utils';\nimport type { GlobalComponentProps, Instance, useComponentStyleReturnType } from '@primereact/types/core';\nimport { Theme, ThemeService } from '@primeuix/styled';\nimport { cn, getKeyValue, isClient } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useComponentStyleHandler } from './useComponentStyleHandler';\n\n/**\n * A hook for managing component styles.\n *\n * @param instance The instance of the component.\n * @param styles The styles to apply to the component.\n * @param $params Additional parameters for the hook.\n * @returns An object containing the component styles.\n */\nexport function useComponentStyle<Props extends GlobalComponentProps, IProps, Styles, Params>(instance: Instance<Props, IProps>, styles?: Styles, $params?: Params): useComponentStyleReturnType {\n const { props = { unstyled: false, dt: undefined }, $primereact, $attrSelector, elementRef } = instance || {};\n const $style = useComponentStyleHandler(styles, elementRef as React.Ref<HTMLElement> | undefined);\n const $isUnstyled = React.useMemo(() => (props.unstyled !== undefined ? props.unstyled : $primereact?.config?.unstyled), [props.unstyled, $primereact?.config?.unstyled]);\n const $styleOptions = React.useMemo(() => ({ nonce: $primereact?.config?.csp?.nonce }), [$primereact?.config?.csp?.nonce]);\n\n // refs\n const scopedStyleRef = React.useRef<HTMLStyleElement | null>(null);\n const hasRetainedBaseStyleRef = React.useRef(false);\n const retainedComponentStyleNameRef = React.useRef<string | null>(null);\n const styleContentRef = React.useRef<string | null>(null);\n const stylesChangedRef = React.useRef(false);\n\n // Detect HMR in dev: compare the actual string content of the style template.\n // When the source CSS changes, bypass the loaded-style cache so the new CSS is re-injected.\n if (isDev) {\n const nextStyleSource = (styles as { style?: unknown } | undefined)?.style;\n const nextContent = typeof nextStyleSource === 'string' ? nextStyleSource : null;\n\n if (nextContent !== null && styleContentRef.current !== nextContent) {\n styleContentRef.current = nextContent;\n stylesChangedRef.current = true;\n }\n }\n\n // helpers\n const _loadCoreStyles = React.useCallback(() => {\n if (!$style?.name) {\n return;\n }\n\n const name = $style.name === 'global' ? 'base' : $style.name;\n\n if (!isClient()) {\n $style.loadCSS({ name, ...$styleOptions });\n\n return;\n }\n\n if (retainedComponentStyleNameRef.current && retainedComponentStyleNameRef.current !== $style.name) {\n StyleRegistry.releaseStyleName(retainedComponentStyleNameRef.current);\n retainedComponentStyleNameRef.current = null;\n }\n\n const hmr = stylesChangedRef.current;\n\n if (hmr || !retainedComponentStyleNameRef.current) {\n if (hmr || StyleRegistry.retainStyleName($style.name)) {\n $style.loadCSS({ name, ...$styleOptions });\n }\n\n retainedComponentStyleNameRef.current = $style.name;\n }\n }, [$style, $styleOptions]);\n\n const _loadThemeStyles = React.useCallback(() => {\n if ($isUnstyled || $primereact?.theme === 'none') return;\n\n const loadCommonThemeStyles = () => {\n const { primitive, semantic, global, style } = $style?.getCommonTheme?.() || {};\n\n $style.load(primitive?.css, { name: 'primitive-variables', ...$styleOptions });\n $style.load(semantic?.css, { name: 'semantic-variables', ...$styleOptions });\n $style.load(global?.css, { name: 'global-variables', ...$styleOptions });\n $style.load($style.baseStyles?.style, { name: 'global-style', ...$styleOptions }, style, true);\n };\n\n const loadComponentThemeStyles = () => {\n const { css, style } = $style?.getComponentTheme?.() || {};\n\n $style.load(css, { name: `${$style.name}-variables`, ...$styleOptions });\n $style.loadStyle({ name: `${$style.name}-style`, ...$styleOptions }, style);\n };\n\n const loadLayerOrderStyles = () => {\n const layerOrder = $style?.getLayerOrderThemeCSS?.();\n\n $style.load(layerOrder, { name: 'layer-order', first: true, ...$styleOptions });\n };\n\n // Server-side renders should not rely on global loaded-name state.\n if (!isClient()) {\n loadCommonThemeStyles();\n\n if ($style?.name) {\n loadComponentThemeStyles();\n }\n\n loadLayerOrderStyles();\n\n return;\n }\n\n const hmr = stylesChangedRef.current;\n\n // common\n if (hmr || !Theme.isStyleNameLoaded('common')) {\n loadCommonThemeStyles();\n Theme.setLoadedStyleName('common');\n }\n\n // component\n if ((hmr || !Theme.isStyleNameLoaded($style?.name)) && $style?.name) {\n loadComponentThemeStyles();\n Theme.setLoadedStyleName($style.name);\n }\n\n // layer order\n if (hmr || !Theme.isStyleNameLoaded('layer-order')) {\n loadLayerOrderStyles();\n Theme.setLoadedStyleName('layer-order');\n }\n }, [$isUnstyled, $style, $styleOptions]);\n\n // methods\n const _load = React.useCallback(() => {\n const { css } = $style.baseStyles || {};\n\n if (!isClient()) {\n $style.load(css, { name: 'base', ...$styleOptions });\n\n _loadThemeStyles();\n\n return;\n }\n\n const hmr = stylesChangedRef.current;\n\n if (hmr || !hasRetainedBaseStyleRef.current) {\n hasRetainedBaseStyleRef.current = true;\n\n if (hmr || StyleRegistry.retainStyleName('base')) {\n $style.load(css, { name: 'base', ...$styleOptions });\n }\n }\n\n _loadThemeStyles();\n\n // Reset HMR flag after applying changes; subsequent renders use cached path so animations aren't disrupted.\n stylesChangedRef.current = false;\n }, [$style, $styleOptions, _loadThemeStyles]);\n\n const _loadScopedThemeStyles = React.useCallback(\n (preset: unknown) => {\n const { css } = $style?.getPresetTheme?.(preset, `[${$attrSelector}]`) || {};\n const scopedStyle = $style?.load(css, { name: `${$attrSelector}-${$style.name}`, ...$styleOptions });\n\n scopedStyleRef.current = (scopedStyle as HTMLStyleElement) || null;\n },\n [$style, $attrSelector, $styleOptions]\n );\n\n // exposed methods\n const cx = React.useCallback(\n (key = '', params = {}) => {\n return !$isUnstyled ? cn(getKeyValue($style.classes as Record<string, string>, key, { ...$params, context: params })) : undefined;\n },\n [$isUnstyled, $params, $style.classes]\n );\n\n const sx = React.useCallback(\n (key = '', when = true, params = {}) => {\n if (when) {\n const self = getKeyValue($style.inlineStyles as Record<string, React.CSSProperties>, key, { ...$params, context: params }) as React.CSSProperties;\n const base = getKeyValue($style.baseStyles?.inlineStyles as Record<string, React.CSSProperties>, key, { ...$params, context: params }) as React.CSSProperties;\n\n return { ...base, ...self };\n }\n\n return undefined;\n },\n [$style.inlineStyles, $style.baseStyles?.inlineStyles, $params]\n );\n\n if (!isClient() && !$isUnstyled) {\n _loadCoreStyles();\n _load();\n _loadScopedThemeStyles(props.dt);\n }\n\n // effects\n React.useInsertionEffect(() => {\n if (!isClient() || $isUnstyled) {\n return;\n }\n\n _loadCoreStyles();\n _load();\n }, [$isUnstyled, _loadCoreStyles, _load]);\n\n React.useEffect(() => {\n if (!isClient() || $isUnstyled || $primereact?.theme === 'none') {\n return;\n }\n\n const handleThemeChange = () => {\n _loadThemeStyles();\n _loadScopedThemeStyles(props.dt);\n };\n\n ThemeService.on('theme:change', handleThemeChange);\n\n return () => {\n ThemeService.off('theme:change', handleThemeChange);\n };\n }, [$isUnstyled, $primereact?.theme, _loadThemeStyles, _loadScopedThemeStyles, props.dt]);\n\n React.useInsertionEffect(() => {\n if (!isClient() || $isUnstyled) {\n return;\n }\n\n scopedStyleRef.current?.remove();\n scopedStyleRef.current = null;\n\n _loadScopedThemeStyles(props.dt);\n\n return () => {\n scopedStyleRef.current?.remove();\n scopedStyleRef.current = null;\n };\n }, [$isUnstyled, props.dt, _loadScopedThemeStyles]);\n\n React.useEffect(() => {\n if (!isClient()) {\n return;\n }\n\n return () => {\n if (hasRetainedBaseStyleRef.current) {\n StyleRegistry.releaseStyleName('base');\n hasRetainedBaseStyleRef.current = false;\n }\n\n if (retainedComponentStyleNameRef.current) {\n StyleRegistry.releaseStyleName(retainedComponentStyleNameRef.current);\n retainedComponentStyleNameRef.current = null;\n }\n };\n }, []);\n\n return React.useMemo(\n () => ({\n cx,\n sx,\n isUnstyled: $isUnstyled,\n $style\n }),\n [cx, sx, $isUnstyled, $style]\n );\n}\n","import { ThemeContext } from '@primereact/core/theme';\nimport { useStyle } from '@primereact/core/use-style';\nimport type { StylesOptions, StyleType } from '@primereact/types/styles';\nimport { css as Css, dt, Theme } from '@primeuix/styled';\nimport { isNotEmpty, minifyCSS, resolve, toElement } from '@primeuix/utils';\nimport * as React from 'react';\n\n/**\n * A custom hook for managing component styles.\n *\n * @param styles The styles to apply to the component.\n * @param elementRef A reference to the HTML element.\n * @returns An object containing methods to load and manage styles.\n */\nexport function useComponentStyleHandler<Styles>(styles?: Styles, elementRef?: React.Ref<HTMLElement>) {\n const theme = React.useContext(ThemeContext);\n const [load] = useStyle();\n\n const _load = React.useCallback(\n (css?: string, options?: Record<PropertyKey, unknown>) => {\n return load({ name: options?.name as string | undefined, css, element: toElement(elementRef), options });\n },\n [load, elementRef]\n );\n\n return React.useMemo(() => {\n const handler = {\n name: 'base',\n ...(styles as StylesOptions),\n load(style: StyleType = '', options: Record<PropertyKey, unknown> & { name?: string } = {}, extendedStyle = '', enableThemeTransform = false) {\n const name = options.name || handler.name;\n const resolvedStyle = Css`${style}${extendedStyle}` as string;\n const computedStyle = enableThemeTransform ? Theme.transformCSS(name, resolvedStyle) : resolvedStyle;\n\n return isNotEmpty(computedStyle) ? _load(minifyCSS(computedStyle), { name, ...options }) : undefined;\n },\n loadCSS(options?: Record<PropertyKey, unknown>) {\n return this.load(this.css, options);\n },\n loadStyle(options?: Record<PropertyKey, unknown>, extendedStyle = '') {\n return this.load(this.style, options, extendedStyle, true);\n },\n getCommonTheme(params?: Record<PropertyKey, unknown>) {\n return Theme.getCommon(this.name, params);\n },\n getComponentTheme(params?: Record<PropertyKey, unknown>) {\n return Theme.getComponent(this.name, params);\n },\n // @todo: preset type\n getPresetTheme(preset: unknown, selector: string, params?: Record<PropertyKey, unknown>) {\n return Theme.getCustomPreset(this.name, preset, selector, params);\n },\n getLayerOrderThemeCSS() {\n return Theme.getLayerOrderCSS(this.name);\n },\n getStyleSheet(extendedCSS = '', props = {}) {\n if (this.css) {\n // @ts-expect-error: update dt definition in primeuix/styled\n const _css = resolve(this.css, { dt }) as string;\n const _style = minifyCSS(Css`${_css}${extendedCSS}`);\n const _props = Object.entries(props)\n .reduce<string[]>((acc, [k, v]) => {\n acc.push(`${k}=\"${v}\"`);\n\n return acc;\n }, [])\n .join(' ');\n\n return `<style type=\"text/css\" data-primereact-style-id=\"${this.name}\" ${_props}>${_style}</style>`;\n }\n\n return '';\n },\n getCommonThemeStyleSheet(params?: Record<PropertyKey, unknown>, props: Record<PropertyKey, unknown> = {}) {\n return Theme.getCommonStyleSheet(this.name, params, props);\n },\n getThemeStyleSheet(params?: Record<PropertyKey, unknown>, props: Record<PropertyKey, unknown> = {}) {\n const cssArr = [Theme.getStyleSheet(this.name, params, props)];\n\n if (theme) {\n const _name = this.name === 'base' ? 'global-style' : `${this.name}-style`;\n const _css = Css`${resolve(theme, { dt })}` as string;\n const _style = minifyCSS(Theme.transformCSS(this.name, _css));\n const _props = Object.entries(props)\n .reduce<string[]>((acc, [k, v]) => {\n acc.push(`${k}=\"${v}\"`);\n\n return acc;\n }, [])\n .join(' ');\n\n cssArr.push(`<style type=\"text/css\" data-primereact-style-id=\"${_name}\" ${_props}>${_style}</style>`);\n }\n\n return cssArr.join('');\n }\n };\n\n return handler;\n }, [styles, theme, _load]);\n}\n","import type { ComponentInstance, InComponentInstance, useComponentOptions, withComponentOptions } from '@primereact/types/core';\nimport type { BaseComponentProps } from '@primereact/types';\nimport type { StylesOptions } from '@primereact/types/styles';\nimport { isObject } from '@primeuix/utils';\nimport * as React from 'react';\nimport { useComponent } from './useComponent';\n\n/**\n * A higher-order component for enhancing a component with additional features.\n *\n * @template IProps The interface for the component's input properties.\n * @template DProps The interface for the component's default properties.\n * @template Exposes The interface for the properties that the component exposes.\n * @template Styles The styles options for the component.\n * @template CData Additional data to expose on the component.\n *\n * @param options The options for the component.\n * @param options.name The name of the component, used for debugging and identification.\n * @param options.defaultProps The default properties for the component.\n * @param options.styles The styles to apply to the component.\n * @param options.components Additional components to include in the component.\n * @param options.setup A setup function for additional configuration of the component.\n * @param options.render A render function for the component.\n * @returns A React component wrapped with the specified options.\n */\nexport function withComponent<IProps, DProps, Exposes extends Record<PropertyKey, unknown> = Record<PropertyKey, unknown>, Styles = StylesOptions, CData = Record<string, unknown>>({\n name = 'UnknownComponent',\n type = 'primitive',\n defaultProps,\n styles,\n components,\n setup,\n render\n}: withComponentOptions<IProps, DProps, Exposes, Styles, CData>) {\n type InProps<I extends ComponentInstance, T extends React.ElementType> = BaseComponentProps<I, IProps, unknown, T> & DProps;\n\n const BaseComponent = <I extends ComponentInstance, T extends React.ElementType>(inProps?: InProps<I, T>) => {\n const instance = useComponent(name, { type, inProps, defaultProps, styles, setup } as useComponentOptions<InProps<I, T>, DProps, Exposes, Styles>);\n\n type RenderedComponentProps = InComponentInstance<typeof instance.props, InProps<I, T>, typeof instance.state, Exposes>;\n\n const RenderedComponent = (render as React.FC<RenderedComponentProps>) ?? (() => null);\n\n return instance.props.pIf ? <RenderedComponent {...(instance as RenderedComponentProps)} /> : null;\n };\n\n const Component = React.memo(BaseComponent, (prevProps, nextProps) => {\n if (!isObject(prevProps) || !isObject(nextProps)) {\n return false;\n }\n\n // Function props (render props, event handlers) are recreated on every parent render\n // and their closures may reference ambient state. `shallowEqualProps` ignores function\n // mismatches to reduce churn, but that strands render-prop children against state updates.\n // Fall back to identity checks for functions so re-renders flow through.\n const prevRecord = prevProps as Record<string, unknown>;\n const nextRecord = nextProps as Record<string, unknown>;\n const keys = Object.keys(prevRecord);\n\n if (keys.length !== Object.keys(nextRecord).length) return false;\n\n for (const key of keys) {\n const prev = prevRecord[key];\n const next = nextRecord[key];\n\n if (typeof prev === 'function' || typeof next === 'function') {\n if (prev !== next) return false;\n continue;\n }\n\n if (!Object.is(prev, next)) return false;\n }\n\n return true;\n }) as unknown as typeof BaseComponent & CData & React.FC;\n\n Component.displayName = `PrimeReact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I,CAACC,GAASF,CAAS,GAAK,CAACE,GAASD,CAAS,EAC3C,MAAO,GAOX,IAAME,EAAaH,EACbI,EAAaH,EACbI,EAAO,OAAO,KAAKF,CAAU,EAEnC,GAAIE,EAAK,SAAW,OAAO,KAAKD,CAAU,EAAE,OAAQ,MAAO,GAE3D,QAAWE,KAAOD,EAAM,CACpB,IAAME,EAAOJ,EAAWG,CAAG,EACrBE,EAAOJ,EAAWE,CAAG,EAE3B,GAAI,OAAOC,GAAS,YAAc,OAAOC,GAAS,WAAY,CAC1D,GAAID,IAASC,EAAM,MAAO,GAC1B,QACJ,CAEA,GAAI,CAAC,OAAO,GAAGD,EAAMC,CAAI,EAAG,MAAO,EACvC,CAEA,MAAO,EACX,CAAC,EAED,OAAAd,EAAU,YAAc,cAAcP,CAAI,GAC1C,OAAO,QAAQI,GAAc,CAAC,CAAC,EAAE,QAAQ,CAAC,CAACe,EAAKG,CAAK,IAAM,CACtDf,EAAsCY,CAAG,EAAIG,CAClD,CAAC,EAEMf,CACX","names":["isValidElement","mergeRefs","cn","resolve","React","Component","inProps","_b","_c","_e","_f","_g","_a","pIf","style","className","as","asChild","instance","render","props","__objRest","AsComponent","renderAsChild","isFragment","_d","propRef","children","inAttrs","restAttrs","attrs","__spreadValues","content","resolve","styles","classNames","isValidElement","asProps","__spreadProps","cn","asRef","mergeRefs","omit","globalProps","defaultComponentProps","__spreadProps","__spreadValues","omit","useBase","React","useMountEffect","useUnmountEffect","useUpdateEffect","primeuix_mergeProps","getKeyValue","isNotEmpty","isString","resolve","React","primeuix_mergeProps","getKeyValue","isArray","isFunction","isString","toFlatCase","mergeProps","fn","args","getPTClassValue","obj","key","params","value","getPT","pt","name","getValue","checkSameKey","_a","computedValue","_key","_cKey","useComponentPT","instance","$params","id","name","scope","part","props","attrs","$primereact","$attrSelector","passthrough","passthroughValue","passthroughOptions","_usePT","pt","fn","key","params","vfn","value","mergeSections","useMergeProps","originalValue","isString","mergeProps","_hook","hookName","selfHook","getPT","getKeyValue","defaultHook","$globalPT","resolve","$defaultPT","$attrsPT","result","slot","rest","currentObj","nestedKey","index","array","$attrsWithoutPT","acc","_getPTDatasets","datasetPrefix","isNotEmpty","__spreadProps","__spreadValues","_getPTSelf","obj","componentPT","attrsPT","_useGlobalPT","_useDefaultPT","_getPTValue","searchInDefaultPT","searchOut","global","getPTClassValue","self","datasets","ptm","ptmi","_a","_attrs","primeuix_mergeProps","ptmo","useMountEffect","useUpdateEffect","useUnmountEffect","isDev","StyleRegistry","Theme","ThemeService","cn","getKeyValue","isClient","React","ThemeContext","useStyle","Css","dt","Theme","isNotEmpty","minifyCSS","resolve","toElement","React","useComponentStyleHandler","styles","elementRef","theme","ThemeContext","load","useStyle","_load","css","options","toElement","handler","__spreadProps","__spreadValues","style","extendedStyle","enableThemeTransform","name","resolvedStyle","Css","computedStyle","Theme","isNotEmpty","minifyCSS","params","preset","selector","extendedCSS","props","_css","resolve","dt","_style","_props","acc","k","v","cssArr","_name","useComponentStyle","instance","styles","$params","_a","_b","_c","_d","props","$primereact","$attrSelector","elementRef","$style","useComponentStyleHandler","$isUnstyled","$styleOptions","scopedStyleRef","hasRetainedBaseStyleRef","retainedComponentStyleNameRef","styleContentRef","stylesChangedRef","isDev","nextStyleSource","nextContent","_loadCoreStyles","name","isClient","__spreadValues","StyleRegistry","hmr","_loadThemeStyles","loadCommonThemeStyles","primitive","semantic","global","style","loadComponentThemeStyles","css","loadLayerOrderStyles","layerOrder","Theme","_load","_loadScopedThemeStyles","preset","scopedStyle","cx","key","params","cn","getKeyValue","__spreadProps","sx","when","self","base","handleThemeChange","ThemeService","useComponent","name","options","defaultProps","__spreadValues","globalProps","baseInstance","useBase","ref","props","$params","ptx","useComponentPT","stx","useComponentStyle","instance","isObject","React","withComponent","name","type","defaultProps","styles","components","setup","render","Component","inProps","instance","useComponent","RenderedComponent","__spreadValues","prevProps","nextProps","isObject","prevRecord","nextRecord","keys","key","prev","next","value"]}
@@ -1,17 +0,0 @@
1
- import * as _primereact_types_core from '@primereact/types/core';
2
- import { PrimeReactProps } from '@primereact/types/core';
3
- import * as React from 'react';
4
-
5
- declare const PrimeReactContext: React.Context<PrimeReactProps | undefined>;
6
- declare function PrimeReactProvider(inProps?: React.PropsWithChildren<PrimeReactProps>): React.JSX.Element;
7
-
8
- declare const defaultConfigProps: PrimeReactProps;
9
-
10
- declare function usePrimeReact(): {
11
- config: _primereact_types_core.PrimeReactProps;
12
- locale: _primereact_types_core.LocaleProps | undefined;
13
- passthrough: _primereact_types_core.PassThroughProps | undefined;
14
- theme: _primereact_types_core.ThemeProps | null;
15
- };
16
-
17
- export { PrimeReactContext, PrimeReactProvider, defaultConfigProps, usePrimeReact };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/config/PrimeReact.context.tsx","../../src/config/PrimeReact.props.ts","../../src/config/usePrimeReact.ts"],"sourcesContent":["'use client';\nimport { showInvalidLicenseBanner } from '@primereact/core/license';\nimport { LocaleProvider } from '@primereact/core/locale';\nimport { PassThroughProvider } from '@primereact/core/passthrough';\nimport { ThemeProvider } from '@primereact/core/theme';\nimport { useProps } from '@primereact/hooks';\nimport type { PrimeReactProps } from '@primereact/types/core';\nimport { registerLicense, verifyLicense } from '@primeui/license-manager';\nimport { resolve } from '@primeuix/utils';\nimport * as React from 'react';\nimport { defaultConfigProps } from './PrimeReact.props';\n\nconst RELEASE_DATE = '2026-06-28';\n\nexport const PrimeReactContext = React.createContext<PrimeReactProps | undefined>(undefined);\n\nexport function PrimeReactProvider(inProps: React.PropsWithChildren<PrimeReactProps> = {}) {\n const { props, attrs } = useProps(defaultConfigProps, inProps);\n\n // states\n const [inputVariant, setInputVariant] = React.useState(props.inputVariant);\n const [defaults, setDefaults] = React.useState(props.defaults);\n const [zIndex, setZIndex] = React.useState(props.zIndex);\n\n React.useEffect(() => {\n if (props.license) registerLicense({ primeui: props.license });\n\n verifyLicense('primeui', { releaseDate: RELEASE_DATE }).then((result) => {\n if (!result.valid) {\n // eslint-disable-next-line no-console\n console.warn(`[PrimeUI] ${result.message}`);\n showInvalidLicenseBanner();\n }\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const value = React.useMemo(\n () => ({\n inputVariant,\n setInputVariant,\n defaults,\n setDefaults,\n zIndex,\n setZIndex\n }),\n [inputVariant, defaults, zIndex]\n );\n const resolvedChildren = React.useMemo(() => resolve(attrs.children, value) as React.ReactNode, [attrs.children, value]);\n\n return (\n <PrimeReactContext.Provider value={value}>\n <LocaleProvider lang={props.locale}>\n <PassThroughProvider value={props.pt} {...props.ptOptions}>\n <ThemeProvider preset={props.theme?.preset} stylesheet={props.stylesheet} {...props.theme?.options}>\n {resolvedChildren}\n </ThemeProvider>\n </PassThroughProvider>\n </LocaleProvider>\n </PrimeReactContext.Provider>\n );\n}\n","import { FilterMatchMode } from '@primereact/core/api';\nimport type { PrimeReactProps } from '@primereact/types/core';\n\nexport const defaultConfigProps: PrimeReactProps = {\n csp: { nonce: undefined },\n defaults: undefined,\n filterMatchModeOptions: {\n text: [FilterMatchMode.STARTS_WITH, FilterMatchMode.CONTAINS, FilterMatchMode.NOT_CONTAINS, FilterMatchMode.ENDS_WITH, FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS],\n numeric: [FilterMatchMode.EQUALS, FilterMatchMode.NOT_EQUALS, FilterMatchMode.LESS_THAN, FilterMatchMode.LESS_THAN_OR_EQUAL_TO, FilterMatchMode.GREATER_THAN, FilterMatchMode.GREATER_THAN_OR_EQUAL_TO],\n date: [FilterMatchMode.DATE_IS, FilterMatchMode.DATE_IS_NOT, FilterMatchMode.DATE_BEFORE, FilterMatchMode.DATE_AFTER]\n },\n inputVariant: undefined,\n locale: 'en',\n pt: undefined,\n ptOptions: { mergeSections: true, mergeProps: false },\n ripple: false,\n theme: undefined,\n stylesheet: undefined,\n unstyled: false,\n zIndex: { modal: 1100, overlay: 1000, menu: 1000, tooltip: 1100 },\n license: undefined\n};\n","import { LocaleContext } from '@primereact/core/locale';\nimport { PassThroughContext } from '@primereact/core/passthrough';\nimport { ThemeContext } from '@primereact/core/theme';\nimport * as React from 'react';\nimport { PrimeReactContext } from './PrimeReact.context';\n\nexport function usePrimeReact() {\n const config = React.useContext(PrimeReactContext);\n const locale = React.useContext(LocaleContext);\n const passthrough = React.useContext(PassThroughContext);\n const theme = React.useContext(ThemeContext);\n\n if (config === undefined) {\n throw new Error('[PrimeReact] PrimeReactProvider not found. Wrap your application in <PrimeReactProvider> before using PrimeReact components.');\n }\n\n return React.useMemo(\n () => ({\n config,\n locale,\n passthrough,\n theme\n }),\n [config, locale, passthrough, theme]\n );\n}\n"],"mappings":"yVACA,OAAS,4BAAAA,MAAgC,2BACzC,OAAS,kBAAAC,MAAsB,0BAC/B,OAAS,uBAAAC,MAA2B,+BACpC,OAAS,iBAAAC,MAAqB,yBAC9B,OAAS,YAAAC,MAAgB,oBAEzB,OAAS,mBAAAC,EAAiB,iBAAAC,MAAqB,2BAC/C,OAAS,WAAAC,MAAe,kBACxB,UAAYC,MAAW,QCTvB,OAAS,mBAAAC,MAAuB,uBAGzB,IAAMC,EAAsC,CAC/C,IAAK,CAAE,MAAO,MAAU,EACxB,SAAU,OACV,uBAAwB,CACpB,KAAM,CAACD,EAAgB,YAAaA,EAAgB,SAAUA,EAAgB,aAAcA,EAAgB,UAAWA,EAAgB,OAAQA,EAAgB,UAAU,EACzK,QAAS,CAACA,EAAgB,OAAQA,EAAgB,WAAYA,EAAgB,UAAWA,EAAgB,sBAAuBA,EAAgB,aAAcA,EAAgB,wBAAwB,EACtM,KAAM,CAACA,EAAgB,QAASA,EAAgB,YAAaA,EAAgB,YAAaA,EAAgB,UAAU,CACxH,EACA,aAAc,OACd,OAAQ,KACR,GAAI,OACJ,UAAW,CAAE,cAAe,GAAM,WAAY,EAAM,EACpD,OAAQ,GACR,MAAO,OACP,WAAY,OACZ,SAAU,GACV,OAAQ,CAAE,MAAO,KAAM,QAAS,IAAM,KAAM,IAAM,QAAS,IAAK,EAChE,QAAS,MACb,EDTA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AoB,yBAC7B,UAAYC,MAAW,QAGhB,SAASC,IAAgB,CAC5B,IAAMC,EAAe,aAAWC,CAAiB,EAC3CC,EAAe,aAAWC,CAAa,EACvCC,EAAoB,aAAWC,CAAkB,EACjDC,EAAc,aAAWC,CAAY,EAE3C,GAAIP,IAAW,OACX,MAAM,IAAI,MAAM,8HAA8H,EAGlJ,OAAa,UACT,KAAO,CACH,OAAAA,EACA,OAAAE,EACA,YAAAE,EACA,MAAAE,CACJ,GACA,CAACN,EAAQE,EAAQE,EAAaE,CAAK,CACvC,CACJ","names":["showInvalidLicenseBanner","LocaleProvider","PassThroughProvider","ThemeProvider","useProps","registerLicense","verifyLicense","resolve","React","FilterMatchMode","defaultConfigProps","RELEASE_DATE","PrimeReactContext","PrimeReactProvider","inProps","_a","_b","props","attrs","useProps","defaultConfigProps","inputVariant","setInputVariant","defaults","setDefaults","zIndex","setZIndex","registerLicense","verifyLicense","result","showInvalidLicenseBanner","value","resolvedChildren","resolve","LocaleProvider","PassThroughProvider","__spreadValues","ThemeProvider","LocaleContext","PassThroughContext","ThemeContext","React","usePrimeReact","config","PrimeReactContext","locale","LocaleContext","passthrough","PassThroughContext","theme","ThemeContext"]}
package/dnd/index.d.mts DELETED
@@ -1,69 +0,0 @@
1
- import { Point, Rect, UniqueId, DragData, CollisionResult, CreateDndOptions, DndInstance } from '@primereact/types/primitive/dnd';
2
- export { AutoScrollOptions, CollisionResult, CollisionStrategy, CreateDndOptions, DndAnnouncements, DndEventMap, DndInstance, DndState, DragCancelEvent, DragData, DragEndEvent, DragMoveEvent, DragOperation, DragOverEvent, DragStartEvent, DraggableRegistration, DroppableRegistration, KeyboardSensorOptions, Point, PointerSensorOptions, Rect, SortDirection, SortEvent, SortableContainerRegistration, SortableOperationState, TransferEvent, Transform, UniqueId } from '@primereact/types/primitive/dnd';
3
-
4
- /**
5
- * Collision detection strategies for createDnd.
6
- */
7
-
8
- interface CollisionInput {
9
- position: Point;
10
- activeRect: Rect | null;
11
- droppables: Array<{
12
- id: UniqueId;
13
- rect: Rect;
14
- data: DragData;
15
- disabled?: boolean;
16
- }>;
17
- }
18
- /**
19
- * Returns droppables whose rect contains the pointer.
20
- * Smallest (innermost) droppable wins for nested scenarios.
21
- */
22
- declare function pointerWithin(input: CollisionInput): CollisionResult[];
23
- /**
24
- * Returns droppables overlapping the active drag rect, sorted by overlap %.
25
- */
26
- declare function rectIntersection(input: CollisionInput): CollisionResult[];
27
- /**
28
- * Returns droppables sorted by center-to-center distance (closest first).
29
- */
30
- declare function closestCenter(input: CollisionInput): CollisionResult[];
31
- /**
32
- * Returns droppables sorted by average corner-to-corner distance (closest first).
33
- */
34
- declare function closestCorners(input: CollisionInput): CollisionResult[];
35
- /** All built-in collision strategies. */
36
- declare const collisionStrategies: {
37
- readonly pointerWithin: typeof pointerWithin;
38
- readonly rectIntersection: typeof rectIntersection;
39
- readonly closestCenter: typeof closestCenter;
40
- readonly closestCorners: typeof closestCorners;
41
- };
42
-
43
- /**
44
- * Sortable collision detection and transform computation for createDnd.
45
- */
46
-
47
- /** Immutably moves an item within an array. Returns original array if indices are out of bounds. */
48
- declare function arrayMove<T>(arr: readonly T[], fromIndex: number, toIndex: number): T[];
49
- /** Immutably transfers an item between two arrays. Returns originals if indices are out of bounds. */
50
- declare function arrayTransfer<T>(source: readonly T[], target: readonly T[], fromIndex: number, toIndex: number): {
51
- source: T[];
52
- target: T[];
53
- };
54
-
55
- /**
56
- * createDnd — Framework-Agnostic Drag & Drop Core
57
- *
58
- * Pure JavaScript implementation following the createMotion pattern.
59
- * Can be wrapped by React, Angular, Vue, Lit, Svelte, Solid etc.
60
- *
61
- * - SSR-safe: No DOM access at module level or during creation.
62
- * - Zero memory leaks: destroy() cleans every listener, timer, observer.
63
- * - Cross-browser: Uses only standard, well-supported APIs.
64
- * - Performance: RAF-throttled pointer, zero-reflow scroll pattern, rect caching.
65
- */
66
-
67
- declare function createDnd(options?: CreateDndOptions): DndInstance;
68
-
69
- export { type CollisionInput, arrayMove, arrayTransfer, collisionStrategies, createDnd };