Skip to content

Commit

Permalink
fix: cleanup dist output (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanes authored Dec 20, 2024
1 parent 9c02b37 commit 292001a
Show file tree
Hide file tree
Showing 65 changed files with 73 additions and 82 deletions.
2 changes: 1 addition & 1 deletion lib/examples/accountMenu.tsx → examples/accountMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AccountMenuProps } from '../components';
import type { AccountMenuProps } from '../lib';

export const accountMenu: AccountMenuProps = {
accountSearch: {
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/attachments.ts → examples/attachments.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AttachmentLinkProps } from '../components';
import type { AttachmentLinkProps } from '../lib';

export const attachments: AttachmentLinkProps[] = [
{
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion lib/examples/avatar/brreg.ts → examples/avatar/brreg.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AvatarProps } from '../../components';
import type { AvatarProps } from '../../lib';
import logo from './brreg-logo.png';

export const brreg: AvatarProps = {
Expand Down
File renamed without changes.
File renamed without changes
2 changes: 1 addition & 1 deletion lib/examples/avatar/nav.ts → examples/avatar/nav.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AvatarProps } from '../../components';
import type { AvatarProps } from '../../lib';
import logo from './nav-logo.png';

export const nav: AvatarProps = {
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion lib/examples/avatar/oslo.ts → examples/avatar/oslo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AvatarProps } from '../../components';
import type { AvatarProps } from '../../lib/components';
import logo from './oslo-logo.png';

export const oslo: AvatarProps = {
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion lib/examples/avatar/skatt.ts → examples/avatar/skatt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AvatarProps } from '../../components';
import type { AvatarProps } from '../../lib';
import logo from './skatt-logo.png';

export const skatt: AvatarProps = {
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion lib/examples/avatar/ssb.ts → examples/avatar/ssb.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AvatarProps } from '../../components';
import type { AvatarProps } from '../../lib/components';
import logo from './ssb-logo.png';
export const ssb: AvatarProps = {
type: 'company',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ContextMenuProps } from '../../components';
import type { ContextMenuProps } from '../../lib';

export const dialogContextMenu: ContextMenuProps = {
id: 'context-menu',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DialogHistoryItemProps } from '../../components';
import type { DialogHistoryItemProps } from '../../lib';
import { skatt } from '../avatar';

export const dialogHistoryItems: DialogHistoryItemProps[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DialogListItemProps } from '../../components';
import type { DialogListItemProps } from '../../lib';
import { skatt } from '../avatar';

export const dialogListItems: DialogListItemProps[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogProps } from '../../components';
import { oslo } from '../avatar/';
import type { DialogProps } from '../../lib';
import { oslo } from '../avatar';

export const extendedLetterDialog: DialogProps = {
id: 'nabovarsel',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogProps } from '../../components';
import { nav as sender } from '../avatar/';
import type { DialogProps } from '../../lib';
import { nav as sender } from '../avatar';

export const metadataDialog: DialogProps = {
id: 'metadata',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DialogProps } from '../../components';
import type { DialogProps } from '../../lib';
import { reportingHistoryItems } from './reportingHistoryItems';
import { reportingInProgressDialog } from './reportingInProgressDialog';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogProps } from '../../components';
import { ssb } from '../avatar/';
import type { DialogProps } from '../../lib';
import { ssb } from '../avatar';

export const reportingDialog: DialogProps = {
id: 'reporting',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DialogProps } from '../../components';
import type { DialogProps } from '../../lib';
import { reportingDialog } from './reportingDialog';

export const reportingDraftDialog: DialogProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogHistoryItemProps } from '../../components';
import { ssb as sender } from '../avatar/';
import type { DialogHistoryItemProps } from '../../lib';
import { ssb as sender } from '../avatar';

export const reportingHistoryItems: DialogHistoryItemProps[] = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DialogProps } from '../../components';
import type { DialogProps } from '../../lib';
import { reportingDialog } from './reportingDialog';
import { reportingHistoryItems } from './reportingHistoryItems';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogProps } from '../../components';
import { skatt } from '../avatar/';
import type { DialogProps } from '../../lib';
import { skatt } from '../avatar';

export const simpleLetterDialog: DialogProps = {
id: 'aksjeoppgave',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TransmissionItemProps } from '../../components';
import type { TransmissionItemProps } from '../../lib';
import { skatt } from '../avatar';

export const transmissionList: TransmissionItemProps[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogProps } from '../../components';
import { skatt } from '../avatar/';
import type { DialogProps } from '../../lib';
import { skatt } from '../avatar';

