@helpwave/hightide 0.0.4 → 0.0.5
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 +9 -1
- 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
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "git+https://github.com/helpwave/hightide.git"
|
|
8
8
|
},
|
|
9
9
|
"license": "MPL-2.0",
|
|
10
|
-
"version": "0.0.
|
|
10
|
+
"version": "0.0.5",
|
|
11
11
|
"main": "index.ts",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"scripts": {
|
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
"build-storybook": "storybook build",
|
|
16
16
|
"lint": "tsc --noEmit && eslint ."
|
|
17
17
|
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.ts",
|
|
20
|
+
"globals.css",
|
|
21
|
+
"coloring/",
|
|
22
|
+
"components/",
|
|
23
|
+
"hooks/",
|
|
24
|
+
"util/"
|
|
25
|
+
],
|
|
18
26
|
"dependencies": {
|
|
19
27
|
"@headlessui/react": "1.7.19",
|
|
20
28
|
"@radix-ui/react-checkbox": "1.1.3",
|
package/.storybook/main.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// .storybook/main.ts
|
|
2
|
-
import type { StorybookConfig } from '@storybook/nextjs'
|
|
3
|
-
|
|
4
|
-
const config: StorybookConfig = {
|
|
5
|
-
stories: ['../stories/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
6
|
-
addons: [
|
|
7
|
-
'@storybook/addon-links',
|
|
8
|
-
'@storybook/addon-essentials',
|
|
9
|
-
'@storybook/addon-interactions',
|
|
10
|
-
],
|
|
11
|
-
framework: {
|
|
12
|
-
name: '@storybook/nextjs',
|
|
13
|
-
options: {},
|
|
14
|
-
},
|
|
15
|
-
docs: {},
|
|
16
|
-
typescript: {
|
|
17
|
-
reactDocgen: 'react-docgen-typescript'
|
|
18
|
-
},
|
|
19
|
-
core: {
|
|
20
|
-
disableTelemetry: true,
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default config
|
package/.storybook/preview.tsx
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type { Preview } from '@storybook/react'
|
|
2
|
-
import { ProvideLanguage } from '../hooks/useLanguage'
|
|
3
|
-
import { ModalRegister } from '../components/modals/ModalRegister'
|
|
4
|
-
import { modalRootName } from '../components/modals/Modal'
|
|
5
|
-
import '../globals.css'
|
|
6
|
-
import type { ThemeType } from '../hooks/useTheme'
|
|
7
|
-
import { ThemeProvider } from '../hooks/useTheme'
|
|
8
|
-
|
|
9
|
-
const colorToHex: Record<ThemeType, string> = {
|
|
10
|
-
dark: '#1A1A1A',
|
|
11
|
-
light: '#EEE',
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const colorToHexReverse: Record<string, ThemeType> = {
|
|
15
|
-
'#1A1A1A': 'dark',
|
|
16
|
-
'#EEE': 'light',
|
|
17
|
-
'transparent': 'light',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const preview: Preview = {
|
|
21
|
-
parameters: {
|
|
22
|
-
backgrounds: {
|
|
23
|
-
values: [
|
|
24
|
-
{ name: 'Dark', value: colorToHex.dark },
|
|
25
|
-
{ name: 'Light', value: colorToHex.light },
|
|
26
|
-
],
|
|
27
|
-
default: 'Light',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
globalTypes: {
|
|
31
|
-
language: {
|
|
32
|
-
name: 'Language',
|
|
33
|
-
description: 'Component Language',
|
|
34
|
-
defaultValue: 'en',
|
|
35
|
-
toolbar: {
|
|
36
|
-
icon: 'globe',
|
|
37
|
-
items: [
|
|
38
|
-
{ value: 'en', title: 'English' },
|
|
39
|
-
{ value: 'de', title: 'German' },
|
|
40
|
-
],
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
decorators: [
|
|
45
|
-
(Story, context) => {
|
|
46
|
-
const App = Story
|
|
47
|
-
const theme = colorToHexReverse[context.globals.backgrounds?.value ?? colorToHex.light]
|
|
48
|
-
const language = context.globals.language
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<main data-theme={theme}>
|
|
52
|
-
<ThemeProvider initialTheme={theme}>
|
|
53
|
-
<ProvideLanguage initialLanguage={language}>
|
|
54
|
-
<ModalRegister>
|
|
55
|
-
<div id={modalRootName}>
|
|
56
|
-
<App />
|
|
57
|
-
</div>
|
|
58
|
-
</ModalRegister>
|
|
59
|
-
</ProvideLanguage>
|
|
60
|
-
</ThemeProvider>
|
|
61
|
-
</main>
|
|
62
|
-
)
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export default preview
|
package/eslint.config.js
DELETED
package/postcss.config.mjs
DELETED
package/stories/README.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
## Adding a Story
|
|
2
|
-
|
|
3
|
-
You can use the `title` to change the displayed _hierarchy_.
|
|
4
|
-
**Make sure** that this _hierarchy_ is the **same as the path**
|
|
5
|
-
in which you have saved the story.
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
const meta = {
|
|
9
|
-
title: 'Category/Folder/ComponentGroup',
|
|
10
|
-
component: Circle,
|
|
11
|
-
} satisfies Meta<typeof Circle>
|
|
12
|
-
|
|
13
|
-
export default meta
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
|
|
16
|
-
export const CircleVariation: Story = {
|
|
17
|
-
args: {
|
|
18
|
-
radius: 40,
|
|
19
|
-
color: 'primary',
|
|
20
|
-
className: '',
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
```
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import type { ShadedColors } from '../../coloring/types'
|
|
3
|
-
import { shadingColorValues } from '../../coloring/types'
|
|
4
|
-
import { generateShadingColors } from '../../coloring/shading'
|
|
5
|
-
|
|
6
|
-
type StripeProps = {
|
|
7
|
-
shading: Partial<ShadedColors>,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const ColorStripe = ({ shading }: StripeProps) => {
|
|
11
|
-
const shades = generateShadingColors(shading)
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<div className="row">
|
|
15
|
-
{shadingColorValues.map((shade, index) => (
|
|
16
|
-
<div key={index} className="col gap-y-2 items-center relative">
|
|
17
|
-
<span className="font-bold">{shade}</span>
|
|
18
|
-
<div
|
|
19
|
-
style={{
|
|
20
|
-
backgroundColor: shades[shade],
|
|
21
|
-
width: 60,
|
|
22
|
-
height: 60,
|
|
23
|
-
}}
|
|
24
|
-
/>
|
|
25
|
-
<span style={{ position: 'absolute', bottom: index % 2 === 0 ? '-24px' : '-48px' }}>{shades[shade].toUpperCase()}</span>
|
|
26
|
-
</div>
|
|
27
|
-
))}
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const meta = {
|
|
33
|
-
title: 'Coloring/Shading',
|
|
34
|
-
component: ColorStripe,
|
|
35
|
-
} satisfies Meta<typeof ColorStripe>
|
|
36
|
-
|
|
37
|
-
export default meta
|
|
38
|
-
type Story = StoryObj<typeof meta>;
|
|
39
|
-
|
|
40
|
-
export const ShadingWithFixedValues: Story = {
|
|
41
|
-
args: {
|
|
42
|
-
shading: {
|
|
43
|
-
100: '#F5E2FD',
|
|
44
|
-
200: '#EFD5FB',
|
|
45
|
-
300: '#CDAFEF',
|
|
46
|
-
400: '#AA96DF',
|
|
47
|
-
500: '#B275CE',
|
|
48
|
-
600: '#8E75CE',
|
|
49
|
-
700: '#694BB4',
|
|
50
|
-
800: '#8070A9',
|
|
51
|
-
900: '#5D4D80',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Circle } from '../../components/Circle'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Geometry/Circle',
|
|
6
|
-
component: Circle,
|
|
7
|
-
} satisfies Meta<typeof Circle>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const CircleVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
radius: 40,
|
|
15
|
-
},
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { AnimatedRing } from '../../../components/Ring'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Geometry/Rings',
|
|
6
|
-
component: AnimatedRing,
|
|
7
|
-
} satisfies Meta<typeof AnimatedRing>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const AnimatedRingVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
innerSize: 40,
|
|
15
|
-
width: 10,
|
|
16
|
-
fillAnimationDuration: 3,
|
|
17
|
-
},
|
|
18
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { RadialRings } from '../../../components/Ring'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Geometry/Rings',
|
|
6
|
-
component: RadialRings,
|
|
7
|
-
} satisfies Meta<typeof RadialRings>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const RadialRingsVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
waveWidth: 10,
|
|
15
|
-
sizeCircle1: 100,
|
|
16
|
-
sizeCircle2: 200,
|
|
17
|
-
sizeCircle3: 300
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Ring } from '../../../components/Ring'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Geometry/Rings',
|
|
6
|
-
component: Ring,
|
|
7
|
-
} satisfies Meta<typeof Ring>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const RingVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
innerSize: 40,
|
|
15
|
-
width: 10,
|
|
16
|
-
},
|
|
17
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { RingWave } from '../../../components/Ring'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Geometry/Rings',
|
|
6
|
-
component: RingWave,
|
|
7
|
-
} satisfies Meta<typeof RingWave>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const RingWaveVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
startInnerSize: 20,
|
|
15
|
-
endInnerSize: 50,
|
|
16
|
-
width: 5,
|
|
17
|
-
fillAnimationDuration: 3,
|
|
18
|
-
repeating: false,
|
|
19
|
-
},
|
|
20
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { StoryFn } from '@storybook/react'
|
|
2
|
-
import { FAQSection } from '../../components/layout/FAQSection'
|
|
3
|
-
import { Helpwave } from '../../components/icons/Helpwave'
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Layout',
|
|
7
|
-
component: FAQSection,
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default meta
|
|
11
|
-
|
|
12
|
-
export const FAQSectionVariation: StoryFn = () => (
|
|
13
|
-
<div className="bg-gray-100 p-4">
|
|
14
|
-
<FAQSection
|
|
15
|
-
entries={[
|
|
16
|
-
{ id: 'question1', title: 'A Very Good Question?', content: { type: 'markdown', value: '\\negative{NO.}' } },
|
|
17
|
-
{
|
|
18
|
-
id: 'question2',
|
|
19
|
-
title: 'What is the first paragraph of the lorem ipsum?',
|
|
20
|
-
content: {
|
|
21
|
-
type: 'markdown',
|
|
22
|
-
value: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eget suscipit ex. In vitae leo metus.' +
|
|
23
|
-
' Fusce gravida urna et magna consectetur mollis. Lorem ipsum dolor sit amet, consectetur adipiscing elit.' +
|
|
24
|
-
' Etiam ac tellus purus. Integer vel sollicitudin leo. Integer nec interdum nisl. Nunc bibendum tellus vel' +
|
|
25
|
-
' mollis cursus. Mauris eu luctus ipsum. Vivamus euismod nisi at odio tristique volutpat. Cras sed' +
|
|
26
|
-
' facilisis neque, ac sagittis turpis. Maecenas et libero facilisis dui porta suscipit et in quam.' +
|
|
27
|
-
' In hac habitasse platea dictumst. Donec nec sodales nibh, a pellentesque purus.'
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: 'question3',
|
|
32
|
-
title: 'Can I click this?',
|
|
33
|
-
content: {
|
|
34
|
-
type: 'markdown',
|
|
35
|
-
value: '\\positive{\\b{Yes, you can.}}'
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: 'question4',
|
|
40
|
-
title: 'What does the helpwave logo look like?',
|
|
41
|
-
content: {
|
|
42
|
-
type: 'custom',
|
|
43
|
-
value: (<div className="row justify-center"><Helpwave/></div>)
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
]}
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
)
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { InputGroupExample } from '../../components/examples/InputGroupExample'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Layout',
|
|
6
|
-
component: InputGroupExample,
|
|
7
|
-
} satisfies Meta<typeof InputGroupExample>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const InputGroupVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
title: 'Title',
|
|
15
|
-
expanded: true,
|
|
16
|
-
isExpandable: true,
|
|
17
|
-
className: '',
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Table } from '../../components/Table'
|
|
3
|
-
import type { DataType } from '../../components/examples/TableExample'
|
|
4
|
-
import TableExample, { exampleData } from '../../components/examples/TableExample'
|
|
5
|
-
|
|
6
|
-
const meta: Meta<typeof Table<DataType>> = {
|
|
7
|
-
title: 'Layout/Table',
|
|
8
|
-
component: Table,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default meta
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
|
|
14
|
-
export const TableExampleStory: Story = {
|
|
15
|
-
render: (args) => <TableExample data={args['data']}/>,
|
|
16
|
-
args: {
|
|
17
|
-
data: exampleData,
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { TextImage } from '../../components/TextImage'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Layout/TextImage',
|
|
6
|
-
component: TextImage,
|
|
7
|
-
} satisfies Meta<typeof TextImage>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const TextImageVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
title: 'This is the title',
|
|
15
|
-
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras magna lorem, eleifend at mi nec, ' +
|
|
16
|
-
'vehicula dignissim diam. Integer ut justo eget neque interdum viverra eu eu dolor. Nullam vulputate urna sed ' +
|
|
17
|
-
'gravida facilisis. Phasellus volutpat elit luctus, sagittis libero sit amet, dapibus lacus.',
|
|
18
|
-
color: 'primary',
|
|
19
|
-
badge: 'Step #1',
|
|
20
|
-
imageUrl: 'https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
21
|
-
contentClassName: '',
|
|
22
|
-
className: '',
|
|
23
|
-
},
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Chip } from '../../../components/ChipList'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Layout/Chip',
|
|
6
|
-
component: Chip,
|
|
7
|
-
} satisfies Meta<typeof Chip>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const ChipVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
children: 'Label',
|
|
15
|
-
className: '',
|
|
16
|
-
variant: 'normal',
|
|
17
|
-
color: 'default'
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { ChipList } from '../../../components/ChipList'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Layout/Chip',
|
|
6
|
-
component: ChipList,
|
|
7
|
-
} satisfies Meta<typeof ChipList>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const ChipListVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
list: [
|
|
15
|
-
{ children: 'Chip 1' },
|
|
16
|
-
{ children: 'Chip 2' },
|
|
17
|
-
{ children: 'Chip 3 with longer text' },
|
|
18
|
-
{ children: 'Chip 4 different children', variant: 'fullyRounded' },
|
|
19
|
-
{ children: 'Chip 5 with text' },
|
|
20
|
-
{ children: 'Chip 6 custom style', className: '!bg-red-400' },
|
|
21
|
-
{ children: 'Chip 7 in dark color', color: 'dark' },
|
|
22
|
-
{ children: 'Chip 8 with very very long text' },
|
|
23
|
-
{ children: 'Chip 9' },
|
|
24
|
-
],
|
|
25
|
-
className: ''
|
|
26
|
-
},
|
|
27
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { TileExample } from '../../../components/examples/TileExample'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Layout/Tile',
|
|
6
|
-
component: TileExample,
|
|
7
|
-
} satisfies Meta<typeof TileExample>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const TileVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
title: { value: 'Title', className: '' },
|
|
15
|
-
description: { value: 'Description Text', className: 'textstyle-description' },
|
|
16
|
-
prefix: true,
|
|
17
|
-
suffix: true,
|
|
18
|
-
className: ''
|
|
19
|
-
},
|
|
20
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { TileWithImage } from '../../../components/layout/Tile'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Layout/Tile',
|
|
6
|
-
component: TileWithImage,
|
|
7
|
-
} satisfies Meta<typeof TileWithImage>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const TileWithImageVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
title: { value: 'About helpwave', className: 'textstyle-title-lg' },
|
|
15
|
-
description: {
|
|
16
|
-
value: 'Regulatory burdens and high barriers to entry make it difficult for small companies to enter the market,' +
|
|
17
|
-
' leading to a lack of competition. helpwave is here to change that. We offer a platform that brings everyone to' +
|
|
18
|
-
' the table, not just the big companies.',
|
|
19
|
-
className: '!text-gray-200'
|
|
20
|
-
},
|
|
21
|
-
url: 'https://helpwave.de/favicon.ico',
|
|
22
|
-
imageLocation: 'prefix',
|
|
23
|
-
imageSize: { width: 100, height: 100 },
|
|
24
|
-
imageClassName: 'filter invert',
|
|
25
|
-
className: '!py-4 !px-6 !gap-x-6 bg-sky-900 text-white rounded-2xl min-h-[200px]'
|
|
26
|
-
},
|
|
27
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { BreadCrumb } from '../../components/BreadCrumb'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/BreadCrumb',
|
|
6
|
-
component: BreadCrumb,
|
|
7
|
-
} satisfies Meta<typeof BreadCrumb>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const BreadCrumbVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
crumbs: [
|
|
15
|
-
{ display: 'Organization', link: '' },
|
|
16
|
-
{ display: 'Ward', link: '' },
|
|
17
|
-
{ display: 'Bed', link: '' },
|
|
18
|
-
{ display: 'Patient', link: '' },
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { HelpwaveBadge } from '../../components/HelpwaveBadge'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/HelpwaveBadge',
|
|
6
|
-
component: HelpwaveBadge,
|
|
7
|
-
} satisfies Meta<typeof HelpwaveBadge>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const Basic: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
size: 'small',
|
|
15
|
-
title: 'helpwave',
|
|
16
|
-
className: ''
|
|
17
|
-
},
|
|
18
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Helpwave } from '../../components/icons/Helpwave'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/Spinner',
|
|
6
|
-
component: Helpwave,
|
|
7
|
-
} satisfies Meta<typeof Helpwave>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const Basic: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
color: 'currentColor',
|
|
15
|
-
animate: 'loading',
|
|
16
|
-
width: 128,
|
|
17
|
-
height: 128,
|
|
18
|
-
},
|
|
19
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { MarkdownInterpreter } from '../../components/MarkdownInterpreter'
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Other/MarkdownInterpreter',
|
|
6
|
-
component: MarkdownInterpreter,
|
|
7
|
-
} satisfies Meta<typeof MarkdownInterpreter>
|
|
8
|
-
|
|
9
|
-
export default meta
|
|
10
|
-
type Story = StoryObj<typeof meta>;
|
|
11
|
-
|
|
12
|
-
export const MarkdownInterpreterVariation: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
text: '\\helpwave \\i{italic} \\{Escape\\} \\\\ \\b{bold} \\u{underline} ' +
|
|
15
|
-
'\\space{space-grotesk} \\newline Newline \\positive{positive} \\negative{negative} \\warn{warn} ' +
|
|
16
|
-
'\\primary{primary} \\b{\\i{\\u{bold and italic and underlined \\primary{also primary}}}}',
|
|
17
|
-
},
|
|
18
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
-
import { Profile } from '../../components/Profile'
|
|
3
|
-
import { Helpwave } from '../../components/icons/Helpwave'
|
|
4
|
-
import { MarkdownInterpreter } from '../../components/MarkdownInterpreter'
|
|
5
|
-
import { Chip } from '../../components/ChipList'
|
|
6
|
-
|
|
7
|
-
const meta = {
|
|
8
|
-
title: 'Other/Profile',
|
|
9
|
-
component: Profile,
|
|
10
|
-
} satisfies Meta<typeof Profile>
|
|
11
|
-
|
|
12
|
-
export default meta
|
|
13
|
-
type Story = StoryObj<typeof meta>;
|
|
14
|
-
|
|
15
|
-
export const ProfileVariation: Story = {
|
|
16
|
-
render: (args) => {
|
|
17
|
-
return (<Profile {...args}/>)
|
|
18
|
-
},
|
|
19
|
-
args: {
|
|
20
|
-
name: 'helpwave Member',
|
|
21
|
-
role: 'Chief Executive Officer',
|
|
22
|
-
roleBadge: 'CEO',
|
|
23
|
-
imageUrl: 'https://cdn.helpwave.de/boringavatar.svg',
|
|
24
|
-
badge: (
|
|
25
|
-
<Chip className="row gap-x-2 items-center justify-center" color="dark">
|
|
26
|
-
<Helpwave size={24}/>
|
|
27
|
-
<MarkdownInterpreter text={'\\helpwave'}/>
|
|
28
|
-
</Chip>
|
|
29
|
-
),
|
|
30
|
-
tags: ['development', 'frontend', 'cloud', 'backend'],
|
|
31
|
-
info: 'This is an additional Information Text.',
|
|
32
|
-
socials: [
|
|
33
|
-
{
|
|
34
|
-
type: 'github',
|
|
35
|
-
url: 'https://github.com',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
type: 'mail',
|
|
39
|
-
url: 'mailto:mail@helpwave.de',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
type: 'linkedin',
|
|
43
|
-
url: 'https://www.linkedin.com/',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
type: 'website',
|
|
47
|
-
url: 'https://helpwave.de',
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
imageClassName: 'w-[200px] h-[200px]'
|
|
51
|
-
},
|
|
52
|
-
}
|
|
@@ -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
|
-
}
|