@lessly/ui 0.7.2 → 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 +5 -1
- package/dist/index.js +8 -1
- package/package.json +2 -2
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;
|
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",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lessly/ui",
|
|
3
|
-
"version": "0.
|
|
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": "^
|
|
124
|
+
"vite": "^6.4.3",
|
|
125
125
|
"vitest": "^3.0.5"
|
|
126
126
|
}
|
|
127
127
|
}
|