@middag-io/react 0.24.0 → 0.26.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 +51 -34
- package/dist-lib/DateField-CnBqDoOP.js +121 -0
- package/dist-lib/DateRangeField-CvU7wiyr.js +663 -0
- package/dist-lib/DocumentField-BdDPT_cS.js +221 -0
- package/dist-lib/FormPanelBlock-a0RYI9JU.js +1735 -0
- package/dist-lib/FormSection-IuHIca9i.js +8083 -0
- package/dist-lib/HugeiconsIcon-CKqc2W1S.js +1321 -0
- package/dist-lib/{MarkdownContent-DhffsdY-.js → MarkdownContent-CzAAkxSB.js} +1553 -4815
- package/dist-lib/MarkdownContent-DV0vjKyO.js +2 -0
- package/dist-lib/PhoneField-CM4I1J_y.js +18584 -0
- package/dist-lib/app/LazyBlock.d.ts +19 -11
- package/dist-lib/app/LazyBlock.d.ts.map +1 -1
- package/dist-lib/app/providers/i18n-defaults.d.ts.map +1 -1
- package/dist-lib/app/providers/inertia-error-reporter.d.ts +26 -0
- package/dist-lib/app/providers/inertia-error-reporter.d.ts.map +1 -0
- package/dist-lib/app/providers/locales/pt-BR.d.ts.map +1 -1
- package/dist-lib/app/register-defaults.d.ts +6 -6
- package/dist-lib/app/register-defaults.d.ts.map +1 -1
- package/dist-lib/base/blocks/ActivityTimelineBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
- package/dist-lib/base/blocks/FormPanelBlock.d.ts +20 -0
- package/dist-lib/base/blocks/FormPanelBlock.d.ts.map +1 -0
- package/dist-lib/base/blocks/FormPanelBlock.lazy.d.ts +13 -0
- package/dist-lib/base/blocks/FormPanelBlock.lazy.d.ts.map +1 -0
- package/dist-lib/base/form/FormField.d.ts.map +1 -1
- package/dist-lib/base/form/fields/NativeSelectField.d.ts +23 -0
- package/dist-lib/base/form/fields/NativeSelectField.d.ts.map +1 -0
- package/dist-lib/base/form/fields/OtpField.d.ts +22 -0
- package/dist-lib/base/form/fields/OtpField.d.ts.map +1 -0
- package/dist-lib/base/form/fields/SliderField.d.ts +24 -0
- package/dist-lib/base/form/fields/SliderField.d.ts.map +1 -0
- package/dist-lib/base/form/fields/register-default-fields.d.ts.map +1 -1
- package/dist-lib/base/form/form-schema-builder.d.ts +27 -0
- package/dist-lib/base/form/form-schema-builder.d.ts.map +1 -0
- package/dist-lib/base/hooks/useLazyTabs.d.ts +6 -0
- package/dist-lib/base/hooks/useLazyTabs.d.ts.map +1 -1
- package/dist-lib/base/hooks/usePolling.d.ts +15 -6
- package/dist-lib/base/hooks/usePolling.d.ts.map +1 -1
- package/dist-lib/base/hooks/useRemember.d.ts +31 -0
- package/dist-lib/base/hooks/useRemember.d.ts.map +1 -0
- package/dist-lib/base/partials/ActionBar/index.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/cell-registry.d.ts +2 -0
- package/dist-lib/base/partials/DataTable/cell-registry.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/cell-renderers.d.ts +2 -1
- package/dist-lib/base/partials/DataTable/cell-renderers.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts +1 -1
- package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/register-default-cells.d.ts.map +1 -1
- package/dist-lib/base/partials/DataTable/types.d.ts +12 -2
- package/dist-lib/base/partials/DataTable/types.d.ts.map +1 -1
- package/dist-lib/base/partials/EntityItem/index.d.ts +48 -0
- package/dist-lib/base/partials/EntityItem/index.d.ts.map +1 -0
- package/dist-lib/base/partials/MenuBar/index.d.ts +35 -0
- package/dist-lib/base/partials/MenuBar/index.d.ts.map +1 -0
- package/dist-lib/base/partials/QuickRecordSheet/index.d.ts +24 -0
- package/dist-lib/base/partials/QuickRecordSheet/index.d.ts.map +1 -0
- package/dist-lib/base/partials/ResizableSidebar/index.d.ts +27 -0
- package/dist-lib/base/partials/ResizableSidebar/index.d.ts.map +1 -0
- package/dist-lib/base/partials/TableOfContents/index.d.ts +30 -0
- package/dist-lib/base/partials/TableOfContents/index.d.ts.map +1 -0
- package/dist-lib/base/partials/TimelineList/index.d.ts.map +1 -1
- package/dist-lib/base/partials/ToggleGroupControl/index.d.ts +43 -0
- package/dist-lib/base/partials/ToggleGroupControl/index.d.ts.map +1 -0
- package/dist-lib/base/partials/TreeView/index.d.ts +30 -0
- package/dist-lib/base/partials/TreeView/index.d.ts.map +1 -0
- package/dist-lib/base/partials/index.d.ts +7 -0
- package/dist-lib/base/partials/index.d.ts.map +1 -1
- package/dist-lib/base/shell/BasicShell.d.ts +4 -4
- package/dist-lib/base/shell/BasicShell.d.ts.map +1 -1
- package/dist-lib/base/shell/ImmersiveShell.d.ts.map +1 -1
- package/dist-lib/base/shell/partials/PageActionButton.d.ts.map +1 -1
- package/dist-lib/base/utils/time.d.ts +25 -13
- package/dist-lib/base/utils/time.d.ts.map +1 -1
- package/dist-lib/button-Ba1PcsOx.js +357 -0
- package/dist-lib/calendar-DnlbmjNu.js +4502 -0
- package/dist-lib/chevron-right-Casn6MFU.js +7 -0
- package/dist-lib/combobox-BbYGWCFO.js +5480 -0
- package/dist-lib/contracts/block-data/actions.d.ts +6 -6
- package/dist-lib/contracts/block-data/actions.d.ts.map +1 -1
- package/dist-lib/contracts/block-data/data-display.d.ts +16 -1
- package/dist-lib/contracts/block-data/data-display.d.ts.map +1 -1
- package/dist-lib/contracts/block-data/form.d.ts +62 -3
- package/dist-lib/contracts/block-data/form.d.ts.map +1 -1
- package/dist-lib/contracts/block-data/interactive.d.ts +2 -2
- package/dist-lib/contracts/generated/contract-schema.d.ts +1 -1
- package/dist-lib/contracts/generated/contract-types.d.ts +4 -2
- package/dist-lib/contracts/generated/contract-types.d.ts.map +1 -1
- package/dist-lib/contracts/generated/index.d.ts +1 -1
- package/dist-lib/contracts/page-contract-schema.d.ts +2 -2
- package/dist-lib/contracts/page-contract.d.ts +3 -3
- package/dist-lib/dist-7c0PXlrb.js +1195 -0
- package/dist-lib/dist-B-MyAb3x.js +54 -0
- package/dist-lib/dist-CmB86BdM.js +15 -0
- package/dist-lib/dist-DuO9WodV.js +234 -0
- package/dist-lib/document-validation-YgxIqb8k.js +1249 -0
- package/dist-lib/floating-ui.react-dom-BnOzLaz1.js +1089 -0
- package/dist-lib/i18n-BIwPEg5O.js +339 -0
- package/dist-lib/index.d.ts +4 -1
- package/dist-lib/index.d.ts.map +1 -1
- package/dist-lib/input-CdUVNe54.js +14 -0
- package/dist-lib/middag-react.css +1 -1
- package/dist-lib/middag-react.js +10974 -23457
- package/dist-lib/popover-Bxsp1hlN.js +241 -0
- package/dist-lib/scroll-area-B9TZ05bl.js +556 -0
- package/dist-lib/skeleton-HpnbVVji.js +12 -0
- package/dist-lib/use-mobile-Kp3Dy8mh.js +204 -0
- package/dist-lib/utils-Yj2czlvU.js +1713 -0
- package/package.json +1 -1
- /package/dist-lib/{dist-CK9PErDU.js → dist-axU0pUop.js} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MenuBar — data-driven wrapper over the ReUI Menubar primitive.
|
|
3
|
+
*
|
|
4
|
+
* Renders a horizontal application menu bar from a `menus` contract: each menu
|
|
5
|
+
* has a trigger label and a list of entries (action items or separators). Kept
|
|
6
|
+
* product-agnostic — entries carry an `onSelect` callback and optional shortcut
|
|
7
|
+
* text; the caller wires behavior. Labels are expected already-translated.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactElement } from "react";
|
|
10
|
+
export interface MenuBarActionEntry {
|
|
11
|
+
type?: "item";
|
|
12
|
+
/** Visible, already-translated label. */
|
|
13
|
+
label: string;
|
|
14
|
+
/** Optional shortcut hint shown right-aligned (e.g. "⌘S"). */
|
|
15
|
+
shortcut?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
onSelect?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface MenuBarSeparatorEntry {
|
|
20
|
+
type: "separator";
|
|
21
|
+
}
|
|
22
|
+
export type MenuBarEntry = MenuBarActionEntry | MenuBarSeparatorEntry;
|
|
23
|
+
export interface MenuBarMenuSpec {
|
|
24
|
+
/** Trigger label, already-translated. */
|
|
25
|
+
label: string;
|
|
26
|
+
entries: MenuBarEntry[];
|
|
27
|
+
}
|
|
28
|
+
export interface MenuBarProps {
|
|
29
|
+
menus: MenuBarMenuSpec[];
|
|
30
|
+
/** Accessible label for the menu bar. Defaults to a translated built-in. */
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function MenuBar({ menus, ariaLabel, className }: MenuBarProps): ReactElement;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/MenuBar/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAa1C,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,YAAY,GAAG,YAAY,CA4BnF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QuickRecordSheet — slide-over panel for quick record create/edit.
|
|
3
|
+
*
|
|
4
|
+
* Community partial built on the ReUI Sheet (Radix Dialog) primitive. Controlled
|
|
5
|
+
* via `open`/`onOpenChange`; the caller supplies the form body (children) and the
|
|
6
|
+
* action footer. Holds no data and fetches nothing.
|
|
7
|
+
*/
|
|
8
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
9
|
+
export interface QuickRecordSheetProps {
|
|
10
|
+
open: boolean;
|
|
11
|
+
onOpenChange: (open: boolean) => void;
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
/** Form body. */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** Action footer (e.g. save / cancel buttons). */
|
|
17
|
+
footer?: ReactNode;
|
|
18
|
+
/** Which edge the sheet slides in from. Default "right". */
|
|
19
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
20
|
+
/** Optional trigger element rendered inline (uses asChild). */
|
|
21
|
+
trigger?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function QuickRecordSheet({ open, onOpenChange, title, description, children, footer, side, trigger, }: QuickRecordSheetProps): ReactElement;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/QuickRecordSheet/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAY1D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,kDAAkD;IAClD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,+DAA+D;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,IAAc,EACd,OAAO,GACR,EAAE,qBAAqB,GAAG,YAAY,CActC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ResizableSidebar — a content area with a user-resizable aside panel.
|
|
3
|
+
*
|
|
4
|
+
* Community shell primitive built on the ReUI Resizable (react-resizable-panels)
|
|
5
|
+
* primitive. Holds no data and fetches nothing — the caller supplies both the
|
|
6
|
+
* main content and the aside content.
|
|
7
|
+
*
|
|
8
|
+
* The richer data-driven InlineInspector composition lives in @middag-io/react-pro.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
11
|
+
export interface ResizableSidebarProps {
|
|
12
|
+
/** Primary content. */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** Aside (secondary) content. */
|
|
15
|
+
aside: ReactNode;
|
|
16
|
+
/** Which side the aside sits on. Default "right". */
|
|
17
|
+
asideSide?: "left" | "right";
|
|
18
|
+
/** Initial aside width as a percentage of the group. Default 30. */
|
|
19
|
+
defaultAsideSize?: number;
|
|
20
|
+
/** Minimum aside width percentage. Default 15. */
|
|
21
|
+
minAsideSize?: number;
|
|
22
|
+
/** Maximum aside width percentage. Default 50. */
|
|
23
|
+
maxAsideSize?: number;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function ResizableSidebar({ children, aside, asideSide, defaultAsideSize, minAsideSize, maxAsideSize, className, }: ResizableSidebarProps): ReactElement;
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/ResizableSidebar/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1D,MAAM,WAAW,qBAAqB;IACpC,uBAAuB;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,iCAAiC;IACjC,KAAK,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,KAAK,EACL,SAAmB,EACnB,gBAAqB,EACrB,YAAiB,EACjB,YAAiB,EACjB,SAAS,GACV,EAAE,qBAAqB,GAAG,YAAY,CA8BtC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TableOfContents — anchor navigation for long content (DetailPanel, Markdown).
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper over the ReUI Scrollspy primitive: renders a nav of anchor links
|
|
5
|
+
* that highlight the section currently in view and scroll-to on click. The caller
|
|
6
|
+
* supplies the heading list (already translated) and a ref to the scroll container
|
|
7
|
+
* whose sections carry matching `id` attributes.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactElement, type RefObject } from "react";
|
|
10
|
+
export interface TableOfContentsItem {
|
|
11
|
+
/** Anchor id — must match the `id` of the target section element. */
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
/** Heading level for indentation (2 = top-level, 3/4 = nested). Default 2. */
|
|
15
|
+
level?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface TableOfContentsProps {
|
|
18
|
+
items: TableOfContentsItem[];
|
|
19
|
+
/** Ref to the scrollable container holding the sections. Omit to track the document. */
|
|
20
|
+
targetRef?: RefObject<HTMLElement | null>;
|
|
21
|
+
/** Pixel offset applied when detecting/scrolling to a section. */
|
|
22
|
+
offset?: number;
|
|
23
|
+
/** Sync the active section to the URL hash. Default true. */
|
|
24
|
+
history?: boolean;
|
|
25
|
+
/** Accessible label for the nav. Defaults to a translated built-in. */
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function TableOfContents({ items, targetRef, offset, history, ariaLabel, className, }: TableOfContentsProps): ReactElement;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/TableOfContents/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM1D,MAAM,WAAW,mBAAmB;IAClC,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,wFAAwF;IACxF,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,SAAS,EACT,MAAU,EACV,OAAc,EACd,SAAS,EACT,SAAS,GACV,EAAE,oBAAoB,GAAG,YAAY,CA4BrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/TimelineList/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAkBpD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/TimelineList/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAkBpD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AA+JD,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAS,EACT,OAAO,EACP,aAAa,EACb,UAAU,GACX,EAAE,iBAAiB,GAAG,YAAY,CA0DlC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToggleGroupControl — data-driven wrapper over the ReUI ToggleGroup primitive.
|
|
3
|
+
*
|
|
4
|
+
* A minimal, controlled segmented control for single- or multiple-selection.
|
|
5
|
+
* The caller supplies an `options` array (values + already-translated labels)
|
|
6
|
+
* and drives selection via `value`/`onValueChange` (controlled) or
|
|
7
|
+
* `defaultValue` (uncontrolled). Kept product-agnostic: no entity coupling, no
|
|
8
|
+
* data fetching — just selection. DataTable keeps its own DensityToggle.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactElement } from "react";
|
|
11
|
+
export interface ToggleGroupOption {
|
|
12
|
+
/** Submitted value; must be unique within the group. */
|
|
13
|
+
value: string;
|
|
14
|
+
/** Visible, already-translated label. */
|
|
15
|
+
label: string;
|
|
16
|
+
/** Accessible label when the visible label is an icon/glyph. Defaults to `label`. */
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface ToggleGroupBaseProps {
|
|
21
|
+
options: ToggleGroupOption[];
|
|
22
|
+
variant?: "default" | "outline";
|
|
23
|
+
size?: "default" | "sm" | "lg";
|
|
24
|
+
/** Accessible label for the group. Defaults to a translated built-in. */
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
interface ToggleGroupSingleProps extends ToggleGroupBaseProps {
|
|
29
|
+
type?: "single";
|
|
30
|
+
value?: string;
|
|
31
|
+
defaultValue?: string;
|
|
32
|
+
onValueChange?: (value: string) => void;
|
|
33
|
+
}
|
|
34
|
+
interface ToggleGroupMultipleProps extends ToggleGroupBaseProps {
|
|
35
|
+
type: "multiple";
|
|
36
|
+
value?: string[];
|
|
37
|
+
defaultValue?: string[];
|
|
38
|
+
onValueChange?: (value: string[]) => void;
|
|
39
|
+
}
|
|
40
|
+
export type ToggleGroupControlProps = ToggleGroupSingleProps | ToggleGroupMultipleProps;
|
|
41
|
+
export declare function ToggleGroupControl(props: ToggleGroupControlProps): ReactElement;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/ToggleGroupControl/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,oBAAoB;IAC5B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,sBAAuB,SAAQ,oBAAoB;IAC3D,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,UAAU,wBAAyB,SAAQ,oBAAoB;IAC7D,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,GAAG,wBAAwB,CAAC;AAExF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,YAAY,CAiD/E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TreeView — data-driven wrapper over the ReUI Tree primitive (@headless-tree).
|
|
3
|
+
*
|
|
4
|
+
* The caller supplies a flat `items` record (id → { label, children }) and a
|
|
5
|
+
* `rootItemId`; the partial builds the headless-tree instance and renders the
|
|
6
|
+
* expand/collapse + keyboard-navigable tree. Kept product-agnostic: no entity
|
|
7
|
+
* coupling, no fetching. Labels are expected already-translated.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactElement } from "react";
|
|
10
|
+
export interface TreeViewNode {
|
|
11
|
+
/** Visible, already-translated label. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Child node ids; presence marks the node as a folder. */
|
|
14
|
+
children?: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface TreeViewProps {
|
|
17
|
+
/** Flat map of node id → node. */
|
|
18
|
+
items: Record<string, TreeViewNode>;
|
|
19
|
+
/** Id of the root node (its children are the top-level rows). */
|
|
20
|
+
rootItemId: string;
|
|
21
|
+
/** Node ids expanded on first render. */
|
|
22
|
+
expandedItems?: string[];
|
|
23
|
+
/** Indentation step in px per depth level. Default 20. */
|
|
24
|
+
indent?: number;
|
|
25
|
+
/** Accessible label for the tree. Defaults to a translated built-in. */
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function TreeView({ items, rootItemId, expandedItems, indent, ariaLabel, className, }: TreeViewProps): ReactElement;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/TreeView/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACpC,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,UAAU,EACV,aAAa,EACb,MAAW,EACX,SAAS,EACT,SAAS,GACV,EAAE,aAAa,GAAG,YAAY,CA8B9B"}
|
|
@@ -5,13 +5,20 @@ export * from "./DataTable/types";
|
|
|
5
5
|
export * from "./DataTable/cell-renderers";
|
|
6
6
|
export * from "./DetailSection";
|
|
7
7
|
export * from "./EmptyPlaceholder";
|
|
8
|
+
export * from "./EntityItem";
|
|
8
9
|
export * from "./FilterBar";
|
|
9
10
|
export * from "./FormSection";
|
|
10
11
|
export * from "./LogViewer";
|
|
11
12
|
export * from "./MarkdownContent";
|
|
13
|
+
export * from "./MenuBar";
|
|
14
|
+
export * from "./QuickRecordSheet";
|
|
15
|
+
export * from "./ResizableSidebar";
|
|
12
16
|
export * from "./StatRow";
|
|
13
17
|
export * from "./StatusBar";
|
|
14
18
|
export * from "./StatusIndicator";
|
|
15
19
|
export * from "./StepIndicator";
|
|
20
|
+
export * from "./TableOfContents";
|
|
16
21
|
export * from "./TimelineList";
|
|
22
|
+
export * from "./ToggleGroupControl";
|
|
23
|
+
export * from "./TreeView";
|
|
17
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/partials/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/partials/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* BasicShell —
|
|
2
|
+
* BasicShell — Community app shell with a simple sidebar + header.
|
|
3
3
|
*
|
|
4
|
-
* The
|
|
4
|
+
* The Community counterpart to the Pro ProductShell: a persistent sidebar
|
|
5
5
|
* with flat navigation (no drilldown, quick-find, or command palette) plus a
|
|
6
6
|
* header with title + breadcrumbs and a light/dark toggle. Built entirely from
|
|
7
|
-
* the
|
|
7
|
+
* the ReUI sidebar primitives, so any Community consumer gets a usable
|
|
8
8
|
* dashboard frame without @middag-io/react-pro.
|
|
9
9
|
*
|
|
10
10
|
* Reads navigation from shared props (NavigationTreePayload, rendered flat —
|
|
11
11
|
* top-level groups with one level of children) and page meta from the contract.
|
|
12
|
-
* For rich navigation (drilldown, search, chrome panels), use the
|
|
12
|
+
* For rich navigation (drilldown, search, chrome panels), use the Pro
|
|
13
13
|
* ProductShell via @middag-io/react-pro's registerProDefaults().
|
|
14
14
|
*/
|
|
15
15
|
import { type ReactElement } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicShell.d.ts","sourceRoot":"","sources":["../../../src/base/shell/BasicShell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA8CnD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"BasicShell.d.ts","sourceRoot":"","sources":["../../../src/base/shell/BasicShell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA8CnD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,YAAY,CAoHjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImmersiveShell.d.ts","sourceRoot":"","sources":["../../../src/base/shell/ImmersiveShell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMnD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"ImmersiveShell.d.ts","sourceRoot":"","sources":["../../../src/base/shell/ImmersiveShell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMnD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,GAAG,YAAY,CA+DrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageActionButton.d.ts","sourceRoot":"","sources":["../../../../src/base/shell/partials/PageActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAOjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAa5D,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"PageActionButton.d.ts","sourceRoot":"","sources":["../../../../src/base/shell/partials/PageActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAOjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAa5D,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GAAG,YAAY,CAgJjF"}
|
|
@@ -1,28 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Time formatting utilities — relative and absolute timestamps.
|
|
2
|
+
* Time formatting utilities — locale-aware relative and absolute timestamps.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* -
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
4
|
+
* Locale-aware via Intl.RelativeTimeFormat / Intl.DateTimeFormat. Callers pass
|
|
5
|
+
* the active locale (from I18nProvider's `useTranslation().locale`); it defaults
|
|
6
|
+
* to "en" so non-React utilities and tests stay deterministic.
|
|
7
|
+
*
|
|
8
|
+
* formatRelativeTime() keeps the hybrid scale used by timeline/timestamp
|
|
9
|
+
* displays:
|
|
10
|
+
* - < 1 min: "now" / "agora"
|
|
11
|
+
* - < 1h: "N minutes ago" / "há N minutos"
|
|
12
|
+
* - < 24h: time of day (locale short time)
|
|
13
|
+
* - yesterday: "yesterday, <time>"
|
|
14
|
+
* - < 30 days: "<day month>, <time>"
|
|
15
|
+
* - >= 30 days: "<day month year>"
|
|
11
16
|
*
|
|
12
17
|
* @see NV-05-ux-blocks.md §6 (timeline timestamps)
|
|
13
18
|
*/
|
|
19
|
+
import type { TimestampFormat } from "../../contracts/block-data";
|
|
14
20
|
/**
|
|
15
|
-
* Format a Unix timestamp (seconds) as relative/absolute text.
|
|
21
|
+
* Format a Unix timestamp (seconds) as relative/absolute text on the hybrid scale.
|
|
16
22
|
*/
|
|
17
|
-
export declare function formatRelativeTime(timestamp: number): string;
|
|
23
|
+
export declare function formatRelativeTime(timestamp: number, locale?: string): string;
|
|
18
24
|
/**
|
|
19
25
|
* Return ISO 8601 string from a Unix timestamp (seconds).
|
|
20
|
-
* Used as tooltip/title for <time datetime>.
|
|
26
|
+
* Used as tooltip/title for <time datetime>. Locale-independent.
|
|
21
27
|
*/
|
|
22
28
|
export declare function formatISO(timestamp: number): string;
|
|
29
|
+
/**
|
|
30
|
+
* Format a Unix timestamp (seconds) using one of the supported display formats.
|
|
31
|
+
* "relative" delegates to formatRelativeTime; the others are absolute and
|
|
32
|
+
* locale-aware (or ISO for "iso").
|
|
33
|
+
*/
|
|
34
|
+
export declare function formatTimestamp(timestamp: number, format?: TimestampFormat, locale?: string): string;
|
|
23
35
|
/**
|
|
24
36
|
* Return a date group label for timeline grouping.
|
|
25
|
-
* "
|
|
37
|
+
* "today" / "yesterday" (localized) or "<day month year>".
|
|
26
38
|
*/
|
|
27
|
-
export declare function formatDateGroupLabel(timestamp: number): string;
|
|
39
|
+
export declare function formatDateGroupLabel(timestamp: number, locale?: string): string;
|
|
28
40
|
//# sourceMappingURL=time.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/base/utils/time.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/base/utils/time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAuC9D;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE,MAAuB,GAAG,MAAM,CAkB7F;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,MAAM,GAAE,eAA4B,EACpC,MAAM,GAAE,MAAuB,GAC9B,MAAM,CAkBR;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE,MAAuB,GAAG,MAAM,CAe/F"}
|