@l3mpire/ui 3.0.0 → 3.3.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/USAGE.md CHANGED
@@ -210,12 +210,18 @@ import { faStarOutline } from "@l3mpire/icons";
210
210
  <Badge variant="solid" type="primary">New</Badge>
211
211
  <Badge variant="light" type="success" size="sm">Active</Badge>
212
212
  <Badge variant="outlined" type="critical" icon={faStarOutline}>99</Badge>
213
+
214
+ // Categorical tone — combines with variant (solid/light/outlined), overrides type
215
+ <Badge tone="indigo">SaaS</Badge>
216
+ <Badge variant="light" tone="amber">Manufacturing</Badge>
217
+ <Badge variant="outlined" tone="emerald">Finance</Badge>
213
218
  ```
214
219
 
215
220
  | Prop | Values |
216
221
  |---|---|
217
222
  | `variant` | `"solid"`, `"light"`, `"outlined"` |
218
223
  | `type` | `"primary"`, `"success"`, `"critical"`, `"warning"`, `"neutral"` |
224
+ | `tone` | `"indigo"`, `"rose"`, `"lime"`, `"violet"`, `"cyan"`, `"orange"`, `"emerald"`, `"fuchsia"`, `"amber"`, `"slate"` — categorical palette; combines with `variant`, overrides `type` |
219
225
  | `size` | `"sm"`, `"md"`, `"lg"` |
220
226
  | `icon` | `IconDefinition` (optional) |
221
227
 
@@ -231,11 +237,15 @@ import { faPaperPlaneOutline } from "@l3mpire/icons";
231
237
  <Tag variant="neutral" icon={faPaperPlaneOutline} onClose={() => {}}>
232
238
  Campaign
233
239
  </Tag>
240
+
241
+ // Categorical tone — overrides variant
242
+ <Tag tone="emerald">Finance</Tag>
234
243
  ```
235
244
 
236
245
  | Prop | Values |
237
246
  |---|---|
238
247
  | `variant` | `"brand"`, `"neutral"` |
248
+ | `tone` | `"indigo"`, `"rose"`, `"lime"`, `"violet"`, `"cyan"`, `"orange"`, `"emerald"`, `"fuchsia"`, `"amber"`, `"slate"` — categorical palette; overrides `variant` |
239
249
  | `size` | `"sm"`, `"md"` |
240
250
  | `icon` | `IconDefinition` |
241
251
  | `onClose` | `() => void` (shows remove button when provided) |
@@ -894,6 +904,8 @@ import { faRocketOutline } from "@l3mpire/icons";
894
904
 
895
905
  Active tabs render with concave bottom corners that fuse into the bar divider (real browser-tab look). Inactive tabs get a hover fill + soft shadow on the inner pill (active tabs keep their bg on hover).
896
906
 
907
+ The close `×` only appears **on hover** of a non-pinned tab, as an absolutely-positioned overlay with a gradient fade — it never takes layout space (the label slides under the gradient instead of being pushed). Set `pinned` to hide the close button entirely and show a **"Pinned tab"** tooltip on hover.
908
+
897
909
  | Prop (BrowserTab) | Values |
898
910
  |---|---|
899
911
  | `onAddTab` | `() => void` (shows + button) |
