myoperator-ui 0.0.128 → 0.0.129

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.
Files changed (2) hide show
  1. package/dist/index.js +202 -109
  2. 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: "bg-semantic-primary text-semantic-text-inverted hover:bg-semantic-primary-hover",
300
- primary: "bg-semantic-primary text-semantic-text-inverted hover:bg-semantic-primary-hover",
301
- destructive: "bg-semantic-error-primary text-semantic-text-inverted hover:bg-semantic-error-hover",
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: "bg-semantic-primary-surface text-semantic-text-secondary hover:bg-semantic-bg-hover",
305
- ghost: "text-semantic-text-muted hover:bg-semantic-bg-ui hover:text-semantic-text-primary",
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: "border border-semantic-border-layout bg-transparent text-semantic-text-primary",
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("px-4 py-1.5 text-xs font-medium text-semantic-text-muted", className)}
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("text-xs font-normal text-semantic-text-muted", labelClassName)}
1598
+ className={cn(
1599
+ "text-xs font-normal text-semantic-text-muted",
1600
+ labelClassName
1601
+ )}
1590
1602
  >
1591
1603
  {label}
1592
- {required && <span className="text-semantic-error-primary ml-0.5">*</span>}
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 id={errorId} className="text-xs text-semantic-error-primary">
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 ? "text-semantic-error-primary" : "text-semantic-text-muted"
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("text-xs font-normal text-semantic-text-muted", labelClassName)}
1871
+ className={cn(
1872
+ "text-xs font-normal text-semantic-text-muted",
1873
+ labelClassName
1874
+ )}
1853
1875
  >
1854
1876
  {label}
1855
- {required && <span className="text-semantic-error-primary ml-0.5">*</span>}
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 id={errorId} className="text-xs text-semantic-error-primary">
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("text-xs font-normal text-semantic-text-muted", labelClassName)}
2239
+ className={cn(
2240
+ "text-xs font-normal text-semantic-text-muted",
2241
+ labelClassName
2242
+ )}
2213
2243
  >
2214
2244
  {label}
