@3ddv/software-division-components 1.0.0-alpha.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/.storybook/main.ts +26 -0
- package/.storybook/preview.ts +20 -0
- package/.storybook/tsconfig.json +10 -0
- package/.storybook/typings.d.ts +4 -0
- package/README.md +25 -0
- package/documentation.json +1300 -0
- package/ng-package.json +7 -0
- package/package.json +26 -0
- package/src/index.ts +1 -0
- package/src/lib/backoffice/table/index.ts +1 -0
- package/src/lib/backoffice/table/package.json +5 -0
- package/src/lib/backoffice/table/public-api.ts +2 -0
- package/src/lib/backoffice/table/table.component.html +37 -0
- package/src/lib/backoffice/table/table.component.ts +30 -0
- package/src/lib/backoffice/table/table.service.ts +10 -0
- package/src/lib/backoffice/table/table.stories.ts +30 -0
- package/src/lib/backoffice/table/types.ts +2 -0
- package/src/lib/backoffice/table/utils.ts +7 -0
- package/src/lib/dvm/cart/cart.component.html +24 -0
- package/src/lib/dvm/cart/cart.component.ts +14 -0
- package/src/lib/dvm/cart/cart.service.ts +8 -0
- package/src/lib/dvm/cart/cart.stories.ts +31 -0
- package/src/lib/dvm/cart/index.ts +1 -0
- package/src/lib/dvm/cart/package.json +5 -0
- package/src/lib/dvm/cart/public-api.ts +6 -0
- package/src/lib/dvm/cart-item/cart-item.component.html +24 -0
- package/src/lib/dvm/cart-item/cart-item.component.ts +14 -0
- package/src/lib/dvm/cart-item/cart-item.service.ts +8 -0
- package/src/lib/dvm/cart-item/cart.stories.ts +31 -0
- package/src/lib/dvm/cart-item/index.ts +1 -0
- package/src/lib/dvm/cart-item/package.json +5 -0
- package/src/lib/dvm/cart-item/public-api.ts +6 -0
- package/src/lib/dvm/legend/index.ts +1 -0
- package/src/lib/dvm/legend/legend.component.html +24 -0
- package/src/lib/dvm/legend/legend.component.ts +14 -0
- package/src/lib/dvm/legend/legend.service.ts +8 -0
- package/src/lib/dvm/legend/legend.stories.ts +31 -0
- package/src/lib/dvm/legend/package.json +5 -0
- package/src/lib/dvm/legend/public-api.ts +6 -0
- package/src/lib/dvm/loader/index.ts +1 -0
- package/src/lib/dvm/loader/loader.component.html +24 -0
- package/src/lib/dvm/loader/loader.component.ts +14 -0
- package/src/lib/dvm/loader/loader.service.ts +8 -0
- package/src/lib/dvm/loader/loader.stories.ts +31 -0
- package/src/lib/dvm/loader/package.json +5 -0
- package/src/lib/dvm/loader/public-api.ts +6 -0
- package/src/lib/dvm/popover/index.ts +1 -0
- package/src/lib/dvm/popover/package.json +5 -0
- package/src/lib/dvm/popover/popover.component.html +24 -0
- package/src/lib/dvm/popover/popover.component.ts +14 -0
- package/src/lib/dvm/popover/popover.service.ts +8 -0
- package/src/lib/dvm/popover/popover.stories.ts +31 -0
- package/src/lib/dvm/popover/public-api.ts +6 -0
- package/src/lib/dvm/stepper/index.ts +1 -0
- package/src/lib/dvm/stepper/package.json +5 -0
- package/src/lib/dvm/stepper/public-api.ts +6 -0
- package/src/lib/dvm/stepper/stepper.component.html +24 -0
- package/src/lib/dvm/stepper/stepper.component.ts +14 -0
- package/src/lib/dvm/stepper/stepper.service.ts +8 -0
- package/src/lib/dvm/stepper/stepper.stories.ts +31 -0
- package/src/lib/dvm/ticket-info-item/index.ts +1 -0
- package/src/lib/dvm/ticket-info-item/package.json +5 -0
- package/src/lib/dvm/ticket-info-item/public-api.ts +6 -0
- package/src/lib/dvm/ticket-info-item/ticket-info-item.component.html +24 -0
- package/src/lib/dvm/ticket-info-item/ticket-info-item.component.ts +14 -0
- package/src/lib/dvm/ticket-info-item/ticket-info-item.service.ts +8 -0
- package/src/lib/dvm/ticket-info-item/ticket-info-item.stories.ts +31 -0
- package/src/lib/generic/button/button.component.html +25 -0
- package/src/lib/generic/button/button.component.scss +5 -0
- package/src/lib/generic/button/button.component.ts +25 -0
- package/src/lib/generic/button/button.service.ts +8 -0
- package/src/lib/generic/button/button.stories.ts +117 -0
- package/src/lib/generic/button/index.ts +1 -0
- package/src/lib/generic/button/package.json +5 -0
- package/src/lib/generic/button/public-api.ts +6 -0
- package/src/lib/generic/drawer/drawer.component.html +24 -0
- package/src/lib/generic/drawer/drawer.component.ts +14 -0
- package/src/lib/generic/drawer/drawer.service.ts +8 -0
- package/src/lib/generic/drawer/drawer.stories.ts +31 -0
- package/src/lib/generic/drawer/index.ts +1 -0
- package/src/lib/generic/drawer/package.json +5 -0
- package/src/lib/generic/drawer/public-api.ts +6 -0
- package/src/lib/generic/modal/index.ts +1 -0
- package/src/lib/generic/modal/modal.component.html +24 -0
- package/src/lib/generic/modal/modal.component.ts +14 -0
- package/src/lib/generic/modal/modal.service.ts +8 -0
- package/src/lib/generic/modal/modal.stories.ts +31 -0
- package/src/lib/generic/modal/package.json +5 -0
- package/src/lib/generic/modal/public-api.ts +6 -0
- package/src/public-api.ts +3 -0
- package/src/stories/.eslintrc.json +5 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/user.ts +3 -0
- package/styles.scss +3 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +15 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { PopoverComponent } from './popover.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<PopoverComponent> = {
|
|
5
|
+
title: 'Dvm/Popover',
|
|
6
|
+
component: PopoverComponent,
|
|
7
|
+
id: 'Popover',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<PopoverComponent>;
|
|
13
|
+
|
|
14
|
+
export const Primary: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
label: 'Primary Button',
|
|
17
|
+
icon: 'pi pi-check',
|
|
18
|
+
type: 'button',
|
|
19
|
+
iconPos: 'left',
|
|
20
|
+
disabled: false,
|
|
21
|
+
loading: false,
|
|
22
|
+
severity: 'primary',
|
|
23
|
+
rounded: false,
|
|
24
|
+
raised: true,
|
|
25
|
+
outlined: false,
|
|
26
|
+
link: false,
|
|
27
|
+
size: undefined,
|
|
28
|
+
ariaLabel: 'Primary button',
|
|
29
|
+
style: { 'margin-right': '10px' },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<p-button
|
|
2
|
+
[label]="label"
|
|
3
|
+
[icon]="icon"
|
|
4
|
+
[type]="type"
|
|
5
|
+
[loading]="loading"
|
|
6
|
+
[iconPos]="iconPos"
|
|
7
|
+
[disabled]="disabled"
|
|
8
|
+
[severity]="severity"
|
|
9
|
+
[rounded]="rounded"
|
|
10
|
+
[raised]="raised"
|
|
11
|
+
[link]="link"
|
|
12
|
+
[size]="size"
|
|
13
|
+
[badge]="badge"
|
|
14
|
+
[plain]="plain"
|
|
15
|
+
[text]="text"
|
|
16
|
+
[style]="style"
|
|
17
|
+
[outlined]="outlined"
|
|
18
|
+
[ariaLabel]="ariaLabel"
|
|
19
|
+
[styleClass]="styleClass"
|
|
20
|
+
[badgeClass]="badgeClass"
|
|
21
|
+
[loadingIcon]="loadingIcon"
|
|
22
|
+
(onClick)="onClick.emit($event)"
|
|
23
|
+
(onFocus)="onFocus.emit($event)"
|
|
24
|
+
(onBlur)="onBlur.emit($event)" />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { Button, ButtonModule } from 'primeng/button';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'sdc-stepper',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './stepper.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class StepperComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { StepperComponent } from './stepper.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<StepperComponent> = {
|
|
5
|
+
title: 'Dvm/Stepper',
|
|
6
|
+
component: StepperComponent,
|
|
7
|
+
id: 'Stepper',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<StepperComponent>;
|
|
13
|
+
|
|
14
|
+
export const Primary: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
label: 'Primary Button',
|
|
17
|
+
icon: 'pi pi-check',
|
|
18
|
+
type: 'button',
|
|
19
|
+
iconPos: 'left',
|
|
20
|
+
disabled: false,
|
|
21
|
+
loading: false,
|
|
22
|
+
severity: 'primary',
|
|
23
|
+
rounded: false,
|
|
24
|
+
raised: true,
|
|
25
|
+
outlined: false,
|
|
26
|
+
link: false,
|
|
27
|
+
size: undefined,
|
|
28
|
+
ariaLabel: 'Primary button',
|
|
29
|
+
style: { 'margin-right': '10px' },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<p-button
|
|
2
|
+
[label]="label"
|
|
3
|
+
[icon]="icon"
|
|
4
|
+
[type]="type"
|
|
5
|
+
[loading]="loading"
|
|
6
|
+
[iconPos]="iconPos"
|
|
7
|
+
[disabled]="disabled"
|
|
8
|
+
[severity]="severity"
|
|
9
|
+
[rounded]="rounded"
|
|
10
|
+
[raised]="raised"
|
|
11
|
+
[link]="link"
|
|
12
|
+
[size]="size"
|
|
13
|
+
[badge]="badge"
|
|
14
|
+
[plain]="plain"
|
|
15
|
+
[text]="text"
|
|
16
|
+
[style]="style"
|
|
17
|
+
[outlined]="outlined"
|
|
18
|
+
[ariaLabel]="ariaLabel"
|
|
19
|
+
[styleClass]="styleClass"
|
|
20
|
+
[badgeClass]="badgeClass"
|
|
21
|
+
[loadingIcon]="loadingIcon"
|
|
22
|
+
(onClick)="onClick.emit($event)"
|
|
23
|
+
(onFocus)="onFocus.emit($event)"
|
|
24
|
+
(onBlur)="onBlur.emit($event)" />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { Button, ButtonModule } from 'primeng/button';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'sdc-ticket-info-item',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './ticket-info-item.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class TicketInfoItemComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { TicketInfoItemComponent } from './ticket-info-item.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<TicketInfoItemComponent> = {
|
|
5
|
+
title: 'Dvm/TicketInfoItem',
|
|
6
|
+
component: TicketInfoItemComponent,
|
|
7
|
+
id: 'TicketInfoItem',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<TicketInfoItemComponent>;
|
|
13
|
+
|
|
14
|
+
export const Primary: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
label: 'Primary Button',
|
|
17
|
+
icon: 'pi pi-check',
|
|
18
|
+
type: 'button',
|
|
19
|
+
iconPos: 'left',
|
|
20
|
+
disabled: false,
|
|
21
|
+
loading: false,
|
|
22
|
+
severity: 'primary',
|
|
23
|
+
rounded: false,
|
|
24
|
+
raised: true,
|
|
25
|
+
outlined: false,
|
|
26
|
+
link: false,
|
|
27
|
+
size: undefined,
|
|
28
|
+
ariaLabel: 'Primary button',
|
|
29
|
+
style: { 'margin-right': '10px' },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<p-button
|
|
2
|
+
[pTooltip]="tooltip"
|
|
3
|
+
[label]="label"
|
|
4
|
+
[icon]="icon"
|
|
5
|
+
[type]="type"
|
|
6
|
+
[loading]="loading"
|
|
7
|
+
[iconPos]="iconPos"
|
|
8
|
+
[disabled]="disabled"
|
|
9
|
+
[severity]="severity"
|
|
10
|
+
[rounded]="rounded"
|
|
11
|
+
[raised]="raised"
|
|
12
|
+
[link]="link"
|
|
13
|
+
[size]="size"
|
|
14
|
+
[badge]="badge"
|
|
15
|
+
[plain]="plain"
|
|
16
|
+
[text]="text"
|
|
17
|
+
[style]="style"
|
|
18
|
+
[outlined]="outlined"
|
|
19
|
+
[ariaLabel]="ariaLabel"
|
|
20
|
+
[styleClass]="styleClass"
|
|
21
|
+
[badgeClass]="badgeClass"
|
|
22
|
+
[loadingIcon]="loadingIcon"
|
|
23
|
+
(onClick)="onClick.emit($event)"
|
|
24
|
+
(onFocus)="onFocus.emit($event)"
|
|
25
|
+
(onBlur)="onBlur.emit($event)" />
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { Button, ButtonModule } from 'primeng/button';
|
|
3
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Button component
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @class ButtonComponent
|
|
10
|
+
* @extends {Button}
|
|
11
|
+
*/
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'sdc-button',
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [ButtonModule, TooltipModule],
|
|
16
|
+
templateUrl: './button.component.html',
|
|
17
|
+
styleUrls: ['./button.component.scss'],
|
|
18
|
+
})
|
|
19
|
+
export class ButtonComponent extends Button {
|
|
20
|
+
@Input() tooltip: string = '';
|
|
21
|
+
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { ButtonComponent } from './button.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<ButtonComponent> = {
|
|
5
|
+
title: 'Generic/Button',
|
|
6
|
+
component: ButtonComponent,
|
|
7
|
+
id: 'Button',
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: { control: 'text', description: 'Label of the button' },
|
|
10
|
+
icon: { control: 'text', description: 'Icon displayed on the button' },
|
|
11
|
+
type: { control: 'text', description: 'Type of the button' },
|
|
12
|
+
iconPos: {
|
|
13
|
+
control: 'radio',
|
|
14
|
+
options: ['left', 'right'],
|
|
15
|
+
description: 'Position of the icon',
|
|
16
|
+
},
|
|
17
|
+
disabled: { control: 'boolean', description: 'Disables the button' },
|
|
18
|
+
loading: { control: 'boolean', description: 'Displays a loading state' },
|
|
19
|
+
severity: {
|
|
20
|
+
control: 'select',
|
|
21
|
+
options: ['primary', 'secondary', 'success', 'info', 'warn', 'danger', 'help', 'contrast'],
|
|
22
|
+
description: 'Style severity of the button',
|
|
23
|
+
},
|
|
24
|
+
rounded: { control: 'boolean', description: 'Applies rounded border radius' },
|
|
25
|
+
raised: { control: 'boolean', description: 'Adds a shadow to indicate elevation' },
|
|
26
|
+
outlined: { control: 'boolean', description: 'Adds an outlined border' },
|
|
27
|
+
link: { control: 'boolean', description: 'Displays the button as a link' },
|
|
28
|
+
size: {
|
|
29
|
+
control: 'radio',
|
|
30
|
+
options: ['small', 'normal', 'large'],
|
|
31
|
+
description: 'Size of the button',
|
|
32
|
+
},
|
|
33
|
+
badge: { control: 'text', description: 'Value of the badge' },
|
|
34
|
+
ariaLabel: { control: 'text', description: 'Aria label for accessibility' },
|
|
35
|
+
style: { control: 'object', description: 'Inline styles for the button' },
|
|
36
|
+
tooltip: { control: 'text', description: 'Tooltip for the button' },
|
|
37
|
+
onClick: { action: 'clicked', description: 'Emits when button is clicked' },
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default meta;
|
|
42
|
+
|
|
43
|
+
type Story = StoryObj<ButtonComponent>;
|
|
44
|
+
|
|
45
|
+
export const Primary: Story = {
|
|
46
|
+
args: {
|
|
47
|
+
label: 'Primary Button',
|
|
48
|
+
icon: 'pi pi-check',
|
|
49
|
+
type: 'button',
|
|
50
|
+
iconPos: 'left',
|
|
51
|
+
disabled: false,
|
|
52
|
+
loading: false,
|
|
53
|
+
severity: 'primary',
|
|
54
|
+
rounded: false,
|
|
55
|
+
raised: true,
|
|
56
|
+
outlined: false,
|
|
57
|
+
link: false,
|
|
58
|
+
size: undefined,
|
|
59
|
+
ariaLabel: 'Primary button',
|
|
60
|
+
style: { 'margin-right': '10px' },
|
|
61
|
+
tooltip: 'description here',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const Disabled: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
label: 'Disabled Button',
|
|
68
|
+
disabled: true,
|
|
69
|
+
severity: 'secondary',
|
|
70
|
+
tooltip: 'description here',
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const Loading: Story = {
|
|
75
|
+
args: {
|
|
76
|
+
label: 'Loading Button',
|
|
77
|
+
loading: true,
|
|
78
|
+
severity: 'info',
|
|
79
|
+
tooltip: 'description here',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const Rounded: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
label: 'Rounded Button',
|
|
86
|
+
rounded: true,
|
|
87
|
+
severity: 'success',
|
|
88
|
+
icon: 'pi pi-user',
|
|
89
|
+
tooltip: 'description here',
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const Outlined: Story = {
|
|
94
|
+
args: {
|
|
95
|
+
label: 'Outlined Button',
|
|
96
|
+
outlined: true,
|
|
97
|
+
severity: 'danger',
|
|
98
|
+
tooltip: 'description here',
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const Link: Story = {
|
|
103
|
+
args: {
|
|
104
|
+
label: 'Link Button',
|
|
105
|
+
link: true,
|
|
106
|
+
severity: 'help',
|
|
107
|
+
tooltip: 'description here',
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const Action: Story = {
|
|
112
|
+
args: {
|
|
113
|
+
rounded: true,
|
|
114
|
+
icon: 'pi pi-bookmark',
|
|
115
|
+
tooltip: 'description here',
|
|
116
|
+
},
|
|
117
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<p-button
|
|
2
|
+
[label]="label"
|
|
3
|
+
[icon]="icon"
|
|
4
|
+
[type]="type"
|
|
5
|
+
[loading]="loading"
|
|
6
|
+
[iconPos]="iconPos"
|
|
7
|
+
[disabled]="disabled"
|
|
8
|
+
[severity]="severity"
|
|
9
|
+
[rounded]="rounded"
|
|
10
|
+
[raised]="raised"
|
|
11
|
+
[link]="link"
|
|
12
|
+
[size]="size"
|
|
13
|
+
[badge]="badge"
|
|
14
|
+
[plain]="plain"
|
|
15
|
+
[text]="text"
|
|
16
|
+
[style]="style"
|
|
17
|
+
[outlined]="outlined"
|
|
18
|
+
[ariaLabel]="ariaLabel"
|
|
19
|
+
[styleClass]="styleClass"
|
|
20
|
+
[badgeClass]="badgeClass"
|
|
21
|
+
[loadingIcon]="loadingIcon"
|
|
22
|
+
(onClick)="onClick.emit($event)"
|
|
23
|
+
(onFocus)="onFocus.emit($event)"
|
|
24
|
+
(onBlur)="onBlur.emit($event)" />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { Button, ButtonModule } from 'primeng/button';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'sdc-drawer',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './drawer.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class DrawerComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { DrawerComponent } from './drawer.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<DrawerComponent> = {
|
|
5
|
+
title: 'Generic/Drawer',
|
|
6
|
+
component: DrawerComponent,
|
|
7
|
+
id: 'Drawer',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<DrawerComponent>;
|
|
13
|
+
|
|
14
|
+
export const Primary: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
label: 'Primary Button',
|
|
17
|
+
icon: 'pi pi-check',
|
|
18
|
+
type: 'button',
|
|
19
|
+
iconPos: 'left',
|
|
20
|
+
disabled: false,
|
|
21
|
+
loading: false,
|
|
22
|
+
severity: 'primary',
|
|
23
|
+
rounded: false,
|
|
24
|
+
raised: true,
|
|
25
|
+
outlined: false,
|
|
26
|
+
link: false,
|
|
27
|
+
size: undefined,
|
|
28
|
+
ariaLabel: 'Primary button',
|
|
29
|
+
style: { 'margin-right': '10px' },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<p-button
|
|
2
|
+
[label]="label"
|
|
3
|
+
[icon]="icon"
|
|
4
|
+
[type]="type"
|
|
5
|
+
[loading]="loading"
|
|
6
|
+
[iconPos]="iconPos"
|
|
7
|
+
[disabled]="disabled"
|
|
8
|
+
[severity]="severity"
|
|
9
|
+
[rounded]="rounded"
|
|
10
|
+
[raised]="raised"
|
|
11
|
+
[link]="link"
|
|
12
|
+
[size]="size"
|
|
13
|
+
[badge]="badge"
|
|
14
|
+
[plain]="plain"
|
|
15
|
+
[text]="text"
|
|
16
|
+
[style]="style"
|
|
17
|
+
[outlined]="outlined"
|
|
18
|
+
[ariaLabel]="ariaLabel"
|
|
19
|
+
[styleClass]="styleClass"
|
|
20
|
+
[badgeClass]="badgeClass"
|
|
21
|
+
[loadingIcon]="loadingIcon"
|
|
22
|
+
(onClick)="onClick.emit($event)"
|
|
23
|
+
(onFocus)="onFocus.emit($event)"
|
|
24
|
+
(onBlur)="onBlur.emit($event)" />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { Button, ButtonModule } from 'primeng/button';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'sdc-drawer',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './modal.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class ModalComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { ModalComponent } from './modal.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<ModalComponent> = {
|
|
5
|
+
title: 'Generic/Modal',
|
|
6
|
+
component: ModalComponent,
|
|
7
|
+
id: 'Modal',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<ModalComponent>;
|
|
13
|
+
|
|
14
|
+
export const Primary: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
label: 'Primary Button',
|
|
17
|
+
icon: 'pi pi-check',
|
|
18
|
+
type: 'button',
|
|
19
|
+
iconPos: 'left',
|
|
20
|
+
disabled: false,
|
|
21
|
+
loading: false,
|
|
22
|
+
severity: 'primary',
|
|
23
|
+
rounded: false,
|
|
24
|
+
raised: true,
|
|
25
|
+
outlined: false,
|
|
26
|
+
link: false,
|
|
27
|
+
size: undefined,
|
|
28
|
+
ariaLabel: 'Primary button',
|
|
29
|
+
style: { 'margin-right': '10px' },
|
|
30
|
+
},
|
|
31
|
+
};
|