@l3mpire/ui 3.0.0 → 3.2.1

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,16 @@ 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 — overrides variant/type
215
+ <Badge tone="indigo">SaaS</Badge>
213
216
  ```
214
217
 
215
218
  | Prop | Values |
216
219
  |---|---|
217
220
  | `variant` | `"solid"`, `"light"`, `"outlined"` |
218
221
  | `type` | `"primary"`, `"success"`, `"critical"`, `"warning"`, `"neutral"` |
222
+ | `tone` | `"indigo"`, `"rose"`, `"lime"`, `"violet"`, `"cyan"`, `"orange"`, `"emerald"`, `"fuchsia"`, `"amber"`, `"slate"` — categorical palette; overrides `variant`/`type` |
219
223
  | `size` | `"sm"`, `"md"`, `"lg"` |
220
224
  | `icon` | `IconDefinition` (optional) |
221
225
 
@@ -231,11 +235,15 @@ import { faPaperPlaneOutline } from "@l3mpire/icons";
231
235
  <Tag variant="neutral" icon={faPaperPlaneOutline} onClose={() => {}}>
232
236
  Campaign
233
237
  </Tag>
238
+
239
+ // Categorical tone — overrides variant
240
+ <Tag tone="emerald">Finance</Tag>
234
241
  ```
235
242
 
236
243
  | Prop | Values |
237
244
  |---|---|
238
245
  | `variant` | `"brand"`, `"neutral"` |
246
+ | `tone` | `"indigo"`, `"rose"`, `"lime"`, `"violet"`, `"cyan"`, `"orange"`, `"emerald"`, `"fuchsia"`, `"amber"`, `"slate"` — categorical palette; overrides `variant` |
239
247
  | `size` | `"sm"`, `"md"` |
240
248
  | `icon` | `IconDefinition` |
241
249
  | `onClose` | `() => void` (shows remove button when provided) |
