c3-components 0.0.1 → 0.0.3
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 +67 -13
- package/esm2020/c3-components.mjs +5 -0
- package/esm2020/lib/c3-dialog/c3-dialog.module.mjs +56 -0
- package/esm2020/lib/c3-dialog/components/c3-dialog-confirm.component.mjs +52 -0
- package/esm2020/lib/c3-dialog/components/c3-dialog-embed-child.component.mjs +32 -0
- package/esm2020/lib/c3-dialog/components/c3-dialog-prompt.component.mjs +95 -0
- package/esm2020/lib/c3-dialog/services/c3-dialog.service.mjs +79 -0
- package/esm2020/lib/c3-dropdown/c3-dropdown.module.mjs +20 -0
- package/esm2020/lib/c3-dropdown/components/c3-dropdown.component.mjs +45 -0
- package/esm2020/lib/c3-dropdown/directives/c3-dropdown.trigger.mjs +128 -0
- package/esm2020/lib/c3-file-viewer/c3-file-viewer.module.mjs +51 -0
- package/esm2020/lib/c3-file-viewer/components/c3-file-viewer-actions/c3-file-viewer-actions.component.mjs +17 -0
- package/esm2020/lib/c3-file-viewer/components/c3-file-viewer-dialog/c3-file-viewer-dialog.mjs +20 -0
- package/esm2020/lib/c3-file-viewer/components/c3-file-viewer-image/c3-file-viewer-image.component.mjs +20 -0
- package/esm2020/lib/c3-file-viewer/components/c3-file-viewer-pdf/c3-file-viewer-pdf.component.mjs +23 -0
- package/esm2020/lib/c3-file-viewer/components/c3-file-viewer-video/c3-file-viewer-video.component.mjs +32 -0
- package/esm2020/lib/c3-file-viewer/components/public/c3-file-viewer/c3-file-viewer.component.mjs +86 -0
- package/esm2020/lib/c3-file-viewer/components/public/c3-file-viewer-dialog/c3-file-viewer-dialog.component.mjs +34 -0
- package/esm2020/lib/c3-file-viewer/consts/default.config.mjs +40 -0
- package/esm2020/lib/c3-file-viewer/directives/full-screen.directive.mjs +66 -0
- package/esm2020/lib/c3-file-viewer/models/custom-file-event.model.mjs +7 -0
- package/esm2020/lib/c3-file-viewer/models/file-metadata.mjs +2 -0
- package/esm2020/lib/c3-file-viewer/models/file-viewer-config.model.mjs +2 -0
- package/esm2020/lib/c3-file-viewer/models/file-viewer.mjs +206 -0
- package/esm2020/lib/c3-file-viewer/models/http.client.mjs +2 -0
- package/esm2020/lib/c3-safe-url/pipes/c3-safe-url.pipe.mjs +21 -0
- package/esm2020/public-api.mjs +34 -0
- package/fesm2015/c3-components.mjs +1055 -0
- package/fesm2015/c3-components.mjs.map +1 -0
- package/fesm2020/c3-components.mjs +1053 -0
- package/fesm2020/c3-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/c3-dialog/c3-dialog.module.d.ts +16 -0
- package/lib/c3-dialog/components/c3-dialog-confirm.component.d.ts +23 -0
- package/lib/c3-dialog/components/c3-dialog-embed-child.component.d.ts +18 -0
- package/lib/c3-dialog/components/c3-dialog-prompt.component.d.ts +31 -0
- package/lib/c3-dialog/services/c3-dialog.service.d.ts +19 -0
- package/lib/c3-dropdown/c3-dropdown.module.d.ts +10 -0
- package/lib/c3-dropdown/components/c3-dropdown.component.d.ts +15 -0
- package/lib/c3-dropdown/directives/c3-dropdown.trigger.d.ts +45 -0
- package/lib/c3-dropdown/styles/_c3-dropdown.sass +22 -0
- package/lib/c3-file-viewer/c3-file-viewer.module.d.ts +18 -0
- package/lib/c3-file-viewer/components/c3-file-viewer-actions/c3-file-viewer-actions.component.d.ts +8 -0
- package/lib/c3-file-viewer/components/c3-file-viewer-dialog/c3-file-viewer-dialog.d.ts +8 -0
- package/lib/c3-file-viewer/components/c3-file-viewer-image/c3-file-viewer-image.component.d.ts +9 -0
- package/lib/c3-file-viewer/components/c3-file-viewer-pdf/c3-file-viewer-pdf.component.d.ts +9 -0
- package/lib/c3-file-viewer/components/c3-file-viewer-video/c3-file-viewer-video.component.d.ts +12 -0
- package/lib/c3-file-viewer/components/public/c3-file-viewer/c3-file-viewer.component.d.ts +25 -0
- package/lib/c3-file-viewer/components/public/c3-file-viewer-dialog/c3-file-viewer-dialog.component.d.ts +12 -0
- package/lib/c3-file-viewer/consts/default.config.d.ts +2 -0
- package/lib/c3-file-viewer/directives/full-screen.directive.d.ts +12 -0
- package/lib/c3-file-viewer/models/custom-file-event.model.d.ts +5 -0
- package/lib/c3-file-viewer/models/file-metadata.d.ts +12 -0
- package/lib/c3-file-viewer/models/file-viewer-config.model.d.ts +48 -0
- package/lib/c3-file-viewer/models/file-viewer.d.ts +65 -0
- package/lib/c3-file-viewer/models/http.client.d.ts +14 -0
- package/lib/c3-file-viewer/styles/_c3-file-viewer.sass +116 -0
- package/lib/c3-safe-url/pipes/c3-safe-url.pipe.d.ts +10 -0
- package/lib/c3-styles/_c3-core.sass +8 -0
- package/lib/c3-styles/_c3-root-variables.sass +107 -0
- package/lib/c3-styles/_utils.sass +27 -0
- package/package.json +5 -4
- package/public-api.d.ts +30 -0
- package/src/lib/c3-file/c3-input-file/components/c3-input-file/c3-input-file.component.scss +3 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
export interface C3FileViewerConfig {
|
|
3
|
+
btnContainerClass?: string;
|
|
4
|
+
btnClass?: string;
|
|
5
|
+
btnSubClass?: string;
|
|
6
|
+
zoomFactor?: number;
|
|
7
|
+
containerBackgroundColor?: string;
|
|
8
|
+
wheelZoom?: boolean;
|
|
9
|
+
allowFullscreen?: boolean;
|
|
10
|
+
allowKeyboardNavigation?: boolean;
|
|
11
|
+
customClient?: HttpClient['get'];
|
|
12
|
+
minHeight?: number | string;
|
|
13
|
+
minWidth?: number | string;
|
|
14
|
+
width?: number | string;
|
|
15
|
+
maxHeight?: number | string;
|
|
16
|
+
height?: number | string;
|
|
17
|
+
maxWidth?: number | string;
|
|
18
|
+
btnShow?: {
|
|
19
|
+
zoomIn?: boolean;
|
|
20
|
+
zoomOut?: boolean;
|
|
21
|
+
rotateClockwise?: boolean;
|
|
22
|
+
rotateCounterClockwise?: boolean;
|
|
23
|
+
next?: boolean;
|
|
24
|
+
prev?: boolean;
|
|
25
|
+
reset?: boolean;
|
|
26
|
+
};
|
|
27
|
+
btnIcons?: {
|
|
28
|
+
zoomIn?: MultiBtn['btn'];
|
|
29
|
+
zoomOut?: MultiBtn['btn'];
|
|
30
|
+
rotateClockwise?: MultiBtn['btn'];
|
|
31
|
+
rotateCounterClockwise?: MultiBtn['btn'];
|
|
32
|
+
next?: MultiBtn['btn'];
|
|
33
|
+
prev?: MultiBtn['btn'];
|
|
34
|
+
fullscreen?: MultiBtn['btn'];
|
|
35
|
+
reset?: MultiBtn['btn'];
|
|
36
|
+
};
|
|
37
|
+
customBtns?: Array<{
|
|
38
|
+
name: string;
|
|
39
|
+
icon: MultiBtn['btn'];
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
interface MultiBtn {
|
|
43
|
+
btn: {
|
|
44
|
+
classes?: string;
|
|
45
|
+
text?: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
import { C3FileViewerConfig } from './file-viewer-config.model';
|
|
3
|
+
import { FileMetadata } from './file-metadata';
|
|
4
|
+
export declare class C3FileViewer {
|
|
5
|
+
private _config;
|
|
6
|
+
get config(): C3FileViewerConfig;
|
|
7
|
+
set config(value: C3FileViewerConfig);
|
|
8
|
+
config$: BehaviorSubject<C3FileViewerConfig>;
|
|
9
|
+
fullscreen$: BehaviorSubject<Boolean>;
|
|
10
|
+
customFile$: BehaviorSubject<any>;
|
|
11
|
+
index$: BehaviorSubject<number>;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
currentIndex: number;
|
|
14
|
+
get currentFile(): FileMetadata;
|
|
15
|
+
style: {
|
|
16
|
+
transform: string;
|
|
17
|
+
msTransform: string;
|
|
18
|
+
oTransform: string;
|
|
19
|
+
webkitTransform: string;
|
|
20
|
+
minHeight: string;
|
|
21
|
+
maxHeight: string;
|
|
22
|
+
height: string;
|
|
23
|
+
minWidth: string;
|
|
24
|
+
maxWidth: string;
|
|
25
|
+
width: string;
|
|
26
|
+
};
|
|
27
|
+
styleHeight: string;
|
|
28
|
+
hovered: boolean;
|
|
29
|
+
set files(value: FileMetadata[]);
|
|
30
|
+
get files(): FileMetadata[];
|
|
31
|
+
private _files;
|
|
32
|
+
filesObjectUrl: Array<FileMetadata & {
|
|
33
|
+
objectUrl?: Observable<string>;
|
|
34
|
+
}>;
|
|
35
|
+
private scale;
|
|
36
|
+
private rotation;
|
|
37
|
+
private translateX;
|
|
38
|
+
private translateY;
|
|
39
|
+
private prevX;
|
|
40
|
+
private prevY;
|
|
41
|
+
constructor({ config, files, }: {
|
|
42
|
+
config?: C3FileViewerConfig;
|
|
43
|
+
files?: FileMetadata[];
|
|
44
|
+
});
|
|
45
|
+
createObjectURL(file: FileMetadata): Observable<string>;
|
|
46
|
+
getFile(location: string): Observable<Blob>;
|
|
47
|
+
previousImage(event: KeyboardEvent | MouseEvent): void;
|
|
48
|
+
nextImage(event: KeyboardEvent | MouseEvent): void;
|
|
49
|
+
zoomIn(): void;
|
|
50
|
+
zoomOut(): void;
|
|
51
|
+
scrollZoom(evt: WheelEvent): boolean;
|
|
52
|
+
rotateClockwise(): void;
|
|
53
|
+
rotateCounterClockwise(): void;
|
|
54
|
+
onLoad(file: FileMetadata): void;
|
|
55
|
+
onLoadStart(file: FileMetadata): void;
|
|
56
|
+
imageNotFound(file: FileMetadata): void;
|
|
57
|
+
onDragOver(evt: DragEvent): void;
|
|
58
|
+
onDragStart(evt: DragEvent): void;
|
|
59
|
+
toggleFullscreen(): void;
|
|
60
|
+
reset(): void;
|
|
61
|
+
private canNavigate;
|
|
62
|
+
private updateStyle;
|
|
63
|
+
private valueToCss;
|
|
64
|
+
private mergeConfig;
|
|
65
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpContext, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
|
+
export interface HttpClientOptions {
|
|
3
|
+
headers?: HttpHeaders | {
|
|
4
|
+
[header: string]: string | string[];
|
|
5
|
+
};
|
|
6
|
+
context?: HttpContext;
|
|
7
|
+
observe?: 'body';
|
|
8
|
+
params?: HttpParams | {
|
|
9
|
+
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
|
|
10
|
+
};
|
|
11
|
+
reportProgress?: boolean;
|
|
12
|
+
responseType: 'blob';
|
|
13
|
+
withCredentials?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
=c3-file-viewer($theme)
|
|
2
|
+
.container
|
|
3
|
+
position: relative
|
|
4
|
+
width: 100%
|
|
5
|
+
display: flex
|
|
6
|
+
justify-content: center
|
|
7
|
+
align-items: center
|
|
8
|
+
overflow: hidden
|
|
9
|
+
|
|
10
|
+
.btn-container
|
|
11
|
+
position: absolute
|
|
12
|
+
z-index: 98
|
|
13
|
+
text-align: right
|
|
14
|
+
bottom: 0
|
|
15
|
+
right: 0
|
|
16
|
+
width: 100%
|
|
17
|
+
|
|
18
|
+
& img
|
|
19
|
+
max-width: 100%
|
|
20
|
+
max-height: 100%
|
|
21
|
+
|
|
22
|
+
& a,
|
|
23
|
+
button
|
|
24
|
+
z-index: 99
|
|
25
|
+
position: relative
|
|
26
|
+
|
|
27
|
+
&:not(:disabled)
|
|
28
|
+
cursor: pointer
|
|
29
|
+
|
|
30
|
+
button.default,
|
|
31
|
+
a.default
|
|
32
|
+
height: 40px
|
|
33
|
+
width: 40px
|
|
34
|
+
opacity: 0.7
|
|
35
|
+
transition: opacity 200ms
|
|
36
|
+
|
|
37
|
+
button.default:hover,
|
|
38
|
+
a.default:hover
|
|
39
|
+
opacity: 1
|
|
40
|
+
|
|
41
|
+
button.default:disabled,
|
|
42
|
+
a.default:disabled
|
|
43
|
+
opacity: 0.25
|
|
44
|
+
|
|
45
|
+
.nav-button-container > button,
|
|
46
|
+
.nav-button-container > a
|
|
47
|
+
position: relative
|
|
48
|
+
right: 0
|
|
49
|
+
margin: 0 10px
|
|
50
|
+
|
|
51
|
+
.nav-button-container
|
|
52
|
+
text-align: center
|
|
53
|
+
position: absolute
|
|
54
|
+
z-index: 98
|
|
55
|
+
bottom: 50px
|
|
56
|
+
left: 0
|
|
57
|
+
right: 0
|
|
58
|
+
|
|
59
|
+
.spinner-container
|
|
60
|
+
position: absolute
|
|
61
|
+
left: 0
|
|
62
|
+
right: 0
|
|
63
|
+
top: 0
|
|
64
|
+
bottom: 0
|
|
65
|
+
width: 60px
|
|
66
|
+
height: 60px
|
|
67
|
+
margin: auto
|
|
68
|
+
padding: 10px
|
|
69
|
+
background-color: rgba(0, 0, 0, 0.4)
|
|
70
|
+
border-radius: 25%
|
|
71
|
+
|
|
72
|
+
.spinner
|
|
73
|
+
border-width: 7px
|
|
74
|
+
border-style: solid
|
|
75
|
+
border-color: #ccc
|
|
76
|
+
border-bottom-color: #222
|
|
77
|
+
border-radius: 50%
|
|
78
|
+
height: 100%
|
|
79
|
+
width: 100%
|
|
80
|
+
box-sizing: border-box
|
|
81
|
+
-webkit-animation: rotation 2s linear infinite
|
|
82
|
+
/* Safari 4+ */
|
|
83
|
+
-moz-animation: rotation 2s linear infinite
|
|
84
|
+
/* Fx 5+ */
|
|
85
|
+
-o-animation: rotation 2s linear infinite
|
|
86
|
+
/* Opera 12+ */
|
|
87
|
+
animation: rotation 2s linear infinite
|
|
88
|
+
/* IE 10+, Fx 29+ */
|
|
89
|
+
|
|
90
|
+
@keyframes rotation
|
|
91
|
+
0%
|
|
92
|
+
-webkit-transform: rotate(0deg)
|
|
93
|
+
100%
|
|
94
|
+
-webkit-transform: rotate(359deg)
|
|
95
|
+
|
|
96
|
+
@-webkit-keyframes rotation
|
|
97
|
+
0%
|
|
98
|
+
-webkit-transform: rotate(0deg)
|
|
99
|
+
100%
|
|
100
|
+
-webkit-transform: rotate(359deg)
|
|
101
|
+
|
|
102
|
+
@-moz-keyframes rotation
|
|
103
|
+
0%
|
|
104
|
+
-webkit-transform: rotate(0deg)
|
|
105
|
+
100%
|
|
106
|
+
-webkit-transform: rotate(359deg)
|
|
107
|
+
|
|
108
|
+
@-o-keyframes rotation
|
|
109
|
+
0%
|
|
110
|
+
-webkit-transform: rotate(0deg)
|
|
111
|
+
100%
|
|
112
|
+
-webkit-transform: rotate(359deg)
|
|
113
|
+
|
|
114
|
+
.c3-file-viewer-pdf
|
|
115
|
+
height: 100%
|
|
116
|
+
width: 100%
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class C3SafeUrlPipe implements PipeTransform {
|
|
5
|
+
private sanitizer;
|
|
6
|
+
constructor(sanitizer: DomSanitizer);
|
|
7
|
+
transform(url: string | null): import("@angular/platform-browser").SafeResourceUrl;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<C3SafeUrlPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<C3SafeUrlPipe, "c3SafeUrl", true>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@use "./c3-root-variables" as *
|
|
2
|
+
@use "../c3-dropdown/styles/_c3-dropdown" as *
|
|
3
|
+
@use "../c3-file-viewer/styles/_c3-file-viewer" as *
|
|
4
|
+
|
|
5
|
+
=c3-core($theme)
|
|
6
|
+
@include c3-root-variables($theme)
|
|
7
|
+
@include c3-material-dropdown($theme)
|
|
8
|
+
@include c3-file-viewer($theme)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
@use "sass:map"
|
|
2
|
+
@use "sass:meta"
|
|
3
|
+
@use "./utils" as utils
|
|
4
|
+
@use "@angular/material" as mat
|
|
5
|
+
|
|
6
|
+
=c3-root-variables($theme)
|
|
7
|
+
:root
|
|
8
|
+
$primary-palette: map.get($theme, primary)
|
|
9
|
+
$accent-palette: map.get($theme, accent)
|
|
10
|
+
$warn-palette: map.get($theme, warn)
|
|
11
|
+
$background-palette: map.get($theme, background)
|
|
12
|
+
$foreground-palette: map.get($theme, foreground)
|
|
13
|
+
|
|
14
|
+
$is-dark-theme: map-get($theme, is-dark)
|
|
15
|
+
|
|
16
|
+
$primary-color: map.get($primary-palette, 500)
|
|
17
|
+
$primary-color-light: map.get($primary-palette, 300)
|
|
18
|
+
$primary-color-dark: map.get($primary-palette, 700)
|
|
19
|
+
|
|
20
|
+
$accent-color: map.get($accent-palette, 500)
|
|
21
|
+
$accent-color-light: map.get($accent-palette, 300)
|
|
22
|
+
$accent-color-dark: map.get($accent-palette, 700)
|
|
23
|
+
|
|
24
|
+
$warn-color: map.get($warn-palette, 500)
|
|
25
|
+
$warn-color-light: map.get($warn-palette, 300)
|
|
26
|
+
$warn-color-dark: map.get($warn-palette, 700)
|
|
27
|
+
|
|
28
|
+
$background-status-bar: map.get($background-palette, status-bar)
|
|
29
|
+
$background-app-bar: map.get($background-palette, app-bar)
|
|
30
|
+
$background-background: map.get($background-palette, background)
|
|
31
|
+
$background-hover: map.get($background-palette, hover)
|
|
32
|
+
$background-card: map.get($background-palette, card)
|
|
33
|
+
$background-dialog: map.get($background-palette, dialog)
|
|
34
|
+
$background-disabled-button: map.get($background-palette, disabled-button)
|
|
35
|
+
$background-raised-button: map.get($background-palette, raised-button)
|
|
36
|
+
$background-focused-button: map.get($background-palette, focused-button)
|
|
37
|
+
$background-selected-button: map.get($background-palette, selected-button)
|
|
38
|
+
$background-selected-disabled-button: map.get($background-palette, selected-disabled-button)
|
|
39
|
+
$background-disabled-button-toggle: map.get($background-palette, disabled-button-toggle)
|
|
40
|
+
$background-unselected-chip: map.get($background-palette, unselected-chip)
|
|
41
|
+
$background-disabled-list-option: map.get($background-palette, disabled-list-option)
|
|
42
|
+
$background-tooltip: map.get($background-palette, tooltip)
|
|
43
|
+
|
|
44
|
+
$foreground-base: map.get($foreground-palette, base)
|
|
45
|
+
$foreground-divider: map.get($foreground-palette, divider)
|
|
46
|
+
$foreground-dividers: map.get($foreground-palette, dividers)
|
|
47
|
+
$foreground-disabled: map.get($foreground-palette, disabled)
|
|
48
|
+
$foreground-disabled-button: map.get($foreground-palette, disabled-button)
|
|
49
|
+
$foreground-disabled-text: map.get($foreground-palette, disabled-text)
|
|
50
|
+
$foreground-elevation: map.get($foreground-palette, elevation)
|
|
51
|
+
$foreground-hint-text: map.get($foreground-palette, hint-text)
|
|
52
|
+
$foreground-secondary-text: map.get($foreground-palette, secondary-text)
|
|
53
|
+
$foreground-icon: map.get($foreground-palette, icon)
|
|
54
|
+
$foreground-icons: map.get($foreground-palette, icons)
|
|
55
|
+
$foreground-text: map.get($foreground-palette, text)
|
|
56
|
+
$foreground-slider-min: map.get($foreground-palette, slider-min)
|
|
57
|
+
$foreground-slider-off: map.get($foreground-palette, slider-off)
|
|
58
|
+
$foreground-slider-off-active: map.get($foreground-palette, slider-off-active)
|
|
59
|
+
|
|
60
|
+
--primary-color: #{$primary-color}
|
|
61
|
+
--primary-color-light: #{$primary-color-light}
|
|
62
|
+
--primary-color-dark: #{$primary-color-dark}
|
|
63
|
+
|
|
64
|
+
--accent-color: #{$accent-color}
|
|
65
|
+
--accent-color-light: #{$accent-color-light}
|
|
66
|
+
--accent-color-dark: #{$accent-color-dark}
|
|
67
|
+
|
|
68
|
+
--warn-color: #{$warn-color}
|
|
69
|
+
--warn-color-light: #{$warn-color-light}
|
|
70
|
+
--warn-color-dark: #{$warn-color-dark}
|
|
71
|
+
|
|
72
|
+
--background-status-bar: #{$background-status-bar}
|
|
73
|
+
--background-app-bar: #{$background-app-bar}
|
|
74
|
+
--background-background: #{$background-background}
|
|
75
|
+
--background-hover: #{$background-hover}
|
|
76
|
+
--background-card: #{$background-card}
|
|
77
|
+
--background-dialog: #{$background-dialog}
|
|
78
|
+
--background-disabled-button: #{$background-disabled-button}
|
|
79
|
+
--background-raised-button: #{$background-raised-button}
|
|
80
|
+
--background-focused-button: #{$background-focused-button}
|
|
81
|
+
--background-selected-button: #{$background-selected-button}
|
|
82
|
+
--background-selected-disabled-button: #{$background-selected-disabled-button}
|
|
83
|
+
--background-disabled-button-toggle: #{$background-disabled-button-toggle}
|
|
84
|
+
--background-unselected-chip: #{$background-unselected-chip}
|
|
85
|
+
--background-disabled-list-option: #{$background-disabled-list-option}
|
|
86
|
+
--background-tooltip: #{$background-tooltip}
|
|
87
|
+
|
|
88
|
+
@if $is-dark-theme
|
|
89
|
+
--background-card-table: #{utils.get-color-from-palette($accent-palette)}
|
|
90
|
+
@else
|
|
91
|
+
--background-card-table: #{utils.get-color-from-palette($accent-palette, 100)}
|
|
92
|
+
|
|
93
|
+
--foreground-base: #{$foreground-base}
|
|
94
|
+
--foreground-divider: #{$foreground-divider}
|
|
95
|
+
--foreground-dividers: #{$foreground-dividers}
|
|
96
|
+
--foreground-disabled: #{$foreground-disabled}
|
|
97
|
+
--foreground-disabled-button: #{$foreground-disabled-button}
|
|
98
|
+
--foreground-disabled-text: #{$foreground-disabled-text}
|
|
99
|
+
--foreground-elevation: #{$foreground-elevation}
|
|
100
|
+
--foreground-hint-text: #{$foreground-hint-text}
|
|
101
|
+
--foreground-secondary-text: #{$foreground-secondary-text}
|
|
102
|
+
--foreground-icon: #{$foreground-icon}
|
|
103
|
+
--foreground-icons: #{$foreground-icons}
|
|
104
|
+
--foreground-text: #{$foreground-text}
|
|
105
|
+
--foreground-slider-min: #{$foreground-slider-min}
|
|
106
|
+
--foreground-slider-off: #{$foreground-slider-off}
|
|
107
|
+
--foreground-slider-off-active: #{$foreground-slider-off-active}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use "sass:map"
|
|
2
|
+
@use "sass:meta"
|
|
3
|
+
@use "@angular/material" as mat
|
|
4
|
+
@function get-contrast-color-from-palette($palette, $hue)
|
|
5
|
+
@return map.get(map.get($palette, contrast), $hue)
|
|
6
|
+
|
|
7
|
+
@function get-color-from-palette($palette, $hue: default, $opacity: null)
|
|
8
|
+
// If hueKey is a number between zero and one, then it actually contains an
|
|
9
|
+
// opacity value, so recall this function with the default hue and that given opacity.
|
|
10
|
+
@if meta.type-of($hue) ==number and $hue>=0 and $hue <=1
|
|
11
|
+
@return get-color-from-palette($palette, default, $hue)
|
|
12
|
+
|
|
13
|
+
$color: map.get($palette, $hue)
|
|
14
|
+
|
|
15
|
+
@if (meta.type-of($color) !=color)
|
|
16
|
+
// If the $color resolved to something different from a color (e.g. a CSS variable),
|
|
17
|
+
// we can't apply the opacity anyway so we return the value as is, otherwise Sass can
|
|
18
|
+
// throw an error or output something invalid.
|
|
19
|
+
@return $color
|
|
20
|
+
|
|
21
|
+
@return rgba($color, if($opacity==null, opacity($color), $opacity))
|
|
22
|
+
|
|
23
|
+
@function get-color-config($theme, $default: null)
|
|
24
|
+
@if map.has-key($theme, color)
|
|
25
|
+
@return map.get($theme, color)
|
|
26
|
+
|
|
27
|
+
@return $default
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c3-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "C3 Components Library",
|
|
5
|
+
"author": "Kroenen62",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/Kroenen62/c3-components",
|
|
4
8
|
"peerDependencies": {
|
|
5
9
|
"@angular/common": "^15.2.0",
|
|
6
10
|
"@angular/core": "^15.2.0",
|
|
@@ -11,9 +15,6 @@
|
|
|
11
15
|
"tslib": "^2.3.0"
|
|
12
16
|
},
|
|
13
17
|
"sideEffects": false,
|
|
14
|
-
"files": [
|
|
15
|
-
"./_index.scss"
|
|
16
|
-
],
|
|
17
18
|
"exports": {
|
|
18
19
|
".": {
|
|
19
20
|
"sass": "./_index.scss",
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * from './lib/c3-file-viewer/models/http.client';
|
|
2
|
+
/**
|
|
3
|
+
* Dropdown
|
|
4
|
+
*/
|
|
5
|
+
export * from './lib/c3-dropdown/components/c3-dropdown.component';
|
|
6
|
+
export * from './lib/c3-dropdown/directives/c3-dropdown.trigger';
|
|
7
|
+
export * from './lib/c3-dropdown/c3-dropdown.module';
|
|
8
|
+
/**
|
|
9
|
+
* Dialog
|
|
10
|
+
*/
|
|
11
|
+
export * from './lib/c3-dialog/components/c3-dialog-confirm.component';
|
|
12
|
+
export * from './lib/c3-dialog/components/c3-dialog-prompt.component';
|
|
13
|
+
export * from './lib/c3-dialog/components/c3-dialog-embed-child.component';
|
|
14
|
+
export * from './lib/c3-dialog/services/c3-dialog.service';
|
|
15
|
+
export * from './lib/c3-dialog/c3-dialog.module';
|
|
16
|
+
/**
|
|
17
|
+
* File Viewer
|
|
18
|
+
*/
|
|
19
|
+
export * from './lib/c3-file-viewer/components/public/c3-file-viewer/c3-file-viewer.component';
|
|
20
|
+
export * from './lib/c3-file-viewer/components/public/c3-file-viewer-dialog/c3-file-viewer-dialog.component';
|
|
21
|
+
export * from './lib/c3-file-viewer/directives/full-screen.directive';
|
|
22
|
+
export * from './lib/c3-file-viewer/models/custom-file-event.model';
|
|
23
|
+
export * from './lib/c3-file-viewer/models/file-viewer-config.model';
|
|
24
|
+
export * from './lib/c3-file-viewer/models/file-viewer';
|
|
25
|
+
export * from './lib/c3-file-viewer/models/file-metadata';
|
|
26
|
+
export * from './lib/c3-file-viewer/c3-file-viewer.module';
|
|
27
|
+
/**
|
|
28
|
+
* Safe Url
|
|
29
|
+
*/
|
|
30
|
+
export * from './lib/c3-safe-url/pipes/c3-safe-url.pipe';
|