Skip to content

Commit

Permalink
move classed out of util barrel
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Feb 23, 2024
1 parent d731de2 commit 9b4a6e0
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/components/HL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*
* Copyright Oxide Computer Company
*/
import { classed } from '@oxide/util'
import { classed } from '~/util/classed'

export const HL = classed.span`text-sans-semi-md text-default`
3 changes: 2 additions & 1 deletion app/components/Terminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { Terminal as XTerm, type ITerminalOptions } from 'xterm'
import { FitAddon } from 'xterm-addon-fit'

import { DirectionDownIcon, DirectionUpIcon } from '@oxide/ui'
import { classed } from '@oxide/util'

import { classed } from '~/util/classed'

import { AttachAddon } from './AttachAddon'

Expand Down
4 changes: 3 additions & 1 deletion app/components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import cn from 'classnames'
import { cloneElement } from 'react'

import { Button, Error12Icon, type ButtonProps } from '@oxide/ui'
import { classed, flattenChildren, invariant, isOneOf, pluckFirstOfType } from '@oxide/util'
import { flattenChildren, invariant, isOneOf, pluckFirstOfType } from '@oxide/util'

import { classed } from '~/util/classed'

import './form.css'

Expand Down
4 changes: 3 additions & 1 deletion app/components/form/FullPageForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import { useBlocker, type Blocker } from 'react-router-dom'

import type { ApiError } from '@oxide/api'
import { Modal, PageHeader, PageTitle } from '@oxide/ui'
import { classed, flattenChildren, pluckFirstOfType } from '@oxide/util'
import { flattenChildren, pluckFirstOfType } from '@oxide/util'

import { classed } from '~/util/classed'

import { Form } from '../form/Form'
import { PageActions } from '../PageActions'
Expand Down
2 changes: 1 addition & 1 deletion app/layouts/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { useRef } from 'react'
import { Outlet } from 'react-router-dom'

import { SkipLinkTarget } from '@oxide/ui'
import { classed } from '@oxide/util'

import { Pagination } from '~/components/Pagination'
import { classed } from '~/util/classed'
import { PageActionsTarget } from 'app/components/PageActions'
import { useScrollRestoration } from 'app/hooks/use-scroll-restoration'

Expand Down
2 changes: 1 addition & 1 deletion app/table/cells/EmptyCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Copyright Oxide Computer Company
*/

import { classed } from '@oxide/util'
import { classed } from '~/util/classed'

export const EmptyCell = () => <span className="text-sans-md text-quinary">&mdash;</span>

Expand Down
2 changes: 1 addition & 1 deletion app/table/cells/LinkCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import { Link } from 'react-router-dom'

import { classed } from '@oxide/util'
import { classed } from '~/util/classed'

import type { Cell } from './Cell'

Expand Down
4 changes: 3 additions & 1 deletion app/ui/lib/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import { matchSorter } from 'match-sorter'
import React, { useState } from 'react'

import { Close12Icon } from '@oxide/design-system/icons/react'
import { classed, groupBy } from '@oxide/util'
import { groupBy } from '@oxide/util'

import { classed } from '~/util/classed'

import { useSteppedScroll } from './use-stepped-scroll'

Expand Down
3 changes: 2 additions & 1 deletion app/ui/lib/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import cn from 'classnames'

import { Checkmark12Icon } from '@oxide/design-system/icons/react'
import { classed } from '@oxide/util'

import { classed } from '~/util/classed'

const Check = () => (
<Checkmark12Icon className="pointer-events-none absolute left-0.5 top-0.5 h-3 w-3 fill-current text-accent" />
Expand Down
2 changes: 1 addition & 1 deletion app/ui/lib/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Copyright Oxide Computer Company
*/
import { classed } from '@oxide/util'
import { classed } from '~/util/classed'

/** Gets special styling from being inside `.ox-form` */
export const FormDivider = classed.hr`ox-divider w-full border-t border-secondary`
Expand Down
2 changes: 1 addition & 1 deletion app/ui/lib/MiniTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Copyright Oxide Computer Company
*/
import { classed } from '@oxide/util'
import { classed } from '~/util/classed'

import { Table as BigTable } from './Table'

Expand Down
3 changes: 2 additions & 1 deletion app/ui/lib/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { animated, useTransition } from '@react-spring/web'
import React, { createContext, forwardRef, useContext, useId } from 'react'

import { Close12Icon } from '@oxide/design-system/icons/react'
import { classed } from '@oxide/util'

import { classed } from '~/util/classed'

import { Button } from './Button'

Expand Down
2 changes: 1 addition & 1 deletion app/ui/lib/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import type { ReactElement } from 'react'

import { classed } from '@oxide/util'
import { classed } from '~/util/classed'

export const PageHeader = classed.header`mb-16 mt-12 flex items-center justify-between`

Expand Down
2 changes: 1 addition & 1 deletion app/ui/lib/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import cn from 'classnames'
import React from 'react'

import { classed } from '@oxide/util'
import { classed } from '~/util/classed'

export const RadioGroupHint = classed.p`text-base text-secondary text-sans-sm max-w-3xl`

Expand Down
2 changes: 1 addition & 1 deletion app/ui/lib/SideModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import React, { createContext, useContext, useRef, type ReactNode } from 'react'

import { Close12Icon, Error12Icon } from '@oxide/design-system/icons/react'
import { Message, useIsInModal } from '@oxide/ui'
import { classed } from '@oxide/util'

import { classed } from '~/util/classed'
import { useIsOverflow } from 'app/hooks'

import './side-modal.css'
Expand Down
3 changes: 1 addition & 2 deletions app/ui/lib/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import SimpleBar from 'simplebar-react'

import 'simplebar-react/dist/simplebar.min.css'

import { classed } from '@oxide/util'

import { classed } from '~/util/classed'
import { useIsOverflow } from 'app/hooks'

import './table.css'
Expand Down
1 change: 0 additions & 1 deletion app/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

export * from './array'
export * from './children'
export * from './classed'
export * from './date'
export * from './invariant'
export * from './math'
Expand Down

0 comments on commit 9b4a6e0

Please sign in to comment.