@databricks/appkit-ui 0.1.5 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +52 -0
- package/CLAUDE.md +52 -0
- package/NOTICE.md +2 -0
- package/README.md +21 -15
- package/dist/react/charts/area/index.d.ts +2 -2
- package/dist/react/charts/bar/index.d.ts +2 -2
- package/dist/react/charts/base.d.ts +2 -2
- package/dist/react/charts/create-chart.d.ts +2 -2
- package/dist/react/charts/heatmap/index.d.ts +2 -2
- package/dist/react/charts/line/index.d.ts +2 -2
- package/dist/react/charts/pie/index.d.ts +3 -3
- package/dist/react/charts/radar/index.d.ts +2 -2
- package/dist/react/charts/scatter/index.d.ts +2 -2
- package/dist/react/charts/wrapper.d.ts +2 -2
- package/dist/react/hooks/use-mobile.js +3 -3
- package/dist/react/hooks/use-mobile.js.map +1 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +3 -1
- package/dist/react/lib/utils.d.ts +7 -0
- package/dist/react/lib/utils.d.ts.map +1 -0
- package/dist/react/portal-container-context.d.ts +48 -0
- package/dist/react/portal-container-context.d.ts.map +1 -0
- package/dist/react/portal-container-context.js +51 -0
- package/dist/react/portal-container-context.js.map +1 -0
- package/dist/react/table/data-table.d.ts +2 -2
- package/dist/react/table/data-table.d.ts.map +1 -1
- package/dist/react/ui/accordion.d.ts +6 -6
- package/dist/react/ui/accordion.d.ts.map +1 -1
- package/dist/react/ui/alert-dialog.d.ts +14 -13
- package/dist/react/ui/alert-dialog.d.ts.map +1 -1
- package/dist/react/ui/alert-dialog.js +3 -1
- package/dist/react/ui/alert-dialog.js.map +1 -1
- package/dist/react/ui/alert.d.ts +5 -5
- package/dist/react/ui/alert.d.ts.map +1 -1
- package/dist/react/ui/aspect-ratio.d.ts +2 -2
- package/dist/react/ui/avatar.d.ts +5 -5
- package/dist/react/ui/avatar.d.ts.map +1 -1
- package/dist/react/ui/badge.d.ts +6 -6
- package/dist/react/ui/badge.d.ts.map +1 -1
- package/dist/react/ui/breadcrumb.d.ts +10 -10
- package/dist/react/ui/breadcrumb.d.ts.map +1 -1
- package/dist/react/ui/button-group.d.ts +6 -6
- package/dist/react/ui/button.d.ts +6 -6
- package/dist/react/ui/button.d.ts.map +1 -1
- package/dist/react/ui/calendar.d.ts +6 -6
- package/dist/react/ui/calendar.d.ts.map +1 -1
- package/dist/react/ui/calendar.js +3 -3
- package/dist/react/ui/calendar.js.map +1 -1
- package/dist/react/ui/card.d.ts +9 -9
- package/dist/react/ui/card.d.ts.map +1 -1
- package/dist/react/ui/carousel.d.ts +7 -7
- package/dist/react/ui/carousel.d.ts.map +1 -1
- package/dist/react/ui/carousel.js +11 -11
- package/dist/react/ui/carousel.js.map +1 -1
- package/dist/react/ui/chart.d.ts +52 -16
- package/dist/react/ui/chart.d.ts.map +1 -1
- package/dist/react/ui/chart.js +23 -7
- package/dist/react/ui/chart.js.map +1 -1
- package/dist/react/ui/checkbox.d.ts +3 -3
- package/dist/react/ui/checkbox.d.ts.map +1 -1
- package/dist/react/ui/checkbox.js +1 -1
- package/dist/react/ui/checkbox.js.map +1 -1
- package/dist/react/ui/collapsible.d.ts +4 -4
- package/dist/react/ui/command.d.ts +12 -12
- package/dist/react/ui/command.d.ts.map +1 -1
- package/dist/react/ui/context-menu.d.ts +21 -20
- package/dist/react/ui/context-menu.d.ts.map +1 -1
- package/dist/react/ui/context-menu.js +11 -6
- package/dist/react/ui/context-menu.js.map +1 -1
- package/dist/react/ui/dialog.d.ts +14 -13
- package/dist/react/ui/dialog.d.ts.map +1 -1
- package/dist/react/ui/dialog.js +3 -1
- package/dist/react/ui/dialog.js.map +1 -1
- package/dist/react/ui/drawer.d.ts +13 -12
- package/dist/react/ui/drawer.d.ts.map +1 -1
- package/dist/react/ui/drawer.js +3 -1
- package/dist/react/ui/drawer.js.map +1 -1
- package/dist/react/ui/dropdown-menu.d.ts +21 -20
- package/dist/react/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/react/ui/dropdown-menu.js +12 -7
- package/dist/react/ui/dropdown-menu.js.map +1 -1
- package/dist/react/ui/empty.d.ts +7 -7
- package/dist/react/ui/field.d.ts +11 -11
- package/dist/react/ui/form.d.ts +9 -9
- package/dist/react/ui/form.d.ts.map +1 -1
- package/dist/react/ui/form.js +6 -6
- package/dist/react/ui/form.js.map +1 -1
- package/dist/react/ui/hover-card.d.ts +5 -5
- package/dist/react/ui/hover-card.d.ts.map +1 -1
- package/dist/react/ui/hover-card.js +2 -0
- package/dist/react/ui/hover-card.js.map +1 -1
- package/dist/react/ui/input-group.d.ts +11 -11
- package/dist/react/ui/input-group.d.ts.map +1 -1
- package/dist/react/ui/input-otp.d.ts +8 -8
- package/dist/react/ui/input-otp.d.ts.map +1 -1
- package/dist/react/ui/input-otp.js +2 -2
- package/dist/react/ui/input-otp.js.map +1 -1
- package/dist/react/ui/input.d.ts +3 -3
- package/dist/react/ui/input.d.ts.map +1 -1
- package/dist/react/ui/item.d.ts +16 -16
- package/dist/react/ui/item.d.ts.map +1 -1
- package/dist/react/ui/kbd.d.ts +3 -3
- package/dist/react/ui/label.d.ts +3 -3
- package/dist/react/ui/label.d.ts.map +1 -1
- package/dist/react/ui/menubar.d.ts +22 -21
- package/dist/react/ui/menubar.d.ts.map +1 -1
- package/dist/react/ui/menubar.js +3 -1
- package/dist/react/ui/menubar.js.map +1 -1
- package/dist/react/ui/navigation-menu.d.ts +11 -11
- package/dist/react/ui/navigation-menu.d.ts.map +1 -1
- package/dist/react/ui/pagination.d.ts +10 -10
- package/dist/react/ui/pagination.d.ts.map +1 -1
- package/dist/react/ui/popover.d.ts +6 -6
- package/dist/react/ui/popover.d.ts.map +1 -1
- package/dist/react/ui/popover.js +11 -7
- package/dist/react/ui/popover.js.map +1 -1
- package/dist/react/ui/progress.d.ts +3 -3
- package/dist/react/ui/progress.d.ts.map +1 -1
- package/dist/react/ui/radio-group.d.ts +4 -4
- package/dist/react/ui/radio-group.d.ts.map +1 -1
- package/dist/react/ui/resizable.d.ts +6 -6
- package/dist/react/ui/resizable.d.ts.map +1 -1
- package/dist/react/ui/scroll-area.d.ts +4 -4
- package/dist/react/ui/scroll-area.d.ts.map +1 -1
- package/dist/react/ui/select.d.ts +13 -13
- package/dist/react/ui/select.d.ts.map +1 -1
- package/dist/react/ui/select.js +19 -15
- package/dist/react/ui/select.js.map +1 -1
- package/dist/react/ui/separator.d.ts +3 -3
- package/dist/react/ui/separator.d.ts.map +1 -1
- package/dist/react/ui/sheet.d.ts +11 -11
- package/dist/react/ui/sheet.d.ts.map +1 -1
- package/dist/react/ui/sheet.js +3 -1
- package/dist/react/ui/sheet.js.map +1 -1
- package/dist/react/ui/sidebar.d.ts +34 -34
- package/dist/react/ui/sidebar.d.ts.map +1 -1
- package/dist/react/ui/sidebar.js +10 -10
- package/dist/react/ui/sidebar.js.map +1 -1
- package/dist/react/ui/skeleton.d.ts +2 -2
- package/dist/react/ui/slider.d.ts +3 -3
- package/dist/react/ui/slider.d.ts.map +1 -1
- package/dist/react/ui/slider.js +2 -2
- package/dist/react/ui/slider.js.map +1 -1
- package/dist/react/ui/sonner.d.ts +2 -2
- package/dist/react/ui/spinner.d.ts +2 -2
- package/dist/react/ui/switch.d.ts +3 -3
- package/dist/react/ui/switch.d.ts.map +1 -1
- package/dist/react/ui/table.d.ts +10 -10
- package/dist/react/ui/table.d.ts.map +1 -1
- package/dist/react/ui/tabs.d.ts +6 -6
- package/dist/react/ui/tabs.d.ts.map +1 -1
- package/dist/react/ui/textarea.d.ts +3 -3
- package/dist/react/ui/textarea.d.ts.map +1 -1
- package/dist/react/ui/toggle-group.d.ts +5 -5
- package/dist/react/ui/toggle-group.d.ts.map +1 -1
- package/dist/react/ui/toggle-group.js +3 -3
- package/dist/react/ui/toggle-group.js.map +1 -1
- package/dist/react/ui/toggle.d.ts +3 -3
- package/dist/react/ui/toggle.d.ts.map +1 -1
- package/dist/react/ui/tooltip.d.ts +6 -6
- package/dist/react/ui/tooltip.d.ts.map +1 -1
- package/dist/react/ui/tooltip.js +11 -7
- package/dist/react/ui/tooltip.js.map +1 -1
- package/llms.txt +52 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -668,6 +668,56 @@ export function SpendChart() {
|
|
|
668
668
|
}
|
|
669
669
|
```
|
|
670
670
|
|
|
671
|
+
**Chart props reference (important):**
|
|
672
|
+
|
|
673
|
+
Charts are **self-contained ECharts components**. Configure via props, NOT children:
|
|
674
|
+
|
|
675
|
+
```tsx
|
|
676
|
+
// ✅ Correct: use props for customization
|
|
677
|
+
<BarChart
|
|
678
|
+
queryKey="sales_by_region"
|
|
679
|
+
parameters={{}}
|
|
680
|
+
xKey="region" // X-axis field
|
|
681
|
+
yKey={["revenue", "expenses"]} // Y-axis field(s) - string or string[]
|
|
682
|
+
colors={['#40d1f5', '#4462c9']} // Custom colors
|
|
683
|
+
stacked // Stack bars (BarChart, AreaChart)
|
|
684
|
+
orientation="horizontal" // "vertical" (default) | "horizontal"
|
|
685
|
+
showLegend // Show legend
|
|
686
|
+
height={400} // Height in pixels (default: 300)
|
|
687
|
+
/>
|
|
688
|
+
|
|
689
|
+
<LineChart
|
|
690
|
+
queryKey="trend_data"
|
|
691
|
+
parameters={{}}
|
|
692
|
+
xKey="date"
|
|
693
|
+
yKey="value"
|
|
694
|
+
smooth // Smooth curves (default: true)
|
|
695
|
+
showSymbol={false} // Hide data point markers
|
|
696
|
+
/>
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
**❌ CRITICAL: Charts do NOT accept Recharts children**
|
|
700
|
+
|
|
701
|
+
```tsx
|
|
702
|
+
// ❌ WRONG - AppKit charts are NOT Recharts wrappers
|
|
703
|
+
import { BarChart } from "@databricks/appkit-ui/react";
|
|
704
|
+
import { Bar, XAxis, YAxis, CartesianGrid } from "recharts";
|
|
705
|
+
|
|
706
|
+
<BarChart queryKey="data" parameters={{}}>
|
|
707
|
+
<CartesianGrid /> // ❌ This will cause TypeScript errors
|
|
708
|
+
<XAxis dataKey="x" /> // ❌ Not supported
|
|
709
|
+
<Bar dataKey="y" /> // ❌ Not supported
|
|
710
|
+
</BarChart>
|
|
711
|
+
|
|
712
|
+
// ✅ CORRECT - use props instead
|
|
713
|
+
<BarChart
|
|
714
|
+
queryKey="data"
|
|
715
|
+
parameters={{}}
|
|
716
|
+
xKey="x"
|
|
717
|
+
yKey="y"
|
|
718
|
+
/>
|
|
719
|
+
```
|
|
720
|
+
|
|
671
721
|
### SQL helpers (`sql.*`)
|
|
672
722
|
|
|
673
723
|
Use these to build typed parameters (they return marker objects: `{ __sql_type, value }`):
|
|
@@ -1169,6 +1219,7 @@ env:
|
|
|
1169
1219
|
- `useMemo` wraps parameters objects
|
|
1170
1220
|
- Loading/error/empty states are explicit
|
|
1171
1221
|
- Charts use `format="auto"` unless you have a reason to force `"json"`/`"arrow"`
|
|
1222
|
+
- Charts use props (`xKey`, `yKey`, `colors`) NOT children (they're ECharts-based, not Recharts)
|
|
1172
1223
|
- If using tooltips: root is wrapped with `<TooltipProvider>`
|
|
1173
1224
|
|
|
1174
1225
|
- **Never**
|
|
@@ -1176,4 +1227,5 @@ env:
|
|
|
1176
1227
|
- Don't pass untyped raw params for annotated queries
|
|
1177
1228
|
- Don't ignore `createApp()`'s promise
|
|
1178
1229
|
- Don't invent UI components not listed in this file
|
|
1230
|
+
- Don't pass Recharts children (`<Bar>`, `<XAxis>`, etc.) to AppKit chart components
|
|
1179
1231
|
|
package/CLAUDE.md
CHANGED
|
@@ -668,6 +668,56 @@ export function SpendChart() {
|
|
|
668
668
|
}
|
|
669
669
|
```
|
|
670
670
|
|
|
671
|
+
**Chart props reference (important):**
|
|
672
|
+
|
|
673
|
+
Charts are **self-contained ECharts components**. Configure via props, NOT children:
|
|
674
|
+
|
|
675
|
+
```tsx
|
|
676
|
+
// ✅ Correct: use props for customization
|
|
677
|
+
<BarChart
|
|
678
|
+
queryKey="sales_by_region"
|
|
679
|
+
parameters={{}}
|
|
680
|
+
xKey="region" // X-axis field
|
|
681
|
+
yKey={["revenue", "expenses"]} // Y-axis field(s) - string or string[]
|
|
682
|
+
colors={['#40d1f5', '#4462c9']} // Custom colors
|
|
683
|
+
stacked // Stack bars (BarChart, AreaChart)
|
|
684
|
+
orientation="horizontal" // "vertical" (default) | "horizontal"
|
|
685
|
+
showLegend // Show legend
|
|
686
|
+
height={400} // Height in pixels (default: 300)
|
|
687
|
+
/>
|
|
688
|
+
|
|
689
|
+
<LineChart
|
|
690
|
+
queryKey="trend_data"
|
|
691
|
+
parameters={{}}
|
|
692
|
+
xKey="date"
|
|
693
|
+
yKey="value"
|
|
694
|
+
smooth // Smooth curves (default: true)
|
|
695
|
+
showSymbol={false} // Hide data point markers
|
|
696
|
+
/>
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
**❌ CRITICAL: Charts do NOT accept Recharts children**
|
|
700
|
+
|
|
701
|
+
```tsx
|
|
702
|
+
// ❌ WRONG - AppKit charts are NOT Recharts wrappers
|
|
703
|
+
import { BarChart } from "@databricks/appkit-ui/react";
|
|
704
|
+
import { Bar, XAxis, YAxis, CartesianGrid } from "recharts";
|
|
705
|
+
|
|
706
|
+
<BarChart queryKey="data" parameters={{}}>
|
|
707
|
+
<CartesianGrid /> // ❌ This will cause TypeScript errors
|
|
708
|
+
<XAxis dataKey="x" /> // ❌ Not supported
|
|
709
|
+
<Bar dataKey="y" /> // ❌ Not supported
|
|
710
|
+
</BarChart>
|
|
711
|
+
|
|
712
|
+
// ✅ CORRECT - use props instead
|
|
713
|
+
<BarChart
|
|
714
|
+
queryKey="data"
|
|
715
|
+
parameters={{}}
|
|
716
|
+
xKey="x"
|
|
717
|
+
yKey="y"
|
|
718
|
+
/>
|
|
719
|
+
```
|
|
720
|
+
|
|
671
721
|
### SQL helpers (`sql.*`)
|
|
672
722
|
|
|
673
723
|
Use these to build typed parameters (they return marker objects: `{ __sql_type, value }`):
|
|
@@ -1169,6 +1219,7 @@ env:
|
|
|
1169
1219
|
- `useMemo` wraps parameters objects
|
|
1170
1220
|
- Loading/error/empty states are explicit
|
|
1171
1221
|
- Charts use `format="auto"` unless you have a reason to force `"json"`/`"arrow"`
|
|
1222
|
+
- Charts use props (`xKey`, `yKey`, `colors`) NOT children (they're ECharts-based, not Recharts)
|
|
1172
1223
|
- If using tooltips: root is wrapped with `<TooltipProvider>`
|
|
1173
1224
|
|
|
1174
1225
|
- **Never**
|
|
@@ -1176,4 +1227,5 @@ env:
|
|
|
1176
1227
|
- Don't pass untyped raw params for annotated queries
|
|
1177
1228
|
- Don't ignore `createApp()`'s promise
|
|
1178
1229
|
- Don't invent UI components not listed in this file
|
|
1230
|
+
- Don't pass Recharts children (`<Bar>`, `<XAxis>`, etc.) to AppKit chart components
|
|
1179
1231
|
|
package/NOTICE.md
CHANGED
|
@@ -6,6 +6,7 @@ This Software contains code from the following open source projects:
|
|
|
6
6
|
|
|
7
7
|
| Name | Installed version | License | Code |
|
|
8
8
|
| :--------------- | :---------------- | :----------- | :--------------------------------------------------- |
|
|
9
|
+
| [@ast-grep/napi](https://www.npmjs.com/package/@ast-grep/napi) | 0.37.0 | MIT | https://ast-grep.github.io |
|
|
9
10
|
| [@hookform/resolvers](https://www.npmjs.com/package/@hookform/resolvers) | 5.2.2 | MIT | https://react-hook-form.com |
|
|
10
11
|
| [@opentelemetry/api](https://www.npmjs.com/package/@opentelemetry/api) | 1.9.0 | Apache-2.0 | https://github.com/open-telemetry/opentelemetry-js/tree/main/api |
|
|
11
12
|
| [@opentelemetry/api-logs](https://www.npmjs.com/package/@opentelemetry/api-logs) | 0.208.0 | Apache-2.0 | https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/api-logs |
|
|
@@ -63,6 +64,7 @@ This Software contains code from the following open source projects:
|
|
|
63
64
|
| [input-otp](https://www.npmjs.com/package/input-otp) | 1.4.2 | MIT | https://input-otp.rodz.dev/ |
|
|
64
65
|
| [lucide-react](https://www.npmjs.com/package/lucide-react) | 0.554.0 | ISC | https://lucide.dev |
|
|
65
66
|
| [next-themes](https://www.npmjs.com/package/next-themes) | 0.4.6 | MIT | https://github.com/pacocoursey/next-themes#readme |
|
|
67
|
+
| [obug](https://www.npmjs.com/package/obug) | 2.1.1 | MIT | https://github.com/sxzz/obug#readme |
|
|
66
68
|
| [pg](https://www.npmjs.com/package/pg) | 8.16.3 | MIT | https://github.com/brianc/node-postgres |
|
|
67
69
|
| [react-day-picker](https://www.npmjs.com/package/react-day-picker) | 9.12.0 | MIT | https://daypicker.dev |
|
|
68
70
|
| [react-hook-form](https://www.npmjs.com/package/react-hook-form) | 7.68.0 | MIT | https://react-hook-form.com |
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# AppKit
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Build Databricks Apps faster with our brand-new Node.js + React SDK. Built for humans and AI.
|
|
4
|
+
|
|
5
|
+
> [!WARNING] PREVIEW - NOT FOR PRODUCTION USE
|
|
5
6
|
>
|
|
6
7
|
> **This SDK is in preview and is subject to change without notice.**
|
|
7
8
|
>
|
|
@@ -11,25 +12,30 @@
|
|
|
11
12
|
> - 📝 **Use for development and testing only**
|
|
12
13
|
>
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## Introduction
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
AppKit is a TypeScript SDK for building production-ready Databricks applications with a plugin-based architecture. It provides opinionated defaults, built-in observability, and seamless integration with Databricks services.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
AppKit simplifies building data applications on Databricks by providing:
|
|
20
|
+
|
|
21
|
+
- **Plugin architecture**: Modular design with built-in server and analytics plugins
|
|
22
|
+
- **Type safety**: End-to-end TypeScript with automatic query type generation
|
|
23
|
+
- **Production-ready features**: Built-in caching, telemetry, retry logic, and error handling
|
|
24
|
+
- **Developer experience**: Remote hot reload, file-based queries, optimized for AI-assisted development
|
|
25
|
+
- **Databricks native**: Seamless integration with SQL Warehouses, Unity Catalog, and other workspace resources
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
## Getting started
|
|
21
28
|
|
|
22
|
-
|
|
29
|
+
Follow the [Getting Started](https://databricks.github.io/appkit/docs/) guide to get started with AppKit.
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
# From root
|
|
26
|
-
pnpm docs:dev # Start dev server
|
|
27
|
-
pnpm docs:build # Build docs
|
|
28
|
-
pnpm docs:serve # Serve built docs
|
|
29
|
-
```
|
|
31
|
+
## Documentation
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
📖 For full AppKit documentation, visit the [AppKit Documentation](https://databricks.github.io/appkit/) website.
|
|
32
34
|
|
|
33
35
|
👉 For AI/code assistants:
|
|
34
36
|
- Use [llms-compact.txt](./llms-compact.txt) for quick usage patterns.
|
|
35
|
-
- See [llms.txt](./llms.txt) for full guidance and anti-patterns.
|
|
37
|
+
- See [llms.txt](./llms.txt) for full guidance and anti-patterns.
|
|
38
|
+
|
|
39
|
+
## Contributing
|
|
40
|
+
|
|
41
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and contribution guidelines.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AreaChartProps } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime275 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/area/index.d.ts
|
|
5
5
|
|
|
@@ -25,7 +25,7 @@ import * as react_jsx_runtime273 from "react/jsx-runtime";
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
declare const AreaChart: {
|
|
28
|
-
(props: AreaChartProps):
|
|
28
|
+
(props: AreaChartProps): react_jsx_runtime275.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BarChartProps } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime276 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/bar/index.d.ts
|
|
5
5
|
|
|
@@ -35,7 +35,7 @@ import * as react_jsx_runtime274 from "react/jsx-runtime";
|
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
declare const BarChart: {
|
|
38
|
-
(props: BarChartProps):
|
|
38
|
+
(props: BarChartProps): react_jsx_runtime276.JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
};
|
|
41
41
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartColorPalette, ChartData, ChartType, Orientation } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime283 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/base.d.ts
|
|
5
5
|
interface BaseChartProps {
|
|
@@ -83,7 +83,7 @@ declare function BaseChart({
|
|
|
83
83
|
max,
|
|
84
84
|
options: customOptions,
|
|
85
85
|
className
|
|
86
|
-
}: BaseChartProps):
|
|
86
|
+
}: BaseChartProps): react_jsx_runtime283.JSX.Element;
|
|
87
87
|
//#endregion
|
|
88
88
|
export { BaseChart, BaseChartProps };
|
|
89
89
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChartType, UnifiedChartProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime284 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/create-chart.d.ts
|
|
5
5
|
|
|
@@ -18,7 +18,7 @@ import * as react_jsx_runtime282 from "react/jsx-runtime";
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
declare function createChart<TProps extends UnifiedChartProps>(chartType: ChartType, displayName: string): {
|
|
21
|
-
(props: TProps):
|
|
21
|
+
(props: TProps): react_jsx_runtime284.JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HeatmapChartProps } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime277 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/heatmap/index.d.ts
|
|
5
5
|
|
|
@@ -34,7 +34,7 @@ import * as react_jsx_runtime275 from "react/jsx-runtime";
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
declare const HeatmapChart: {
|
|
37
|
-
(props: HeatmapChartProps):
|
|
37
|
+
(props: HeatmapChartProps): react_jsx_runtime277.JSX.Element;
|
|
38
38
|
displayName: string;
|
|
39
39
|
};
|
|
40
40
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LineChartProps } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime278 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/line/index.d.ts
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ import * as react_jsx_runtime276 from "react/jsx-runtime";
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
declare const LineChart: {
|
|
29
|
-
(props: LineChartProps):
|
|
29
|
+
(props: LineChartProps): react_jsx_runtime278.JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
32
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DonutChartProps, PieChartProps } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime279 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/pie/index.d.ts
|
|
5
5
|
|
|
@@ -25,7 +25,7 @@ import * as react_jsx_runtime277 from "react/jsx-runtime";
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
declare const PieChart: {
|
|
28
|
-
(props: PieChartProps):
|
|
28
|
+
(props: PieChartProps): react_jsx_runtime279.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
@@ -49,7 +49,7 @@ declare const PieChart: {
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
declare const DonutChart: {
|
|
52
|
-
(props: DonutChartProps):
|
|
52
|
+
(props: DonutChartProps): react_jsx_runtime279.JSX.Element;
|
|
53
53
|
displayName: string;
|
|
54
54
|
};
|
|
55
55
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RadarChartProps } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime281 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/radar/index.d.ts
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ import * as react_jsx_runtime279 from "react/jsx-runtime";
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
declare const RadarChart: {
|
|
27
|
-
(props: RadarChartProps):
|
|
27
|
+
(props: RadarChartProps): react_jsx_runtime281.JSX.Element;
|
|
28
28
|
displayName: string;
|
|
29
29
|
};
|
|
30
30
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScatterChartProps } from "../types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime282 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/charts/scatter/index.d.ts
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ import * as react_jsx_runtime280 from "react/jsx-runtime";
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
declare const ScatterChart: {
|
|
27
|
-
(props: ScatterChartProps):
|
|
27
|
+
(props: ScatterChartProps): react_jsx_runtime282.JSX.Element;
|
|
28
28
|
displayName: string;
|
|
29
29
|
};
|
|
30
30
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartData, DataFormat } from "./types.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime285 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/react/charts/wrapper.d.ts
|
|
6
6
|
interface ChartWrapperQueryProps {
|
|
@@ -61,7 +61,7 @@ type ChartWrapperProps = CommonProps & (ChartWrapperQueryProps | ChartWrapperDat
|
|
|
61
61
|
* </ChartWrapper>
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
declare function ChartWrapper(props: ChartWrapperProps):
|
|
64
|
+
declare function ChartWrapper(props: ChartWrapperProps): react_jsx_runtime285.JSX.Element;
|
|
65
65
|
//#endregion
|
|
66
66
|
export { ChartWrapper, ChartWrapperProps };
|
|
67
67
|
//# sourceMappingURL=wrapper.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from "react";
|
|
1
|
+
import * as React$1 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/react/hooks/use-mobile.ts
|
|
4
4
|
const MOBILE_BREAKPOINT = 768;
|
|
5
5
|
function useIsMobile() {
|
|
6
|
-
const [isMobile, setIsMobile] = React.useState(void 0);
|
|
7
|
-
React.useEffect(() => {
|
|
6
|
+
const [isMobile, setIsMobile] = React$1.useState(void 0);
|
|
7
|
+
React$1.useEffect(() => {
|
|
8
8
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
9
9
|
const onChange = () => {
|
|
10
10
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-mobile.js","names":[],"sources":["../../../src/react/hooks/use-mobile.ts"],"sourcesContent":["import * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(\n undefined,\n );\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"mappings":";;;AAEA,MAAM,oBAAoB;AAE1B,SAAgB,cAAc;CAC5B,MAAM,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"use-mobile.js","names":["React"],"sources":["../../../src/react/hooks/use-mobile.ts"],"sourcesContent":["import * as React from \"react\";\n\nconst MOBILE_BREAKPOINT = 768;\n\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(\n undefined,\n );\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n };\n mql.addEventListener(\"change\", onChange);\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);\n return () => mql.removeEventListener(\"change\", onChange);\n }, []);\n\n return !!isMobile;\n}\n"],"mappings":";;;AAEA,MAAM,oBAAoB;AAE1B,SAAgB,cAAc;CAC5B,MAAM,CAAC,UAAU,eAAeA,QAAM,SACpC,OACD;AAED,SAAM,gBAAgB;EACpB,MAAM,MAAM,OAAO,WAAW,eAAe,oBAAoB,EAAE,KAAK;EACxE,MAAM,iBAAiB;AACrB,eAAY,OAAO,aAAa,kBAAkB;;AAEpD,MAAI,iBAAiB,UAAU,SAAS;AACxC,cAAY,OAAO,aAAa,kBAAkB;AAClD,eAAa,IAAI,oBAAoB,UAAU,SAAS;IACvD,EAAE,CAAC;AAEN,QAAO,CAAC,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { createTimeSeriesData, formatLabel, sortTimeSeriesAscending, toChartArra
|
|
|
18
18
|
import { CartesianContext, HeatmapContext, OptionBuilderContext, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption } from "./charts/options.js";
|
|
19
19
|
import { AnalyticsFormat, InferResultByFormat, InferRowType, PluginRegistry, QueryRegistry, TypedArrowTable, UseAnalyticsQueryOptions, UseAnalyticsQueryResult } from "./hooks/types.js";
|
|
20
20
|
import { useAnalyticsQuery } from "./hooks/use-analytics-query.js";
|
|
21
|
+
import { PortalContainerContext, PortalContainerProvider, usePortalContainer, useResolvedPortalContainer } from "./portal-container-context.js";
|
|
21
22
|
import { DataTable } from "./table/data-table.js";
|
|
22
23
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./ui/accordion.js";
|
|
23
24
|
import { Alert, AlertDescription, AlertTitle } from "./ui/alert.js";
|
|
@@ -72,4 +73,5 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
|
72
73
|
import { Textarea } from "./ui/textarea.js";
|
|
73
74
|
import { Toggle, toggleVariants } from "./ui/toggle.js";
|
|
74
75
|
import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.js";
|
|
75
|
-
|
|
76
|
+
import { cn } from "./lib/utils.js";
|
|
77
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnalyticsFormat, AreaChart, AreaChartProps, AreaChartSpecificProps, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BarChartProps, BarChartSpecificProps, BaseChart, BaseChartProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CartesianContext, ChartBaseProps, ChartColorPalette, ChartConfig, ChartContainer, ChartData, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartType, ChartWrapper, ChartWrapperProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATE_FIELD_PATTERNS, DataFormat, DataProps, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, DonutChartProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HeatmapChart, HeatmapChartProps, HeatmapChartSpecificProps, HeatmapContext, HoverCard, HoverCardContent, HoverCardTrigger, InferResultByFormat, InferRowType, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, LineChartProps, LineChartSpecificProps, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NormalizedChartData, NormalizedChartDataBase, NormalizedHeatmapData, OptionBuilderContext, Orientation, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, PieChartProps, PieChartSpecificProps, PluginRegistry, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, QueryProps, QueryRegistry, RadarChart, RadarChartProps, RadarChartSpecificProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScatterChartProps, ScatterChartSpecificProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TypedArrowTable, UnifiedChartProps, UseAnalyticsQueryOptions, UseAnalyticsQueryResult, UseChartDataOptions, UseChartDataResult, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatLabel, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
|
package/dist/react/index.js
CHANGED
|
@@ -19,6 +19,8 @@ import { RadarChart } from "./charts/radar/index.js";
|
|
|
19
19
|
import { ScatterChart } from "./charts/scatter/index.js";
|
|
20
20
|
import "./charts/index.js";
|
|
21
21
|
import "./hooks/index.js";
|
|
22
|
+
import { PortalContainerContext, PortalContainerProvider, usePortalContainer, useResolvedPortalContainer } from "./portal-container-context.js";
|
|
23
|
+
import { cn } from "./lib/utils.js";
|
|
22
24
|
import { Button, buttonVariants } from "./ui/button.js";
|
|
23
25
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./ui/dropdown-menu.js";
|
|
24
26
|
import { Input } from "./ui/input.js";
|
|
@@ -76,4 +78,4 @@ import { Toggle, toggleVariants } from "./ui/toggle.js";
|
|
|
76
78
|
import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.js";
|
|
77
79
|
import "./ui/index.js";
|
|
78
80
|
|
|
79
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BaseChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartWrapper, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATE_FIELD_PATTERNS, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HeatmapChart, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, createChart, createTimeSeriesData, formatLabel, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, useSidebar, useThemeColors };
|
|
81
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AreaChart, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BarChart, BaseChart, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_COLOR_VARS, CHART_COLOR_VARS_CATEGORICAL, CHART_COLOR_VARS_DIVERGING, CHART_COLOR_VARS_SEQUENTIAL, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, ChartWrapper, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATE_FIELD_PATTERNS, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FALLBACK_COLORS, FALLBACK_COLORS_CATEGORICAL, FALLBACK_COLORS_DIVERGING, FALLBACK_COLORS_SEQUENTIAL, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HeatmapChart, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LineChart, METADATA_DATE_PATTERNS, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NAME_FIELD_PATTERNS, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PieChart, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerContext, PortalContainerProvider, Progress, RadarChart, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScatterChart, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildCartesianOption, buildHeatmapOption, buildHorizontalBarOption, buildPieOption, buildRadarOption, buttonGroupVariants, buttonVariants, cn, createChart, createTimeSeriesData, formatLabel, isArrowTable, isDataProps, isQueryProps, navigationMenuTriggerStyle, normalizeChartData, normalizeHeatmapData, sortTimeSeriesAscending, toChartArray, toChartValue, toggleVariants, truncateLabel, useAllThemeColors, useAnalyticsQuery, useChartData, useFormField, usePortalContainer, useResolvedPortalContainer, useSidebar, useThemeColors };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/react/lib/utils.ts"],"sourcesContent":[],"mappings":";;;iBAGgB,EAAA,YAAc"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/react/portal-container-context.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Context for providing a custom portal container.
|
|
8
|
+
* This is used when rendering components in isolated contexts like iframes or shadow DOM.
|
|
9
|
+
* Portal components (AlertDialog, ContextMenu, etc.) will use this container instead of document.body
|
|
10
|
+
*/
|
|
11
|
+
declare const PortalContainerContext: React.Context<HTMLElement | null>;
|
|
12
|
+
declare function usePortalContainer(): HTMLElement | null;
|
|
13
|
+
/**
|
|
14
|
+
* Resolves the final portal container from explicit prop or context.
|
|
15
|
+
*
|
|
16
|
+
* This hook enables Portal components to work seamlessly in isolated rendering contexts
|
|
17
|
+
* (like iframes, shadow DOM, or isolated component previews) by accepting a container
|
|
18
|
+
* from either:
|
|
19
|
+
* 1. An explicit `container` prop (highest priority)
|
|
20
|
+
* 2. A `PortalContainerProvider` context (fallback)
|
|
21
|
+
* 3. undefined (lets Radix UI use document.body as default)
|
|
22
|
+
*
|
|
23
|
+
* @param containerProp - Optional explicit container element from props
|
|
24
|
+
* @returns The resolved container element to use for portal rendering
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* function MyPortal({ container, ...props }) {
|
|
29
|
+
* return (
|
|
30
|
+
* <RadixPortal container={useResolvedPortalContainer(container)} {...props}>
|
|
31
|
+
* <MyContent />
|
|
32
|
+
* </RadixPortal>
|
|
33
|
+
* );
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare function useResolvedPortalContainer(containerProp?: Element | DocumentFragment | HTMLElement | null | undefined): Element | DocumentFragment | HTMLElement | null | undefined;
|
|
38
|
+
interface PortalContainerProviderProps {
|
|
39
|
+
container: HTMLElement | null;
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
declare function PortalContainerProvider({
|
|
43
|
+
container,
|
|
44
|
+
children
|
|
45
|
+
}: PortalContainerProviderProps): react_jsx_runtime0.JSX.Element;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { PortalContainerContext, PortalContainerProvider, usePortalContainer, useResolvedPortalContainer };
|
|
48
|
+
//# sourceMappingURL=portal-container-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-container-context.d.ts","names":[],"sources":["../../src/react/portal-container-context.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAQA;;AAAmC,cAAtB,sBAAsB,EAAA,KAAA,CAAA,OAAA,CAAA,WAAA,GAAA,IAAA,CAAA;AAAA,iBAEnB,kBAAA,CAAA,CAFmB,EAED,WAFC,GAAA,IAAA;;AAEnC;AA4BA;;;;;;;;;AAKC;;;;;AAOD;;;;;;;;iBAZgB,0BAAA,iBACE,UAAU,mBAAmB,iCAC5C,UAAU,mBAAmB;UAKtB,4BAAA;aACG;YACD,KAAA,CAAM;;iBAGF,uBAAA;;;GAGb,+BAA4B,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/react/portal-container-context.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Context for providing a custom portal container.
|
|
7
|
+
* This is used when rendering components in isolated contexts like iframes or shadow DOM.
|
|
8
|
+
* Portal components (AlertDialog, ContextMenu, etc.) will use this container instead of document.body
|
|
9
|
+
*/
|
|
10
|
+
const PortalContainerContext = createContext(null);
|
|
11
|
+
function usePortalContainer() {
|
|
12
|
+
return useContext(PortalContainerContext);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the final portal container from explicit prop or context.
|
|
16
|
+
*
|
|
17
|
+
* This hook enables Portal components to work seamlessly in isolated rendering contexts
|
|
18
|
+
* (like iframes, shadow DOM, or isolated component previews) by accepting a container
|
|
19
|
+
* from either:
|
|
20
|
+
* 1. An explicit `container` prop (highest priority)
|
|
21
|
+
* 2. A `PortalContainerProvider` context (fallback)
|
|
22
|
+
* 3. undefined (lets Radix UI use document.body as default)
|
|
23
|
+
*
|
|
24
|
+
* @param containerProp - Optional explicit container element from props
|
|
25
|
+
* @returns The resolved container element to use for portal rendering
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* function MyPortal({ container, ...props }) {
|
|
30
|
+
* return (
|
|
31
|
+
* <RadixPortal container={useResolvedPortalContainer(container)} {...props}>
|
|
32
|
+
* <MyContent />
|
|
33
|
+
* </RadixPortal>
|
|
34
|
+
* );
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
function useResolvedPortalContainer(containerProp) {
|
|
39
|
+
const containerFromContext = usePortalContainer();
|
|
40
|
+
return containerProp ?? containerFromContext ?? void 0;
|
|
41
|
+
}
|
|
42
|
+
function PortalContainerProvider({ container, children }) {
|
|
43
|
+
return /* @__PURE__ */ jsx(PortalContainerContext.Provider, {
|
|
44
|
+
value: container,
|
|
45
|
+
children
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { PortalContainerContext, PortalContainerProvider, usePortalContainer, useResolvedPortalContainer };
|
|
51
|
+
//# sourceMappingURL=portal-container-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-container-context.js","names":[],"sources":["../../src/react/portal-container-context.tsx"],"sourcesContent":["import type React from \"react\";\nimport { createContext, useContext } from \"react\";\n\n/**\n * Context for providing a custom portal container.\n * This is used when rendering components in isolated contexts like iframes or shadow DOM.\n * Portal components (AlertDialog, ContextMenu, etc.) will use this container instead of document.body\n */\nexport const PortalContainerContext = createContext<HTMLElement | null>(null);\n\nexport function usePortalContainer() {\n return useContext(PortalContainerContext);\n}\n\n/**\n * Resolves the final portal container from explicit prop or context.\n *\n * This hook enables Portal components to work seamlessly in isolated rendering contexts\n * (like iframes, shadow DOM, or isolated component previews) by accepting a container\n * from either:\n * 1. An explicit `container` prop (highest priority)\n * 2. A `PortalContainerProvider` context (fallback)\n * 3. undefined (lets Radix UI use document.body as default)\n *\n * @param containerProp - Optional explicit container element from props\n * @returns The resolved container element to use for portal rendering\n *\n * @example\n * ```tsx\n * function MyPortal({ container, ...props }) {\n * return (\n * <RadixPortal container={useResolvedPortalContainer(container)} {...props}>\n * <MyContent />\n * </RadixPortal>\n * );\n * }\n * ```\n */\nexport function useResolvedPortalContainer(\n containerProp?: Element | DocumentFragment | HTMLElement | null | undefined,\n): Element | DocumentFragment | HTMLElement | null | undefined {\n const containerFromContext = usePortalContainer();\n return containerProp ?? containerFromContext ?? undefined;\n}\n\ninterface PortalContainerProviderProps {\n container: HTMLElement | null;\n children: React.ReactNode;\n}\n\nexport function PortalContainerProvider({\n container,\n children,\n}: PortalContainerProviderProps) {\n return (\n <PortalContainerContext.Provider value={container}>\n {children}\n </PortalContainerContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;AAQA,MAAa,yBAAyB,cAAkC,KAAK;AAE7E,SAAgB,qBAAqB;AACnC,QAAO,WAAW,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;AA2B3C,SAAgB,2BACd,eAC6D;CAC7D,MAAM,uBAAuB,oBAAoB;AACjD,QAAO,iBAAiB,wBAAwB;;AAQlD,SAAgB,wBAAwB,EACtC,WACA,YAC+B;AAC/B,QACE,oBAAC,uBAAuB;EAAS,OAAO;EACrC;GAC+B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataTableProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/react/table/data-table.d.ts
|
|
5
5
|
|
|
@@ -41,7 +41,7 @@ import * as react_jsx_runtime284 from "react/jsx-runtime";
|
|
|
41
41
|
* )}
|
|
42
42
|
* </DataTable>
|
|
43
43
|
*/
|
|
44
|
-
declare function DataTable(props: DataTableProps):
|
|
44
|
+
declare function DataTable(props: DataTableProps): react_jsx_runtime0.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { DataTable };
|
|
47
47
|
//# sourceMappingURL=data-table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","names":[],"sources":["../../../src/react/table/data-table.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,SAAA,QAAiB,iBAAc,
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","names":[],"sources":["../../../src/react/table/data-table.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,SAAA,QAAiB,iBAAc,kBAAA,CAAA,GAAA,CAAA"}
|