@godxjp/ui 16.9.2 → 16.9.4
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/dist/app/app-provider.d.ts +3 -3
- package/dist/app/app-provider.js +10 -10
- package/dist/app/date-format-labels.d.ts +2 -2
- package/dist/app/date-format-labels.js +2 -2
- package/dist/app/date-formats.d.ts +1 -1
- package/dist/app/date-formats.js +1 -1
- package/dist/app/index.d.ts +14 -14
- package/dist/app/index.js +14 -14
- package/dist/app/locales.d.ts +1 -1
- package/dist/app/request-headers.d.ts +1 -1
- package/dist/app/request-headers.js +1 -1
- package/dist/app/storage.d.ts +2 -2
- package/dist/app/storage.js +4 -4
- package/dist/app/theme-axes.d.ts +1 -1
- package/dist/app/time-format-labels.d.ts +2 -2
- package/dist/app/time-format-labels.js +2 -2
- package/dist/app/timezones.d.ts +1 -1
- package/dist/app/timezones.js +1 -1
- package/dist/app/types.d.ts +6 -6
- package/dist/app/types.js +2 -2
- package/dist/app/use-formatting.d.ts +4 -4
- package/dist/app/use-formatting.js +2 -2
- package/dist/components/admin/index.d.ts +24 -24
- package/dist/components/admin/index.js +21 -21
- package/dist/components/charts/area-chart.d.ts +2 -2
- package/dist/components/charts/area-chart.js +1 -1
- package/dist/components/charts/bar-chart.d.ts +2 -2
- package/dist/components/charts/bar-chart.js +1 -1
- package/dist/components/charts/chart-cartesian.d.ts +1 -1
- package/dist/components/charts/chart-cartesian.js +4 -4
- package/dist/components/charts/chart-frame.js +2 -2
- package/dist/components/charts/chart-summary.d.ts +1 -1
- package/dist/components/charts/index.d.ts +10 -10
- package/dist/components/charts/index.js +5 -5
- package/dist/components/charts/line-chart.d.ts +2 -2
- package/dist/components/charts/line-chart.js +1 -1
- package/dist/components/charts/pie-chart.d.ts +2 -2
- package/dist/components/charts/pie-chart.js +4 -4
- package/dist/components/data-display/accordion.d.ts +1 -1
- package/dist/components/data-display/accordion.js +1 -1
- package/dist/components/data-display/avatar.d.ts +1 -1
- package/dist/components/data-display/avatar.js +1 -1
- package/dist/components/data-display/badge.d.ts +1 -1
- package/dist/components/data-display/badge.js +3 -3
- package/dist/components/data-display/card.js +1 -1
- package/dist/components/data-display/carousel.js +2 -2
- package/dist/components/data-display/data-table.d.ts +1 -1
- package/dist/components/data-display/data-table.js +12 -12
- package/dist/components/data-display/descriptions.d.ts +1 -1
- package/dist/components/data-display/descriptions.js +1 -1
- package/dist/components/data-display/empty-state.d.ts +2 -2
- package/dist/components/data-display/empty-state.js +1 -1
- package/dist/components/data-display/hover-card.d.ts +1 -1
- package/dist/components/data-display/hover-card.js +1 -1
- package/dist/components/data-display/index.d.ts +26 -26
- package/dist/components/data-display/index.js +17 -17
- package/dist/components/data-display/list-row.js +2 -2
- package/dist/components/data-display/popover.js +1 -1
- package/dist/components/data-display/scroll-area.js +1 -1
- package/dist/components/data-display/table.js +2 -2
- package/dist/components/data-display/tree-list.js +1 -1
- package/dist/components/data-entry/calendar.d.ts +2 -2
- package/dist/components/data-entry/calendar.js +3 -3
- package/dist/components/data-entry/cascader.d.ts +3 -3
- package/dist/components/data-entry/cascader.js +8 -8
- package/dist/components/data-entry/checkbox-group.d.ts +2 -2
- package/dist/components/data-entry/checkbox-group.js +4 -4
- package/dist/components/data-entry/checkbox.d.ts +1 -1
- package/dist/components/data-entry/checkbox.js +2 -2
- package/dist/components/data-entry/choice-option.js +1 -1
- package/dist/components/data-entry/color-picker.d.ts +2 -2
- package/dist/components/data-entry/color-picker.js +4 -4
- package/dist/components/data-entry/command.js +2 -2
- package/dist/components/data-entry/date-picker.d.ts +2 -2
- package/dist/components/data-entry/date-picker.js +7 -7
- package/dist/components/data-entry/date-range-picker.d.ts +2 -2
- package/dist/components/data-entry/date-range-picker.js +6 -6
- package/dist/components/data-entry/field.d.ts +2 -2
- package/dist/components/data-entry/field.js +2 -2
- package/dist/components/data-entry/form-field.d.ts +2 -2
- package/dist/components/data-entry/form-field.js +3 -3
- package/dist/components/data-entry/form.d.ts +5 -5
- package/dist/components/data-entry/form.js +2 -2
- package/dist/components/data-entry/index.d.ts +59 -59
- package/dist/components/data-entry/index.js +33 -33
- package/dist/components/data-entry/input-otp.d.ts +1 -1
- package/dist/components/data-entry/input-otp.js +1 -1
- package/dist/components/data-entry/input.js +2 -2
- package/dist/components/data-entry/label.js +1 -1
- package/dist/components/data-entry/month-picker.d.ts +2 -2
- package/dist/components/data-entry/month-picker.js +5 -5
- package/dist/components/data-entry/month-range-picker.d.ts +2 -2
- package/dist/components/data-entry/month-range-picker.js +5 -5
- package/dist/components/data-entry/number-input.d.ts +2 -2
- package/dist/components/data-entry/number-input.js +4 -4
- package/dist/components/data-entry/password-input.d.ts +2 -2
- package/dist/components/data-entry/password-input.js +1 -1
- package/dist/components/data-entry/radio.d.ts +2 -2
- package/dist/components/data-entry/radio.js +3 -3
- package/dist/components/data-entry/rating.d.ts +2 -2
- package/dist/components/data-entry/rating.js +1 -1
- package/dist/components/data-entry/search-input.js +5 -5
- package/dist/components/data-entry/search-select.d.ts +2 -2
- package/dist/components/data-entry/search-select.js +7 -7
- package/dist/components/data-entry/select.d.ts +1 -1
- package/dist/components/data-entry/select.js +3 -3
- package/dist/components/data-entry/slider.d.ts +1 -1
- package/dist/components/data-entry/slider.js +1 -1
- package/dist/components/data-entry/switch.d.ts +1 -1
- package/dist/components/data-entry/switch.js +1 -1
- package/dist/components/data-entry/tag-input.d.ts +2 -2
- package/dist/components/data-entry/tag-input.js +1 -1
- package/dist/components/data-entry/textarea.js +3 -3
- package/dist/components/data-entry/time-picker.d.ts +2 -2
- package/dist/components/data-entry/time-picker.js +5 -5
- package/dist/components/data-entry/toggle-group.d.ts +1 -1
- package/dist/components/data-entry/toggle-group.js +1 -1
- package/dist/components/data-entry/toggle.d.ts +2 -2
- package/dist/components/data-entry/toggle.js +1 -1
- package/dist/components/data-entry/transfer.d.ts +2 -2
- package/dist/components/data-entry/transfer.js +7 -7
- package/dist/components/data-entry/tree-select.d.ts +3 -3
- package/dist/components/data-entry/tree-select.js +11 -11
- package/dist/components/data-entry/upload-crop-dialog.js +5 -5
- package/dist/components/data-entry/upload.d.ts +5 -5
- package/dist/components/data-entry/upload.js +10 -10
- package/dist/components/data-entry/use-upload-draft.d.ts +1 -1
- package/dist/components/data-entry/use-upload-draft.js +1 -1
- package/dist/components/feedback/alert.d.ts +29 -29
- package/dist/components/feedback/alert.js +5 -5
- package/dist/components/feedback/dialog.d.ts +3 -3
- package/dist/components/feedback/dialog.js +7 -7
- package/dist/components/feedback/index.d.ts +10 -10
- package/dist/components/feedback/index.js +7 -7
- package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
- package/dist/components/feedback/sheet.d.ts +1 -1
- package/dist/components/feedback/sheet.js +2 -2
- package/dist/components/feedback/skeleton.js +2 -2
- package/dist/components/feedback/tooltip.js +1 -1
- package/dist/components/general/button.d.ts +8 -8
- package/dist/components/general/button.js +4 -4
- package/dist/components/general/index.d.ts +4 -4
- package/dist/components/general/index.js +2 -2
- package/dist/components/general/typography.d.ts +9 -9
- package/dist/components/general/typography.js +1 -1
- package/dist/components/layout/app-shell.d.ts +2 -2
- package/dist/components/layout/app-shell.js +1 -1
- package/dist/components/layout/aspect-ratio.d.ts +1 -1
- package/dist/components/layout/aspect-ratio.js +1 -1
- package/dist/components/layout/breadcrumb.d.ts +1 -1
- package/dist/components/layout/breadcrumb.js +1 -1
- package/dist/components/layout/flex.d.ts +2 -2
- package/dist/components/layout/flex.js +2 -2
- package/dist/components/layout/index.d.ts +19 -19
- package/dist/components/layout/index.js +11 -11
- package/dist/components/layout/page-container.d.ts +3 -3
- package/dist/components/layout/page-container.js +2 -2
- package/dist/components/layout/resizable.js +1 -1
- package/dist/components/layout/responsive-grid.d.ts +1 -1
- package/dist/components/layout/separator.d.ts +1 -1
- package/dist/components/layout/separator.js +1 -1
- package/dist/components/layout/sidebar.d.ts +2 -2
- package/dist/components/layout/sidebar.js +5 -5
- package/dist/components/layout/topbar.d.ts +2 -2
- package/dist/components/layout/topbar.js +1 -1
- package/dist/components/navigation/app-setting-picker.d.ts +2 -2
- package/dist/components/navigation/app-setting-picker.js +9 -9
- package/dist/components/navigation/context-menu.js +1 -1
- package/dist/components/navigation/dropdown-menu.js +1 -1
- package/dist/components/navigation/filter-bar.d.ts +2 -2
- package/dist/components/navigation/filter-bar.js +3 -3
- package/dist/components/navigation/index.d.ts +12 -12
- package/dist/components/navigation/index.js +9 -9
- package/dist/components/navigation/menubar.js +1 -1
- package/dist/components/navigation/navigation-menu.js +1 -1
- package/dist/components/navigation/pagination.d.ts +2 -2
- package/dist/components/navigation/pagination.js +5 -5
- package/dist/components/navigation/steps.d.ts +2 -2
- package/dist/components/navigation/steps.js +3 -3
- package/dist/components/navigation/tabs.js +1 -1
- package/dist/components/query/data-state.d.ts +2 -2
- package/dist/components/query/data-state.js +1 -1
- package/dist/components/query/index.d.ts +10 -10
- package/dist/components/query/index.js +5 -5
- package/dist/components/query/infinite-query-state.d.ts +2 -2
- package/dist/components/query/infinite-query-state.js +3 -3
- package/dist/components/query/mutation-feedback.d.ts +2 -2
- package/dist/components/query/mutation-feedback.js +1 -1
- package/dist/components/query/prefetch-link.d.ts +2 -2
- package/dist/components/query/query-refetch-button.d.ts +2 -2
- package/dist/components/query/query-refetch-button.js +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -1
- package/dist/components/ui/avatar.js +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/card.d.ts +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.d.ts +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/color-picker.d.ts +1 -1
- package/dist/components/ui/color-picker.js +1 -1
- package/dist/components/ui/command.d.ts +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/context-menu.d.ts +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/date-picker.d.ts +1 -1
- package/dist/components/ui/date-picker.js +1 -1
- package/dist/components/ui/date-range-picker.d.ts +1 -1
- package/dist/components/ui/date-range-picker.js +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/hover-card.js +1 -1
- package/dist/components/ui/index.d.ts +42 -42
- package/dist/components/ui/index.js +42 -42
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.js +1 -1
- package/dist/components/ui/menubar.d.ts +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/navigation-menu.d.ts +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/password-input.d.ts +1 -1
- package/dist/components/ui/password-input.js +3 -3
- package/dist/components/ui/password-strength.d.ts +1 -1
- package/dist/components/ui/password-strength.js +1 -1
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/radio.d.ts +1 -1
- package/dist/components/ui/radio.js +1 -1
- package/dist/components/ui/rating.js +2 -2
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.js +1 -1
- package/dist/components/ui/scroll-area.d.ts +1 -1
- package/dist/components/ui/scroll-area.js +1 -1
- package/dist/components/ui/select.d.ts +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.d.ts +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/switch.d.ts +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/table.d.ts +1 -1
- package/dist/components/ui/table.js +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/tag-input.js +2 -2
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/time-picker.d.ts +1 -1
- package/dist/components/ui/time-picker.js +1 -1
- package/dist/components/ui/toggle-group.d.ts +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/toggle.js +1 -1
- package/dist/components/ui/upload.d.ts +1 -1
- package/dist/components/ui/upload.js +1 -1
- package/dist/form/form-field-control.d.ts +2 -2
- package/dist/form/form-field-control.js +1 -1
- package/dist/form/form-root.d.ts +2 -2
- package/dist/form/form-root.js +1 -1
- package/dist/form/index.d.ts +7 -7
- package/dist/form/index.js +3 -3
- package/dist/form/use-zod-form.d.ts +2 -2
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/translate.d.ts +2 -2
- package/dist/i18n/translate.js +3 -3
- package/dist/i18n/use-translation.d.ts +4 -4
- package/dist/i18n/use-translation.js +3 -3
- package/dist/index.d.ts +11 -11
- package/dist/index.js +7 -7
- package/dist/lib/datetime/detect.js +1 -1
- package/dist/lib/datetime/format-date.d.ts +2 -2
- package/dist/lib/datetime/format-date.js +4 -4
- package/dist/lib/datetime/format.d.ts +2 -2
- package/dist/lib/datetime/format.js +6 -6
- package/dist/lib/datetime/index.d.ts +5 -5
- package/dist/lib/datetime/index.js +5 -5
- package/dist/lib/datetime/parse.js +1 -1
- package/dist/lib/datetime/sync.d.ts +1 -1
- package/dist/lib/datetime/sync.js +2 -2
- package/dist/lib/format.d.ts +2 -2
- package/dist/lib/format.js +2 -2
- package/dist/lib/variants.d.ts +1 -1
- package/dist/props/components/app.prop.d.ts +3 -3
- package/dist/props/components/charts.prop.d.ts +1 -1
- package/dist/props/components/data-display.prop.d.ts +1 -1
- package/dist/props/components/data-entry.prop.d.ts +3 -3
- package/dist/props/components/feedback.prop.d.ts +1 -1
- package/dist/props/components/form.prop.d.ts +1 -1
- package/dist/props/components/general.prop.d.ts +1 -1
- package/dist/props/components/index.d.ts +10 -10
- package/dist/props/components/layout.prop.d.ts +1 -1
- package/dist/props/components/navigation.prop.d.ts +1 -1
- package/dist/props/components/query.prop.d.ts +2 -2
- package/dist/props/index.d.ts +7 -7
- package/dist/props/index.js +3 -3
- package/dist/props/vocabulary/data.prop.d.ts +2 -2
- package/dist/props/vocabulary/index.d.ts +6 -6
- package/dist/props/vocabulary/navigation.prop.d.ts +1 -1
- package/dist/styles/control.css +16 -0
- package/package.json +2 -2
- package/scripts/ui-audit.mjs +7 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type AppDateFormat, type AppLocale, type AppTimeFormat, type AppTimezone } from "./types";
|
|
2
|
-
import type { AppContextValue, AppProviderProp } from "../props/components/app.prop";
|
|
3
|
-
export type { AppProviderProp, AppContextValue } from "../props/components/app.prop";
|
|
1
|
+
import { type AppDateFormat, type AppLocale, type AppTimeFormat, type AppTimezone } from "./types.js";
|
|
2
|
+
import type { AppContextValue, AppProviderProp } from "../props/components/app.prop.js";
|
|
3
|
+
export type { AppProviderProp, AppContextValue } from "../props/components/app.prop.js";
|
|
4
4
|
export declare function AppProvider({ children, defaultLocale, fallbackLocale, defaultTimezone, systemTimezone, defaultTimeFormat, defaultDateFormat, timezoneOptions, storageKey, persist, theme: initialTheme, brand: initialBrand, density: initialDensity, fontSize: initialFontSize, scaling: initialScaling, onLocaleChange, onTimezoneChange, onTimeFormatChange, onDateFormatChange, onThemeChange, onBrandChange, onDensityChange, onFontSizeChange, onScalingChange, }: AppProviderProp): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare function useAppContext(): AppContextValue;
|
|
6
6
|
/** Returns null outside AppProvider — used by pickers for optional context. */
|
package/dist/app/app-provider.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { resolveDefaultDateFormat } from "./date-format-labels";
|
|
5
|
-
import { getDateFnsLocale, getDayPickerLocale } from "./locales";
|
|
6
|
-
import { syncAppRequestHeaders } from "./request-headers";
|
|
7
|
-
import { syncI18nLocale } from "../i18n/translate";
|
|
4
|
+
import { resolveDefaultDateFormat } from "./date-format-labels.js";
|
|
5
|
+
import { getDateFnsLocale, getDayPickerLocale } from "./locales.js";
|
|
6
|
+
import { syncAppRequestHeaders } from "./request-headers.js";
|
|
7
|
+
import { syncI18nLocale } from "../i18n/translate.js";
|
|
8
8
|
const RTL_LANGUAGE_SUBTAGS = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur", "ps", "sd", "yi", "dv", "ckb"]);
|
|
9
9
|
function localeDirection(locale) {
|
|
10
10
|
return RTL_LANGUAGE_SUBTAGS.has(locale.split("-")[0]?.toLowerCase() ?? "") ? "rtl" : "ltr";
|
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
disableLiveRelativeFormatting,
|
|
14
14
|
enableLiveRelativeFormatting,
|
|
15
15
|
syncDatetimeContext
|
|
16
|
-
} from "../lib/datetime";
|
|
17
|
-
import { DEFAULT_STORAGE_KEY, readStoredPreferences, writeStoredPreferences } from "./storage";
|
|
16
|
+
} from "../lib/datetime/index.js";
|
|
17
|
+
import { DEFAULT_STORAGE_KEY, readStoredPreferences, writeStoredPreferences } from "./storage.js";
|
|
18
18
|
import {
|
|
19
19
|
applyThemeAxes
|
|
20
|
-
} from "./theme-axes";
|
|
21
|
-
import { resolveDefaultTimeFormat } from "./time-format-labels";
|
|
22
|
-
import { resolveDefaultTimezone } from "./timezones";
|
|
20
|
+
} from "./theme-axes.js";
|
|
21
|
+
import { resolveDefaultTimeFormat } from "./time-format-labels.js";
|
|
22
|
+
import { resolveDefaultTimezone } from "./timezones.js";
|
|
23
23
|
import {
|
|
24
24
|
APP_REQUEST_HEADER_DATE_FORMAT,
|
|
25
25
|
APP_REQUEST_HEADER_LOCALE,
|
|
26
26
|
APP_REQUEST_HEADER_TIME_FORMAT,
|
|
27
27
|
APP_REQUEST_HEADER_TIMEZONE
|
|
28
|
-
} from "./types";
|
|
28
|
+
} from "./types.js";
|
|
29
29
|
const AppContext = React.createContext(null);
|
|
30
30
|
function resolveInitialTimeFormat(stored, defaultTimeFormat, locale) {
|
|
31
31
|
if (stored) return stored;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppLocale } from "./types";
|
|
2
|
-
import type { AppDateFormat } from "./date-formats";
|
|
1
|
+
import type { AppLocale } from "./types.js";
|
|
2
|
+
import type { AppDateFormat } from "./date-formats.js";
|
|
3
3
|
export declare const APP_DATE_FORMAT_OPTIONS: {
|
|
4
4
|
value: "iso" | "dmy" | "mdy";
|
|
5
5
|
}[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { APP_DATE_FORMATS } from "./date-formats";
|
|
2
|
-
import { translate } from "../i18n/translate";
|
|
1
|
+
import { APP_DATE_FORMATS } from "./date-formats.js";
|
|
2
|
+
import { translate } from "../i18n/translate.js";
|
|
3
3
|
const APP_DATE_FORMAT_OPTIONS = APP_DATE_FORMATS.map((value) => ({ value }));
|
|
4
4
|
function getDateFormatLabel(dateFormat, locale, fallbackLocale = "en") {
|
|
5
5
|
return translate(locale, fallbackLocale, `dateFormat.${dateFormat}`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Date-only display preset — sent as `x-date-format` to backend. */
|
|
2
|
-
import { type AppTimeFormat } from "./time-formats";
|
|
2
|
+
import { type AppTimeFormat } from "./time-formats.js";
|
|
3
3
|
export type AppDateFormat = "iso" | "dmy" | "mdy";
|
|
4
4
|
export declare const APP_DATE_FORMATS: readonly ["iso", "dmy", "mdy"];
|
|
5
5
|
export declare const APP_REQUEST_HEADER_DATE_FORMAT: "x-date-format";
|
package/dist/app/date-formats.js
CHANGED
package/dist/app/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from "./types";
|
|
2
|
-
export * from "./locales";
|
|
3
|
-
export * from "./timezones";
|
|
4
|
-
export * from "./time-formats";
|
|
5
|
-
export * from "./date-formats";
|
|
6
|
-
export * from "./time-format-labels";
|
|
7
|
-
export * from "./date-format-labels";
|
|
8
|
-
export * from "./storage";
|
|
9
|
-
export * from "./theme-axes";
|
|
10
|
-
export * from "./request-headers";
|
|
11
|
-
export { AppProvider, useAppContext, useOptionalAppContext, useAppLocale, useAppTimezone, useAppTimeFormat, useAppDateFormat, } from "./app-provider";
|
|
12
|
-
export { useFormatting, useDateTime } from "./use-formatting";
|
|
13
|
-
export { syncDatetimeContext, getDatetimeContext, formatDate, isFormatDateValue, detectFormatDateKind, formatAppDate, formatAppDateTime, formatAppTime, formatAppDateLong, formatAppRelative, formatCalendarDate, formatTimeOfDay, parseDateInput, normalizeHhmm, isValidHhmm, type FormatDateOptions, type FormatDateKind, type FormatDatetimeOptions, } from "../lib/datetime";
|
|
14
|
-
export { useTranslation, usePickerLocales } from "../i18n/use-translation";
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./locales.js";
|
|
3
|
+
export * from "./timezones.js";
|
|
4
|
+
export * from "./time-formats.js";
|
|
5
|
+
export * from "./date-formats.js";
|
|
6
|
+
export * from "./time-format-labels.js";
|
|
7
|
+
export * from "./date-format-labels.js";
|
|
8
|
+
export * from "./storage.js";
|
|
9
|
+
export * from "./theme-axes.js";
|
|
10
|
+
export * from "./request-headers.js";
|
|
11
|
+
export { AppProvider, useAppContext, useOptionalAppContext, useAppLocale, useAppTimezone, useAppTimeFormat, useAppDateFormat, } from "./app-provider.js";
|
|
12
|
+
export { useFormatting, useDateTime } from "./use-formatting.js";
|
|
13
|
+
export { syncDatetimeContext, getDatetimeContext, formatDate, isFormatDateValue, detectFormatDateKind, formatAppDate, formatAppDateTime, formatAppTime, formatAppDateLong, formatAppRelative, formatCalendarDate, formatTimeOfDay, parseDateInput, normalizeHhmm, isValidHhmm, type FormatDateOptions, type FormatDateKind, type FormatDatetimeOptions, } from "../lib/datetime/index.js";
|
|
14
|
+
export { useTranslation, usePickerLocales } from "../i18n/use-translation.js";
|
package/dist/app/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from "./types";
|
|
2
|
-
export * from "./locales";
|
|
3
|
-
export * from "./timezones";
|
|
4
|
-
export * from "./time-formats";
|
|
5
|
-
export * from "./date-formats";
|
|
6
|
-
export * from "./time-format-labels";
|
|
7
|
-
export * from "./date-format-labels";
|
|
8
|
-
export * from "./storage";
|
|
9
|
-
export * from "./theme-axes";
|
|
10
|
-
export * from "./request-headers";
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./locales.js";
|
|
3
|
+
export * from "./timezones.js";
|
|
4
|
+
export * from "./time-formats.js";
|
|
5
|
+
export * from "./date-formats.js";
|
|
6
|
+
export * from "./time-format-labels.js";
|
|
7
|
+
export * from "./date-format-labels.js";
|
|
8
|
+
export * from "./storage.js";
|
|
9
|
+
export * from "./theme-axes.js";
|
|
10
|
+
export * from "./request-headers.js";
|
|
11
11
|
import {
|
|
12
12
|
AppProvider,
|
|
13
13
|
useAppContext,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
useAppTimezone,
|
|
17
17
|
useAppTimeFormat,
|
|
18
18
|
useAppDateFormat
|
|
19
|
-
} from "./app-provider";
|
|
20
|
-
import { useFormatting, useDateTime } from "./use-formatting";
|
|
19
|
+
} from "./app-provider.js";
|
|
20
|
+
import { useFormatting, useDateTime } from "./use-formatting.js";
|
|
21
21
|
import {
|
|
22
22
|
syncDatetimeContext,
|
|
23
23
|
getDatetimeContext,
|
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
parseDateInput,
|
|
35
35
|
normalizeHhmm,
|
|
36
36
|
isValidHhmm
|
|
37
|
-
} from "../lib/datetime";
|
|
38
|
-
import { useTranslation, usePickerLocales } from "../i18n/use-translation";
|
|
37
|
+
} from "../lib/datetime/index.js";
|
|
38
|
+
import { useTranslation, usePickerLocales } from "../i18n/use-translation.js";
|
|
39
39
|
export {
|
|
40
40
|
AppProvider,
|
|
41
41
|
detectFormatDateKind,
|
package/dist/app/locales.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppRequestHeaders } from "./types";
|
|
1
|
+
import type { AppRequestHeaders } from "./types.js";
|
|
2
2
|
/** Sync locale/timezone into module state for HTTP clients (via `getAppRequestHeaders`). */
|
|
3
3
|
export declare function syncAppRequestHeaders(headers: Partial<AppRequestHeaders>): void;
|
|
4
4
|
/** Read current app preference headers — wire to API client `setAppHeaderProvider`. */
|
package/dist/app/storage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AppBrand, type AppDensity, type AppFontSize, type AppTheme } from "./theme-axes";
|
|
2
|
-
import type { AppLocale, AppTimezone, AppTimeFormat, AppDateFormat } from "./types";
|
|
1
|
+
import { type AppBrand, type AppDensity, type AppFontSize, type AppTheme } from "./theme-axes.js";
|
|
2
|
+
import type { AppLocale, AppTimezone, AppTimeFormat, AppDateFormat } from "./types.js";
|
|
3
3
|
declare const DEFAULT_STORAGE_KEY = "godxjp.app";
|
|
4
4
|
export type StoredAppPreferences = {
|
|
5
5
|
locale?: AppLocale;
|
package/dist/app/storage.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isAppLocale } from "./locales";
|
|
2
|
-
import { isAppDateFormat } from "./date-formats";
|
|
3
|
-
import { isAppTimeFormat } from "./time-formats";
|
|
1
|
+
import { isAppLocale } from "./locales.js";
|
|
2
|
+
import { isAppDateFormat } from "./date-formats.js";
|
|
3
|
+
import { isAppTimeFormat } from "./time-formats.js";
|
|
4
4
|
import {
|
|
5
5
|
isAppBrand,
|
|
6
6
|
isAppDensity,
|
|
7
7
|
isAppFontSize,
|
|
8
8
|
isAppTheme
|
|
9
|
-
} from "./theme-axes";
|
|
9
|
+
} from "./theme-axes.js";
|
|
10
10
|
const DEFAULT_STORAGE_KEY = "godxjp.app";
|
|
11
11
|
function readStoredPreferences(storageKey) {
|
|
12
12
|
if (typeof window === "undefined") return {};
|
package/dist/app/theme-axes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PageDensityProp } from "../props/vocabulary/layout.prop";
|
|
1
|
+
import type { PageDensityProp } from "../props/vocabulary/layout.prop.js";
|
|
2
2
|
/** Light / dark spine — `data-theme` (alias of the legacy `.dark` class). */
|
|
3
3
|
export type AppTheme = "light" | "dark";
|
|
4
4
|
/** Primary-palette preset — `data-brand`. `null` = keep the app's own `--primary`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppLocale } from "./types";
|
|
2
|
-
import type { AppTimeFormat } from "./time-formats";
|
|
1
|
+
import type { AppLocale } from "./types.js";
|
|
2
|
+
import type { AppTimeFormat } from "./time-formats.js";
|
|
3
3
|
export declare const APP_TIME_FORMAT_OPTIONS: {
|
|
4
4
|
value: "24h" | "12h";
|
|
5
5
|
}[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { APP_TIME_FORMATS } from "./time-formats";
|
|
2
|
-
import { translate } from "../i18n/translate";
|
|
1
|
+
import { APP_TIME_FORMATS } from "./time-formats.js";
|
|
2
|
+
import { translate } from "../i18n/translate.js";
|
|
3
3
|
const APP_TIME_FORMAT_OPTIONS = APP_TIME_FORMATS.map((value) => ({ value }));
|
|
4
4
|
function getTimeFormatLabel(timeFormat, locale, fallbackLocale = "en") {
|
|
5
5
|
return translate(locale, fallbackLocale, `timeFormat.${timeFormat}`);
|
package/dist/app/timezones.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppLocale } from "./types";
|
|
1
|
+
import type { AppLocale } from "./types.js";
|
|
2
2
|
/** Curated preset — pass to `<AppProvider timezoneOptions={APP_TIMEZONE_PRESET} />`. */
|
|
3
3
|
export declare const APP_TIMEZONE_PRESET: readonly ["UTC", "Asia/Ho_Chi_Minh", "Asia/Bangkok", "Asia/Singapore", "Asia/Jakarta", "Asia/Manila", "Asia/Kuala_Lumpur", "Asia/Yangon", "Asia/Phnom_Penh", "Asia/Vientiane", "Asia/Brunei", "Asia/Tokyo", "Asia/Seoul", "Asia/Shanghai", "Asia/Hong_Kong", "Asia/Taipei", "Asia/Ulaanbaatar", "Asia/Kolkata", "Asia/Karachi", "Asia/Dhaka", "Asia/Colombo", "Asia/Dubai", "Asia/Riyadh", "Asia/Qatar", "Asia/Tehran", "Asia/Jerusalem", "Europe/London", "Europe/Paris", "Europe/Berlin", "Europe/Amsterdam", "Europe/Rome", "Europe/Madrid", "Europe/Moscow", "Europe/Istanbul", "America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Toronto", "America/Vancouver", "America/Mexico_City", "America/Sao_Paulo", "America/Buenos_Aires", "Australia/Sydney", "Australia/Melbourne", "Australia/Perth", "Pacific/Auckland"];
|
|
4
4
|
export type AppTimezonePreset = (typeof APP_TIMEZONE_PRESET)[number];
|
package/dist/app/timezones.js
CHANGED
package/dist/app/types.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { AppTimeFormat } from "./time-formats";
|
|
2
|
-
import type { AppDateFormat } from "./date-formats";
|
|
1
|
+
import type { AppTimeFormat } from "./time-formats.js";
|
|
2
|
+
import type { AppDateFormat } from "./date-formats.js";
|
|
3
3
|
/** Supported UI locales — sent as `x-locale` to backend. */
|
|
4
4
|
export type AppLocale = "vi" | "en" | "ja";
|
|
5
5
|
/** IANA timezone identifier — sent as `x-timezone` to backend. */
|
|
6
6
|
export type AppTimezone = string;
|
|
7
7
|
/** How to resolve the initial timezone when nothing is stored. */
|
|
8
8
|
export type AppTimezoneDefault = "browser" | "system" | (AppTimezone & {});
|
|
9
|
-
export type { AppTimeFormat } from "./time-formats";
|
|
10
|
-
export type { AppDateFormat } from "./date-formats";
|
|
11
|
-
export { APP_TIME_FORMATS, APP_REQUEST_HEADER_TIME_FORMAT, getTimePattern, isAppTimeFormat, } from "./time-formats";
|
|
12
|
-
export { APP_DATE_FORMATS, APP_REQUEST_HEADER_DATE_FORMAT, getDatePattern, getDateTimePattern, isAppDateFormat, } from "./date-formats";
|
|
9
|
+
export type { AppTimeFormat } from "./time-formats.js";
|
|
10
|
+
export type { AppDateFormat } from "./date-formats.js";
|
|
11
|
+
export { APP_TIME_FORMATS, APP_REQUEST_HEADER_TIME_FORMAT, getTimePattern, isAppTimeFormat, } from "./time-formats.js";
|
|
12
|
+
export { APP_DATE_FORMATS, APP_REQUEST_HEADER_DATE_FORMAT, getDatePattern, getDateTimePattern, isAppDateFormat, } from "./date-formats.js";
|
|
13
13
|
export declare const APP_LOCALES: readonly ["vi", "en", "ja"];
|
|
14
14
|
export declare const APP_REQUEST_HEADER_LOCALE: "x-locale";
|
|
15
15
|
export declare const APP_REQUEST_HEADER_TIMEZONE: "x-timezone";
|
package/dist/app/types.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
APP_REQUEST_HEADER_TIME_FORMAT,
|
|
4
4
|
getTimePattern,
|
|
5
5
|
isAppTimeFormat
|
|
6
|
-
} from "./time-formats";
|
|
6
|
+
} from "./time-formats.js";
|
|
7
7
|
import {
|
|
8
8
|
APP_DATE_FORMATS,
|
|
9
9
|
APP_REQUEST_HEADER_DATE_FORMAT,
|
|
10
10
|
getDatePattern,
|
|
11
11
|
getDateTimePattern,
|
|
12
12
|
isAppDateFormat
|
|
13
|
-
} from "./date-formats";
|
|
13
|
+
} from "./date-formats.js";
|
|
14
14
|
const APP_LOCALES = ["vi", "en", "ja"];
|
|
15
15
|
const APP_REQUEST_HEADER_LOCALE = "x-locale";
|
|
16
16
|
const APP_REQUEST_HEADER_TIMEZONE = "x-timezone";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { formatDate, type FormatDateOptions } from "../lib/datetime";
|
|
1
|
+
import { formatDate, type FormatDateOptions } from "../lib/datetime/index.js";
|
|
2
2
|
/** Date/time formatters bound to the current AppProvider preferences. */
|
|
3
3
|
export declare function useFormatting(): {
|
|
4
|
-
locale: import("./types").AppLocale;
|
|
4
|
+
locale: import("./types.js").AppLocale;
|
|
5
5
|
timezone: string;
|
|
6
|
-
timeFormat: import("./time-formats").AppTimeFormat;
|
|
7
|
-
dateFormat: import("./date-formats").AppDateFormat;
|
|
6
|
+
timeFormat: import("./time-formats.js").AppTimeFormat;
|
|
7
|
+
dateFormat: import("./date-formats.js").AppDateFormat;
|
|
8
8
|
/** Primary formatter — auto-detect + AppProvider defaults. */
|
|
9
9
|
format: (value: Parameters<typeof formatDate>[0], options?: FormatDateOptions) => string;
|
|
10
10
|
formatDate: (value: Parameters<typeof formatDate>[0], options?: FormatDateOptions) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { formatDate } from "../lib/datetime";
|
|
4
|
-
import { useAppContext } from "./app-provider";
|
|
3
|
+
import { formatDate } from "../lib/datetime/index.js";
|
|
4
|
+
import { useAppContext } from "./app-provider.js";
|
|
5
5
|
function useFormatting() {
|
|
6
6
|
const { locale, timezone, timeFormat, dateFormat, dateFnsLocale } = useAppContext();
|
|
7
7
|
const defaults = useMemo(
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export type { BreadcrumbItemProp as BreadcrumbItem } from "../../props/vocabulary/navigation.prop";
|
|
2
|
-
export type { PageContainerProp, PageContainerProp as PageContainerProps, } from "../../props/components/layout.prop";
|
|
3
|
-
export { PageContainer } from "../layout/page-container";
|
|
4
|
-
export { Flex } from "../layout";
|
|
5
|
-
export type { FlexProp } from "../../props/components/layout.prop";
|
|
6
|
-
export { EmptyState } from "../data-display/empty-state";
|
|
7
|
-
export { Badge } from "../data-display/badge";
|
|
8
|
-
export { FormField } from "../data-entry/form-field";
|
|
9
|
-
export { Field } from "../data-entry/field";
|
|
10
|
-
export { Descriptions } from "../data-display/descriptions";
|
|
11
|
-
export { SkeletonRows, SkeletonTable, SkeletonDetail, SkeletonStat } from "../feedback/skeleton";
|
|
12
|
-
export { Alert, AlertTitle, AlertContent, AlertDescription, AlertActions, AlertQueryError, } from "../feedback/alert";
|
|
13
|
-
export { SearchInput } from "../data-entry/search-input";
|
|
14
|
-
export { Upload, collectUploadCommitActions, createUploadItem, useUploadDraft, } from "../data-entry/upload";
|
|
15
|
-
export { Cascader } from "../data-entry/cascader";
|
|
16
|
-
export { TreeSelect } from "../data-entry/tree-select";
|
|
17
|
-
export { Transfer } from "../data-entry/transfer";
|
|
18
|
-
export { Pagination, Steps, Tabs, TabsContent, TabsList, TabsTrigger } from "../navigation";
|
|
19
|
-
export { Toolbar, ToolbarGroup } from "../navigation/filter-bar";
|
|
20
|
-
export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, AlertDialog, } from "../feedback/dialog";
|
|
21
|
-
export { Toaster } from "../feedback/sonner";
|
|
22
|
-
export { toast } from "../feedback/use-toast";
|
|
23
|
-
export { useDebouncedValue, useTimeoutFlag } from "../../lib/hooks";
|
|
24
|
-
export { formatDate, formatBytes, formatCurrency, shortId, humanError } from "../../lib/format";
|
|
1
|
+
export type { BreadcrumbItemProp as BreadcrumbItem } from "../../props/vocabulary/navigation.prop.js";
|
|
2
|
+
export type { PageContainerProp, PageContainerProp as PageContainerProps, } from "../../props/components/layout.prop.js";
|
|
3
|
+
export { PageContainer } from "../layout/page-container.js";
|
|
4
|
+
export { Flex } from "../layout/index.js";
|
|
5
|
+
export type { FlexProp } from "../../props/components/layout.prop.js";
|
|
6
|
+
export { EmptyState } from "../data-display/empty-state.js";
|
|
7
|
+
export { Badge } from "../data-display/badge.js";
|
|
8
|
+
export { FormField } from "../data-entry/form-field.js";
|
|
9
|
+
export { Field } from "../data-entry/field.js";
|
|
10
|
+
export { Descriptions } from "../data-display/descriptions.js";
|
|
11
|
+
export { SkeletonRows, SkeletonTable, SkeletonDetail, SkeletonStat } from "../feedback/skeleton.js";
|
|
12
|
+
export { Alert, AlertTitle, AlertContent, AlertDescription, AlertActions, AlertQueryError, } from "../feedback/alert.js";
|
|
13
|
+
export { SearchInput } from "../data-entry/search-input.js";
|
|
14
|
+
export { Upload, collectUploadCommitActions, createUploadItem, useUploadDraft, } from "../data-entry/upload.js";
|
|
15
|
+
export { Cascader } from "../data-entry/cascader.js";
|
|
16
|
+
export { TreeSelect } from "../data-entry/tree-select.js";
|
|
17
|
+
export { Transfer } from "../data-entry/transfer.js";
|
|
18
|
+
export { Pagination, Steps, Tabs, TabsContent, TabsList, TabsTrigger } from "../navigation/index.js";
|
|
19
|
+
export { Toolbar, ToolbarGroup } from "../navigation/filter-bar.js";
|
|
20
|
+
export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, AlertDialog, } from "../feedback/dialog.js";
|
|
21
|
+
export { Toaster } from "../feedback/sonner.js";
|
|
22
|
+
export { toast } from "../feedback/use-toast.js";
|
|
23
|
+
export { useDebouncedValue, useTimeoutFlag } from "../../lib/hooks.js";
|
|
24
|
+
export { formatDate, formatBytes, formatCurrency, shortId, humanError } from "../../lib/format.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PageContainer } from "../layout/page-container";
|
|
2
|
-
import { Flex } from "../layout";
|
|
3
|
-
import { EmptyState } from "../data-display/empty-state";
|
|
4
|
-
import { Badge } from "../data-display/badge";
|
|
5
|
-
import { FormField } from "../data-entry/form-field";
|
|
6
|
-
import { Field } from "../data-entry/field";
|
|
7
|
-
import { Descriptions } from "../data-display/descriptions";
|
|
8
|
-
import { SkeletonRows, SkeletonTable, SkeletonDetail, SkeletonStat } from "../feedback/skeleton";
|
|
1
|
+
import { PageContainer } from "../layout/page-container.js";
|
|
2
|
+
import { Flex } from "../layout/index.js";
|
|
3
|
+
import { EmptyState } from "../data-display/empty-state.js";
|
|
4
|
+
import { Badge } from "../data-display/badge.js";
|
|
5
|
+
import { FormField } from "../data-entry/form-field.js";
|
|
6
|
+
import { Field } from "../data-entry/field.js";
|
|
7
|
+
import { Descriptions } from "../data-display/descriptions.js";
|
|
8
|
+
import { SkeletonRows, SkeletonTable, SkeletonDetail, SkeletonStat } from "../feedback/skeleton.js";
|
|
9
9
|
import {
|
|
10
10
|
Alert,
|
|
11
11
|
AlertTitle,
|
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
AlertDescription,
|
|
14
14
|
AlertActions,
|
|
15
15
|
AlertQueryError
|
|
16
|
-
} from "../feedback/alert";
|
|
17
|
-
import { SearchInput } from "../data-entry/search-input";
|
|
16
|
+
} from "../feedback/alert.js";
|
|
17
|
+
import { SearchInput } from "../data-entry/search-input.js";
|
|
18
18
|
import {
|
|
19
19
|
Upload,
|
|
20
20
|
collectUploadCommitActions,
|
|
21
21
|
createUploadItem,
|
|
22
22
|
useUploadDraft
|
|
23
|
-
} from "../data-entry/upload";
|
|
24
|
-
import { Cascader } from "../data-entry/cascader";
|
|
25
|
-
import { TreeSelect } from "../data-entry/tree-select";
|
|
26
|
-
import { Transfer } from "../data-entry/transfer";
|
|
27
|
-
import { Pagination, Steps, Tabs, TabsContent, TabsList, TabsTrigger } from "../navigation";
|
|
28
|
-
import { Toolbar, ToolbarGroup } from "../navigation/filter-bar";
|
|
23
|
+
} from "../data-entry/upload.js";
|
|
24
|
+
import { Cascader } from "../data-entry/cascader.js";
|
|
25
|
+
import { TreeSelect } from "../data-entry/tree-select.js";
|
|
26
|
+
import { Transfer } from "../data-entry/transfer.js";
|
|
27
|
+
import { Pagination, Steps, Tabs, TabsContent, TabsList, TabsTrigger } from "../navigation/index.js";
|
|
28
|
+
import { Toolbar, ToolbarGroup } from "../navigation/filter-bar.js";
|
|
29
29
|
import {
|
|
30
30
|
Dialog,
|
|
31
31
|
DialogTrigger,
|
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
DialogTitle,
|
|
36
36
|
DialogDescription,
|
|
37
37
|
AlertDialog
|
|
38
|
-
} from "../feedback/dialog";
|
|
39
|
-
import { Toaster } from "../feedback/sonner";
|
|
40
|
-
import { toast } from "../feedback/use-toast";
|
|
41
|
-
import { useDebouncedValue, useTimeoutFlag } from "../../lib/hooks";
|
|
42
|
-
import { formatDate, formatBytes, formatCurrency, shortId, humanError } from "../../lib/format";
|
|
38
|
+
} from "../feedback/dialog.js";
|
|
39
|
+
import { Toaster } from "../feedback/sonner.js";
|
|
40
|
+
import { toast } from "../feedback/use-toast.js";
|
|
41
|
+
import { useDebouncedValue, useTimeoutFlag } from "../../lib/hooks.js";
|
|
42
|
+
import { formatDate, formatBytes, formatCurrency, shortId, humanError } from "../../lib/format.js";
|
|
43
43
|
export {
|
|
44
44
|
Alert,
|
|
45
45
|
AlertActions,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AreaChartProp } from "../../props/components/charts.prop";
|
|
2
|
-
export type { AreaChartProp, AreaChartProp as AreaChartProps, } from "../../props/components/charts.prop";
|
|
1
|
+
import type { AreaChartProp } from "../../props/components/charts.prop.js";
|
|
2
|
+
export type { AreaChartProp, AreaChartProp as AreaChartProps, } from "../../props/components/charts.prop.js";
|
|
3
3
|
/**
|
|
4
4
|
* Area chart — magnitude over an ordered category axis. `stacked` accumulates
|
|
5
5
|
* series; `curved` smooths the line. Import from the tree-shaken
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { CartesianChart } from "./chart-cartesian";
|
|
3
|
+
import { CartesianChart } from "./chart-cartesian.js";
|
|
4
4
|
function AreaChart(props) {
|
|
5
5
|
return /* @__PURE__ */ jsx(CartesianChart, { kind: "area", ...props });
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BarChartProp } from "../../props/components/charts.prop";
|
|
2
|
-
export type { BarChartProp, BarChartProp as BarChartProps, } from "../../props/components/charts.prop";
|
|
1
|
+
import type { BarChartProp } from "../../props/components/charts.prop.js";
|
|
2
|
+
export type { BarChartProp, BarChartProp as BarChartProps, } from "../../props/components/charts.prop.js";
|
|
3
3
|
/**
|
|
4
4
|
* Bar chart — compare a value across categories. `stacked` stacks series into one
|
|
5
5
|
* bar; `horizontal` puts the category axis on the left. Import from the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { CartesianChart } from "./chart-cartesian";
|
|
3
|
+
import { CartesianChart } from "./chart-cartesian.js";
|
|
4
4
|
function BarChart(props) {
|
|
5
5
|
return /* @__PURE__ */ jsx(CartesianChart, { kind: "bar", ...props });
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type { ChartDatum, ChartSeriesProp } from "../../props/components/charts.prop";
|
|
2
|
+
import type { ChartDatum, ChartSeriesProp } from "../../props/components/charts.prop.js";
|
|
3
3
|
/**
|
|
4
4
|
* Shared cartesian renderer for Line / Bar / Area. Internal — the filename pascal
|
|
5
5
|
* (`ChartCartesian`) is intentionally NOT exported, so this is not a catalog entry.
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
XAxis,
|
|
16
16
|
YAxis
|
|
17
17
|
} from "recharts";
|
|
18
|
-
import { EmptyState } from "../data-display/empty-state";
|
|
19
|
-
import { useTranslation } from "../../i18n/use-translation";
|
|
18
|
+
import { EmptyState } from "../data-display/empty-state.js";
|
|
19
|
+
import { useTranslation } from "../../i18n/use-translation.js";
|
|
20
20
|
import {
|
|
21
21
|
ChartFrame,
|
|
22
22
|
chartColor,
|
|
23
23
|
chartHeight,
|
|
24
24
|
useChartNumberFormat
|
|
25
|
-
} from "./chart-frame";
|
|
26
|
-
import { buildCartesianSummary } from "./chart-summary";
|
|
25
|
+
} from "./chart-frame.js";
|
|
26
|
+
import { buildCartesianSummary } from "./chart-summary.js";
|
|
27
27
|
function CartesianChart({
|
|
28
28
|
kind,
|
|
29
29
|
data,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { useTranslation } from "../../i18n/use-translation";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { useTranslation } from "../../i18n/use-translation.js";
|
|
6
6
|
const CHART_COLORS = [
|
|
7
7
|
"var(--chart-1)",
|
|
8
8
|
"var(--chart-2)",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* alternative (WCAG 1.1.1). No JSX — filename pascal is intentionally NOT
|
|
4
4
|
* exported, so this is not a catalog primitive.
|
|
5
5
|
*/
|
|
6
|
-
import type { ChartDatum, ChartSeriesProp } from "../../props/components/charts.prop";
|
|
6
|
+
import type { ChartDatum, ChartSeriesProp } from "../../props/components/charts.prop.js";
|
|
7
7
|
type Formatter = Intl.NumberFormat;
|
|
8
8
|
export type ChartSummary = {
|
|
9
9
|
rows: string[];
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* (tree-shaking: `sideEffects: false` + a dedicated tsup entry + recharts as an
|
|
5
5
|
* optional peer dependency).
|
|
6
6
|
*/
|
|
7
|
-
export { LineChart } from "./line-chart";
|
|
8
|
-
export type { LineChartProp, LineChartProps } from "./line-chart";
|
|
9
|
-
export { BarChart } from "./bar-chart";
|
|
10
|
-
export type { BarChartProp, BarChartProps } from "./bar-chart";
|
|
11
|
-
export { AreaChart } from "./area-chart";
|
|
12
|
-
export type { AreaChartProp, AreaChartProps } from "./area-chart";
|
|
13
|
-
export { PieChart } from "./pie-chart";
|
|
14
|
-
export type { PieChartProp, PieChartProps } from "./pie-chart";
|
|
15
|
-
export type { ChartSeriesProp, ChartDatum } from "../../props/components/charts.prop";
|
|
16
|
-
export { CHART_COLORS } from "./chart-frame";
|
|
7
|
+
export { LineChart } from "./line-chart.js";
|
|
8
|
+
export type { LineChartProp, LineChartProps } from "./line-chart.js";
|
|
9
|
+
export { BarChart } from "./bar-chart.js";
|
|
10
|
+
export type { BarChartProp, BarChartProps } from "./bar-chart.js";
|
|
11
|
+
export { AreaChart } from "./area-chart.js";
|
|
12
|
+
export type { AreaChartProp, AreaChartProps } from "./area-chart.js";
|
|
13
|
+
export { PieChart } from "./pie-chart.js";
|
|
14
|
+
export type { PieChartProp, PieChartProps } from "./pie-chart.js";
|
|
15
|
+
export type { ChartSeriesProp, ChartDatum } from "../../props/components/charts.prop.js";
|
|
16
|
+
export { CHART_COLORS } from "./chart-frame.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LineChart } from "./line-chart";
|
|
2
|
-
import { BarChart } from "./bar-chart";
|
|
3
|
-
import { AreaChart } from "./area-chart";
|
|
4
|
-
import { PieChart } from "./pie-chart";
|
|
5
|
-
import { CHART_COLORS } from "./chart-frame";
|
|
1
|
+
import { LineChart } from "./line-chart.js";
|
|
2
|
+
import { BarChart } from "./bar-chart.js";
|
|
3
|
+
import { AreaChart } from "./area-chart.js";
|
|
4
|
+
import { PieChart } from "./pie-chart.js";
|
|
5
|
+
import { CHART_COLORS } from "./chart-frame.js";
|
|
6
6
|
export {
|
|
7
7
|
AreaChart,
|
|
8
8
|
BarChart,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LineChartProp } from "../../props/components/charts.prop";
|
|
2
|
-
export type { LineChartProp, LineChartProp as LineChartProps, } from "../../props/components/charts.prop";
|
|
1
|
+
import type { LineChartProp } from "../../props/components/charts.prop.js";
|
|
2
|
+
export type { LineChartProp, LineChartProp as LineChartProps, } from "../../props/components/charts.prop.js";
|
|
3
3
|
/**
|
|
4
4
|
* Line chart — trends over an ordered category axis (one or more series).
|
|
5
5
|
* Import from the tree-shaken `@godxjp/ui/charts` entry; requires the `recharts`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { CartesianChart } from "./chart-cartesian";
|
|
3
|
+
import { CartesianChart } from "./chart-cartesian.js";
|
|
4
4
|
function LineChart(props) {
|
|
5
5
|
return /* @__PURE__ */ jsx(CartesianChart, { kind: "line", ...props });
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PieChartProp } from "../../props/components/charts.prop";
|
|
2
|
-
export type { PieChartProp, PieChartProp as PieChartProps, } from "../../props/components/charts.prop";
|
|
1
|
+
import type { PieChartProp } from "../../props/components/charts.prop.js";
|
|
2
|
+
export type { PieChartProp, PieChartProp as PieChartProps, } from "../../props/components/charts.prop.js";
|
|
3
3
|
/**
|
|
4
4
|
* Pie / donut chart — part-to-whole composition across a small set of slices.
|
|
5
5
|
* Import from the tree-shaken `@godxjp/ui/charts` entry; requires the `recharts`
|