@l3mpire/ui 2.25.1 → 2.26.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
@@ -70,13 +70,14 @@ Use design token spacing classes — never arbitrary pixel values.
70
70
  | `p-xs` / `gap-xs` | 4px |
71
71
  | `p-sm` / `gap-sm` | 6px |
72
72
  | `p-base` / `gap-base` | 8px |
73
- | `p-md` / `gap-md` | 12px |
74
- | `p-lg` / `gap-lg` | 16px |
75
- | `p-xl` / `gap-xl` | 20px |
73
+ | `p-md` / `gap-md` | 10px |
74
+ | `p-lg` / `gap-lg` | 12px |
75
+ | `p-xl` / `gap-xl` | 16px |
76
76
  | `p-2xl` / `gap-2xl` | 24px |
77
77
  | `p-3xl` / `gap-3xl` | 32px |
78
78
  | `p-4xl` / `gap-4xl` | 40px |
79
79
  | `p-5xl` / `gap-5xl` | 48px |
80
+ | `p-6xl` / `gap-6xl` | 56px |
80
81
 
81
82
  Works with all Tailwind spacing prefixes: `p-`, `px-`, `py-`, `m-`, `mx-`, `my-`, `gap-`, `space-x-`, `space-y-`, `w-`, `h-`, `top-`, `left-`, etc.
82
83
 
@@ -91,9 +92,10 @@ Works with all Tailwind spacing prefixes: `p-`, `px-`, `py-`, `m-`, `mx-`, `my-`
91
92
  | `rounded-xs` | 4px |
92
93
  | `rounded-sm` | 6px |
93
94
  | `rounded-base` | 8px |
94
- | `rounded-md` | 12px |
95
- | `rounded-lg` | 16px |
96
- | `rounded-xl` | 20px |
95
+ | `rounded-md` | 10px |
96
+ | `rounded-lg` | 12px |
97
+ | `rounded-xl` | 16px |
98
+ | `rounded-2xl` | 24px |
97
99
  | `rounded-full` | 9999px |
98
100
 
99
101
  ---
@@ -168,7 +170,7 @@ import { faPaperPlaneOutline } from "@l3mpire/icons";
168
170
  Send
169
171
  </Button>
170
172
 
171
- <Button appearance="outlined" intent="neutral" size="sm" leftIcon={faPaperPlaneOutline}>
173
+ <Button appearance="outlined" intent="brand" size="sm" leftIcon={faPaperPlaneOutline}>
172
174
  Send
173
175
  </Button>
174
176
 
@@ -177,16 +179,22 @@ import { faPaperPlaneOutline } from "@l3mpire/icons";
177
179
  </Button>
178
180
 
179
181
  <Button appearance="solid" intent="brand" size="md" iconOnly leftIcon={faPaperPlaneOutline} />
182
+
183
+ {/* With a counter badge — color follows `intent` */}
184
+ <Button appearance="solid" intent="brand" size="md" badge={99}>
185
+ Notifications
186
+ </Button>
180
187
  ```
181
188
 
182
189
  | Prop | Values |
183
190
  |---|---|
184
191
  | `appearance` | `"solid"`, `"outlined"`, `"ghost"` |
185
- | `intent` | `"brand"`, `"neutral"`, `"alert"` |
186
- | `size` | `"sm"`, `"md"`, `"lg"` |
192
+ | `intent` | `"brand"`, `"alert"` |
193
+ | `size` | `"sm"` (24px), `"md"` (32px, radius 10px), `"lg"` (40px, radius 12px) |
187
194
  | `leftIcon` | `IconDefinition` |
188
195
  | `rightIcon` | `IconDefinition` |
189
196
  | `iconOnly` | `boolean` |
197
+ | `badge` | `React.ReactNode` — counter/accent next to the label (ignored when `iconOnly`) |
190
198
  | `loading` | `boolean` |
191
199
  | `disabled` | `boolean` |
192
200
  | `asChild` | `boolean` (render as child element) |
@@ -794,26 +802,39 @@ import { Tabs, TabList, TabTrigger, TabContent } from "@l3mpire/ui";
794
802
 
795
803
  ```tsx
796
804
  import { BrowserTab, BrowserTabItem } from "@l3mpire/ui";
797
-
798
- <BrowserTab activeTabId="1" onTabSelect={(id) => {}}>
799
- <BrowserTabItem id="1" label="Page 1" onClose={(id) => {}} />
800
- <BrowserTabItem id="2" label="Page 2" onClose={(id) => {}} />
805
+ import { faRocketOutline } from "@l3mpire/icons";
806
+
807
+ <BrowserTab draggable onReorder={(from, to) => {}} onAddTab={() => {}}>
808
+ <BrowserTabItem
809
+ icon={faRocketOutline}
810
+ label="Campaigns"
811
+ badge="99"
812
+ isActive
813
+ onClick={() => setActive(0)}
814
+ onClose={() => removeTab(0)}
815
+ onRename={(newLabel) => renameTab(0, newLabel)}
816
+ />
817
+ <BrowserTabItem label="Leads" onClick={() => setActive(1)} onClose={() => removeTab(1)} />
801
818
  </BrowserTab>