2215
- {required && <span className="text-semantic-error-primary ml-0.5">*</span>}
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">{placeholder}</span>
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 id={errorId} className="text-xs text-semantic-error-primary">
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 className="text-[var(--color-neutral-400)] cursor-help" title={infoTooltip}>
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 colSpan={colSpan} className="text-center py-8 text-semantic-text-muted">
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 React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,
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 || "Delete confirmation dialog - this action cannot be undone"}
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: "bg-semantic-bg-ui border-semantic-border-layout [&>svg]:text-semantic-text-primary",
3710
- success: "bg-semantic-success-surface border-semantic-success-border [&>svg]:text-semantic-success-primary",
3711
- error: "bg-semantic-error-surface border-semantic-error-border [&>svg]:text-semantic-error-primary",
3712
- destructive: "bg-semantic-error-surface border-semantic-error-border [&>svg]:text-semantic-error-primary",
3713
- warning: "bg-semantic-warning-surface border-semantic-warning-border [&>svg]:text-semantic-warning-primary",
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" && "focus:ring-semantic-success-primary",
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" && "focus:ring-semantic-warning-primary",
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: "border-semantic-border-layout bg-semantic-bg-primary text-semantic-text-primary",
3941
- success: "border-semantic-success-border bg-semantic-success-surface text-semantic-success-hover",
3942
- error: "border-semantic-error-border bg-semantic-error-surface text-semantic-error-hover",
3943
- warning: "border-semantic-warning-border bg-semantic-warning-surface text-semantic-warning-hover",
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 ({ id, title, description, action, variant, ...props }) {
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 key={id} variant={variant} className={variant ?? undefined} {...props}>
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: "border border-semantic-border-layout rounded-lg divide-y divide-semantic-border-layout",
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">{actionsArray}</div>
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">{description}</p>
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">{event.name}</span>
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,7 +5434,10 @@ 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 type="multiple" defaultValue={defaultExpanded ? [group.id] : []}>
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
5443
  <div className="flex items-center gap-3 p-4 hover:bg-semantic-bg-ui">
@@ -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">{group.icon}</span>
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}
@@ -5452,7 +5531,9 @@ export const EventItemComponent = React.forwardRef<
5452
5531
  aria-label={\`Select \${event.name}\`}
5453
5532
  />
5454
5533
  <div className="flex-1 min-w-0">
5455
- <div className="text-sm font-medium text-semantic-text-primary">{event.name}</div>
5534
+ <div className="text-sm font-medium text-semantic-text-primary">
5535
+ {event.name}
5536
+ </div>
5456
5537
  <div className="text-sm text-semantic-text-muted mt-0.5 leading-relaxed">
5457
5538
  {event.description}
5458
5539
  </div>
@@ -5465,20 +5546,20 @@ EventItemComponent.displayName = "EventItemComponent";
5465
5546
  },
5466
5547
  {
5467
5548
  name: "types.ts",
5468
- content: prefixTailwindClasses(`import * as React from "react"
5549
+ content: prefixTailwindClasses(`import * as React from "react";
5469
5550
 
5470
5551
  /**
5471
5552
  * Represents an individual event item
5472
5553
  */
5473
5554
  export interface EventItem {
5474
5555
  /** Unique identifier for the event */
5475
- id: string
5556
+ id: string;
5476
5557
  /** Display name of the event (e.g., "Call.Initiated") */
5477
- name: string
5558
+ name: string;
5478
5559
  /** Description of when this event is triggered */
5479
- description: string
5560
+ description: string;
5480
5561
  /** Group ID this event belongs to */
5481
- group: string
5562
+ group: string;
5482
5563
  }
5483
5564
 
5484
5565
  /**
@@ -5486,13 +5567,13 @@ export interface EventItem {
5486
5567
  */
5487
5568
  export interface EventGroup {
5488
5569
  /** Unique identifier for the group */
5489
- id: string
5570
+ id: string;
5490
5571
  /** Display name of the group (e.g., "In-Call Events") */
5491
- name: string
5572
+ name: string;
5492
5573
  /** Description of the group */
5493
- description: string
5574
+ description: string;
5494
5575
  /** Optional icon to display next to the group name */
5495
- icon?: React.ReactNode
5576
+ icon?: React.ReactNode;
5496
5577
  }
5497
5578
 
5498
5579
  /**
@@ -5500,13 +5581,13 @@ export interface EventGroup {
5500
5581
  */
5501
5582
  export interface EventCategory {
5502
5583
  /** Unique identifier for the category */
5503
- id: string
5584
+ id: string;
5504
5585
  /** Display name of the category (e.g., "Call Events (Voice)") */
5505
- name: string
5586
+ name: string;
5506
5587
  /** Optional icon to display next to the category name */
5507
- icon?: React.ReactNode
5588
+ icon?: React.ReactNode;
5508
5589
  /** Array of group IDs that belong to this category */
5509
- groups: string[]
5590
+ groups: string[];
5510
5591
  }
5511
5592
 
5512
5593
  /**
@@ -5515,35 +5596,35 @@ export interface EventCategory {
5515
5596
  export interface EventSelectorProps {
5516
5597
  // Data
5517
5598
  /** Array of event items */
5518
- events: EventItem[]
5599
+ events: EventItem[];
5519
5600
  /** Array of event groups */
5520
- groups: EventGroup[]
5601
+ groups: EventGroup[];
5521
5602
  /** Optional array of categories for top-level grouping */
5522
- categories?: EventCategory[]
5603
+ categories?: EventCategory[];
5523
5604
 
5524
5605
  // State (controlled mode)
5525
5606
  /** Array of selected event IDs (controlled) */
5526
- selectedEvents?: string[]
5607
+ selectedEvents?: string[];
5527
5608
  /** Callback when selection changes */
5528
- onSelectionChange?: (selectedIds: string[]) => void
5609
+ onSelectionChange?: (selectedIds: string[]) => void;
5529
5610
 
5530
5611
  // State (uncontrolled mode)
5531
5612
  /** Default selected events for uncontrolled usage */
5532
- defaultSelectedEvents?: string[]
5613
+ defaultSelectedEvents?: string[];
5533
5614
 
5534
5615
  // Customization
5535
5616
  /** Title displayed at the top (default: "Events") */
5536
- title?: string
5617
+ title?: string;
5537
5618
  /** Description displayed below the title */
5538
- description?: string
5619
+ description?: string;
5539
5620
  /** Message shown when a group has no events */
5540
- emptyGroupMessage?: string
5621
+ emptyGroupMessage?: string;
5541
5622
  /** Custom render function for empty group state (overrides emptyGroupMessage) */
5542
- renderEmptyGroup?: (group: EventGroup) => React.ReactNode
5623
+ renderEmptyGroup?: (group: EventGroup) => React.ReactNode;
5543
5624
 
5544
5625
  // Styling
5545
5626
  /** Additional CSS classes for the root element */
5546
- className?: string
5627
+ className?: string;
5547
5628
  }
5548
5629
 
5549
5630
  /**
@@ -5551,19 +5632,19 @@ export interface EventSelectorProps {
5551
5632
  */
5552
5633
  export interface EventGroupComponentProps {
5553
5634
  /** The group data */
5554
- group: EventGroup
5635
+ group: EventGroup;
5555
5636
  /** Events that belong to this group */
5556
- events: EventItem[]
5637
+ events: EventItem[];
5557
5638
  /** Currently selected event IDs */
5558
- selectedEvents: string[]
5639
+ selectedEvents: string[];
5559
5640
  /** Callback to update selected events */
5560
- onSelectionChange: (selectedIds: string[]) => void
5641
+ onSelectionChange: (selectedIds: string[]) => void;
5561
5642
  /** Message shown when group has no events */
5562
- emptyGroupMessage?: string
5643
+ emptyGroupMessage?: string;
5563
5644
  /** Custom render function for empty group state */
5564
- renderEmptyGroup?: (group: EventGroup) => React.ReactNode
5645
+ renderEmptyGroup?: (group: EventGroup) => React.ReactNode;
5565
5646
  /** Whether the accordion should be expanded by default (default: false) */
5566
- defaultExpanded?: boolean
5647
+ defaultExpanded?: boolean;
5567
5648
  }
5568
5649
 
5569
5650
  /**
@@ -5571,11 +5652,11 @@ export interface EventGroupComponentProps {
5571
5652
  */
5572
5653
  export interface EventItemComponentProps {
5573
5654
  /** The event data */
5574
- event: EventItem
5655
+ event: EventItem;
5575
5656
  /** Whether this event is selected */
5576
- isSelected: boolean
5657
+ isSelected: boolean;
5577
5658
  /** Callback when selection changes */
5578
- onSelectionChange: (selected: boolean) => void
5659
+ onSelectionChange: (selected: boolean) => void;
5579
5660
  }
5580
5661
  `, prefix)
5581
5662
  }
