@arqel-dev/ui 0.11.0 → 0.13.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/SKILL.md +5 -2
- package/dist/AreaChart-NMQ2RQGA.js +33 -0
- package/dist/AreaChart-NMQ2RQGA.js.map +1 -0
- package/dist/ArqelCreatePage-P3G6TKIK.js +8 -0
- package/dist/ArqelCreatePage-P3G6TKIK.js.map +1 -0
- package/dist/ArqelDashboardPage-PX3Y75AA.js +6 -0
- package/dist/ArqelDashboardPage-PX3Y75AA.js.map +1 -0
- package/dist/ArqelEditPage-HKQSE6E5.js +8 -0
- package/dist/ArqelEditPage-HKQSE6E5.js.map +1 -0
- package/dist/ArqelIndexPage-MRH3572Z.js +12 -0
- package/dist/ArqelIndexPage-MRH3572Z.js.map +1 -0
- package/dist/ArqelShowPage-4FS5MTUN.js +6 -0
- package/dist/ArqelShowPage-4FS5MTUN.js.map +1 -0
- package/dist/BarChart-KLHKTLO2.js +19 -0
- package/dist/BarChart-KLHKTLO2.js.map +1 -0
- package/dist/DonutChart-L56R4QF2.js +11 -0
- package/dist/DonutChart-L56R4QF2.js.map +1 -0
- package/dist/LineChart-GHMPHFZZ.js +30 -0
- package/dist/LineChart-GHMPHFZZ.js.map +1 -0
- package/dist/PieChart-T2VQOFPP.js +4 -0
- package/dist/PieChart-T2VQOFPP.js.map +1 -0
- package/dist/RadarChart-CSWR5AO7.js +32 -0
- package/dist/RadarChart-CSWR5AO7.js.map +1 -0
- package/dist/Topbar-DffcNdcJ.d.ts +50 -0
- package/dist/action.d.ts +12 -2
- package/dist/action.js +6 -1090
- package/dist/action.js.map +1 -1
- package/dist/auth.js +1 -10
- package/dist/auth.js.map +1 -1
- package/dist/chunk-2LTZJ4R7.js +110 -0
- package/dist/chunk-2LTZJ4R7.js.map +1 -0
- package/dist/chunk-3JJOHYD7.js +57 -0
- package/dist/chunk-3JJOHYD7.js.map +1 -0
- package/dist/chunk-47HD7ALI.js +370 -0
- package/dist/chunk-47HD7ALI.js.map +1 -0
- package/dist/chunk-6UJQP7KU.js +737 -0
- package/dist/chunk-6UJQP7KU.js.map +1 -0
- package/dist/chunk-7LSZADUC.js +50 -0
- package/dist/chunk-7LSZADUC.js.map +1 -0
- package/dist/chunk-B7ULUJVO.js +11 -0
- package/dist/chunk-B7ULUJVO.js.map +1 -0
- package/dist/chunk-C5H44NSP.js +37 -0
- package/dist/chunk-C5H44NSP.js.map +1 -0
- package/dist/chunk-DSULVRB6.js +101 -0
- package/dist/chunk-DSULVRB6.js.map +1 -0
- package/dist/chunk-ERT7LL6C.js +199 -0
- package/dist/chunk-ERT7LL6C.js.map +1 -0
- package/dist/chunk-EYAUPJ6J.js +64 -0
- package/dist/chunk-EYAUPJ6J.js.map +1 -0
- package/dist/chunk-FHRQ7PWE.js +58 -0
- package/dist/chunk-FHRQ7PWE.js.map +1 -0
- package/dist/chunk-FV7RESKL.js +285 -0
- package/dist/chunk-FV7RESKL.js.map +1 -0
- package/dist/chunk-K7QY56XN.js +610 -0
- package/dist/chunk-K7QY56XN.js.map +1 -0
- package/dist/chunk-L3JBBN4H.js +27 -0
- package/dist/chunk-L3JBBN4H.js.map +1 -0
- package/dist/chunk-MSRTGCTJ.js +597 -0
- package/dist/chunk-MSRTGCTJ.js.map +1 -0
- package/dist/chunk-MTNFFSVA.js +92 -0
- package/dist/chunk-MTNFFSVA.js.map +1 -0
- package/dist/chunk-MTZJDFQ6.js +32 -0
- package/dist/chunk-MTZJDFQ6.js.map +1 -0
- package/dist/chunk-MXUXMHOK.js +16 -0
- package/dist/chunk-MXUXMHOK.js.map +1 -0
- package/dist/chunk-PXON56HL.js +35 -0
- package/dist/chunk-PXON56HL.js.map +1 -0
- package/dist/chunk-PZEVKMZX.js +598 -0
- package/dist/chunk-PZEVKMZX.js.map +1 -0
- package/dist/chunk-R4BOUU6Y.js +55 -0
- package/dist/chunk-R4BOUU6Y.js.map +1 -0
- package/dist/chunk-RMPOR2YZ.js +12 -0
- package/dist/chunk-RMPOR2YZ.js.map +1 -0
- package/dist/chunk-RNAMHQM6.js +12 -0
- package/dist/chunk-RNAMHQM6.js.map +1 -0
- package/dist/chunk-TNJEHYRF.js +387 -0
- package/dist/chunk-TNJEHYRF.js.map +1 -0
- package/dist/chunk-VSTRVXXZ.js +49 -0
- package/dist/chunk-VSTRVXXZ.js.map +1 -0
- package/dist/chunk-WKWV36PG.js +140 -0
- package/dist/chunk-WKWV36PG.js.map +1 -0
- package/dist/cn-By8XWiSA.d.ts +12 -0
- package/dist/flash.js +2 -104
- package/dist/flash.js.map +1 -1
- package/dist/form.js +4 -673
- package/dist/form.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -3706
- package/dist/index.js.map +1 -1
- package/dist/pages.js +23 -3025
- package/dist/pages.js.map +1 -1
- package/dist/palette.js +1 -283
- package/dist/palette.js.map +1 -1
- package/dist/primitives.js +3 -658
- package/dist/primitives.js.map +1 -1
- package/dist/resource.js +5 -720
- package/dist/resource.js.map +1 -1
- package/dist/shell.d.ts +26 -46
- package/dist/shell.js +46 -1039
- package/dist/shell.js.map +1 -1
- package/dist/table.js +4 -618
- package/dist/table.js.map +1 -1
- package/dist/utility.js +3 -104
- package/dist/utility.js.map +1 -1
- package/dist/utils.d.ts +12 -6
- package/dist/utils.js +2 -9
- package/dist/utils.js.map +1 -1
- package/dist/widgets.d.ts +7 -2
- package/dist/widgets.js +3 -675
- package/dist/widgets.js.map +1 -1
- package/package.json +15 -14
package/SKILL.md
CHANGED
|
@@ -38,10 +38,10 @@ A partir da migração para shadcn, o pacote é construído sobre **shadcn (styl
|
|
|
38
38
|
**Custom components (sobre as primitivas):**
|
|
39
39
|
|
|
40
40
|
- `<AppShell variant>`: 4 variants (`sidebar-left | sidebar-right | topbar-only | full-width`) com `SidebarProvider` interno
|
|
41
|
-
- `<Sidebar>` (block `sidebar-07` + collapsible icon + items via `useNavigation()` ou prop `items`, groups, badges, `aria-current="page"`)
|
|
41
|
+
- `<Sidebar>` (block `sidebar-07` + collapsible icon + items via `useNavigation()` ou prop `items`, groups, badges, ícone lucide por item via `item.icon` + `resolveLucideIcon`, `aria-current="page"`)
|
|
42
42
|
- `<Topbar>`: brand + theme toggle + `SidebarTrigger` mobile + slots search/userMenu/tenantSwitcher
|
|
43
43
|
- `<MainContent>` (`SidebarInset` wrapper) com padding responsivo + `maxWidth` (`md..7xl | none`)
|
|
44
|
-
- `<DataTable>` (TanStack Table v8) — 9 cell renderers, seleção controlada, sticky header, `aria-sort`
|
|
44
|
+
- `<DataTable>` (TanStack Table v8) — 9 cell renderers, seleção controlada, sticky header, `aria-sort`. O `BadgeCell` lê `column.props.colors` (value→token de cor → classes Tailwind) e `column.props.icons` (value→nome lucide), renderizando o ícone ao lado do label; valor sem match no map cai no estilo muted (#50)
|
|
45
45
|
- `<TableFilters>` / `<TablePagination>` / `<TableToolbar>` / `<ResourceIndex>`
|
|
46
46
|
- `<FormRenderer>` + `<FieldRenderer>` + `FieldRegistry` + `<FormSection>` / `<FormFieldset>` / `<FormGrid>` / `<FormTabs>` / `<FormActions>`
|
|
47
47
|
- `<ActionButton>` / `<ActionMenu>` (Radix DropdownMenu) / `<ConfirmDialog>` (Radix Dialog) / `<ActionFormModal>` (Radix Dialog hospedando `<FormRenderer>`)
|
|
@@ -89,6 +89,7 @@ export default function UsersIndex(props: ResourceIndexProps<User>) {
|
|
|
89
89
|
- Componentes presentational — callbacks lifted (sem fetch interno)
|
|
90
90
|
- `peerDependencies`: `radix-ui`, `@tanstack/react-table`, `lucide-react`, `@arqel-dev/{react,hooks}`
|
|
91
91
|
- Props com `undefined` explícito quando opcionais (`exactOptionalPropertyTypes: true`)
|
|
92
|
+
- **`splitting: true` no `tsup.config.ts` é obrigatório** — singletons de nível de módulo (ex.: o `Map` do `FieldRegistry` em `src/form/FieldRegistry.tsx`) precisam ser içados para um único chunk compartilhado. Com `splitting: false` o tsup inlinava o `Map` em cada entry (`form.js`, `pages.js`, ...), então campos registrados via `@arqel-dev/ui/form` ficavam invisíveis ao renderer de `@arqel-dev/ui/pages` (#45). O registry agora é uma única instância compartilhada entre todos os entrypoints.
|
|
92
93
|
|
|
93
94
|
## Anti-patterns
|
|
94
95
|
|
|
@@ -100,6 +101,8 @@ export default function UsersIndex(props: ResourceIndexProps<User>) {
|
|
|
100
101
|
- ❌ **Estado local em ResourceIndex/DataTable** — sempre lifted via callbacks
|
|
101
102
|
- ❌ **Duplicar `useFlash({ onMessage })`** — um único `<FlashContainer>` no AppShell
|
|
102
103
|
- ❌ **Recriar variants `success`/`warning` no `Badge`** — foram removidas; usa `default`/`secondary`/`outline` ou compõe com `className`
|
|
104
|
+
- ❌ **Voltar `splitting` para `false`** — duplica singletons de módulo (FieldRegistry) por entry e quebra o registro cross-entrypoint de campos (#45)
|
|
105
|
+
- ❌ **Despachar bulk actions por um `<button>` cru** — a barra de bulk actions do `ArqelIndexPage` deve rotear por `<ActionButton>` (que abre o `<ConfirmDialog>` quando `action.requiresConfirmation`), igual às row actions. Um `<button>` cru que dispara `router.visit` no `onClick` ignora `requiresConfirmation`/`confirmation`, então um bulk delete destrutivo roda sem confirmação num único clique (#70)
|
|
103
106
|
|
|
104
107
|
## Testing
|
|
105
108
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
|
|
2
|
+
import { ResponsiveContainer, AreaChart as AreaChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Area } from 'recharts';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function AreaChart({ chartData, height, showLegend, showGrid }) {
|
|
6
|
+
const rows = toRowShape(chartData);
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "chart-area", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(AreaChart$1, { data: rows, children: [
|
|
8
|
+
showGrid ? /* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3" }) : null,
|
|
9
|
+
/* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
|
|
10
|
+
/* @__PURE__ */ jsx(YAxis, {}),
|
|
11
|
+
/* @__PURE__ */ jsx(Tooltip, {}),
|
|
12
|
+
showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null,
|
|
13
|
+
chartData.datasets.map((ds, i) => {
|
|
14
|
+
const color = colorFor(ds, i);
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
Area,
|
|
17
|
+
{
|
|
18
|
+
type: "monotone",
|
|
19
|
+
dataKey: `dataset${i}`,
|
|
20
|
+
name: ds.label,
|
|
21
|
+
stroke: color,
|
|
22
|
+
fill: color,
|
|
23
|
+
fillOpacity: 0.3
|
|
24
|
+
},
|
|
25
|
+
ds.label
|
|
26
|
+
);
|
|
27
|
+
})
|
|
28
|
+
] }) }) });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { AreaChart };
|
|
32
|
+
//# sourceMappingURL=AreaChart-NMQ2RQGA.js.map
|
|
33
|
+
//# sourceMappingURL=AreaChart-NMQ2RQGA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/widgets/charts/AreaChart.tsx"],"names":["RechartsAreaChart"],"mappings":";;;;AAYO,SAAS,UAAU,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACpF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AACjC,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,cAAa,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACpD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,WAAA,EAAA,EAAkB,MAAM,IAAA,EACtB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,eAAA,EAAgB,KAAA,EAAM,CAAA,GAAK,IAAA;AAAA,oBACtD,GAAA,CAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,wBACrB,KAAA,EAAA,EAAM,CAAA;AAAA,wBACN,OAAA,EAAA,EAAQ,CAAA;AAAA,IACR,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK,IAAA;AAAA,IAC1B,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,CAAC,IAAI,CAAA,KAAM;AACjC,MAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,EAAA,EAAI,CAAC,CAAA;AAC5B,MAAA,uBACE,GAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UAEC,IAAA,EAAK,UAAA;AAAA,UACL,OAAA,EAAS,UAAU,CAAC,CAAA,CAAA;AAAA,UACpB,MAAM,EAAA,CAAG,KAAA;AAAA,UACT,MAAA,EAAQ,KAAA;AAAA,UACR,IAAA,EAAM,KAAA;AAAA,UACN,WAAA,EAAa;AAAA,SAAA;AAAA,QANR,EAAA,CAAG;AAAA,OAOV;AAAA,IAEJ,CAAC;AAAA,GAAA,EACH,GACF,CAAA,EACF,CAAA;AAEJ","file":"AreaChart-NMQ2RQGA.js","sourcesContent":["import {\n Area,\n CartesianGrid,\n Legend,\n AreaChart as RechartsAreaChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function AreaChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n return (\n <div data-testid=\"chart-area\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsAreaChart data={rows}>\n {showGrid ? <CartesianGrid strokeDasharray=\"3 3\" /> : null}\n <XAxis dataKey=\"name\" />\n <YAxis />\n <Tooltip />\n {showLegend ? <Legend /> : null}\n {chartData.datasets.map((ds, i) => {\n const color = colorFor(ds, i);\n return (\n <Area\n key={ds.label}\n type=\"monotone\"\n dataKey={`dataset${i}`}\n name={ds.label}\n stroke={color}\n fill={color}\n fillOpacity={0.3}\n />\n );\n })}\n </RechartsAreaChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ArqelCreatePage as default } from './chunk-VSTRVXXZ.js';
|
|
2
|
+
import './chunk-MXUXMHOK.js';
|
|
3
|
+
import './chunk-MTZJDFQ6.js';
|
|
4
|
+
import './chunk-MSRTGCTJ.js';
|
|
5
|
+
import './chunk-FHRQ7PWE.js';
|
|
6
|
+
import './chunk-B7ULUJVO.js';
|
|
7
|
+
//# sourceMappingURL=ArqelCreatePage-P3G6TKIK.js.map
|
|
8
|
+
//# sourceMappingURL=ArqelCreatePage-P3G6TKIK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelCreatePage-P3G6TKIK.js"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ArqelDashboardPage as default } from './chunk-PXON56HL.js';
|
|
2
|
+
import './chunk-47HD7ALI.js';
|
|
3
|
+
import './chunk-WKWV36PG.js';
|
|
4
|
+
import './chunk-B7ULUJVO.js';
|
|
5
|
+
//# sourceMappingURL=ArqelDashboardPage-PX3Y75AA.js.map
|
|
6
|
+
//# sourceMappingURL=ArqelDashboardPage-PX3Y75AA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelDashboardPage-PX3Y75AA.js"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ArqelEditPage as default } from './chunk-3JJOHYD7.js';
|
|
2
|
+
import './chunk-MXUXMHOK.js';
|
|
3
|
+
import './chunk-MTZJDFQ6.js';
|
|
4
|
+
import './chunk-MSRTGCTJ.js';
|
|
5
|
+
import './chunk-FHRQ7PWE.js';
|
|
6
|
+
import './chunk-B7ULUJVO.js';
|
|
7
|
+
//# sourceMappingURL=ArqelEditPage-HKQSE6E5.js.map
|
|
8
|
+
//# sourceMappingURL=ArqelEditPage-HKQSE6E5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelEditPage-HKQSE6E5.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { ArqelIndexPage as default } from './chunk-ERT7LL6C.js';
|
|
2
|
+
import './chunk-2LTZJ4R7.js';
|
|
3
|
+
import './chunk-PZEVKMZX.js';
|
|
4
|
+
import './chunk-RMPOR2YZ.js';
|
|
5
|
+
import './chunk-TNJEHYRF.js';
|
|
6
|
+
import './chunk-EYAUPJ6J.js';
|
|
7
|
+
import './chunk-MTZJDFQ6.js';
|
|
8
|
+
import './chunk-MSRTGCTJ.js';
|
|
9
|
+
import './chunk-FHRQ7PWE.js';
|
|
10
|
+
import './chunk-B7ULUJVO.js';
|
|
11
|
+
//# sourceMappingURL=ArqelIndexPage-MRH3572Z.js.map
|
|
12
|
+
//# sourceMappingURL=ArqelIndexPage-MRH3572Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelIndexPage-MRH3572Z.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ArqelShowPage-4FS5MTUN.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
|
|
2
|
+
import { ResponsiveContainer, BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Bar } from 'recharts';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function BarChart({ chartData, height, showLegend, showGrid }) {
|
|
6
|
+
const rows = toRowShape(chartData);
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "chart-bar", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(BarChart$1, { data: rows, children: [
|
|
8
|
+
showGrid ? /* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3" }) : null,
|
|
9
|
+
/* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
|
|
10
|
+
/* @__PURE__ */ jsx(YAxis, {}),
|
|
11
|
+
/* @__PURE__ */ jsx(Tooltip, {}),
|
|
12
|
+
showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null,
|
|
13
|
+
chartData.datasets.map((ds, i) => /* @__PURE__ */ jsx(Bar, { dataKey: `dataset${i}`, name: ds.label, fill: colorFor(ds, i) }, ds.label))
|
|
14
|
+
] }) }) });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { BarChart };
|
|
18
|
+
//# sourceMappingURL=BarChart-KLHKTLO2.js.map
|
|
19
|
+
//# sourceMappingURL=BarChart-KLHKTLO2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/widgets/charts/BarChart.tsx"],"names":["RechartsBarChart"],"mappings":";;;;AAYO,SAAS,SAAS,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACnF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AACjC,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,aAAY,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACnD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,UAAA,EAAA,EAAiB,MAAM,IAAA,EACrB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,eAAA,EAAgB,KAAA,EAAM,CAAA,GAAK,IAAA;AAAA,oBACtD,GAAA,CAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,wBACrB,KAAA,EAAA,EAAM,CAAA;AAAA,wBACN,OAAA,EAAA,EAAQ,CAAA;AAAA,IACR,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK,IAAA;AAAA,IAC1B,SAAA,CAAU,SAAS,GAAA,CAAI,CAAC,IAAI,CAAA,qBAC3B,GAAA,CAAC,GAAA,EAAA,EAAmB,OAAA,EAAS,CAAA,OAAA,EAAU,CAAC,IAAI,IAAA,EAAM,EAAA,CAAG,OAAO,IAAA,EAAM,QAAA,CAAS,IAAI,CAAC,CAAA,EAAA,EAAtE,EAAA,CAAG,KAAsE,CACpF;AAAA,GAAA,EACH,GACF,CAAA,EACF,CAAA;AAEJ","file":"BarChart-KLHKTLO2.js","sourcesContent":["import {\n Bar,\n CartesianGrid,\n Legend,\n BarChart as RechartsBarChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function BarChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n return (\n <div data-testid=\"chart-bar\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart data={rows}>\n {showGrid ? <CartesianGrid strokeDasharray=\"3 3\" /> : null}\n <XAxis dataKey=\"name\" />\n <YAxis />\n <Tooltip />\n {showLegend ? <Legend /> : null}\n {chartData.datasets.map((ds, i) => (\n <Bar key={ds.label} dataKey={`dataset${i}`} name={ds.label} fill={colorFor(ds, i)} />\n ))}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PieChart } from './chunk-C5H44NSP.js';
|
|
2
|
+
import './chunk-L3JBBN4H.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function DonutChart(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(PieChart, { ...props, innerRadius: 60, testId: "chart-donut" });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { DonutChart };
|
|
10
|
+
//# sourceMappingURL=DonutChart-L56R4QF2.js.map
|
|
11
|
+
//# sourceMappingURL=DonutChart-L56R4QF2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/widgets/charts/DonutChart.tsx"],"names":[],"mappings":";;;;AAOO,SAAS,WAAW,KAAA,EAAsB;AAC/C,EAAA,2BAAQ,QAAA,EAAA,EAAU,GAAG,OAAO,WAAA,EAAa,EAAA,EAAI,QAAO,aAAA,EAAc,CAAA;AACpE","file":"DonutChart-L56R4QF2.js","sourcesContent":["import type { ChartSubProps } from '../types';\nimport { PieChart } from './PieChart';\n\n/**\n * DonutChart is a PieChart with a non-zero innerRadius. We delegate so the\n * Recharts primitives stay in one chunk per shape (pie ≡ donut visually).\n */\nexport function DonutChart(props: ChartSubProps) {\n return <PieChart {...props} innerRadius={60} testId=\"chart-donut\" />;\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
|
|
2
|
+
import { ResponsiveContainer, LineChart as LineChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Line } from 'recharts';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function LineChart({ chartData, height, showLegend, showGrid }) {
|
|
6
|
+
const rows = toRowShape(chartData);
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "chart-line", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(LineChart$1, { data: rows, children: [
|
|
8
|
+
showGrid ? /* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3" }) : null,
|
|
9
|
+
/* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
|
|
10
|
+
/* @__PURE__ */ jsx(YAxis, {}),
|
|
11
|
+
/* @__PURE__ */ jsx(Tooltip, {}),
|
|
12
|
+
showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null,
|
|
13
|
+
chartData.datasets.map((ds, i) => /* @__PURE__ */ jsx(
|
|
14
|
+
Line,
|
|
15
|
+
{
|
|
16
|
+
type: "monotone",
|
|
17
|
+
dataKey: `dataset${i}`,
|
|
18
|
+
name: ds.label,
|
|
19
|
+
stroke: colorFor(ds, i),
|
|
20
|
+
strokeWidth: 2,
|
|
21
|
+
dot: false
|
|
22
|
+
},
|
|
23
|
+
ds.label
|
|
24
|
+
))
|
|
25
|
+
] }) }) });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { LineChart };
|
|
29
|
+
//# sourceMappingURL=LineChart-GHMPHFZZ.js.map
|
|
30
|
+
//# sourceMappingURL=LineChart-GHMPHFZZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/widgets/charts/LineChart.tsx"],"names":["RechartsLineChart"],"mappings":";;;;AAYO,SAAS,UAAU,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACpF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AACjC,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,cAAa,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACpD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,WAAA,EAAA,EAAkB,MAAM,IAAA,EACtB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAA,EAAA,EAAc,eAAA,EAAgB,KAAA,EAAM,CAAA,GAAK,IAAA;AAAA,oBACtD,GAAA,CAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,wBACrB,KAAA,EAAA,EAAM,CAAA;AAAA,wBACN,OAAA,EAAA,EAAQ,CAAA;AAAA,IACR,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK,IAAA;AAAA,IAC1B,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,CAAC,IAAI,CAAA,qBAC3B,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QAEC,IAAA,EAAK,UAAA;AAAA,QACL,OAAA,EAAS,UAAU,CAAC,CAAA,CAAA;AAAA,QACpB,MAAM,EAAA,CAAG,KAAA;AAAA,QACT,MAAA,EAAQ,QAAA,CAAS,EAAA,EAAI,CAAC,CAAA;AAAA,QACtB,WAAA,EAAa,CAAA;AAAA,QACb,GAAA,EAAK;AAAA,OAAA;AAAA,MANA,EAAA,CAAG;AAAA,KAQX;AAAA,GAAA,EACH,GACF,CAAA,EACF,CAAA;AAEJ","file":"LineChart-GHMPHFZZ.js","sourcesContent":["import {\n CartesianGrid,\n Legend,\n Line,\n LineChart as RechartsLineChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function LineChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n return (\n <div data-testid=\"chart-line\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsLineChart data={rows}>\n {showGrid ? <CartesianGrid strokeDasharray=\"3 3\" /> : null}\n <XAxis dataKey=\"name\" />\n <YAxis />\n <Tooltip />\n {showLegend ? <Legend /> : null}\n {chartData.datasets.map((ds, i) => (\n <Line\n key={ds.label}\n type=\"monotone\"\n dataKey={`dataset${i}`}\n name={ds.label}\n stroke={colorFor(ds, i)}\n strokeWidth={2}\n dot={false}\n />\n ))}\n </RechartsLineChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"PieChart-T2VQOFPP.js"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { toRowShape, colorFor } from './chunk-L3JBBN4H.js';
|
|
2
|
+
import { ResponsiveContainer, RadarChart as RadarChart$1, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, Tooltip, Legend } from 'recharts';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function RadarChart({ chartData, height, showLegend, showGrid }) {
|
|
6
|
+
const rows = toRowShape(chartData);
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "chart-radar", style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(RadarChart$1, { data: rows, children: [
|
|
8
|
+
showGrid ? /* @__PURE__ */ jsx(PolarGrid, {}) : null,
|
|
9
|
+
/* @__PURE__ */ jsx(PolarAngleAxis, { dataKey: "name" }),
|
|
10
|
+
/* @__PURE__ */ jsx(PolarRadiusAxis, {}),
|
|
11
|
+
chartData.datasets.map((ds, i) => {
|
|
12
|
+
const color = colorFor(ds, i);
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
Radar,
|
|
15
|
+
{
|
|
16
|
+
dataKey: `dataset${i}`,
|
|
17
|
+
name: ds.label,
|
|
18
|
+
stroke: color,
|
|
19
|
+
fill: color,
|
|
20
|
+
fillOpacity: 0.3
|
|
21
|
+
},
|
|
22
|
+
ds.label
|
|
23
|
+
);
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsx(Tooltip, {}),
|
|
26
|
+
showLegend ? /* @__PURE__ */ jsx(Legend, {}) : null
|
|
27
|
+
] }) }) });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { RadarChart };
|
|
31
|
+
//# sourceMappingURL=RadarChart-CSWR5AO7.js.map
|
|
32
|
+
//# sourceMappingURL=RadarChart-CSWR5AO7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/widgets/charts/RadarChart.tsx"],"names":["RechartsRadarChart"],"mappings":";;;;AAYO,SAAS,WAAW,EAAE,SAAA,EAAW,MAAA,EAAQ,UAAA,EAAY,UAAS,EAAkB;AACrF,EAAA,MAAM,IAAA,GAAO,WAAW,SAAS,CAAA;AAEjC,EAAA,2BACG,KAAA,EAAA,EAAI,aAAA,EAAY,eAAc,KAAA,EAAO,EAAE,OAAO,MAAA,EAAQ,MAAA,IACrD,QAAA,kBAAA,GAAA,CAAC,mBAAA,EAAA,EAAoB,OAAM,MAAA,EAAO,MAAA,EAAO,QACvC,QAAA,kBAAA,IAAA,CAACA,YAAA,EAAA,EAAmB,MAAM,IAAA,EACvB,QAAA,EAAA;AAAA,IAAA,QAAA,mBAAW,GAAA,CAAC,aAAU,CAAA,GAAK,IAAA;AAAA,oBAC5B,GAAA,CAAC,cAAA,EAAA,EAAe,OAAA,EAAQ,MAAA,EAAO,CAAA;AAAA,wBAC9B,eAAA,EAAA,EAAgB,CAAA;AAAA,IAChB,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,CAAC,IAAI,CAAA,KAAM;AACjC,MAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,EAAA,EAAI,CAAC,CAAA;AAC5B,MAAA,uBACE,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UAEC,OAAA,EAAS,UAAU,CAAC,CAAA,CAAA;AAAA,UACpB,MAAM,EAAA,CAAG,KAAA;AAAA,UACT,MAAA,EAAQ,KAAA;AAAA,UACR,IAAA,EAAM,KAAA;AAAA,UACN,WAAA,EAAa;AAAA,SAAA;AAAA,QALR,EAAA,CAAG;AAAA,OAMV;AAAA,IAEJ,CAAC,CAAA;AAAA,wBACA,OAAA,EAAA,EAAQ,CAAA;AAAA,IACR,UAAA,mBAAa,GAAA,CAAC,MAAA,EAAA,EAAO,CAAA,GAAK;AAAA,GAAA,EAC7B,GACF,CAAA,EACF,CAAA;AAEJ","file":"RadarChart-CSWR5AO7.js","sourcesContent":["import {\n Legend,\n PolarAngleAxis,\n PolarGrid,\n PolarRadiusAxis,\n Radar,\n RadarChart as RechartsRadarChart,\n ResponsiveContainer,\n Tooltip,\n} from 'recharts';\nimport { type ChartSubProps, colorFor, toRowShape } from '../types';\n\nexport function RadarChart({ chartData, height, showLegend, showGrid }: ChartSubProps) {\n const rows = toRowShape(chartData);\n\n return (\n <div data-testid=\"chart-radar\" style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsRadarChart data={rows}>\n {showGrid ? <PolarGrid /> : null}\n <PolarAngleAxis dataKey=\"name\" />\n <PolarRadiusAxis />\n {chartData.datasets.map((ds, i) => {\n const color = colorFor(ds, i);\n return (\n <Radar\n key={ds.label}\n dataKey={`dataset${i}`}\n name={ds.label}\n stroke={color}\n fill={color}\n fillOpacity={0.3}\n />\n );\n })}\n <Tooltip />\n {showLegend ? <Legend /> : null}\n </RechartsRadarChart>\n </ResponsiveContainer>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { NavigationItemPayload } from '@arqel-dev/hooks';
|
|
4
|
+
|
|
5
|
+
type AppShellVariant = 'sidebar-left' | 'sidebar-right' | 'topbar-only' | 'full-width';
|
|
6
|
+
interface AppShellProps {
|
|
7
|
+
variant?: AppShellVariant;
|
|
8
|
+
sidebar?: ReactNode;
|
|
9
|
+
topbar?: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function AppShell({ variant, sidebar, topbar, footer, children, className, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
interface FooterProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare function Footer({ children, className }: FooterProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
type MainContentMaxWidth = 'none' | 'md' | 'lg' | 'xl' | '2xl' | '4xl' | '6xl' | '7xl';
|
|
23
|
+
interface MainContentProps {
|
|
24
|
+
breadcrumbs?: ReactNode;
|
|
25
|
+
header?: ReactNode;
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
maxWidth?: MainContentMaxWidth;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
declare function MainContent({ breadcrumbs, header, children, maxWidth, className, }: MainContentProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface SidebarProps {
|
|
33
|
+
items?: NavigationItemPayload[];
|
|
34
|
+
brand?: ReactNode;
|
|
35
|
+
footer?: ReactNode;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
declare function Sidebar({ items: itemsProp, brand, footer, className }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
interface TopbarProps {
|
|
41
|
+
brand?: ReactNode;
|
|
42
|
+
search?: ReactNode;
|
|
43
|
+
userMenu?: ReactNode;
|
|
44
|
+
tenantSwitcher?: ReactNode;
|
|
45
|
+
onMobileMenuClick?: () => void;
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
declare function Topbar({ brand, search, userMenu, tenantSwitcher, onMobileMenuClick, className, }: TopbarProps): react_jsx_runtime.JSX.Element;
|
|
49
|
+
|
|
50
|
+
export { AppShell as A, Footer as F, MainContent as M, Sidebar as S, Topbar as T, type AppShellProps as a, type AppShellVariant as b, type FooterProps as c, type MainContentMaxWidth as d, type MainContentProps as e, type SidebarProps as f, type TopbarProps as g };
|
package/dist/action.d.ts
CHANGED
|
@@ -28,8 +28,13 @@ type ButtonProps = ComponentProps<typeof Button>;
|
|
|
28
28
|
|
|
29
29
|
interface ActionButtonProps {
|
|
30
30
|
action: ActionSchema;
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Field schemas for the form modal (resolved server-side from
|
|
33
|
+
* `Action::form` via `FieldSchemaSerializer`). Optional override — when
|
|
34
|
+
* omitted the component reads `action.formFields`, the canonical payload
|
|
35
|
+
* shipped by `Action::toArray()` (#213).
|
|
36
|
+
*/
|
|
37
|
+
formFields?: FieldSchema[] | undefined;
|
|
33
38
|
onInvoke: (formValues?: Record<string, unknown>) => void;
|
|
34
39
|
processing?: boolean;
|
|
35
40
|
errors?: Record<string, string[]>;
|
|
@@ -52,6 +57,11 @@ declare function ActionFormModal({ open, onOpenChange, action, fields, onSubmit,
|
|
|
52
57
|
|
|
53
58
|
interface ActionMenuProps {
|
|
54
59
|
actions: ActionSchema[];
|
|
60
|
+
/**
|
|
61
|
+
* Optional per-action override map keyed by action name. When an action
|
|
62
|
+
* is absent here, `<ActionButton>` falls back to the action's own
|
|
63
|
+
* `formFields` payload shipped by `Action::toArray()` (#213).
|
|
64
|
+
*/
|
|
55
65
|
formFieldsByAction?: Record<string, FieldSchema[]>;
|
|
56
66
|
onInvoke: (action: ActionSchema, formValues?: Record<string, unknown>) => void;
|
|
57
67
|
inlineThreshold?: number;
|