import { transmissionsHistoryItems } from './transmissionsHistoryItems';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogProps } from '../../components';
import { skatt } from '../avatar/';
import type { DialogProps } from '../../lib';
import { skatt } from '../avatar';

import { transmissionsTimeline } from './transmissionsTimeline';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DialogHistoryItemProps } from '../../components';
import type { DialogHistoryItemProps } from '../../lib';
import { skatt } from '../avatar';

export const transmissionsHistoryItems: DialogHistoryItemProps[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { DialogProps } from '../../components';
import { skatt } from '../avatar/';
import type { DialogProps } from '../../lib';
import { skatt } from '../avatar';

import { transmissionsHistoryItems } from './transmissionsHistoryItems';
import { transmissionsTimeline } from './transmissionsTimeline';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DialogTimelineProps } from '../../components';
import type { DialogTimelineProps } from '../../lib';
import { transmissionsHistoryItems } from './transmissionsHistoryItems';

const items = transmissionsHistoryItems
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/footer.ts → examples/footer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FooterProps } from '../components';
import type { FooterProps } from '../lib';

export const footer: FooterProps = {
address: 'Postboks 1382 Vika, 0114 Oslo.',
Expand Down
4 changes: 2 additions & 2 deletions lib/examples/globalMenu.ts → examples/globalMenu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GlobalMenuProps } from '../components';
import { accountMenu } from './';
import type { GlobalMenuProps } from '../lib';
import { accountMenu } from './index';

