diff --git a/packages/island/src/primitives/dialog/Dialog.tsx b/packages/island/src/atoms/dialog/Dialog.tsx similarity index 98% rename from packages/island/src/primitives/dialog/Dialog.tsx rename to packages/island/src/atoms/dialog/Dialog.tsx index f7e083c..11d1a95 100644 --- a/packages/island/src/primitives/dialog/Dialog.tsx +++ b/packages/island/src/atoms/dialog/Dialog.tsx @@ -3,9 +3,9 @@ import { useEffect, useEffectEvent, useRef, useState } from 'react'; import type { MouseEvent, PointerEvent, SyntheticEvent } from 'react'; -import { FlexBox } from '../../atoms/flex-box'; +import { FlexBox } from '../flex-box'; import { cn } from '../../tools/cn'; -import { Element } from '../element'; +import { Element } from '../../primitives/element'; import { DIALOG_CLOSE_EVENT, DIALOG_OPEN_EVENT, diff --git a/packages/island/src/primitives/dialog/constants.ts b/packages/island/src/atoms/dialog/constants.ts similarity index 100% rename from packages/island/src/primitives/dialog/constants.ts rename to packages/island/src/atoms/dialog/constants.ts diff --git a/packages/island/src/primitives/dialog/index.ts b/packages/island/src/atoms/dialog/index.ts similarity index 100% rename from packages/island/src/primitives/dialog/index.ts rename to packages/island/src/atoms/dialog/index.ts diff --git a/packages/island/src/primitives/dialog/types.ts b/packages/island/src/atoms/dialog/types.ts similarity index 100% rename from packages/island/src/primitives/dialog/types.ts rename to packages/island/src/atoms/dialog/types.ts diff --git a/packages/island/src/index.ts b/packages/island/src/index.ts index 0a2ee57..6ba6da8 100644 --- a/packages/island/src/index.ts +++ b/packages/island/src/index.ts @@ -16,6 +16,13 @@ export type { CountdownProps, CountdownTone, } from './atoms/countdown'; +export { + Dialog, + DIALOG_CLOSE_EVENT, + DIALOG_OPEN_EVENT, + DIALOG_PANEL_SELECTOR, +} from './atoms/dialog'; +export type { DialogProps } from './atoms/dialog'; export { FlexBox } from './atoms/flex-box'; export type { AlignContent, @@ -94,6 +101,8 @@ export { LockedTeaser } from './molecules/locked-teaser'; export type { LockedTeaserProps } from './molecules/locked-teaser'; export { MediaCarousel } from './molecules/media-carousel'; export type { MediaCarouselProps, MediaItem } from './molecules/media-carousel'; +export { Modal } from './molecules/modal'; +export type { ModalProps } from './molecules/modal'; export { NetworkStatus, networkStatusVariants, @@ -110,6 +119,8 @@ export type { ResendCodeProps, ResendStatus, } from './molecules/resend-code'; +export { Sheet } from './molecules/sheet'; +export type { SheetPlacement, SheetProps } from './molecules/sheet'; export { StateMessage, stateMessageVariants } from './molecules/state-message'; export type { StateMessageProps, @@ -145,8 +156,6 @@ export type { LightboxLabels, LightboxProps, } from './organisms/lightbox'; -export { Modal } from './organisms/modal'; -export type { ModalProps } from './organisms/modal'; export { PostCard } from './organisms/post-card'; export type { PostAuthor, @@ -165,8 +174,6 @@ export type { PredictionRangeValues, PredictionStatus, } from './organisms/prediction-card'; -export { Sheet } from './organisms/sheet'; -export type { SheetPlacement, SheetProps } from './organisms/sheet'; export { SkeletonPreset } from './organisms/skeleton-preset'; export type { SkeletonPresetName, @@ -190,13 +197,6 @@ export type { TierOptionLabels, TierOptionProps, } from './organisms/tier-option'; -export { - Dialog, - DIALOG_CLOSE_EVENT, - DIALOG_OPEN_EVENT, - DIALOG_PANEL_SELECTOR, -} from './primitives/dialog'; -export type { DialogProps } from './primitives/dialog'; export { Element } from './primitives/element'; export type { ElementProps, diff --git a/packages/island/src/organisms/modal/Modal.tsx b/packages/island/src/molecules/modal/Modal.tsx similarity index 97% rename from packages/island/src/organisms/modal/Modal.tsx rename to packages/island/src/molecules/modal/Modal.tsx index 2a6e5b3..65672c2 100644 --- a/packages/island/src/organisms/modal/Modal.tsx +++ b/packages/island/src/molecules/modal/Modal.tsx @@ -3,7 +3,7 @@ import { useId } from 'react'; import { Button } from '../../atoms/button'; import { FlexBox } from '../../atoms/flex-box'; import { Typography } from '../../atoms/typography'; -import { Dialog } from '../../primitives/dialog'; +import { Dialog } from '../../atoms/dialog'; import { Element } from '../../primitives/element'; import { cn } from '../../tools/cn'; import type { ModalProps } from './types'; diff --git a/packages/island/src/organisms/modal/index.ts b/packages/island/src/molecules/modal/index.ts similarity index 100% rename from packages/island/src/organisms/modal/index.ts rename to packages/island/src/molecules/modal/index.ts diff --git a/packages/island/src/organisms/modal/types.ts b/packages/island/src/molecules/modal/types.ts similarity index 100% rename from packages/island/src/organisms/modal/types.ts rename to packages/island/src/molecules/modal/types.ts diff --git a/packages/island/src/organisms/sheet/Sheet.tsx b/packages/island/src/molecules/sheet/Sheet.tsx similarity index 98% rename from packages/island/src/organisms/sheet/Sheet.tsx rename to packages/island/src/molecules/sheet/Sheet.tsx index f836363..f040341 100644 --- a/packages/island/src/organisms/sheet/Sheet.tsx +++ b/packages/island/src/molecules/sheet/Sheet.tsx @@ -2,7 +2,7 @@ import { useId } from 'react'; import { FlexBox } from '../../atoms/flex-box'; import { Typography } from '../../atoms/typography'; -import { Dialog } from '../../primitives/dialog'; +import { Dialog } from '../../atoms/dialog'; import { Element } from '../../primitives/element'; import { cn } from '../../tools/cn'; import { SheetHead } from './components/SheetHead'; diff --git a/packages/island/src/organisms/sheet/components/SheetHead.tsx b/packages/island/src/molecules/sheet/components/SheetHead.tsx similarity index 100% rename from packages/island/src/organisms/sheet/components/SheetHead.tsx rename to packages/island/src/molecules/sheet/components/SheetHead.tsx diff --git a/packages/island/src/organisms/sheet/components/SheetPopover.tsx b/packages/island/src/molecules/sheet/components/SheetPopover.tsx similarity index 100% rename from packages/island/src/organisms/sheet/components/SheetPopover.tsx rename to packages/island/src/molecules/sheet/components/SheetPopover.tsx diff --git a/packages/island/src/organisms/sheet/hooks/use-dismiss.ts b/packages/island/src/molecules/sheet/hooks/use-dismiss.ts similarity index 100% rename from packages/island/src/organisms/sheet/hooks/use-dismiss.ts rename to packages/island/src/molecules/sheet/hooks/use-dismiss.ts diff --git a/packages/island/src/organisms/sheet/hooks/use-flip.ts b/packages/island/src/molecules/sheet/hooks/use-flip.ts similarity index 100% rename from packages/island/src/organisms/sheet/hooks/use-flip.ts rename to packages/island/src/molecules/sheet/hooks/use-flip.ts diff --git a/packages/island/src/organisms/sheet/index.ts b/packages/island/src/molecules/sheet/index.ts similarity index 100% rename from packages/island/src/organisms/sheet/index.ts rename to packages/island/src/molecules/sheet/index.ts diff --git a/packages/island/src/organisms/sheet/types.ts b/packages/island/src/molecules/sheet/types.ts similarity index 100% rename from packages/island/src/organisms/sheet/types.ts rename to packages/island/src/molecules/sheet/types.ts diff --git a/packages/island/src/organisms/sheet/variants.ts b/packages/island/src/molecules/sheet/variants.ts similarity index 100% rename from packages/island/src/organisms/sheet/variants.ts rename to packages/island/src/molecules/sheet/variants.ts diff --git a/packages/island/src/molecules/toast/Toaster.tsx b/packages/island/src/molecules/toast/Toaster.tsx index 12a2fab..5a3f574 100644 --- a/packages/island/src/molecules/toast/Toaster.tsx +++ b/packages/island/src/molecules/toast/Toaster.tsx @@ -5,7 +5,7 @@ import type { CSSProperties } from 'react'; import { createPortal } from 'react-dom'; import { Toaster as SonnerToaster } from 'sonner'; -import { DIALOG_CLOSE_EVENT, DIALOG_OPEN_EVENT } from '../../primitives/dialog'; +import { DIALOG_CLOSE_EVENT, DIALOG_OPEN_EVENT } from '../../atoms/dialog'; import type { ToasterProps } from './types'; const noSubscription = () => () => {}; diff --git a/packages/island/src/organisms/lightbox/Lightbox.tsx b/packages/island/src/organisms/lightbox/Lightbox.tsx index 718d65b..dba666a 100644 --- a/packages/island/src/organisms/lightbox/Lightbox.tsx +++ b/packages/island/src/organisms/lightbox/Lightbox.tsx @@ -7,7 +7,7 @@ import type { KeyboardEvent, PointerEvent } from 'react'; import { FlexBox } from '../../atoms/flex-box'; import { GridBox } from '../../atoms/grid-box'; import { Typography } from '../../atoms/typography'; -import { Dialog } from '../../primitives/dialog'; +import { Dialog } from '../../atoms/dialog'; import { Element } from '../../primitives/element'; import { cn } from '../../tools/cn'; import { LightboxButton } from './components/LightboxButton'; diff --git a/packages/island/src/organisms/support-sheet/SupportSheet.tsx b/packages/island/src/organisms/support-sheet/SupportSheet.tsx index 96c9afa..28ae29e 100644 --- a/packages/island/src/organisms/support-sheet/SupportSheet.tsx +++ b/packages/island/src/organisms/support-sheet/SupportSheet.tsx @@ -2,8 +2,8 @@ import { FlexBox } from '../../atoms/flex-box'; import { Icon } from '../../atoms/icon'; import { Link } from '../../atoms/link'; import { Typography } from '../../atoms/typography'; -import { Modal } from '../modal'; -import { Sheet } from '../sheet'; +import { Modal } from '../../molecules/modal'; +import { Sheet } from '../../molecules/sheet'; import { SupportRow } from './components/SupportRow'; import type { SupportSheetProps } from './types';