@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
package/ng-package.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@3ddv/software-division-components",
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/animations": "^16.2.12",
|
|
6
|
+
"@angular/common": "^16.2.12",
|
|
7
|
+
"@angular/compiler": "^16.2.12",
|
|
8
|
+
"@angular/core": "^16.2.12",
|
|
9
|
+
"@angular/forms": "^16.2.12",
|
|
10
|
+
"@angular/platform-browser": "^16.2.12",
|
|
11
|
+
"@angular/platform-browser-dynamic": "^16.2.12",
|
|
12
|
+
"@angular/router": "^16.2.12",
|
|
13
|
+
"primeng": "~16.9.1",
|
|
14
|
+
"rxjs": "~7.8.0",
|
|
15
|
+
"zone.js": "~0.14.10"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"tslib": "^2.3.0"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"primeicons": "^7.0.0",
|
|
23
|
+
"storybook": "^8.4.7"
|
|
24
|
+
},
|
|
25
|
+
"gitHead": "52f79fb20f3efd417ddc5760635bf623e7da9d12"
|
|
26
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<p-contextMenu #name [model]="items"></p-contextMenu>
|
|
2
|
+
|
|
3
|
+
<p-table
|
|
4
|
+
#table
|
|
5
|
+
dataKey="id"
|
|
6
|
+
[columns]="items"
|
|
7
|
+
stripedRows
|
|
8
|
+
[frozenColumns]="['code', 'name', 'category', 'quantity']"
|
|
9
|
+
columnResizeMode="fit"
|
|
10
|
+
[contextMenu]="name"
|
|
11
|
+
[exportHeader]="'customExportHeader'"
|
|
12
|
+
[tableStyle]="{ 'max-width': '50rem' }"
|
|
13
|
+
[scrollable]
|
|
14
|
+
scrollHeight="'flex'">
|
|
15
|
+
<p-button icon="pi pi-external-link" label="Export" (onClick)="table.exportCSV()"></p-button>
|
|
16
|
+
<ng-template pTemplate="caption">
|
|
17
|
+
<div class="flex items-center justify-between">
|
|
18
|
+
<span class="text-xl font-bold">Products</span>
|
|
19
|
+
</div>
|
|
20
|
+
</ng-template>
|
|
21
|
+
<ng-template pTemplate="header" class="flex">
|
|
22
|
+
<tr>
|
|
23
|
+
<th>Code</th>
|
|
24
|
+
<th>Name</th>
|
|
25
|
+
<th>Category</th>
|
|
26
|
+
<th>Quantity</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</ng-template>
|
|
29
|
+
<ng-template pTemplate="body" let-item>
|
|
30
|
+
<tr>
|
|
31
|
+
<td>{{ item.code }}</td>
|
|
32
|
+
<td>{{ item.name }}</td>
|
|
33
|
+
<td>{{ item.category }}</td>
|
|
34
|
+
<td>{{ item.quantity }}</td>
|
|
35
|
+
</tr>
|
|
36
|
+
</ng-template>
|
|
37
|
+
</p-table>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
2
|
+
import { ButtonModule } from 'primeng/button';
|
|
3
|
+
import { ContextMenuModule } from 'primeng/contextmenu';
|
|
4
|
+
import { TableModule } from 'primeng/table';
|
|
5
|
+
import { ScrollDirection, TableSize } from './types';
|
|
6
|
+
import { sizes } from './utils';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
standalone: true,
|
|
10
|
+
selector: 'sdc-table',
|
|
11
|
+
templateUrl: './table.component.html',
|
|
12
|
+
imports: [TableModule, ContextMenuModule, ButtonModule],
|
|
13
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
|
+
})
|
|
15
|
+
export class TableComponent {
|
|
16
|
+
@Input('paginator') paginator: boolean = false;
|
|
17
|
+
@Input('value') value: Record<string, string | number | boolean | Date>[] = [];
|
|
18
|
+
@Input('scrollDirection') scrollDirection: ScrollDirection = 'vertical';
|
|
19
|
+
|
|
20
|
+
@Input('size')
|
|
21
|
+
set size(value: TableSize) {
|
|
22
|
+
this._primeSize = sizes[value];
|
|
23
|
+
}
|
|
24
|
+
public _primeSize: string = '';
|
|
25
|
+
|
|
26
|
+
protected items = [
|
|
27
|
+
{ label: 'View', icon: 'pi pi-fw pi-search' },
|
|
28
|
+
{ label: 'Delete', icon: 'pi pi-fw pi-times' },
|
|
29
|
+
];
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
|
|
2
|
+
import { TableModule } from 'primeng/table';
|
|
3
|
+
import { TableComponent } from './table.component';
|
|
4
|
+
|
|
5
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
6
|
+
const meta: Meta<TableComponent> = {
|
|
7
|
+
title: 'Backoffice/Table',
|
|
8
|
+
decorators: [
|
|
9
|
+
moduleMetadata({
|
|
10
|
+
imports: [TableModule],
|
|
11
|
+
}),
|
|
12
|
+
],
|
|
13
|
+
component: TableComponent,
|
|
14
|
+
id: 'Table',
|
|
15
|
+
argTypes: {},
|
|
16
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<TableComponent>;
|
|
21
|
+
|
|
22
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
23
|
+
export const Primary: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
value: [],
|
|
26
|
+
size: 'normal',
|
|
27
|
+
paginator: false,
|
|
28
|
+
scrollDirection: 'vertical',
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -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-cart',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './cart.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class CartComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { CartComponent } from './cart.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<CartComponent> = {
|
|
5
|
+
title: 'Dvm/Cart',
|
|
6
|
+
component: CartComponent,
|
|
7
|
+
id: 'Cart',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<CartComponent>;
|
|
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-cart-item',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './cart-item.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class CartItemComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { CartItemComponent } from './cart-item.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<CartItemComponent> = {
|
|
5
|
+
title: 'Dvm/CartItem',
|
|
6
|
+
component: CartItemComponent,
|
|
7
|
+
id: 'CartItem',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<CartItemComponent>;
|
|
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-legend',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './legend.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class LegendComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { LegendComponent } from './legend.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<LegendComponent> = {
|
|
5
|
+
title: 'Dvm/Legend',
|
|
6
|
+
component: LegendComponent,
|
|
7
|
+
id: 'Legend',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<LegendComponent>;
|
|
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-loader',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './loader.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class LoaderComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { LoaderComponent } from './loader.component';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<LoaderComponent> = {
|
|
5
|
+
title: 'Dvm/Loader',
|
|
6
|
+
component: LoaderComponent,
|
|
7
|
+
id: 'Loader',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
|
|
12
|
+
type Story = StoryObj<LoaderComponent>;
|
|
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-popover',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [ButtonModule],
|
|
8
|
+
templateUrl: './popover.component.html',
|
|
9
|
+
})
|
|
10
|
+
export class PopoverComponent extends Button {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
}
|
|
14
|
+
}
|