@godxjp/ui 20.0.0 → 20.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/README.md +8 -2
- package/dist/app/app-provider.js +37 -21
- package/dist/app/index.d.ts +2 -0
- package/dist/app/index.js +2 -0
- package/dist/app/storage.d.ts +17 -0
- package/dist/app/storage.js +28 -0
- package/dist/app/theme-axes.d.ts +2 -0
- package/dist/app/theme-axes.js +45 -0
- package/dist/components/charts/chart-cartesian.d.ts +2 -1
- package/dist/components/charts/chart-cartesian.js +52 -3
- package/dist/components/charts/chart-category-axis.d.ts +55 -0
- package/dist/components/charts/chart-category-axis.js +93 -0
- package/dist/components/charts/chart-frame.d.ts +10 -1
- package/dist/components/charts/chart-frame.js +19 -3
- package/dist/components/charts/compact-bar-trend.d.ts +1 -1
- package/dist/components/charts/compact-bar-trend.js +2 -0
- package/dist/components/charts/pie-chart.d.ts +1 -1
- package/dist/components/charts/pie-chart.js +12 -1
- package/dist/components/charts/recharts-peer.d.ts +49 -0
- package/dist/components/charts/recharts-peer.js +45 -0
- package/dist/components/data-display/card.d.ts +12 -1
- package/dist/components/data-display/card.js +22 -4
- package/dist/components/data-display/code-block.js +6 -2
- package/dist/components/data-display/data-table.d.ts +39 -4
- package/dist/components/data-display/data-table.js +802 -270
- package/dist/components/data-display/descriptions.d.ts +27 -6
- package/dist/components/data-display/descriptions.js +58 -17
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display/index.js +2 -0
- package/dist/components/data-display/list-row.d.ts +10 -1
- package/dist/components/data-display/list-row.js +7 -1
- package/dist/components/data-display/popover.d.ts +9 -3
- package/dist/components/data-display/popover.js +65 -11
- package/dist/components/data-display/range-timeline.d.ts +38 -0
- package/dist/components/data-display/range-timeline.js +161 -0
- package/dist/components/data-display/scroll-area.js +13 -2
- package/dist/components/data-display/service-launcher-card.js +14 -12
- package/dist/components/data-display/table.d.ts +71 -3
- package/dist/components/data-display/table.js +56 -18
- package/dist/components/data-display/tree-list.js +4 -9
- package/dist/components/data-entry/calendar.d.ts +2 -2
- package/dist/components/data-entry/calendar.js +23 -3
- package/dist/components/data-entry/cascader.d.ts +1 -1
- package/dist/components/data-entry/cascader.js +188 -24
- package/dist/components/data-entry/color-picker.d.ts +1 -1
- package/dist/components/data-entry/color-picker.js +17 -5
- package/dist/components/data-entry/control-appearance.d.ts +64 -0
- package/dist/components/data-entry/control-appearance.js +39 -0
- package/dist/components/data-entry/control-surface.d.ts +61 -0
- package/dist/components/data-entry/control-surface.js +39 -0
- package/dist/components/data-entry/date-picker.d.ts +1 -1
- package/dist/components/data-entry/date-picker.js +344 -113
- package/dist/components/data-entry/date-range-picker.d.ts +1 -1
- package/dist/components/data-entry/date-range-picker.js +278 -140
- package/dist/components/data-entry/form-field.d.ts +1 -1
- package/dist/components/data-entry/form-field.js +39 -4
- package/dist/components/data-entry/form.d.ts +4 -0
- package/dist/components/data-entry/form.js +4 -2
- package/dist/components/data-entry/index.d.ts +7 -3
- package/dist/components/data-entry/index.js +10 -1
- package/dist/components/data-entry/input-otp.d.ts +1 -1
- package/dist/components/data-entry/input.d.ts +12 -34
- package/dist/components/data-entry/input.js +92 -24
- package/dist/components/data-entry/month-picker.d.ts +1 -1
- package/dist/components/data-entry/month-picker.js +47 -10
- package/dist/components/data-entry/month-range-picker.d.ts +1 -1
- package/dist/components/data-entry/month-range-picker.js +51 -11
- package/dist/components/data-entry/number-input.d.ts +7 -0
- package/dist/components/data-entry/number-input.js +147 -98
- package/dist/components/data-entry/password-input.d.ts +1 -1
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/radio.js +61 -13
- package/dist/components/data-entry/search-input.d.ts +1 -1
- package/dist/components/data-entry/search-input.js +16 -2
- package/dist/components/data-entry/search-select.d.ts +2 -2
- package/dist/components/data-entry/search-select.js +209 -78
- package/dist/components/data-entry/select.d.ts +22 -4
- package/dist/components/data-entry/select.js +215 -163
- package/dist/components/data-entry/slider.d.ts +9 -1
- package/dist/components/data-entry/slider.js +87 -9
- package/dist/components/data-entry/switch.d.ts +3 -0
- package/dist/components/data-entry/switch.js +29 -3
- package/dist/components/data-entry/textarea.d.ts +14 -56
- package/dist/components/data-entry/textarea.js +80 -33
- package/dist/components/data-entry/time-picker.d.ts +2 -2
- package/dist/components/data-entry/time-picker.js +333 -109
- package/dist/components/data-entry/time-range-picker.d.ts +5 -0
- package/dist/components/data-entry/time-range-picker.js +89 -0
- package/dist/components/data-entry/transfer.d.ts +1 -1
- package/dist/components/data-entry/transfer.js +86 -28
- package/dist/components/data-entry/tree-select.d.ts +1 -1
- package/dist/components/data-entry/tree-select.js +201 -113
- package/dist/components/data-entry/tree-utils.js +7 -14
- package/dist/components/data-entry/upload-files.d.ts +2 -0
- package/dist/components/data-entry/upload-files.js +31 -0
- package/dist/components/data-entry/upload-request.d.ts +4 -0
- package/dist/components/data-entry/upload-request.js +53 -0
- package/dist/components/data-entry/upload-types.d.ts +28 -0
- package/dist/components/data-entry/upload-types.js +2 -0
- package/dist/components/data-entry/upload.d.ts +2 -2
- package/dist/components/data-entry/upload.js +475 -115
- package/dist/components/feedback/dialog.js +19 -19
- package/dist/components/feedback/sheet.js +3 -0
- package/dist/components/feedback/tooltip.js +3 -0
- package/dist/components/general/button.d.ts +2 -1
- package/dist/components/general/button.js +7 -1
- package/dist/components/general/index.d.ts +1 -0
- package/dist/components/general/index.js +2 -0
- package/dist/components/general/typography.d.ts +3 -0
- package/dist/components/general/typography.js +15 -1
- package/dist/components/general/visually-hidden.d.ts +3 -0
- package/dist/components/general/visually-hidden.js +9 -0
- package/dist/components/layout/app-launcher.d.ts +34 -0
- package/dist/components/layout/app-launcher.js +261 -0
- package/dist/components/layout/app-shell.d.ts +3 -1
- package/dist/components/layout/app-shell.js +34 -14
- package/dist/components/layout/auth-shell.d.ts +1 -1
- package/dist/components/layout/auth-shell.js +2 -0
- package/dist/components/layout/breadcrumb.d.ts +14 -2
- package/dist/components/layout/breadcrumb.js +46 -4
- package/dist/components/layout/flex.d.ts +1 -1
- package/dist/components/layout/flex.js +23 -2
- package/dist/components/layout/index.d.ts +3 -0
- package/dist/components/layout/index.js +5 -1
- package/dist/components/layout/org-switcher.js +20 -1
- package/dist/components/layout/page-container.d.ts +1 -1
- package/dist/components/layout/page-container.js +5 -3
- package/dist/components/layout/responsive-grid.d.ts +16 -2
- package/dist/components/layout/responsive-grid.js +29 -2
- package/dist/components/layout/sidebar.js +2 -1
- package/dist/components/layout/topbar-item.d.ts +3 -0
- package/dist/components/layout/topbar-item.js +18 -3
- package/dist/components/layout/topbar.d.ts +1 -1
- package/dist/components/layout/topbar.js +27 -6
- package/dist/components/navigation/dropdown-menu.d.ts +30 -2
- package/dist/components/navigation/dropdown-menu.js +73 -11
- package/dist/components/navigation/pagination.d.ts +2 -2
- package/dist/components/navigation/pagination.js +155 -83
- package/dist/components/navigation/steps.d.ts +2 -2
- package/dist/components/navigation/steps.js +29 -4
- package/dist/components/navigation/tabs.d.ts +5 -33
- package/dist/components/navigation/tabs.js +232 -64
- package/dist/components/ui/hover-card.js +3 -0
- package/dist/components/ui/input-otp.d.ts +26 -28
- package/dist/components/ui/input-otp.js +50 -7
- package/dist/components/ui/password-input.d.ts +36 -2
- package/dist/components/ui/password-input.js +27 -7
- package/dist/components/ui/rating.d.ts +25 -0
- package/dist/components/ui/rating.js +67 -27
- package/dist/components/ui/segmented.d.ts +9 -0
- package/dist/components/ui/segmented.js +17 -2
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +13 -0
- package/dist/components/ui/tag-input.d.ts +45 -0
- package/dist/components/ui/tag-input.js +109 -27
- package/dist/form/form-context.d.ts +29 -0
- package/dist/form/form-context.js +44 -4
- package/dist/form/form-field-array.d.ts +22 -0
- package/dist/form/form-field-array.js +50 -0
- package/dist/form/form-field-control.d.ts +2 -1
- package/dist/form/form-field-control.js +116 -40
- package/dist/form/form-root.d.ts +2 -1
- package/dist/form/form-root.js +142 -23
- package/dist/form/index.d.ts +3 -1
- package/dist/form/index.js +12 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +3 -1
- package/dist/i18n/messages/en.json +59 -6
- package/dist/i18n/messages/ja.json +59 -6
- package/dist/i18n/messages/vi.json +59 -6
- package/dist/i18n/translate.d.ts +19 -0
- package/dist/i18n/translate.js +24 -0
- package/dist/inertia/index.d.ts +20 -0
- package/dist/inertia/index.js +60 -1
- package/dist/lib/control-styles.d.ts +25 -3
- package/dist/lib/control-styles.js +9 -3
- package/dist/lib/datetime/picker-format.d.ts +8 -0
- package/dist/lib/datetime/picker-format.js +54 -0
- package/dist/lib/overlay-portal.d.ts +18 -0
- package/dist/lib/overlay-portal.js +17 -0
- package/dist/props/components/app.prop.d.ts +13 -2
- package/dist/props/components/charts.prop.d.ts +21 -0
- package/dist/props/components/data-display.prop.d.ts +55 -4
- package/dist/props/components/data-entry.prop.d.ts +687 -43
- package/dist/props/components/form.prop.d.ts +142 -4
- package/dist/props/components/general.prop.d.ts +30 -1
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/components/layout.prop.d.ts +255 -8
- package/dist/props/components/navigation.prop.d.ts +113 -3
- package/dist/props/registry.d.ts +376 -10
- package/dist/props/registry.js +493 -9
- package/dist/props/vocabulary/data.prop.d.ts +179 -1
- package/dist/props/vocabulary/index.d.ts +4 -4
- package/dist/props/vocabulary/interaction.prop.d.ts +51 -2
- package/dist/props/vocabulary/navigation.prop.d.ts +40 -0
- package/dist/props/vocabulary/shared.prop.d.ts +33 -0
- package/dist/styles/badge-layout.css +2 -1
- package/dist/styles/card-layout.css +36 -5
- package/dist/styles/chart-layout.css +17 -1
- package/dist/styles/control.css +520 -14
- package/dist/styles/data-display-layout.css +248 -7
- package/dist/styles/data-entry-layout.css +13 -0
- package/dist/styles/layout.css +221 -4
- package/dist/styles/navigation-layout.css +230 -1
- package/dist/styles/shell-layout.css +690 -21
- package/dist/styles/table-layout.css +95 -6
- package/dist/styles/text-layout.css +5 -0
- package/dist/tokens/base.css +1 -0
- package/dist/tokens/components/badge.css +1 -0
- package/dist/tokens/components/chart.css +6 -0
- package/dist/tokens/components/control.css +81 -3
- package/dist/tokens/components/data-display.css +9 -0
- package/dist/tokens/components/descriptions.css +11 -0
- package/dist/tokens/components/flex.css +8 -0
- package/dist/tokens/components/navigation.css +55 -0
- package/dist/tokens/components/shell.css +100 -5
- package/dist/tokens/components/table.css +14 -0
- package/dist/tokens/foundation.css +2 -0
- package/dist/tokens/semantic/layout.css +9 -0
- package/docs/CONSUMER-RULES.md +13 -0
- package/docs/DESIGN-AUTHORITY.md +43 -6
- package/docs/DEVELOPMENT.md +4 -3
- package/docs/FORMS.md +151 -6
- package/docs/FRAME-COVERAGE-REPORT.md +29 -16
- package/docs/README.md +1 -1
- package/docs/STANDARDS-vocabulary-tokens.md +1 -1
- package/docs/TESTING.md +15 -6
- package/docs/charts/cjk-category-axis.tsx +81 -0
- package/docs/data-display/card/index.tsx +22 -0
- package/docs/data-display/data-table/examples/antd-parity.tsx +257 -0
- package/docs/data-display/data-table/index.tsx +23 -0
- package/docs/data-display/descriptions.tsx +41 -0
- package/docs/data-display/list-row.tsx +6 -6
- package/docs/data-display/scroll-area.tsx +31 -25
- package/docs/data-display/table.tsx +104 -45
- package/docs/data-display/timeline.tsx +41 -0
- package/docs/data-entry/date-picker.tsx +85 -0
- package/docs/data-entry/date-range-picker.tsx +26 -0
- package/docs/data-entry/form-dynamic-fields.tsx +199 -0
- package/docs/data-entry/form.tsx +74 -4
- package/docs/data-entry/input-otp.tsx +24 -0
- package/docs/data-entry/input.tsx +46 -1
- package/docs/data-entry/month-range-picker.tsx +1 -1
- package/docs/data-entry/select.tsx +27 -0
- package/docs/data-entry/switch.tsx +41 -0
- package/docs/data-entry/textarea.tsx +38 -0
- package/docs/data-entry/time-picker.tsx +85 -1
- package/docs/data-entry/time-range-picker.tsx +55 -0
- package/docs/data-entry/transfer.tsx +17 -0
- package/docs/data-entry/upload.tsx +56 -12
- package/docs/feedback/tooltip.tsx +1 -1
- package/docs/general/activity.tsx +2 -2
- package/docs/general/button/index.tsx +14 -1
- package/docs/general/typography.tsx +14 -1
- package/docs/layout/app-launcher.tsx +195 -0
- package/docs/layout/app-shell-arrangements.tsx +5 -5
- package/docs/layout/app-shell.tsx +11 -0
- package/docs/layout/flex.tsx +50 -0
- package/docs/layout/responsive-grid.tsx +21 -1
- package/docs/layout/topbar.tsx +5 -9
- package/docs/navigation/app-setting-picker.tsx +11 -0
- package/docs/navigation/breadcrumb.tsx +48 -0
- package/docs/navigation/dropdown-menu.tsx +21 -0
- package/docs/navigation/pagination.tsx +52 -0
- package/docs/navigation/steps.tsx +37 -0
- package/docs/navigation/tabs.tsx +97 -1
- package/docs/query/button-refetch.tsx +1 -0
- package/docs/showcase/settings-security-mfa.tsx +3 -3
- package/package.json +24 -4
- package/scripts/_agent-setup.mjs +76 -9
- package/scripts/init-guinea-pig.mjs +26 -4
- package/scripts/ui-audit.mjs +243 -30
- package/scripts/visual-audit.mjs +45 -7
|
@@ -11,6 +11,7 @@ function CompactBarTrend({
|
|
|
11
11
|
categoryKey,
|
|
12
12
|
valueKey,
|
|
13
13
|
label,
|
|
14
|
+
showCaption = true,
|
|
14
15
|
description,
|
|
15
16
|
size = "xs",
|
|
16
17
|
emphasizedIndex,
|
|
@@ -40,6 +41,7 @@ function CompactBarTrend({
|
|
|
40
41
|
{
|
|
41
42
|
ref,
|
|
42
43
|
label,
|
|
44
|
+
showCaption,
|
|
43
45
|
description,
|
|
44
46
|
summaryRows: summary.rows,
|
|
45
47
|
imgSummary: summary.img,
|
|
@@ -5,4 +5,4 @@ export type { PieChartProp, PieChartProp as PieChartProps, } from "../../props/c
|
|
|
5
5
|
* Import from the tree-shaken `@godxjp/ui/charts` entry; requires the `recharts`
|
|
6
6
|
* optional peer dependency.
|
|
7
7
|
*/
|
|
8
|
-
export declare function PieChart({ data, dataKey, nameKey, colors, label, description, size, height, showLegend, numberFormat, donut, emptyMessage, className, id, }: PieChartProp): import("react").JSX.Element;
|
|
8
|
+
export declare function PieChart({ data, dataKey, nameKey, colors, label, showCaption, description, size, height, showLegend, numberFormat, donut, emptyMessage, className, id, }: PieChartProp): import("react").JSX.Element;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Cell,
|
|
5
|
+
Legend,
|
|
6
|
+
Pie,
|
|
7
|
+
PieChart as RPieChart,
|
|
8
|
+
ResponsiveContainer,
|
|
9
|
+
Tooltip,
|
|
10
|
+
assertRechartsPeer
|
|
11
|
+
} from "./recharts-peer.js";
|
|
4
12
|
import { EmptyState } from "../data-display/empty-state.js";
|
|
5
13
|
import { useTranslation } from "../../i18n/use-translation.js";
|
|
6
14
|
import { ChartFrame, chartColor, chartHeight, useChartNumberFormat } from "./chart-frame.js";
|
|
@@ -11,6 +19,7 @@ function PieChart({
|
|
|
11
19
|
nameKey,
|
|
12
20
|
colors,
|
|
13
21
|
label,
|
|
22
|
+
showCaption = true,
|
|
14
23
|
description,
|
|
15
24
|
size = "md",
|
|
16
25
|
height,
|
|
@@ -21,6 +30,7 @@ function PieChart({
|
|
|
21
30
|
className,
|
|
22
31
|
id
|
|
23
32
|
}) {
|
|
33
|
+
assertRechartsPeer();
|
|
24
34
|
const { t } = useTranslation();
|
|
25
35
|
const fmt = useChartNumberFormat(numberFormat);
|
|
26
36
|
const hasData = data.length > 0;
|
|
@@ -36,6 +46,7 @@ function PieChart({
|
|
|
36
46
|
ChartFrame,
|
|
37
47
|
{
|
|
38
48
|
label,
|
|
49
|
+
showCaption,
|
|
39
50
|
description,
|
|
40
51
|
summaryRows: summary.rows,
|
|
41
52
|
imgSummary: summary.img,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE module in `@godxjp/ui` that touches the optional `recharts` peer.
|
|
3
|
+
*
|
|
4
|
+
* WHY IT EXISTS (gh#409 · 6). `recharts` is declared optional in `peerDependenciesMeta`, so a
|
|
5
|
+
* bundler that cannot resolve it substitutes an empty stub, and EVERY named import of that stub
|
|
6
|
+
* becomes its own `[MISSING_EXPORT]` diagnostic. A consumer who had not installed recharts got 18
|
|
7
|
+
* of them, spread across `dist/components/charts/**`, none of which said what to install.
|
|
8
|
+
*
|
|
9
|
+
* Reading the peer through a NAMESPACE import removes those bindings — there is no named export
|
|
10
|
+
* left to be missing. ONE named import is kept on purpose: it is what still fails the BUILD (a
|
|
11
|
+
* silent build followed by a blank page at load is worse than a red build), and because the
|
|
12
|
+
* bundler prints the offending SOURCE LINE, its local alias is written as the remedy — so the
|
|
13
|
+
* single remaining diagnostic reads
|
|
14
|
+
*
|
|
15
|
+
* [MISSING_EXPORT] "ResponsiveContainer" is not exported by
|
|
16
|
+
* "__vite-optional-peer-dep:recharts:@godxjp/ui".
|
|
17
|
+
* ╭─[ …/dist/components/charts/recharts-peer.js:3:10 ]
|
|
18
|
+
* 3 │ import { ResponsiveContainer as install_recharts_or_use_charts_compact_bar_trend } from "recharts";
|
|
19
|
+
*
|
|
20
|
+
* which names the package, the fix, and the alternative that needs no peer at all.
|
|
21
|
+
*
|
|
22
|
+
* `assertRechartsPeer` covers the bundlers that resolve a missing optional peer to a silent empty
|
|
23
|
+
* object instead of a throwing stub: there the first chart to render says what is missing.
|
|
24
|
+
*
|
|
25
|
+
* Do NOT `import … from "recharts"` anywhere else in the library.
|
|
26
|
+
*/
|
|
27
|
+
import * as peer from "recharts";
|
|
28
|
+
/** What a consumer has to do. Kept as one string so the message cannot drift between call sites. */
|
|
29
|
+
export declare const RECHARTS_PEER_MESSAGE: string;
|
|
30
|
+
/**
|
|
31
|
+
* Throw the remedy instead of an `undefined is not a component` render error. Called by each
|
|
32
|
+
* recharts-backed chart before it renders anything.
|
|
33
|
+
*/
|
|
34
|
+
export declare function assertRechartsPeer(): void;
|
|
35
|
+
export declare const Area: <DataPointType = any, ValueAxisType = any>(props: peer.AreaProps<DataPointType, ValueAxisType>) => import("react").ReactElement, AreaChart: <DataPointType = any>(props: import("recharts/types/util/types").CartesianChartProps<DataPointType> & {
|
|
36
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
37
|
+
}) => React.ReactElement, Bar: <DataPointType = any, ValueAxisType = any>(props: peer.BarProps<DataPointType, ValueAxisType>) => import("react").ReactElement, BarChart: <DataPointType = any>(props: import("recharts/types/util/types").CartesianChartProps<DataPointType> & {
|
|
38
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
39
|
+
}) => React.ReactElement, CartesianGrid: typeof peer.CartesianGrid, Cell: import("react").FunctionComponent<peer.CellProps>, Legend: import("react").MemoExoticComponent<(outsideProps: peer.LegendProps) => React.ReactPortal | null>, Line: {
|
|
40
|
+
<DataPointType = any, ValueAxisType = any>(props: peer.LineProps<DataPointType, ValueAxisType>): import("react").ReactElement;
|
|
41
|
+
(props: peer.LineProps<any, any>): import("react").ReactElement;
|
|
42
|
+
}, LineChart: <DataPointType = any>(props: import("recharts/types/util/types").CartesianChartProps<DataPointType> & {
|
|
43
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
44
|
+
}) => React.ReactElement, Pie: {
|
|
45
|
+
<DataPointType = any, DataValueType = any>(outsideProps: peer.PieProps<DataPointType, DataValueType>): import("react").ReactElement;
|
|
46
|
+
(outsideProps: peer.PieProps<any, any>): import("react").ReactElement;
|
|
47
|
+
}, PieChart: <DataPointType = any>(props: import("recharts/types/util/types").PolarChartProps<DataPointType> & {
|
|
48
|
+
ref?: React.Ref<SVGSVGElement>;
|
|
49
|
+
}) => React.ReactElement, ResponsiveContainer: import("react").ForwardRefExoticComponent<peer.ResponsiveContainerProps & import("react").RefAttributes<HTMLDivElement>>, Tooltip: typeof peer.Tooltip, XAxis: <DataPointType = any, DataValueType = any>(props: peer.XAxisProps<DataPointType, DataValueType>) => import("react").ReactElement, YAxis: <DataPointType = any, DataValueType = any>(props: peer.YAxisProps<DataPointType, DataValueType>) => import("react").ReactElement;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as peer from "recharts";
|
|
3
|
+
import { ResponsiveContainer as install_recharts_or_use_charts_compact_bar_trend } from "recharts";
|
|
4
|
+
const RECHARTS_PEER_MESSAGE = '@godxjp/ui charts need the optional peer dependency "recharts" (^2.13.0 || ^3.0.0), which is not installed. Install it \u2014 `pnpm add recharts` / `npm i recharts` \u2014 or, for a dependency-free trend mark, import { CompactBarTrend } from "@godxjp/ui/charts/compact-bar-trend".';
|
|
5
|
+
function assertRechartsPeer() {
|
|
6
|
+
if (typeof install_recharts_or_use_charts_compact_bar_trend === "undefined") {
|
|
7
|
+
throw new Error(RECHARTS_PEER_MESSAGE);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const {
|
|
11
|
+
Area,
|
|
12
|
+
AreaChart,
|
|
13
|
+
Bar,
|
|
14
|
+
BarChart,
|
|
15
|
+
CartesianGrid,
|
|
16
|
+
Cell,
|
|
17
|
+
Legend,
|
|
18
|
+
Line,
|
|
19
|
+
LineChart,
|
|
20
|
+
Pie,
|
|
21
|
+
PieChart,
|
|
22
|
+
ResponsiveContainer,
|
|
23
|
+
Tooltip,
|
|
24
|
+
XAxis,
|
|
25
|
+
YAxis
|
|
26
|
+
} = peer;
|
|
27
|
+
export {
|
|
28
|
+
Area,
|
|
29
|
+
AreaChart,
|
|
30
|
+
Bar,
|
|
31
|
+
BarChart,
|
|
32
|
+
CartesianGrid,
|
|
33
|
+
Cell,
|
|
34
|
+
Legend,
|
|
35
|
+
Line,
|
|
36
|
+
LineChart,
|
|
37
|
+
Pie,
|
|
38
|
+
PieChart,
|
|
39
|
+
RECHARTS_PEER_MESSAGE,
|
|
40
|
+
ResponsiveContainer,
|
|
41
|
+
Tooltip,
|
|
42
|
+
XAxis,
|
|
43
|
+
YAxis,
|
|
44
|
+
assertRechartsPeer
|
|
45
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { GapProp, PadProp, PadRawProp } from "../../props/vocabulary/index.js";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
import type { LucideIcon } from "lucide-react";
|
|
3
4
|
import type { HeadingLevelProp } from "../../props/vocabulary/index.js";
|
|
@@ -97,6 +98,11 @@ export declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttri
|
|
|
97
98
|
flush?: boolean;
|
|
98
99
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
99
100
|
export type CardBarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
101
|
+
pad?: PadProp;
|
|
102
|
+
padRaw?: PadRawProp;
|
|
103
|
+
gap?: GapProp;
|
|
104
|
+
surface?: "muted";
|
|
105
|
+
border?: "none" | "block-start" | "block-end" | "both";
|
|
100
106
|
/** Right-aligned actions slot (settings/save), Ant `tabBarExtraContent`-style. */
|
|
101
107
|
extra?: React.ReactNode;
|
|
102
108
|
};
|
|
@@ -107,6 +113,11 @@ export type CardBarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
107
113
|
* border is enough).
|
|
108
114
|
*/
|
|
109
115
|
export declare const CardBar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
116
|
+
pad?: PadProp;
|
|
117
|
+
padRaw?: PadRawProp;
|
|
118
|
+
gap?: GapProp;
|
|
119
|
+
surface?: "muted";
|
|
120
|
+
border?: "none" | "block-start" | "block-end" | "both";
|
|
110
121
|
/** Right-aligned actions slot (settings/save), Ant `tabBarExtraContent`-style. */
|
|
111
122
|
extra?: React.ReactNode;
|
|
112
123
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -134,6 +145,6 @@ export type StatCardProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
134
145
|
};
|
|
135
146
|
/** KPI / stat tile — token-driven layout aligned to dashboard KPI cards. */
|
|
136
147
|
export declare function StatCard({ label, value, hint, icon: Icon, delta, layout, align, inverse, accent, accentPlacement, className, ...props }: StatCardProps): React.JSX.Element;
|
|
137
|
-
/** Header actions slot —
|
|
148
|
+
/** Header actions slot — compose beside CardTitle inside CardHeader; the header owns positioning. */
|
|
138
149
|
export declare const CardAction: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
139
150
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { padStyle, padStepToken } from "../../lib/variants.js";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import { cn } from "../../lib/utils.js";
|
|
4
5
|
const Card = React.forwardRef(
|
|
@@ -74,10 +75,27 @@ const CardFooter = React.forwardRef(
|
|
|
74
75
|
);
|
|
75
76
|
CardFooter.displayName = "CardFooter";
|
|
76
77
|
const CardBar = React.forwardRef(
|
|
77
|
-
({ className, children, extra, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
({ className, children, extra, pad, padRaw, gap, surface, border, style, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
ref,
|
|
82
|
+
"data-surface": surface,
|
|
83
|
+
"data-border": border,
|
|
84
|
+
"data-pad-raw": padRaw === void 0 ? void 0 : "",
|
|
85
|
+
style: {
|
|
86
|
+
...style,
|
|
87
|
+
...padStyle(pad, padRaw),
|
|
88
|
+
...gap === void 0 ? void 0 : { gap: padStepToken(gap) }
|
|
89
|
+
},
|
|
90
|
+
"data-slot": "card-bar",
|
|
91
|
+
className: cn("ui-card-bar", className),
|
|
92
|
+
...props,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "card-bar-main", className: "ui-card-bar-main", children }),
|
|
95
|
+
extra != null ? /* @__PURE__ */ jsx("div", { "data-slot": "card-bar-extra", className: "ui-card-bar-extra", children: extra }) : null
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
)
|
|
81
99
|
);
|
|
82
100
|
CardBar.displayName = "CardBar";
|
|
83
101
|
function getDeltaTone(delta, inverse) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cn } from "../../lib/utils.js";
|
|
4
|
-
const CodeBlock = React.forwardRef(function CodeBlock2({ children, wrap = true, maxHeight = "none", size = "sm", language, className, ...rest }, ref) {
|
|
4
|
+
const CodeBlock = React.forwardRef(function CodeBlock2({ children, wrap = true, maxHeight = "none", size = "sm", language, className, style, ...rest }, ref) {
|
|
5
5
|
const scrolls = maxHeight !== "none" || !wrap;
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
7
7
|
"pre",
|
|
@@ -9,7 +9,11 @@ const CodeBlock = React.forwardRef(function CodeBlock2({ children, wrap = true,
|
|
|
9
9
|
ref,
|
|
10
10
|
"data-slot": "code-block",
|
|
11
11
|
"data-wrap": wrap ? void 0 : "false",
|
|
12
|
-
"data-max-height": maxHeight === "none" ? void 0
|
|
12
|
+
"data-max-height": typeof maxHeight === "string" && maxHeight !== "none" ? maxHeight : void 0,
|
|
13
|
+
style: {
|
|
14
|
+
...style,
|
|
15
|
+
...typeof maxHeight === "object" ? { maxBlockSize: maxHeight.value, overflow: "auto" } : void 0
|
|
16
|
+
},
|
|
13
17
|
"data-size": size === "sm" ? void 0 : size,
|
|
14
18
|
"data-language": language,
|
|
15
19
|
tabIndex: scrolls ? 0 : void 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { flexRender, type ColumnVisibilityState, type OnChangeFn, type PaginationState } from "@tanstack/react-table";
|
|
3
|
-
import type { BreakpointProp, ColumnDefProp, DensityProp, SortStateProp, TablePresetProp } from "../../props/vocabulary/index.js";
|
|
3
|
+
import type { BreakpointProp, ColumnDefProp, DensityProp, OnColumnFilterChangeProp, OnRowProp, SortDirectionProp, SortStateProp, TableExpandableProp, TablePaginationProp, TablePresetProp, TableRowSelectionProp, TableScrollProp, TableStickyProp, TableSummaryProp } from "../../props/vocabulary/index.js";
|
|
4
4
|
export type Density = DensityProp;
|
|
5
5
|
/**
|
|
6
6
|
* Lean column definition — the simple, common-case column API. `render` shapes a cell; `sortable`
|
|
@@ -25,8 +25,14 @@ interface DataTableProps<T> {
|
|
|
25
25
|
/** Global search term, surfaced by DataTable.Search. */
|
|
26
26
|
globalFilter?: string;
|
|
27
27
|
onGlobalFilterChange?: (next: string) => void;
|
|
28
|
-
/**
|
|
29
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Numbered-pagination state, surfaced by DataTable.Pagination. THREE shapes, all accepted:
|
|
30
|
+
* the TanStack `{ pageIndex, pageSize }` this prop has always taken; antd's
|
|
31
|
+
* `TablePaginationConfig` object (`{ current, pageSize, total, pageSizeOptions,
|
|
32
|
+
* showSizeChanger, onChange }`, 1-based like antd); and `false`, which hides the pager
|
|
33
|
+
* entirely (antd `pagination={false}`).
|
|
34
|
+
*/
|
|
35
|
+
pagination?: PaginationState | TablePaginationProp | false;
|
|
30
36
|
onPaginationChange?: OnChangeFn<PaginationState>;
|
|
31
37
|
/** Total server row count (manual pagination) — drives the page count. */
|
|
32
38
|
rowCount?: number;
|
|
@@ -76,10 +82,39 @@ interface DataTableProps<T> {
|
|
|
76
82
|
* classes are appended last, so they win over the built-in hover/selected fills.
|
|
77
83
|
*/
|
|
78
84
|
rowClassName?: (row: T) => string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Full row-selection configuration (antd `rowSelection`). Supersedes — and can be mixed with —
|
|
87
|
+
* `selectable` / `selected` / `onSelectChange`, which drive the same state.
|
|
88
|
+
*/
|
|
89
|
+
rowSelection?: TableRowSelectionProp<T>;
|
|
90
|
+
/** Expandable detail rows (antd `expandable`). */
|
|
91
|
+
expandable?: TableExpandableProp<T>;
|
|
92
|
+
/** Footer totals row (antd `summary`) — rendered in a real `<tfoot>` so it survives sorting. */
|
|
93
|
+
summary?: TableSummaryProp<T>;
|
|
94
|
+
/** Scroll envelope (antd `scroll`) — `x` a minimum inline size, `y` a maximum body block size. */
|
|
95
|
+
scroll?: TableScrollProp;
|
|
96
|
+
/**
|
|
97
|
+
* Sticky header (antd `sticky`). Supersedes `stickyHeader` when given; the object form carries
|
|
98
|
+
* the `offsetHeader` a page-level fixed topbar needs.
|
|
99
|
+
*/
|
|
100
|
+
sticky?: TableStickyProp;
|
|
101
|
+
/** Per-row DOM props merged onto the `<tr>` (antd `onRow`). */
|
|
102
|
+
onRow?: OnRowProp<T>;
|
|
103
|
+
/** Draw the outer frame and the vertical rules between columns (antd `bordered`). */
|
|
104
|
+
bordered?: boolean;
|
|
105
|
+
/** Explain the next sort step in a tooltip on every sortable header (antd `showSorterTooltip`). */
|
|
106
|
+
showSorterTooltip?: boolean;
|
|
107
|
+
/** Table-wide sort cycle (antd `sortDirections`); a column's own value wins. */
|
|
108
|
+
sortDirections?: SortDirectionProp[];
|
|
109
|
+
/**
|
|
110
|
+
* Column filters changed (antd hands the same map to `onChange`). Pair it with a column's
|
|
111
|
+
* `filteredValue` to drive filtering from a server query.
|
|
112
|
+
*/
|
|
113
|
+
onFilterChange?: OnColumnFilterChangeProp;
|
|
79
114
|
className?: string;
|
|
80
115
|
children?: React.ReactNode;
|
|
81
116
|
}
|
|
82
|
-
export declare function DataTable<T>({ data, columns, getRowId, selectable, selected: controlledSelected, onSelectChange, onRowClick, density: controlledDensity, onDensityChange, sort, onSortChange, globalFilter: controlledGlobalFilter, onGlobalFilterChange, pagination:
|
|
117
|
+
export declare function DataTable<T>({ data, columns, getRowId, selectable, selected: controlledSelected, onSelectChange, onRowClick, density: controlledDensity, onDensityChange, sort, onSortChange, globalFilter: controlledGlobalFilter, onGlobalFilterChange, pagination: paginationProp, onPaginationChange, rowCount, columnVisibility: controlledVisibility, onColumnVisibilityChange, manualSorting, manualFiltering, manualPagination, loading, empty, error, denied, onRetry, striped, hoverable, stickyHeader, preset, collapseBelow, rowClassName, rowSelection, expandable, summary, scroll, sticky, onRow, bordered, showSorterTooltip, sortDirections, onFilterChange, className, children, }: DataTableProps<T>): React.JSX.Element;
|
|
83
118
|
export declare namespace DataTable {
|
|
84
119
|
var Toolbar: ({ children, className, }: {
|
|
85
120
|
children?: React.ReactNode;
|