@l3mpire/ui 2.25.2 → 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 +20 -12
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +131 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +131 -110
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/styles/globals.css +2 -0
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` |
|
|
74
|
-
| `p-lg` / `gap-lg` |
|
|
75
|
-
| `p-xl` / `gap-xl` |
|
|
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` |
|
|
95
|
-
| `rounded-lg` |
|
|
96
|
-
| `rounded-xl` |
|
|
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="
|
|
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"`, `"
|
|
186
|
-
| `size` | `"sm"
|
|
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) |
|
|
@@ -1259,7 +1267,7 @@ import { ProductLogo } from "@l3mpire/ui";
|
|
|
1259
1267
|
|
|
1260
1268
|
### BulkAction
|
|
1261
1269
|
|
|
1262
|
-
Bottom-anchored toolbar that appears when one or more list items are selected.
|
|
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.
|
|
1263
1271
|
|
|
1264
1272
|
```tsx
|
|
1265
1273
|
import { BulkAction, type BulkActionItem } from "@l3mpire/ui";
|
|
@@ -1283,9 +1291,9 @@ const actions: BulkActionItem[] = [
|
|
|
1283
1291
|
| Prop | Description |
|
|
1284
1292
|
|---|---|
|
|
1285
1293
|
| `count` | Number of selected items (rendered as `{count} {countLabel}`) |
|
|
1286
|
-
| `onClear` | Called when the user clicks the
|
|
1294
|
+
| `onClear` | Called when the user clicks the right-side close button |
|
|
1287
1295
|
| `countLabel` | Defaults to `"selected"` — override for i18n |
|
|
1288
|
-
| `clearLabel` | Defaults to `"Clear"` —
|
|
1296
|
+
| `clearLabel` | Defaults to `"Clear"` — used as the close button's `aria-label` |
|
|
1289
1297
|
| `actions` | `BulkActionItem[]` — items collapse into a "more" menu when they overflow |
|
|
1290
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) |
|
|
1291
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-
|
|
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-
|
|
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>>;
|