myoperator-ui 0.0.72 → 0.0.74

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/README.md CHANGED
@@ -143,19 +143,19 @@ npx myoperator-ui update --help
143
143
 
144
144
  | Component | Description |
145
145
  |-----------|-------------|
146
- | `badge` | Status badge with active, failed, and disabled variants |
147
- | `button` | Customizable button with variants, sizes, icons, and loading state |
148
- | `checkbox` | Tri-state checkbox component with label support (checked, unchecked, indeterminate) |
149
- | `collapsible` | Expandable/collapsible section component with single or multiple mode support |
146
+ | `accordion` | Expandable/collapsible accordion component with single or multiple mode support |
147
+ | `badge` | Status badge with active, failed, disabled, outline, secondary, destructive variants and asChild support |
148
+ | `button` | Customizable button with variants, sizes (including icon-lg), icons, and loading state |
149
+ | `checkbox` | Tri-state checkbox built on Radix UI with label support (checked, unchecked, indeterminate) |
150
150
  | `dropdown-menu` | Dropdown menu for displaying actions and options |
151
151
  | `input` | Basic input component |
152
152
  | `multi-select` | Multi-select dropdown with search, tags, and keyboard navigation |
153
153
  | `select` | Single select dropdown component |
154
154
  | `select-field` | Select field with label, helper text, and validation states |
155
+ | `switch` | Switch component built on Radix UI for boolean inputs with on/off states |
155
156
  | `table` | Composable table with size variants, loading/empty states, sticky columns |
156
157
  | `tag` | Tag component for event labels with optional bold label prefix |
157
158
  | `text-field` | Text input with label, icons, prefix/suffix, validation states, and character count |
158
- | `toggle` | Toggle/switch component for boolean inputs with on/off states |
159
159
 
160
160
  ## Configuration
161
161
 
package/dist/index.js CHANGED
@@ -226,6 +226,7 @@ const buttonVariants = cva(
226
226
  variants: {
227
227
  variant: {
228
228
  default: "bg-[#343E55] text-white hover:bg-[#343E55]/90",
229
+ primary: "bg-[#343E55] text-white hover:bg-[#343E55]/90",
229
230
  destructive:
230
231
  "bg-destructive text-destructive-foreground hover:bg-destructive/90",
231
232
  outline:
@@ -356,6 +357,7 @@ const badgeVariants = cva(
356
357
  failed: "bg-[#FFECEC] text-[#FF3B3B]",
357
358
  disabled: "bg-[#F3F5F6] text-[#6B7280]",
358
359
  default: "bg-[#F3F5F6] text-[#333333]",
360
+ primary: "bg-[#F3F5F6] text-[#333333]",
359
361
  // shadcn-style variants (new)
360
362
  secondary: "bg-[#F3F4F6] text-[#333333]",
361
363
  outline: "border border-[#E5E7EB] bg-transparent text-[#333333]",
@@ -382,6 +384,8 @@ const badgeVariants = cva(
382
384
  * <Badge variant="active">Active</Badge>
383
385
  * <Badge variant="failed">Failed</Badge>
384
386
  * <Badge variant="disabled">Disabled</Badge>
387
+ * <Badge variant="default">Default</Badge>
388
+ * <Badge variant="primary">Primary</Badge>
385
389
  * <Badge variant="outline">Outline</Badge>
386
390
  * <Badge variant="secondary">Secondary</Badge>
387
391
  * <Badge variant="destructive">Destructive</Badge>
@@ -2590,11 +2594,13 @@ const tagVariants = cva(
2590
2594
  variants: {
2591
2595
  variant: {
2592
2596
  default: "bg-[#F3F4F6] text-[#333333]",
2593
- primary: "bg-[#343E55]/10 text-[#343E55]",
2597
+ primary: "bg-[#F3F4F6] text-[#333333]",
2598
+ accent: "bg-[#343E55]/10 text-[#343E55]",
2594
2599
  secondary: "bg-[#E5E7EB] text-[#374151]",
2595
2600
  success: "bg-[#E5FFF5] text-[#00A651]",
2596
2601
  warning: "bg-[#FFF8E5] text-[#F59E0B]",
2597
2602
  error: "bg-[#FFECEC] text-[#FF3B3B]",
2603
+ destructive: "bg-[#FFECEC] text-[#FF3B3B]",
2598
2604
  },
2599
2605
  size: {
2600
2606
  default: "px-2 py-1",
@@ -3216,16 +3222,14 @@ export const EventSelector = React.forwardRef<HTMLDivElement, EventSelectorProps
3216
3222
  )}
3217
3223
  </div>
3218
3224
  {/* Category Groups */}
3219
- <div className="p-4 space-y-3 bg-[#F9FAFB]">
3225
+ <div className="divide-y divide-[#E5E7EB]">
3220
3226
  {renderGroups(categoryGroups)}
3221
3227
  </div>
3222
3228
  </div>
3223
3229
  )
3224
3230
  })}
3225
3231
  {/* Render orphan groups outside categories */}
3226
- {orphanGroups.length > 0 && (
3227
- <div className="space-y-3">{renderGroups(orphanGroups)}</div>
3228
- )}
3232
+ {orphanGroups.length > 0 && renderGroups(orphanGroups)}
3229
3233
  </>
3230
3234
  )
3231
3235
  }
