@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/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;
@@ -12,6 +12,7 @@ export * from './item';
12
12
  export * from './kbd';
13
13
  export * from './native-select';
14
14
  export * from './navigation-overlay';
15
+ export * from './resizable';
15
16
  export * from './section-header';
16
17
  export * from './spinner';
17
18
  export * from './sort-builder';
@@ -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 interface ShimmerSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
31
- }
30
+ export type ShimmerSkeletonProps = React.HTMLAttributes<HTMLDivElement>;
32
31
  export declare function ShimmerSkeleton({ className, ...props }: ShimmerSkeletonProps): React.JSX.Element;