@marigold/components 0.0.2 → 0.3.0
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/CHANGELOG.md +294 -0
- package/dist/ActionGroup/ActionGroup.d.ts +8 -0
- package/dist/ActionGroup/ActionGroup.stories.d.ts +5 -0
- package/dist/ActionGroup/index.d.ts +1 -0
- package/dist/Alert/Alert.d.ts +16 -3
- package/dist/Alert/Alert.stories.d.ts +5 -0
- package/dist/Badge/Badge.d.ts +11 -5
- package/dist/Badge/Badge.stories.d.ts +5 -0
- package/dist/Box.d.ts +2 -0
- package/dist/Button/Button.d.ts +9 -5
- package/dist/Button/Button.stories.d.ts +5 -0
- package/dist/Card/Card.d.ts +14 -0
- package/dist/Card/Card.stories.d.ts +5 -0
- package/dist/Card/index.d.ts +1 -0
- package/dist/Checkbox/Checkbox.d.ts +17 -5
- package/dist/Checkbox/Checkbox.stories.d.ts +5 -0
- package/dist/Checkbox/CheckboxIcons.d.ts +9 -0
- package/dist/Column/Column.d.ts +6 -4
- package/dist/Column/Column.stories.d.ts +5 -0
- package/dist/Columns/Columns.d.ts +10 -0
- package/dist/Columns/Columns.stories.d.ts +5 -0
- package/dist/Columns/index.d.ts +1 -0
- package/dist/Container/Container.d.ts +5 -4
- package/dist/Container/Container.stories.d.ts +5 -0
- package/dist/Dialog/Dialog.d.ts +17 -0
- package/dist/Dialog/Dialog.stories.d.ts +5 -0
- package/dist/Dialog/ModalDialog.d.ts +8 -0
- package/dist/Dialog/index.d.ts +1 -0
- package/dist/Divider/Divider.d.ts +10 -3
- package/dist/Divider/Divider.stories.d.ts +5 -0
- package/dist/Field/Field.d.ts +10 -5
- package/dist/Field/Field.stories.d.ts +5 -0
- package/dist/Image/Image.d.ts +11 -5
- package/dist/Image/Image.stories.d.ts +5 -0
- package/dist/Inline/Inline.d.ts +7 -0
- package/dist/Inline/Inline.stories.d.ts +5 -0
- package/dist/Inline/index.d.ts +1 -0
- package/dist/Input/Input.d.ts +10 -4
- package/dist/Input/Input.stories.d.ts +5 -0
- package/dist/Label/Label.d.ts +18 -5
- package/dist/Label/Label.stories.d.ts +5 -0
- package/dist/Link/Link.d.ts +10 -5
- package/dist/Link/Link.stories.d.ts +5 -0
- package/dist/Menu/Menu.d.ts +11 -4
- package/dist/Menu/Menu.stories.d.ts +5 -0
- package/dist/MenuItem/MenuItem.d.ts +11 -4
- package/dist/MenuItem/MenuItem.stories.d.ts +5 -0
- package/dist/Message/Message.d.ts +10 -4
- package/dist/Message/Message.stories.d.ts +5 -0
- package/dist/Provider/MarigoldProvider.d.ts +11 -0
- package/dist/Provider/index.d.ts +3 -0
- package/dist/Radio/Radio.d.ts +17 -4
- package/dist/Radio/RadioIcons.d.ts +10 -0
- package/dist/Select/ListBox.d.ts +9 -0
- package/dist/Select/ListBoxSection.d.ts +9 -0
- package/dist/Select/Option.d.ts +9 -0
- package/dist/Select/Popover.d.ts +9 -0
- package/dist/Select/Select.d.ts +27 -3
- package/dist/Select/Select.stories.d.ts +5 -0
- package/dist/Slider/Slider.d.ts +10 -4
- package/dist/Slider/Slider.stories.d.ts +5 -0
- package/dist/Stack/Stack.d.ts +7 -0
- package/dist/Stack/Stack.stories.d.ts +5 -0
- package/dist/Stack/index.d.ts +1 -0
- package/dist/Text/Text.d.ts +17 -7
- package/dist/Text/Text.stories.d.ts +5 -0
- package/dist/Textarea/Textarea.d.ts +15 -4
- package/dist/Textarea/Textarea.stories.d.ts +5 -0
- package/dist/ValidationMessage/ValidationMessage.d.ts +10 -4
- package/dist/ValidationMessage/ValidationMessage.stories.d.ts +5 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
- package/dist/VisuallyHidden/VisuallyHidden.stories.d.ts +5 -0
- package/dist/VisuallyHidden/index.d.ts +1 -0
- package/dist/components.cjs.development.js +1276 -461
- package/dist/components.cjs.development.js.map +1 -1
- package/dist/components.cjs.production.min.js +1 -1
- package/dist/components.cjs.production.min.js.map +1 -1
- package/dist/components.esm.js +1229 -461
- package/dist/components.esm.js.map +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/theme.d.ts +23 -28
- package/package.json +27 -4
- package/src/ActionGroup/ActionGroup.stories.tsx +47 -0
- package/src/ActionGroup/ActionGroup.test.tsx +83 -0
- package/src/ActionGroup/ActionGroup.tsx +32 -0
- package/src/ActionGroup/index.ts +1 -0
- package/src/Alert/Alert.stories.tsx +32 -0
- package/src/Alert/Alert.test.tsx +34 -23
- package/src/Alert/Alert.tsx +48 -24
- package/src/Badge/Badge.stories.tsx +38 -0
- package/src/Badge/Badge.test.tsx +14 -40
- package/src/Badge/Badge.tsx +31 -28
- package/src/Box.ts +2 -0
- package/src/Button/Button.stories.tsx +57 -0
- package/src/Button/Button.test.tsx +76 -13
- package/src/Button/Button.tsx +58 -23
- package/src/Card/Card.stories.tsx +41 -0
- package/src/Card/Card.test.tsx +71 -0
- package/src/Card/Card.tsx +48 -0
- package/src/Card/index.ts +1 -0
- package/src/Checkbox/Checkbox.stories.mdx +90 -112
- package/src/Checkbox/Checkbox.stories.tsx +78 -0
- package/src/Checkbox/Checkbox.test.tsx +139 -24
- package/src/Checkbox/Checkbox.tsx +95 -58
- package/src/Checkbox/CheckboxIcons.tsx +59 -0
- package/src/Column/Column.stories.tsx +33 -0
- package/src/Column/Column.test.tsx +15 -59
- package/src/Column/Column.tsx +21 -19
- package/src/Columns/Columns.stories.tsx +75 -0
- package/src/Columns/Columns.test.tsx +113 -0
- package/src/Columns/Columns.tsx +69 -0
- package/src/Columns/index.ts +1 -0
- package/src/Container/Container.stories.tsx +14 -0
- package/src/Container/Container.test.tsx +8 -49
- package/src/Container/Container.tsx +8 -19
- package/src/Dialog/Dialog.stories.tsx +88 -0
- package/src/Dialog/Dialog.test.tsx +158 -0
- package/src/Dialog/Dialog.tsx +130 -0
- package/src/Dialog/ModalDialog.tsx +76 -0
- package/src/Dialog/index.ts +1 -0
- package/src/Divider/Divider.stories.tsx +30 -0
- package/src/Divider/Divider.test.tsx +14 -6
- package/src/Divider/Divider.tsx +20 -13
- package/src/Field/Field.stories.tsx +110 -0
- package/src/Field/Field.test.tsx +75 -34
- package/src/Field/Field.tsx +50 -43
- package/src/Image/Image.stories.tsx +34 -0
- package/src/Image/Image.test.tsx +6 -3
- package/src/Image/Image.tsx +21 -15
- package/src/Inline/Inline.stories.tsx +39 -0
- package/src/Inline/Inline.test.tsx +99 -0
- package/src/Inline/Inline.tsx +38 -0
- package/src/Inline/index.ts +1 -0
- package/src/Input/Input.stories.tsx +54 -0
- package/src/Input/Input.test.tsx +9 -5
- package/src/Input/Input.tsx +21 -16
- package/src/Label/Label.stories.tsx +41 -0
- package/src/Label/Label.test.tsx +41 -6
- package/src/Label/Label.tsx +59 -18
- package/src/Link/Link.stories.tsx +35 -0
- package/src/Link/Link.test.tsx +52 -22
- package/src/Link/Link.tsx +40 -20
- package/src/Menu/Menu.stories.tsx +62 -0
- package/src/Menu/Menu.test.tsx +13 -7
- package/src/Menu/Menu.tsx +44 -38
- package/src/MenuItem/MenuItem.stories.tsx +30 -0
- package/src/MenuItem/MenuItem.test.tsx +23 -14
- package/src/MenuItem/MenuItem.tsx +29 -18
- package/src/Message/Message.stories.tsx +30 -0
- package/src/Message/Message.test.tsx +5 -2
- package/src/Message/Message.tsx +48 -40
- package/src/Provider/MarigoldProvider.test.tsx +136 -0
- package/src/Provider/MarigoldProvider.tsx +47 -0
- package/src/Provider/index.ts +4 -0
- package/src/Radio/Radio.stories.mdx +91 -94
- package/src/Radio/Radio.test.tsx +92 -16
- package/src/Radio/Radio.tsx +114 -50
- package/src/Radio/RadioIcons.tsx +39 -0
- package/src/Select/ListBox.tsx +40 -0
- package/src/Select/ListBoxSection.tsx +40 -0
- package/src/Select/Option.tsx +48 -0
- package/src/Select/Popover.tsx +50 -0
- package/src/Select/Select.stories.tsx +81 -0
- package/src/Select/Select.test.tsx +311 -43
- package/src/Select/Select.tsx +174 -28
- package/src/Slider/Slider.stories.tsx +24 -0
- package/src/Slider/Slider.test.tsx +11 -7
- package/src/Slider/Slider.tsx +30 -15
- package/src/Stack/Stack.stories.tsx +57 -0
- package/src/Stack/Stack.test.tsx +138 -0
- package/src/Stack/Stack.tsx +39 -0
- package/src/Stack/index.ts +1 -0
- package/src/Text/Text.stories.tsx +61 -0
- package/src/Text/Text.test.tsx +41 -36
- package/src/Text/Text.tsx +55 -29
- package/src/Textarea/Textarea.stories.tsx +64 -0
- package/src/Textarea/Textarea.test.tsx +41 -5
- package/src/Textarea/Textarea.tsx +57 -17
- package/src/ValidationMessage/ValidationMessage.stories.tsx +27 -0
- package/src/ValidationMessage/ValidationMessage.test.tsx +19 -14
- package/src/ValidationMessage/ValidationMessage.tsx +36 -21
- package/src/VisuallyHidden/VisuallyHidden.stories.tsx +19 -0
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +10 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +1 -0
- package/src/VisuallyHidden/index.ts +1 -0
- package/src/index.ts +11 -3
- package/src/theme.ts +49 -28
- package/dist/Heading/Heading.d.ts +0 -5
- package/dist/Heading/index.d.ts +0 -1
- package/dist/Hidden/Hidden.d.ts +0 -6
- package/dist/Hidden/index.d.ts +0 -1
- package/dist/Svg/Svg.d.ts +0 -6
- package/dist/Svg/index.d.ts +0 -1
- package/src/Alert/Alert.stories.mdx +0 -49
- package/src/Badge/Badge.stories.mdx +0 -41
- package/src/Button/Button.stories.mdx +0 -155
- package/src/Column/Column.stories.mdx +0 -76
- package/src/Container/Container.stories.mdx +0 -42
- package/src/Divider/Divider.stories.mdx +0 -42
- package/src/Field/Field.stories.mdx +0 -57
- package/src/Heading/Heading.stories.mdx +0 -79
- package/src/Heading/Heading.test.tsx +0 -63
- package/src/Heading/Heading.tsx +0 -22
- package/src/Heading/index.ts +0 -1
- package/src/Hidden/Hidden.stories.mdx +0 -64
- package/src/Hidden/Hidden.test.tsx +0 -87
- package/src/Hidden/Hidden.tsx +0 -25
- package/src/Hidden/index.ts +0 -1
- package/src/Image/Image.stories.mdx +0 -40
- package/src/Input/Input.stories.mdx +0 -44
- package/src/Label/Label.stories.mdx +0 -34
- package/src/Link/Link.stories.mdx +0 -37
- package/src/Menu/Menu.stories.mdx +0 -47
- package/src/MenuItem/MenuItem.stories.mdx +0 -32
- package/src/Message/Message.stories.mdx +0 -43
- package/src/Select/Select.stories.mdx +0 -43
- package/src/Slider/Slider.stories.mdx +0 -57
- package/src/Svg/Svg.stories.mdx +0 -47
- package/src/Svg/Svg.test.tsx +0 -76
- package/src/Svg/Svg.tsx +0 -31
- package/src/Svg/index.ts +0 -1
- package/src/Text/Text.stories.mdx +0 -60
- package/src/Textarea/Textarea.stories.mdx +0 -34
- package/src/ValidationMessage/ValidationMessage.stories.mdx +0 -36
package/src/theme.ts
CHANGED
|
@@ -1,29 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
import { type CSSObject, type Theme as Scales } from '@marigold/system';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
3
|
+
// Provider
|
|
4
|
+
// ---------------
|
|
5
|
+
import { type RootThemeExtension } from './Provider';
|
|
6
|
+
|
|
7
|
+
// Components
|
|
8
|
+
// ---------------
|
|
9
|
+
import { type AlertThemeExtension } from './Alert';
|
|
10
|
+
import { type BadgeThemeExtension } from './Badge';
|
|
11
|
+
import { type ButtonThemeExtension } from './Button';
|
|
12
|
+
import { type CardThemeExtension } from './Card';
|
|
13
|
+
import { type CheckboxThemeExtension } from './Checkbox';
|
|
14
|
+
import { type DividerThemeExtension } from './Divider';
|
|
15
|
+
import { type ImageThemeExtension } from './Image';
|
|
16
|
+
import { type InputThemeExtension } from './Input';
|
|
17
|
+
import { type LabelThemeExtension } from './Label';
|
|
18
|
+
import { type LinkThemeExtension } from './Link';
|
|
19
|
+
import { type MenuThemeExtension } from './Menu';
|
|
20
|
+
import { type MenuItemThemeExtension } from './MenuItem';
|
|
21
|
+
import { type MessageThemeExtension } from './Message';
|
|
22
|
+
import { type RadioThemeExtension } from './Radio';
|
|
23
|
+
import { type SelectThemeExtension } from './Select';
|
|
24
|
+
import { type SliderThemeExtension } from './Slider';
|
|
25
|
+
import { type TextThemeExtension } from './Text';
|
|
26
|
+
import { type TextareaThemeExtension } from './Textarea';
|
|
27
|
+
import { type ValidationMessageThemeExtension } from './ValidationMessage';
|
|
28
|
+
|
|
29
|
+
export interface Theme
|
|
30
|
+
extends Scales,
|
|
31
|
+
RootThemeExtension<CSSObject>,
|
|
32
|
+
AlertThemeExtension<CSSObject>,
|
|
33
|
+
BadgeThemeExtension<CSSObject>,
|
|
34
|
+
ButtonThemeExtension<CSSObject>,
|
|
35
|
+
CardThemeExtension<CSSObject>,
|
|
36
|
+
CheckboxThemeExtension<CSSObject>,
|
|
37
|
+
DividerThemeExtension<CSSObject>,
|
|
38
|
+
ImageThemeExtension<CSSObject>,
|
|
39
|
+
InputThemeExtension<CSSObject>,
|
|
40
|
+
LabelThemeExtension<CSSObject>,
|
|
41
|
+
LinkThemeExtension<CSSObject>,
|
|
42
|
+
MenuThemeExtension<CSSObject>,
|
|
43
|
+
MenuItemThemeExtension<CSSObject>,
|
|
44
|
+
MessageThemeExtension<CSSObject>,
|
|
45
|
+
RadioThemeExtension<CSSObject>,
|
|
46
|
+
SelectThemeExtension<CSSObject>,
|
|
47
|
+
SliderThemeExtension<CSSObject>,
|
|
48
|
+
TextThemeExtension<CSSObject>,
|
|
49
|
+
TextareaThemeExtension<CSSObject>,
|
|
50
|
+
ValidationMessageThemeExtension<CSSObject> {}
|
package/dist/Heading/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Heading';
|
package/dist/Hidden/Hidden.d.ts
DELETED
package/dist/Hidden/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Hidden';
|
package/dist/Svg/Svg.d.ts
DELETED
package/dist/Svg/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Svg';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Alert, Text } from '@marigold/components';
|
|
3
|
-
import { useStyles } from '@marigold/system';
|
|
4
|
-
|
|
5
|
-
<Meta title="Components/Content/Alert" />
|
|
6
|
-
|
|
7
|
-
# Alert
|
|
8
|
-
|
|
9
|
-
## Description
|
|
10
|
-
|
|
11
|
-
Simple colored element to display an alert message as a reaction to an event.
|
|
12
|
-
Predefined variants are info, success, danger and warning.
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
| Property | Type | Default |
|
|
17
|
-
| :------------------- | :------- | :------ |
|
|
18
|
-
| `variant` (optional) | `string` | `info` |
|
|
19
|
-
|
|
20
|
-
## Import
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
import { Alert } from '@marigold/components';
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Usage
|
|
27
|
-
|
|
28
|
-
<Preview>
|
|
29
|
-
<Story name="Info">
|
|
30
|
-
<Alert className={useStyles({ color: '#f3f3f3' })}>
|
|
31
|
-
<Text>hey, info!</Text>
|
|
32
|
-
</Alert>
|
|
33
|
-
</Story>
|
|
34
|
-
<Story name="Success">
|
|
35
|
-
<Alert variant="success">
|
|
36
|
-
<Text>hey, success!</Text>
|
|
37
|
-
</Alert>
|
|
38
|
-
</Story>
|
|
39
|
-
<Story name="Danger">
|
|
40
|
-
<Alert variant="danger">
|
|
41
|
-
<Text>hey, danger!</Text>
|
|
42
|
-
</Alert>
|
|
43
|
-
</Story>
|
|
44
|
-
<Story name="Warning">
|
|
45
|
-
<Alert variant="warning">
|
|
46
|
-
<Text>hey, warning!</Text>
|
|
47
|
-
</Alert>
|
|
48
|
-
</Story>
|
|
49
|
-
</Preview>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Badge } from '@marigold/components';
|
|
3
|
-
import { Check } from '@marigold/icons';
|
|
4
|
-
|
|
5
|
-
<Meta title="Components/Content/Badge" />
|
|
6
|
-
|
|
7
|
-
# Badge
|
|
8
|
-
|
|
9
|
-
## Description
|
|
10
|
-
|
|
11
|
-
A badge tags an element with a short note and color. The content of the badge can be anything but preferably a string and/or icon.
|
|
12
|
-
|
|
13
|
-
## Properties
|
|
14
|
-
|
|
15
|
-
| Property | Type | Default |
|
|
16
|
-
| :--------------------------- | :------- | :-------- |
|
|
17
|
-
| `variant` (optional) | `string` | `badge` |
|
|
18
|
-
| `borderColor` (optional) | string | `inherit` |
|
|
19
|
-
| `backgroundColor` (optional) | string | `inherit` |
|
|
20
|
-
|
|
21
|
-
## Import
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
import { Badge } from '@marigold/components';
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
<Preview>
|
|
30
|
-
<Story name="Colored Background">
|
|
31
|
-
<Badge borderColor="border" backgroundColor="orange">
|
|
32
|
-
<Text>New</Text>
|
|
33
|
-
</Badge>
|
|
34
|
-
</Story>
|
|
35
|
-
<Story name="Outlined">
|
|
36
|
-
<Badge borderColor="orange">
|
|
37
|
-
<Check size={18} />
|
|
38
|
-
cool
|
|
39
|
-
</Badge>
|
|
40
|
-
</Story>
|
|
41
|
-
</Preview>
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Facebook } from '@marigold/icons';
|
|
3
|
-
import { Button } from '@marigold/components';
|
|
4
|
-
import { useStyles } from '@marigold/system';
|
|
5
|
-
|
|
6
|
-
<Meta title="Components/Form/Button" />
|
|
7
|
-
|
|
8
|
-
# Button
|
|
9
|
-
|
|
10
|
-
## Description
|
|
11
|
-
|
|
12
|
-
With the Button component you can render a `button` element.
|
|
13
|
-
The style variant and size of the button can be added with the variant prop and is composed like `variant.size`.
|
|
14
|
-
|
|
15
|
-
## Properties
|
|
16
|
-
|
|
17
|
-
| Property | Type | Default |
|
|
18
|
-
| :------------------- | :--------------------------------------------------------------------------------------------------- | :-------------- |
|
|
19
|
-
| `variant` (optional) | `primary.small`, `primary.large`, `secondary.small`, `secondary.large`, `ghost.small`, `ghost.large` | `primary.large` |
|
|
20
|
-
|
|
21
|
-
## Import
|
|
22
|
-
|
|
23
|
-
```tsx
|
|
24
|
-
import { Button } from '@marigold/components';
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Usage
|
|
28
|
-
|
|
29
|
-
### Large
|
|
30
|
-
|
|
31
|
-
<Preview>
|
|
32
|
-
<Story name="primary.large">
|
|
33
|
-
<Button variant="primary.large">Primary</Button>
|
|
34
|
-
</Story>
|
|
35
|
-
<Story name="secondary.large">
|
|
36
|
-
<Button variant="secondary.large">Secondary</Button>
|
|
37
|
-
</Story>
|
|
38
|
-
<Story name="ghost.large">
|
|
39
|
-
<Button variant="ghost.large">Ghost</Button>
|
|
40
|
-
</Story>
|
|
41
|
-
</Preview>
|
|
42
|
-
|
|
43
|
-
### Small
|
|
44
|
-
|
|
45
|
-
<Preview>
|
|
46
|
-
<Story name="primary.small">
|
|
47
|
-
<Button variant="primary.small">Primary</Button>
|
|
48
|
-
</Story>
|
|
49
|
-
<Story name="secondary.small">
|
|
50
|
-
<Button variant="secondary.small">Secondary</Button>
|
|
51
|
-
</Story>
|
|
52
|
-
<Story name="ghost.small">
|
|
53
|
-
<Button variant="ghost.small">Ghost</Button>
|
|
54
|
-
</Story>
|
|
55
|
-
</Preview>
|
|
56
|
-
|
|
57
|
-
### Disabled
|
|
58
|
-
|
|
59
|
-
<Preview>
|
|
60
|
-
<Story name="primary.large.disabled">
|
|
61
|
-
<Button variant="primary.large" disabled>
|
|
62
|
-
Primary Large Disabled
|
|
63
|
-
</Button>
|
|
64
|
-
</Story>
|
|
65
|
-
<Story name="secondary.large.disabled">
|
|
66
|
-
<Button variant="secondary.large" disabled>
|
|
67
|
-
Secondary Large Disabled
|
|
68
|
-
</Button>
|
|
69
|
-
</Story>
|
|
70
|
-
<Story name="ghost.large.disabled">
|
|
71
|
-
<Button variant="ghost.large" disabled>
|
|
72
|
-
Ghost Large Disabled
|
|
73
|
-
</Button>
|
|
74
|
-
</Story>
|
|
75
|
-
</Preview>
|
|
76
|
-
|
|
77
|
-
### Default with icon
|
|
78
|
-
|
|
79
|
-
<Preview>
|
|
80
|
-
<Story name="primary.large with default icon">
|
|
81
|
-
<Button variant="primary.large">
|
|
82
|
-
<Facebook /> Like me!
|
|
83
|
-
</Button>
|
|
84
|
-
</Story>
|
|
85
|
-
<Story name="primary.small with default icon">
|
|
86
|
-
<Button variant="primary.small">
|
|
87
|
-
<Facebook /> Like me!
|
|
88
|
-
</Button>
|
|
89
|
-
</Story>
|
|
90
|
-
<Story name="secondary.large with default icon">
|
|
91
|
-
<Button variant="secondary.large">
|
|
92
|
-
<Facebook /> Like me!
|
|
93
|
-
</Button>
|
|
94
|
-
</Story>
|
|
95
|
-
<Story name="secondary.small with default icon">
|
|
96
|
-
<Button variant="secondary.small">
|
|
97
|
-
<Facebook /> Like me!
|
|
98
|
-
</Button>
|
|
99
|
-
</Story>
|
|
100
|
-
<Story name="ghost.large with default icon">
|
|
101
|
-
<Button variant="ghost.large">
|
|
102
|
-
<Facebook /> Like me!
|
|
103
|
-
</Button>
|
|
104
|
-
</Story>
|
|
105
|
-
<Story name="ghost.small with default icon">
|
|
106
|
-
<Button variant="ghost.small">
|
|
107
|
-
<Facebook /> Like me!
|
|
108
|
-
</Button>
|
|
109
|
-
</Story>
|
|
110
|
-
</Preview>
|
|
111
|
-
|
|
112
|
-
### Large with large icon
|
|
113
|
-
|
|
114
|
-
<Preview>
|
|
115
|
-
<Story name="primary.large with large icon">
|
|
116
|
-
<Button variant="primary.large">
|
|
117
|
-
<Facebook size={48} /> Like me!
|
|
118
|
-
</Button>
|
|
119
|
-
</Story>
|
|
120
|
-
</Preview>
|
|
121
|
-
|
|
122
|
-
### Small with small icon
|
|
123
|
-
|
|
124
|
-
<Preview>
|
|
125
|
-
<Story name="primary.small with small icon">
|
|
126
|
-
<Button variant="primary.small">
|
|
127
|
-
<Facebook size={20} /> Like me!
|
|
128
|
-
</Button>
|
|
129
|
-
</Story>
|
|
130
|
-
</Preview>
|
|
131
|
-
|
|
132
|
-
### With color
|
|
133
|
-
|
|
134
|
-
<Preview>
|
|
135
|
-
<Story name="with color">
|
|
136
|
-
<Button variant="primary.small">
|
|
137
|
-
<Facebook fill="black" /> Like me!
|
|
138
|
-
</Button>
|
|
139
|
-
</Story>
|
|
140
|
-
</Preview>
|
|
141
|
-
|
|
142
|
-
### Custom styled
|
|
143
|
-
|
|
144
|
-
<Preview>
|
|
145
|
-
<Story name="custom">
|
|
146
|
-
<Button
|
|
147
|
-
variant="primary.small"
|
|
148
|
-
className={useStyles({
|
|
149
|
-
bg: '#3b5998',
|
|
150
|
-
})}
|
|
151
|
-
>
|
|
152
|
-
<Facebook /> Like me!
|
|
153
|
-
</Button>
|
|
154
|
-
</Story>
|
|
155
|
-
</Preview>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Column } from '@marigold/components';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { useStyles } from '@marigold/system';
|
|
5
|
-
|
|
6
|
-
<Meta title="Components/Layout/Column" />
|
|
7
|
-
|
|
8
|
-
# Column
|
|
9
|
-
|
|
10
|
-
## Description
|
|
11
|
-
|
|
12
|
-
With the Column component you can add a column with a width in percent of the full content.
|
|
13
|
-
The element uses always the themeSection with the name: `layout` in your given theme. The variant in your section can be added with the variant prop. The default variant is `column`.
|
|
14
|
-
|
|
15
|
-
## Properties
|
|
16
|
-
|
|
17
|
-
| Property | Type | Default |
|
|
18
|
-
| :------------------- | :-------------------------------------- | :------- |
|
|
19
|
-
| `variant` (optional) | `string` | `column` |
|
|
20
|
-
| `width` (optional) | `1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12` | `12` |
|
|
21
|
-
|
|
22
|
-
## Import
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
import { Column } from '@marigold/components';
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Usage
|
|
29
|
-
|
|
30
|
-
<Preview>
|
|
31
|
-
<Story name="Column">
|
|
32
|
-
<Column
|
|
33
|
-
className={useStyles({
|
|
34
|
-
textAlign: 'center',
|
|
35
|
-
border: '1px solid',
|
|
36
|
-
padding: 2,
|
|
37
|
-
margin: 2,
|
|
38
|
-
})}
|
|
39
|
-
>
|
|
40
|
-
width=12
|
|
41
|
-
</Column>
|
|
42
|
-
<Column
|
|
43
|
-
width={6}
|
|
44
|
-
className={useStyles({
|
|
45
|
-
textAlign: 'center',
|
|
46
|
-
border: '1px solid',
|
|
47
|
-
padding: 2,
|
|
48
|
-
margin: 2,
|
|
49
|
-
})}
|
|
50
|
-
>
|
|
51
|
-
width=6
|
|
52
|
-
</Column>
|
|
53
|
-
<Column
|
|
54
|
-
width={3}
|
|
55
|
-
className={useStyles({
|
|
56
|
-
textAlign: 'center',
|
|
57
|
-
border: '1px solid',
|
|
58
|
-
padding: 2,
|
|
59
|
-
margin: 2,
|
|
60
|
-
})}
|
|
61
|
-
>
|
|
62
|
-
width=3
|
|
63
|
-
</Column>
|
|
64
|
-
<Column
|
|
65
|
-
width={2}
|
|
66
|
-
className={useStyles({
|
|
67
|
-
textAlign: 'center',
|
|
68
|
-
border: '1px solid',
|
|
69
|
-
padding: 2,
|
|
70
|
-
margin: 2,
|
|
71
|
-
})}
|
|
72
|
-
>
|
|
73
|
-
width=2
|
|
74
|
-
</Column>
|
|
75
|
-
</Story>
|
|
76
|
-
</Preview>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Container, Text } from '@marigold/components';
|
|
3
|
-
import { useStyles } from '@marigold/system';
|
|
4
|
-
|
|
5
|
-
<Meta title="Components/Layout/Container" />
|
|
6
|
-
|
|
7
|
-
# Container
|
|
8
|
-
|
|
9
|
-
## Description
|
|
10
|
-
|
|
11
|
-
Primitive layout component to embed other elements.
|
|
12
|
-
The element uses always the themeSection with the name: `layout` in your given theme. The variant in your section can be added with the variant prop. The default variant is `container`.
|
|
13
|
-
|
|
14
|
-
## Properties
|
|
15
|
-
|
|
16
|
-
| Property | Type | Default |
|
|
17
|
-
| :------------------- | :------- | :---------- |
|
|
18
|
-
| `variant` (optional) | `string` | `container` |
|
|
19
|
-
|
|
20
|
-
## Import
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
import { Container } from '@marigold/components';
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Usage
|
|
27
|
-
|
|
28
|
-
<Preview>
|
|
29
|
-
<Story name="Example 1">
|
|
30
|
-
<Container>
|
|
31
|
-
<Text>Example #1</Text>
|
|
32
|
-
</Container>
|
|
33
|
-
</Story>
|
|
34
|
-
</Preview>
|
|
35
|
-
|
|
36
|
-
<Preview>
|
|
37
|
-
<Story name="Example 2">
|
|
38
|
-
<Container className={useStyles({ bg: 'green' })}>
|
|
39
|
-
<Text>Example #2</Text>
|
|
40
|
-
</Container>
|
|
41
|
-
</Story>
|
|
42
|
-
</Preview>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Divider, Text } from '@marigold/components';
|
|
3
|
-
|
|
4
|
-
<Meta title="Components/Layout/Divider" />
|
|
5
|
-
|
|
6
|
-
# Divider
|
|
7
|
-
|
|
8
|
-
## Description
|
|
9
|
-
|
|
10
|
-
A divider is a layout or list element to group content or separate elements.
|
|
11
|
-
The themeSection is `divider` and the variant can be added with the variant prop which is `regular` per default.
|
|
12
|
-
|
|
13
|
-
## Properties
|
|
14
|
-
|
|
15
|
-
| Property | Type | Default |
|
|
16
|
-
| :------------------- | :------- | :-------- |
|
|
17
|
-
| `variant` (optional) | `string` | `regular` |
|
|
18
|
-
|
|
19
|
-
## Import
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
import { Divider } from '@marigold/components';
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Usage
|
|
26
|
-
|
|
27
|
-
<Preview>
|
|
28
|
-
<Story name="Divider/regular">
|
|
29
|
-
<div>
|
|
30
|
-
<Text>Some text</Text>
|
|
31
|
-
<Divider />
|
|
32
|
-
<Text>Some other text to show regular divider</Text>
|
|
33
|
-
</div>
|
|
34
|
-
</Story>
|
|
35
|
-
<Story name="Divider/bold">
|
|
36
|
-
<div>
|
|
37
|
-
<Text>Some text</Text>
|
|
38
|
-
<Divider variant="bold" />
|
|
39
|
-
<Text>Some other text to show strong divider</Text>
|
|
40
|
-
</div>
|
|
41
|
-
</Story>
|
|
42
|
-
</Preview>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Field } from '@marigold/components';
|
|
3
|
-
import { useStyles } from '@marigold/system';
|
|
4
|
-
|
|
5
|
-
<Meta title="Components/Form/Field" />
|
|
6
|
-
|
|
7
|
-
# Field
|
|
8
|
-
|
|
9
|
-
## Description
|
|
10
|
-
|
|
11
|
-
With the Field component you can add a HTML `<label>` and `<input>` element to your form.
|
|
12
|
-
The element uses always the themeSection with the name: `form` in your given theme. The variant in your section can be added with the variant prop.
|
|
13
|
-
The default variant is `field`.
|
|
14
|
-
|
|
15
|
-
## Properties
|
|
16
|
-
|
|
17
|
-
| Property | Type | Default |
|
|
18
|
-
| :------------------- | :----------------------------------------------------------------------------------------- | :------ |
|
|
19
|
-
| `variant (optional)` | `string` | |
|
|
20
|
-
| `htmlFor` | `string` | |
|
|
21
|
-
| `label` | `string` | |
|
|
22
|
-
| `error (optional)` | `string` | |
|
|
23
|
-
| `type` | `date, datetime-local, email, month, number, password, search, tel, text, time, url, week` | `text` |
|
|
24
|
-
|
|
25
|
-
## Import
|
|
26
|
-
|
|
27
|
-
```tsx
|
|
28
|
-
import { Field } from '@marigold/components';
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Usage
|
|
32
|
-
|
|
33
|
-
<Preview>
|
|
34
|
-
<Story name="Field1">
|
|
35
|
-
<div>
|
|
36
|
-
<Field label="Firstname" htmlFor="myId" />
|
|
37
|
-
<br />
|
|
38
|
-
<Field label="Name" htmlFor="myId" error="Validation message" />
|
|
39
|
-
</div>
|
|
40
|
-
</Story>
|
|
41
|
-
</Preview>
|
|
42
|
-
|
|
43
|
-
<Preview>
|
|
44
|
-
<Story name="Field2">
|
|
45
|
-
<div>
|
|
46
|
-
<Field
|
|
47
|
-
label="Pick your date"
|
|
48
|
-
type="date"
|
|
49
|
-
htmlFor="myId"
|
|
50
|
-
error="ERROR!"
|
|
51
|
-
className={useStyles({ color: '#dd4142' })}
|
|
52
|
-
/>
|
|
53
|
-
<br />
|
|
54
|
-
<Field label="Choose the week" type="week" htmlFor="myId" />
|
|
55
|
-
</div>
|
|
56
|
-
</Story>
|
|
57
|
-
</Preview>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
|
|
2
|
-
import { Heading, Text } from '@marigold/components';
|
|
3
|
-
|
|
4
|
-
<Meta title="Components/Typography/Heading" />
|
|
5
|
-
|
|
6
|
-
# Heading
|
|
7
|
-
|
|
8
|
-
## Description
|
|
9
|
-
|
|
10
|
-
Use the Heading component for headings of texts. Predefined variants are `h1`, `h2`, `h3`, `h4`, `h5` and `h6`.
|
|
11
|
-
|
|
12
|
-
## Properties
|
|
13
|
-
|
|
14
|
-
| Property | Type | Default |
|
|
15
|
-
| :-------- | :------- | :------ |
|
|
16
|
-
| `variant` | `string` | `h2` |
|
|
17
|
-
|
|
18
|
-
## Import
|
|
19
|
-
|
|
20
|
-
```tsx
|
|
21
|
-
import { Heading } from '@marigold/components';
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
|
|
26
|
-
<Preview>
|
|
27
|
-
<Story name="Headings">
|
|
28
|
-
<div>
|
|
29
|
-
<Heading variant="h1">H1 amazing heading</Heading>
|
|
30
|
-
<Text as="p" variant="heading">
|
|
31
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
|
32
|
-
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
33
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
|
34
|
-
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
|
35
|
-
amet.
|
|
36
|
-
</Text>
|
|
37
|
-
<Heading>H2 amazing heading</Heading>
|
|
38
|
-
<Text as="p" variant="heading">
|
|
39
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
|
40
|
-
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
41
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
|
42
|
-
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
|
43
|
-
amet.
|
|
44
|
-
</Text>
|
|
45
|
-
<Heading variant="h3">H3 amazing heading</Heading>
|
|
46
|
-
<Text as="p" variant="heading">
|
|
47
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
|
48
|
-
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
49
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
|
50
|
-
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
|
51
|
-
amet.
|
|
52
|
-
</Text>
|
|
53
|
-
<Heading variant="h4">H4 amazing heading</Heading>
|
|
54
|
-
<Text as="p" variant="heading">
|
|
55
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
|
56
|
-
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
57
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
|
58
|
-
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
|
59
|
-
amet.
|
|
60
|
-
</Text>
|
|
61
|
-
<Heading variant="h5">H5 amazing heading</Heading>
|
|
62
|
-
<Text as="p" variant="heading">
|
|
63
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
|
64
|
-
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
65
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
|
66
|
-
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
|
67
|
-
amet.
|
|
68
|
-
</Text>
|
|
69
|
-
<Heading variant="h6">H6 amazing heading</Heading>
|
|
70
|
-
<Text as="p" variant="heading">
|
|
71
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
|
72
|
-
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
|
|
73
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
|
74
|
-
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
|
75
|
-
amet.
|
|
76
|
-
</Text>
|
|
77
|
-
</div>
|
|
78
|
-
</Story>
|
|
79
|
-
</Preview>
|