ng-comps 1.0.0 → 1.0.1
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/documentation.json +32 -32
- package/package.json +1 -1
- package/src/app/components/alert/mf-alert.component.spec.ts +2 -2
- package/src/app/components/alert/mf-alert.component.ts +1 -1
- package/src/app/components/chip/mf-chip.component.ts +1 -1
- package/src/app/components/datepicker/mf-datepicker.component.spec.ts +4 -4
- package/src/app/components/datepicker/mf-datepicker.component.ts +1 -1
- package/src/app/components/dialog/mf-dialog.component.ts +1 -1
- package/src/app/components/dialog/mf-dialog.service.spec.ts +2 -2
- package/src/app/components/menu/mf-menu.component.spec.ts +1 -1
- package/src/app/components/menu/mf-menu.component.ts +1 -1
- package/src/app/components/progress-bar/mf-progress-bar.component.spec.ts +2 -2
- package/src/app/components/progress-spinner/mf-progress-spinner.component.spec.ts +3 -3
- package/src/app/components/sidenav/mf-sidenav.component.ts +2 -2
- package/src/app/components/table/mf-table.component.ts +1 -1
- package/src/stories/About.mdx +72 -72
- package/src/stories/Welcome.mdx +26 -27
- package/src/stories/mf-a11y-contracts.stories.ts +49 -49
- package/src/stories/mf-autocomplete.stories.ts +194 -188
- package/src/stories/mf-button.stories.ts +152 -156
- package/src/stories/mf-card.stories.ts +147 -148
- package/src/stories/mf-checkbox.stories.ts +88 -88
- package/src/stories/mf-datepicker.stories.ts +118 -118
- package/src/stories/mf-dialog.stories.ts +159 -167
- package/src/stories/mf-form-field.stories.ts +108 -108
- package/src/stories/mf-grid-list.stories.ts +104 -105
- package/src/stories/mf-icon.stories.ts +133 -130
- package/src/stories/mf-input.stories.ts +158 -158
- package/src/stories/mf-menu.stories.ts +10 -10
- package/src/stories/mf-progress-bar.stories.ts +119 -119
- package/src/stories/mf-progress-spinner.stories.ts +124 -124
- package/src/stories/mf-radio-button.stories.ts +111 -111
- package/src/stories/mf-select.stories.ts +184 -178
- package/src/stories/mf-sidenav.stories.ts +331 -334
- package/src/stories/mf-table.stories.ts +13 -13
- package/src/stories/mf-toolbar.stories.ts +112 -112
|
@@ -1,156 +1,152 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
-
|
|
3
|
-
import { MfButtonComponent } from '../app/components/button';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<MfButtonComponent> = {
|
|
6
|
-
title: 'Components/MfButton',
|
|
7
|
-
component: MfButtonComponent,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: `
|
|
13
|
-
**MfButton**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
|
17
|
-
|
|
18
|
-
| \`filled\` |
|
|
19
|
-
| \`outlined\` |
|
|
20
|
-
| \`text\` |
|
|
21
|
-
`,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
argTypes: {
|
|
26
|
-
variant: {
|
|
27
|
-
control: 'select',
|
|
28
|
-
options: ['filled', 'outlined', 'text'],
|
|
29
|
-
description: '
|
|
30
|
-
},
|
|
31
|
-
size: {
|
|
32
|
-
control: 'select',
|
|
33
|
-
options: ['sm', 'md', 'lg'],
|
|
34
|
-
description: '
|
|
35
|
-
},
|
|
36
|
-
type: {
|
|
37
|
-
control: 'select',
|
|
38
|
-
options: ['button', 'submit', 'reset'],
|
|
39
|
-
},
|
|
40
|
-
disabled: { control: 'boolean' },
|
|
41
|
-
fullWidth: { control: 'boolean' },
|
|
42
|
-
leadingIcon: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
export const WithLeadingIcon: Story = {
|
|
103
|
-
name: '
|
|
104
|
-
args: {
|
|
105
|
-
label: '
|
|
106
|
-
variant: 'filled',
|
|
107
|
-
leadingIcon: 'add',
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export const WithTrailingIcon: Story = {
|
|
112
|
-
name: '
|
|
113
|
-
args: {
|
|
114
|
-
label: '
|
|
115
|
-
variant: 'filled',
|
|
116
|
-
trailingIcon: 'arrow_forward',
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
`,
|
|
154
|
-
moduleMetadata: { imports: [MfButtonComponent] },
|
|
155
|
-
}),
|
|
156
|
-
};
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
|
|
3
|
+
import { MfButtonComponent } from '../app/components/button';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<MfButtonComponent> = {
|
|
6
|
+
title: 'Components/MfButton',
|
|
7
|
+
component: MfButtonComponent,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: `
|
|
13
|
+
**MfButton** is the button component from the ng-comps library.
|
|
14
|
+
It uses Angular Material under the hood while exposing a consistent branded API.
|
|
15
|
+
|
|
16
|
+
| Variant | When to use it |
|
|
17
|
+
|------------|-----------------------------------------------|
|
|
18
|
+
| \`filled\` | Primary action, usually one per section |
|
|
19
|
+
| \`outlined\` | Secondary action or soft destructive action |
|
|
20
|
+
| \`text\` | Tertiary action, internal navigation, or link |
|
|
21
|
+
`,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
argTypes: {
|
|
26
|
+
variant: {
|
|
27
|
+
control: 'select',
|
|
28
|
+
options: ['filled', 'outlined', 'text'],
|
|
29
|
+
description: 'Visual button variant',
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
control: 'select',
|
|
33
|
+
options: ['sm', 'md', 'lg'],
|
|
34
|
+
description: 'Button size',
|
|
35
|
+
},
|
|
36
|
+
type: {
|
|
37
|
+
control: 'select',
|
|
38
|
+
options: ['button', 'submit', 'reset'],
|
|
39
|
+
},
|
|
40
|
+
disabled: { control: 'boolean' },
|
|
41
|
+
fullWidth: { control: 'boolean' },
|
|
42
|
+
leadingIcon: {
|
|
43
|
+
control: 'text',
|
|
44
|
+
description: 'Material icon name shown before the label',
|
|
45
|
+
},
|
|
46
|
+
trailingIcon: {
|
|
47
|
+
control: 'text',
|
|
48
|
+
description: 'Material icon name shown after the label',
|
|
49
|
+
},
|
|
50
|
+
mfClick: { action: 'mfClick' },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default meta;
|
|
55
|
+
type Story = StoryObj<MfButtonComponent>;
|
|
56
|
+
|
|
57
|
+
export const Filled: Story = {
|
|
58
|
+
args: {
|
|
59
|
+
label: 'Save changes',
|
|
60
|
+
variant: 'filled',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const Outlined: Story = {
|
|
65
|
+
args: {
|
|
66
|
+
label: 'Cancel',
|
|
67
|
+
variant: 'outlined',
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const Text: Story = {
|
|
72
|
+
args: {
|
|
73
|
+
label: 'View details',
|
|
74
|
+
variant: 'text',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const Small: Story = {
|
|
79
|
+
args: {
|
|
80
|
+
label: 'Small',
|
|
81
|
+
variant: 'filled',
|
|
82
|
+
size: 'sm',
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const Medium: Story = {
|
|
87
|
+
args: {
|
|
88
|
+
label: 'Medium',
|
|
89
|
+
variant: 'filled',
|
|
90
|
+
size: 'md',
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const Large: Story = {
|
|
95
|
+
args: {
|
|
96
|
+
label: 'Large',
|
|
97
|
+
variant: 'filled',
|
|
98
|
+
size: 'lg',
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const WithLeadingIcon: Story = {
|
|
103
|
+
name: 'With leading icon',
|
|
104
|
+
args: {
|
|
105
|
+
label: 'Create new',
|
|
106
|
+
variant: 'filled',
|
|
107
|
+
leadingIcon: 'add',
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const WithTrailingIcon: Story = {
|
|
112
|
+
name: 'With trailing icon',
|
|
113
|
+
args: {
|
|
114
|
+
label: 'Next',
|
|
115
|
+
variant: 'filled',
|
|
116
|
+
trailingIcon: 'arrow_forward',
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const Disabled: Story = {
|
|
121
|
+
args: {
|
|
122
|
+
label: 'Disabled',
|
|
123
|
+
variant: 'filled',
|
|
124
|
+
disabled: true,
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const FullWidth: Story = {
|
|
129
|
+
name: 'Full width',
|
|
130
|
+
args: {
|
|
131
|
+
label: 'Sign in',
|
|
132
|
+
variant: 'filled',
|
|
133
|
+
fullWidth: true,
|
|
134
|
+
},
|
|
135
|
+
parameters: {
|
|
136
|
+
layout: 'padded',
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export const AllVariants: Story = {
|
|
141
|
+
name: 'All variants',
|
|
142
|
+
render: () => ({
|
|
143
|
+
template: `
|
|
144
|
+
<div style="display: flex; gap: 12px; flex-wrap: wrap; align-items: center;">
|
|
145
|
+
<mf-button label="Filled" variant="filled" />
|
|
146
|
+
<mf-button label="Outlined" variant="outlined" />
|
|
147
|
+
<mf-button label="Text" variant="text" />
|
|
148
|
+
</div>
|
|
149
|
+
`,
|
|
150
|
+
moduleMetadata: { imports: [MfButtonComponent] },
|
|
151
|
+
}),
|
|
152
|
+
};
|
|
@@ -1,148 +1,147 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
-
|
|
3
|
-
import { MfCardComponent } from '../app/components/card';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<MfCardComponent> = {
|
|
6
|
-
title: 'Molecules/MfCard',
|
|
7
|
-
component: MfCardComponent,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: `
|
|
13
|
-
**MfCard**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
|
17
|
-
|
|
18
|
-
| \`elevated\` |
|
|
19
|
-
| \`outlined\` |
|
|
20
|
-
| \`flat\` |
|
|
21
|
-
`,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
argTypes: {
|
|
26
|
-
title: { control: 'text', description: '
|
|
27
|
-
subtitle: { control: 'text', description: '
|
|
28
|
-
variant: {
|
|
29
|
-
control: 'select',
|
|
30
|
-
options: ['elevated', 'outlined', 'flat'],
|
|
31
|
-
description: '
|
|
32
|
-
},
|
|
33
|
-
padding: {
|
|
34
|
-
control: 'select',
|
|
35
|
-
options: ['none', 'sm', 'md', 'lg'],
|
|
36
|
-
description: '
|
|
37
|
-
},
|
|
38
|
-
interactive: { control: 'boolean', description: '
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default meta;
|
|
43
|
-
type Story = StoryObj<MfCardComponent>;
|
|
44
|
-
|
|
45
|
-
export const Elevated: Story = {
|
|
46
|
-
render: (args) => ({
|
|
47
|
-
props: args,
|
|
48
|
-
template: `
|
|
49
|
-
<mf-card [title]="title" [subtitle]="subtitle" [variant]="variant" [padding]="padding" [interactive]="interactive">
|
|
50
|
-
<p style="margin: 0; color: var(--mf-color-neutral-600);">
|
|
51
|
-
|
|
52
|
-
</p>
|
|
53
|
-
</mf-card>
|
|
54
|
-
`,
|
|
55
|
-
moduleMetadata: { imports: [MfCardComponent] },
|
|
56
|
-
}),
|
|
57
|
-
args: {
|
|
58
|
-
title: '
|
|
59
|
-
subtitle: '
|
|
60
|
-
variant: 'elevated',
|
|
61
|
-
padding: 'md',
|
|
62
|
-
interactive: false,
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const Outlined: Story = {
|
|
67
|
-
render: (args) => ({
|
|
68
|
-
props: args,
|
|
69
|
-
template: `
|
|
70
|
-
<mf-card [title]="title" [subtitle]="subtitle" variant="outlined">
|
|
71
|
-
<p style="margin: 0; color: var(--mf-color-neutral-600);">
|
|
72
|
-
|
|
73
|
-
</p>
|
|
74
|
-
</mf-card>
|
|
75
|
-
`,
|
|
76
|
-
moduleMetadata: { imports: [MfCardComponent] },
|
|
77
|
-
}),
|
|
78
|
-
args: {
|
|
79
|
-
title: '
|
|
80
|
-
subtitle: '
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const Flat: Story = {
|
|
85
|
-
render: (args) => ({
|
|
86
|
-
props: args,
|
|
87
|
-
template: `
|
|
88
|
-
<mf-card [title]="title" variant="flat">
|
|
89
|
-
<p style="margin: 0; color: var(--mf-color-neutral-600);">
|
|
90
|
-
|
|
91
|
-
</p>
|
|
92
|
-
</mf-card>
|
|
93
|
-
`,
|
|
94
|
-
moduleMetadata: { imports: [MfCardComponent] },
|
|
95
|
-
}),
|
|
96
|
-
args: {
|
|
97
|
-
title: '
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export const Interactive: Story = {
|
|
102
|
-
render: (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
};
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
|
|
3
|
+
import { MfCardComponent } from '../app/components/card';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<MfCardComponent> = {
|
|
6
|
+
title: 'Molecules/MfCard',
|
|
7
|
+
component: MfCardComponent,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: `
|
|
13
|
+
**MfCard** is the card component from the ng-comps library.
|
|
14
|
+
It uses Angular Material \`mat-card\` under the hood with a custom visual style that feels clean, elegant, and modern.
|
|
15
|
+
|
|
16
|
+
| Variant | When to use it |
|
|
17
|
+
|-------------|---------------------------------------------|
|
|
18
|
+
| \`elevated\` | Primary content highlighted with a shadow |
|
|
19
|
+
| \`outlined\` | Secondary content with a subtle border |
|
|
20
|
+
| \`flat\` | Background content with no border or shadow |
|
|
21
|
+
`,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
argTypes: {
|
|
26
|
+
title: { control: 'text', description: 'Card title' },
|
|
27
|
+
subtitle: { control: 'text', description: 'Card subtitle' },
|
|
28
|
+
variant: {
|
|
29
|
+
control: 'select',
|
|
30
|
+
options: ['elevated', 'outlined', 'flat'],
|
|
31
|
+
description: 'Visual variant',
|
|
32
|
+
},
|
|
33
|
+
padding: {
|
|
34
|
+
control: 'select',
|
|
35
|
+
options: ['none', 'sm', 'md', 'lg'],
|
|
36
|
+
description: 'Internal padding',
|
|
37
|
+
},
|
|
38
|
+
interactive: { control: 'boolean', description: 'Interactive hover effect' },
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default meta;
|
|
43
|
+
type Story = StoryObj<MfCardComponent>;
|
|
44
|
+
|
|
45
|
+
export const Elevated: Story = {
|
|
46
|
+
render: (args) => ({
|
|
47
|
+
props: args,
|
|
48
|
+
template: `
|
|
49
|
+
<mf-card [title]="title" [subtitle]="subtitle" [variant]="variant" [padding]="padding" [interactive]="interactive">
|
|
50
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600);">
|
|
51
|
+
This is the card content. It can include text, forms, lists, or other components.
|
|
52
|
+
</p>
|
|
53
|
+
</mf-card>
|
|
54
|
+
`,
|
|
55
|
+
moduleMetadata: { imports: [MfCardComponent] },
|
|
56
|
+
}),
|
|
57
|
+
args: {
|
|
58
|
+
title: 'Card title',
|
|
59
|
+
subtitle: 'Descriptive subtitle',
|
|
60
|
+
variant: 'elevated',
|
|
61
|
+
padding: 'md',
|
|
62
|
+
interactive: false,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const Outlined: Story = {
|
|
67
|
+
render: (args) => ({
|
|
68
|
+
props: args,
|
|
69
|
+
template: `
|
|
70
|
+
<mf-card [title]="title" [subtitle]="subtitle" variant="outlined">
|
|
71
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600);">
|
|
72
|
+
A subtle bordered card, ideal for secondary content.
|
|
73
|
+
</p>
|
|
74
|
+
</mf-card>
|
|
75
|
+
`,
|
|
76
|
+
moduleMetadata: { imports: [MfCardComponent] },
|
|
77
|
+
}),
|
|
78
|
+
args: {
|
|
79
|
+
title: 'Outlined card',
|
|
80
|
+
subtitle: 'Outlined variant',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const Flat: Story = {
|
|
85
|
+
render: (args) => ({
|
|
86
|
+
props: args,
|
|
87
|
+
template: `
|
|
88
|
+
<mf-card [title]="title" variant="flat">
|
|
89
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600);">
|
|
90
|
+
A flat card with a subtle background and no border or shadow.
|
|
91
|
+
</p>
|
|
92
|
+
</mf-card>
|
|
93
|
+
`,
|
|
94
|
+
moduleMetadata: { imports: [MfCardComponent] },
|
|
95
|
+
}),
|
|
96
|
+
args: {
|
|
97
|
+
title: 'Flat card',
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const Interactive: Story = {
|
|
102
|
+
render: () => ({
|
|
103
|
+
template: `
|
|
104
|
+
<mf-card title="Interactive card" subtitle="Hover to see the effect" variant="elevated" [interactive]="true">
|
|
105
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600);">
|
|
106
|
+
This card responds to hover with subtle elevation and motion.
|
|
107
|
+
</p>
|
|
108
|
+
</mf-card>
|
|
109
|
+
`,
|
|
110
|
+
moduleMetadata: { imports: [MfCardComponent] },
|
|
111
|
+
}),
|
|
112
|
+
args: {},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const NoHeader: Story = {
|
|
116
|
+
name: 'No header',
|
|
117
|
+
render: () => ({
|
|
118
|
+
template: `
|
|
119
|
+
<mf-card variant="outlined" padding="lg">
|
|
120
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600); font-size: var(--mf-text-lg);">
|
|
121
|
+
Card without a header, using only projected content.
|
|
122
|
+
</p>
|
|
123
|
+
</mf-card>
|
|
124
|
+
`,
|
|
125
|
+
moduleMetadata: { imports: [MfCardComponent] },
|
|
126
|
+
}),
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const AllVariants: Story = {
|
|
130
|
+
name: 'All variants',
|
|
131
|
+
render: () => ({
|
|
132
|
+
template: `
|
|
133
|
+
<div style="display: flex; gap: 20px; flex-wrap: wrap;">
|
|
134
|
+
<mf-card title="Elevated" subtitle="With shadow" variant="elevated" style="width: 280px;">
|
|
135
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600);">Sample content.</p>
|
|
136
|
+
</mf-card>
|
|
137
|
+
<mf-card title="Outlined" subtitle="With border" variant="outlined" style="width: 280px;">
|
|
138
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600);">Sample content.</p>
|
|
139
|
+
</mf-card>
|
|
140
|
+
<mf-card title="Flat" subtitle="No elevation" variant="flat" style="width: 280px;">
|
|
141
|
+
<p style="margin: 0; color: var(--mf-color-neutral-600);">Sample content.</p>
|
|
142
|
+
</mf-card>
|
|
143
|
+
</div>
|
|
144
|
+
`,
|
|
145
|
+
moduleMetadata: { imports: [MfCardComponent] },
|
|
146
|
+
}),
|
|
147
|
+
};
|