Skip to content

Commit

Permalink
Merge pull request #178 from WestpacGEL/fixes/adding-use-client
Browse files Browse the repository at this point in the history
Fixes/adding 'use client'
  • Loading branch information
samithaf authored Oct 23, 2023
2 parents 6955f41 + 5483075 commit ff69c9c
Show file tree
Hide file tree
Showing 33 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ui/src/components/accordion/accordion.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { useAccordion } from '@react-aria/accordion';
import { filterDOMProps } from '@react-aria/utils';
import { useDOMRef } from '@react-spectrum/utils';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/alert/alert.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { AnimatePresence, LazyMotion, m } from 'framer-motion';
import React, { useCallback, useEffect, useState } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';
import { useButton, useComboBox, useFilter, useSearchField } from 'react-aria';
import { Item, useComboBoxState, useSearchFieldState } from 'react-stately';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/badge/badge.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { forwardRef } from 'react';

import { styles } from './badge.styles.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { Children, FunctionComponentElement, cloneElement } from 'react';
import { useBreadcrumbs } from 'react-aria';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useCallback, useEffect, useId, useRef } from 'react';
import { useButton, useOverlayTrigger } from 'react-aria';
import { useOverlayTriggerState } from 'react-stately';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { ReactElement, cloneElement, createContext } from 'react';
import { useRadioGroup } from 'react-aria';
import { useRadioGroupState } from 'react-stately';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/button/button.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { forwardRef, useMemo } from 'react';
import { mergeProps, useFocusRing } from 'react-aria';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { ReactElement, cloneElement, createContext, useEffect, useMemo, useRef, useState } from 'react';
import { useCheckboxGroup, useFocusRing } from 'react-aria';
import { useCheckboxGroupState } from 'react-stately';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { AnimatePresence, LazyMotion, m } from 'framer-motion';
import React, { useCallback, useId, useState } from 'react';

Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/compacta/compacta.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { AnimatePresence, LazyMotion, m } from 'framer-motion';
import React, { useCallback, useEffect, useId, useRef, useState } from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';

import { styles } from './date-picker.styles.js';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/field/field.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { Children, ReactNode, cloneElement, isValidElement, useCallback } from 'react';
import { useField } from 'react-aria';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { forwardRef } from 'react';
import { mergeProps, useFocusRing } from 'react-aria';

Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/form/form.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { createContext, useContext } from 'react';

import { ErrorMessage } from '../error-message/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { Children, ReactNode, cloneElement, isValidElement, useCallback, useId, useMemo } from 'react';

import { ErrorMessage, FormHint, FormLabel } from '../index.js';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/input/input.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { ForwardedRef, forwardRef } from 'react';
import { mergeProps, useFocusRing } from 'react-aria';

Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/link/link.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { forwardRef, useRef } from 'react';
import { mergeProps, useFocusRing, useLink } from 'react-aria';

Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/list/list.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { Children, ReactElement, cloneElement, createContext, useContext } from 'react';

import { Item } from './components/item/index.js';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/modal/modal.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React from 'react';

import { Backdrop, Dialog } from './components/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useCallback, useMemo } from 'react';

import { PaginationItem } from './components/index.js';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/popover/popover.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useCallback, useEffect, useId } from 'react';
import { useOverlayTriggerState } from 'react-stately';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React from 'react';
import { useProgressBar } from 'react-aria';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useEffect, useMemo, useState } from 'react';

import { ProgressRopeGroupStep, ProgressRopeStep } from './components/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { ReactElement, cloneElement, createContext, useEffect, useMemo, useRef, useState } from 'react';
import { useFocusRing, useRadioGroup } from 'react-aria';
import { useRadioGroupState } from 'react-stately';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/repeater/repeater.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import { AnimatePresence, LazyMotion, m } from 'framer-motion';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { useFocusRing } from 'react-aria';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/select/select.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { ForwardedRef, forwardRef } from 'react';
import { mergeProps, useFocusRing } from 'react-aria';

Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/selector/selector.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React from 'react';

import {
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/skip-link/skip-link.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { forwardRef } from 'react';

import { styles } from './skip-link.styles.js';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/switch/switch.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useId, useRef } from 'react';
import { VisuallyHidden, mergeProps, useCheckbox, useFocusRing } from 'react-aria';
import { useToggleState } from 'react-stately';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/table/table.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { createContext } from 'react';

import { Body, Caption, Cell, Footer, Header, HeaderCell, HeaderRow, Row } from './components/index.js';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/tabs/tabs.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { useRef } from 'react';
import { useTabList } from 'react-aria';
import { Item, useTabListState } from 'react-stately';
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/textarea/textarea.component.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, { ForwardedRef, forwardRef } from 'react';
import { mergeProps, useFocusRing } from 'react-aria';

Expand Down

0 comments on commit ff69c9c

Please sign in to comment.