@@ -907,7 +919,8 @@ Active tabs render with concave bottom corners that fuse into the bar divider (r
907
919
  | `icon` | `IconDefinition` |
908
920
  | `badge` | `string` |
909
921
  | `isActive` | `boolean` |
910
- | `onClose` | `(e) => void` |
922
+ | `pinned` | `boolean` (no close button, "Pinned tab" tooltip on hover) |
923
+ | `onClose` | `(e) => void` (close `×` appears on hover only; ignored when `pinned`) |
911
924
  | `onRename` | `(newLabel: string) => void` (enables dbl-click rename) |
912
925
 
913
926
  ---
@@ -1085,7 +1098,15 @@ import {
1085
1098
  filterState={filterState}
1086
1099
  onFilterStateChange={setFilterState}
1087
1100
  sortFields={SORT_FIELDS}
1088
- actions={<SaveViewButton />}
1101
+ // Row 1 (always): page-level actions
1102
+ actions={<Button appearance="solid" intent="brand">Start tasks</Button>}
1103
+ // Row 2 (while editing filters): view-related actions
1104
+ filterActions={
1105
+ <>
1106
+ <Button appearance="ghost" intent="brand">Discard changes</Button>
1107
+ <SaveViewButton />
1108
+ </>
1109
+ }
1089
1110
  >
1090
1111
  <SearchBar size="sm" className="w-[200px]" />
1091
1112
  </FilterSystem>
@@ -1118,7 +1139,7 @@ import {
1118
1139
  | `AdvancedRow` | Single condition row (property + operator + type-aware value popover + actions) |
1119
1140
  | `AdvancedGroup` | Nested group container with shared connector and inline property selector |
1120
1141
  | `FilterNodeActions` | Kebab menu shared by rows and groups (Duplicate / Turn into group↔filter / Delete) |
1121
- | `SaveViewButton` | Split button (Save view + dropdown chevron) |
1142
+ | `SaveViewButton` | Outlined split button (Save view + dropdown chevron for Save for me / everyone). Goes in the Row 2 `filterActions` slot. |
1122
1143
  | `SummaryChip` | Minimal mode: "Filters (N)" with interactive popover |
1123
1144
 
1124
1145
  **Responsive:** FilterSystem auto-detects container width via `ResizeObserver`:
@@ -1126,7 +1147,7 @@ import {
1126
1147
  - **Minimal** (≤breakpoint): SummaryChip "Filters (N)" with interactive popover, icon-only Sort/Filter buttons
1127
1148
  - The breakpoint is configurable via the `breakpoint` prop on `FilterSystem` (default: `600`).
1128
1149
 
1129
- **Built-in Clear:** appears inline after the last filter chip ("Clear" text in default, × icon in minimal). Separate from "Discard changes" which goes in `actions` (right side) to revert a saved view.
1150
+ **Built-in Clear:** appears inline after the last filter chip ("Clear" text in default, × icon in minimal). Separate from "Discard changes", which goes in the Row 2 `filterActions` slot (far right, next to `SaveViewButton`) to revert a saved view's unsaved edits. Page-level actions (Create / Import / Start tasks) belong in the Row 1 `actions` slot and stay visible at all times — `SaveViewButton` should **not** be placed there.
1130
1151
 
1131
1152
  **And/Or toggle:** each row in the advanced popover has an independent And/Or toggle button. The choice is **persisted on each `FilterCondition` as `logicOperator: "and" | "or"`** (defaults to `"and"` when undefined), so it survives remounts and can be serialized.
1132
1153
 
package/dist/index.d.mts CHANGED
@@ -26,6 +26,12 @@ interface BrowserTabItemProps extends React.HTMLAttributes<HTMLDivElement> {
26
26
  label: string;
27
27
  badge?: string;
28
28
  isActive?: boolean;
29
+ /** Pinned tabs can't be closed and show a "Pinned tab" tooltip on hover. */
30
+ pinned?: boolean;
31
+ /** When true, an edit (pencil) button appears in the hover overlay, left of the close button. */
32
+ isEditable?: boolean;
33
+ /** Called when the edit button is clicked. */
34
+ onEdit?: (e: React.MouseEvent) => void;
29
35
  onClose?: (e: React.MouseEvent) => void;
30
36
  /** Called with the new label after double-click rename. Omit to disable rename. */
31
37
  onRename?: (newLabel: string) => void;
@@ -261,6 +267,7 @@ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAtt
261
267
  declare const badgeVariants: (props?: ({
262
268
  variant?: "solid" | "light" | "outlined" | null | undefined;
263
269
  type?: "primary" | "success" | "critical" | "warning" | "neutral" | null | undefined;
270
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
264
271
  size?: "sm" | "md" | "lg" | null | undefined;
265
272
  } & class_variance_authority_types.ClassProp) | undefined) => string;
266
273
  interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof badgeVariants> {
@@ -412,6 +419,7 @@ declare const TabContent: React.ForwardRefExoticComponent<TabContentProps & Reac
412
419
 
413
420
  declare const tagVariants: (props?: ({
414
421
  variant?: "neutral" | "brand" | null | undefined;
422
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
415
423
  size?: "sm" | "md" | null | undefined;
416
424
  } & class_variance_authority_types.ClassProp) | undefined) => string;
417
425
  interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof tagVariants> {
@@ -1011,9 +1019,9 @@ interface SaveViewButtonProps extends React.HTMLAttributes<HTMLDivElement> {
1011
1019
  onDropdown?: () => void;
1012
1020
  }
1013
1021
  /**
1014
- * Split button for saving filtered views.
1015
- * Left side: "Save view" (solid brand, rounded-left).
1016
- * Right side: chevron-down (solid brand, rounded-right).
1022
+ * Split button for saving filtered views (outlined, neutral).
1023
+ * Left side: "Save view" (rounded-left).
1024
+ * Right side: chevron-down dropdown (e.g. Save for me / Save for everyone).
1017
1025
  */
1018
1026
  declare const SaveViewButton: React.ForwardRefExoticComponent<SaveViewButtonProps & React.RefAttributes<HTMLDivElement>>;
1019
1027
 
package/dist/index.d.ts CHANGED
@@ -26,6 +26,12 @@ interface BrowserTabItemProps extends React.HTMLAttributes<HTMLDivElement> {
26
26
  label: string;
27
27
  badge?: string;
28
28
  isActive?: boolean;
29
+ /** Pinned tabs can't be closed and show a "Pinned tab" tooltip on hover. */
30
+ pinned?: boolean;
31
+ /** When true, an edit (pencil) button appears in the hover overlay, left of the close button. */
32
+ isEditable?: boolean;
33
+ /** Called when the edit button is clicked. */
34
+ onEdit?: (e: React.MouseEvent) => void;
29
35
  onClose?: (e: React.MouseEvent) => void;
30
36
  /** Called with the new label after double-click rename. Omit to disable rename. */
31
37
  onRename?: (newLabel: string) => void;
@@ -261,6 +267,7 @@ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAtt
261
267
  declare const badgeVariants: (props?: ({
262
268
  variant?: "solid" | "light" | "outlined" | null | undefined;
263
269
  type?: "primary" | "success" | "critical" | "warning" | "neutral" | null | undefined;
270
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
264
271
  size?: "sm" | "md" | "lg" | null | undefined;
265
272
  } & class_variance_authority_types.ClassProp) | undefined) => string;
266
273
  interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof badgeVariants> {
@@ -412,6 +419,7 @@ declare const TabContent: React.ForwardRefExoticComponent<TabContentProps & Reac
412
419
 
413
420
  declare const tagVariants: (props?: ({
414
421
  variant?: "neutral" | "brand" | null | undefined;
422
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
415
423
  size?: "sm" | "md" | null | undefined;
416
424
  } & class_variance_authority_types.ClassProp) | undefined) => string;
417
425
  interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof tagVariants> {
@@ -1011,9 +1019,9 @@ interface SaveViewButtonProps extends React.HTMLAttributes<HTMLDivElement> {
1011
1019
  onDropdown?: () => void;
1012
1020
  }
1013
1021
  /**
1014
- * Split button for saving filtered views.
1015
- * Left side: "Save view" (solid brand, rounded-left).
1016
- * Right side: chevron-down (solid brand, rounded-right).
1022
+ * Split button for saving filtered views (outlined, neutral).
1023
+ * Left side: "Save view" (rounded-left).
1024
+ * Right side: chevron-down dropdown (e.g. Save for me / Save for everyone).
1017
1025
  */
1018
1026
  declare const SaveViewButton: React.ForwardRefExoticComponent<SaveViewButtonProps & React.RefAttributes<HTMLDivElement>>;
1019
1027