Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ui/Accordion/fragments/AccordionRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import React, { useState, useRef } from 'react';
import React, { useRef } from 'react';
import { clsx } from 'clsx';
import { customClassSwitcher } from '~/core';
import { AccordionContext } from '../contexts/AccordionContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';
import React, { useContext } from 'react';
import { clsx } from 'clsx';
import ButtonPrimitive from '~/core/primitives/Button';
import { AlertDialogContext } from '../contexts/AlertDialogContext';

import DialogPrimitive from '~/core/primitives/Dialog';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react';
import { clsx } from 'clsx';
import { customClassSwitcher } from '~/core';
import { useCreateDataAttribute, useComposeAttributes } from '~/core/hooks/createDataAttribute';
import { useCreateDataAttribute } from '~/core/hooks/createDataAttribute';
import Primitive from '~/core/primitives/Primitive';

const COMPONENT_NAME = 'Link';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/RadioGroup/fragments/RadioGroupRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type RadioGroupRootProps = {

} & RadioGroupPrimitiveProps.Root;

const RadioGroupRoot = ({ children, className = '', customRootClass = '', variant, size, color = '', ...props }: RadioGroupRootProps) => {
const RadioGroupRoot = ({ children, className = '', customRootClass = '', variant = '', size = '', color = '', ...props }: RadioGroupRootProps) => {
const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);
const dataAttributes = useCreateDataAttribute('radio-group', { variant, size });

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Select/fragments/SelectContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import React, { useEffect, useRef, useContext } from 'react';
import React, { useContext } from 'react';
import SelectPrimitive from '~/core/primitives/Select/Select';
import { SelectRootContext } from '../contexts/SelectRootContext';

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Select/fragments/SelectPortal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import React, { useContext } from 'react';
import React from 'react';
import SelectPrimitive from '~/core/primitives/Select/Select';

export type SelectPortalProps = {
Expand All @@ -7,7 +7,7 @@
};

const SelectPortal = ({ children }: SelectPortalProps) => {
const rootElement = document.querySelector('#rad-ui-theme-container') || document.body as HTMLElement | null;

Check warning on line 10 in src/components/ui/Select/fragments/SelectPortal.tsx

View workflow job for this annotation

GitHub Actions / lint

'rootElement' is assigned a value but never used

return (
<SelectPrimitive.Portal>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Select/fragments/SelectRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useCallback, useEffect } from 'react';
import React from 'react';
import SelectPrimitive from '~/core/primitives/Select/Select';
import { customClassSwitcher } from '~/core/customClassSwitcher';
import { SelectRootContext } from '../contexts/SelectRootContext';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Slider/fragments/SliderThumb.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import React, { useRef } from 'react';
import React from 'react';
import { SliderContext } from '../context/SliderContext';

const SliderThumb = ({ children }: { children: React.ReactNode }) => {
Expand All @@ -16,7 +16,7 @@
console.log(e.target.value);
};

return <div className={`${rootClass}-thumb`} onClick={handleClick} style={{ left: `calc(${value}% - 16px)` }}>

Check warning on line 19 in src/components/ui/Slider/fragments/SliderThumb.tsx

View workflow job for this annotation

GitHub Actions / lint

Visible, non-interactive elements with click handlers must have at least one keyboard listener
<span className={`${rootClass}-thumb-value`}></span>
<input onChange={handleChange} value={value} style={{ display: 'none' }} ref={sliderInputRef} />
</div>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Slider/fragments/SliderTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import { SliderContext } from '../context/SliderContext';

const SliderTrack = ({ children }: { children: React.ReactNode }) => {
const { rootClass, setValue } = React.useContext(SliderContext);
const { rootClass } = React.useContext(SliderContext);

return <div className={`${rootClass}-track`}>{children}</div>;
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Switch/fragments/SwitchThumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Primitive from '~/core/primitives/Primitive';
import { SwitchContext } from '../context/SwitchContext';

const SwitchThumb = () => {
const { checked, setChecked, rootClass } = useContext(SwitchContext);
const { checked, rootClass } = useContext(SwitchContext);
return <Primitive.span role='switch' className={`${rootClass}-indicator`} data-state={checked ? 'checked' : 'unchecked'} />;
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Tooltip/fragments/TooltipTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const TooltipTrigger = forwardRef(({ children, asChild, ...props }: { children:
throw new Error('TooltipTrigger must be used within a TooltipRoot component');
}

const { setIsOpen, isOpen, interactions, data, context } = tooltipContext;
const { isOpen, interactions, context } = tooltipContext;

const { getReferenceProps } = interactions;

Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/Tree/fragments/TreeItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useId, useRef, useState } from 'react';
import React, { useId, useState } from 'react';
import ButtonPrimitive from '~/core/primitives/Button';

import { clsx } from 'clsx';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface AvatarPrimitiveFallbackProps {
}

const AvatarPrimitiveFallback = ({ children, asChild = false, className = '', ...props }: AvatarPrimitiveFallbackProps) => {
const { hasError, isImageLoaded } = useContext(AvatarPrimitiveContext);
const { isImageLoaded } = useContext(AvatarPrimitiveContext);
if (isImageLoaded) return null;
return <Primitive.span asChild={asChild} className={className} {...props}>{children}</Primitive.span>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import RovingFocusGroup from '~/core/utils/RovingFocusGroup';
import CheckboxGroupPrimitiveContext from '../context/CheckboxGroupPrimitiveContext';
import CheckboxGroupPrimitiveTriggerContext from '../context/CheckboxGroupPrimitiveTriggerContext';
import useControllableState from '~/core/hooks/useControllableState';

export type CheckboxGroupPrimitiveTriggerProps = {
children?: React.ReactNode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { createContext, useContext } from 'react';
import { createContext, useContext } from 'react';

/**
* Context value for CollapsiblePrimitive
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';
import React, { useContext } from 'react';
import { DialogPrimitiveContext } from '../context/DialogPrimitiveContext';
import { clsx } from 'clsx';
import Floater from '~/core/primitives/Floater';

export type DialogPrimitiveContentProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { PropsWithChildren, useState } from 'react';
import React, { PropsWithChildren } from 'react';
import Primitive from '../../Primitive';
import RadioGroupContext from '../context/RadioGroupContext';
import RovingFocusGroup from '~/core/utils/RovingFocusGroup';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';
import React, { useContext, useEffect } from 'react';
import React, { useContext } from 'react';
import { SelectPrimitiveContext } from '../contexts/SelectPrimitiveContext';
import Primitive from '../../Primitive';
import RovingFocusGroup from '~/core/utils/RovingFocusGroup';
import Floater from '~/core/primitives/Floater';

Expand All @@ -10,7 +9,7 @@ export type SelectPrimitiveContentProps = {
}

function SelectPrimitiveContent({ children, ...props }: SelectPrimitiveContentProps) {
const { isOpen, setIsOpen, selectedValue, floatingContext, refs, getFloatingProps, floatingStyles, handleSelect } = useContext(SelectPrimitiveContext);
const { isOpen, floatingContext, refs, getFloatingProps, floatingStyles, handleSelect } = useContext(SelectPrimitiveContext);
// if (!isOpen) return null;
// const contentRef = React.useRef<HTMLDivElement>(null);
// useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import Floater from '~/core/primitives/Floater';

import { SelectPrimitiveContext } from '../contexts/SelectPrimitiveContext';

import { clsx } from 'clsx';

type SelectPrimitiveOverlayProps = {
className?: string;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import React, { useEffect, useLayoutEffect } from 'react';
import React, { useLayoutEffect } from 'react';
import Primitive from '../../Primitive';
import { SelectPrimitiveContext } from '../contexts/SelectPrimitiveContext';
import RovingFocusGroup from '~/core/utils/RovingFocusGroup';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Primitive from '../../Primitive';

function SelectPrimitiveSearch({ className }: {className: string}) {
const [search, setSearch] = React.useState('');
const { refs, selectedItemRef, handleSelect, activeItemValue, setActiveItemValue, setSelectedValue } = useContext(SelectPrimitiveContext);
const { refs, handleSelect, activeItemValue, setActiveItemValue, setSelectedValue } = useContext(SelectPrimitiveContext);

const originalStructureRef = React.useRef<{ element: HTMLElement; parent: HTMLElement | null }[]>([]);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client';
import React, { useContext } from 'react';
import { SelectPrimitiveContext } from '../contexts/SelectPrimitiveContext';
import Primitive from '../../Primitive';

export type SelectPrimitiveTriggerProps = {
children: React.ReactNode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { forwardRef, useContext, useEffect, useId, useRef } from 'react';
import React, { forwardRef, useContext, useEffect, useId } from 'react';

import Primitive from '~/core/primitives/Primitive';

Expand Down
Loading