@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/README.md
CHANGED
|
@@ -150,6 +150,34 @@ function MyComponent() {
|
|
|
150
150
|
- `link` - Link component
|
|
151
151
|
- `breadcrumb` - Breadcrumb navigation
|
|
152
152
|
|
|
153
|
+
## Notification Surfaces
|
|
154
|
+
|
|
155
|
+
Direct-import React components (not schema blocks) that render the notifications
|
|
156
|
+
raised through `NotificationProvider` from `@object-ui/react`. One per spec
|
|
157
|
+
`displayType`, so a `banner` no longer presents as a toast:
|
|
158
|
+
|
|
159
|
+
| Component | `displayType` | Where to mount it |
|
|
160
|
+
| --- | --- | --- |
|
|
161
|
+
| `<NotificationSnackbar />` | `snackbar` | anywhere inside the provider — it anchors itself bottom-center |
|
|
162
|
+
| `<NotificationBanners />` | `banner` | top of the content area (it takes space in the flow) |
|
|
163
|
+
| `<NotificationAlerts />` | `alert` | anywhere inside the provider — blocking dialog, FIFO queue |
|
|
164
|
+
| `<NotificationInline scope="…" />` | `inline` | in the surface that raises them |
|
|
165
|
+
|
|
166
|
+
`toast` stays with the host's `onToast` delegate (sonner in the console). All of
|
|
167
|
+
them draw the notification's `severity` icon unless it declares an `icon`
|
|
168
|
+
override naming a real Lucide icon. See the
|
|
169
|
+
[notifications guide](https://objectui.org/docs/guide/notifications).
|
|
170
|
+
|
|
171
|
+
```tsx
|
|
172
|
+
import { NotificationBanners, NotificationAlerts } from '@object-ui/components';
|
|
173
|
+
|
|
174
|
+
<main>
|
|
175
|
+
<NotificationBanners />
|
|
176
|
+
<Outlet />
|
|
177
|
+
<NotificationAlerts />
|
|
178
|
+
</main>
|
|
179
|
+
```
|
|
180
|
+
|
|
153
181
|
## Customization
|
|
154
182
|
|
|
155
183
|
### Override Styles
|
|
@@ -38,6 +38,84 @@ export interface FilterBuilderProps {
|
|
|
38
38
|
className?: string;
|
|
39
39
|
showClearAll?: boolean;
|
|
40
40
|
}
|
|
41
|
+
declare const defaultOperators: readonly [{
|
|
42
|
+
readonly value: "equals";
|
|
43
|
+
readonly label: "Equals";
|
|
44
|
+
}, {
|
|
45
|
+
readonly value: "notEquals";
|
|
46
|
+
readonly label: "Does not equal";
|
|
47
|
+
}, {
|
|
48
|
+
readonly value: "contains";
|
|
49
|
+
readonly label: "Contains";
|
|
50
|
+
}, {
|
|
51
|
+
readonly value: "notContains";
|
|
52
|
+
readonly label: "Does not contain";
|
|
53
|
+
}, {
|
|
54
|
+
readonly value: "isEmpty";
|
|
55
|
+
readonly label: "Is empty";
|
|
56
|
+
}, {
|
|
57
|
+
readonly value: "isNotEmpty";
|
|
58
|
+
readonly label: "Is not empty";
|
|
59
|
+
}, {
|
|
60
|
+
readonly value: "greaterThan";
|
|
61
|
+
readonly label: "Greater than";
|
|
62
|
+
}, {
|
|
63
|
+
readonly value: "lessThan";
|
|
64
|
+
readonly label: "Less than";
|
|
65
|
+
}, {
|
|
66
|
+
readonly value: "greaterOrEqual";
|
|
67
|
+
readonly label: "Greater than or equal";
|
|
68
|
+
}, {
|
|
69
|
+
readonly value: "lessOrEqual";
|
|
70
|
+
readonly label: "Less than or equal";
|
|
71
|
+
}, {
|
|
72
|
+
readonly value: "before";
|
|
73
|
+
readonly label: "Before";
|
|
74
|
+
}, {
|
|
75
|
+
readonly value: "after";
|
|
76
|
+
readonly label: "After";
|
|
77
|
+
}, {
|
|
78
|
+
readonly value: "between";
|
|
79
|
+
readonly label: "Between";
|
|
80
|
+
}, {
|
|
81
|
+
readonly value: "in";
|
|
82
|
+
readonly label: "In";
|
|
83
|
+
}, {
|
|
84
|
+
readonly value: "notIn";
|
|
85
|
+
readonly label: "Not in";
|
|
86
|
+
}, {
|
|
87
|
+
readonly value: "startsWith";
|
|
88
|
+
readonly label: "Starts with";
|
|
89
|
+
}, {
|
|
90
|
+
readonly value: "endsWith";
|
|
91
|
+
readonly label: "Ends with";
|
|
92
|
+
}, {
|
|
93
|
+
readonly value: "isNull";
|
|
94
|
+
readonly label: "Is null";
|
|
95
|
+
}, {
|
|
96
|
+
readonly value: "isNotNull";
|
|
97
|
+
readonly label: "Is not null";
|
|
98
|
+
}, {
|
|
99
|
+
readonly value: "exists";
|
|
100
|
+
readonly label: "Is set";
|
|
101
|
+
}, {
|
|
102
|
+
readonly value: "notExists";
|
|
103
|
+
readonly label: "Is not set";
|
|
104
|
+
}];
|
|
105
|
+
/**
|
|
106
|
+
* The FilterBuilder's own operator vocabulary — every id its dropdown can
|
|
107
|
+
* hold, derived from the operators it actually renders.
|
|
108
|
+
*
|
|
109
|
+
* Exported because several translation tables map an external vocabulary
|
|
110
|
+
* (the spec's `VIEW_FILTER_OPERATORS`, Mongo `$`-tokens) *onto* this one, and
|
|
111
|
+
* a value that is not in this list produces a condition row whose operator
|
|
112
|
+
* select has nothing to select. Those tables assert against this export
|
|
113
|
+
* rather than restating it, so adding an operator here is the only edit
|
|
114
|
+
* needed to widen them.
|
|
115
|
+
*/
|
|
116
|
+
export declare const FILTER_BUILDER_OPERATORS: ("endsWith" | "startsWith" | "in" | "after" | "equals" | "notEquals" | "contains" | "notContains" | "isEmpty" | "isNotEmpty" | "greaterThan" | "lessThan" | "greaterOrEqual" | "lessOrEqual" | "before" | "between" | "notIn" | "isNull" | "isNotNull" | "exists" | "notExists")[];
|
|
117
|
+
/** An operator id the FilterBuilder can render. */
|
|
118
|
+
export type FilterBuilderOperator = (typeof defaultOperators)[number]['value'];
|
|
41
119
|
declare function FilterBuilder({ fields, value, onChange, className, showClearAll, }: FilterBuilderProps): React.JSX.Element;
|
|
42
120
|
declare namespace FilterBuilder {
|
|
43
121
|
var displayName: string;
|
package/dist/custom/index.d.ts
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '../ui/resizable';
|
|
2
|
+
/**
|
|
3
|
+
* ObjectUI
|
|
4
|
+
* Copyright (c) 2024-present ObjectStack Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The public `Resizable*` export site.
|
|
11
|
+
*
|
|
12
|
+
* This module used to wrap `ResizableHandle` to re-key its stacked-group styles
|
|
13
|
+
* from the dead `data-[panel-group-direction=vertical]` onto the
|
|
14
|
+
* `aria-orientation` attribute react-resizable-panels v4 actually emits (#3024).
|
|
15
|
+
* That fix now lives in `../ui/resizable` itself, so there is nothing left to
|
|
16
|
+
* wrap and all three components pass straight through.
|
|
17
|
+
*
|
|
18
|
+
* Editing `ui/` is normally off-limits (AGENTS.md #7), but that file is no
|
|
19
|
+
* longer upstream-synced: it is hand-migrated to v4 and listed under
|
|
20
|
+
* `customComponents` in `shadcn-components.json`, because upstream still ships
|
|
21
|
+
* the v3 file and re-syncing would break the build. See its header.
|
|
22
|
+
*
|
|
23
|
+
* This module stays as the single public export site rather than folding into
|
|
24
|
+
* `ui/index.ts`: `src/index.ts` star-exports `./ui` and `./custom` side by side,
|
|
25
|
+
* so exporting `Resizable*` from both would collide (TS2308).
|
|
26
|
+
*/
|
|
27
|
+
import type * as React from 'react';
|
|
28
|
+
/** Kept on the public surface (it is exported from the package root) even though
|
|
29
|
+
* the wrapper it was introduced for is gone. */
|
|
30
|
+
export type ResizableHandleProps = React.ComponentProps<typeof ResizableHandle>;
|
|
31
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -27,6 +27,5 @@ import * as React from "react";
|
|
|
27
27
|
* @example
|
|
28
28
|
* <ShimmerSkeleton className="h-4 w-32 rounded-md" />
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
31
|
-
}
|
|
30
|
+
export type ShimmerSkeletonProps = React.HTMLAttributes<HTMLDivElement>;
|
|
32
31
|
export declare function ShimmerSkeleton({ className, ...props }: ShimmerSkeletonProps): React.JSX.Element;
|