@allsorter/ui-components 0.0.330 → 0.0.335
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/README.md +40 -73
- package/fesm2022/allsorter-ui-components.mjs +329 -0
- package/fesm2022/allsorter-ui-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/allsorter-lib.component.d.ts +5 -0
- package/lib/allsorter-lib.service.d.ts +6 -0
- package/lib/button/button.component.d.ts +46 -0
- package/lib/button/button.module.d.ts +13 -0
- package/lib/input/input.component.d.ts +34 -0
- package/lib/input/input.module.d.ts +8 -0
- package/package.json +16 -57
- package/{projects/allsorter-lib/src/public-api.ts → public-api.d.ts} +0 -4
- package/.editorconfig +0 -16
- package/.gitignore copy +0 -44
- package/.storybook/main.ts +0 -21
- package/.storybook/preview.ts +0 -17
- package/.storybook/tsconfig.doc.json +0 -10
- package/.storybook/tsconfig.json +0 -11
- package/.storybook/typings.d.ts +0 -4
- package/.vscode/settings.json +0 -1
- package/LICENSE +0 -21
- package/angular.json +0 -135
- package/bitbucket-pipelines.yml +0 -108
- package/documentation.json +0 -1604
- package/ng-package.json +0 -7
- package/projects/allsorter-lib/.storybook/main.js +0 -15
- package/projects/allsorter-lib/README.md +0 -63
- package/projects/allsorter-lib/ng-package.json +0 -7
- package/projects/allsorter-lib/package.json +0 -12
- package/projects/allsorter-lib/src/lib/allsorter-lib.component.spec.ts +0 -23
- package/projects/allsorter-lib/src/lib/allsorter-lib.component.ts +0 -15
- package/projects/allsorter-lib/src/lib/allsorter-lib.service.spec.ts +0 -16
- package/projects/allsorter-lib/src/lib/allsorter-lib.service.ts +0 -9
- package/projects/allsorter-lib/src/lib/button/button.component.html +0 -116
- package/projects/allsorter-lib/src/lib/button/button.component.scss +0 -466
- package/projects/allsorter-lib/src/lib/button/button.component.spec.ts +0 -23
- package/projects/allsorter-lib/src/lib/button/button.component.ts +0 -105
- package/projects/allsorter-lib/src/lib/button/button.module.ts +0 -23
- package/projects/allsorter-lib/src/lib/button/stories/button-gallery.stories.ts +0 -155
- package/projects/allsorter-lib/src/lib/button/stories/button-playground.stories.ts +0 -63
- package/projects/allsorter-lib/src/lib/input/input.component.css +0 -58
- package/projects/allsorter-lib/src/lib/input/input.component.html +0 -27
- package/projects/allsorter-lib/src/lib/input/input.component.spec.ts +0 -60
- package/projects/allsorter-lib/src/lib/input/input.component.ts +0 -92
- package/projects/allsorter-lib/src/lib/input/input.module.ts +0 -9
- package/projects/allsorter-lib/src/lib/input/stories/input-gallery.stories.ts +0 -124
- package/projects/allsorter-lib/src/lib/input/stories/input-playground.stories.ts +0 -135
- package/projects/allsorter-lib/src/lib/styles/typography-classes.scss +0 -122
- package/projects/allsorter-lib/tsconfig.lib.json +0 -15
- package/projects/allsorter-lib/tsconfig.lib.prod.json +0 -11
- package/projects/allsorter-lib/tsconfig.spec.json +0 -15
- package/src/app/app.component.css +0 -0
- package/src/app/app.component.html +0 -328
- package/src/app/app.component.spec.ts +0 -31
- package/src/app/app.component.ts +0 -11
- package/src/app/app.module.ts +0 -16
- package/src/assets/.gitkeep +0 -0
- package/src/assets/font/OpenSans-Light-webfont.eot +0 -0
- package/src/assets/font/OpenSans-Light-webfont.svg +0 -252
- package/src/assets/font/OpenSans-Light-webfont.ttf +0 -0
- package/src/assets/font/OpenSans-Light-webfont.woff +0 -0
- package/src/assets/font/OpenSans-Regular-webfont.eot +0 -0
- package/src/assets/font/OpenSans-Regular-webfont.svg +0 -252
- package/src/assets/font/OpenSans-Regular-webfont.ttf +0 -0
- package/src/assets/font/OpenSans-Regular-webfont.woff +0 -0
- package/src/assets/icon/percolate.eot +0 -0
- package/src/assets/icon/percolate.svg +0 -139
- package/src/assets/icon/percolate.ttf +0 -0
- package/src/assets/icon/percolate.woff +0 -0
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -16
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -15
- package/src/main.ts +0 -7
- package/src/polyfills.ts +0 -63
- package/src/stories/.eslintrc.json +0 -8
- package/src/stories/Configure.mdx +0 -369
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -5
- 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 +0 -15
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -3
- 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 +0 -12
- package/src/stories/assets/youtube.svg +0 -4
- package/src/styles.css +0 -463
- package/tsconfig.app.json +0 -10
- package/tsconfig.json +0 -34
- package/tsconfig.spec.json +0 -10
package/ng-package.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
stories: [
|
|
3
|
-
'../src/lib/**/*.stories.@(js|jsx|ts|tsx)'
|
|
4
|
-
],
|
|
5
|
-
addons: [
|
|
6
|
-
'@storybook/addon-links',
|
|
7
|
-
'@storybook/addon-essentials',
|
|
8
|
-
'@storybook/addon-interactions',
|
|
9
|
-
'@storybook/addon-mdx-gfm',
|
|
10
|
-
],
|
|
11
|
-
framework: {
|
|
12
|
-
name: '@storybook/angular',
|
|
13
|
-
options: {},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# AllsorterLib
|
|
2
|
-
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
ng generate --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Building
|
|
20
|
-
|
|
21
|
-
To build the library, run:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
ng build allsorter-lib
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
-
|
|
29
|
-
### Publishing the Library
|
|
30
|
-
|
|
31
|
-
Once the project is built, you can publish your library by following these steps:
|
|
32
|
-
|
|
33
|
-
1. Navigate to the `dist` directory:
|
|
34
|
-
```bash
|
|
35
|
-
cd dist/allsorter-lib
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
-
```bash
|
|
40
|
-
npm publish
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Running unit tests
|
|
44
|
-
|
|
45
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
ng test
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Running end-to-end tests
|
|
52
|
-
|
|
53
|
-
For end-to-end (e2e) testing, run:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
ng e2e
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
-
|
|
61
|
-
## Additional Resources
|
|
62
|
-
|
|
63
|
-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { AllsorterLibComponent } from './allsorter-lib.component';
|
|
4
|
-
|
|
5
|
-
describe('AllsorterLibComponent', () => {
|
|
6
|
-
let component: AllsorterLibComponent;
|
|
7
|
-
let fixture: ComponentFixture<AllsorterLibComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [AllsorterLibComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(AllsorterLibComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { AllsorterLibService } from './allsorter-lib.service';
|
|
4
|
-
|
|
5
|
-
describe('AllsorterLibService', () => {
|
|
6
|
-
let service: AllsorterLibService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(AllsorterLibService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<!-- Regular button types -->
|
|
2
|
-
<ng-container *ngIf="buttonType !== 'dropdown'; else dropdownTpl">
|
|
3
|
-
<button
|
|
4
|
-
mat-flat-button
|
|
5
|
-
class="btn custom-button" [class]="effectiveFontClass"
|
|
6
|
-
[ngClass]="{
|
|
7
|
-
'size-header': size === 'header' && !fontClass,
|
|
8
|
-
'size-xs': size === 'xs' && !fontClass,
|
|
9
|
-
'size-sm': size === 'sm' && !fontClass,
|
|
10
|
-
'size-base': size === 'base' && !fontClass,
|
|
11
|
-
'size-l': size === 'l' && !fontClass,
|
|
12
|
-
'size-xl': size === 'xl' && !fontClass,
|
|
13
|
-
'mat-raised-button': variant === 'raised',
|
|
14
|
-
'mat-flat-button': variant === 'flat',
|
|
15
|
-
|
|
16
|
-
'mat-stroked-button': variant === 'stroked',
|
|
17
|
-
'mat-fab': variant === 'fab',
|
|
18
|
-
'mat-icon-button': variant === 'icon',
|
|
19
|
-
'icon-circle': buttonType === 'icon-circle',
|
|
20
|
-
'icon-label': buttonType === 'icon-label',
|
|
21
|
-
'two-icon-label': buttonType === 'two-icon-label',
|
|
22
|
-
'blue': category === 'blue',
|
|
23
|
-
'green': category === 'green',
|
|
24
|
-
'grey': category === 'grey',
|
|
25
|
-
'error': category === 'error',
|
|
26
|
-
'gradient': category === 'gradient',
|
|
27
|
-
'blue-no-outline': category === 'blue-no-outline',
|
|
28
|
-
'green-no-outline': category === 'green-no-outline',
|
|
29
|
-
'grey-no-outline': category === 'grey-no-outline',
|
|
30
|
-
'error-no-outline': category === 'error-no-outline',
|
|
31
|
-
'btn-default': state === 'default',
|
|
32
|
-
'btn-hover': state === 'hover',
|
|
33
|
-
'btn-pressed': state === 'pressed',
|
|
34
|
-
'btn-disabled': state === 'disabled'
|
|
35
|
-
}"
|
|
36
|
-
[ngStyle]="{ color: color }"
|
|
37
|
-
[disabled]="state === 'disabled'"
|
|
38
|
-
(click)="onClick.emit($event)"
|
|
39
|
-
(mouseenter)="onHover.emit($event)"
|
|
40
|
-
(mouseleave)="onMouseLeave.emit($event)"
|
|
41
|
-
[style.display]="'inline-flex'"
|
|
42
|
-
[style.align-items]="'center'"
|
|
43
|
-
[style.gap.px]="computeGap()"
|
|
44
|
-
>
|
|
45
|
-
<!-- Left Icon (Only shown if leftIcon is set and not empty) -->
|
|
46
|
-
<mat-icon *ngIf="leftIcon?.trim() as leftIconText"
|
|
47
|
-
[fontSet]="outlined ? 'material-icons-outlined' : 'material-icons'"
|
|
48
|
-
class="left-icon">{{ leftIconText }}</mat-icon>
|
|
49
|
-
<!-- Label (Only shown if iconOnly is false) -->
|
|
50
|
-
<span *ngIf="!iconOnly" class="button-label" [ngStyle]="{ color: color }">{{ label || '' }}</span>
|
|
51
|
-
|
|
52
|
-
<!-- Right Icon (Only shown if rightIcon is set and not empty) -->
|
|
53
|
-
<mat-icon *ngIf="rightIcon?.trim() as rightIconText"
|
|
54
|
-
[fontSet]="outlined ? 'material-icons-outlined' : 'material-icons'"
|
|
55
|
-
class="right-icon">{{ rightIconText }}</mat-icon>
|
|
56
|
-
</button>
|
|
57
|
-
</ng-container>
|
|
58
|
-
|
|
59
|
-
<!-- Dropdown button template -->
|
|
60
|
-
<ng-template #dropdownTpl>
|
|
61
|
-
<button
|
|
62
|
-
mat-flat-button
|
|
63
|
-
class="btn custom-button" [class]="effectiveFontClass"
|
|
64
|
-
[ngClass]="{
|
|
65
|
-
'size-header': size === 'header' && !fontClass,
|
|
66
|
-
'size-xs': size === 'xs' && !fontClass,
|
|
67
|
-
'size-sm': size === 'sm' && !fontClass,
|
|
68
|
-
'size-base': size === 'base' && !fontClass,
|
|
69
|
-
'size-l': size === 'l' && !fontClass,
|
|
70
|
-
'size-xl': size === 'xl' && !fontClass,
|
|
71
|
-
'mat-raised-button': variant === 'raised',
|
|
72
|
-
'mat-flat-button': variant === 'flat',
|
|
73
|
-
'mat-stroked-button': variant === 'stroked',
|
|
74
|
-
'mat-fab': variant === 'fab',
|
|
75
|
-
'mat-icon-button': variant === 'icon',
|
|
76
|
-
'icon-label': true,
|
|
77
|
-
'blue': category === 'blue',
|
|
78
|
-
'green': category === 'green',
|
|
79
|
-
'grey': category === 'grey',
|
|
80
|
-
'error': category === 'error',
|
|
81
|
-
'gradient': category === 'gradient',
|
|
82
|
-
'blue-no-outline': category === 'blue-no-outline',
|
|
83
|
-
'green-no-outline': category === 'green-no-outline',
|
|
84
|
-
'grey-no-outline': category === 'grey-no-outline',
|
|
85
|
-
'error-no-outline': category === 'error-no-outline',
|
|
86
|
-
'btn-default': state === 'default',
|
|
87
|
-
'btn-hover': state === 'hover',
|
|
88
|
-
'btn-pressed': state === 'pressed',
|
|
89
|
-
'btn-disabled': state === 'disabled',
|
|
90
|
-
|
|
91
|
-
}"
|
|
92
|
-
[ngStyle]="{ color: color }"
|
|
93
|
-
[disabled]="state === 'disabled'"
|
|
94
|
-
(mouseenter)="onHover.emit($event)"
|
|
95
|
-
(mouseleave)="onMouseLeave.emit($event)"
|
|
96
|
-
[style.display]="'inline-flex'"
|
|
97
|
-
[style.align-items]="'center'"
|
|
98
|
-
[style.gap.px]="computeGap()"
|
|
99
|
-
[matMenuTriggerFor]="menu"
|
|
100
|
-
>
|
|
101
|
-
<!-- Left Icon (optional) -->
|
|
102
|
-
<mat-icon *ngIf="leftIcon?.trim() as leftIconText"
|
|
103
|
-
[fontSet]="outlined ? 'material-icons-outlined' : 'material-icons'"
|
|
104
|
-
class="left-icon">{{ leftIconText }}</mat-icon>
|
|
105
|
-
<!-- Label -->
|
|
106
|
-
<span *ngIf="!iconOnly" class="button-label" [ngStyle]="{ color: color }">{{ label || '' }}</span>
|
|
107
|
-
<!-- Dropdown Arrow Icon -->
|
|
108
|
-
<mat-icon class="right-icon">arrow_drop_down</mat-icon>
|
|
109
|
-
</button>
|
|
110
|
-
<!-- Mat Menu -->
|
|
111
|
-
<mat-menu #menu="matMenu" panelClass="custom-dropdown-menu">
|
|
112
|
-
<button mat-menu-item *ngFor="let opt of dropdownOptions" (click)="selectOption(opt)" [ngClass]="effectiveFontClass">
|
|
113
|
-
{{ opt.label || opt }}
|
|
114
|
-
</button>
|
|
115
|
-
</mat-menu>
|
|
116
|
-
</ng-template>
|