Skip to content

Commit

Permalink
feat(Box): remove component
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Sep 5, 2024
1 parent 0703262 commit 8a6fd1e
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 255 deletions.
71 changes: 0 additions & 71 deletions packages/css/box.css

This file was deleted.

2 changes: 2 additions & 0 deletions packages/css/combobox.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
overflow-y: auto;
z-index: 1600;
border-radius: min(1rem, var(--ds-border-radius-md));
box-shadow: var(--ds-shadow-md);
border: 1px solid var(--ds-color-neutral-border-default);
}

.ds-combobox--readonly .ds-combobox__input {
Expand Down
1 change: 0 additions & 1 deletion packages/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
@import url('./baseline/typography/ingress.css') layer(ds.base.typography);
@import url('./baseline/typography/error-message.css') layer(ds.base.typography);
@import url('./utilities.css') layer(ds.utilities);
@import url('./box.css') layer(ds.components);
@import url('./button.css') layer(ds.components);
@import url('./alert.css') layer(ds.components);
@import url('./skiplink.css') layer(ds.components);
Expand Down
16 changes: 0 additions & 16 deletions packages/react/src/components/Box/Box.mdx

This file was deleted.

41 changes: 0 additions & 41 deletions packages/react/src/components/Box/Box.stories.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions packages/react/src/components/Box/Box.test.tsx

This file was deleted.

68 changes: 0 additions & 68 deletions packages/react/src/components/Box/Box.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/react/src/components/Box/index.ts

This file was deleted.

12 changes: 4 additions & 8 deletions packages/react/src/components/form/Combobox/Combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type { InputHTMLAttributes, ReactNode } from 'react';

import type { PortalProps } from '../../../types/Portal';
import { omit, useDebounceCallback } from '../../../utilities';
import { Box } from '../../Box';
import { Spinner } from '../../Spinner';
import type { FormFieldProps } from '../useFormField';
import { useFormField } from '../useFormField';
Expand Down Expand Up @@ -367,7 +366,7 @@ export const ComboboxComponent = forwardRef<HTMLInputElement, ComboboxProps>(
},
}}
>
<Box
<div
className={cl(
'ds-combobox',
`ds-combobox--${size}`,
Expand Down Expand Up @@ -408,7 +407,7 @@ export const ComboboxComponent = forwardRef<HTMLInputElement, ComboboxProps>(
error={error}
formFieldProps={formFieldProps}
/>
</Box>
</div>
{/* This is the floating list with options */}
{open && (
<FloatingPortal root={portal ? null : portalRef}>
Expand All @@ -417,11 +416,8 @@ export const ComboboxComponent = forwardRef<HTMLInputElement, ComboboxProps>(
initialFocus={-1}
visuallyHiddenDismiss
>
<Box
<div
id={listId}
shadow='md'
borderRadius='md'
borderColor='default'
aria-labelledby={formFieldProps.inputProps.id}
aria-autocomplete='list'
tabIndex={-1}
Expand Down Expand Up @@ -476,7 +472,7 @@ export const ComboboxComponent = forwardRef<HTMLInputElement, ComboboxProps>(
{!virtual && filteredOptionsChildren}
</>
)}
</Box>
</div>
</FloatingFocusManager>
</FloatingPortal>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type { ChangeEvent } from 'react';
import { useContext, useRef } from 'react';

import { omit } from '../../../../utilities';
import { Box } from '../../../Box';
import { Paragraph } from '../../../Typography';
import type { ComboboxProps } from '../Combobox';
import { ComboboxContext } from '../ComboboxContext';
Expand Down Expand Up @@ -112,7 +111,7 @@ const ComboboxInput = ({

return (
<Paragraph size={size} asChild>
<Box
<div
{...props}
aria-disabled={disabled ? 'true' : undefined}
className={cl(
Expand Down Expand Up @@ -158,7 +157,7 @@ const ComboboxInput = ({
<ChevronDownIcon title='arrow down' fontSize='1.5em' />
)}
</div>
</Box>
</div>
</Paragraph>
);
};
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export * from './Modal';
export * from './DropdownMenu';
export * from './form/Search';
export * from './Skeleton';
export * from './Box/Box';
export * from './Card';
export * from './form/Combobox';
export * from './Table';
Expand Down

0 comments on commit 8a6fd1e

Please sign in to comment.