@helpwave/hightide 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +12 -2
- package/.storybook/main.ts +0 -24
- package/.storybook/preview.tsx +0 -67
- package/eslint.config.js +0 -3
- package/postcss.config.mjs +0 -7
- package/stories/README.md +0 -23
- package/stories/coloring/shading.stories.tsx +0 -54
- package/stories/geometry/Circle.stories.tsx +0 -16
- package/stories/geometry/rings/AnimatedRing.stories.tsx +0 -18
- package/stories/geometry/rings/RadialRings.stories.tsx +0 -19
- package/stories/geometry/rings/Ring.stories.tsx +0 -17
- package/stories/geometry/rings/RingWave.stories.tsx +0 -20
- package/stories/layout/FAQSection.stories.tsx +0 -49
- package/stories/layout/InputGroup.stories.tsx +0 -19
- package/stories/layout/Table.stories.tsx +0 -19
- package/stories/layout/TextImage.stories.tsx +0 -24
- package/stories/layout/chip/Chip.stories.tsx +0 -19
- package/stories/layout/chip/ChipList.stories.tsx +0 -27
- package/stories/layout/tile/Tile.stories.ts +0 -20
- package/stories/layout/tile/TileWithImage.stories.tsx +0 -27
- package/stories/other/BreadCrumbs.stories.tsx +0 -21
- package/stories/other/HelpwaveBadge.stories.tsx +0 -18
- package/stories/other/HelpwaveSpinner.stories.tsx +0 -19
- package/stories/other/MarkdownInterpreter.stories.tsx +0 -18
- package/stories/other/Profile.stories.tsx +0 -52
- package/stories/other/SearchableList.stories.tsx +0 -21
- package/stories/other/StackingModals.stories.tsx +0 -16
- package/stories/other/TechRadar.stories.tsx +0 -14
- package/stories/other/Translation.stories.tsx +0 -56
- package/stories/other/VerticalDivider.stories.tsx +0 -20
- package/stories/other/avatar/Avatar.stories.tsx +0 -19
- package/stories/other/avatar/AvatarGroup.stories.tsx +0 -26
- package/stories/other/tooltip/Tooltip.stories.tsx +0 -30
- package/stories/other/tooltip/TooltipStack.stories.tsx +0 -39
- package/stories/user-action/button/LoadingButton.stories.tsx +0 -21
- package/stories/user-action/button/OutlineButton.stories.tsx +0 -22
- package/stories/user-action/button/SolidButton.stories.tsx +0 -22
- package/stories/user-action/button/TextButton.stories.tsx +0 -22
- package/stories/user-action/input/Checkbox.stories.tsx +0 -20
- package/stories/user-action/input/Label.stories.tsx +0 -18
- package/stories/user-action/input/ScrollPicker.stories.tsx +0 -20
- package/stories/user-action/input/Textarea.stories.tsx +0 -22
- package/stories/user-action/input/date/DatePicker.stories.tsx +0 -23
- package/stories/user-action/input/date/DateTimePicker.stories.tsx +0 -26
- package/stories/user-action/input/date/DayPicker.stories.tsx +0 -20
- package/stories/user-action/input/date/TimePicker.stories.tsx +0 -20
- package/stories/user-action/input/date/YearMonthPicker.stories.tsx +0 -21
- package/stories/user-action/input/select/MultiSelect.stories.tsx +0 -39
- package/stories/user-action/input/select/SearchableSelect.stories.tsx +0 -32
- package/stories/user-action/input/select/Select.stories.tsx +0 -30
- package/stories/user-action/properties/CheckboxProperty.stories.tsx +0 -20
- package/stories/user-action/properties/DateProperty.stories.tsx +0 -21
- package/stories/user-action/properties/MultiSelectProperty.stories.tsx +0 -33
- package/stories/user-action/properties/NumberProperty.stories.tsx +0 -21
- package/stories/user-action/properties/PropertyBase.stories.tsx +0 -28
- package/stories/user-action/properties/SingleSelectProperty.stories.tsx +0 -35
- package/stories/user-action/properties/TextProperty.stories.tsx +0 -20
- package/tsconfig.json +0 -20
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { SearchableList } from '../../components/SearchableList'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/SearchableList',
|
|
6
|
-
component: SearchableList<string>,
|
|
7
|
-
} satisfies Meta<typeof SearchableList<string>>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const SearchableListVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
list: ['Apple', 'Banana', 'Pineapple', 'Pear', 'Strawberry', 'Raspberry', 'Wildberry'],
|
|
15
|
-
initialSearch: '',
|
|
16
|
-
searchMapping: value => [value],
|
|
17
|
-
itemMapper: value => <span>{value}</span>,
|
|
18
|
-
className: '',
|
|
19
|
-
overwriteTranslation: {},
|
|
20
|
-
},
|
|
21
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { StackingModals } from '../../components/examples/StackingModals'
|
|
3
|
-
|
|
4
|
-
const meta: Meta = {
|
|
5
|
-
title: 'Other/StackingModals',
|
|
6
|
-
component: StackingModals,
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const StackingModalsStory: Story = {
|
|
13
|
-
render: () => <StackingModals />,
|
|
14
|
-
args: {
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { TechRadar } from '../../components/TechRadar'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/TechRadar',
|
|
6
|
-
component: TechRadar,
|
|
7
|
-
} satisfies Meta<typeof TechRadar>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const TechRadarStory: Story = {
|
|
13
|
-
render: () => <TechRadar />,
|
|
14
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import type { Languages } from '../../hooks/useLanguage'
|
|
3
|
-
import type { PropsForTranslation } from '../../hooks/useTranslation'
|
|
4
|
-
import { useTranslation } from '../../hooks/useTranslation'
|
|
5
|
-
|
|
6
|
-
type TranslationExampleTranslation = {
|
|
7
|
-
welcome: string,
|
|
8
|
-
goodToSeeYou: string,
|
|
9
|
-
page: (page: number) => string,
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const defaultTranslationExampleTranslations: Record<Languages, TranslationExampleTranslation> = {
|
|
13
|
-
en: {
|
|
14
|
-
welcome: 'Welcome',
|
|
15
|
-
goodToSeeYou: 'Good to see you',
|
|
16
|
-
page: (page) => `Page ${page}`
|
|
17
|
-
},
|
|
18
|
-
de: {
|
|
19
|
-
welcome: 'Willkommen',
|
|
20
|
-
goodToSeeYou: 'Schön dich zu sehen',
|
|
21
|
-
page: (page) => `Seite ${page}`
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type TranslationExampleProps = {
|
|
26
|
-
name: string,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Simple TranslationExample component to demonstrate some translations
|
|
31
|
-
*/
|
|
32
|
-
const TranslationExample = ({ overwriteTranslation, name }:PropsForTranslation<TranslationExampleTranslation, TranslationExampleProps>) => {
|
|
33
|
-
const translation = useTranslation(defaultTranslationExampleTranslations, overwriteTranslation)
|
|
34
|
-
return (
|
|
35
|
-
<p className="rounded bg-surface text-on-surface p-1 px-2">
|
|
36
|
-
{translation.welcome}{'! '}
|
|
37
|
-
{translation.goodToSeeYou}{', '}
|
|
38
|
-
<span className="text-primary">{name}</span>{'. '}
|
|
39
|
-
{translation.page(123)}
|
|
40
|
-
</p>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const meta = {
|
|
45
|
-
title: 'Other/Translation',
|
|
46
|
-
component: TranslationExample,
|
|
47
|
-
} satisfies Meta<typeof TranslationExample>
|
|
48
|
-
|
|
49
|
-
export default meta
|
|
50
|
-
type Story = StoryObj<typeof meta>;
|
|
51
|
-
|
|
52
|
-
export const TranslationStory: Story = {
|
|
53
|
-
args: {
|
|
54
|
-
name: 'Name'
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { VerticalDivider } from '../../components/VerticalDivider'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/VerticalDivider',
|
|
6
|
-
component: VerticalDivider,
|
|
7
|
-
} satisfies Meta<typeof VerticalDivider>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const VerticalDividerBasic: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
width: 1,
|
|
15
|
-
height: 100,
|
|
16
|
-
strokeWidth: 4,
|
|
17
|
-
dashLength: 6,
|
|
18
|
-
dashGap: 6,
|
|
19
|
-
},
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Avatar } from '../../../components/Avatar'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/Avatar',
|
|
6
|
-
component: Avatar,
|
|
7
|
-
} satisfies Meta<typeof Avatar>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const AvatarVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
alt: 'altText',
|
|
15
|
-
avatarUrl: 'https://helpwave.de/favicon.ico',
|
|
16
|
-
size: 'small',
|
|
17
|
-
className: ''
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { AvatarGroup } from '../../../components/AvatarGroup'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/Avatar',
|
|
6
|
-
component: AvatarGroup,
|
|
7
|
-
} satisfies Meta<typeof AvatarGroup>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const AvatarGroupVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
avatars: [
|
|
15
|
-
{ alt: 'altText', avatarUrl: 'https://helpwave.de/favicon.ico' },
|
|
16
|
-
{ alt: 'altText', avatarUrl: 'https://helpwave.de/favicon.ico' },
|
|
17
|
-
{ alt: 'altText', avatarUrl: 'https://helpwave.de/favicon.ico' },
|
|
18
|
-
{ alt: 'altText', avatarUrl: 'https://helpwave.de/favicon.ico' },
|
|
19
|
-
{ alt: 'altText', avatarUrl: 'https://helpwave.de/favicon.ico' },
|
|
20
|
-
{ alt: 'altText', avatarUrl: 'https://helpwave.de/favicon.ico' },
|
|
21
|
-
{ alt: 'altText', avatarUrl: 'https://helpwave.de/favicon.ico' },
|
|
22
|
-
],
|
|
23
|
-
maxShownProfiles: 5,
|
|
24
|
-
size: 'tiny'
|
|
25
|
-
},
|
|
26
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import type { TooltipProps } from '../../../components/Tooltip'
|
|
3
|
-
import { Tooltip } from '../../../components/Tooltip'
|
|
4
|
-
|
|
5
|
-
type TooltipExampleProps = Omit<TooltipProps, 'children' | 'tooltip'> & { tooltipText: string }
|
|
6
|
-
|
|
7
|
-
const TooltipExample = ({ tooltipText, ...props } : TooltipExampleProps) => {
|
|
8
|
-
return (
|
|
9
|
-
<Tooltip tooltip={tooltipText} {...props}><span className="bg-primary text-white px-2 py-1 rounded-lg">Hover over me</span></Tooltip>
|
|
10
|
-
)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const meta = {
|
|
14
|
-
title: 'Other/Tooltip',
|
|
15
|
-
component: TooltipExample,
|
|
16
|
-
} satisfies Meta<typeof TooltipExample>
|
|
17
|
-
|
|
18
|
-
export default meta
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
|
|
21
|
-
export const TooltipExampleStory: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
tooltipText: 'Tooltip',
|
|
24
|
-
animationDelay: 700,
|
|
25
|
-
position: 'bottom',
|
|
26
|
-
zIndex: 10,
|
|
27
|
-
containerClassName: '',
|
|
28
|
-
tooltipClassName: ''
|
|
29
|
-
},
|
|
30
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import type { TooltipProps } from '../../../components/Tooltip'
|
|
3
|
-
import { Tooltip } from '../../../components/Tooltip'
|
|
4
|
-
|
|
5
|
-
type TooltipStackExampleProps = Omit<TooltipProps, 'children' | 'tooltip'>
|
|
6
|
-
|
|
7
|
-
const TooltipStackExample = ({ ...props }: TooltipStackExampleProps) => {
|
|
8
|
-
return (
|
|
9
|
-
<Tooltip tooltip={(
|
|
10
|
-
<Tooltip zIndex={11} tooltip={(
|
|
11
|
-
<span>Try to hover <Tooltip tooltip="Great right?" zIndex={12}>
|
|
12
|
-
<span className="font-bold underline">here</span>
|
|
13
|
-
</Tooltip></span>
|
|
14
|
-
)}>This is a Text on which you can hover to show
|
|
15
|
-
another Tooltip
|
|
16
|
-
</Tooltip>
|
|
17
|
-
)} {...props}>
|
|
18
|
-
<span className="bg-primary text-white px-2 py-1 rounded-lg">Hover over me</span>
|
|
19
|
-
</Tooltip>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const meta = {
|
|
24
|
-
title: 'Other/Tooltip',
|
|
25
|
-
component: TooltipStackExample,
|
|
26
|
-
} satisfies Meta<typeof TooltipStackExample>
|
|
27
|
-
|
|
28
|
-
export default meta
|
|
29
|
-
type Story = StoryObj<typeof meta>;
|
|
30
|
-
|
|
31
|
-
export const TooltipStackExampleStory: Story = {
|
|
32
|
-
args: {
|
|
33
|
-
animationDelay: 700,
|
|
34
|
-
position: 'right',
|
|
35
|
-
zIndex: 10,
|
|
36
|
-
containerClassName: '',
|
|
37
|
-
tooltipClassName: ''
|
|
38
|
-
},
|
|
39
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { LoadingButton } from '../../../components/LoadingButton'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Button',
|
|
6
|
-
component: LoadingButton,
|
|
7
|
-
} satisfies Meta<typeof LoadingButton>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const LoadingButtonVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
children: 'Modify my `isLoading` properties',
|
|
15
|
-
color: 'primary',
|
|
16
|
-
size: 'medium',
|
|
17
|
-
disabled: false,
|
|
18
|
-
className: 'rounded',
|
|
19
|
-
isLoading: false,
|
|
20
|
-
},
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { OutlineButton } from '../../../components/Button'
|
|
3
|
-
import { action } from '@storybook/addon-actions'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Button',
|
|
7
|
-
component: OutlineButton,
|
|
8
|
-
} satisfies Meta<typeof OutlineButton>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const OutlineButtonVariation: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
children: 'Test',
|
|
16
|
-
color: 'primary',
|
|
17
|
-
size: 'medium',
|
|
18
|
-
disabled: false,
|
|
19
|
-
className: 'rounded',
|
|
20
|
-
onClick: action('Clicked'),
|
|
21
|
-
},
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { SolidButton } from '../../../components/Button'
|
|
3
|
-
import { action } from '@storybook/addon-actions'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Button',
|
|
7
|
-
component: SolidButton,
|
|
8
|
-
} satisfies Meta<typeof SolidButton>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const SolidButtonVariation: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
children: 'Test',
|
|
16
|
-
color: 'primary',
|
|
17
|
-
size: 'medium',
|
|
18
|
-
disabled: false,
|
|
19
|
-
className: 'rounded',
|
|
20
|
-
onClick: action('Clicked'),
|
|
21
|
-
},
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { TextButton } from '../../../components/Button'
|
|
3
|
-
import { action } from '@storybook/addon-actions'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Button',
|
|
7
|
-
component: TextButton,
|
|
8
|
-
} satisfies Meta<typeof TextButton>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const TextButtonVariation: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
children: 'Test',
|
|
16
|
-
color: 'negative',
|
|
17
|
-
size: 'medium',
|
|
18
|
-
disabled: false,
|
|
19
|
-
className: 'rounded',
|
|
20
|
-
onClick: action('Clicked'),
|
|
21
|
-
},
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { UncontrolledCheckbox } from '../../../components/user-input/Checkbox'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Checkbox',
|
|
6
|
-
component: UncontrolledCheckbox,
|
|
7
|
-
} satisfies Meta<typeof UncontrolledCheckbox>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const CheckboxVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
defaultValue: true,
|
|
15
|
-
disabled: false,
|
|
16
|
-
id: 'checkbox1',
|
|
17
|
-
size: 'medium',
|
|
18
|
-
label: { name: 'Click me ^^', labelType: 'labelMedium', className: '' },
|
|
19
|
-
},
|
|
20
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Label } from '../../../components/user-input/Label'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Input',
|
|
6
|
-
component: Label,
|
|
7
|
-
} satisfies Meta<typeof Label>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const LabelVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
name: 'LabelText',
|
|
15
|
-
labelType: 'labelMedium',
|
|
16
|
-
className: '',
|
|
17
|
-
},
|
|
18
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { ScrollPicker } from '../../../components/user-input/ScrollPicker'
|
|
3
|
-
import { range } from '../../../util/array'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Input/ScrollPicker',
|
|
7
|
-
component: ScrollPicker<number>,
|
|
8
|
-
} satisfies Meta<typeof ScrollPicker<number>>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const ChipVariation: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
options: range(0, 59),
|
|
16
|
-
mapping: (value) => value.toString(),
|
|
17
|
-
selected: 55,
|
|
18
|
-
disabled: false
|
|
19
|
-
},
|
|
20
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { TextareaExample } from '../../../components/examples/TextareaExample'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Input',
|
|
6
|
-
component: TextareaExample,
|
|
7
|
-
} satisfies Meta<typeof TextareaExample>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const TextareaVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
value: 'Text',
|
|
15
|
-
label: { name: 'Label' },
|
|
16
|
-
id: 'text',
|
|
17
|
-
headline: '',
|
|
18
|
-
disclaimer: '',
|
|
19
|
-
resizable: false,
|
|
20
|
-
className: '',
|
|
21
|
-
},
|
|
22
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { addDuration, subtractDuration } from '../../../../util/date'
|
|
3
|
-
import { ControlledDatePicker } from '../../../../components/date/DatePicker'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Input/Date',
|
|
7
|
-
component: ControlledDatePicker,
|
|
8
|
-
} satisfies Meta<typeof ControlledDatePicker>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const DatePickerVariation: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
value: new Date(),
|
|
16
|
-
start: subtractDuration(new Date(), { years: 50 }),
|
|
17
|
-
end: addDuration(new Date(), { years: 50 }),
|
|
18
|
-
initialDisplay: 'day',
|
|
19
|
-
className: '',
|
|
20
|
-
yearMonthPickerProps: {},
|
|
21
|
-
dayPickerProps: {},
|
|
22
|
-
},
|
|
23
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { DateTimePickerExample } from '../../../../components/examples/date/DateTimePickerExample'
|
|
3
|
-
import { addDuration, subtractDuration } from '../../../../util/date'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Input/Date',
|
|
7
|
-
component: DateTimePickerExample,
|
|
8
|
-
} satisfies Meta<typeof DateTimePickerExample>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const DateTimePickerVariation: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
mode: 'dateTime',
|
|
16
|
-
value: new Date(),
|
|
17
|
-
start: subtractDuration(new Date(), { years: 50 }),
|
|
18
|
-
end: addDuration(new Date(), { years: 50 }),
|
|
19
|
-
is24HourFormat: true,
|
|
20
|
-
minuteIncrement: '5min',
|
|
21
|
-
weekStart: 'monday',
|
|
22
|
-
initialDisplay: 'day',
|
|
23
|
-
markToday: true,
|
|
24
|
-
showValueOpen: false,
|
|
25
|
-
},
|
|
26
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { DayPickerControlled } from '../../../../components/date/DayPicker'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Input/Date',
|
|
6
|
-
component: DayPickerControlled,
|
|
7
|
-
} satisfies Meta<typeof DayPickerControlled>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const DayPickerVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
displayedMonth: new Date(),
|
|
15
|
-
selected: new Date(),
|
|
16
|
-
markToday: true,
|
|
17
|
-
weekStart: 'monday',
|
|
18
|
-
className: 'h-max-[300px]'
|
|
19
|
-
},
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { ControlledTimePicker } from '../../../../components/date/TimePicker'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Input/Date',
|
|
6
|
-
component: ControlledTimePicker,
|
|
7
|
-
} satisfies Meta<typeof ControlledTimePicker>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const TimePickerVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
time: new Date(),
|
|
15
|
-
is24HourFormat: true,
|
|
16
|
-
minuteIncrement: '5min',
|
|
17
|
-
maxHeight: 300,
|
|
18
|
-
className: ''
|
|
19
|
-
},
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { addDuration, subtractDuration } from '../../../../util/date'
|
|
3
|
-
import { ControlledYearMonthPicker } from '../../../../components/date/YearMonthPicker'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Input/Date',
|
|
7
|
-
component: ControlledYearMonthPicker,
|
|
8
|
-
} satisfies Meta<typeof ControlledYearMonthPicker>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const YearMonthPickerVariation: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
start: subtractDuration(new Date(), { years: 50 }),
|
|
16
|
-
end: addDuration(new Date(), { years: 50 }),
|
|
17
|
-
className: 'max-w-[200px]',
|
|
18
|
-
maxHeight: 300,
|
|
19
|
-
showValueOpen: false
|
|
20
|
-
},
|
|
21
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { MultiSelectExample } from '../../../../components/examples/MultiSelectExample'
|
|
3
|
-
import { action } from '@storybook/addon-actions'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Input/Select',
|
|
7
|
-
component: MultiSelectExample,
|
|
8
|
-
} satisfies Meta<typeof MultiSelectExample>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const MultiSelectVariations: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
label: { name: 'Select-Label' },
|
|
16
|
-
options: [
|
|
17
|
-
{ value: '1', selected: false, label: 'Entry 1' },
|
|
18
|
-
{ value: '2', selected: false, label: 'Entry 2', disabled: true },
|
|
19
|
-
{ value: '3', selected: false, label: 'Different Entry 3' },
|
|
20
|
-
{ value: '4', selected: false, label: 'Custom styled Entry 4', className: '!text-red-400' },
|
|
21
|
-
{ value: '5', selected: false, label: 'Entry 5' },
|
|
22
|
-
{ value: '6', selected: false, label: 'Entry 6', disabled: true },
|
|
23
|
-
{ value: '7', selected: false, label: 'Long Entry 7' },
|
|
24
|
-
{ value: '8', selected: false, label: 'Long Entry 8' },
|
|
25
|
-
{ value: '9', selected: false, label: 'Very Long Entry 9' },
|
|
26
|
-
{ value: '10', selected: false, label: 'Long Entry 10' },
|
|
27
|
-
{ value: '11', selected: false, label: 'Very very Long Entry 11' },
|
|
28
|
-
{ value: '12', selected: false, label: 'Entry 12', disabled: true }
|
|
29
|
-
],
|
|
30
|
-
disabled: false,
|
|
31
|
-
hintText: undefined,
|
|
32
|
-
showDisabledOptions: true,
|
|
33
|
-
useChipDisplay: true,
|
|
34
|
-
enableSearch: false,
|
|
35
|
-
className: '',
|
|
36
|
-
triggerClassName: '',
|
|
37
|
-
onChange: action('onChange'),
|
|
38
|
-
},
|
|
39
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { SearchableSelectExample } from '../../../../components/examples/SearchableSelectExample'
|
|
3
|
-
import { action } from '@storybook/addon-actions'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'User-Action/Input/Select',
|
|
7
|
-
component: SearchableSelectExample,
|
|
8
|
-
} satisfies Meta<typeof SearchableSelectExample>
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
|
|
13
|
-
export const SearchableSelectVariations: Story = {
|
|
14
|
-
args: {
|
|
15
|
-
label: { name: 'Select-Label', labelType: 'labelMedium' },
|
|
16
|
-
value: undefined,
|
|
17
|
-
options: [
|
|
18
|
-
{ value: 'Entry 1', label: 'Entry 1' },
|
|
19
|
-
{ value: 'Entry 2', label: 'Entry 2', disabled: true },
|
|
20
|
-
{ value: 'Entry 3', label: 'Entry 3' },
|
|
21
|
-
{ value: 'Custom styled', label: <span className="!text-red-400">Custom styled</span> },
|
|
22
|
-
{ value: 'Entry 5', label: 'Entry 5' },
|
|
23
|
-
{ value: 'Entry 6', label: 'Entry 6', disabled: true }
|
|
24
|
-
],
|
|
25
|
-
isDisabled: false,
|
|
26
|
-
hintText: 'Hinttext',
|
|
27
|
-
isHidingCurrentValue: false,
|
|
28
|
-
showDisabledOptions: true,
|
|
29
|
-
className: '',
|
|
30
|
-
onChange: action('onChange'),
|
|
31
|
-
},
|
|
32
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { SelectExample } from '../../../../components/examples/SelectExample'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Input/Select',
|
|
6
|
-
component: SelectExample<string>,
|
|
7
|
-
} satisfies Meta<typeof SelectExample<string>>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const SelectVariations: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
label: { name: 'Select-Label', labelType: 'labelMedium' },
|
|
15
|
-
value: undefined,
|
|
16
|
-
options: [
|
|
17
|
-
{ value: '1', label: 'Entry 1' },
|
|
18
|
-
{ value: '2', label: 'Entry 2', disabled: true },
|
|
19
|
-
{ value: '3', label: 'Entry 3' },
|
|
20
|
-
{ value: '4', label: <span className="!text-red-400">Custom styled</span> },
|
|
21
|
-
{ value: '5', label: 'Entry 5' },
|
|
22
|
-
{ value: '6', label: 'Entry 6', disabled: true }
|
|
23
|
-
],
|
|
24
|
-
isDisabled: false,
|
|
25
|
-
hintText: 'Hinttext',
|
|
26
|
-
isHidingCurrentValue: false,
|
|
27
|
-
showDisabledOptions: true,
|
|
28
|
-
className: '',
|
|
29
|
-
},
|
|
30
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { CheckboxPropertyExample } from '../../../components/examples/properties/CheckboxPropertyExample'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'User-Action/Property',
|
|
6
|
-
component: CheckboxPropertyExample,
|
|
7
|
-
} satisfies Meta<typeof CheckboxPropertyExample>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const CheckboxPropertyVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
name: 'Property',
|
|
15
|
-
softRequired: false,
|
|
16
|
-
value: false,
|
|
17
|
-
readOnly: false,
|
|
18
|
-
className: '',
|
|
19
|
-
},
|
|
20
|
-
}
|