@@ -5755,7 +5836,9 @@ export const KeyValueInput = React.forwardRef<
5755
5836
  {title}
5756
5837
  </h3>
5757
5838
  {description && (
5758
- <p className="m-0 text-sm text-semantic-text-muted mt-1">{description}</p>
5839
+ <p className="m-0 text-sm text-semantic-text-muted mt-1">
5840
+ {description}
5841
+ </p>
5759
5842
  )}
5760
5843
  </div>
5761
5844
 
@@ -5767,13 +5850,21 @@ export const KeyValueInput = React.forwardRef<
5767
5850
  <div className="flex-1">
5768
5851
  <span className="text-sm font-medium text-semantic-text-primary">
5769
5852
  {keyLabel}
5770
- {keyRequired && <span className="text-semantic-error-primary ml-0.5">*</span>}
5853
+ {keyRequired && (
5854
+ <span className="text-semantic-error-primary ml-0.5">
5855
+ *
5856
+ </span>
5857
+ )}
5771
5858
  </span>
5772
5859
  </div>
5773
5860
  <div className="flex-1">
5774
5861
  <span className="text-sm font-medium text-semantic-text-primary">
5775
5862
  {valueLabel}
5776
- {valueRequired && <span className="text-semantic-error-primary ml-0.5">*</span>}
5863
+ {valueRequired && (
5864
+ <span className="text-semantic-error-primary ml-0.5">
5865
+ *
5866
+ </span>
5867
+ )}
5777
5868
  </span>
5778
5869
  </div>
5779
5870
  {/* Spacer for delete button column */}
@@ -5788,7 +5879,9 @@ export const KeyValueInput = React.forwardRef<
5788
5879
  pair={pair}
5789
5880
  isDuplicateKey={duplicateKeys.has(pair.key.toLowerCase())}
5790
5881
  isKeyEmpty={touchedKeys.has(pair.id) && !pair.key.trim()}
5791
- isValueEmpty={touchedValues.has(pair.id) && !pair.value.trim()}
5882
+ isValueEmpty={
5883
+ touchedValues.has(pair.id) && !pair.value.trim()
5884
+ }
5792
5885
  keyRequired={keyRequired}
5793
5886
  valueRequired={valueRequired}
5794
5887
  keyPlaceholder={keyPlaceholder}
@@ -5921,11 +6014,11 @@ KeyValueRow.displayName = "KeyValueRow";
5921
6014
  */
