@l3mpire/ui 3.2.1 → 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
@@ -211,15 +211,17 @@ import { faStarOutline } from "@l3mpire/icons";
211
211
  <Badge variant="light" type="success" size="sm">Active</Badge>
212
212
  <Badge variant="outlined" type="critical" icon={faStarOutline}>99</Badge>
213
213
 
214
- // Categorical tone — overrides variant/type
214
+ // Categorical tone — combines with variant (solid/light/outlined), overrides type
215
215
  <Badge tone="indigo">SaaS</Badge>
216
+ <Badge variant="light" tone="amber">Manufacturing</Badge>
217
+ <Badge variant="outlined" tone="emerald">Finance</Badge>
216
218
  ```
217
219
 
218
220
  | Prop | Values |
219
221
  |---|---|
220
222
  | `variant` | `"solid"`, `"light"`, `"outlined"` |
221
223
  | `type` | `"primary"`, `"success"`, `"critical"`, `"warning"`, `"neutral"` |
222
- | `tone` | `"indigo"`, `"rose"`, `"lime"`, `"violet"`, `"cyan"`, `"orange"`, `"emerald"`, `"fuchsia"`, `"amber"`, `"slate"` — categorical palette; overrides `variant`/`type` |
224
+ | `tone` | `"indigo"`, `"rose"`, `"lime"`, `"violet"`, `"cyan"`, `"orange"`, `"emerald"`, `"fuchsia"`, `"amber"`, `"slate"` — categorical palette; combines with `variant`, overrides `type` |
223
225
  | `size` | `"sm"`, `"md"`, `"lg"` |
224
226
  | `icon` | `IconDefinition` (optional) |
225
227
 
@@ -902,6 +904,8 @@ import { faRocketOutline } from "@l3mpire/icons";
902
904
 
903
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).
904
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
+
905
909
  | Prop (BrowserTab) | Values |
906
910
  |---|---|
907
911
  | `onAddTab` | `() => void` (shows + button) |
@@ -915,7 +919,8 @@ Active tabs render with concave bottom corners that fuse into the bar divider (r
915
919
  | `icon` | `IconDefinition` |
916
920
  | `badge` | `string` |
917
921
  | `isActive` | `boolean` |
918
- | `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`) |
919
924
  | `onRename` | `(newLabel: string) => void` (enables dbl-click rename) |
920
925
 
921
926
  ---
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;
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;