@l3mpire/ui 2.22.0 → 2.24.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 +111 -0
- package/dist/index.d.mts +39 -3
- package/dist/index.d.ts +39 -3
- package/dist/index.js +1240 -991
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1204 -958
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/styles/globals.css +21 -0
package/USAGE.md
CHANGED
|
@@ -436,6 +436,84 @@ import { Switch } from "@l3mpire/ui";
|
|
|
436
436
|
|
|
437
437
|
---
|
|
438
438
|
|
|
439
|
+
### RadioCard
|
|
440
|
+
|
|
441
|
+
Card-style radio control for mutually-exclusive rich choices with title, description, and optional icon. Built on Radix RadioGroup.
|
|
442
|
+
|
|
443
|
+
```tsx
|
|
444
|
+
import { RadioCard, RadioCardGroup } from "@l3mpire/ui";
|
|
445
|
+
import { faUserOutline, faUsersOutline } from "@l3mpire/icons";
|
|
446
|
+
|
|
447
|
+
<RadioCardGroup label="Visibility" defaultValue="only-me">
|
|
448
|
+
<RadioCard
|
|
449
|
+
value="only-me"
|
|
450
|
+
icon={faUserOutline}
|
|
451
|
+
title="Only me"
|
|
452
|
+
description="Only you can see this tab"
|
|
453
|
+
/>
|
|
454
|
+
<RadioCard
|
|
455
|
+
value="everyone"
|
|
456
|
+
icon={faUsersOutline}
|
|
457
|
+
title="Everyone"
|
|
458
|
+
description="Visible to all team members"
|
|
459
|
+
/>
|
|
460
|
+
</RadioCardGroup>
|
|
461
|
+
|
|
462
|
+
// Vertical stack
|
|
463
|
+
<RadioCardGroup orientation="vertical" defaultValue="a">
|
|
464
|
+
<RadioCard value="a" title="Option A" description="..." />
|
|
465
|
+
<RadioCard value="b" title="Option B" description="..." />
|
|
466
|
+
</RadioCardGroup>
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
| Prop (RadioCardGroup) | Values |
|
|
470
|
+
|---|---|
|
|
471
|
+
| `label` | `string` (optional group label) |
|
|
472
|
+
| `orientation` | `"horizontal"` (default), `"vertical"` |
|
|
473
|
+
| `value` | `string` |
|
|
474
|
+
| `defaultValue` | `string` |
|
|
475
|
+
| `onValueChange` | `(value: string) => void` |
|
|
476
|
+
|
|
477
|
+
| Prop (RadioCard) | Values |
|
|
478
|
+
|---|---|
|
|
479
|
+
| `value` | `string` (required) |
|
|
480
|
+
| `title` | `string` (required) |
|
|
481
|
+
| `description` | `string` |
|
|
482
|
+
| `icon` | `IconDefinition` |
|
|
483
|
+
| `hideIndicator` | `boolean` (hide the small radio dot) |
|
|
484
|
+
| `disabled` | `boolean` |
|
|
485
|
+
|
|
486
|
+
---
|
|
487
|
+
|
|
488
|
+
### SwitchCard
|
|
489
|
+
|
|
490
|
+
Card-style switch for binary settings with title, description, and optional icon. The entire card is the toggle. Built on Radix Switch.
|
|
491
|
+
|
|
492
|
+
```tsx
|
|
493
|
+
import { SwitchCard } from "@l3mpire/ui";
|
|
494
|
+
import { faLockOutline } from "@l3mpire/icons";
|
|
495
|
+
|
|
496
|
+
<SwitchCard
|
|
497
|
+
icon={faLockOutline}
|
|
498
|
+
title="Enforce for all users"
|
|
499
|
+
description="This tab will appear in everyone's tab bar and cannot be hidden"
|
|
500
|
+
defaultChecked
|
|
501
|
+
onCheckedChange={(checked) => console.log(checked)}
|
|
502
|
+
/>
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
| Prop | Values |
|
|
506
|
+
|---|---|
|
|
507
|
+
| `title` | `string` (required) |
|
|
508
|
+
| `description` | `string` |
|
|
509
|
+
| `icon` | `IconDefinition` |
|
|
510
|
+
| `checked` | `boolean` (controlled) |
|
|
511
|
+
| `defaultChecked` | `boolean` (uncontrolled) |
|
|
512
|
+
| `onCheckedChange` | `(checked: boolean) => void` |
|
|
513
|
+
| `disabled` | `boolean` |
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
439
517
|
### Select
|
|
440
518
|
|
|
441
519
|
```tsx
|
|
@@ -973,6 +1051,39 @@ import {
|
|
|
973
1051
|
{ id: "contact_name", label: "Contact name", type: "text", icon: faUserOutline, group: "contact", groupLabel: "Contact", ... },
|
|
974
1052
|
```
|
|
975
1053
|
|
|
1054
|
+
**Enum options with icons + intent dots:** `options` accepts either strings (backwards-compatible) or objects `{ value, label?, icon?, intent? }`. Set `icon` to render a FontAwesome icon left of the label; set `intent` (`primary` / `success` / `warning` / `critical` / `neutral`) to render a colored dot instead. The icon also appears as an adornment on the chip when the value is selected, so users recognize the option at a glance. Applied in the value popover, the `InteractiveFilterChip`, and `AdvancedRow`.
|
|
1055
|
+
|
|
1056
|
+
```tsx
|
|
1057
|
+
// Channel-type enum — icons everywhere
|
|
1058
|
+
{
|
|
1059
|
+
id: "task_type",
|
|
1060
|
+
label: "Task type",
|
|
1061
|
+
type: "enum",
|
|
1062
|
+
options: [
|
|
1063
|
+
{ value: "call", label: "Call", icon: faPhoneOutline },
|
|
1064
|
+
{ value: "email", label: "Email", icon: faEnvelopeOutline },
|
|
1065
|
+
{ value: "linkedin", label: "LinkedIn", icon: faLinkedinOutline },
|
|
1066
|
+
"Manual", // plain string still works
|
|
1067
|
+
],
|
|
1068
|
+
// ...
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
// Status-type enum — intent dots
|
|
1072
|
+
{
|
|
1073
|
+
id: "task_status",
|
|
1074
|
+
label: "Status",
|
|
1075
|
+
type: "enum",
|
|
1076
|
+
options: [
|
|
1077
|
+
{ value: "todo", label: "To do", intent: "neutral" },
|
|
1078
|
+
{ value: "in_progress", label: "In progress", intent: "primary" },
|
|
1079
|
+
{ value: "done", label: "Done", intent: "success" },
|
|
1080
|
+
{ value: "blocked", label: "Blocked", intent: "warning" },
|
|
1081
|
+
{ value: "cancelled", label: "Cancelled", intent: "critical" },
|
|
1082
|
+
],
|
|
1083
|
+
// ...
|
|
1084
|
+
}
|
|
1085
|
+
```
|
|
1086
|
+
|
|
976
1087
|
**Dynamic options ("Me", "Unassigned", …):** enum/tags/relation properties accept a `dynamicOptions` array. Each entry is `{ value, label, description?, icon? }` and is rendered at the top of the SingleSelect / MultiSelect dropdown with a divider separating it from the regular options. The `value` is a sentinel string stored on `FilterCondition.value` — the DS only renders, the consuming app resolves it at query time (e.g. `"__me__"` → `currentUser.id`). This keeps session/business logic out of the DS while still getting a consistent visual treatment.
|
|
977
1088
|
|
|
978
1089
|
```tsx
|
package/dist/index.d.mts
CHANGED
|
@@ -149,6 +149,13 @@ interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimit
|
|
|
149
149
|
}
|
|
150
150
|
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
151
151
|
|
|
152
|
+
interface SwitchCardProps extends Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, "title"> {
|
|
153
|
+
title: string;
|
|
154
|
+
description?: string;
|
|
155
|
+
icon?: IconDefinition;
|
|
156
|
+
}
|
|
157
|
+
declare const SwitchCard: React.ForwardRefExoticComponent<SwitchCardProps & React.RefAttributes<HTMLButtonElement>>;
|
|
158
|
+
|
|
152
159
|
declare const searchBarVariants: (props?: ({
|
|
153
160
|
variant?: "white" | "grey" | null | undefined;
|
|
154
161
|
size?: "sm" | "md" | null | undefined;
|
|
@@ -196,6 +203,19 @@ interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof Radi
|
|
|
196
203
|
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
197
204
|
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
198
205
|
|
|
206
|
+
interface RadioCardProps extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "title"> {
|
|
207
|
+
title: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
icon?: IconDefinition;
|
|
210
|
+
hideIndicator?: boolean;
|
|
211
|
+
}
|
|
212
|
+
interface RadioCardGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
|
|
213
|
+
label?: string;
|
|
214
|
+
orientation?: "horizontal" | "vertical";
|
|
215
|
+
}
|
|
216
|
+
declare const RadioCardGroup: React.ForwardRefExoticComponent<RadioCardGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
217
|
+
declare const RadioCard: React.ForwardRefExoticComponent<RadioCardProps & React.RefAttributes<HTMLButtonElement>>;
|
|
218
|
+
|
|
199
219
|
interface DropdownMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
200
220
|
}
|
|
201
221
|
declare const DropdownMenu: React.ForwardRefExoticComponent<DropdownMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -726,6 +746,22 @@ interface DynamicOption {
|
|
|
726
746
|
label: string;
|
|
727
747
|
description?: string;
|
|
728
748
|
}
|
|
749
|
+
/**
|
|
750
|
+
* Visual intent for a colored dot next to an enum option. Used when no icon is
|
|
751
|
+
* provided — e.g. status-style enums where color carries the semantic meaning.
|
|
752
|
+
*/
|
|
753
|
+
type EnumOptionIntent = "primary" | "success" | "warning" | "critical" | "neutral";
|
|
754
|
+
/**
|
|
755
|
+
* An enum option value. Plain strings are kept for backwards compatibility —
|
|
756
|
+
* the string is used as both the value and the label. Object form lets you
|
|
757
|
+
* attach an icon, a custom label, or a colored dot (via `intent`).
|
|
758
|
+
*/
|
|
759
|
+
type EnumOption = string | {
|
|
760
|
+
value: string;
|
|
761
|
+
label?: string;
|
|
762
|
+
icon?: _l3mpire_icons.IconDefinition;
|
|
763
|
+
intent?: EnumOptionIntent;
|
|
764
|
+
};
|
|
729
765
|
interface PropertyDefinition {
|
|
730
766
|
id: string;
|
|
731
767
|
label: string;
|
|
@@ -740,7 +776,7 @@ interface PropertyDefinition {
|
|
|
740
776
|
* whole group. Useful for "primary" groups that hold the most-used filters.
|
|
741
777
|
*/
|
|
742
778
|
groupPinned?: boolean;
|
|
743
|
-
options?:
|
|
779
|
+
options?: EnumOption[];
|
|
744
780
|
/**
|
|
745
781
|
* Dynamic/smart options rendered at the top of the value selector with a
|
|
746
782
|
* divider. Only used for enum, tags, and relation types. The app resolves
|
|
@@ -882,7 +918,7 @@ interface ValueInputProps {
|
|
|
882
918
|
value: FilterValue;
|
|
883
919
|
onChange: (value: FilterValue) => void;
|
|
884
920
|
onSubmit?: () => void;
|
|
885
|
-
options?:
|
|
921
|
+
options?: EnumOption[];
|
|
886
922
|
/** Dynamic/smart entries rendered at the top with a divider. */
|
|
887
923
|
dynamicOptions?: DynamicOption[];
|
|
888
924
|
className?: string;
|
|
@@ -1067,4 +1103,4 @@ declare const DatePickerTrigger: React.ForwardRefExoticComponent<PopoverPrimitiv
|
|
|
1067
1103
|
declare const DatePickerPopover: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1068
1104
|
declare function getDefaultSuggestions(referenceDate?: Date): DatePickerSuggestion[];
|
|
1069
1105
|
|
|
1070
|
-
export { AdvancedChip, type AdvancedChipProps, AdvancedPopover, type AdvancedPopoverProps, AdvancedRow, type AdvancedRowProps, Avatar, AvatarCell, type AvatarCellProps, type AvatarProps, Badge, type BadgeProps, type BooleanOperator, BrowserTab, BrowserTabItem, type BrowserTabItemProps, type BrowserTabProps, BulkAction, type BulkActionItem, type BulkActionProps, Button, ButtonCell, type ButtonCellProps, type ButtonProps, Checkbox, type CheckboxProps, ChipInput, type ChipInputProps, DEFAULT_OPERATOR_BY_TYPE, DataTable, DataTablePagination, type DataTablePaginationProps, type DataTableProps, type DataType, DateCell, type DateCellProps, type DateOperator, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerFooter, type DatePickerFooterProps, type DatePickerMode, DatePickerPanel, type DatePickerPanelProps, DatePickerPopover, type DatePickerProps, DatePickerRoot, DatePickerSelects, type DatePickerSelectsProps, type DatePickerSuggestion, DatePickerSuggestions, type DatePickerSuggestionsProps, DatePickerTrigger, type DateRange, Dialog, type DialogProps, DropdownMenu, DropdownMenuClear, type DropdownMenuClearProps, DropdownMenuContent, DropdownMenuHeading, type DropdownMenuHeadingProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuList, type DropdownMenuListProps, type DropdownMenuProps, DropdownMenuRadixItem, type DropdownMenuRadixItemProps, DropdownMenuRoot, DropdownMenuTrigger, EditableCell, type EditableCellProps, EmailCell, type EmailCellProps, EmptyState, type EmptyStateProps, type EnumOperator, FilterBar, FilterBarButton, type FilterBarButtonProps, FilterBarLeft, type FilterBarLeftProps, type FilterBarMode, type FilterBarProps, FilterBarRight, type FilterBarRightProps, FilterChip, type FilterChipProps, FilterChipSegment, type FilterChipSegmentProps, type FilterCondition, FilterEditor, type FilterEditorProps, type FilterOperator, type FilterState, FilterSystem, type FilterSystemProps, type FilterValue, InfoMessage, type InfoMessageProps, InputLabel, type InputLabelProps, InteractiveFilterChip, type InteractiveFilterChipProps, KebabMenu, type KebabMenuProps, Link, LinkCell, type LinkCellProps, type LinkProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalOverlay, ModalTitle, ModalTrigger, NumberCell, type NumberCellProps, NumberInput, type NumberInputProps, type NumberOperator, OPERATORS_BY_TYPE, OperatorList, type OperatorListProps, OperatorSelector, type OperatorSelectorProps, type OperatorType, type Product, ProductLogo, type ProductLogoProps, type PropertyDefinition, PropertySelector, type PropertySelectorProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RelationOperator, RowActions, type RowActionsProps, SaveViewButton, type SaveViewButtonProps, SearchBar, type SearchBarProps, Select, type SelectProps, SidePanel, SidePanelClose, SidePanelContent, type SidePanelContentProps, SidePanelTrigger, Sidebar, SidebarFooter, type SidebarFooterProps, SidebarHeader, SidebarHeadingItem, type SidebarHeadingItemProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SortButton, type SortButtonProps, type SortField, StatusCell, type StatusCellProps, SummaryChip, type SummaryChipProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabList, type TabListProps, TabTrigger, type TabTriggerProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, type TabsProps, Tag, type TagProps, type TagsOperator, TextArea, type TextAreaProps, TextCell, type TextCellProps, TextInput, type TextInputProps, type TextOperator, Toast, type ToastProps, ToastProvider, ToastViewport, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, UserMenu, UserMenuInfoRow, type UserMenuInfoRowProps, type UserMenuProps, UserMenuSection, type UserMenuSectionProps, ValueInput, type ValueInputProps, avatarVariants, badgeVariants, buttonVariants, chipInputVariants, cn, createFilterWithDefaults, emptyStateVariants, filterChipSegmentVariants, getDefaultOperator, getDefaultSuggestions, getValueInputType, infoMessageVariants, isNoValueOperator, linkVariants, modalVariants, productLogoVariants, searchBarVariants, selectVariants, sidebarItemVariants, tagVariants, textInputVariants, toastVariants, tooltipContentVariants, typographyVariants, useFilterBarMode, useSidebarContext };
|
|
1106
|
+
export { AdvancedChip, type AdvancedChipProps, AdvancedPopover, type AdvancedPopoverProps, AdvancedRow, type AdvancedRowProps, Avatar, AvatarCell, type AvatarCellProps, type AvatarProps, Badge, type BadgeProps, type BooleanOperator, BrowserTab, BrowserTabItem, type BrowserTabItemProps, type BrowserTabProps, BulkAction, type BulkActionItem, type BulkActionProps, Button, ButtonCell, type ButtonCellProps, type ButtonProps, Checkbox, type CheckboxProps, ChipInput, type ChipInputProps, DEFAULT_OPERATOR_BY_TYPE, DataTable, DataTablePagination, type DataTablePaginationProps, type DataTableProps, type DataType, DateCell, type DateCellProps, type DateOperator, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerFooter, type DatePickerFooterProps, type DatePickerMode, DatePickerPanel, type DatePickerPanelProps, DatePickerPopover, type DatePickerProps, DatePickerRoot, DatePickerSelects, type DatePickerSelectsProps, type DatePickerSuggestion, DatePickerSuggestions, type DatePickerSuggestionsProps, DatePickerTrigger, type DateRange, Dialog, type DialogProps, DropdownMenu, DropdownMenuClear, type DropdownMenuClearProps, DropdownMenuContent, DropdownMenuHeading, type DropdownMenuHeadingProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuList, type DropdownMenuListProps, type DropdownMenuProps, DropdownMenuRadixItem, type DropdownMenuRadixItemProps, DropdownMenuRoot, DropdownMenuTrigger, EditableCell, type EditableCellProps, EmailCell, type EmailCellProps, EmptyState, type EmptyStateProps, type EnumOperator, FilterBar, FilterBarButton, type FilterBarButtonProps, FilterBarLeft, type FilterBarLeftProps, type FilterBarMode, type FilterBarProps, FilterBarRight, type FilterBarRightProps, FilterChip, type FilterChipProps, FilterChipSegment, type FilterChipSegmentProps, type FilterCondition, FilterEditor, type FilterEditorProps, type FilterOperator, type FilterState, FilterSystem, type FilterSystemProps, type FilterValue, InfoMessage, type InfoMessageProps, InputLabel, type InputLabelProps, InteractiveFilterChip, type InteractiveFilterChipProps, KebabMenu, type KebabMenuProps, Link, LinkCell, type LinkCellProps, type LinkProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalOverlay, ModalTitle, ModalTrigger, NumberCell, type NumberCellProps, NumberInput, type NumberInputProps, type NumberOperator, OPERATORS_BY_TYPE, OperatorList, type OperatorListProps, OperatorSelector, type OperatorSelectorProps, type OperatorType, type Product, ProductLogo, type ProductLogoProps, type PropertyDefinition, PropertySelector, type PropertySelectorProps, RadioCard, RadioCardGroup, type RadioCardGroupProps, type RadioCardProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RelationOperator, RowActions, type RowActionsProps, SaveViewButton, type SaveViewButtonProps, SearchBar, type SearchBarProps, Select, type SelectProps, SidePanel, SidePanelClose, SidePanelContent, type SidePanelContentProps, SidePanelTrigger, Sidebar, SidebarFooter, type SidebarFooterProps, SidebarHeader, SidebarHeadingItem, type SidebarHeadingItemProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SortButton, type SortButtonProps, type SortField, StatusCell, type StatusCellProps, SummaryChip, type SummaryChipProps, Switch, SwitchCard, type SwitchCardProps, type SwitchProps, TabContent, type TabContentProps, TabList, type TabListProps, TabTrigger, type TabTriggerProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, type TabsProps, Tag, type TagProps, type TagsOperator, TextArea, type TextAreaProps, TextCell, type TextCellProps, TextInput, type TextInputProps, type TextOperator, Toast, type ToastProps, ToastProvider, ToastViewport, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, UserMenu, UserMenuInfoRow, type UserMenuInfoRowProps, type UserMenuProps, UserMenuSection, type UserMenuSectionProps, ValueInput, type ValueInputProps, avatarVariants, badgeVariants, buttonVariants, chipInputVariants, cn, createFilterWithDefaults, emptyStateVariants, filterChipSegmentVariants, getDefaultOperator, getDefaultSuggestions, getValueInputType, infoMessageVariants, isNoValueOperator, linkVariants, modalVariants, productLogoVariants, searchBarVariants, selectVariants, sidebarItemVariants, tagVariants, textInputVariants, toastVariants, tooltipContentVariants, typographyVariants, useFilterBarMode, useSidebarContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -149,6 +149,13 @@ interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimit
|
|
|
149
149
|
}
|
|
150
150
|
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
151
151
|
|
|
152
|
+
interface SwitchCardProps extends Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, "title"> {
|
|
153
|
+
title: string;
|
|
154
|
+
description?: string;
|
|
155
|
+
icon?: IconDefinition;
|
|
156
|
+
}
|
|
157
|
+
declare const SwitchCard: React.ForwardRefExoticComponent<SwitchCardProps & React.RefAttributes<HTMLButtonElement>>;
|
|
158
|
+
|
|
152
159
|
declare const searchBarVariants: (props?: ({
|
|
153
160
|
variant?: "white" | "grey" | null | undefined;
|
|
154
161
|
size?: "sm" | "md" | null | undefined;
|
|
@@ -196,6 +203,19 @@ interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof Radi
|
|
|
196
203
|
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
197
204
|
declare const RadioGroupItem: React.ForwardRefExoticComponent<RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
198
205
|
|
|
206
|
+
interface RadioCardProps extends Omit<React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, "title"> {
|
|
207
|
+
title: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
icon?: IconDefinition;
|
|
210
|
+
hideIndicator?: boolean;
|
|
211
|
+
}
|
|
212
|
+
interface RadioCardGroupProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root> {
|
|
213
|
+
label?: string;
|
|
214
|
+
orientation?: "horizontal" | "vertical";
|
|
215
|
+
}
|
|
216
|
+
declare const RadioCardGroup: React.ForwardRefExoticComponent<RadioCardGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
217
|
+
declare const RadioCard: React.ForwardRefExoticComponent<RadioCardProps & React.RefAttributes<HTMLButtonElement>>;
|
|
218
|
+
|
|
199
219
|
interface DropdownMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
200
220
|
}
|
|
201
221
|
declare const DropdownMenu: React.ForwardRefExoticComponent<DropdownMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -726,6 +746,22 @@ interface DynamicOption {
|
|
|
726
746
|
label: string;
|
|
727
747
|
description?: string;
|
|
728
748
|
}
|
|
749
|
+
/**
|
|
750
|
+
* Visual intent for a colored dot next to an enum option. Used when no icon is
|
|
751
|
+
* provided — e.g. status-style enums where color carries the semantic meaning.
|
|
752
|
+
*/
|
|
753
|
+
type EnumOptionIntent = "primary" | "success" | "warning" | "critical" | "neutral";
|
|
754
|
+
/**
|
|
755
|
+
* An enum option value. Plain strings are kept for backwards compatibility —
|
|
756
|
+
* the string is used as both the value and the label. Object form lets you
|
|
757
|
+
* attach an icon, a custom label, or a colored dot (via `intent`).
|
|
758
|
+
*/
|
|
759
|
+
type EnumOption = string | {
|
|
760
|
+
value: string;
|
|
761
|
+
label?: string;
|
|
762
|
+
icon?: _l3mpire_icons.IconDefinition;
|
|
763
|
+
intent?: EnumOptionIntent;
|
|
764
|
+
};
|
|
729
765
|
interface PropertyDefinition {
|
|
730
766
|
id: string;
|
|
731
767
|
label: string;
|
|
@@ -740,7 +776,7 @@ interface PropertyDefinition {
|
|
|
740
776
|
* whole group. Useful for "primary" groups that hold the most-used filters.
|
|
741
777
|
*/
|
|
742
778
|
groupPinned?: boolean;
|
|
743
|
-
options?:
|
|
779
|
+
options?: EnumOption[];
|
|
744
780
|
/**
|
|
745
781
|
* Dynamic/smart options rendered at the top of the value selector with a
|
|
746
782
|
* divider. Only used for enum, tags, and relation types. The app resolves
|
|
@@ -882,7 +918,7 @@ interface ValueInputProps {
|
|
|
882
918
|
value: FilterValue;
|
|
883
919
|
onChange: (value: FilterValue) => void;
|
|
884
920
|
onSubmit?: () => void;
|
|
885
|
-
options?:
|
|
921
|
+
options?: EnumOption[];
|
|
886
922
|
/** Dynamic/smart entries rendered at the top with a divider. */
|
|
887
923
|
dynamicOptions?: DynamicOption[];
|
|
888
924
|
className?: string;
|
|
@@ -1067,4 +1103,4 @@ declare const DatePickerTrigger: React.ForwardRefExoticComponent<PopoverPrimitiv
|
|
|
1067
1103
|
declare const DatePickerPopover: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1068
1104
|
declare function getDefaultSuggestions(referenceDate?: Date): DatePickerSuggestion[];
|
|
1069
1105
|
|
|
1070
|
-
export { AdvancedChip, type AdvancedChipProps, AdvancedPopover, type AdvancedPopoverProps, AdvancedRow, type AdvancedRowProps, Avatar, AvatarCell, type AvatarCellProps, type AvatarProps, Badge, type BadgeProps, type BooleanOperator, BrowserTab, BrowserTabItem, type BrowserTabItemProps, type BrowserTabProps, BulkAction, type BulkActionItem, type BulkActionProps, Button, ButtonCell, type ButtonCellProps, type ButtonProps, Checkbox, type CheckboxProps, ChipInput, type ChipInputProps, DEFAULT_OPERATOR_BY_TYPE, DataTable, DataTablePagination, type DataTablePaginationProps, type DataTableProps, type DataType, DateCell, type DateCellProps, type DateOperator, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerFooter, type DatePickerFooterProps, type DatePickerMode, DatePickerPanel, type DatePickerPanelProps, DatePickerPopover, type DatePickerProps, DatePickerRoot, DatePickerSelects, type DatePickerSelectsProps, type DatePickerSuggestion, DatePickerSuggestions, type DatePickerSuggestionsProps, DatePickerTrigger, type DateRange, Dialog, type DialogProps, DropdownMenu, DropdownMenuClear, type DropdownMenuClearProps, DropdownMenuContent, DropdownMenuHeading, type DropdownMenuHeadingProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuList, type DropdownMenuListProps, type DropdownMenuProps, DropdownMenuRadixItem, type DropdownMenuRadixItemProps, DropdownMenuRoot, DropdownMenuTrigger, EditableCell, type EditableCellProps, EmailCell, type EmailCellProps, EmptyState, type EmptyStateProps, type EnumOperator, FilterBar, FilterBarButton, type FilterBarButtonProps, FilterBarLeft, type FilterBarLeftProps, type FilterBarMode, type FilterBarProps, FilterBarRight, type FilterBarRightProps, FilterChip, type FilterChipProps, FilterChipSegment, type FilterChipSegmentProps, type FilterCondition, FilterEditor, type FilterEditorProps, type FilterOperator, type FilterState, FilterSystem, type FilterSystemProps, type FilterValue, InfoMessage, type InfoMessageProps, InputLabel, type InputLabelProps, InteractiveFilterChip, type InteractiveFilterChipProps, KebabMenu, type KebabMenuProps, Link, LinkCell, type LinkCellProps, type LinkProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalOverlay, ModalTitle, ModalTrigger, NumberCell, type NumberCellProps, NumberInput, type NumberInputProps, type NumberOperator, OPERATORS_BY_TYPE, OperatorList, type OperatorListProps, OperatorSelector, type OperatorSelectorProps, type OperatorType, type Product, ProductLogo, type ProductLogoProps, type PropertyDefinition, PropertySelector, type PropertySelectorProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RelationOperator, RowActions, type RowActionsProps, SaveViewButton, type SaveViewButtonProps, SearchBar, type SearchBarProps, Select, type SelectProps, SidePanel, SidePanelClose, SidePanelContent, type SidePanelContentProps, SidePanelTrigger, Sidebar, SidebarFooter, type SidebarFooterProps, SidebarHeader, SidebarHeadingItem, type SidebarHeadingItemProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SortButton, type SortButtonProps, type SortField, StatusCell, type StatusCellProps, SummaryChip, type SummaryChipProps, Switch, type SwitchProps, TabContent, type TabContentProps, TabList, type TabListProps, TabTrigger, type TabTriggerProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, type TabsProps, Tag, type TagProps, type TagsOperator, TextArea, type TextAreaProps, TextCell, type TextCellProps, TextInput, type TextInputProps, type TextOperator, Toast, type ToastProps, ToastProvider, ToastViewport, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, UserMenu, UserMenuInfoRow, type UserMenuInfoRowProps, type UserMenuProps, UserMenuSection, type UserMenuSectionProps, ValueInput, type ValueInputProps, avatarVariants, badgeVariants, buttonVariants, chipInputVariants, cn, createFilterWithDefaults, emptyStateVariants, filterChipSegmentVariants, getDefaultOperator, getDefaultSuggestions, getValueInputType, infoMessageVariants, isNoValueOperator, linkVariants, modalVariants, productLogoVariants, searchBarVariants, selectVariants, sidebarItemVariants, tagVariants, textInputVariants, toastVariants, tooltipContentVariants, typographyVariants, useFilterBarMode, useSidebarContext };
|
|
1106
|
+
export { AdvancedChip, type AdvancedChipProps, AdvancedPopover, type AdvancedPopoverProps, AdvancedRow, type AdvancedRowProps, Avatar, AvatarCell, type AvatarCellProps, type AvatarProps, Badge, type BadgeProps, type BooleanOperator, BrowserTab, BrowserTabItem, type BrowserTabItemProps, type BrowserTabProps, BulkAction, type BulkActionItem, type BulkActionProps, Button, ButtonCell, type ButtonCellProps, type ButtonProps, Checkbox, type CheckboxProps, ChipInput, type ChipInputProps, DEFAULT_OPERATOR_BY_TYPE, DataTable, DataTablePagination, type DataTablePaginationProps, type DataTableProps, type DataType, DateCell, type DateCellProps, type DateOperator, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerFooter, type DatePickerFooterProps, type DatePickerMode, DatePickerPanel, type DatePickerPanelProps, DatePickerPopover, type DatePickerProps, DatePickerRoot, DatePickerSelects, type DatePickerSelectsProps, type DatePickerSuggestion, DatePickerSuggestions, type DatePickerSuggestionsProps, DatePickerTrigger, type DateRange, Dialog, type DialogProps, DropdownMenu, DropdownMenuClear, type DropdownMenuClearProps, DropdownMenuContent, DropdownMenuHeading, type DropdownMenuHeadingProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuList, type DropdownMenuListProps, type DropdownMenuProps, DropdownMenuRadixItem, type DropdownMenuRadixItemProps, DropdownMenuRoot, DropdownMenuTrigger, EditableCell, type EditableCellProps, EmailCell, type EmailCellProps, EmptyState, type EmptyStateProps, type EnumOperator, FilterBar, FilterBarButton, type FilterBarButtonProps, FilterBarLeft, type FilterBarLeftProps, type FilterBarMode, type FilterBarProps, FilterBarRight, type FilterBarRightProps, FilterChip, type FilterChipProps, FilterChipSegment, type FilterChipSegmentProps, type FilterCondition, FilterEditor, type FilterEditorProps, type FilterOperator, type FilterState, FilterSystem, type FilterSystemProps, type FilterValue, InfoMessage, type InfoMessageProps, InputLabel, type InputLabelProps, InteractiveFilterChip, type InteractiveFilterChipProps, KebabMenu, type KebabMenuProps, Link, LinkCell, type LinkCellProps, type LinkProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalOverlay, ModalTitle, ModalTrigger, NumberCell, type NumberCellProps, NumberInput, type NumberInputProps, type NumberOperator, OPERATORS_BY_TYPE, OperatorList, type OperatorListProps, OperatorSelector, type OperatorSelectorProps, type OperatorType, type Product, ProductLogo, type ProductLogoProps, type PropertyDefinition, PropertySelector, type PropertySelectorProps, RadioCard, RadioCardGroup, type RadioCardGroupProps, type RadioCardProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RelationOperator, RowActions, type RowActionsProps, SaveViewButton, type SaveViewButtonProps, SearchBar, type SearchBarProps, Select, type SelectProps, SidePanel, SidePanelClose, SidePanelContent, type SidePanelContentProps, SidePanelTrigger, Sidebar, SidebarFooter, type SidebarFooterProps, SidebarHeader, SidebarHeadingItem, type SidebarHeadingItemProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, SortButton, type SortButtonProps, type SortField, StatusCell, type StatusCellProps, SummaryChip, type SummaryChipProps, Switch, SwitchCard, type SwitchCardProps, type SwitchProps, TabContent, type TabContentProps, TabList, type TabListProps, TabTrigger, type TabTriggerProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, type TabsProps, Tag, type TagProps, type TagsOperator, TextArea, type TextAreaProps, TextCell, type TextCellProps, TextInput, type TextInputProps, type TextOperator, Toast, type ToastProps, ToastProvider, ToastViewport, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, UserMenu, UserMenuInfoRow, type UserMenuInfoRowProps, type UserMenuProps, UserMenuSection, type UserMenuSectionProps, ValueInput, type ValueInputProps, avatarVariants, badgeVariants, buttonVariants, chipInputVariants, cn, createFilterWithDefaults, emptyStateVariants, filterChipSegmentVariants, getDefaultOperator, getDefaultSuggestions, getValueInputType, infoMessageVariants, isNoValueOperator, linkVariants, modalVariants, productLogoVariants, searchBarVariants, selectVariants, sidebarItemVariants, tagVariants, textInputVariants, toastVariants, tooltipContentVariants, typographyVariants, useFilterBarMode, useSidebarContext };
|