export const globalMenu: GlobalMenuProps = {
...accountMenu,
Expand Down
4 changes: 2 additions & 2 deletions lib/examples/header.ts → examples/header.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { HeaderProps } from '../components';
import { globalMenu } from './';
import type { HeaderProps } from '../lib';
import { globalMenu } from './index';

export const header: HeaderProps = {
menu: globalMenu,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ToolbarFilterProps } from '../components';
import type { ToolbarFilterProps } from '../lib';

export const inboxDateFilter: ToolbarFilterProps = {
name: 'date',
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/inboxMenu.tsx → examples/inboxMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { MenuProps } from '../components';
import type { MenuProps } from '../lib';

export const inboxMenu: MenuProps = {
groups: {},
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/index.ts → examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export * from './footer';
export * from './useInboxSearch';
export * from './useAccountMenu';

export * from './dialog/';
export * from './dialog';
2 changes: 1 addition & 1 deletion lib/examples/loginMenu.tsx → examples/loginMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { MenuProps } from '../components';
import type { MenuProps } from '../lib';

export const loginMenu: MenuProps = {
items: [
Expand Down
2 changes: 1 addition & 1 deletion lib/examples/menuItems.ts → examples/menuItems.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { MenuItemProps } from '../components';
import type { MenuItemProps } from '../lib';

export const menuItems: MenuItemProps[] = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react';
import type { Account, GlobalMenuProps } from '../components';
import type { Account, GlobalMenuProps } from '../lib';

export const useAccountMenu = ({ accounts, ...props }: GlobalMenuProps) => {
const [currentAccount, setCurrentAccount] = useState<Account | undefined>(accounts?.[0]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ChangeEvent, useState } from 'react';
import type { AutocompleteProps, SearchbarProps } from '../components';
import type { AutocompleteItemProps } from '../components/Autocomplete/AutocompleteItem.tsx';
import type { AutocompleteProps, SearchbarProps } from '../lib';
import type { AutocompleteItemProps } from '../lib/components/Autocomplete/AutocompleteItem.tsx';

export const useInboxSearch = ({
name = 'inbox-search',
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Attachment/AttachmentLink.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { attachments } from '../../examples/attachments.ts';
import { attachments } from '../../../examples/attachments.ts';
import { AttachmentLink } from './AttachmentLink';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Attachment/AttachmentList.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { attachments } from '../../examples/attachments.ts';
import { attachments } from '../../../examples/attachments.ts';
import { AttachmentList } from './AttachmentList';

const meta = {
Expand Down
4 changes: 2 additions & 2 deletions lib/components/Dialog/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
transmissionsCompletedDialog,
transmissionsDialog,
transmissionsInProgressDialog,
} from '../../examples';
} from '../../../examples';
import { Dialog } from './Dialog';

const meta = {
const meta: Meta<typeof Dialog> = {
title: 'Dialog/Dialog',
component: Dialog,
tags: ['autodocs'],
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Dialog/DialogAttachments.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { attachments } from '../../examples/attachments.ts';
import { attachments } from '../../../examples/attachments.ts';
import { DialogAttachments } from './DialogAttachments';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Dialog/DialogBylline.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { skatt } from '../../examples/avatar';
import { skatt } from '../../../examples/avatar';
import { DialogByline } from './DialogByline';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Dialog/DialogHistory.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { dialogHistoryItems } from '../../examples';
import { dialogHistoryItems } from '../../../examples';
import { DialogHistory } from './DialogHistory';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Dialog/DialogList.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { dialogListItems } from '../../examples';
import { dialogListItems } from '../../../examples';
import { DialogList } from './DialogList';
const meta = {
title: 'Dialog/DialogList',
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Dialog/DialogListItem.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const getStatusLabel = (value: string) => {

const sizes = ['xl', 'lg', 'md', 'sm', 'xs'] as DialogListItemSize[];

const meta = {
const meta: Meta<typeof DialogListItem> = {
title: 'Dialog/DialogListItem',
component: DialogListItem,
tags: ['autodocs'],
Expand Down
4 changes: 2 additions & 2 deletions lib/components/Dialog/DraftDialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
transmissionsCompletedDialog,
transmissionsDialog,
transmissionsInProgressDialog,
} from '../../examples';
} from '../../../examples';
import { DraftDialog } from './DraftDialog';

const meta = {
const meta: Meta<typeof DraftDialog> = {
title: 'Dialog/DraftDialog',
component: DraftDialog,
tags: ['autodocs'],
Expand Down
2 changes: 1 addition & 1 deletion lib/components/GlobalMenu/AccountMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { accountMenu } from '../../examples';
import { accountMenu } from '../../../examples';
import { AccountMenu } from './AccountMenu';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/GlobalMenu/GlobalMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react';
import { useState } from 'react';
import { globalMenu, loginMenu } from '../../examples';
import { globalMenu, loginMenu } from '../../../examples';
import type { Account } from './AccountButton.tsx';
import { GlobalMenu, type GlobalMenuProps } from './GlobalMenu';

Expand Down
2 changes: 1 addition & 1 deletion lib/components/Header/Header.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta } from '@storybook/react';
import { header, useAccountMenu, useInboxSearch } from '../../examples';
import { header, useAccountMenu, useInboxSearch } from '../../../examples';
import { Header, type HeaderProps } from './Header';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Icon/Icon.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { Icon } from './Icon';
import { iconsMap } from './iconsMap';

const meta = {
const meta: Meta<typeof Icon> = {
title: 'Atoms/Icon/Icon',
component: Icon,
tags: ['autodocs'],
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Layout/Layout.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta } from '@storybook/react';
import type { GlobalMenuProps, LayoutProps, SearchbarProps } from '../';
import { footer, header, inboxMenu, useAccountMenu, useInboxSearch } from '../../examples';
import { footer, header, inboxMenu, useAccountMenu, useInboxSearch } from '../../../examples';
import { Layout } from './Layout';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Menu/Menu.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { menuItems } from '../../examples/menuItems.ts';
import { menuItems } from '../../../examples/menuItems.ts';
import { Menu } from './Menu';

const meta = {
Expand Down
3 changes: 1 addition & 2 deletions lib/components/Menu/MenuItem.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
import { LayoutBase, type LayoutTheme } from '../Layout';
import { MetaItem } from '../Meta';
import { MenuBase } from './MenuBase';
Expand All @@ -13,7 +12,7 @@ const meta = {
parameters: {},
args: {
id: 'inbox',
onClick: fn(),
onClick: () => {},
},
} satisfies Meta<typeof MenuItem>;

Expand Down
2 changes: 1 addition & 1 deletion lib/components/Menu/MenuItems.stories.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { menuItems } from '../../examples/menuItems.ts';
import { menuItems } from '../../../examples/menuItems.ts';
import { MenuItems } from './MenuItems';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Page/PageBase.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta } from '@storybook/react';
import { Article, Button, Byline, PageBase, PageHeader, PageNav, Section, Typography } from '..';
import { nav } from '../../examples/avatar';
import { nav } from '../../../examples/avatar';

const meta = {
title: 'Page/PageBase',
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Page/PageNav.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { dialogContextMenu } from '../../examples';
import { dialogContextMenu } from '../../../examples';
import { PageNav } from './PageNav';

const meta = {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/Toolbar/Toolbar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react';
import React from 'react';
import { accountMenu, inboxFilters, inboxStatusFilter } from '../../examples';
import { accountMenu, inboxFilters, inboxStatusFilter } from '../../../examples';
import { type FilterState, Toolbar } from './Toolbar';

const meta = {
Expand Down
Loading

0 comments on commit 292001a

Please sign in to comment.