@dev-dga/react 0.8.3 → 0.9.1
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/CHANGELOG.md +21 -0
- package/dist/{chunk-EFKAKU2X.js → chunk-66EVFQVL.js} +2 -2
- package/dist/{chunk-SOIZIH7F.js → chunk-6DN3JE3P.js} +10 -1
- package/dist/chunk-6DN3JE3P.js.map +1 -0
- package/dist/{chunk-D7BZ6L4Z.cjs → chunk-BBGCS5PZ.cjs} +7 -2
- package/dist/chunk-BBGCS5PZ.cjs.map +1 -0
- package/dist/{chunk-MUM6HKPT.js → chunk-BTP7G7WR.js} +7 -2
- package/dist/chunk-BTP7G7WR.js.map +1 -0
- package/dist/{chunk-LES7CZSC.cjs → chunk-CISRE6BC.cjs} +14 -3
- package/dist/chunk-CISRE6BC.cjs.map +1 -0
- package/dist/{chunk-4ZCLTLVC.cjs → chunk-CVQFSXRR.cjs} +10 -1
- package/dist/chunk-CVQFSXRR.cjs.map +1 -0
- package/dist/{chunk-BNULFLPC.js → chunk-HBAHWCBK.js} +14 -3
- package/dist/chunk-HBAHWCBK.js.map +1 -0
- package/dist/{chunk-54GIEP6E.cjs → chunk-I6BOBHO6.cjs} +7 -2
- package/dist/chunk-I6BOBHO6.cjs.map +1 -0
- package/dist/{chunk-DBB47IAX.js → chunk-IFB53HNO.js} +1 -1
- package/dist/chunk-IFB53HNO.js.map +1 -0
- package/dist/{chunk-TWCX4EZR.js → chunk-JOJ23OD4.js} +6 -1
- package/dist/{chunk-TWCX4EZR.js.map → chunk-JOJ23OD4.js.map} +1 -1
- package/dist/{chunk-PI4OPECU.cjs → chunk-LG2IADSZ.cjs} +1 -1
- package/dist/{chunk-PI4OPECU.cjs.map → chunk-LG2IADSZ.cjs.map} +1 -1
- package/dist/{chunk-CHE75QHA.js → chunk-MCHL23CE.js} +1 -1
- package/dist/{chunk-CHE75QHA.js.map → chunk-MCHL23CE.js.map} +1 -1
- package/dist/{chunk-MWOGVEQB.cjs → chunk-NUC6WJU4.cjs} +5 -5
- package/dist/{chunk-MWOGVEQB.cjs.map → chunk-NUC6WJU4.cjs.map} +1 -1
- package/dist/{chunk-JQO3EFLX.cjs → chunk-PAUY27WX.cjs} +3 -14
- package/dist/chunk-PAUY27WX.cjs.map +1 -0
- package/dist/{chunk-6A73DWVA.js → chunk-UAECZXU5.js} +3 -14
- package/dist/chunk-UAECZXU5.js.map +1 -0
- package/dist/{chunk-43763K2A.cjs → chunk-WI4WQGF6.cjs} +1 -1
- package/dist/{chunk-43763K2A.cjs.map → chunk-WI4WQGF6.cjs.map} +1 -1
- package/dist/components/Combobox/Combobox.cjs +2 -2
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/Combobox/index.cjs +2 -2
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/DateRangePicker/index.cjs +2 -2
- package/dist/components/DateRangePicker/index.js +1 -1
- package/dist/components/Modal/Modal.cjs +4 -2
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.js +3 -1
- package/dist/components/Modal/index.cjs +4 -2
- package/dist/components/Modal/index.cjs.map +1 -1
- package/dist/components/Modal/index.js +3 -1
- package/dist/components/ScrollArea/ScrollArea.cjs +2 -2
- package/dist/components/ScrollArea/ScrollArea.js +1 -1
- package/dist/components/ScrollArea/index.cjs +2 -2
- package/dist/components/ScrollArea/index.js +1 -1
- package/dist/components/Sidebar/Sidebar.cjs +2 -2
- package/dist/components/Sidebar/Sidebar.js +1 -1
- package/dist/components/Sidebar/SidebarMenu.cjs +3 -3
- package/dist/components/Sidebar/SidebarMenu.js +2 -2
- package/dist/components/Sidebar/index.cjs +4 -4
- package/dist/components/Sidebar/index.js +3 -3
- package/dist/components/TagInput/TagInput.cjs +2 -2
- package/dist/components/TagInput/TagInput.js +1 -1
- package/dist/components/TagInput/index.cjs +2 -2
- package/dist/components/TagInput/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +2 -2
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/index.cjs +2 -2
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/index.cjs +23 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -6
- package/dist/index.d.ts +20 -6
- package/dist/index.js +35 -33
- package/package.json +3 -3
- package/dist/chunk-4ZCLTLVC.cjs.map +0 -1
- package/dist/chunk-54GIEP6E.cjs.map +0 -1
- package/dist/chunk-6A73DWVA.js.map +0 -1
- package/dist/chunk-BNULFLPC.js.map +0 -1
- package/dist/chunk-D7BZ6L4Z.cjs.map +0 -1
- package/dist/chunk-DBB47IAX.js.map +0 -1
- package/dist/chunk-JQO3EFLX.cjs.map +0 -1
- package/dist/chunk-LES7CZSC.cjs.map +0 -1
- package/dist/chunk-MUM6HKPT.js.map +0 -1
- package/dist/chunk-SOIZIH7F.js.map +0 -1
- /package/dist/{chunk-EFKAKU2X.js.map → chunk-66EVFQVL.js.map} +0 -0
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/index.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,21eAAC","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/index.cjs"}
|
package/dist/index.d.cts
CHANGED
|
@@ -320,6 +320,12 @@ interface TooltipContentProps extends Omit<React.ComponentProps<typeof Tooltip$1
|
|
|
320
320
|
/** Show a small arrow pointing at the trigger. Defaults to true. */
|
|
321
321
|
arrow?: boolean;
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Tooltip root. **Must be rendered inside `<DgaProvider>`** — the provider
|
|
325
|
+
* supplies the Radix `TooltipProvider` this depends on (and the themed portal
|
|
326
|
+
* container). There is no need to add your own `TooltipProvider`; used outside
|
|
327
|
+
* a `DgaProvider` the tooltip will not work.
|
|
328
|
+
*/
|
|
323
329
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
324
330
|
declare function TooltipTrigger({ className, ...props }: TooltipTriggerProps): react_jsx_runtime.JSX.Element;
|
|
325
331
|
declare function TooltipContent({ size, arrow, sideOffset, className, children, ...props }: TooltipContentProps): react_jsx_runtime.JSX.Element;
|
|
@@ -398,6 +404,7 @@ declare function ModalContent({ size, showCloseButton, closeLabel, className, ch
|
|
|
398
404
|
declare function ModalHeader({ asChild, className, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
399
405
|
declare function ModalTitle({ asChild, className, ...props }: ModalTitleProps): react_jsx_runtime.JSX.Element;
|
|
400
406
|
declare function ModalDescription({ asChild, className, ...props }: ModalDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
407
|
+
declare function ModalBody({ asChild, className, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
401
408
|
declare function ModalFooter({ asChild, className, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
402
409
|
declare function ModalClose({ className, ...props }: ModalCloseProps): react_jsx_runtime.JSX.Element;
|
|
403
410
|
|
|
@@ -1310,8 +1317,17 @@ declare function SidebarTrigger({ asChild, className, onClick, children, 'aria-l
|
|
|
1310
1317
|
declare function SidebarRail({ className, 'aria-label': ariaLabel, ...props }: React.ComponentProps<'button'>): react_jsx_runtime.JSX.Element;
|
|
1311
1318
|
interface SidebarInsetProps extends React.ComponentProps<'main'> {
|
|
1312
1319
|
asChild?: boolean;
|
|
1320
|
+
/**
|
|
1321
|
+
* Make the inset its own vertical scroll region: tall content scrolls inside
|
|
1322
|
+
* it (the sidebar + footer stay put) with zero consumer layout CSS — no
|
|
1323
|
+
* `flex` / `min-block-size:0` / `overflow-y:auto` boilerplate. The whole inset
|
|
1324
|
+
* scrolls, header included; for a fixed header with only the body scrolling,
|
|
1325
|
+
* leave this off and compose a nested scroll region inside the inset (see the
|
|
1326
|
+
* App shell story).
|
|
1327
|
+
*/
|
|
1328
|
+
scrollable?: boolean;
|
|
1313
1329
|
}
|
|
1314
|
-
declare function SidebarInset({ asChild, className, ...props }: SidebarInsetProps): react_jsx_runtime.JSX.Element;
|
|
1330
|
+
declare function SidebarInset({ asChild, scrollable, className, ...props }: SidebarInsetProps): react_jsx_runtime.JSX.Element;
|
|
1315
1331
|
type SidebarSectionProps = React.ComponentProps<'div'> & {
|
|
1316
1332
|
asChild?: boolean;
|
|
1317
1333
|
};
|
|
@@ -1372,9 +1388,7 @@ interface SidebarMenuSubButtonProps extends React.ComponentProps<'a'>, VariantPr
|
|
|
1372
1388
|
}
|
|
1373
1389
|
declare function SidebarMenuSubButton({ asChild, isActive, size, className, ...props }: SidebarMenuSubButtonProps): react_jsx_runtime.JSX.Element;
|
|
1374
1390
|
|
|
1375
|
-
declare const scrollAreaVariants: (props?:
|
|
1376
|
-
orientation?: "both" | "horizontal" | "vertical" | null | undefined;
|
|
1377
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1391
|
+
declare const scrollAreaVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
1378
1392
|
type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';
|
|
1379
1393
|
interface ScrollAreaProps extends Omit<React.ComponentProps<typeof ScrollArea$1.Root>, 'asChild' | 'orientation'>, Omit<VariantProps<typeof scrollAreaVariants>, 'orientation'> {
|
|
1380
1394
|
/** Which scrollbar(s) to render. Default `'vertical'`. */
|
|
@@ -1825,7 +1839,7 @@ interface TagInputProps extends NativeInputProps, Omit<VariantProps<typeof tagIn
|
|
|
1825
1839
|
/** Live-region text announced on add/remove (screen readers). */
|
|
1826
1840
|
formatAnnouncement?: (tag: string, action: 'add' | 'remove') => string;
|
|
1827
1841
|
}
|
|
1828
|
-
declare function TagInput({ id: externalId, value, defaultValue, onChange, label, helperText, errorMessage, error, size, disabled, placeholder, max, allowDuplicates, caseSensitive, validate, delimiters, chipVariant, removeLabel, formatAnnouncement, className, ...props }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
1842
|
+
declare function TagInput({ id: externalId, value, defaultValue, onChange, label, helperText, errorMessage, error, size, disabled, required, placeholder, max, allowDuplicates, caseSensitive, validate, delimiters, chipVariant, removeLabel, formatAnnouncement, className, ...props }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
1829
1843
|
|
|
1830
1844
|
declare const dateRangePickerTriggerVariants: (props?: ({
|
|
1831
1845
|
size?: "sm" | "md" | null | undefined;
|
|
@@ -2028,4 +2042,4 @@ declare function FieldMessage({ id, variant, children }: FieldMessageProps): rea
|
|
|
2028
2042
|
|
|
2029
2043
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2030
2044
|
|
|
2031
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
|
|
2045
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalBody, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
|
package/dist/index.d.ts
CHANGED
|
@@ -320,6 +320,12 @@ interface TooltipContentProps extends Omit<React.ComponentProps<typeof Tooltip$1
|
|
|
320
320
|
/** Show a small arrow pointing at the trigger. Defaults to true. */
|
|
321
321
|
arrow?: boolean;
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Tooltip root. **Must be rendered inside `<DgaProvider>`** — the provider
|
|
325
|
+
* supplies the Radix `TooltipProvider` this depends on (and the themed portal
|
|
326
|
+
* container). There is no need to add your own `TooltipProvider`; used outside
|
|
327
|
+
* a `DgaProvider` the tooltip will not work.
|
|
328
|
+
*/
|
|
323
329
|
declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
324
330
|
declare function TooltipTrigger({ className, ...props }: TooltipTriggerProps): react_jsx_runtime.JSX.Element;
|
|
325
331
|
declare function TooltipContent({ size, arrow, sideOffset, className, children, ...props }: TooltipContentProps): react_jsx_runtime.JSX.Element;
|
|
@@ -398,6 +404,7 @@ declare function ModalContent({ size, showCloseButton, closeLabel, className, ch
|
|
|
398
404
|
declare function ModalHeader({ asChild, className, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
399
405
|
declare function ModalTitle({ asChild, className, ...props }: ModalTitleProps): react_jsx_runtime.JSX.Element;
|
|
400
406
|
declare function ModalDescription({ asChild, className, ...props }: ModalDescriptionProps): react_jsx_runtime.JSX.Element;
|
|
407
|
+
declare function ModalBody({ asChild, className, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
401
408
|
declare function ModalFooter({ asChild, className, ...props }: ModalSectionProps): react_jsx_runtime.JSX.Element;
|
|
402
409
|
declare function ModalClose({ className, ...props }: ModalCloseProps): react_jsx_runtime.JSX.Element;
|
|
403
410
|
|
|
@@ -1310,8 +1317,17 @@ declare function SidebarTrigger({ asChild, className, onClick, children, 'aria-l
|
|
|
1310
1317
|
declare function SidebarRail({ className, 'aria-label': ariaLabel, ...props }: React.ComponentProps<'button'>): react_jsx_runtime.JSX.Element;
|
|
1311
1318
|
interface SidebarInsetProps extends React.ComponentProps<'main'> {
|
|
1312
1319
|
asChild?: boolean;
|
|
1320
|
+
/**
|
|
1321
|
+
* Make the inset its own vertical scroll region: tall content scrolls inside
|
|
1322
|
+
* it (the sidebar + footer stay put) with zero consumer layout CSS — no
|
|
1323
|
+
* `flex` / `min-block-size:0` / `overflow-y:auto` boilerplate. The whole inset
|
|
1324
|
+
* scrolls, header included; for a fixed header with only the body scrolling,
|
|
1325
|
+
* leave this off and compose a nested scroll region inside the inset (see the
|
|
1326
|
+
* App shell story).
|
|
1327
|
+
*/
|
|
1328
|
+
scrollable?: boolean;
|
|
1313
1329
|
}
|
|
1314
|
-
declare function SidebarInset({ asChild, className, ...props }: SidebarInsetProps): react_jsx_runtime.JSX.Element;
|
|
1330
|
+
declare function SidebarInset({ asChild, scrollable, className, ...props }: SidebarInsetProps): react_jsx_runtime.JSX.Element;
|
|
1315
1331
|
type SidebarSectionProps = React.ComponentProps<'div'> & {
|
|
1316
1332
|
asChild?: boolean;
|
|
1317
1333
|
};
|
|
@@ -1372,9 +1388,7 @@ interface SidebarMenuSubButtonProps extends React.ComponentProps<'a'>, VariantPr
|
|
|
1372
1388
|
}
|
|
1373
1389
|
declare function SidebarMenuSubButton({ asChild, isActive, size, className, ...props }: SidebarMenuSubButtonProps): react_jsx_runtime.JSX.Element;
|
|
1374
1390
|
|
|
1375
|
-
declare const scrollAreaVariants: (props?:
|
|
1376
|
-
orientation?: "both" | "horizontal" | "vertical" | null | undefined;
|
|
1377
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1391
|
+
declare const scrollAreaVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
1378
1392
|
type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';
|
|
1379
1393
|
interface ScrollAreaProps extends Omit<React.ComponentProps<typeof ScrollArea$1.Root>, 'asChild' | 'orientation'>, Omit<VariantProps<typeof scrollAreaVariants>, 'orientation'> {
|
|
1380
1394
|
/** Which scrollbar(s) to render. Default `'vertical'`. */
|
|
@@ -1825,7 +1839,7 @@ interface TagInputProps extends NativeInputProps, Omit<VariantProps<typeof tagIn
|
|
|
1825
1839
|
/** Live-region text announced on add/remove (screen readers). */
|
|
1826
1840
|
formatAnnouncement?: (tag: string, action: 'add' | 'remove') => string;
|
|
1827
1841
|
}
|
|
1828
|
-
declare function TagInput({ id: externalId, value, defaultValue, onChange, label, helperText, errorMessage, error, size, disabled, placeholder, max, allowDuplicates, caseSensitive, validate, delimiters, chipVariant, removeLabel, formatAnnouncement, className, ...props }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
1842
|
+
declare function TagInput({ id: externalId, value, defaultValue, onChange, label, helperText, errorMessage, error, size, disabled, required, placeholder, max, allowDuplicates, caseSensitive, validate, delimiters, chipVariant, removeLabel, formatAnnouncement, className, ...props }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
1829
1843
|
|
|
1830
1844
|
declare const dateRangePickerTriggerVariants: (props?: ({
|
|
1831
1845
|
size?: "sm" | "md" | null | undefined;
|
|
@@ -2028,4 +2042,4 @@ declare function FieldMessage({ id, variant, children }: FieldMessageProps): rea
|
|
|
2028
2042
|
|
|
2029
2043
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2030
2044
|
|
|
2031
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
|
|
2045
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalBody, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
|
package/dist/index.js
CHANGED
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
import {
|
|
68
68
|
TagInput,
|
|
69
69
|
tagInputVariants
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-BTP7G7WR.js";
|
|
71
71
|
import "./chunk-JVUANKS3.js";
|
|
72
72
|
import {
|
|
73
73
|
Slider,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
SidebarRail,
|
|
107
107
|
SidebarSeparator,
|
|
108
108
|
SidebarTrigger
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-HBAHWCBK.js";
|
|
110
110
|
import {
|
|
111
111
|
SidebarGroup,
|
|
112
112
|
SidebarGroupAction,
|
|
@@ -125,14 +125,14 @@ import {
|
|
|
125
125
|
SidebarMenuSubItem,
|
|
126
126
|
sidebarMenuButtonVariants,
|
|
127
127
|
sidebarMenuSubButtonVariants
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-66EVFQVL.js";
|
|
129
129
|
import "./chunk-66R54X6R.js";
|
|
130
130
|
import {
|
|
131
131
|
Tooltip,
|
|
132
132
|
TooltipContent,
|
|
133
133
|
TooltipTrigger,
|
|
134
134
|
tooltipContentVariants
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-IFB53HNO.js";
|
|
136
136
|
import {
|
|
137
137
|
useSidebar
|
|
138
138
|
} from "./chunk-F7NPGAKU.js";
|
|
@@ -153,7 +153,7 @@ import "./chunk-JQJSYOJP.js";
|
|
|
153
153
|
import {
|
|
154
154
|
ScrollArea,
|
|
155
155
|
scrollAreaVariants
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-UAECZXU5.js";
|
|
157
157
|
import "./chunk-HBCSQSOP.js";
|
|
158
158
|
import {
|
|
159
159
|
SearchBox
|
|
@@ -211,6 +211,7 @@ import {
|
|
|
211
211
|
import "./chunk-WAIVED2F.js";
|
|
212
212
|
import {
|
|
213
213
|
Modal,
|
|
214
|
+
ModalBody,
|
|
214
215
|
ModalClose,
|
|
215
216
|
ModalContent,
|
|
216
217
|
ModalDescription,
|
|
@@ -219,7 +220,7 @@ import {
|
|
|
219
220
|
ModalTitle,
|
|
220
221
|
ModalTrigger,
|
|
221
222
|
modalContentVariants
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-JOJ23OD4.js";
|
|
223
224
|
import "./chunk-J7AM52HN.js";
|
|
224
225
|
import {
|
|
225
226
|
NumberInput,
|
|
@@ -261,19 +262,6 @@ import {
|
|
|
261
262
|
ListItemIcon,
|
|
262
263
|
listVariants
|
|
263
264
|
} from "./chunk-5QC5N3OO.js";
|
|
264
|
-
import "./chunk-O6AFVTKN.js";
|
|
265
|
-
import {
|
|
266
|
-
Drawer,
|
|
267
|
-
DrawerBody,
|
|
268
|
-
DrawerClose,
|
|
269
|
-
DrawerContent,
|
|
270
|
-
DrawerDescription,
|
|
271
|
-
DrawerFooter,
|
|
272
|
-
DrawerHeader,
|
|
273
|
-
DrawerTitle,
|
|
274
|
-
DrawerTrigger,
|
|
275
|
-
drawerVariants
|
|
276
|
-
} from "./chunk-VAF6PKVY.js";
|
|
277
265
|
import "./chunk-2PESUXE3.js";
|
|
278
266
|
import {
|
|
279
267
|
DropdownMenu,
|
|
@@ -291,6 +279,19 @@ import {
|
|
|
291
279
|
DropdownMenuTrigger,
|
|
292
280
|
dropdownMenuVariants
|
|
293
281
|
} from "./chunk-XCR3TPXT.js";
|
|
282
|
+
import "./chunk-O6AFVTKN.js";
|
|
283
|
+
import {
|
|
284
|
+
Drawer,
|
|
285
|
+
DrawerBody,
|
|
286
|
+
DrawerClose,
|
|
287
|
+
DrawerContent,
|
|
288
|
+
DrawerDescription,
|
|
289
|
+
DrawerFooter,
|
|
290
|
+
DrawerHeader,
|
|
291
|
+
DrawerTitle,
|
|
292
|
+
DrawerTrigger,
|
|
293
|
+
drawerVariants
|
|
294
|
+
} from "./chunk-VAF6PKVY.js";
|
|
294
295
|
import "./chunk-AMRMIZNY.js";
|
|
295
296
|
import {
|
|
296
297
|
EmptyState,
|
|
@@ -321,7 +322,7 @@ import {
|
|
|
321
322
|
DateRangePicker,
|
|
322
323
|
dateRangePickerTriggerVariants,
|
|
323
324
|
dateRangePickerVariants
|
|
324
|
-
} from "./chunk-
|
|
325
|
+
} from "./chunk-MCHL23CE.js";
|
|
325
326
|
import "./chunk-SDFMITFO.js";
|
|
326
327
|
import "./chunk-TT2DEREM.js";
|
|
327
328
|
import "./chunk-L23ETA7K.js";
|
|
@@ -356,7 +357,7 @@ import {
|
|
|
356
357
|
ComboboxSeparator,
|
|
357
358
|
comboboxTriggerVariants,
|
|
358
359
|
comboboxVariants
|
|
359
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-6DN3JE3P.js";
|
|
360
361
|
import "./chunk-FAHKOTCS.js";
|
|
361
362
|
import {
|
|
362
363
|
Command,
|
|
@@ -369,14 +370,11 @@ import {
|
|
|
369
370
|
CommandSeparator,
|
|
370
371
|
commandVariants
|
|
371
372
|
} from "./chunk-CGCO7RFO.js";
|
|
372
|
-
import "./chunk-
|
|
373
|
+
import "./chunk-IQ4KQJAO.js";
|
|
373
374
|
import {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
AvatarImage,
|
|
378
|
-
avatarVariants
|
|
379
|
-
} from "./chunk-AV6BIQQA.js";
|
|
375
|
+
Badge,
|
|
376
|
+
badgeVariants
|
|
377
|
+
} from "./chunk-BS4PX23P.js";
|
|
380
378
|
import "./chunk-FHORBVCQ.js";
|
|
381
379
|
import {
|
|
382
380
|
Breadcrumb,
|
|
@@ -424,16 +422,19 @@ import {
|
|
|
424
422
|
AlertTitle,
|
|
425
423
|
alertVariants
|
|
426
424
|
} from "./chunk-VPTWF4AK.js";
|
|
425
|
+
import "./chunk-CDS4SYEQ.js";
|
|
427
426
|
import "./chunk-2F6V4OWR.js";
|
|
428
427
|
import {
|
|
429
428
|
AspectRatio
|
|
430
429
|
} from "./chunk-JQ4P7OBA.js";
|
|
431
|
-
import "./chunk-
|
|
430
|
+
import "./chunk-GNU7VKLZ.js";
|
|
432
431
|
import {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
432
|
+
Avatar,
|
|
433
|
+
AvatarFallback,
|
|
434
|
+
AvatarGroup,
|
|
435
|
+
AvatarImage,
|
|
436
|
+
avatarVariants
|
|
437
|
+
} from "./chunk-AV6BIQQA.js";
|
|
437
438
|
import "./chunk-WI5UIBM5.js";
|
|
438
439
|
import {
|
|
439
440
|
FieldMessage
|
|
@@ -559,6 +560,7 @@ export {
|
|
|
559
560
|
MenubarSubTrigger,
|
|
560
561
|
MenubarTrigger,
|
|
561
562
|
Modal,
|
|
563
|
+
ModalBody,
|
|
562
564
|
ModalClose,
|
|
563
565
|
ModalContent,
|
|
564
566
|
ModalDescription,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-dga/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "React 19 components for the DGA (Digital Government Authority) design system , accessible, RTL-native, dark-mode ready.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"cmdk": "^1.1.1",
|
|
57
57
|
"radix-ui": "^1.0.0",
|
|
58
58
|
"react-aria-components": "^1.17.0",
|
|
59
|
-
"@dev-dga/tokens": "0.
|
|
59
|
+
"@dev-dga/tokens": "0.9.1"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"react": "^19.0.0",
|
|
63
63
|
"react-dom": "^19.0.0",
|
|
64
|
-
"@dev-dga/css": "0.
|
|
64
|
+
"@dev-dga/css": "0.9.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@storybook/react-vite": "^10.2.15",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-4ZCLTLVC.cjs","../src/components/Combobox/Combobox.tsx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A,IAAC,aAAA,CAAQ,SAAA;AAAA,IAAR;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,SAAA,EAAW,kCAAA,yBAAG,EAA2B,SAAS,CAAA;AAAA,MACjD,GAAG;AAAA,IAAA;AAAA,EACN,CAAA;AAEJ;AD7IA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACF,+PAAC","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-4ZCLTLVC.cjs","sourcesContent":[null,"'use client';\n\nimport {\n Children,\n createContext,\n isValidElement,\n useCallback,\n useContext,\n useId,\n useMemo,\n useState,\n type ReactNode,\n} from 'react';\nimport { Command } from 'cmdk';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { Check, ChevronDown } from '../../internal/icons';\nimport { useFieldA11y, FieldMessage } from '../../field';\nimport { DgaContext } from '../../providers/DgaContext';\n\n// ─── 1. Variants ─── //\n\n// Trigger height matches Input/Select so a Combobox lines up in a form row.\nconst comboboxTriggerVariants = cva('ddga-combobox-trigger', {\n variants: {\n size: {\n sm: 'ddga-combobox-trigger--sm',\n md: 'ddga-combobox-trigger--md',\n },\n error: {\n true: 'ddga-combobox-trigger--error',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// Keep a no-op `comboboxVariants` for parity with the project's barrel\n// convention (every component re-exports a *Variants from its barrel).\nconst comboboxVariants = comboboxTriggerVariants;\n\n// ─── 2. Context (bridges Root state to Items + label lookup) ─── //\n//\n// Items register `value → label` on mount so the trigger can render the\n// selected option's human-readable label without consumers having to thread\n// a separate `displayValue` function in the common case. Async-loaded\n// options can still override via `<Combobox getLabel={...}>` below.\n\ninterface ComboboxContextValue {\n value?: string;\n select: (value: string) => void;\n}\n\nconst ComboboxContext = createContext<ComboboxContextValue | null>(null);\n\nfunction useComboboxContext(component: string): ComboboxContextValue {\n const ctx = useContext(ComboboxContext);\n if (!ctx) {\n throw new Error(`<${component}> must be rendered inside <Combobox>.`);\n }\n return ctx;\n}\n\n// ─── 3. Types ─── //\n\ninterface ComboboxProps extends VariantProps<typeof comboboxTriggerVariants> {\n /** Currently selected option value (controlled). */\n value?: string;\n /** Initial value when uncontrolled. */\n defaultValue?: string;\n /** Fires whenever the selection changes (controlled or uncontrolled). */\n onValueChange?: (value: string) => void;\n /** Controlled popover open state. */\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Visible label above the trigger. */\n label?: ReactNode;\n /** Hint shown below the trigger when there's no error. */\n helperText?: ReactNode;\n /** Message shown below the trigger when `error` is true. */\n errorMessage?: ReactNode;\n /** Marks the field invalid — sets `aria-invalid` and the error border. */\n error?: boolean;\n /** Marks the field required — adds the asterisk + `aria-required`. */\n required?: boolean;\n /** Disables the trigger entirely. */\n disabled?: boolean;\n /** Placeholder shown in the trigger when no value is selected. */\n placeholder?: ReactNode;\n /** Placeholder for the search input inside the panel. Defaults to `\"Search…\"`. */\n searchPlaceholder?: string;\n /** Shown when no item matches the search query. Defaults to `\"No results.\"`. */\n emptyMessage?: ReactNode;\n /**\n * Override the trigger label resolver — useful when items are loaded async\n * after the value is set, or when the trigger should show a richer label\n * than the item's rendered children. Receives the current value, returns\n * the node to display. Falls back to the registered item's label.\n */\n getLabel?: (value: string) => ReactNode;\n /** Caller-supplied id for the trigger; falls back to a generated one. */\n id?: string;\n /** Forwarded to the trigger (the focusable button). */\n className?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n /** `<ComboboxItem>` (+ optional Group / Separator) children. */\n children: ReactNode;\n}\n\ninterface ComboboxItemProps extends Omit<\n React.ComponentProps<typeof Command.Item>,\n 'value' | 'onSelect'\n> {\n /** Stable value for filtering + selection. */\n value: string;\n /** Extra search terms cmdk should match against the input. */\n keywords?: string[];\n /** Disable this item from selection. */\n disabled?: boolean;\n /** Optional select handler — fires alongside the root's `onValueChange`. */\n onSelect?: (value: string) => void;\n}\n\ninterface ComboboxGroupProps extends React.ComponentProps<typeof Command.Group> {\n /** Group heading rendered above its items. */\n heading?: ReactNode;\n}\n\ntype ComboboxSeparatorProps = React.ComponentProps<typeof Command.Separator>;\n\n// ─── 4. Root ─── //\n\nfunction Combobox({\n value: controlledValue,\n defaultValue,\n onValueChange,\n open: controlledOpen,\n defaultOpen,\n onOpenChange,\n label,\n helperText,\n errorMessage,\n error,\n required,\n disabled,\n size,\n placeholder,\n searchPlaceholder = 'Search…',\n emptyMessage = 'No results.',\n getLabel,\n id: externalId,\n className,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n}: ComboboxProps) {\n // Uncontrolled fallbacks.\n const [internalValue, setInternalValue] = useState<string | undefined>(defaultValue);\n const isControlled = controlledValue !== undefined;\n const value = isControlled ? controlledValue : internalValue;\n\n const [internalOpen, setInternalOpen] = useState(defaultOpen ?? false);\n const isOpenControlled = controlledOpen !== undefined;\n const open = isOpenControlled ? controlledOpen : internalOpen;\n\n const setOpen = useCallback(\n (next: boolean) => {\n if (!isOpenControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isOpenControlled, onOpenChange],\n );\n\n const select = useCallback(\n (next: string) => {\n if (!isControlled) setInternalValue(next);\n onValueChange?.(next);\n setOpen(false);\n },\n [isControlled, onValueChange, setOpen],\n );\n\n const ctx = useMemo<ComboboxContextValue>(() => ({ value, select }), [value, select]);\n\n // Walk `children` once to build a value → label map. Synchronous so the\n // trigger shows the right label on first render — registration via\n // useEffect would only fire when items mount, and items don't mount until\n // the popover opens (Radix Portal lazy-mounts). Recurses through\n // `ComboboxGroup` so grouped items still resolve. Bare children only —\n // doesn't dive into arbitrary nested DOM.\n const itemLabels = useMemo<Map<string, ReactNode>>(() => {\n const map = new Map<string, ReactNode>();\n const visit = (nodes: ReactNode): void => {\n Children.forEach(nodes, (child) => {\n if (!isValidElement(child)) return;\n const childProps = child.props as { value?: unknown; children?: ReactNode };\n if (typeof childProps.value === 'string') {\n map.set(childProps.value, childProps.children);\n } else if (childProps.children) {\n visit(childProps.children);\n }\n });\n };\n visit(children);\n return map;\n }, [children]);\n\n // Field a11y wiring — same primitive as Select.\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'Combobox',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n });\n\n // Portal anchored to DgaProvider root (mirrors Select/Modal/DropdownMenu).\n const providerCtx = useContext(DgaContext);\n // Body-mounted portal target (see DgaProvider) — escapes ancestor\n // clipping while keeping theme inheritance via mirrored data-theme/vars.\n const portalContainer = providerCtx?.portalEl ?? providerCtx?.rootEl ?? undefined;\n\n // Trigger label — explicit override wins; otherwise look up from the\n // children-derived map; otherwise fall back to the placeholder.\n const triggerLabel = useMemo<ReactNode>(() => {\n if (value === undefined) return null;\n if (getLabel) return getLabel(value);\n return itemLabels.get(value) ?? null;\n }, [value, getLabel, itemLabels]);\n\n const searchId = useId();\n\n return (\n <ComboboxContext.Provider value={ctx}>\n <div data-slot=\"combobox-field\" className=\"ddga-field\">\n {label && (\n <label htmlFor={fieldId} className=\"ddga-combobox__label\">\n {label}\n {required && (\n <span aria-hidden=\"true\" className=\"ddga-combobox__required\">\n *\n </span>\n )}\n </label>\n )}\n <PopoverPrimitive.Root open={open} onOpenChange={setOpen}>\n <PopoverPrimitive.Trigger asChild>\n <button\n type=\"button\"\n {...controlProps}\n // Trigger stays a plain button — Radix Popover.Trigger sets\n // aria-haspopup + aria-expanded + aria-controls so AT users\n // hear \"Pick a fruit, button, has popup\". We declared role=\"combobox\"\n // earlier but it requires aria-controls pointing to the listbox,\n // which Radix wires for dialog semantics — axe flagged the mismatch.\n aria-required={required || undefined}\n disabled={disabled}\n data-slot=\"combobox-trigger\"\n className={cn(comboboxTriggerVariants({ size, error: hasError }), className)}\n >\n <span className=\"ddga-combobox__value\">\n {triggerLabel ?? <span className=\"ddga-combobox__placeholder\">{placeholder}</span>}\n </span>\n <ChevronDown aria-hidden=\"true\" className=\"ddga-combobox__icon\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal container={portalContainer}>\n <PopoverPrimitive.Content\n data-slot=\"combobox-content\"\n className=\"ddga-combobox-content\"\n sideOffset={4}\n align=\"start\"\n // Popover.Content is role=\"dialog\" → axe requires an accessible\n // name. Use the field label when it's a string; otherwise fall\n // back to a generic \"Options\" so a11y stays valid even when the\n // consumer composes a rich React node as the label.\n aria-label={ariaLabel ?? (typeof label === 'string' ? label : 'Options')}\n aria-labelledby={ariaLabelledBy}\n // Match trigger width so the panel doesn't visually float over.\n style={{ inlineSize: 'var(--radix-popover-trigger-width)' }}\n onOpenAutoFocus={(event) => {\n // cmdk handles its own focus management (Input gets focused on\n // mount via autoFocus below). Prevent Radix from also moving\n // focus or we lose the search input as the auto-focus target.\n event.preventDefault();\n }}\n >\n <Command\n id={searchId}\n data-slot=\"combobox-command\"\n className=\"ddga-combobox-command\"\n // cmdk's default filter matches if the input is a substring of\n // the item value OR any keyword — fine for our v1 use case.\n >\n <Command.Input\n autoFocus\n placeholder={searchPlaceholder}\n data-slot=\"combobox-input\"\n className=\"ddga-combobox-input\"\n />\n <Command.List data-slot=\"combobox-list\" className=\"ddga-combobox-list\">\n <Command.Empty data-slot=\"combobox-empty\" className=\"ddga-combobox-empty\">\n {emptyMessage}\n </Command.Empty>\n {children}\n </Command.List>\n </Command>\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\">\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\">\n {helperText}\n </FieldMessage>\n )}\n </div>\n </ComboboxContext.Provider>\n );\n}\n\n// ─── 5. Item ─── //\n\nfunction ComboboxItem({\n value,\n keywords,\n disabled,\n onSelect,\n className,\n children,\n ...props\n}: ComboboxItemProps) {\n const { value: selectedValue, select } = useComboboxContext('ComboboxItem');\n\n const isSelected = selectedValue === value;\n\n return (\n <Command.Item\n value={value}\n keywords={keywords}\n disabled={disabled}\n onSelect={(v) => {\n onSelect?.(v);\n select(v);\n }}\n data-slot=\"combobox-item\"\n // cmdk owns `data-selected` for keyboard highlight — use a separate\n // attribute for the chosen value so the two don't collide.\n data-active={isSelected ? '' : undefined}\n className={cn('ddga-combobox-item', className)}\n {...props}\n >\n <span className=\"ddga-combobox-item__check\" aria-hidden=\"true\">\n {isSelected ? <Check /> : null}\n </span>\n <span className=\"ddga-combobox-item__label\">{children}</span>\n </Command.Item>\n );\n}\n\n// ─── 6. Group + Separator (cmdk passthroughs) ─── //\n\nfunction ComboboxGroup({ className, heading, ...props }: ComboboxGroupProps) {\n return (\n <Command.Group\n heading={heading}\n data-slot=\"combobox-group\"\n className={cn('ddga-combobox-group', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\n return (\n <Command.Separator\n data-slot=\"combobox-separator\"\n className={cn('ddga-combobox-separator', className)}\n {...props}\n />\n );\n}\n\n// ─── 7. Exports ─── //\n\nexport {\n Combobox,\n ComboboxItem,\n ComboboxGroup,\n ComboboxSeparator,\n comboboxTriggerVariants,\n comboboxVariants,\n};\nexport type { ComboboxProps, ComboboxItemProps, ComboboxGroupProps, ComboboxSeparatorProps };\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-54GIEP6E.cjs","../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACRA,8BAA2B;AAC3B,mCAAiE;AACjE,kEAAuC;AA8D9B,+CAAA;AAvDT,IAAM,qBAAA,EAAuB,yCAAA,YAAI,EAAc;AAAA,EAC7C,QAAA,EAAU;AAAA,IACR,I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A;AAAA,IAAhB;AAAA,MACC,OAAA;AAAA,MACA,WAAA,EAAU,mBAAA;AAAA,MACV,SAAA,EAAW,kCAAA,yBAAG,EAA2B,SAAS,CAAA;AAAA,MACjD,GAAG;AAAA,IAAA;AAAA,EACN,CAAA;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,OAAA,EAAS,SAAA,EAAW,GAAG,MAAM,CAAA,EAAsB;AACxE,EAAA,MAAM,KAAA,EAAO,QAAA,EAAU,aAAA,CAAc,KAAA,EAAO,KAAA;AAC5C,EAAA,uBACE,6BAAA,IAAC,EAAA,EAAK,WAAA,EAAU,cAAA,EAAe,SAAA,EAAW,kCAAA,oBAAG,EAAsB,SAAS,CAAA,EAAI,GAAG,MAAA,CAAO,CAAA;AAE9F;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,MAAM,CAAA,EAAoB;AAG5D,EAAA,uBAAO,6BAAA,eAAC,CAAgB,KAAA,EAAhB,EAAsB,WAAA,EAAU,aAAA,EAAc,SAAA,EAAuB,GAAG,MAAA,CAAO,CAAA;AACzF;AD1DA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,0UAAC","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-54GIEP6E.cjs","sourcesContent":[null,"'use client';\n\nimport { useContext } from 'react';\nimport { Dialog as DialogPrimitive, Slot as SlotPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { DgaContext } from '../../providers/DgaContext';\nimport { Close } from '../../internal/icons';\n\n// ─── 1. Variants (cva) ─── //\n\nconst modalContentVariants = cva('ddga-modal', {\n variants: {\n size: {\n sm: 'ddga-modal--sm',\n md: 'ddga-modal--md',\n lg: 'ddga-modal--lg',\n xl: 'ddga-modal--xl',\n full: 'ddga-modal--full',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n//\n// Closed compound shape that hides Radix's Portal/Overlay plumbing. The Portal\n// is anchored to `DgaContext.rootEl` so `data-theme` + custom theme classes\n// set on the provider inherit into the modal — without it, the modal would\n// silently mount under <body> and miss dark mode / palette switches.\n\ntype ModalProps = React.ComponentProps<typeof DialogPrimitive.Root>;\ntype ModalTriggerProps = React.ComponentProps<typeof DialogPrimitive.Trigger>;\ntype ModalCloseProps = React.ComponentProps<typeof DialogPrimitive.Close>;\n\ninterface ModalContentProps\n extends\n React.ComponentProps<typeof DialogPrimitive.Content>,\n VariantProps<typeof modalContentVariants> {\n /**\n * Render a corner X close button. Defaults to `true`. Set `false` for\n * action-forcing dialogs (e.g. \"Are you sure?\") where the user must pick\n * one of the explicit footer buttons.\n */\n showCloseButton?: boolean;\n /** Localized label for the close button. Defaults to `\"Close\"`. */\n closeLabel?: string;\n}\n\ntype ModalSectionProps = React.ComponentProps<'div'> & { asChild?: boolean };\n\ninterface ModalTitleProps extends React.ComponentProps<typeof DialogPrimitive.Title> {\n /** Override the heading element (e.g. render an `<h3>` instead of the default `<h2>`). */\n asChild?: boolean;\n}\n\ninterface ModalDescriptionProps extends React.ComponentProps<typeof DialogPrimitive.Description> {\n /** Override the element (e.g. render a `<div>` for richer markup). */\n asChild?: boolean;\n}\n\n// ─── 3. Components ─── //\n\nfunction Modal(props: ModalProps) {\n return <DialogPrimitive.Root {...props} />;\n}\n\nfunction ModalTrigger({ className, ...props }: ModalTriggerProps) {\n // Radix Trigger supports asChild natively — pass through.\n return <DialogPrimitive.Trigger data-slot=\"modal-trigger\" className={className} {...props} />;\n}\n\nfunction ModalContent({\n size,\n showCloseButton = true,\n closeLabel = 'Close',\n className,\n children,\n ...props\n}: ModalContentProps) {\n // Anchor the Portal to the DgaProvider's body-level portal container.\n // Pattern documented in DgaContext.ts; regression test in Modal.test.tsx\n // mirrors Select/Tooltip. The portal container mirrors data-theme + dir +\n // CSS vars from the provider so theming still flows; using it (rather\n // than the in-tree `rootEl`) keeps the modal's `position: fixed` overlay\n // from being trapped by an ancestor `transform` or `overflow: hidden`\n // (Storybook autodocs is the motivating case).\n const ctx = useContext(DgaContext);\n const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? undefined;\n\n return (\n <DialogPrimitive.Portal container={portalContainer}>\n <DialogPrimitive.Overlay className=\"ddga-modal__overlay\" data-slot=\"modal-overlay\" />\n <DialogPrimitive.Content\n data-slot=\"modal-content\"\n className={cn(modalContentVariants({ size }), className)}\n {...props}\n >\n {children}\n {showCloseButton ? (\n <DialogPrimitive.Close\n className=\"ddga-modal__close\"\n aria-label={closeLabel}\n data-slot=\"modal-close-x\"\n >\n <Close aria-hidden=\"true\" />\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n );\n}\n\nfunction ModalHeader({ asChild, className, ...props }: ModalSectionProps) {\n const Comp = asChild ? SlotPrimitive.Slot : 'div';\n return (\n <Comp data-slot=\"modal-header\" className={cn('ddga-modal__header', className)} {...props} />\n );\n}\n\nfunction ModalTitle({ asChild, className, ...props }: ModalTitleProps) {\n // Dialog.Title wires aria-labelledby on the parent Content. We pass asChild\n // through so consumers can swap heading level (h2 → h1/h3) without losing\n // the labelling link.\n return (\n <DialogPrimitive.Title\n asChild={asChild}\n data-slot=\"modal-title\"\n className={cn('ddga-modal__title', className)}\n {...props}\n />\n );\n}\n\nfunction ModalDescription({ asChild, className, ...props }: ModalDescriptionProps) {\n // Dialog.Description wires aria-describedby on the parent Content. asChild\n // lets consumers swap the element if they need richer markup.\n return (\n <DialogPrimitive.Description\n asChild={asChild}\n data-slot=\"modal-description\"\n className={cn('ddga-modal__description', className)}\n {...props}\n />\n );\n}\n\nfunction ModalFooter({ asChild, className, ...props }: ModalSectionProps) {\n const Comp = asChild ? SlotPrimitive.Slot : 'div';\n return (\n <Comp data-slot=\"modal-footer\" className={cn('ddga-modal__footer', className)} {...props} />\n );\n}\n\nfunction ModalClose({ className, ...props }: ModalCloseProps) {\n // Consumer-level close trigger for footer buttons etc. Radix Close supports\n // asChild natively — pass through so consumers can wrap a <Button>.\n return <DialogPrimitive.Close data-slot=\"modal-close\" className={className} {...props} />;\n}\n\n// ─── 4. Exports ─── //\n\nexport {\n Modal,\n ModalTrigger,\n ModalContent,\n ModalHeader,\n ModalTitle,\n ModalDescription,\n ModalFooter,\n ModalClose,\n modalContentVariants,\n};\nexport type {\n ModalProps,\n ModalTriggerProps,\n ModalContentProps,\n ModalSectionProps,\n ModalTitleProps,\n ModalDescriptionProps,\n ModalCloseProps,\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ScrollArea/ScrollArea.tsx"],"sourcesContent":["'use client';\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\n\nconst scrollAreaVariants = cva('ddga-scroll-area', {\n variants: {\n orientation: {\n vertical: 'ddga-scroll-area--vertical',\n horizontal: 'ddga-scroll-area--horizontal',\n both: 'ddga-scroll-area--both',\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nfunction warnMissingLabel(ariaLabel?: string, ariaLabelledby?: string) {\n if (process.env.NODE_ENV === 'production') return;\n if (ariaLabel || ariaLabelledby) return;\n // Warn on every render (dev only) — mirrors the Popover sibling's a11y warning.\n console.warn(\n '[dga/ScrollArea] <ScrollArea> has no accessible name. The scroll viewport is ' +\n 'keyboard-focusable; pass `aria-label` or `aria-labelledby` so screen-reader users ' +\n 'know what region they are scrolling. If the content is itself focusable (e.g. a list ' +\n 'of links) and you do not want a labelled region, pass `viewportProps={{ tabIndex: -1 }}`.',\n );\n}\n\ntype ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';\n\nexport interface ScrollAreaProps\n extends\n Omit<React.ComponentProps<typeof ScrollAreaPrimitive.Root>, 'asChild' | 'orientation'>,\n Omit<VariantProps<typeof scrollAreaVariants>, 'orientation'> {\n /** Which scrollbar(s) to render. Default `'vertical'`. */\n orientation?: ScrollAreaOrientation;\n /** Ref to the scrollable viewport — use for programmatic scrolling. */\n viewportRef?: React.Ref<HTMLDivElement>;\n /**\n * Extra props forwarded to the viewport element (use `viewportRef` for the ref).\n * To drop the extra tab stop when the scrolled content is itself fully focusable\n * (e.g. a list of links), pass `viewportProps={{ tabIndex: -1 }}`.\n */\n viewportProps?: Omit<React.ComponentProps<'div'>, 'ref'>;\n /** Names the scroll region. Warns (dev only) if neither this nor `aria-labelledby` is set. */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\n/**\n * Cross-browser, design-system-styled scroll container (wraps Radix ScrollArea).\n *\n * Set the bounding size (height / max-height) on the element via `className` /\n * `style` — without a bounded size nothing scrolls, exactly like native overflow.\n * The viewport is keyboard-focusable (`tabIndex={0}`) so keyboard users can scroll\n * with the arrow / Page keys; pass `aria-label` to name the region.\n *\n * Does not support `asChild`: it is a structural wrapper composing several Radix\n * parts, and the meaningful node — the viewport — is exposed via `viewportRef`.\n */\nexport function ScrollArea({\n className,\n orientation = 'vertical',\n type = 'hover',\n scrollHideDelay = 600,\n viewportRef,\n viewportProps,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...props\n}: ScrollAreaProps) {\n warnMissingLabel(ariaLabel, ariaLabelledby);\n\n const hasLabel = Boolean(ariaLabel || ariaLabelledby);\n const showVertical = orientation === 'vertical' || orientation === 'both';\n const showHorizontal = orientation === 'horizontal' || orientation === 'both';\n\n const { className: viewportClassName, ...restViewportProps } = viewportProps ?? {};\n\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={cn(scrollAreaVariants({ orientation }), className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={cn('ddga-scroll-area__viewport', viewportClassName)}\n ref={viewportRef}\n tabIndex={0}\n role={hasLabel ? 'region' : undefined}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n {...restViewportProps}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n {showVertical ? (\n <ScrollAreaPrimitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation=\"vertical\"\n className=\"ddga-scroll-area__scrollbar\"\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"scroll-area-thumb\"\n className=\"ddga-scroll-area__thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n {showHorizontal ? (\n <ScrollAreaPrimitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation=\"horizontal\"\n className=\"ddga-scroll-area__scrollbar\"\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"scroll-area-thumb\"\n className=\"ddga-scroll-area__thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n {orientation === 'both' ? (\n <ScrollAreaPrimitive.Corner\n data-slot=\"scroll-area-corner\"\n className=\"ddga-scroll-area__corner\"\n />\n ) : null}\n </ScrollAreaPrimitive.Root>\n );\n}\n\nexport { scrollAreaVariants };\nexport type { ScrollAreaOrientation };\n"],"mappings":";;;;;AAEA,SAAS,cAAc,2BAA2B;AAClD,SAAS,WAA8B;AAiFnC,SAOE,KAPF;AA9EJ,IAAM,qBAAqB,IAAI,oBAAoB;AAAA,EACjD,UAAU;AAAA,IACR,aAAa;AAAA,MACX,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,EACf;AACF,CAAC;AAED,SAAS,iBAAiB,WAAoB,gBAAyB;AACrE,MAAI,QAAQ,IAAI,aAAa,aAAc;AAC3C,MAAI,aAAa,eAAgB;AAEjC,UAAQ;AAAA,IACN;AAAA,EAIF;AACF;AAkCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,c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AA;AAAA,QACZ,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Sidebar/Sidebar.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { Slot as SlotPrimitive } from 'radix-ui';\nimport { cn } from '../../utils/cn';\nimport { Drawer, DrawerContent } from '../Drawer';\nimport { PanelLeft } from '../../internal/icons';\nimport { SidebarContext, useSidebar, type SidebarContextValue } from './SidebarContext';\nimport { useIsMobile } from './useIsMobile';\n\n// ─── SidebarProvider ─── //\n\ninterface SidebarProviderProps extends React.ComponentProps<'div'> {\n /** Uncontrolled initial desktop state. Default true (expanded). */\n defaultOpen?: boolean;\n /** Controlled desktop open state. */\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Viewport width (px) below which the mobile Drawer engages. Default 768. */\n mobileBreakpoint?: number;\n /** Register Cmd/Ctrl+B to toggle. Default true. */\n keyboardShortcut?: boolean;\n}\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange,\n mobileBreakpoint = 768,\n keyboardShortcut = true,\n className,\n style,\n children,\n ...props\n}: SidebarProviderProps) {\n const isMobile = useIsMobile(mobileBreakpoint);\n const [openMobile, setOpenMobile] = useState(false);\n\n const isControlled = openProp !== undefined;\n const [openInternal, setOpenInternal] = useState(defaultOpen);\n const open = isControlled ? (openProp as boolean) : openInternal;\n\n const setOpen = useCallback(\n (value: boolean) => {\n if (!isControlled) setOpenInternal(value);\n onOpenChange?.(value);\n },\n [isControlled, onOpenChange],\n );\n\n const toggleSidebar = useCallback(() => {\n if (isMobile) {\n setOpenMobile((v) => !v);\n return;\n }\n if (isControlled) {\n onOpenChange?.(!open);\n } else {\n setOpenInternal((v) => !v);\n }\n }, [isMobile, isControlled, onOpenChange, open]);\n\n useEffect(() => {\n if (!keyboardShortcut) return;\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key.toLowerCase() === 'b' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n toggleSidebar();\n }\n };\n window.addEventListener('keydown', onKeyDown);\n return () => window.removeEventListener('keydown', onKeyDown);\n }, [keyboardShortcut, toggleSidebar]);\n\n const state: 'expanded' | 'collapsed' = open ? 'expanded' : 'collapsed';\n\n const value = useMemo<SidebarContextValue>(\n () => ({ state, open, setOpen, openMobile, setOpenMobile, isMobile, toggleSidebar }),\n [state, open, setOpen, openMobile, isMobile, toggleSidebar],\n );\n\n return (\n <SidebarContext.Provider value={value}>\n <div\n data-slot=\"sidebar-wrapper\"\n className={cn('ddga-sidebar-wrapper', className)}\n style={style}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n );\n}\n\n// ─── Sidebar (container) ─── //\n\ninterface SidebarProps extends React.ComponentProps<'div'> {\n variant?: 'sidebar' | 'floating' | 'inset';\n collapsible?: 'icon' | 'offcanvas' | 'none';\n /** Logical side; flips with dir. Default 'start'. */\n side?: 'start' | 'end';\n}\n\nfunction Sidebar({\n variant = 'sidebar',\n collapsible = 'icon',\n side = 'start',\n className,\n children,\n 'aria-label': ariaLabel = 'Sidebar',\n ...props\n}: SidebarProps) {\n const { isMobile, openMobile, setOpenMobile, state } = useSidebar();\n\n if (isMobile) {\n return (\n <Drawer open={openMobile} onOpenChange={setOpenMobile}>\n <DrawerContent\n side={side}\n size=\"sm\"\n aria-label={ariaLabel}\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n data-variant={variant}\n data-side={side}\n className={cn('ddga-sidebar', 'ddga-sidebar--mobile', className)}\n {...props}\n >\n {children}\n </DrawerContent>\n </Drawer>\n );\n }\n\n return (\n <aside\n data-slot=\"sidebar\"\n aria-label={ariaLabel}\n data-state={state}\n data-collapsible={collapsible}\n data-variant={variant}\n data-side={side}\n className={cn('ddga-sidebar', className)}\n {...props}\n >\n {children}\n </aside>\n );\n}\n\n// ─── Trigger / Rail / Inset ─── //\n\ninterface SidebarTriggerProps extends React.ComponentProps<'button'> {\n asChild?: boolean;\n}\n\nfunction SidebarTrigger({\n asChild,\n className,\n onClick,\n children,\n 'aria-label': ariaLabel = 'Toggle sidebar',\n ...props\n}: SidebarTriggerProps) {\n const { toggleSidebar, open, openMobile, isMobile } = useSidebar();\n const Comp = asChild ? SlotPrimitive.Slot : 'button';\n return (\n <Comp\n type={asChild ? undefined : 'button'}\n data-slot=\"sidebar-trigger\"\n // Don't override the child element's accessible name when asChild.\n aria-label={asChild ? undefined : ariaLabel}\n aria-haspopup={isMobile ? 'dialog' : undefined}\n aria-expanded={isMobile ? openMobile : open}\n className={cn('ddga-sidebar__trigger', className)}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n toggleSidebar();\n }}\n {...props}\n >\n {children ?? <PanelLeft aria-hidden=\"true\" />}\n </Comp>\n );\n}\n\nfunction SidebarRail({\n className,\n 'aria-label': ariaLabel = 'Toggle sidebar',\n ...props\n}: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar();\n return (\n <button\n type=\"button\"\n data-slot=\"sidebar-rail\"\n aria-label={ariaLabel}\n title={ariaLabel}\n tabIndex={-1}\n className={cn('ddga-sidebar__rail', className)}\n onClick={toggleSidebar}\n {...props}\n />\n );\n}\n\ninterface SidebarInsetProps extends React.ComponentProps<'main'> {\n asChild?: boolean;\n}\n\nfunction SidebarInset({ asChild, className, ...props }: SidebarInsetProps) {\n const Comp = asChild ? SlotPrimitive.Slot : 'main';\n return (\n <Comp data-slot=\"sidebar-inset\" className={cn('ddga-sidebar-inset', className)} {...props} />\n );\n}\n\n// ─── Structure ─── //\n\ntype SidebarSectionProps = React.ComponentProps<'div'> & { asChild?: boolean };\n\nfunction SidebarHeader({ asChild, className, ...props }: SidebarSectionProps) {\n const Comp = asChild ? SlotPrimitive.Slot : 'div';\n return (\n <Comp data-slot=\"sidebar-header\" className={cn('ddga-sidebar__header', className)} {...props} />\n );\n}\n\nfunction SidebarContent({ asChild, className, ...props }: SidebarSectionProps) {\n const Comp = asChild ? SlotPrimitive.Slot : 'div';\n return (\n <Comp\n data-slot=\"sidebar-content\"\n className={cn('ddga-sidebar__content', className)}\n {...props}\n />\n );\n}\n\nfunction SidebarFooter({ asChild, className, ...props }: SidebarSectionProps) {\n const Comp = asChild ? SlotPrimitive.Slot : 'div';\n return (\n <Comp data-slot=\"sidebar-footer\" className={cn('ddga-sidebar__footer', className)} {...props} />\n );\n}\n\nfunction SidebarSeparator({ className, ...props }: React.ComponentProps<'hr'>) {\n return (\n <hr\n data-slot=\"sidebar-separator\"\n className={cn('ddga-sidebar__separator', className)}\n {...props}\n />\n );\n}\n\n// ─── Exports ─── //\n\nexport { SidebarProvider };\nexport type { SidebarProviderProps };\n\nexport { Sidebar };\nexport type { SidebarProps };\n\nexport { SidebarTrigger, SidebarRail, SidebarInset };\nexport type { SidebarTriggerProps, SidebarInsetProps };\n\nexport { SidebarHeader, SidebarContent, SidebarFooter, SidebarSeparator };\nexport type { SidebarSectionProps };\n\nexport { useSidebar };\nexport type { SidebarContextValue };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,SAAS,aAAa,WAAW,SAAS,gBAAgB;AAC1D,SAAS,QAAQ,qBAAqB;AAgFhC;AA3DN,SAAS,gBAAgB;AAAA,EACvB,cAAc;AAAA,EACd,MAAM;AAAA,EACN;AAAA,EACA,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAyB;AACvB,QAAM,WAAW,YAAY,gBAAgB;AAC7C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAElD,QAAM,eAAe,aAAa;AAClC,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,WAAW;AAC5D,QAAM,OAAO,eAAgB,WAAuB;AAEpD,QAAM,UAAU;AAAA,IACd,CAACA,WAAmB;AAClB,UAAI,CAAC,aAAc,iBAAgBA,MAAK;AACxC,qBAAeA,MAAK;AAAA,IACtB;AAAA,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AAA;AAAA,YAAA;AAlBoB,YAAA;AAqB1B,UAAA;AAEF,0BAAA;AAAC,YAAA;AAAA,YAAA;AAGK,cAAA;AACA,cAAA;AACC,cAAA;AACK,cAAA;AACA,cAAA;AACL,cAAA;AACE,cAAA;AACP,cAAA;AACkB,cAAA;AACG,cAAA;AACV,cAAA;AACF,cAAA;AAAA,YAAA;AACX,UAAA;AAAA,QAAA;AAAA,MAAA;AACF,IAAA;AACK,oBAAA;AAIH,IAAA;AAKC,IAAA;AAIL,EAAA;AAEJ;ADxFuC;AACA;AACA;AACA;AACA","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-D7BZ6L4Z.cjs","sourcesContent":[null,"'use client';\n\nimport { useRef, useState, type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { useFieldA11y, FieldMessage } from '../../field';\nimport { Badge, type BadgeProps } from '../Badge';\n\n// ─── 1. Variants (cva) ─── //\n\n// Applied to the *control* (the bordered box), not the raw <input> — the box\n// owns the border, sizing, focus ring and disabled/error styling so the chips\n// and the text input wrap inside the field. Mirrors Input's box, but the box\n// grows vertically as chips wrap (min-block-size, not a fixed height).\nconst tagInputVariants = cva('ddga-tag-input', {\n variants: {\n size: {\n sm: 'ddga-tag-input--sm',\n md: 'ddga-tag-input--md',\n lg: 'ddga-tag-input--lg',\n },\n error: {\n true: 'ddga-tag-input--error',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n\n// We own `value` / `defaultValue` (string[] tags, not strings), `onChange`\n// (fires with the tag array), and the design-system `size` variant — so they\n// are stripped from the native input props the rest are spread onto.\ntype NativeInputProps = Omit<\n React.ComponentProps<'input'>,\n 'value' | 'defaultValue' | 'onChange' | 'size'\n>;\n\ninterface TagInputProps\n extends NativeInputProps, Omit<VariantProps<typeof tagInputVariants>, 'error'> {\n /** Controlled tag list. */\n value?: string[];\n /** Uncontrolled initial tag list. */\n defaultValue?: string[];\n /** Fires with the full accepted tag set after every add/remove. */\n onChange?: (tags: string[]) => void;\n /** Visible field label, associated to the text input. */\n label?: ReactNode;\n /** Hint shown below the field. Hidden while an error message is showing. */\n helperText?: ReactNode;\n /** Message shown below the field when invalid. */\n errorMessage?: ReactNode;\n /** Marks the field invalid: sets `aria-invalid` and error styling. */\n error?: boolean;\n /** Caps the number of tags. Adds beyond the cap are no-ops. */\n max?: number;\n /** Allow the same tag more than once. Off → duplicates are rejected. */\n allowDuplicates?: boolean;\n /** Make duplicate detection case-sensitive. Default: case-insensitive. */\n caseSensitive?: boolean;\n /** Consumer gate run on each candidate tag. Return false to reject (draft kept). */\n validate?: (tag: string, tags: string[]) => boolean;\n /** Characters that commit the draft and split a paste. Newline always splits a paste. */\n delimiters?: string[];\n /** Badge variant used for the chips. */\n chipVariant?: BadgeProps['variant'];\n /** Accessible name for each chip's remove button. */\n removeLabel?: (tag: string) => string;\n /** Live-region text announced on add/remove (screen readers). */\n formatAnnouncement?: (tag: string, action: 'add' | 'remove') => string;\n}\n\n// ─── 3. Component ─── //\n\nfunction TagInput({\n id: externalId,\n value,\n defaultValue,\n onChange,\n label,\n helperText,\n errorMessage,\n error,\n size,\n disabled,\n placeholder,\n max,\n allowDuplicates = false,\n caseSensitive = false,\n validate,\n delimiters = [','],\n chipVariant = 'secondary',\n removeLabel = (tag) => `Remove ${tag}`,\n formatAnnouncement = (tag, action) => `${tag} ${action === 'add' ? 'added' : 'removed'}`,\n className,\n ...props\n}: TagInputProps) {\n const isControlled = value !== undefined;\n const [uncontrolledTags, setUncontrolledTags] = useState<string[]>(defaultValue ?? []);\n const tags = isControlled ? value : uncontrolledTags;\n\n const [draft, setDraft] = useState('');\n const [announcement, setAnnouncement] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n const { fieldId, errorId, helperId, hasError, hasErrorMessage, hasHelper, controlProps } =\n useFieldA11y({\n name: 'TagInput',\n id: externalId,\n label,\n error,\n errorMessage,\n helperText,\n 'aria-label': props['aria-label'],\n 'aria-labelledby': props['aria-labelledby'],\n });\n\n const commit = (next: string[]) => {\n if (!isControlled) setUncontrolledTags(next);\n onChange?.(next);\n };\n\n const norm = (t: string) => (caseSensitive ? t : t.toLowerCase());\n\n // Run raw fragments through the full accept pipeline (trim → drop-empty →\n // max cap → dedup → validate), appending the survivors. Only ever appends,\n // so the accepted set is `next.slice(current.length)`.\n const accept = (raw: string[], current: string[]): string[] => {\n let next = current;\n for (const fragment of raw) {\n const trimmed = fragment.trim();\n if (!trimmed) continue;\n if (max !== undefined && next.length >= max) break;\n if (!allowDuplicates && next.some((t) => norm(t) === norm(trimmed))) continue;\n if (validate && !validate(trimmed, next)) continue;\n next = [...next, trimmed];\n }\n return next;\n };\n\n const announceAdded = (added: string[]) => {\n if (added.length > 0) {\n setAnnouncement(added.map((t) => formatAnnouncement(t, 'add')).join(', '));\n }\n };\n\n const commitDraft = () => {\n const next = accept([draft], tags);\n if (next.length > tags.length) {\n commit(next);\n announceAdded(next.slice(tags.length));\n setDraft('');\n }\n // Rejected (dup / max / validate / empty): keep the draft so it can be fixed.\n };\n\n // Build a paste splitter from the delimiter chars + newlines. `-` is escaped\n // too (trailing in the class) so a delimiter like `-` can't form an invalid\n // character-class range (e.g. `['|','-']` → `[|-…]` would throw).\n const splitPaste = (text: string): string[] => {\n const escaped = delimiters.map((d) => d.replace(/[.*+?^${}()|[\\]\\\\-]/g, '\\\\$&'));\n const pattern = new RegExp(`[${escaped.join('')}\\\\n\\\\r]`);\n return text.split(pattern);\n };\n\n const removeTag = (index: number) => {\n const removed = tags[index];\n commit(tags.filter((_, i) => i !== index));\n setAnnouncement(formatAnnouncement(removed, 'remove'));\n inputRef.current?.focus();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (disabled) return;\n if (event.key === 'Enter') {\n // Always swallow Enter so it adds a tag instead of submitting the form.\n event.preventDefault();\n if (draft.trim()) commitDraft();\n } else if (delimiters.includes(event.key)) {\n event.preventDefault();\n if (draft.trim()) commitDraft();\n } else if (event.key === 'Backspace' && draft === '' && tags.length > 0) {\n event.preventDefault();\n removeTag(tags.length - 1);\n }\n };\n\n const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {\n if (disabled) return;\n const text = event.clipboardData.getData('text');\n const fragments = splitPaste(text);\n // No delimiter in the pasted text → let it type normally into the draft.\n if (fragments.length <= 1) return;\n event.preventDefault();\n const next = accept(fragments, tags);\n if (next.length > tags.length) {\n commit(next);\n announceAdded(next.slice(tags.length));\n // Clear any in-progress draft so it isn't left stranded after the paste.\n setDraft('');\n }\n };\n\n // Clicking the box chrome (not a chip button or the input) focuses the input.\n const handleBoxMouseDown = (event: React.MouseEvent<HTMLDivElement>) => {\n const target = event.target as HTMLElement;\n if (target === inputRef.current || target.closest('button')) return;\n event.preventDefault();\n inputRef.current?.focus();\n };\n\n const chipSize: BadgeProps['size'] = size === 'lg' ? 'md' : 'sm';\n\n return (\n <div data-slot=\"tag-input-field\" className=\"ddga-field\">\n {label && (\n <label htmlFor={fieldId} className=\"ddga-tag-input__label\">\n {label}\n </label>\n )}\n <div\n data-slot=\"tag-input-control\"\n className={cn(tagInputVariants({ size, error: hasError }), className)}\n data-disabled={disabled || undefined}\n onMouseDown={disabled ? undefined : handleBoxMouseDown}\n >\n {tags.length > 0 && (\n <ul data-slot=\"tag-input-list\" className=\"ddga-tag-input__list\" role=\"list\">\n {tags.map((tag, index) => (\n <li\n // Tags can repeat (allowDuplicates) so the value alone is not a\n // stable key; pair it with the index.\n key={`${tag}-${index}`}\n data-slot=\"tag-input-item\"\n className=\"ddga-tag-input__item\"\n // `display:contents` on the list/item can drop the implicit\n // list semantics in some engines; re-assert them explicitly.\n role=\"listitem\"\n >\n <Badge\n variant={chipVariant}\n size={chipSize}\n // Controlled-open: the chip never self-hides — removal flows\n // through onChange so controlled consumers stay the source of truth.\n open\n dismissible={!disabled}\n onDismiss={() => removeTag(index)}\n closeLabel={removeLabel(tag)}\n >\n {tag}\n </Badge>\n </li>\n ))}\n </ul>\n )}\n <input\n // Spread consumer props first, then our a11y contract + handlers so\n // they cannot be clobbered.\n {...props}\n {...controlProps}\n ref={inputRef}\n data-slot=\"tag-input\"\n className=\"ddga-tag-input__field\"\n type=\"text\"\n value={draft}\n disabled={disabled}\n placeholder={tags.length === 0 ? placeholder : undefined}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={handleKeyDown}\n onPaste={handlePaste}\n />\n </div>\n <div data-slot=\"tag-input-live\" className=\"ddga-sr-only\" role=\"status\" aria-live=\"polite\">\n {announcement}\n </div>\n {hasErrorMessage && (\n <FieldMessage id={errorId} variant=\"error\">\n {errorMessage}\n </FieldMessage>\n )}\n {hasHelper && (\n <FieldMessage id={helperId} variant=\"helper\">\n {helperText}\n </FieldMessage>\n )}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { TagInput, tagInputVariants };\nexport type { TagInputProps };\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["'use client';\n\nimport { useContext } from 'react';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { DgaContext } from '../../providers/DgaContext';\n\n// ─── 1. Variants (cva) ─── //\n\nconst tooltipContentVariants = cva('ddga-tooltip', {\n variants: {\n size: {\n sm: 'ddga-tooltip--sm',\n md: 'ddga-tooltip--md',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\n// ─── 2. Types ─── //\n//\n// We expose a closed compound shape that hides Radix's Provider/Portal/Arrow\n// details. `TooltipProvider` is already nested in `DgaProvider`, so consumers\n// don't need to add their own. The Portal container is wired from\n// `DgaContext.rootEl` (see DgaContext.ts) so the tooltip inherits `data-theme`\n// + custom theme classes set on the provider — without it, the tooltip would\n// silently mount under <body> and miss dark mode.\n\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\n\ntype TooltipTriggerProps = React.ComponentProps<typeof TooltipPrimitive.Trigger>;\n\ninterface TooltipContentProps\n extends\n Omit<React.ComponentProps<typeof TooltipPrimitive.Content>, 'asChild'>,\n VariantProps<typeof tooltipContentVariants> {\n /** Show a small arrow pointing at the trigger. Defaults to true. */\n arrow?: boolean;\n}\n\n// ─── 3. Components ─── //\n\nfunction Tooltip(props: TooltipProps) {\n return <TooltipPrimitive.Root {...props} />;\n}\n\nfunction TooltipTrigger({ className, ...props }: TooltipTriggerProps) {\n // Radix Trigger already supports asChild natively — pass through.\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" className={className} {...props} />;\n}\n\nfunction TooltipContent({\n size,\n arrow = true,\n sideOffset = 6,\n className,\n children,\n ...props\n}: TooltipContentProps) {\n // Anchor the Portal to the DgaProvider's body-level portal container.\n // Theme + dark mode inherit through mirrored data-theme/dir/CSS vars on\n // the portal element; using it (rather than the in-tree `rootEl`) keeps\n // the tooltip from being clipped by ancestor overflow or trapped by an\n // ancestor `transform`. Falls back to <body> if used outside a provider.\n const ctx = useContext(DgaContext);\n const portalContainer = ctx?.portalEl ?? ctx?.rootEl ?? undefined;\n\n return (\n <TooltipPrimitive.Portal container={portalContainer}>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(tooltipContentVariants({ size }), className)}\n {...props}\n >\n {children}\n {arrow ? <TooltipPrimitive.Arrow className=\"ddga-tooltip__arrow\" /> : null}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Tooltip, TooltipTrigger, TooltipContent, tooltipContentVariants };\nexport type { TooltipProps, TooltipTriggerProps, TooltipContentProps };\n"],"mappings":";;;;;;;;AAEA,SAAS,kBAAkB;AAC3B,SAAS,WAAW,wBAAwB;AAC5C,SAAS,WAA8B;AA0C9B,cA0BH,YA1BG;AApCT,IAAM,yBAAyB,IAAI,gBAAgB;AAAA,EACjD,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAyBD,SAAS,QAAQ,OAAqB;AACpC,SAAO,oBAAC,iBAAiB,MAAjB,EAAuB,GAAG,OAAO;AAC3C;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAAwB;AAEpE,SAAO,oBAAC,iBAAiB,SAAjB,EAAyB,aAAU,mBAAkB,WAAuB,GAAG,OAAO;AAChG;AAEA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,QAAQ;AAAA,EACR,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AAMtB,QAAM,MAAM,WAAW,UAAU;AACjC,QAAM,kBAAkB,KAAK,YAAY,KAAK,UAAU;AAExD,SACE,oBAAC,iBAAiB,QAAjB,EAAwB,WAAW,iBAClC;AAAA,IAAC,iBAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA,WAAW,GAAG,uBAAuB,EAAE,KAAK,CAAC,GAAG,SAAS;AAAA,MACxD,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,QAAQ,oBAAC,iBAAiB,OAAjB,EAAuB,WAAU,uBAAsB,IAAK;AAAA;AAAA;AAAA,EACxE,GACF;AAEJ;","names":[]}
|