valtech-components 2.0.7 → 2.0.9
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/esm2022/lib/components/atoms/button/button.component.mjs +41 -0
- package/esm2022/lib/components/atoms/button/factory.mjs +217 -0
- package/esm2022/lib/components/atoms/button/types.mjs +2 -0
- package/esm2022/lib/components/types.mjs +29 -0
- package/esm2022/lib/services/download.service.mjs +63 -0
- package/esm2022/lib/services/lang-provider/components/lang-settings.mjs +13 -0
- package/esm2022/lib/services/lang-provider/components/theme-settings.mjs +15 -0
- package/esm2022/lib/services/lang-provider/content.mjs +8 -0
- package/esm2022/lib/services/lang-provider/lang-provider.service.mjs +39 -0
- package/esm2022/lib/services/lang-provider/types.mjs +14 -0
- package/esm2022/lib/services/local-storage.service.mjs +16 -0
- package/esm2022/lib/services/theme.service.mjs +97 -0
- package/esm2022/lib/services/types.mjs +3 -0
- package/esm2022/lib/shared/constants/storage.mjs +3 -0
- package/esm2022/lib/shared/utils/dom.mjs +17 -0
- package/esm2022/public-api.mjs +18 -0
- package/esm2022/valtech-components.mjs +5 -0
- package/fesm2022/valtech-components.mjs +537 -0
- package/fesm2022/valtech-components.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/atoms/button/button.component.d.ts +20 -0
- package/lib/components/atoms/button/factory.d.ts +71 -0
- package/lib/components/atoms/button/types.d.ts +22 -0
- package/lib/components/types.d.ts +78 -0
- package/lib/services/download.service.d.ts +8 -0
- package/lib/services/lang-provider/components/lang-settings.d.ts +3 -0
- package/lib/services/lang-provider/components/theme-settings.d.ts +3 -0
- package/lib/services/lang-provider/content.d.ts +6 -0
- package/lib/services/lang-provider/lang-provider.service.d.ts +17 -0
- package/lib/services/lang-provider/types.d.ts +15 -0
- package/lib/services/local-storage.service.d.ts +6 -0
- package/lib/services/theme.service.d.ts +27 -0
- package/lib/services/types.d.ts +6 -0
- package/lib/shared/constants/storage.d.ts +2 -0
- package/lib/shared/utils/dom.d.ts +3 -0
- package/package.json +14 -4
- package/public-api.d.ts +11 -0
- package/src/lib/components/styles/functions.scss +20 -0
- package/src/lib/components/styles/media-queries.scss +66 -0
- package/src/lib/components/styles/mixins.scss +66 -0
- package/src/lib/components/styles/overrides.scss +158 -0
- package/src/lib/components/styles/typography.scss +189 -0
- package/src/lib/components/styles/variables.scss +82 -0
- package/ng-package.json +0 -11
- package/src/lib/components/hello-world/hello-world.component.ts +0 -17
- package/src/public-api.ts +0 -5
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ButtonMetadata } from './types';
|
|
3
|
+
import { DownloadService } from '../../../services/download.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ButtonComponent {
|
|
6
|
+
private download;
|
|
7
|
+
states: {
|
|
8
|
+
ENABLED: "ENABLED";
|
|
9
|
+
DISABLED: "DISABLED";
|
|
10
|
+
WORKING: "WORKING";
|
|
11
|
+
ERROR: "ERROR";
|
|
12
|
+
};
|
|
13
|
+
props: ButtonMetadata;
|
|
14
|
+
onClick: EventEmitter<string>;
|
|
15
|
+
constructor(download: DownloadService);
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
clickHandler(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "val-button", never, { "props": { "alias": "props"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ButtonMetadata, IconMetada } from './types';
|
|
2
|
+
export declare const Icon: (name: string, slot: 'start' | 'end') => IconMetada;
|
|
3
|
+
export declare const BaseDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
4
|
+
export declare const ClearDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
5
|
+
export declare const ClearDefaultRound: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
6
|
+
export declare const SolidDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
7
|
+
export declare const SolidDefaultRound: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
8
|
+
export declare const OutlineDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
9
|
+
export declare const OutlineDefaultRound: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
10
|
+
export declare const ClearDefaultFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
11
|
+
export declare const ClearDefaultRoundFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
12
|
+
export declare const ClearDefaultBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
13
|
+
export declare const ClearDefaultRoundBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
14
|
+
export declare const SolidDefaultFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
15
|
+
export declare const SolidDefaultRoundFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
16
|
+
export declare const SolidDefaultBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
17
|
+
export declare const SolidDefaultRoundBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
18
|
+
export declare const OutlineDefaultFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
19
|
+
export declare const OutlineDefaultRoundFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
20
|
+
export declare const OutlineDefaultBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
21
|
+
export declare const OutlineDefaultRoundBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
|
|
22
|
+
export declare const SolidDefaultButton: (text: string) => ButtonMetadata;
|
|
23
|
+
export declare const SolidSmallButton: (text: string) => ButtonMetadata;
|
|
24
|
+
export declare const SolidLargeButton: (text: string) => ButtonMetadata;
|
|
25
|
+
export declare const SolidDefaultRoundButton: (text: string) => ButtonMetadata;
|
|
26
|
+
export declare const SolidSmallRoundButton: (text: string) => ButtonMetadata;
|
|
27
|
+
export declare const SolidLargeRoundButton: (text: string) => ButtonMetadata;
|
|
28
|
+
export declare const SolidFullButton: (text: string) => ButtonMetadata;
|
|
29
|
+
export declare const SolidBlockButton: (text: string) => ButtonMetadata;
|
|
30
|
+
/** PRIMARY */
|
|
31
|
+
export declare const PrimarySolidDefaultRoundButton: (text: string) => ButtonMetadata;
|
|
32
|
+
export declare const PrimarySolidDefaultRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
33
|
+
export declare const PrimarySolidDefaultRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
34
|
+
export declare const PrimarySolidDefaultRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
35
|
+
export declare const PrimarySolidSmallRoundButton: (text: string) => ButtonMetadata;
|
|
36
|
+
export declare const PrimarySolidSmallRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
37
|
+
export declare const PrimarySolidSmallRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
38
|
+
export declare const PrimarySolidSmallRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
39
|
+
export declare const PrimarySolidLargeRoundButton: (text: string) => ButtonMetadata;
|
|
40
|
+
export declare const PrimarySolidLargeRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
41
|
+
export declare const PrimarySolidLargeRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
42
|
+
export declare const PrimarySolidLargeRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
43
|
+
export declare const PrimarySolidBlockButton: (text: string) => ButtonMetadata;
|
|
44
|
+
export declare const PrimarySolidBlockIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
45
|
+
export declare const PrimarySolidBlockHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
46
|
+
export declare const PrimarySolidBlockIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
47
|
+
export declare const PrimarySolidFullButton: (text: string) => ButtonMetadata;
|
|
48
|
+
export declare const PrimarySolidFullIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
49
|
+
export declare const PrimarySolidFullHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
50
|
+
export declare const PrimarySolidFullIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
51
|
+
/** SECONDARY */
|
|
52
|
+
export declare const SecondarySolidDefaultRoundButton: (text: string) => ButtonMetadata;
|
|
53
|
+
export declare const SecondarySolidDefaultRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
54
|
+
export declare const SecondarySolidDefaultRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
55
|
+
export declare const SecondarySolidDefaultRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
56
|
+
export declare const SecondarySolidSmallRoundButton: (text: string) => ButtonMetadata;
|
|
57
|
+
export declare const SecondarySolidSmallRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
58
|
+
export declare const SecondarySolidSmallRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
59
|
+
export declare const SecondarySolidSmallRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
60
|
+
export declare const SecondarySolidLargeRoundButton: (text: string) => ButtonMetadata;
|
|
61
|
+
export declare const SecondarySolidLargeRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
62
|
+
export declare const SecondarySolidLargeRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
63
|
+
export declare const SecondarySolidLargeRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
64
|
+
export declare const SecondarySolidFullButton: (text: string) => ButtonMetadata;
|
|
65
|
+
export declare const SecondarySolidFullIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
66
|
+
export declare const SecondarySolidFullHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
67
|
+
export declare const SecondarySolidFullIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
68
|
+
export declare const SecondarySolidBlockButton: (text: string) => ButtonMetadata;
|
|
69
|
+
export declare const SecondarySolidBlockIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
|
|
70
|
+
export declare const SecondarySolidBlockHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
71
|
+
export declare const SecondarySolidBlockIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Color } from '@ionic/core';
|
|
2
|
+
import { ActionType, ComponentState } from '../../types';
|
|
3
|
+
export interface IconMetada {
|
|
4
|
+
name: string;
|
|
5
|
+
slot: 'start' | 'end';
|
|
6
|
+
}
|
|
7
|
+
export interface ButtonMetadata {
|
|
8
|
+
actionType?: ActionType;
|
|
9
|
+
expand?: 'full' | 'block';
|
|
10
|
+
href?: string;
|
|
11
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
12
|
+
download?: string;
|
|
13
|
+
color: Color;
|
|
14
|
+
state: ComponentState;
|
|
15
|
+
text: string;
|
|
16
|
+
icon?: IconMetada;
|
|
17
|
+
shape?: 'round';
|
|
18
|
+
size?: 'small' | 'default' | 'large';
|
|
19
|
+
fill?: 'clear' | 'outline' | 'solid' | 'default';
|
|
20
|
+
type: 'button' | 'submit' | 'reset';
|
|
21
|
+
token?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ValidatorFn } from "@angular/forms";
|
|
2
|
+
import { ButtonMetadata } from "./atoms/button/types";
|
|
3
|
+
export type ComponentState = 'ENABLED' | 'DISABLED' | 'WORKING' | 'ERROR';
|
|
4
|
+
export declare const ComponentStates: {
|
|
5
|
+
ENABLED: "ENABLED";
|
|
6
|
+
DISABLED: "DISABLED";
|
|
7
|
+
WORKING: "WORKING";
|
|
8
|
+
ERROR: "ERROR";
|
|
9
|
+
};
|
|
10
|
+
export declare enum ActionType {
|
|
11
|
+
BROWSER_NEW_TAB = 0,
|
|
12
|
+
BROWSER_DOWNLOAD = 1,
|
|
13
|
+
NATIVE_DOWNLOAD = 2,
|
|
14
|
+
APP_NAVIGATION = 3,
|
|
15
|
+
BROWSER_NAVIGATION = 4
|
|
16
|
+
}
|
|
17
|
+
export type Action = {
|
|
18
|
+
description: string;
|
|
19
|
+
type: ActionType;
|
|
20
|
+
source: string;
|
|
21
|
+
};
|
|
22
|
+
export declare enum InputType {
|
|
23
|
+
TEXT = 0,
|
|
24
|
+
EMAIL = 1,
|
|
25
|
+
PASSWORD = 2,
|
|
26
|
+
COMMENT = 3,
|
|
27
|
+
NUMBER = 4,
|
|
28
|
+
PIN_CODE = 5,
|
|
29
|
+
DATE = 6,
|
|
30
|
+
HOUR = 7,
|
|
31
|
+
CHECK = 8,
|
|
32
|
+
RADIO = 9,
|
|
33
|
+
SELECT = 10,
|
|
34
|
+
FILE = 11
|
|
35
|
+
}
|
|
36
|
+
export type InputOption = {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
selected?: boolean;
|
|
40
|
+
order: number;
|
|
41
|
+
};
|
|
42
|
+
export type InputMetadata = {
|
|
43
|
+
token: string;
|
|
44
|
+
label: string;
|
|
45
|
+
name: string;
|
|
46
|
+
hint: string;
|
|
47
|
+
placeholder: string;
|
|
48
|
+
type: InputType;
|
|
49
|
+
order: number;
|
|
50
|
+
validators: ValidatorFn[];
|
|
51
|
+
options?: InputOption[];
|
|
52
|
+
range?: {
|
|
53
|
+
min: number;
|
|
54
|
+
max: number;
|
|
55
|
+
};
|
|
56
|
+
errors: {
|
|
57
|
+
[key: string]: string;
|
|
58
|
+
};
|
|
59
|
+
value?: string;
|
|
60
|
+
};
|
|
61
|
+
export type FormSection = {
|
|
62
|
+
name: string;
|
|
63
|
+
order: number;
|
|
64
|
+
fields: InputMetadata[];
|
|
65
|
+
};
|
|
66
|
+
export type FormSubmit = {
|
|
67
|
+
fields: {
|
|
68
|
+
key: string;
|
|
69
|
+
value: string;
|
|
70
|
+
}[];
|
|
71
|
+
token?: string;
|
|
72
|
+
};
|
|
73
|
+
export type FormMetadata = {
|
|
74
|
+
name: string;
|
|
75
|
+
sections: FormSection[];
|
|
76
|
+
actions: ButtonMetadata;
|
|
77
|
+
state: ComponentState;
|
|
78
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class DownloadService {
|
|
3
|
+
getFileNameFromUrl(url: string): string;
|
|
4
|
+
openNewTab(url: string): void;
|
|
5
|
+
downloadLinkFromBrowser(url: string): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DownloadService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DownloadService>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { Provider } from './content';
|
|
3
|
+
import { LangOption, LanguageText } from './types';
|
|
4
|
+
import { ValtechConfig } from '../types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class LangService {
|
|
7
|
+
content: Provider;
|
|
8
|
+
default: LangOption;
|
|
9
|
+
selectedLang: BehaviorSubject<LangOption>;
|
|
10
|
+
config: ValtechConfig;
|
|
11
|
+
constructor(config: ValtechConfig);
|
|
12
|
+
Text(className: string): LanguageText;
|
|
13
|
+
get Lang(): LangOption;
|
|
14
|
+
set Lang(lang: LangOption);
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LangService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LangService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type LanguageText = {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
};
|
|
4
|
+
export type LanguagesContent = {
|
|
5
|
+
[key: string]: LanguageText;
|
|
6
|
+
};
|
|
7
|
+
export declare class TextContent {
|
|
8
|
+
text: LanguagesContent;
|
|
9
|
+
constructor(text: LanguagesContent);
|
|
10
|
+
get Content(): LanguagesContent;
|
|
11
|
+
}
|
|
12
|
+
export declare enum LangOption {
|
|
13
|
+
ES = "es",
|
|
14
|
+
EN = "en"
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare enum ThemeOption {
|
|
4
|
+
LIGHT = "light",
|
|
5
|
+
DARK = "dark",
|
|
6
|
+
AUTO = "auto"
|
|
7
|
+
}
|
|
8
|
+
export declare class ThemeService {
|
|
9
|
+
lightToggle: boolean;
|
|
10
|
+
darkToggle: boolean;
|
|
11
|
+
autoToggle: boolean;
|
|
12
|
+
currentOption: ThemeOption;
|
|
13
|
+
themeOptions: typeof ThemeOption;
|
|
14
|
+
prefersDark: boolean;
|
|
15
|
+
default: ThemeOption;
|
|
16
|
+
theme: BehaviorSubject<ThemeOption>;
|
|
17
|
+
constructor();
|
|
18
|
+
private handleAutoConfiguration;
|
|
19
|
+
private handleDarkPreference;
|
|
20
|
+
private handleLightPreference;
|
|
21
|
+
get Theme(): ThemeOption;
|
|
22
|
+
set Theme(theme: ThemeOption);
|
|
23
|
+
toggleTheme(name: string, shouldAdd: boolean): void;
|
|
24
|
+
toggleUserPreference(option: ThemeOption): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valtech-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^18.0.0",
|
|
6
6
|
"@angular/core": "^18.0.0",
|
|
@@ -10,7 +10,17 @@
|
|
|
10
10
|
"tslib": "^2.3.0"
|
|
11
11
|
},
|
|
12
12
|
"sideEffects": false,
|
|
13
|
-
"
|
|
14
|
-
|
|
13
|
+
"module": "fesm2022/valtech-components.mjs",
|
|
14
|
+
"typings": "index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./index.d.ts",
|
|
21
|
+
"esm2022": "./esm2022/valtech-components.mjs",
|
|
22
|
+
"esm": "./esm2022/valtech-components.mjs",
|
|
23
|
+
"default": "./fesm2022/valtech-components.mjs"
|
|
24
|
+
}
|
|
15
25
|
}
|
|
16
|
-
}
|
|
26
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './lib/components/atoms/button/button.component';
|
|
2
|
+
export * from './lib/components/atoms/button/types';
|
|
3
|
+
export * from './lib/components/atoms/button/factory';
|
|
4
|
+
export * from './lib/services/lang-provider/lang-provider.service';
|
|
5
|
+
export * from './lib/services/lang-provider/types';
|
|
6
|
+
export * from './lib/services/local-storage.service';
|
|
7
|
+
export * from './lib/services/theme.service';
|
|
8
|
+
export * from './lib/services/download.service';
|
|
9
|
+
export * from './lib/services/types';
|
|
10
|
+
export * from './lib/shared/utils/dom';
|
|
11
|
+
export * from './lib/components/types';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import './variables.scss';
|
|
2
|
+
|
|
3
|
+
$base-size: $size-base;
|
|
4
|
+
|
|
5
|
+
@function pxToRem($target, $context: $base-size) {
|
|
6
|
+
@return calc($target / $context) * 1rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@function pxToRemGroup($top, $right, $bottom, $left, $context: $base-size) {
|
|
10
|
+
$top: calc($top / $context) * 1rem;
|
|
11
|
+
$right: calc($right / $context) * 1rem;
|
|
12
|
+
$bottom: calc($bottom / $context) * 1rem;
|
|
13
|
+
$left: calc($left / $context) * 1rem;
|
|
14
|
+
|
|
15
|
+
@return ($top $right $bottom $left);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@function addColorOpacity($hex, $opacity: 1) {
|
|
19
|
+
@return rgba($hex, $opacity);
|
|
20
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@mixin media-xsmall {
|
|
2
|
+
@media (min-width: 425px) {
|
|
3
|
+
@content;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin media-small {
|
|
8
|
+
@media (min-width: 576px) {
|
|
9
|
+
@content;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin media-medium {
|
|
14
|
+
@media (min-width: 768px) {
|
|
15
|
+
@content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin media-large {
|
|
20
|
+
@media (min-width: 992px) {
|
|
21
|
+
@content;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin media-xlarge {
|
|
26
|
+
@media (min-width: 1200px) {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Max */
|
|
32
|
+
@mixin max-media-xsmall {
|
|
33
|
+
@media (max-width: 425px) {
|
|
34
|
+
@content;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@mixin max-media-small {
|
|
39
|
+
@media (max-width: 576px) {
|
|
40
|
+
@content;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@mixin max-media-medium {
|
|
45
|
+
@media (max-width: 768px) {
|
|
46
|
+
@content;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin max-media-large {
|
|
51
|
+
@media (max-width: 992px) {
|
|
52
|
+
@content;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin max-media-xlarge {
|
|
57
|
+
@media (max-width: 1200px) {
|
|
58
|
+
@content;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin dark {
|
|
63
|
+
@media (prefers-color-scheme: dark) {
|
|
64
|
+
@content;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@import './media-queries.scss';
|
|
2
|
+
@import './variables.scss';
|
|
3
|
+
@import './functions.scss';
|
|
4
|
+
@import './typography.scss';
|
|
5
|
+
|
|
6
|
+
@mixin box-shadow-small {
|
|
7
|
+
box-shadow: 0 pxToRem(4) pxToRem(12) addColorOpacity($color-default-shadow, 0.07);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin box-shadow-small-top {
|
|
11
|
+
box-shadow: 0 pxToRem(-4) pxToRem(12) addColorOpacity($color-default-shadow, 0.07);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin box-shadow-medium {
|
|
15
|
+
box-shadow: pxToRem(3) pxToRem(10) pxToRem(8) addColorOpacity($color-default-shadow, 0.1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin box-shadow-medium-bottom {
|
|
19
|
+
box-shadow: pxToRem(-3) pxToRem(10) pxToRem(8) addColorOpacity($color-default-shadow, 0.1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin box-shadow-large {
|
|
23
|
+
box-shadow: 0 pxToRem(10) pxToRem(16) addColorOpacity($color-default-shadow, 0.08);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin box-shadow-large-top {
|
|
27
|
+
box-shadow: 0 pxToRem(-10) pxToRem(16) addColorOpacity($color-default-shadow, 0.07);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin transform-translateY($value) {
|
|
31
|
+
transform: translateY($value);
|
|
32
|
+
-webkit-transform: translateY($value);
|
|
33
|
+
-moz-transform: translateY($value);
|
|
34
|
+
-ms-transform: translateY($value);
|
|
35
|
+
-o-transform: translateY($value);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@mixin transform-translate-y-3d($value) {
|
|
39
|
+
-webkit-transform: translate3d(0, $value, 0);
|
|
40
|
+
-moz-transform: translate3d(0, $value, 0);
|
|
41
|
+
-o-transform: translate3d(0, $value, 0);
|
|
42
|
+
-ms-transform: translate3d(0, $value, 0);
|
|
43
|
+
transform: translate3d(0, $value, 0);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin fade-in-translateY {
|
|
47
|
+
@keyframes fadeInTranslateY {
|
|
48
|
+
@content;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@-moz-keyframes fadeInTranslateY {
|
|
52
|
+
@content;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@-webkit-keyframes fadeInTranslateY {
|
|
56
|
+
@content;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@-o-keyframes fadeInTranslateY {
|
|
60
|
+
@content;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@-ms-keyframes fadeInTranslateY {
|
|
64
|
+
@content;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
@import './variables.scss';
|
|
2
|
+
@import './functions.scss';
|
|
3
|
+
@import './mixins.scss';
|
|
4
|
+
|
|
5
|
+
/** core **/
|
|
6
|
+
|
|
7
|
+
h1,
|
|
8
|
+
h2,
|
|
9
|
+
h3,
|
|
10
|
+
h4,
|
|
11
|
+
h5,
|
|
12
|
+
h6,
|
|
13
|
+
p {
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
form {
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** ionic components **/
|
|
23
|
+
|
|
24
|
+
ion-grid,
|
|
25
|
+
ion-col {
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
ion-button {
|
|
30
|
+
font-weight: $font-weight-semi-bold;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
ion-card {
|
|
34
|
+
border-radius: pxToRem(8);
|
|
35
|
+
margin: pxToRem(16) auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
input {
|
|
39
|
+
&.native-input {
|
|
40
|
+
font-family: var(--ion-default-font), Arial, sans-serif;
|
|
41
|
+
margin-top: pxToRem(6) !important;
|
|
42
|
+
padding: pxToRem(4) pxToRem(8) !important;
|
|
43
|
+
|
|
44
|
+
border: pxToRem(1) solid var(--ion-color-medium) !important;
|
|
45
|
+
border-radius: pxToRem($border-radius-small) !important;
|
|
46
|
+
|
|
47
|
+
&:focus {
|
|
48
|
+
border: pxToRem(2) solid var(--ion-color-primary) !important;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
ion-searchbar div input {
|
|
54
|
+
padding-inline-start: pxToRem(28);
|
|
55
|
+
margin-top: pxToRem(6) !important;
|
|
56
|
+
|
|
57
|
+
border: pxToRem(1) solid var(--ion-color-medium) !important;
|
|
58
|
+
border-radius: pxToRem($border-radius-small) !important;
|
|
59
|
+
|
|
60
|
+
&:focus {
|
|
61
|
+
border: pxToRem(2) solid var(--ion-color-primary) !important;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
ion-searchbar div ion-icon {
|
|
66
|
+
margin-top: pxToRem(2);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
ion-datetime,
|
|
70
|
+
ion-select {
|
|
71
|
+
margin-top: pxToRem(8);
|
|
72
|
+
padding-left: pxToRem(10) !important;
|
|
73
|
+
border: pxToRem(1) solid var(--ion-color-medium) !important;
|
|
74
|
+
border-radius: pxToRem($border-radius-small) !important;
|
|
75
|
+
|
|
76
|
+
&:focus {
|
|
77
|
+
border: pxToRem(2) solid var(--ion-color-primary) !important;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
ion-label {
|
|
82
|
+
text-align: start;
|
|
83
|
+
font-weight: $font-weight-bold;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
ion-toolbar {
|
|
87
|
+
--background: transparent;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
ion-input {
|
|
91
|
+
margin-top: 0px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
ion-select {
|
|
95
|
+
padding-right: pxToRem(10) !important;
|
|
96
|
+
|
|
97
|
+
&.select-expanded {
|
|
98
|
+
border: pxToRem(2) solid var(--ion-color-primary) !important;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
ion-alert {
|
|
103
|
+
--min-width: 80% !important;
|
|
104
|
+
|
|
105
|
+
@include media-medium {
|
|
106
|
+
--min-width: 400px !important;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.alert-radio-label {
|
|
110
|
+
font-weight: $font-weight-bold;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
::-webkit-scrollbar {
|
|
114
|
+
-webkit-appearance: none;
|
|
115
|
+
width: 7px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
::-webkit-scrollbar-thumb {
|
|
119
|
+
border-radius: 4px;
|
|
120
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
121
|
+
box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
|
|
122
|
+
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
ion-label {
|
|
127
|
+
text-align: start;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
ion-note {
|
|
131
|
+
text-align: end !important;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
ion-toolbar {
|
|
135
|
+
--background: transparent;
|
|
136
|
+
padding: pxToRem(4) pxToRem(8);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
ion-back-button {
|
|
140
|
+
font-family: var(--ion-default-font), Arial, sans-serif;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
ion-modal .date-picker-custom {
|
|
144
|
+
max-width: 340px;
|
|
145
|
+
max-height: 390px;
|
|
146
|
+
|
|
147
|
+
.ion-page {
|
|
148
|
+
justify-content: flex-start !important;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.img-black {
|
|
153
|
+
filter: invert(0);
|
|
154
|
+
|
|
155
|
+
@media (prefers-color-scheme: dark) {
|
|
156
|
+
filter: invert(1);
|
|
157
|
+
}
|
|
158
|
+
}
|