802
819
  ```
803
820
 
821
+ 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).
822
+
804
823
  | Prop (BrowserTab) | Values |
805
824
  |---|---|
806
- | `activeTabId` | `string` |
807
- | `onTabSelect` | `(id: string) => void` |
808
- | `onNewTab` | `() => void` (shows + button) |
809
- | `onReorder` | `(ids: string[]) => void` |
825
+ | `onAddTab` | `() => void` (shows + button) |
826
+ | `draggable` | `boolean` |
827
+ | `onReorder` | `(from: number, to: number) => void` |
828
+ | `onOverflowSelect` | `(hiddenIndex: number, lastVisibleIndex: number) => void` |
810
829
 
811
830
  | Prop (BrowserTabItem) | Values |
812
831
  |---|---|
813
- | `id` | `string` (required) |
814
- | `label` | `string` |
832
+ | `label` | `string` (required) |
815
833
  | `icon` | `IconDefinition` |
816
- | `onClose` | `(id: string) => void` |
834
+ | `badge` | `string` |
835
+ | `isActive` | `boolean` |
836
+ | `onClose` | `(e) => void` |
837
+ | `onRename` | `(newLabel: string) => void` (enables dbl-click rename) |
817
838
 
818
839
  ---
819
840
 
@@ -1246,7 +1267,7 @@ import { ProductLogo } from "@l3mpire/ui";
1246
1267
 
1247
1268
  ### BulkAction
1248
1269
 
1249
- Bottom-anchored toolbar that appears when one or more list items are selected. Hosts a Clear button + selection count on the left, and a fully composable, **responsive** action slot on the right. Actions that don't fit collapse automatically into a "more" menu.
1270
+ Bottom-anchored toolbar that appears when one or more list items are selected. The selection count sits on the **left**, a fully composable **responsive** actions slot in the middle, and a ghost-brand icon-only **close button on the right** (uses `clearLabel` as its `aria-label`). Actions that don't fit collapse automatically into a "more" menu.
1250
1271
 
1251
1272
  ```tsx
1252
1273
  import { BulkAction, type BulkActionItem } from "@l3mpire/ui";
@@ -1270,9 +1291,9 @@ const actions: BulkActionItem[] = [
1270
1291
  | Prop | Description |
1271
1292
  |---|---|
1272
1293
  | `count` | Number of selected items (rendered as `{count} {countLabel}`) |
1273
- | `onClear` | Called when the user clicks the Clear button |
1294
+ | `onClear` | Called when the user clicks the right-side close button |
1274
1295
  | `countLabel` | Defaults to `"selected"` — override for i18n |
1275
- | `clearLabel` | Defaults to `"Clear"` — override for i18n |
1296
+ | `clearLabel` | Defaults to `"Clear"` — used as the close button's `aria-label` |
1276
1297
  | `actions` | `BulkActionItem[]` — items collapse into a "more" menu when they overflow |
1277
1298
  | `sticky` | `true` (default) → `position: sticky; bottom: 0`. Set to `false` when placing it manually inside a flex column above a footer (e.g. inside a SidePanel) |
1278
1299
 
package/dist/index.d.mts CHANGED
@@ -55,6 +55,8 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
55
55
  leftIcon?: IconDefinition;
56
56
  rightIcon?: IconDefinition;
57
57
  iconOnly?: boolean;
58
+ /** Optional badge (e.g. counter) shown next to the label. Ignored when iconOnly. */
59
+ badge?: React.ReactNode;
58
60
  }
59
61
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
60
62
 
@@ -320,7 +322,7 @@ interface TabsProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.
320
322
  }
321
323
  declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
322
324
  interface TabListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
323
- /** Add horizontal padding (px-lg) when used inline within a page section. */
325
+ /** Add horizontal padding (px-xl) when used inline within a page section. */
324
326
  hasOffset?: boolean;
325
327
  }
326
328
  declare const TabList: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>>;
package/dist/index.d.ts CHANGED
@@ -55,6 +55,8 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
55
55
  leftIcon?: IconDefinition;
56
56
  rightIcon?: IconDefinition;
57
57
  iconOnly?: boolean;
58
+ /** Optional badge (e.g. counter) shown next to the label. Ignored when iconOnly. */
59
+ badge?: React.ReactNode;
58
60
  }
59
61
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
60
62
 
@@ -320,7 +322,7 @@ interface TabsProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.
320
322
  }
321
323
  declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
322
324
  interface TabListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> {
323
- /** Add horizontal padding (px-lg) when used inline within a page section. */
325
+ /** Add horizontal padding (px-xl) when used inline within a page section. */
324
326
  hasOffset?: boolean;
325
327
  }
326
328
  declare const TabList: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>>;