@@ -3250,7 +3254,9 @@ export const EventSelector = React.forwardRef<HTMLDivElement, EventSelectorProps
3250
3254
  </div>
3251
3255
 
3252
3256
  {/* Groups */}
3253
- <div className="space-y-3">{renderCategories()}</div>
3257
+ <div className="border border-[#E5E7EB] rounded-lg overflow-hidden divide-y divide-[#E5E7EB]">
3258
+ {renderCategories()}
3259
+ </div>
3254
3260
  </div>
3255
3261
  )
3256
3262
  }
@@ -3334,17 +3340,47 @@ export const EventGroupComponent = React.forwardRef<
3334
3340
  }
3335
3341
  }
3336
3342
 
3343
+ // Single event in group: render as flat item (no accordion)
3344
+ if (events.length === 1) {
3345
+ const event = events[0]
3346
+ const isSelected = selectedEvents.includes(event.id)
3347
+
3348
+ return (
3349
+ <div
3350
+ ref={ref}
3351
+ className={cn("bg-white p-4", className)}
3352
+ {...props}
3353
+ >
3354
+ <div className="flex items-start gap-3">
3355
+ <Checkbox
3356
+ checked={isSelected}
3357
+ onCheckedChange={(checked) =>
3358
+ handleEventSelection(event.id, checked === true)
3359
+ }
3360
+ aria-label={\`Select \${event.name}\`}
3361
+ className="mt-0.5"
3362
+ />
3363
+ <div className="flex-1 min-w-0">
3364
+ <span className="font-medium text-[#333333]">{event.name}</span>
3365
+ <p className="text-sm text-[#6B7280] mt-0.5">{event.description}</p>
3366
+ </div>
3367
+ </div>
3368
+ </div>
3369
+ )
3370
+ }
3371
+
3372
+ // Multiple events: render as collapsible accordion
3337
3373
  return (
3338
3374
  <div
3339
3375
  ref={ref}
3340
- className={cn("bg-[#F9FAFB] rounded-lg", className)}
3376
+ className={cn("bg-white", className)}
3341
3377
  {...props}
3342
3378
  >
3343
3379
  <Accordion type="multiple">
3344
3380
  <AccordionItem value={group.id}>
3345
3381
  <AccordionTrigger
3346
3382
  showChevron={true}
3347
- className="w-full p-4 hover:bg-[#F3F4F6] rounded-lg"
3383
+ className="w-full p-4 hover:bg-[#F9FAFB]"
3348
3384
  >
3349
3385
  <div className="flex items-center gap-3 flex-1">
3350
3386
  <Checkbox
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.72",
3
+ "version": "0.0.74",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",