5922
6015
  export interface KeyValuePair {
5923
6016
  /** Unique identifier for the pair */
5924
- id: string
6017
+ id: string;
5925
6018
  /** The key (e.g., header name) */
5926
- key: string
6019
+ key: string;
5927
6020
  /** The value (e.g., header value) */
5928
- value: string
6021
+ value: string;
5929
6022
  }
5930
6023
 
5931
6024
  /**
@@ -5934,41 +6027,41 @@ export interface KeyValuePair {
5934
6027
  export interface KeyValueInputProps {
5935
6028
  // Customization
5936
6029
  /** Title displayed at the top (e.g., "HTTP Headers") */
5937
- title: string
6030
+ title: string;
5938
6031
  /** Description displayed below the title */
5939
- description?: string
6032
+ description?: string;
5940
6033
  /** Text for the add button (default: "Add Header") */
5941
- addButtonText?: string
6034
+ addButtonText?: string;
5942
6035
  /** Maximum number of items allowed (default: 10) */
5943
- maxItems?: number
6036
+ maxItems?: number;
5944
6037
  /** Placeholder for key input */
5945
- keyPlaceholder?: string
6038
+ keyPlaceholder?: string;
5946
6039
  /** Placeholder for value input */
5947
- valuePlaceholder?: string
6040
+ valuePlaceholder?: string;
5948
6041
  /** Label for key column header (default: "Key") */
5949
- keyLabel?: string
6042
+ keyLabel?: string;
5950
6043
  /** Label for value column header (default: "Value") */
5951
- valueLabel?: string
6044
+ valueLabel?: string;
5952
6045
 
5953
6046
  // Validation
5954
6047
  /** Whether key field is required (default: true) */
5955
- keyRequired?: boolean
6048
+ keyRequired?: boolean;
5956
6049
  /** Whether value field is required (default: true) */
5957
- valueRequired?: boolean
6050
+ valueRequired?: boolean;
5958
6051
 
5959
6052
  // State (controlled mode)
5960
6053
  /** Array of key-value pairs (controlled) */
5961
- value?: KeyValuePair[]
6054
+ value?: KeyValuePair[];
5962
6055
  /** Callback when pairs change */
5963
- onChange?: (pairs: KeyValuePair[]) => void
6056
+ onChange?: (pairs: KeyValuePair[]) => void;
5964
6057
 
5965
6058
  // State (uncontrolled mode)
5966
6059
  /** Default key-value pairs for uncontrolled usage */
5967
- defaultValue?: KeyValuePair[]
6060
+ defaultValue?: KeyValuePair[];
5968
6061
 
5969
6062
  // Styling
5970
6063
  /** Additional CSS classes for the root element */
5971
- className?: string
6064
+ className?: string;
5972
6065
  }
5973
6066
 
5974
6067
  /**
@@ -5976,27 +6069,27 @@ export interface KeyValueInputProps {
5976
6069
  */
5977
6070
  export interface KeyValueRowProps {
5978
6071
  /** The key-value pair data */
5979
- pair: KeyValuePair
6072
+ pair: KeyValuePair;
5980
6073
  /** Whether the key is a duplicate */
5981
- isDuplicateKey: boolean
6074
+ isDuplicateKey: boolean;
5982
6075
  /** Whether key is empty (for validation) */
5983
- isKeyEmpty: boolean
6076
+ isKeyEmpty: boolean;
5984
6077
  /** Whether value is empty (for validation) */
5985
- isValueEmpty: boolean
6078
+ isValueEmpty: boolean;
5986
6079
  /** Whether key field is required */
5987
- keyRequired?: boolean
6080
+ keyRequired?: boolean;
5988
6081
  /** Whether value field is required */
5989
- valueRequired?: boolean
6082
+ valueRequired?: boolean;
5990
6083
  /** Placeholder for key input */
5991
- keyPlaceholder?: string
6084
+ keyPlaceholder?: string;
5992
6085
  /** Placeholder for value input */
5993
- valuePlaceholder?: string
6086
+ valuePlaceholder?: string;
5994
6087
  /** Callback when key changes */
5995
- onKeyChange: (id: string, key: string) => void
6088
+ onKeyChange: (id: string, key: string) => void;
5996
6089
  /** Callback when value changes */
5997
- onValueChange: (id: string, value: string) => void
6090
+ onValueChange: (id: string, value: string) => void;
5998
6091
  /** Callback when row is deleted */
5999
- onDelete: (id: string) => void
6092
+ onDelete: (id: string) => void;
6000
6093
  }
6001
6094
  `, prefix)
6002
6095
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.128",
3
+ "version": "0.0.129",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",