@lessly/ui 0.7.1 → 0.8.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/dist/index.d.ts CHANGED
@@ -87,6 +87,7 @@ declare const DropdownMenuSubContent: React$1.ForwardRefExoticComponent<Omit<Dro
87
87
  declare const DropdownMenuContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
88
88
  declare const DropdownMenuItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
89
89
  inset?: boolean;
90
+ variant?: "default" | "destructive";
90
91
  } & React$1.RefAttributes<HTMLDivElement>>;
91
92
  declare const DropdownMenuCheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
92
93
  declare const DropdownMenuRadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
@@ -122,9 +123,12 @@ interface SelectProps {
122
123
  disabled?: boolean;
123
124
  className?: string;
124
125
  'data-testid'?: string;
126
+ id?: string;
127
+ 'aria-label'?: string;
128
+ 'aria-labelledby'?: string;
125
129
  optionTestId?: (value: string) => string;
126
130
  }
127
- declare function Select({ value, onValueChange, options, placeholder, disabled, className, 'data-testid': testId, optionTestId, }: SelectProps): React$1.JSX.Element;
131
+ declare function Select({ value, onValueChange, options, placeholder, disabled, className, 'data-testid': testId, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, optionTestId, }: SelectProps): React$1.JSX.Element;
128
132
 
129
133
  interface SwitchProps {
130
134
  checked: boolean;
@@ -1017,10 +1021,8 @@ interface ConnectionCardProps extends React$1.HTMLAttributes<HTMLDivElement> {
1017
1021
  */
1018
1022
  children?: React$1.ReactNode;
1019
1023
  /**
1020
- * Disclosure mode: the header row toggles the card open/closed; the footer and
1021
- * drawer render only while open. The `access` blast-radius notice stays visible
1022
- * even while collapsed — it is a safety disclosure, not a detail. Collapsed by
1023
- * default.
1024
+ * Disclosure mode: the header row toggles the card open/closed; the access
1025
+ * notice, footer, and drawer render only while open. Collapsed by default.
1024
1026
  */
1025
1027
  collapsible?: boolean;
1026
1028
  /** Uncontrolled initial state (collapsible mode). Default: false (collapsed). */
package/dist/index.js CHANGED
@@ -222,13 +222,14 @@ var DropdownMenuContent = React4.forwardRef(({ className, sideOffset = 4, ...pro
222
222
  }
223
223
  ) }));
224
224
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
225
- var DropdownMenuItem = React4.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx4(
225
+ var DropdownMenuItem = React4.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx4(
226
226
  DropdownMenuPrimitive.Item,
227
227
  {
228
228
  ref,
229
229
  className: cn(
230
230
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-bg-secondary focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
231
231
  inset && "pl-8",
232
+ variant === "destructive" && "text-text-danger focus:bg-bg-danger-subtle focus:text-text-danger",
232
233
  className
233
234
  ),
234
235
  ...props
@@ -347,6 +348,9 @@ function Select({
347
348
  disabled,
348
349
  className,
349
350
  "data-testid": testId,
351
+ id,
352
+ "aria-label": ariaLabel,
353
+ "aria-labelledby": ariaLabelledby,
350
354
  optionTestId
351
355
  }) {
352
356
  const selected = options.find((o) => o.value === value);
@@ -356,6 +360,9 @@ function Select({
356
360
  {
357
361
  type: "button",
358
362
  "data-testid": testId,
363
+ id,
364
+ "aria-label": ariaLabel,
365
+ "aria-labelledby": ariaLabelledby,
359
366
  disabled,
360
367
  className: cn(
361
368
  "flex h-10 w-full items-center justify-between rounded-md border border-border-default bg-bg-primary px-3 text-sm text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus disabled:cursor-not-allowed disabled:opacity-50",
@@ -3463,7 +3470,11 @@ var ConnectionCard = React56.forwardRef(
3463
3470
  Card,
3464
3471
  {
3465
3472
  ref,
3466
- className: cn(status === "disconnected" && "border-dashed border-border-default", className),
3473
+ className: cn(
3474
+ "overflow-hidden",
3475
+ status === "disconnected" && "border-dashed border-border-default",
3476
+ className
3477
+ ),
3467
3478
  ...props,
3468
3479
  children: [
3469
3480
  /* @__PURE__ */ jsx66(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs33(
@@ -3487,8 +3498,8 @@ var ConnectionCard = React56.forwardRef(
3487
3498
  ]
3488
3499
  }
3489
3500
  ) }),
3490
- accessNote,
3491
3501
  /* @__PURE__ */ jsxs33(CollapsibleContent2, { children: [
3502
+ accessNote,
3492
3503
  footer,
3493
3504
  drawer
3494
3505
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lessly/ui",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Lessly design system — shared UI primitives, tokens, and theme",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.30.3",
@@ -121,7 +121,7 @@
121
121
  "tw-animate-css": "^1.4.0",
122
122
  "typescript": "^5.0.0",
123
123
  "typescript-eslint": "^8.63.0",
124
- "vite": "^5.4.21",
124
+ "vite": "^6.4.3",
125
125
  "vitest": "^3.0.5"
126
126
  }
127
127
  }