myoperator-ui 0.0.128 → 0.0.130
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/dist/index.js +207 -111
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -296,13 +296,18 @@ const buttonVariants = cva(
|
|
|
296
296
|
{
|
|
297
297
|
variants: {
|
|
298
298
|
variant: {
|
|
299
|
-
default:
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
default:
|
|
300
|
+
"bg-semantic-primary text-semantic-text-inverted hover:bg-semantic-primary-hover",
|
|
301
|
+
primary:
|
|
302
|
+
"bg-semantic-primary text-semantic-text-inverted hover:bg-semantic-primary-hover",
|
|
303
|
+
destructive:
|
|
304
|
+
"bg-semantic-error-primary text-semantic-text-inverted hover:bg-semantic-error-hover",
|
|
302
305
|
outline:
|
|
303
306
|
"border border-semantic-border-primary bg-transparent text-semantic-text-secondary hover:bg-semantic-primary-surface",
|
|
304
|
-
secondary:
|
|
305
|
-
|
|
307
|
+
secondary:
|
|
308
|
+
"bg-semantic-primary-surface text-semantic-text-secondary hover:bg-semantic-bg-hover",
|
|
309
|
+
ghost:
|
|
310
|
+
"text-semantic-text-muted hover:bg-semantic-bg-ui hover:text-semantic-text-primary",
|
|
306
311
|
link: "text-semantic-text-secondary underline-offset-4 hover:underline",
|
|
307
312
|
dashed:
|
|
308
313
|
"border border-dashed border-semantic-bg-hover bg-transparent text-semantic-text-muted hover:border-semantic-border-primary hover:text-semantic-text-secondary hover:bg-[var(--color-neutral-50)]",
|
|
@@ -433,7 +438,8 @@ const badgeVariants = cva(
|
|
|
433
438
|
primary: "bg-semantic-bg-ui text-semantic-text-primary",
|
|
434
439
|
// shadcn-style variants (new)
|
|
435
440
|
secondary: "bg-semantic-bg-ui text-semantic-text-primary",
|
|
436
|
-
outline:
|
|
441
|
+
outline:
|
|
442
|
+
"border border-semantic-border-layout bg-transparent text-semantic-text-primary",
|
|
437
443
|
destructive: "bg-semantic-error-surface text-semantic-error-primary",
|
|
438
444
|
},
|
|
439
445
|
size: {
|
|
@@ -944,7 +950,10 @@ const SelectLabel = React.forwardRef<
|
|
|
944
950
|
>(({ className, ...props }, ref) => (
|
|
945
951
|
<SelectPrimitive.Label
|
|
946
952
|
ref={ref}
|
|
947
|
-
className={cn(
|
|
953
|
+
className={cn(
|
|
954
|
+
"px-4 py-1.5 text-xs font-medium text-semantic-text-muted",
|
|
955
|
+
className
|
|
956
|
+
)}
|
|
948
957
|
{...props}
|
|
949
958
|
/>
|
|
950
959
|
));
|
|
@@ -1586,10 +1595,15 @@ const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
1586
1595
|
{label && (
|
|
1587
1596
|
<label
|
|
1588
1597
|
htmlFor={inputId}
|
|
1589
|
-
className={cn(
|
|
1598
|
+
className={cn(
|
|
1599
|
+
"text-xs font-normal text-semantic-text-muted",
|
|
1600
|
+
labelClassName
|
|
1601
|
+
)}
|
|
1590
1602
|
>
|
|
1591
1603
|
{label}
|
|
1592
|
-
{required &&
|
|
1604
|
+
{required && (
|
|
1605
|
+
<span className="text-semantic-error-primary ml-0.5">*</span>
|
|
1606
|
+
)}
|
|
1593
1607
|
</label>
|
|
1594
1608
|
)}
|
|
1595
1609
|
|
|
@@ -1638,7 +1652,10 @@ const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
1638
1652
|
{(error || helperText || (showCount && maxLength)) && (
|
|
1639
1653
|
<div className="flex justify-between items-start gap-2">
|
|
1640
1654
|
{error ? (
|
|
1641
|
-
<span
|
|
1655
|
+
<span
|
|
1656
|
+
id={errorId}
|
|
1657
|
+
className="text-xs text-semantic-error-primary"
|
|
1658
|
+
>
|
|
1642
1659
|
{error}
|
|
1643
1660
|
</span>
|
|
1644
1661
|
) : helperText ? (
|
|
@@ -1652,7 +1669,9 @@ const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
|
|
|
1652
1669
|
<span
|
|
1653
1670
|
className={cn(
|
|
1654
1671
|
"text-xs",
|
|
1655
|
-
charCount > maxLength
|
|
1672
|
+
charCount > maxLength
|
|
1673
|
+
? "text-semantic-error-primary"
|
|
1674
|
+
: "text-semantic-text-muted"
|
|
1656
1675
|
)}
|
|
1657
1676
|
>
|
|
1658
1677
|
{charCount}/{maxLength}
|
|
@@ -1849,10 +1868,15 @@ const SelectField = React.forwardRef<HTMLButtonElement, SelectFieldProps>(
|
|
|
1849
1868
|
{label && (
|
|
1850
1869
|
<label
|
|
1851
1870
|
htmlFor={selectId}
|
|
1852
|
-
className={cn(
|
|
1871
|
+
className={cn(
|
|
1872
|
+
"text-xs font-normal text-semantic-text-muted",
|
|
1873
|
+
labelClassName
|
|
1874
|
+
)}
|
|
1853
1875
|
>
|
|
1854
1876
|
{label}
|
|
1855
|
-
{required &&
|
|
1877
|
+
{required && (
|
|
1878
|
+
<span className="text-semantic-error-primary ml-0.5">*</span>
|
|
1879
|
+
)}
|
|
1856
1880
|
</label>
|
|
1857
1881
|
)}
|
|
1858
1882
|
|
|
@@ -1941,7 +1965,10 @@ const SelectField = React.forwardRef<HTMLButtonElement, SelectFieldProps>(
|
|
|
1941
1965
|
{(error || helperText) && (
|
|
1942
1966
|
<div className="flex justify-between items-start gap-2">
|
|
1943
1967
|
{error ? (
|
|
1944
|
-
<span
|
|
1968
|
+
<span
|
|
1969
|
+
id={errorId}
|
|
1970
|
+
className="text-xs text-semantic-error-primary"
|
|
1971
|
+
>
|
|
1945
1972
|
{error}
|
|
1946
1973
|
</span>
|
|
1947
1974
|
) : helperText ? (
|
|
@@ -2209,10 +2236,15 @@ const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(
|
|
|
2209
2236
|
{label && (
|
|
2210
2237
|
<label
|
|
2211
2238
|
htmlFor={selectId}
|
|
2212
|
-
className={cn(
|
|
2239
|
+
className={cn(
|
|
2240
|
+
"text-xs font-normal text-semantic-text-muted",
|
|
2241
|
+
labelClassName
|
|
2242
|
+
)}
|
|
2213
2243
|
>
|
|
2214
2244
|
{label}
|
|
2215
|
-
{required &&
|
|
2245
|
+
{required && (
|
|
2246
|
+
<span className="text-semantic-error-primary ml-0.5">*</span>
|
|
2247
|
+
)}
|
|
2216
2248
|
</label>
|
|
2217
2249
|
)}
|
|
2218
2250
|
|
|
@@ -2237,7 +2269,9 @@ const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(
|
|
|
2237
2269
|
>
|
|
2238
2270
|
<div className="flex-1 flex flex-wrap gap-1">
|
|
2239
2271
|
{selectedValues.length === 0 ? (
|
|
2240
|
-
<span className="text-semantic-text-placeholder">
|
|
2272
|
+
<span className="text-semantic-text-placeholder">
|
|
2273
|
+
{placeholder}
|
|
2274
|
+
</span>
|
|
2241
2275
|
) : (
|
|
2242
2276
|
selectedLabels.map((label, index) => (
|
|
2243
2277
|
<span
|
|
@@ -2384,7 +2418,10 @@ const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>(
|
|
|
2384
2418
|
{(error || helperText) && (
|
|
2385
2419
|
<div className="flex justify-between items-start gap-2">
|
|
2386
2420
|
{error ? (
|
|
2387
|
-
<span
|
|
2421
|
+
<span
|
|
2422
|
+
id={errorId}
|
|
2423
|
+
className="text-xs text-semantic-error-primary"
|
|
2424
|
+
>
|
|
2388
2425
|
{error}
|
|
2389
2426
|
</span>
|
|
2390
2427
|
) : helperText ? (
|
|
@@ -2579,7 +2616,10 @@ const TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(
|
|
|
2579
2616
|
</span>
|
|
2580
2617
|
)}
|
|
2581
2618
|
{infoTooltip && (
|
|
2582
|
-
<span
|
|
2619
|
+
<span
|
|
2620
|
+
className="text-[var(--color-neutral-400)] cursor-help"
|
|
2621
|
+
title={infoTooltip}
|
|
2622
|
+
>
|
|
2583
2623
|
\u24D8
|
|
2584
2624
|
</span>
|
|
2585
2625
|
)}
|
|
@@ -2663,7 +2703,10 @@ export interface TableEmptyProps {
|
|
|
2663
2703
|
|
|
2664
2704
|
const TableEmpty = ({ colSpan, children }: TableEmptyProps) => (
|
|
2665
2705
|
<TableRow>
|
|
2666
|
-
<TableCell
|
|
2706
|
+
<TableCell
|
|
2707
|
+
colSpan={colSpan}
|
|
2708
|
+
className="text-center py-8 text-semantic-text-muted"
|
|
2709
|
+
>
|
|
2667
2710
|
{children || "No data available"}
|
|
2668
2711
|
</TableCell>
|
|
2669
2712
|
</TableRow>
|
|
@@ -2786,7 +2829,8 @@ const dialogContentVariants = cva(
|
|
|
2786
2829
|
);
|
|
2787
2830
|
|
|
2788
2831
|
export interface DialogContentProps
|
|
2789
|
-
extends
|
|
2832
|
+
extends
|
|
2833
|
+
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,
|
|
2790
2834
|
VariantProps<typeof dialogContentVariants> {
|
|
2791
2835
|
/** Hide the default close button in the top-right corner */
|
|
2792
2836
|
hideCloseButton?: boolean;
|
|
@@ -3337,7 +3381,8 @@ const DeleteConfirmationModal = React.forwardRef<
|
|
|
3337
3381
|
<DialogHeader>
|
|
3338
3382
|
<DialogTitle>{title || defaultTitle}</DialogTitle>
|
|
3339
3383
|
<DialogDescription className={description ? undefined : "sr-only"}>
|
|
3340
|
-
{description ||
|
|
3384
|
+
{description ||
|
|
3385
|
+
"Delete confirmation dialog - this action cannot be undone"}
|
|
3341
3386
|
</DialogDescription>
|
|
3342
3387
|
</DialogHeader>
|
|
3343
3388
|
<div className="grid gap-2 py-4">
|
|
@@ -3706,11 +3751,16 @@ const alertVariants = cva(
|
|
|
3706
3751
|
{
|
|
3707
3752
|
variants: {
|
|
3708
3753
|
variant: {
|
|
3709
|
-
default:
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3754
|
+
default:
|
|
3755
|
+
"bg-semantic-bg-ui border-semantic-border-layout [&>svg]:text-semantic-text-primary",
|
|
3756
|
+
success:
|
|
3757
|
+
"bg-semantic-success-surface border-semantic-success-border [&>svg]:text-semantic-success-primary",
|
|
3758
|
+
error:
|
|
3759
|
+
"bg-semantic-error-surface border-semantic-error-border [&>svg]:text-semantic-error-primary",
|
|
3760
|
+
destructive:
|
|
3761
|
+
"bg-semantic-error-surface border-semantic-error-border [&>svg]:text-semantic-error-primary",
|
|
3762
|
+
warning:
|
|
3763
|
+
"bg-semantic-warning-surface border-semantic-warning-border [&>svg]:text-semantic-warning-primary",
|
|
3714
3764
|
info: "bg-semantic-info-surface border-semantic-info-border [&>svg]:text-semantic-info-primary",
|
|
3715
3765
|
},
|
|
3716
3766
|
},
|
|
@@ -3844,10 +3894,12 @@ const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
|
|
|
3844
3894
|
className={cn(
|
|
3845
3895
|
"rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
3846
3896
|
variant === "default" && "focus:ring-semantic-text-primary",
|
|
3847
|
-
variant === "success" &&
|
|
3897
|
+
variant === "success" &&
|
|
3898
|
+
"focus:ring-semantic-success-primary",
|
|
3848
3899
|
(variant === "error" || variant === "destructive") &&
|
|
3849
3900
|
"focus:ring-semantic-error-primary",
|
|
3850
|
-
variant === "warning" &&
|
|
3901
|
+
variant === "warning" &&
|
|
3902
|
+
"focus:ring-semantic-warning-primary",
|
|
3851
3903
|
variant === "info" && "focus:ring-semantic-info-primary"
|
|
3852
3904
|
)}
|
|
3853
3905
|
aria-label="Close alert"
|
|
@@ -3937,10 +3989,14 @@ const toastVariants = cva(
|
|
|
3937
3989
|
{
|
|
3938
3990
|
variants: {
|
|
3939
3991
|
variant: {
|
|
3940
|
-
default:
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3992
|
+
default:
|
|
3993
|
+
"border-semantic-border-layout bg-semantic-bg-primary text-semantic-text-primary",
|
|
3994
|
+
success:
|
|
3995
|
+
"border-semantic-success-border bg-semantic-success-surface text-semantic-success-hover",
|
|
3996
|
+
error:
|
|
3997
|
+
"border-semantic-error-border bg-semantic-error-surface text-semantic-error-hover",
|
|
3998
|
+
warning:
|
|
3999
|
+
"border-semantic-warning-border bg-semantic-warning-surface text-semantic-warning-hover",
|
|
3944
4000
|
info: "border-semantic-info-border bg-semantic-info-surface text-semantic-info-hover",
|
|
3945
4001
|
},
|
|
3946
4002
|
},
|
|
@@ -4034,7 +4090,6 @@ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
|
4034
4090
|
|
|
4035
4091
|
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
4036
4092
|
|
|
4037
|
-
|
|
4038
4093
|
export {
|
|
4039
4094
|
type ToastProps,
|
|
4040
4095
|
type ToastActionElement,
|
|
@@ -4279,11 +4334,23 @@ function Toaster() {
|
|
|
4279
4334
|
|
|
4280
4335
|
return (
|
|
4281
4336
|
<ToastProvider>
|
|
4282
|
-
{toasts.map(function ({
|
|
4337
|
+
{toasts.map(function ({
|
|
4338
|
+
id,
|
|
4339
|
+
title,
|
|
4340
|
+
description,
|
|
4341
|
+
action,
|
|
4342
|
+
variant,
|
|
4343
|
+
...props
|
|
4344
|
+
}) {
|
|
4283
4345
|
const Icon = variant ? variantIcons[variant] : null;
|
|
4284
4346
|
|
|
4285
4347
|
return (
|
|
4286
|
-
<Toast
|
|
4348
|
+
<Toast
|
|
4349
|
+
key={id}
|
|
4350
|
+
variant={variant}
|
|
4351
|
+
className={variant ?? undefined}
|
|
4352
|
+
{...props}
|
|
4353
|
+
>
|
|
4287
4354
|
<div className="flex gap-3">
|
|
4288
4355
|
{Icon && (
|
|
4289
4356
|
<Icon
|
|
@@ -4404,7 +4471,8 @@ const accordionVariants = cva("w-full", {
|
|
|
4404
4471
|
variants: {
|
|
4405
4472
|
variant: {
|
|
4406
4473
|
default: "",
|
|
4407
|
-
bordered:
|
|
4474
|
+
bordered:
|
|
4475
|
+
"border border-semantic-border-layout rounded-lg divide-y divide-semantic-border-layout",
|
|
4408
4476
|
},
|
|
4409
4477
|
},
|
|
4410
4478
|
defaultVariants: {
|
|
@@ -4910,7 +4978,9 @@ const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(
|
|
|
4910
4978
|
|
|
4911
4979
|
// Render actions for desktop (all inline)
|
|
4912
4980
|
const renderDesktopActions = () => (
|
|
4913
|
-
<div className="hidden sm:flex items-center gap-2 ml-6">
|
|
4981
|
+
<div className="hidden sm:flex items-center gap-2 ml-6">
|
|
4982
|
+
{actionsArray}
|
|
4983
|
+
</div>
|
|
4914
4984
|
);
|
|
4915
4985
|
|
|
4916
4986
|
// Render expandable actions (for mobile and vertical layout)
|
|
@@ -5228,7 +5298,9 @@ export const EventSelector = React.forwardRef<
|
|
|
5228
5298
|
{title}
|
|
5229
5299
|
</h3>
|
|
5230
5300
|
{description && (
|
|
5231
|
-
<p className="m-0 text-sm text-semantic-text-muted mt-1">
|
|
5301
|
+
<p className="m-0 text-sm text-semantic-text-muted mt-1">
|
|
5302
|
+
{description}
|
|
5303
|
+
</p>
|
|
5232
5304
|
)}
|
|
5233
5305
|
</div>
|
|
5234
5306
|
<span className="text-sm font-medium text-semantic-text-primary">
|
|
@@ -5347,7 +5419,9 @@ export const EventGroupComponent = React.forwardRef<
|
|
|
5347
5419
|
className="mt-0.5"
|
|
5348
5420
|
/>
|
|
5349
5421
|
<div className="flex-1 min-w-0">
|
|
5350
|
-
<span className="font-medium text-semantic-text-primary">
|
|
5422
|
+
<span className="font-medium text-semantic-text-primary">
|
|
5423
|
+
{event.name}
|
|
5424
|
+
</span>
|
|
5351
5425
|
<p className="m-0 text-sm text-semantic-text-muted mt-0.5">
|
|
5352
5426
|
{event.description}
|
|
5353
5427
|
</p>
|
|
@@ -5360,10 +5434,13 @@ export const EventGroupComponent = React.forwardRef<
|
|
|
5360
5434
|
// Multiple events: render as collapsible accordion
|
|
5361
5435
|
return (
|
|
5362
5436
|
<div ref={ref} className={cn("bg-white", className)} {...props}>
|
|
5363
|
-
<Accordion
|
|
5437
|
+
<Accordion
|
|
5438
|
+
type="multiple"
|
|
5439
|
+
defaultValue={defaultExpanded ? [group.id] : []}
|
|
5440
|
+
>
|
|
5364
5441
|
<AccordionItem value={group.id}>
|
|
5365
5442
|
{/* Header row with checkbox OUTSIDE the trigger button to avoid nested buttons */}
|
|
5366
|
-
<div className="flex items-center gap-3 p-4 hover:bg-
|
|
5443
|
+
<div className="flex items-center gap-3 p-4 hover:bg-neutral-200">
|
|
5367
5444
|
<Checkbox
|
|
5368
5445
|
checked={checkboxState}
|
|
5369
5446
|
onCheckedChange={handleGroupCheckbox}
|
|
@@ -5377,7 +5454,9 @@ export const EventGroupComponent = React.forwardRef<
|
|
|
5377
5454
|
<div className="flex flex-col items-start text-left flex-1 min-w-0">
|
|
5378
5455
|
<div className="flex items-center gap-2">
|
|
5379
5456
|
{group.icon && (
|
|
5380
|
-
<span className="text-semantic-text-muted">
|
|
5457
|
+
<span className="text-semantic-text-muted">
|
|
5458
|
+
{group.icon}
|
|
5459
|
+
</span>
|
|
5381
5460
|
)}
|
|
5382
5461
|
<span className="font-medium text-semantic-text-primary">
|
|
5383
5462
|
{group.name}
|
|
@@ -5443,7 +5522,10 @@ export const EventItemComponent = React.forwardRef<
|
|
|
5443
5522
|
return (
|
|
5444
5523
|
<div
|
|
5445
5524
|
ref={ref}
|
|
5446
|
-
className={cn(
|
|
5525
|
+
className={cn(
|
|
5526
|
+
"flex items-start gap-3 py-2 pl-8 pr-4 hover:bg-neutral-200",
|
|
5527
|
+
className
|
|
5528
|
+
)}
|
|
5447
5529
|
{...props}
|
|
5448
5530
|
>
|
|
5449
5531
|
<Checkbox
|
|
@@ -5452,7 +5534,9 @@ export const EventItemComponent = React.forwardRef<
|
|
|
5452
5534
|
aria-label={\`Select \${event.name}\`}
|
|
5453
5535
|
/>
|
|
5454
5536
|
<div className="flex-1 min-w-0">
|
|
5455
|
-
<div className="text-sm font-medium text-semantic-text-primary">
|
|
5537
|
+
<div className="text-sm font-medium text-semantic-text-primary">
|
|
5538
|
+
{event.name}
|
|
5539
|
+
</div>
|
|
5456
5540
|
<div className="text-sm text-semantic-text-muted mt-0.5 leading-relaxed">
|
|
5457
5541
|
{event.description}
|
|
5458
5542
|
</div>
|
|
@@ -5465,20 +5549,20 @@ EventItemComponent.displayName = "EventItemComponent";
|
|
|
5465
5549
|
},
|
|
5466
5550
|
{
|
|
5467
5551
|
name: "types.ts",
|
|
5468
|
-
content: prefixTailwindClasses(`import * as React from "react"
|
|
5552
|
+
content: prefixTailwindClasses(`import * as React from "react";
|
|
5469
5553
|
|
|
5470
5554
|
/**
|
|
5471
5555
|
* Represents an individual event item
|
|
5472
5556
|
*/
|
|
5473
5557
|
export interface EventItem {
|
|
5474
5558
|
/** Unique identifier for the event */
|
|
5475
|
-
id: string
|
|
5559
|
+
id: string;
|
|
5476
5560
|
/** Display name of the event (e.g., "Call.Initiated") */
|
|
5477
|
-
name: string
|
|
5561
|
+
name: string;
|
|
5478
5562
|
/** Description of when this event is triggered */
|
|
5479
|
-
description: string
|
|
5563
|
+
description: string;
|
|
5480
5564
|
/** Group ID this event belongs to */
|
|
5481
|
-
group: string
|
|
5565
|
+
group: string;
|
|
5482
5566
|
}
|
|
5483
5567
|
|
|
5484
5568
|
/**
|
|
@@ -5486,13 +5570,13 @@ export interface EventItem {
|
|
|
5486
5570
|
*/
|
|
5487
5571
|
export interface EventGroup {
|
|
5488
5572
|
/** Unique identifier for the group */
|
|
5489
|
-
id: string
|
|
5573
|
+
id: string;
|
|
5490
5574
|
/** Display name of the group (e.g., "In-Call Events") */
|
|
5491
|
-
name: string
|
|
5575
|
+
name: string;
|
|
5492
5576
|
/** Description of the group */
|
|
5493
|
-
description: string
|
|
5577
|
+
description: string;
|
|
5494
5578
|
/** Optional icon to display next to the group name */
|
|
5495
|
-
icon?: React.ReactNode
|
|
5579
|
+
icon?: React.ReactNode;
|
|
5496
5580
|
}
|
|
5497
5581
|
|
|
5498
5582
|
/**
|
|
@@ -5500,13 +5584,13 @@ export interface EventGroup {
|
|
|
5500
5584
|
*/
|
|
5501
5585
|
export interface EventCategory {
|
|
5502
5586
|
/** Unique identifier for the category */
|
|
5503
|
-
id: string
|
|
5587
|
+
id: string;
|
|
5504
5588
|
/** Display name of the category (e.g., "Call Events (Voice)") */
|
|
5505
|
-
name: string
|
|
5589
|
+
name: string;
|
|
5506
5590
|
/** Optional icon to display next to the category name */
|
|
5507
|
-
icon?: React.ReactNode
|
|
5591
|
+
icon?: React.ReactNode;
|
|
5508
5592
|
/** Array of group IDs that belong to this category */
|
|
5509
|
-
groups: string[]
|
|
5593
|
+
groups: string[];
|
|
5510
5594
|
}
|
|
5511
5595
|
|
|
5512
5596
|
/**
|
|
@@ -5515,35 +5599,35 @@ export interface EventCategory {
|
|
|
5515
5599
|
export interface EventSelectorProps {
|
|
5516
5600
|
// Data
|
|
5517
5601
|
/** Array of event items */
|
|
5518
|
-
events: EventItem[]
|
|
5602
|
+
events: EventItem[];
|
|
5519
5603
|
/** Array of event groups */
|
|
5520
|
-
groups: EventGroup[]
|
|
5604
|
+
groups: EventGroup[];
|
|
5521
5605
|
/** Optional array of categories for top-level grouping */
|
|
5522
|
-
categories?: EventCategory[]
|
|
5606
|
+
categories?: EventCategory[];
|
|
5523
5607
|
|
|
5524
5608
|
// State (controlled mode)
|
|
5525
5609
|
/** Array of selected event IDs (controlled) */
|
|
5526
|
-
selectedEvents?: string[]
|
|
5610
|
+
selectedEvents?: string[];
|
|
5527
5611
|
/** Callback when selection changes */
|
|
5528
|
-
onSelectionChange?: (selectedIds: string[]) => void
|
|
5612
|
+
onSelectionChange?: (selectedIds: string[]) => void;
|
|
5529
5613
|
|
|
5530
5614
|
// State (uncontrolled mode)
|
|
5531
5615
|
/** Default selected events for uncontrolled usage */
|
|
5532
|
-
defaultSelectedEvents?: string[]
|
|
5616
|
+
defaultSelectedEvents?: string[];
|
|
5533
5617
|
|
|
5534
5618
|
// Customization
|
|
5535
5619
|
/** Title displayed at the top (default: "Events") */
|
|
5536
|
-
title?: string
|
|
5620
|
+
title?: string;
|
|
5537
5621
|
/** Description displayed below the title */
|
|
5538
|
-
description?: string
|
|
5622
|
+
description?: string;
|
|
5539
5623
|
/** Message shown when a group has no events */
|
|
5540
|
-
emptyGroupMessage?: string
|
|
5624
|
+
emptyGroupMessage?: string;
|
|
5541
5625
|
/** Custom render function for empty group state (overrides emptyGroupMessage) */
|
|
5542
|
-
renderEmptyGroup?: (group: EventGroup) => React.ReactNode
|
|
5626
|
+
renderEmptyGroup?: (group: EventGroup) => React.ReactNode;
|
|
5543
5627
|
|
|
5544
5628
|
// Styling
|
|
5545
5629
|
/** Additional CSS classes for the root element */
|
|
5546
|
-
className?: string
|
|
5630
|
+
className?: string;
|
|
5547
5631
|
}
|
|
5548
5632
|
|
|
5549
5633
|
/**
|
|
@@ -5551,19 +5635,19 @@ export interface EventSelectorProps {
|
|
|
5551
5635
|
*/
|
|
5552
5636
|
export interface EventGroupComponentProps {
|
|
5553
5637
|
/** The group data */
|
|
5554
|
-
group: EventGroup
|
|
5638
|
+
group: EventGroup;
|
|
5555
5639
|
/** Events that belong to this group */
|
|
5556
|
-
events: EventItem[]
|
|
5640
|
+
events: EventItem[];
|
|
5557
5641
|
/** Currently selected event IDs */
|
|
5558
|
-
selectedEvents: string[]
|
|
5642
|
+
selectedEvents: string[];
|
|
5559
5643
|
/** Callback to update selected events */
|
|
5560
|
-
onSelectionChange: (selectedIds: string[]) => void
|
|
5644
|
+
onSelectionChange: (selectedIds: string[]) => void;
|
|
5561
5645
|
/** Message shown when group has no events */
|
|
5562
|
-
emptyGroupMessage?: string
|
|
5646
|
+
emptyGroupMessage?: string;
|
|
5563
5647
|
/** Custom render function for empty group state */
|
|
5564
|
-
renderEmptyGroup?: (group: EventGroup) => React.ReactNode
|
|
5648
|
+
renderEmptyGroup?: (group: EventGroup) => React.ReactNode;
|
|
5565
5649
|
/** Whether the accordion should be expanded by default (default: false) */
|
|
5566
|
-
defaultExpanded?: boolean
|
|
5650
|
+
defaultExpanded?: boolean;
|
|
5567
5651
|
}
|
|
5568
5652
|
|
|
5569
5653
|
/**
|
|
@@ -5571,11 +5655,11 @@ export interface EventGroupComponentProps {
|
|
|
5571
5655
|
*/
|
|
5572
5656
|
export interface EventItemComponentProps {
|
|
5573
5657
|
/** The event data */
|
|
5574
|
-
event: EventItem
|
|
5658
|
+
event: EventItem;
|
|
5575
5659
|
/** Whether this event is selected */
|
|
5576
|
-
isSelected: boolean
|
|
5660
|
+
isSelected: boolean;
|
|
5577
5661
|
/** Callback when selection changes */
|
|
5578
|
-
onSelectionChange: (selected: boolean) => void
|
|
5662
|
+
onSelectionChange: (selected: boolean) => void;
|
|
5579
5663
|
}
|
|
5580
5664
|
`, prefix)
|
|
5581
5665
|
}
|
|
@@ -5755,7 +5839,9 @@ export const KeyValueInput = React.forwardRef<
|
|
|
5755
5839
|
{title}
|
|
5756
5840
|
</h3>
|
|
5757
5841
|
{description && (
|
|
5758
|
-
<p className="m-0 text-sm text-semantic-text-muted mt-1">
|
|
5842
|
+
<p className="m-0 text-sm text-semantic-text-muted mt-1">
|
|
5843
|
+
{description}
|
|
5844
|
+
</p>
|
|
5759
5845
|
)}
|
|
5760
5846
|
</div>
|
|
5761
5847
|
|
|
@@ -5767,13 +5853,21 @@ export const KeyValueInput = React.forwardRef<
|
|
|
5767
5853
|
<div className="flex-1">
|
|
5768
5854
|
<span className="text-sm font-medium text-semantic-text-primary">
|
|
5769
5855
|
{keyLabel}
|
|
5770
|
-
{keyRequired &&
|
|
5856
|
+
{keyRequired && (
|
|
5857
|
+
<span className="text-semantic-error-primary ml-0.5">
|
|
5858
|
+
*
|
|
5859
|
+
</span>
|
|
5860
|
+
)}
|
|
5771
5861
|
</span>
|
|
5772
5862
|
</div>
|
|
5773
5863
|
<div className="flex-1">
|
|
5774
5864
|
<span className="text-sm font-medium text-semantic-text-primary">
|
|
5775
5865
|
{valueLabel}
|
|
5776
|
-
{valueRequired &&
|
|
5866
|
+
{valueRequired && (
|
|
5867
|
+
<span className="text-semantic-error-primary ml-0.5">
|
|
5868
|
+
*
|
|
5869
|
+
</span>
|
|
5870
|
+
)}
|
|
5777
5871
|
</span>
|
|
5778
5872
|
</div>
|
|
5779
5873
|
{/* Spacer for delete button column */}
|
|
@@ -5788,7 +5882,9 @@ export const KeyValueInput = React.forwardRef<
|
|
|
5788
5882
|
pair={pair}
|
|
5789
5883
|
isDuplicateKey={duplicateKeys.has(pair.key.toLowerCase())}
|
|
5790
5884
|
isKeyEmpty={touchedKeys.has(pair.id) && !pair.key.trim()}
|
|
5791
|
-
isValueEmpty={
|
|
5885
|
+
isValueEmpty={
|
|
5886
|
+
touchedValues.has(pair.id) && !pair.value.trim()
|
|
5887
|
+
}
|
|
5792
5888
|
keyRequired={keyRequired}
|
|
5793
5889
|
valueRequired={valueRequired}
|
|
5794
5890
|
keyPlaceholder={keyPlaceholder}
|
|
@@ -5921,11 +6017,11 @@ KeyValueRow.displayName = "KeyValueRow";
|
|
|
5921
6017
|
*/
|
|
5922
6018
|
export interface KeyValuePair {
|
|
5923
6019
|
/** Unique identifier for the pair */
|
|
5924
|
-
id: string
|
|
6020
|
+
id: string;
|
|
5925
6021
|
/** The key (e.g., header name) */
|
|
5926
|
-
key: string
|
|
6022
|
+
key: string;
|
|
5927
6023
|
/** The value (e.g., header value) */
|
|
5928
|
-
value: string
|
|
6024
|
+
value: string;
|
|
5929
6025
|
}
|
|
5930
6026
|
|
|
5931
6027
|
/**
|
|
@@ -5934,41 +6030,41 @@ export interface KeyValuePair {
|
|
|
5934
6030
|
export interface KeyValueInputProps {
|
|
5935
6031
|
// Customization
|
|
5936
6032
|
/** Title displayed at the top (e.g., "HTTP Headers") */
|
|
5937
|
-
title: string
|
|
6033
|
+
title: string;
|
|
5938
6034
|
/** Description displayed below the title */
|
|
5939
|
-
description?: string
|
|
6035
|
+
description?: string;
|
|
5940
6036
|
/** Text for the add button (default: "Add Header") */
|
|
5941
|
-
addButtonText?: string
|
|
6037
|
+
addButtonText?: string;
|
|
5942
6038
|
/** Maximum number of items allowed (default: 10) */
|
|
5943
|
-
maxItems?: number
|
|
6039
|
+
maxItems?: number;
|
|
5944
6040
|
/** Placeholder for key input */
|
|
5945
|
-
keyPlaceholder?: string
|
|
6041
|
+
keyPlaceholder?: string;
|
|
5946
6042
|
/** Placeholder for value input */
|
|
5947
|
-
valuePlaceholder?: string
|
|
6043
|
+
valuePlaceholder?: string;
|
|
5948
6044
|
/** Label for key column header (default: "Key") */
|
|
5949
|
-
keyLabel?: string
|
|
6045
|
+
keyLabel?: string;
|
|
5950
6046
|
/** Label for value column header (default: "Value") */
|
|
5951
|
-
valueLabel?: string
|
|
6047
|
+
valueLabel?: string;
|
|
5952
6048
|
|
|
5953
6049
|
// Validation
|
|
5954
6050
|
/** Whether key field is required (default: true) */
|
|
5955
|
-
keyRequired?: boolean
|
|
6051
|
+
keyRequired?: boolean;
|
|
5956
6052
|
/** Whether value field is required (default: true) */
|
|
5957
|
-
valueRequired?: boolean
|
|
6053
|
+
valueRequired?: boolean;
|
|
5958
6054
|
|
|
5959
6055
|
// State (controlled mode)
|
|
5960
6056
|
/** Array of key-value pairs (controlled) */
|
|
5961
|
-
value?: KeyValuePair[]
|
|
6057
|
+
value?: KeyValuePair[];
|
|
5962
6058
|
/** Callback when pairs change */
|
|
5963
|
-
onChange?: (pairs: KeyValuePair[]) => void
|
|
6059
|
+
onChange?: (pairs: KeyValuePair[]) => void;
|
|
5964
6060
|
|
|
5965
6061
|
// State (uncontrolled mode)
|
|
5966
6062
|
/** Default key-value pairs for uncontrolled usage */
|
|
5967
|
-
defaultValue?: KeyValuePair[]
|
|
6063
|
+
defaultValue?: KeyValuePair[];
|
|
5968
6064
|
|
|
5969
6065
|
// Styling
|
|
5970
6066
|
/** Additional CSS classes for the root element */
|
|
5971
|
-
className?: string
|
|
6067
|
+
className?: string;
|
|
5972
6068
|
}
|
|
5973
6069
|
|
|
5974
6070
|
/**
|
|
@@ -5976,27 +6072,27 @@ export interface KeyValueInputProps {
|
|
|
5976
6072
|
*/
|
|
5977
6073
|
export interface KeyValueRowProps {
|
|
5978
6074
|
/** The key-value pair data */
|
|
5979
|
-
pair: KeyValuePair
|
|
6075
|
+
pair: KeyValuePair;
|
|
5980
6076
|
/** Whether the key is a duplicate */
|
|
5981
|
-
isDuplicateKey: boolean
|
|
6077
|
+
isDuplicateKey: boolean;
|
|
5982
6078
|
/** Whether key is empty (for validation) */
|
|
5983
|
-
isKeyEmpty: boolean
|
|
6079
|
+
isKeyEmpty: boolean;
|
|
5984
6080
|
/** Whether value is empty (for validation) */
|
|
5985
|
-
isValueEmpty: boolean
|
|
6081
|
+
isValueEmpty: boolean;
|
|
5986
6082
|
/** Whether key field is required */
|
|
5987
|
-
keyRequired?: boolean
|
|
6083
|
+
keyRequired?: boolean;
|
|
5988
6084
|
/** Whether value field is required */
|
|
5989
|
-
valueRequired?: boolean
|
|
6085
|
+
valueRequired?: boolean;
|
|
5990
6086
|
/** Placeholder for key input */
|
|
5991
|
-
keyPlaceholder?: string
|
|
6087
|
+
keyPlaceholder?: string;
|
|
5992
6088
|
/** Placeholder for value input */
|
|
5993
|
-
valuePlaceholder?: string
|
|
6089
|
+
valuePlaceholder?: string;
|
|
5994
6090
|
/** Callback when key changes */
|
|
5995
|
-
onKeyChange: (id: string, key: string) => void
|
|
6091
|
+
onKeyChange: (id: string, key: string) => void;
|
|
5996
6092
|
/** Callback when value changes */
|
|
5997
|
-
onValueChange: (id: string, value: string) => void
|
|
6093
|
+
onValueChange: (id: string, value: string) => void;
|
|
5998
6094
|
/** Callback when row is deleted */
|
|
5999
|
-
onDelete: (id: string) => void
|
|
6095
|
+
onDelete: (id: string) => void;
|
|
6000
6096
|
}
|
|
6001
6097
|
`, prefix)
|
|
6002
6098
|
}
|