diff --git a/app/components/NoLicense2.tsx b/app/components/NoLicense2.tsx deleted file mode 100644 index 8a0a07b777..0000000000 --- a/app/components/NoLicense2.tsx +++ /dev/null @@ -1,11 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * Copyright Oxide Computer Company - */ - -export function NoLicenseHere() { - return null -} diff --git a/app/components/ThemeIcons.tsx b/app/components/ThemeIcons.tsx deleted file mode 100644 index 626f22b08d..0000000000 --- a/app/components/ThemeIcons.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * Copyright Oxide Computer Company - */ - -// TODO: Figure out a better place to put this? - -export const LightTheme = () => ( - - - - - - - - - - -) - -export const DarkTheme = () => ( - - - - - - - - - -) diff --git a/libs/ui/index.ts b/libs/ui/index.ts index 1cc0d384aa..831b2de4af 100644 --- a/libs/ui/index.ts +++ b/libs/ui/index.ts @@ -14,7 +14,6 @@ export { useInterval, useTimeout } export * from './lib/action-menu/ActionMenu' export * from './lib/auth-code/AuthCodeInput' -export * from './lib/avatar/Avatar' export * from './lib/badge/Badge' export * from './lib/button/Button' export * from './lib/checkbox/Checkbox' diff --git a/libs/ui/lib/avatar-stack/AvatarStack.stories.tsx b/libs/ui/lib/avatar-stack/AvatarStack.stories.tsx deleted file mode 100644 index 1e71ad7bbf..0000000000 --- a/libs/ui/lib/avatar-stack/AvatarStack.stories.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * Copyright Oxide Computer Company - */ -import { AvatarStack } from './AvatarStack' - -const AVATAR_DATA = [ - { name: 'Haley Clark', round: true }, - { name: 'Cameron Howe', round: true }, - { name: 'Gordon Clark', round: true }, -] - -export const Default = () => - -export const Selected = () => ( -
- -
-) diff --git a/libs/ui/lib/avatar-stack/AvatarStack.tsx b/libs/ui/lib/avatar-stack/AvatarStack.tsx deleted file mode 100644 index c24030d41e..0000000000 --- a/libs/ui/lib/avatar-stack/AvatarStack.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * Copyright Oxide Computer Company - */ -import { Avatar, type AvatarProps, type AvatarSize } from '../avatar/Avatar' - -export interface AvatarStackProps { - data: Array - size?: AvatarSize -} - -export const AvatarStack = ({ data, size = 'base' }: AvatarStackProps) => ( -
- {data.map((avatarProps) => ( - - ))} -
-) diff --git a/libs/ui/lib/avatar/Avatar.stories.tsx b/libs/ui/lib/avatar/Avatar.stories.tsx deleted file mode 100644 index 4cc627786c..0000000000 --- a/libs/ui/lib/avatar/Avatar.stories.tsx +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * Copyright Oxide Computer Company - */ -import { Avatar } from './Avatar' - -export const Default = () => - -export const Selected = () => ( -
- -
-) diff --git a/libs/ui/lib/avatar/Avatar.tsx b/libs/ui/lib/avatar/Avatar.tsx deleted file mode 100644 index a0181e793b..0000000000 --- a/libs/ui/lib/avatar/Avatar.tsx +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * Copyright Oxide Computer Company - */ -import cn from 'classnames' -import { useMemo } from 'react' - -export const avatarSizes = ['sm', 'base', 'lg'] as const -export type AvatarSize = (typeof avatarSizes)[number] - -export const avatarColors = ['default', 'notice', 'destructive'] as const -type AvatarColor = (typeof avatarColors)[number] - -export interface AvatarProps { - name: string // Name of person, team, project, org, etc. - round?: boolean - size?: AvatarSize - src?: string // image url - color?: AvatarColor - className?: string -} - -const sizeStyles: Record = { - sm: 'w-6 h-6 text-mono-sm', - base: 'w-8 h-8 text-mono-md', - lg: 'w-12 h-12 text-mono-lg', -} - -const colorStyles: Record = { - default: 'text-accent bg-accent-secondary', - notice: 'text-notice bg-notice-secondary', - destructive: 'text-destructive bg-destructive-secondary', -} - -const getInitials = (name: string) => - name - .split(' ') - .filter((w) => w) - .map((word) => word[0]) - .slice(0, 2) - .join('') - -export const Avatar = ({ - className, - name, - round = false, - size = 'base', - color = 'default', - src, -}: AvatarProps) => { - const initials = useMemo(() => getInitials(name), [name]) - return ( -
- {src ? ( - {name} - ) : ( - - {initials} - - )} -
- ) -} - -export default Avatar diff --git a/libs/ui/styles/themes/selection.css b/libs/ui/styles/themes/selection.css index 31f7f7be19..6c55a0cec0 100644 --- a/libs/ui/styles/themes/selection.css +++ b/libs/ui/styles/themes/selection.css @@ -27,7 +27,6 @@ & .ox-badge, & .ox-tag, & .ox-button:not(.btn-ghost), - & .ox-avatar, & .ox-radio-card { --content-accent: var(--content-inverse); --surface-accent-secondary: var(--theme-accent-1);