@@ -1085,7 +1093,15 @@ import {
1085
1093
  filterState={filterState}
1086
1094
  onFilterStateChange={setFilterState}
1087
1095
  sortFields={SORT_FIELDS}
1088
- actions={<SaveViewButton />}
1096
+ // Row 1 (always): page-level actions
1097
+ actions={<Button appearance="solid" intent="brand">Start tasks</Button>}
1098
+ // Row 2 (while editing filters): view-related actions
1099
+ filterActions={
1100
+ <>
1101
+ <Button appearance="ghost" intent="brand">Discard changes</Button>
1102
+ <SaveViewButton />
1103
+ </>
1104
+ }
1089
1105
  >
1090
1106
  <SearchBar size="sm" className="w-[200px]" />
1091
1107
  </FilterSystem>
@@ -1118,7 +1134,7 @@ import {
1118
1134
  | `AdvancedRow` | Single condition row (property + operator + type-aware value popover + actions) |
1119
1135
  | `AdvancedGroup` | Nested group container with shared connector and inline property selector |
1120
1136
  | `FilterNodeActions` | Kebab menu shared by rows and groups (Duplicate / Turn into group↔filter / Delete) |
1121
- | `SaveViewButton` | Split button (Save view + dropdown chevron) |
1137
+ | `SaveViewButton` | Outlined split button (Save view + dropdown chevron for Save for me / everyone). Goes in the Row 2 `filterActions` slot. |
1122
1138
  | `SummaryChip` | Minimal mode: "Filters (N)" with interactive popover |
1123
1139
 
1124
1140
  **Responsive:** FilterSystem auto-detects container width via `ResizeObserver`:
@@ -1126,7 +1142,7 @@ import {
1126
1142
  - **Minimal** (≤breakpoint): SummaryChip "Filters (N)" with interactive popover, icon-only Sort/Filter buttons
1127
1143
  - The breakpoint is configurable via the `breakpoint` prop on `FilterSystem` (default: `600`).
1128
1144
 
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.
1145
+ **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
1146
 
1131
1147
  **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
1148
 
package/dist/index.d.mts CHANGED
@@ -261,6 +261,7 @@ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAtt
261
261
  declare const badgeVariants: (props?: ({
262
262
  variant?: "solid" | "light" | "outlined" | null | undefined;
263
263
  type?: "primary" | "success" | "critical" | "warning" | "neutral" | null | undefined;
264
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
264
265
  size?: "sm" | "md" | "lg" | null | undefined;
265
266
  } & class_variance_authority_types.ClassProp) | undefined) => string;
266
267
  interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof badgeVariants> {
@@ -412,6 +413,7 @@ declare const TabContent: React.ForwardRefExoticComponent<TabContentProps & Reac
412
413
 
413
414
  declare const tagVariants: (props?: ({
414
415
  variant?: "neutral" | "brand" | null | undefined;
416
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
415
417
  size?: "sm" | "md" | null | undefined;
416
418
  } & class_variance_authority_types.ClassProp) | undefined) => string;
417
419
  interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof tagVariants> {
@@ -1011,9 +1013,9 @@ interface SaveViewButtonProps extends React.HTMLAttributes<HTMLDivElement> {
1011
1013
  onDropdown?: () => void;
1012
1014
  }
1013
1015
  /**
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).
1016
+ * Split button for saving filtered views (outlined, neutral).
1017
+ * Left side: "Save view" (rounded-left).
1018
+ * Right side: chevron-down dropdown (e.g. Save for me / Save for everyone).
1017
1019
  */
1018
1020
  declare const SaveViewButton: React.ForwardRefExoticComponent<SaveViewButtonProps & React.RefAttributes<HTMLDivElement>>;
1019
1021
 
package/dist/index.d.ts CHANGED
@@ -261,6 +261,7 @@ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAtt
261
261
  declare const badgeVariants: (props?: ({
262
262
  variant?: "solid" | "light" | "outlined" | null | undefined;
263
263
  type?: "primary" | "success" | "critical" | "warning" | "neutral" | null | undefined;
264
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
264
265
  size?: "sm" | "md" | "lg" | null | undefined;
265
266
  } & class_variance_authority_types.ClassProp) | undefined) => string;
266
267
  interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof badgeVariants> {
@@ -412,6 +413,7 @@ declare const TabContent: React.ForwardRefExoticComponent<TabContentProps & Reac
412
413
 
413
414
  declare const tagVariants: (props?: ({
414
415
  variant?: "neutral" | "brand" | null | undefined;
416
+ tone?: "indigo" | "rose" | "lime" | "violet" | "cyan" | "orange" | "emerald" | "fuchsia" | "amber" | "slate" | null | undefined;
415
417
  size?: "sm" | "md" | null | undefined;
416
418
  } & class_variance_authority_types.ClassProp) | undefined) => string;
417
419
  interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "type">, VariantProps<typeof tagVariants> {
@@ -1011,9 +1013,9 @@ interface SaveViewButtonProps extends React.HTMLAttributes<HTMLDivElement> {
1011
1013
  onDropdown?: () => void;
1012
1014
  }
1013
1015
  /**
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).
1016
+ * Split button for saving filtered views (outlined, neutral).
1017
+ * Left side: "Save view" (rounded-left).
1018
+ * Right side: chevron-down dropdown (e.g. Save for me / Save for everyone).
1017
1019
  */
1018
1020
  declare const SaveViewButton: React.ForwardRefExoticComponent<SaveViewButtonProps & React.RefAttributes<HTMLDivElement>>;
1019
1021
 
package/dist/index.js CHANGED
@@ -231,6 +231,20 @@ var badgeVariants = (0, import_class_variance_authority.cva)(
231
231
  warning: "",
232
232
  neutral: ""
233
233
  },
234
+ // Categorical tones — self-contained soft style (bg + text + border).
235
+ // When `tone` is set it overrides variant/type (handled in the component).
236
+ tone: {
237
+ indigo: "bg-badge-indigo-bg text-badge-indigo-text border-badge-indigo-border",
238
+ rose: "bg-badge-rose-bg text-badge-rose-text border-badge-rose-border",
239
+ lime: "bg-badge-lime-bg text-badge-lime-text border-badge-lime-border",
240
+ violet: "bg-badge-violet-bg text-badge-violet-text border-badge-violet-border",
241
+ cyan: "bg-badge-cyan-bg text-badge-cyan-text border-badge-cyan-border",
242
+ orange: "bg-badge-orange-bg text-badge-orange-text border-badge-orange-border",
243
+ emerald: "bg-badge-emerald-bg text-badge-emerald-text border-badge-emerald-border",
244
+ fuchsia: "bg-badge-fuchsia-bg text-badge-fuchsia-text border-badge-fuchsia-border",
245
+ amber: "bg-badge-amber-bg text-badge-amber-text border-badge-amber-border",
246
+ slate: "bg-badge-slate-bg text-badge-slate-text border-badge-slate-border"
247
+ },
234
248
  size: {
235
249
  sm: [
236
250
  "p-2xs gap-2xs",
@@ -269,20 +283,29 @@ var badgeVariants = (0, import_class_variance_authority.cva)(
269
283
  { variant: "outlined", type: "warning", class: "border-badge-outlined-warning-border text-badge-outlined-warning-text" },
270
284
  { variant: "outlined", type: "neutral", class: "border-badge-outlined-neutral-border text-badge-outlined-neutral-text" }
271
285
  ],
286
+ // variant/type defaults are applied in the component so `tone` can suppress them.
272
287
  defaultVariants: {
273
- variant: "solid",
274
- type: "primary",
275
288
  size: "md"
276
289
  }
277
290
  }
278
291
  );
279
292
  var Badge = React.forwardRef(
280
- ({ className, variant, type, size, icon, children, ...props }, ref) => {
293
+ ({ className, variant, type, tone, size, icon, children, ...props }, ref) => {
294
+ const tonal = tone != null;
281
295
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
282
296
  "span",
283
297
  {
284
298
  ref,
285
- className: cn(badgeVariants({ variant, type, size }), className),
299
+ className: cn(
300
+ badgeVariants({
301
+ // A categorical tone is self-contained and overrides variant/type.
302
+ variant: tonal ? void 0 : variant ?? "solid",
303
+ type: tonal ? void 0 : type ?? "primary",
304
+ tone,
305
+ size
306
+ }),
307
+ className
308
+ ),
286
309
  ...props,
287
310
  children: [
288
311
  icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.Icon, { icon, size: "xs" }),
@@ -804,6 +827,7 @@ var BrowserTab = React3.forwardRef(
804
827
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
805
828
  Button,
806
829
  {
830
+ className: "mb-sm",
807
831
  appearance: "ghost",
808
832
  intent: "brand",
809
833
  size: "sm",
@@ -868,6 +892,7 @@ var BrowserTab = React3.forwardRef(
868
892
  onAddTab && hasOverflow && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
869
893
  Button,
870
894
  {
895
+ className: "mb-sm",
871
896
  appearance: "ghost",
872
897
  intent: "brand",
873
898
  size: "sm",
@@ -3336,6 +3361,20 @@ var tagVariants = (0, import_class_variance_authority12.cva)(
3336
3361
  "text-tag-neutral-text"
3337
3362
  ]
3338
3363
  },
3364
+ // Categorical tones — soft style with a subtle border.
3365
+ // When `tone` is set it overrides `variant` (handled in the component).
3366
+ tone: {
3367
+ indigo: "bg-tag-indigo-bg text-tag-indigo-text border border-tag-indigo-border",
3368
+ rose: "bg-tag-rose-bg text-tag-rose-text border border-tag-rose-border",
3369
+ lime: "bg-tag-lime-bg text-tag-lime-text border border-tag-lime-border",
3370
+ violet: "bg-tag-violet-bg text-tag-violet-text border border-tag-violet-border",
3371
+ cyan: "bg-tag-cyan-bg text-tag-cyan-text border border-tag-cyan-border",
3372
+ orange: "bg-tag-orange-bg text-tag-orange-text border border-tag-orange-border",
3373
+ emerald: "bg-tag-emerald-bg text-tag-emerald-text border border-tag-emerald-border",
3374
+ fuchsia: "bg-tag-fuchsia-bg text-tag-fuchsia-text border border-tag-fuchsia-border",
3375
+ amber: "bg-tag-amber-bg text-tag-amber-text border border-tag-amber-border",
3376
+ slate: "bg-tag-slate-bg text-tag-slate-text border border-tag-slate-border"
3377
+ },
3339
3378
  size: {
3340
3379
  sm: [
3341
3380
  "p-xs",
@@ -3349,21 +3388,29 @@ var tagVariants = (0, import_class_variance_authority12.cva)(
3349
3388
  ]
3350
3389
  }
3351
3390
  },
3391
+ // variant default is applied in the component so `tone` can suppress it.
3352
3392
  defaultVariants: {
3353
- variant: "brand",
3354
3393
  size: "sm"
3355
3394
  }
3356
3395
  }
3357
3396
  );
3358
3397
  var iconSizeMap3 = { sm: "xs", md: "sm" };
3359
3398
  var Tag = React26.forwardRef(
3360
- ({ className, variant, size, icon, onClose, children, ...props }, ref) => {
3399
+ ({ className, variant, tone, size, icon, onClose, children, ...props }, ref) => {
3361
3400
  const iconSize = iconSizeMap3[size ?? "sm"];
3362
3401
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3363
3402
  "span",
3364
3403
  {
3365
3404
  ref,
3366
- className: cn(tagVariants({ variant, size }), className),
3405
+ className: cn(
3406
+ tagVariants({
3407
+ // A categorical tone is self-contained and overrides variant.
3408
+ variant: tone != null ? void 0 : variant ?? "brand",
3409
+ tone,
3410
+ size
3411
+ }),
3412
+ className
3413
+ ),
3367
3414
  ...props,
3368
3415
  children: [
3369
3416
  icon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons18.Icon, { icon, size: iconSize, className: "shrink-0" }),
@@ -6463,10 +6510,11 @@ var SaveViewButton = React46.forwardRef(
6463
6510
  const sharedStyle = [
6464
6511
  "relative flex items-center justify-center",
6465
6512
  "min-h-[32px] max-h-[32px]",
6466
- "bg-gradient-to-t from-btn-solid-brand-bg-default from-[10%] to-btn-solid-brand-bg-gradient-to-default",
6467
- "border border-btn-solid-brand-border-default",
6513
+ "bg-gradient-to-t from-btn-outlined-neutral-bg-default from-[10%] to-btn-outlined-neutral-bg-gradient-to-default",
6514
+ "border border-btn-outlined-neutral-border-default",
6468
6515
  "shadow-sm cursor-pointer transition-colors",
6469
- "hover:from-btn-solid-brand-bg-hover hover:to-btn-solid-brand-bg-gradient-to-hover"
6516
+ "hover:from-btn-outlined-neutral-bg-hover hover:from-[0%] hover:to-btn-outlined-neutral-bg-gradient-to-hover",
6517
+ "hover:border-btn-outlined-neutral-border-hover"
6470
6518
  ];
6471
6519
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
6472
6520
  "div",
@@ -6475,7 +6523,7 @@ var SaveViewButton = React46.forwardRef(
6475
6523
  className: cn("flex items-center", className),
6476
6524
  ...props,
6477
6525
  children: [
6478
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
6526
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6479
6527
  "button",
6480
6528
  {
6481
6529
  type: "button",
@@ -6485,33 +6533,28 @@ var SaveViewButton = React46.forwardRef(
6485
6533
  "gap-sm px-base py-sm min-w-[80px]",
6486
6534
  "rounded-l-md -mr-px"
6487
6535
  ),
6488
- children: [
6489
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-btn-solid-brand-text-default", children: label }),
6490
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "absolute inset-0 rounded-l-[9px] border border-btn-solid-brand-inner-border-default shadow-sm pointer-events-none" })
6491
- ]
6536
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-btn-outlined-neutral-text-default", children: label })
6492
6537
  }
6493
6538
  ),
6494
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
6539
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6495
6540
  "button",
6496
6541
  {
6497
6542
  type: "button",
6498
6543
  onClick: onDropdown,
6544
+ "aria-label": "More save options",
6499
6545
  className: cn(
6500
6546
  sharedStyle,
6501
6547
  "p-sm",
6502
6548
  "rounded-r-md -ml-px"
6503
6549
  ),
6504
- children: [
6505
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6506
- import_icons30.Icon,
6507
- {
6508
- icon: import_icons30.faChevronDownOutline,
6509
- size: "sm",
6510
- className: "text-btn-solid-brand-text-default"
6511
- }
6512
- ),
6513
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "absolute inset-0 rounded-r-[9px] border border-btn-solid-brand-inner-border-default shadow-sm pointer-events-none" })
6514
- ]
6550
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6551
+ import_icons30.Icon,
6552
+ {
6553
+ icon: import_icons30.faChevronDownOutline,
6554
+ size: "sm",
6555
+ className: "text-btn-outlined-neutral-text-default"
6556
+ }
6557
+ )
6515
6558
  }
6516
6559
  )
6517
6560
  ]