@object-ui/components 16.0.0 → 17.1.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/CHANGELOG.md +1476 -0
- package/README.md +28 -0
- package/dist/custom/filter-builder.d.ts +78 -0
- package/dist/custom/index.d.ts +1 -0
- package/dist/custom/resizable.d.ts +31 -0
- package/dist/custom/shimmer-skeleton.d.ts +1 -2
- package/dist/index.css +1519 -2802
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4492 -3556
- package/dist/index.umd.cjs +6 -6
- package/dist/lib/lazy-icon.d.ts +10 -0
- package/dist/notifications/NotificationAlerts.d.ts +42 -0
- package/dist/notifications/NotificationBanners.d.ts +36 -0
- package/dist/notifications/NotificationInline.d.ts +41 -0
- package/dist/notifications/NotificationSnackbar.d.ts +36 -0
- package/dist/notifications/index.d.ts +26 -0
- package/dist/notifications/severity.d.ts +47 -0
- package/dist/renderers/complex/data-table.d.ts +7 -0
- package/dist/renderers/feedback/toaster.d.ts +9 -1
- package/dist/renderers/form/option-value.d.ts +32 -0
- package/dist/renderers/layout/page.d.ts +2 -2
- package/dist/renderers/layout/react-page.d.ts +2 -2
- package/dist/renderers/placeholders.d.ts +21 -0
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/select.d.ts +22 -1
- package/package.json +47 -45
package/dist/lib/lazy-icon.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
/** Convert PascalCase / camelCase / mixed names to kebab-case for DynamicIcon. */
|
|
3
3
|
export declare function toKebabIconName(name: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Whether `name` (kebab-case or PascalCase) resolves to a real Lucide icon.
|
|
6
|
+
*
|
|
7
|
+
* Exported because `getLazyIcon` degrades an unknown name to the `Database`
|
|
8
|
+
* icon, which is the right default for a data-shaped schema slot but wrong
|
|
9
|
+
* where a caller has a BETTER fallback of its own — a notification, for
|
|
10
|
+
* instance, would rather show its severity icon than a stray database glyph.
|
|
11
|
+
* Ask first, then choose.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isLucideIconName(name?: string): boolean;
|
|
4
14
|
/**
|
|
5
15
|
* Resolve a Lucide icon by name (kebab-case or PascalCase).
|
|
6
16
|
* Returns a memoised React component that lazily loads the SVG on mount.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* `displayType: 'alert'` — a blocking acknowledgement.
|
|
10
|
+
*
|
|
11
|
+
* Why NOT the action system's `ModalHandler` (#3014, open question 2): that
|
|
12
|
+
* handler is `(schema, context) => Promise<ActionResult>` — it resolves a page
|
|
13
|
+
* or object, renders it as a modal, and reports the outcome back to the
|
|
14
|
+
* `ActionRunner`. A notification alert has no schema, no target and no action
|
|
15
|
+
* result; it is a message plus an acknowledgement. Routing it there would mean
|
|
16
|
+
* synthesizing a page just to say "OK" and requiring an action runtime to
|
|
17
|
+
* present a notification. So `alert` renders through the Radix `AlertDialog`
|
|
18
|
+
* primitive — the blocking-acknowledgement primitive — which duplicates none of
|
|
19
|
+
* the action-modal machinery.
|
|
20
|
+
*/
|
|
21
|
+
import * as React from 'react';
|
|
22
|
+
export interface NotificationAlertsProps {
|
|
23
|
+
/** Extra classes for the dialog content. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Label of the acknowledge button. Default `OK`. */
|
|
26
|
+
acknowledgeLabel?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renders `alert` notifications one at a time as a blocking dialog.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <NotificationProvider>
|
|
34
|
+
* <App />
|
|
35
|
+
* <NotificationAlerts />
|
|
36
|
+
* </NotificationProvider>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function NotificationAlerts({ className, acknowledgeLabel }: NotificationAlertsProps): React.JSX.Element | null;
|
|
40
|
+
export declare namespace NotificationAlerts {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* `displayType: 'banner'` — a persistent, page-width strip.
|
|
10
|
+
*
|
|
11
|
+
* Unlike the overlay surfaces, a banner is IN FLOW: it takes vertical space and
|
|
12
|
+
* pushes the content down, which is what makes it read as a standing condition
|
|
13
|
+
* ("you are viewing a draft", "the connection dropped") rather than as an event
|
|
14
|
+
* that just happened. Placement is therefore the host's: mount this at the top
|
|
15
|
+
* of the content area, inside the `NotificationProvider`.
|
|
16
|
+
*/
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
export interface NotificationBannersProps {
|
|
19
|
+
/** Extra classes for the banner stack container. */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders every active `banner` notification as a stacked strip.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <main>
|
|
28
|
+
* <NotificationBanners />
|
|
29
|
+
* <Outlet />
|
|
30
|
+
* </main>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function NotificationBanners({ className }: NotificationBannersProps): React.JSX.Element | null;
|
|
34
|
+
export declare namespace NotificationBanners {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* `displayType: 'inline'` — rendered in place by the surface that raised it.
|
|
10
|
+
*
|
|
11
|
+
* The whole point of `inline` is proximity: a validation summary belongs above
|
|
12
|
+
* the form that failed, not in a corner of the viewport. So this component
|
|
13
|
+
* floats nothing and positions nothing — it renders where you put it, and a
|
|
14
|
+
* `scope` matches it to its raiser so two forms on one page don't show each
|
|
15
|
+
* other's messages.
|
|
16
|
+
*/
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
export interface NotificationInlineProps {
|
|
19
|
+
/**
|
|
20
|
+
* Routing key — renders only notifications raised with the same `scope`.
|
|
21
|
+
* Omit on both ends for the page-level inline outlet.
|
|
22
|
+
*/
|
|
23
|
+
scope?: string;
|
|
24
|
+
/** Extra classes for the stack container. */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Renders the `inline` notifications raised for `scope`, in place.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // in the form that raises them
|
|
33
|
+
* notify({ title: 'Fix 2 fields', severity: 'error', displayType: 'inline', scope: 'contact-form' });
|
|
34
|
+
*
|
|
35
|
+
* <NotificationInline scope="contact-form" className="mb-4" />
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function NotificationInline({ scope, className }: NotificationInlineProps): React.JSX.Element | null;
|
|
39
|
+
export declare namespace NotificationInline {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* `displayType: 'snackbar'` — a bottom-anchored transient with ONE action.
|
|
10
|
+
*
|
|
11
|
+
* Deliberately not a sonner variant. A snackbar is singular (a new one replaces
|
|
12
|
+
* the current, it does not stack), bottom-anchored regardless of the toast
|
|
13
|
+
* position config, and carries at most one action — "Undo" being the archetype.
|
|
14
|
+
* Routing it through the toast stack is exactly the collapse #3014 is about: it
|
|
15
|
+
* would look like a toast, so the spec's fifth member would mean nothing.
|
|
16
|
+
*/
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
export interface NotificationSnackbarProps {
|
|
19
|
+
/** Extra classes for the snackbar container. */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renders the most recent `snackbar` notification, bottom-anchored by default.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <NotificationProvider>
|
|
28
|
+
* <App />
|
|
29
|
+
* <NotificationSnackbar />
|
|
30
|
+
* </NotificationProvider>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function NotificationSnackbar({ className }: NotificationSnackbarProps): React.JSX.Element | null;
|
|
34
|
+
export declare namespace NotificationSnackbar {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Notification surfaces — one per spec `NotificationTypeSchema` member.
|
|
10
|
+
*
|
|
11
|
+
* | `displayType` | Surface | Placement |
|
|
12
|
+
* |---|---|---|
|
|
13
|
+
* | `toast` | the host's `onToast` delegate (sonner in the console) | overlay, host-owned |
|
|
14
|
+
* | `snackbar` | {@link NotificationSnackbar} | bottom-anchored, one at a time |
|
|
15
|
+
* | `banner` | {@link NotificationBanners} | in flow, top of the content area |
|
|
16
|
+
* | `alert` | {@link NotificationAlerts} | blocking dialog, FIFO queue |
|
|
17
|
+
* | `inline` | {@link NotificationInline} | in place, at the raising surface |
|
|
18
|
+
*
|
|
19
|
+
* Every one of these used to be handed to `onToast` regardless of type, so all
|
|
20
|
+
* five looked identical (#3014).
|
|
21
|
+
*/
|
|
22
|
+
export { NotificationBanners, type NotificationBannersProps } from './NotificationBanners';
|
|
23
|
+
export { NotificationSnackbar, type NotificationSnackbarProps } from './NotificationSnackbar';
|
|
24
|
+
export { NotificationAlerts, type NotificationAlertsProps } from './NotificationAlerts';
|
|
25
|
+
export { NotificationInline, type NotificationInlineProps } from './NotificationInline';
|
|
26
|
+
export { NOTIFICATION_ACTION_BUTTON_VARIANTS, NOTIFICATION_POSITION_CLASSES, NOTIFICATION_SEVERITY_STYLES, notificationActionVariant, notificationIcon, notificationSeverityStyle, type NotificationSeverityStyle, } from './severity';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { NotificationActionVariant, NotificationItem, NotificationPositionValue, NotificationSeverityLevel } from '@object-ui/react';
|
|
4
|
+
export interface NotificationSeverityStyle {
|
|
5
|
+
/** Leading icon. */
|
|
6
|
+
Icon: LucideIcon;
|
|
7
|
+
/** Border + surface + text tone for the in-flow surfaces (banner, inline). */
|
|
8
|
+
tone: string;
|
|
9
|
+
/** Icon tint for surfaces that bring their own chrome (snackbar, alert). */
|
|
10
|
+
iconTone: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Typed as `Record<NotificationSeverityLevel, …>` so a new severity in the spec
|
|
14
|
+
* `NotificationSeveritySchema` fails type-check here until it has a tone.
|
|
15
|
+
*/
|
|
16
|
+
export declare const NOTIFICATION_SEVERITY_STYLES: Record<NotificationSeverityLevel, NotificationSeverityStyle>;
|
|
17
|
+
/** Resolve a severity's presentation, defaulting to the spec default (`info`). */
|
|
18
|
+
export declare function notificationSeverityStyle(severity?: NotificationSeverityLevel): NotificationSeverityStyle;
|
|
19
|
+
/**
|
|
20
|
+
* The icon a notification renders: the spec `icon` override when it names a
|
|
21
|
+
* real Lucide icon, otherwise the severity default.
|
|
22
|
+
*
|
|
23
|
+
* The name check is the point. `getLazyIcon` degrades an unknown name to the
|
|
24
|
+
* `Database` glyph — sensible for a data-shaped schema slot, but on an error
|
|
25
|
+
* notification it would replace a meaningful icon with a meaningless one. Here
|
|
26
|
+
* the severity icon is always the better fallback, so a typo costs the author
|
|
27
|
+
* their override and nothing more.
|
|
28
|
+
*/
|
|
29
|
+
export declare function notificationIcon(notification: Pick<NotificationItem, 'severity' | 'icon'>): ElementType;
|
|
30
|
+
/**
|
|
31
|
+
* Spec `NotificationActionSchema.variant` → the shadcn Button variant that
|
|
32
|
+
* renders it. Typed as `Record<NotificationActionVariant, …>`, so a new member
|
|
33
|
+
* in the spec enum fails type-check here instead of falling back to `default`.
|
|
34
|
+
*
|
|
35
|
+
* The two vocabularies are NOT the same list, which is exactly why the mapping
|
|
36
|
+
* is explicit: the spec describes an action's ROLE (primary / secondary / link)
|
|
37
|
+
* and Button describes its LOOK.
|
|
38
|
+
*/
|
|
39
|
+
export declare const NOTIFICATION_ACTION_BUTTON_VARIANTS: Record<NotificationActionVariant, 'default' | 'secondary' | 'link'>;
|
|
40
|
+
/** Resolve an action's Button variant, defaulting to the spec's `primary`. */
|
|
41
|
+
export declare function notificationActionVariant(variant?: NotificationActionVariant): 'default' | 'secondary' | 'link';
|
|
42
|
+
/**
|
|
43
|
+
* Spec `NotificationPositionSchema` → the fixed-position classes a floating
|
|
44
|
+
* surface pins itself with. `undefined` (nothing declared) is the caller's cue
|
|
45
|
+
* to keep its own anchor, so there is no entry for it here.
|
|
46
|
+
*/
|
|
47
|
+
export declare const NOTIFICATION_POSITION_CLASSES: Record<NotificationPositionValue, string>;
|
|
@@ -60,4 +60,11 @@ export declare const DataTableBuiltinRowActionItem: React.FC<{
|
|
|
60
60
|
className?: string;
|
|
61
61
|
onSelect: (row: any) => void;
|
|
62
62
|
}>;
|
|
63
|
+
/**
|
|
64
|
+
* The selection modes this table implements — the renderer half of the spec's
|
|
65
|
+
* `SelectionConfigSchema.type` vocabulary (`ui/view.zod.ts`). Kept as an
|
|
66
|
+
* explicit export so a parity test can fail the moment either side moves
|
|
67
|
+
* (#2941; template: plugin-grid `summary-spec-parity.test.ts`).
|
|
68
|
+
*/
|
|
69
|
+
export declare const SUPPORTED_SELECTION_MODES: ReadonlySet<string>;
|
|
63
70
|
export {};
|
|
@@ -5,4 +5,12 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Spec `NotificationPositionSchema` (`ui/notification.zod.ts`, underscore
|
|
10
|
+
* spellings) → sonner's hyphenated position ids. The hyphen spellings are
|
|
11
|
+
* `ToasterSchema`'s own dialect and map through as identities, so both
|
|
12
|
+
* registers work. Before #2942 the renderer mounted `<SonnerToaster />` bare
|
|
13
|
+
* (`inputs: []`) and every authored position — all six spec values — plus
|
|
14
|
+
* `limit` validated and changed nothing. Exported for the spec-parity test.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TOASTER_POSITIONS: Record<string, 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ObjectUI
|
|
3
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Option-value round-trip helpers (#3090).
|
|
10
|
+
*
|
|
11
|
+
* The standalone form vocabulary has always ACCEPTED numeric/boolean option
|
|
12
|
+
* values (`SelectOptionSchema.value` is `string | number | boolean`), but the
|
|
13
|
+
* Radix controls underneath speak strings only: `onValueChange` hands back a
|
|
14
|
+
* string no matter what the author wrote, so picking `{ value: 2 }` silently
|
|
15
|
+
* submitted `"2"` — a type morph the server sees as a wrong-typed write, and
|
|
16
|
+
* one nothing on the client ever reported. These helpers make the authored
|
|
17
|
+
* type survive the control: values are stringified on the way INTO the
|
|
18
|
+
* control and matched back to the authored option on the way OUT.
|
|
19
|
+
*/
|
|
20
|
+
export type OptionValue = string | number | boolean;
|
|
21
|
+
/** Stringify a value for a string-speaking control, preserving null/undefined
|
|
22
|
+
* (an absent value must stay absent, not become `"undefined"`). */
|
|
23
|
+
export declare function toControlValue(value: OptionValue | null | undefined): string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Map a control's string back to the authored option value, so a
|
|
26
|
+
* numeric/boolean option round-trips with its type intact. Falls back to the
|
|
27
|
+
* raw string when nothing matches (free-text or a stale value) — the
|
|
28
|
+
* pre-#3090 behavior, so unmatched paths change nothing.
|
|
29
|
+
*/
|
|
30
|
+
export declare function matchOptionValue(options: ReadonlyArray<{
|
|
31
|
+
value: OptionValue;
|
|
32
|
+
}> | undefined, raw: string): OptionValue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PageNodeSchema } from '@object-ui/types';
|
|
3
3
|
export declare const PageRenderer: React.FC<{
|
|
4
|
-
schema:
|
|
4
|
+
schema: PageNodeSchema;
|
|
5
5
|
className?: string;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}>;
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Scope injected into the source:
|
|
21
21
|
* - `React` — so authors can call hooks.
|
|
22
|
-
* - the PUBLIC data blocks — `<
|
|
22
|
+
* - the PUBLIC data blocks — `<ObjectGrid>`, `<ObjectForm>`, charts, metrics…
|
|
23
23
|
* each as a prop-driven wrapper that renders via SchemaRenderer. Layout is
|
|
24
24
|
* left to plain HTML + Tailwind (React's strength); only the data blocks
|
|
25
25
|
* that can't be expressed in HTML are injected.
|
|
26
|
-
* - `Block` — escape hatch: `<Block type="object-
|
|
26
|
+
* - `Block` — escape hatch: `<Block type="object-grid" .../>`.
|
|
27
27
|
* - `useAdapter` — live data hook: query/create/update objects.
|
|
28
28
|
* - `data` / `variables` — page data + local variables, for convenience.
|
|
29
29
|
*/
|
|
@@ -1,3 +1,24 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export declare const PlaceholderRenderer: ({ schema, className }: any) => React.JSX.Element;
|
|
3
|
+
/**
|
|
4
|
+
* Page blocks the Studio palette OFFERS but no package renders yet.
|
|
5
|
+
*
|
|
6
|
+
* These are registered eagerly (see the side-effect call below, reached through
|
|
7
|
+
* the `./renderers` barrel) rather than waiting for a host to opt in via
|
|
8
|
+
* {@link registerPlaceholders} — which only `apps/console` does. A block Studio
|
|
9
|
+
* advertises must not render a red "Unknown component type" panel in every
|
|
10
|
+
* other host just because that host didn't call an optional bootstrap (#2943).
|
|
11
|
+
*
|
|
12
|
+
* Deliberately NARROW: the rest of {@link PROTOCOL_COMPONENTS} stays opt-in so
|
|
13
|
+
* a genuinely missing renderer keeps failing loudly, which is what makes the
|
|
14
|
+
* misconfiguration get fixed at the source (the same reasoning that keeps
|
|
15
|
+
* `ai:chat_window` out of this file entirely — and, since #2943, out of the
|
|
16
|
+
* palette too).
|
|
17
|
+
*/
|
|
18
|
+
export declare const PALETTE_PLACEHOLDER_BLOCKS: string[];
|
|
19
|
+
/**
|
|
20
|
+
* Register placeholders for the whole protocol vocabulary. Opt-in: hosts that
|
|
21
|
+
* want every declared component to render *something* (the console's preview
|
|
22
|
+
* gallery) call this; others keep the loud unknown-type error.
|
|
23
|
+
*/
|
|
3
24
|
export declare function registerPlaceholders(): void;
|
package/dist/ui/form.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { ControllerProps, FieldPath, FieldValues } from 'react-hook-form';
|
|
|
8
8
|
*/
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
11
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: import('react-hook-form').FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
11
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: import('react-hook-form').FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
12
12
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
13
13
|
declare const useFormField: () => {
|
|
14
14
|
invalid: boolean;
|
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/select.d.ts
CHANGED
|
@@ -7,7 +7,28 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Radix mirrors a Select's value into a hidden native `<select>` so the value
|
|
12
|
+
* takes part in native form submission. Whenever the controlled `value` changes
|
|
13
|
+
* to one that mirror carries no `<option>` for, assigning it is a no-op — the
|
|
14
|
+
* element stays on `''` — and Radix still dispatches the synthetic `change`,
|
|
15
|
+
* which comes straight back out as `onValueChange('')`.
|
|
16
|
+
*
|
|
17
|
+
* That window is real, not theoretical: `SelectContent` mounts its items (and
|
|
18
|
+
* therefore registers the native options) a commit AFTER the trigger, so a
|
|
19
|
+
* value arriving while a form is still hydrating — an edit form whose record
|
|
20
|
+
* lands after first paint — is echoed back as an empty string and silently
|
|
21
|
+
* overwrites the field. When the wiped field is the one a `visibleWhen`
|
|
22
|
+
* predicate reads, the form latches in the broken state (#2968).
|
|
23
|
+
*
|
|
24
|
+
* `SelectItem` rejects `value=""` outright, so `''` can never be a value the
|
|
25
|
+
* user actually picked — it is always the mirror talking. Drop it. Clearing a
|
|
26
|
+
* select is done by writing `undefined`, which is untouched.
|
|
27
|
+
*/
|
|
28
|
+
declare const Select: {
|
|
29
|
+
({ onValueChange, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
30
|
+
displayName: string | undefined;
|
|
31
|
+
};
|
|
11
32
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
33
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
13
34
|
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Standard UI component library for Object UI, built with Shadcn UI + Tailwind CSS",
|
|
@@ -26,55 +26,55 @@
|
|
|
26
26
|
"./style.css": "./dist/index.css"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@radix-ui/react-accordion": "^1.2.
|
|
30
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
31
|
-
"@radix-ui/react-aspect-ratio": "^1.1.
|
|
32
|
-
"@radix-ui/react-avatar": "^1.2.
|
|
33
|
-
"@radix-ui/react-checkbox": "^1.3.
|
|
34
|
-
"@radix-ui/react-collapsible": "^1.1.
|
|
35
|
-
"@radix-ui/react-context-menu": "^2.3.
|
|
36
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
37
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
38
|
-
"@radix-ui/react-hover-card": "^1.1.
|
|
39
|
-
"@radix-ui/react-label": "^2.1.
|
|
40
|
-
"@radix-ui/react-menubar": "^1.1.
|
|
41
|
-
"@radix-ui/react-navigation-menu": "^1.2.
|
|
42
|
-
"@radix-ui/react-popover": "^1.1.
|
|
43
|
-
"@radix-ui/react-progress": "^1.1.
|
|
44
|
-
"@radix-ui/react-radio-group": "^1.4.
|
|
45
|
-
"@radix-ui/react-scroll-area": "^1.2.
|
|
46
|
-
"@radix-ui/react-select": "^2.3.
|
|
47
|
-
"@radix-ui/react-separator": "^1.1.
|
|
48
|
-
"@radix-ui/react-slider": "^1.4.
|
|
49
|
-
"@radix-ui/react-slot": "^1.3.
|
|
50
|
-
"@radix-ui/react-switch": "^1.3.
|
|
51
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
52
|
-
"@radix-ui/react-toast": "^1.2.
|
|
53
|
-
"@radix-ui/react-toggle": "^1.1.
|
|
54
|
-
"@radix-ui/react-toggle-group": "^1.1.
|
|
55
|
-
"@radix-ui/react-tooltip": "^1.2.
|
|
29
|
+
"@radix-ui/react-accordion": "^1.2.20",
|
|
30
|
+
"@radix-ui/react-alert-dialog": "^1.1.23",
|
|
31
|
+
"@radix-ui/react-aspect-ratio": "^1.1.15",
|
|
32
|
+
"@radix-ui/react-avatar": "^1.2.6",
|
|
33
|
+
"@radix-ui/react-checkbox": "^1.3.11",
|
|
34
|
+
"@radix-ui/react-collapsible": "^1.1.20",
|
|
35
|
+
"@radix-ui/react-context-menu": "^2.3.7",
|
|
36
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
37
|
+
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
38
|
+
"@radix-ui/react-hover-card": "^1.1.23",
|
|
39
|
+
"@radix-ui/react-label": "^2.1.15",
|
|
40
|
+
"@radix-ui/react-menubar": "^1.1.24",
|
|
41
|
+
"@radix-ui/react-navigation-menu": "^1.2.22",
|
|
42
|
+
"@radix-ui/react-popover": "^1.1.23",
|
|
43
|
+
"@radix-ui/react-progress": "^1.1.16",
|
|
44
|
+
"@radix-ui/react-radio-group": "^1.4.7",
|
|
45
|
+
"@radix-ui/react-scroll-area": "^1.2.18",
|
|
46
|
+
"@radix-ui/react-select": "^2.3.7",
|
|
47
|
+
"@radix-ui/react-separator": "^1.1.15",
|
|
48
|
+
"@radix-ui/react-slider": "^1.4.7",
|
|
49
|
+
"@radix-ui/react-slot": "^1.3.3",
|
|
50
|
+
"@radix-ui/react-switch": "^1.3.7",
|
|
51
|
+
"@radix-ui/react-tabs": "^1.1.21",
|
|
52
|
+
"@radix-ui/react-toast": "^1.2.23",
|
|
53
|
+
"@radix-ui/react-toggle": "^1.1.18",
|
|
54
|
+
"@radix-ui/react-toggle-group": "^1.1.19",
|
|
55
|
+
"@radix-ui/react-tooltip": "^1.2.16",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
57
|
"clsx": "^2.1.1",
|
|
58
58
|
"cmdk": "^1.1.1",
|
|
59
59
|
"date-fns": "^4.4.0",
|
|
60
60
|
"embla-carousel-react": "^8.6.0",
|
|
61
61
|
"input-otp": "^1.4.2",
|
|
62
|
-
"lucide-react": "^1.
|
|
62
|
+
"lucide-react": "^1.25.0",
|
|
63
63
|
"next-themes": "^0.4.6",
|
|
64
64
|
"react-day-picker": "^10.0.1",
|
|
65
|
-
"react-hook-form": "^7.
|
|
65
|
+
"react-hook-form": "^7.83.0",
|
|
66
66
|
"react-resizable-panels": "^4.12.2",
|
|
67
|
-
"recharts": "3.
|
|
67
|
+
"recharts": "3.10.1",
|
|
68
68
|
"sonner": "^2.0.7",
|
|
69
69
|
"tailwind-merge": "^3.6.0",
|
|
70
70
|
"tailwindcss-animate": "^1.0.7",
|
|
71
71
|
"vaul": "^1.1.2",
|
|
72
|
-
"@object-ui/core": "
|
|
73
|
-
"@object-ui/i18n": "
|
|
74
|
-
"@object-ui/react": "
|
|
75
|
-
"@object-ui/react-runtime": "
|
|
76
|
-
"@object-ui/sdui-parser": "
|
|
77
|
-
"@object-ui/types": "
|
|
72
|
+
"@object-ui/core": "17.1.0",
|
|
73
|
+
"@object-ui/i18n": "17.1.0",
|
|
74
|
+
"@object-ui/react": "17.1.0",
|
|
75
|
+
"@object-ui/react-runtime": "17.1.0",
|
|
76
|
+
"@object-ui/sdui-parser": "17.1.0",
|
|
77
|
+
"@object-ui/types": "17.1.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -82,17 +82,19 @@
|
|
|
82
82
|
"tailwindcss": "^4.2.1"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@
|
|
85
|
+
"@objectstack/spec": "^17.0.0-rc.0",
|
|
86
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
86
87
|
"@types/react": "19.2.17",
|
|
87
88
|
"@types/react-dom": "19.2.3",
|
|
88
|
-
"@vitejs/plugin-react": "^6.0.
|
|
89
|
-
"autoprefixer": "^10.5.
|
|
90
|
-
"postcss": "^8.5.
|
|
91
|
-
"shadcn": "^4.
|
|
92
|
-
"tailwindcss": "^4.3.
|
|
89
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
90
|
+
"autoprefixer": "^10.5.4",
|
|
91
|
+
"postcss": "^8.5.23",
|
|
92
|
+
"shadcn": "^4.15.0",
|
|
93
|
+
"tailwindcss": "^4.3.3",
|
|
93
94
|
"typescript": "^6.0.3",
|
|
94
|
-
"vite": "^8.1.
|
|
95
|
-
"vite-plugin-dts": "^5.0.3"
|
|
95
|
+
"vite": "^8.1.5",
|
|
96
|
+
"vite-plugin-dts": "^5.0.3",
|
|
97
|
+
"zod": "^4.4.3"
|
|
96
98
|
},
|
|
97
99
|
"keywords": [
|
|
98
100
|
"objectui",
|