Update and resolve test issues
This commit is contained in:
@@ -11,7 +11,7 @@ import type {
|
||||
import { normalizeAskOrganizerVariant } from "../../../lib/propNormalization";
|
||||
|
||||
const VARIANT_STYLES: Record<
|
||||
AskOrganizerVariant,
|
||||
"centered" | "left-aligned" | "compact" | "inverse",
|
||||
{ container: string; buttonContainer: string }
|
||||
> = {
|
||||
centered: {
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface CheckboxViewProps {
|
||||
labelId: string;
|
||||
checked: boolean;
|
||||
mode: "standard" | "inverse";
|
||||
state: "default" | "hover" | "focus";
|
||||
state: "default" | "hover" | "focus" | "selected";
|
||||
disabled: boolean;
|
||||
label?: string;
|
||||
name?: string;
|
||||
|
||||
@@ -134,12 +134,12 @@ function ChipView({
|
||||
.filter(Boolean)
|
||||
.join(" ");
|
||||
|
||||
const handleClick: React.MouseEventHandler<HTMLButtonElement> = (event) => {
|
||||
const handleClick = (event: React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => {
|
||||
if (isDisabled) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
onClick?.(event);
|
||||
onClick?.(event as React.MouseEvent<HTMLButtonElement>);
|
||||
};
|
||||
|
||||
const sharedA11y = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ChipStateValue, ChipSizeValue, ChipPaletteValue } from "../../../lib/propNormalization";
|
||||
import type { ChipStateValue, ChipPaletteValue } from "../../../lib/propNormalization";
|
||||
|
||||
export interface ChipOption {
|
||||
id: string;
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface RadioGroupViewProps {
|
||||
groupId: string;
|
||||
value?: string;
|
||||
mode: "standard" | "inverse";
|
||||
state: "default" | "hover" | "focus";
|
||||
state: "default" | "hover" | "focus" | "selected";
|
||||
disabled: boolean;
|
||||
options: RadioOption[];
|
||||
className: string;
|
||||
|
||||
@@ -48,7 +48,6 @@ export function RuleStackView({
|
||||
|
||||
// Icon sizes: XS=40px, S=56px, M=56px, L=90px
|
||||
// Use a large default (90px) and let CSS handle responsive sizing
|
||||
const iconSize = 90;
|
||||
|
||||
// Card data
|
||||
const cards = [
|
||||
|
||||
@@ -42,6 +42,9 @@ const SelectInputContainer = forwardRef<HTMLButtonElement, SelectInputProps>(
|
||||
// Note: labelVariant and size are normalized for future use but not yet implemented in the view
|
||||
const _labelVariant = labelVariantProp ? normalizeLabelVariant(labelVariantProp) : undefined;
|
||||
const _size = sizeProp ? normalizeSmallMediumLargeSize(sizeProp) : undefined;
|
||||
// Mark as intentionally unused for future implementation
|
||||
void _labelVariant;
|
||||
void _size;
|
||||
const externalState = normalizeState(externalStateProp);
|
||||
|
||||
const generatedId = useId();
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { SelectOptionData } from "./SelectInput.types";
|
||||
export interface SelectInputViewProps {
|
||||
label?: string;
|
||||
placeholder: string;
|
||||
state: "default" | "active" | "hover" | "focus";
|
||||
state: "default" | "active" | "hover" | "focus" | "selected";
|
||||
disabled: boolean;
|
||||
error: boolean;
|
||||
className: string;
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface SwitchProps extends Omit<
|
||||
export interface SwitchViewProps {
|
||||
switchId: string;
|
||||
checked: boolean;
|
||||
state: "default" | "hover" | "focus";
|
||||
state: "default" | "hover" | "focus" | "selected";
|
||||
label?: string;
|
||||
className: string;
|
||||
switchClasses: string;
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface ToggleViewProps {
|
||||
labelId: string;
|
||||
checked: boolean;
|
||||
disabled: boolean;
|
||||
state: "default" | "hover" | "focus";
|
||||
state: "default" | "hover" | "focus" | "selected";
|
||||
label?: string;
|
||||
showIcon: boolean;
|
||||
showText: boolean;
|
||||
|
||||
Reference in New Issue
Block a user