valtech-components 1.3.0 → 1.6.0

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.
Files changed (65) hide show
  1. package/.nvmrc +1 -0
  2. package/.releaserc +12 -0
  3. package/ng-package.json +11 -0
  4. package/package.json +10 -13
  5. package/src/lib/components/atoms/avatar/avatar.component.html +3 -0
  6. package/src/lib/components/atoms/avatar/avatar.component.scss +20 -0
  7. package/src/lib/components/atoms/avatar/avatar.component.ts +28 -0
  8. package/src/lib/components/atoms/button/button.component.html +17 -0
  9. package/src/lib/components/atoms/button/button.component.scss +5 -0
  10. package/src/lib/components/atoms/button/button.component.ts +26 -0
  11. package/src/lib/components/atoms/button/factory.ts +378 -0
  12. package/src/lib/components/atoms/button/types.ts +22 -0
  13. package/src/lib/components/atoms/display/display.component.html +5 -0
  14. package/src/lib/components/atoms/display/display.component.scss +17 -0
  15. package/src/lib/components/atoms/display/display.component.ts +20 -0
  16. package/src/lib/components/atoms/divider/divider.component.html +1 -0
  17. package/src/lib/components/atoms/divider/divider.component.scss +54 -0
  18. package/src/lib/components/atoms/divider/divider.component.ts +19 -0
  19. package/src/lib/components/atoms/text/text.component.html +5 -0
  20. package/src/lib/components/atoms/text/text.component.scss +33 -0
  21. package/src/lib/components/atoms/text/text.component.ts +22 -0
  22. package/src/lib/components/atoms/title/title.component.html +5 -0
  23. package/src/lib/components/atoms/title/title.component.scss +13 -0
  24. package/src/lib/components/atoms/title/title.component.ts +20 -0
  25. package/src/lib/components/molecules/content-loader/content-loader.component.html +6 -0
  26. package/src/lib/components/molecules/content-loader/content-loader.component.scss +42 -0
  27. package/src/lib/components/molecules/content-loader/content-loader.component.ts +22 -0
  28. package/src/lib/components/molecules/link/link.component.html +6 -0
  29. package/src/lib/components/molecules/link/link.component.scss +5 -0
  30. package/src/lib/components/molecules/link/link.component.ts +27 -0
  31. package/src/lib/components/types.ts +5 -0
  32. package/src/lib/valtech-components.module.ts +37 -0
  33. package/{public-api.d.ts → src/public-api.ts} +8 -0
  34. package/tsconfig.lib.json +14 -0
  35. package/tsconfig.lib.prod.json +10 -0
  36. package/tsconfig.spec.json +14 -0
  37. package/esm2022/lib/components/atoms/avatar/avatar.component.mjs +0 -31
  38. package/esm2022/lib/components/atoms/button/button.component.mjs +0 -26
  39. package/esm2022/lib/components/atoms/button/factory.mjs +0 -217
  40. package/esm2022/lib/components/atoms/button/types.mjs +0 -2
  41. package/esm2022/lib/components/atoms/display/display.component.mjs +0 -20
  42. package/esm2022/lib/components/atoms/divider/divider.component.mjs +0 -20
  43. package/esm2022/lib/components/atoms/text/text.component.mjs +0 -24
  44. package/esm2022/lib/components/atoms/title/title.component.mjs +0 -20
  45. package/esm2022/lib/components/molecules/content-loader/content-loader.component.mjs +0 -27
  46. package/esm2022/lib/components/molecules/link/link.component.mjs +0 -27
  47. package/esm2022/lib/components/types.mjs +0 -5
  48. package/esm2022/lib/valtech-components.module.mjs +0 -59
  49. package/esm2022/public-api.mjs +0 -16
  50. package/esm2022/valtech-components.mjs +0 -5
  51. package/fesm2022/valtech-components.mjs +0 -454
  52. package/fesm2022/valtech-components.mjs.map +0 -1
  53. package/index.d.ts +0 -5
  54. package/lib/components/atoms/avatar/avatar.component.d.ts +0 -14
  55. package/lib/components/atoms/button/button.component.d.ts +0 -17
  56. package/lib/components/atoms/button/factory.d.ts +0 -71
  57. package/lib/components/atoms/button/types.d.ts +0 -20
  58. package/lib/components/atoms/display/display.component.d.ts +0 -12
  59. package/lib/components/atoms/divider/divider.component.d.ts +0 -11
  60. package/lib/components/atoms/text/text.component.d.ts +0 -13
  61. package/lib/components/atoms/title/title.component.d.ts +0 -12
  62. package/lib/components/molecules/content-loader/content-loader.component.d.ts +0 -13
  63. package/lib/components/molecules/link/link.component.d.ts +0 -14
  64. package/lib/components/types.d.ts +0 -6
  65. package/lib/valtech-components.module.d.ts +0 -17
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v20.11.1
package/.releaserc ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "branches": [
3
+ "main"
4
+ ],
5
+ "plugins": [
6
+ "@semantic-release/commit-analyzer",
7
+ "@semantic-release/release-notes-generator",
8
+ "@semantic-release/npm"
9
+ ],
10
+ "pkgRoot": ".",
11
+ "npmPublish": false
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/valtech-components",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ },
7
+ "assets": [
8
+ "src/lib/components/styles",
9
+ "./styles"
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "1.3.0",
3
+ "version": "1.6.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/solucionesvaltech/valtech-workspace/"
@@ -14,21 +14,18 @@
14
14
  "@ionic/angular": "^7.8.0"
15
15
  },
16
16
  "license": "MIT",
17
+ "scripts": {
18
+ "ng": "ng",
19
+ "build": "ng build",
20
+ "build-prod": "ng build --configuration production",
21
+ "release": "npx semantic-release --no-ci && npm run build-prod && npm publish && git add package.json package-lock.json && git commit --amend --no-edit --noverify && git push"
22
+ },
17
23
  "dependencies": {
18
24
  "tslib": "^2.3.0"
19
25
  },
20
26
  "sideEffects": false,
21
- "module": "fesm2022/valtech-components.mjs",
22
- "typings": "index.d.ts",
23
- "exports": {
24
- "./package.json": {
25
- "default": "./package.json"
26
- },
27
- ".": {
28
- "types": "./index.d.ts",
29
- "esm2022": "./esm2022/valtech-components.mjs",
30
- "esm": "./esm2022/valtech-components.mjs",
31
- "default": "./fesm2022/valtech-components.mjs"
32
- }
27
+ "devDependencies": {
28
+ "@ionic/angular": "^7.8.0",
29
+ "@semantic-release/npm": "^12.0.0"
33
30
  }
34
31
  }
@@ -0,0 +1,3 @@
1
+ <ion-avatar [class]="size" [class.box]="box" (click)="onClickHandler()">
2
+ <img alt="profile image" [src]="image || default" />
3
+ </ion-avatar>
@@ -0,0 +1,20 @@
1
+ @import '../../styles/mixins.scss';
2
+
3
+ .box {
4
+ --border-radius: pxToRem(4);
5
+ }
6
+
7
+ .small {
8
+ width: pxToRem(24);
9
+ height: pxToRem(24);
10
+ }
11
+
12
+ .medium {
13
+ width: pxToRem(38);
14
+ height: pxToRem(38);
15
+ }
16
+
17
+ .large {
18
+ width: pxToRem(48);
19
+ height: pxToRem(48);
20
+ }
@@ -0,0 +1,28 @@
1
+ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'val-avatar',
5
+ templateUrl: './avatar.component.html',
6
+ styleUrls: ['./avatar.component.scss'],
7
+ })
8
+ export class AvatarComponent implements OnInit {
9
+ @Input()
10
+ image: string;
11
+ @Input()
12
+ default: string;
13
+ @Input()
14
+ size: 'small' | 'medium' | 'large' = 'medium';
15
+ @Input()
16
+ box: boolean = false;
17
+
18
+ @Output()
19
+ onClick = new EventEmitter();
20
+
21
+ constructor() {}
22
+
23
+ ngOnInit() {}
24
+
25
+ onClickHandler() {
26
+ this.onClick.emit();
27
+ }
28
+ }
@@ -0,0 +1,17 @@
1
+ <ion-button
2
+ [type]="props.type"
3
+ [color]="props.color"
4
+ [expand]="props.expand"
5
+ [fill]="props.fill"
6
+ [size]="props.size"
7
+ [href]="props.href"
8
+ [target]="props.target"
9
+ [download]="props.download"
10
+ [shape]="props.shape"
11
+ [href]="props.href"
12
+ (click)="clickHandler()"
13
+ >
14
+ <ion-icon *ngIf="props.icon" [slot]="props.icon.slot" [name]="props.icon.name"></ion-icon>
15
+ <ion-spinner *ngIf="props.state === states.WORKING" name="circular"></ion-spinner>
16
+ <ion-text *ngIf="props.state !== states.WORKING">{{ props.text }}</ion-text>
17
+ </ion-button>
@@ -0,0 +1,5 @@
1
+ @import '../../styles/variables.scss';
2
+
3
+ ion-button {
4
+ font-family: var(--ion-default-font), Arial, sans-serif;
5
+ }
@@ -0,0 +1,26 @@
1
+ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
+ import { ButtonMetadata } from './types';
3
+ import { ComponentStates } from '../../types';
4
+
5
+ @Component({
6
+ selector: 'val-button',
7
+ templateUrl: './button.component.html',
8
+ styleUrls: ['./button.component.scss'],
9
+ })
10
+ export class ButtonComponent implements OnInit {
11
+ states = ComponentStates;
12
+
13
+ @Input()
14
+ props!: ButtonMetadata;
15
+
16
+ @Output()
17
+ onClick = new EventEmitter();
18
+
19
+ constructor() {}
20
+
21
+ ngOnInit() {}
22
+
23
+ clickHandler() {
24
+ this.onClick.emit();
25
+ }
26
+ }
@@ -0,0 +1,378 @@
1
+ import { ButtonMetadata, IconMetada } from './types';
2
+
3
+ export const Icon = (name: string, slot: 'start' | 'end'): IconMetada => {
4
+ return {
5
+ name,
6
+ slot,
7
+ };
8
+ };
9
+
10
+ /* name convention: COLOR FILL SIZE [optionals: SHAPE EXPAND ICON HREF/DOWNLOAD] TYPE */
11
+
12
+ export const BaseDefault = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
13
+ return {
14
+ color: 'primary',
15
+ state: 'ENABLED',
16
+ text,
17
+ size: 'default',
18
+ type,
19
+ };
20
+ };
21
+
22
+ export const ClearDefault = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
23
+ return { ...BaseDefault(text, type), fill: 'clear' };
24
+ };
25
+
26
+ export const ClearDefaultRound = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
27
+ return { ...ClearDefault(text, type), shape: 'round' };
28
+ };
29
+
30
+ export const SolidDefault = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
31
+ return { ...BaseDefault(text, type), fill: 'solid' };
32
+ };
33
+
34
+ export const SolidDefaultRound = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
35
+ return { ...SolidDefault(text, type), shape: 'round' };
36
+ };
37
+
38
+ export const OutlineDefault = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
39
+ return { ...BaseDefault(text, type), fill: 'outline' };
40
+ };
41
+
42
+ export const OutlineDefaultRound = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
43
+ return { ...OutlineDefault(text, type), shape: 'round' };
44
+ };
45
+
46
+ export const ClearDefaultFull = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
47
+ return { ...ClearDefault(text, type), expand: 'full' };
48
+ };
49
+
50
+ export const ClearDefaultRoundFull = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
51
+ return { ...ClearDefaultRound(text, type), expand: 'full' };
52
+ };
53
+
54
+ export const ClearDefaultBlock = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
55
+ return { ...ClearDefault(text, type), expand: 'block' };
56
+ };
57
+
58
+ export const ClearDefaultRoundBlock = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
59
+ return { ...ClearDefaultRound(text, type), expand: 'block' };
60
+ };
61
+
62
+ export const SolidDefaultFull = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
63
+ return { ...SolidDefault(text, type), expand: 'full' };
64
+ };
65
+
66
+ export const SolidDefaultRoundFull = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
67
+ return { ...SolidDefaultRound(text, type), expand: 'full' };
68
+ };
69
+
70
+ export const SolidDefaultBlock = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
71
+ return { ...SolidDefault(text, type), expand: 'block' };
72
+ };
73
+
74
+ export const SolidDefaultRoundBlock = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
75
+ return { ...SolidDefaultRound(text, type), expand: 'block' };
76
+ };
77
+
78
+ export const OutlineDefaultFull = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
79
+ return { ...OutlineDefault(text, type), expand: 'full' };
80
+ };
81
+
82
+ export const OutlineDefaultRoundFull = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
83
+ return { ...OutlineDefaultRound(text, type), expand: 'full' };
84
+ };
85
+
86
+ export const OutlineDefaultBlock = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
87
+ return { ...OutlineDefault(text, type), expand: 'block' };
88
+ };
89
+
90
+ export const OutlineDefaultRoundBlock = (text: string, type: 'button' | 'submit' | 'reset'): ButtonMetadata => {
91
+ return { ...OutlineDefaultRound(text, type), expand: 'block' };
92
+ };
93
+
94
+ export const SolidDefaultButton = (text: string): ButtonMetadata => {
95
+ return SolidDefault(text, 'button');
96
+ };
97
+
98
+ export const SolidSmallButton = (text: string): ButtonMetadata => {
99
+ return { ...SolidDefault(text, 'button'), size: 'small' };
100
+ };
101
+
102
+ export const SolidLargeButton = (text: string): ButtonMetadata => {
103
+ return { ...SolidDefault(text, 'button'), size: 'large' };
104
+ };
105
+
106
+ export const SolidDefaultRoundButton = (text: string): ButtonMetadata => {
107
+ return SolidDefaultRound(text, 'button');
108
+ };
109
+
110
+ export const SolidSmallRoundButton = (text: string): ButtonMetadata => {
111
+ return { ...SolidDefaultRound(text, 'button'), size: 'small' };
112
+ };
113
+
114
+ export const SolidLargeRoundButton = (text: string): ButtonMetadata => {
115
+ return { ...SolidDefaultRound(text, 'button'), size: 'large' };
116
+ };
117
+
118
+ export const SolidFullButton = (text: string): ButtonMetadata => {
119
+ return SolidDefaultFull(text, 'button');
120
+ };
121
+
122
+ export const SolidBlockButton = (text: string): ButtonMetadata => {
123
+ return SolidDefaultBlock(text, 'button');
124
+ };
125
+
126
+ /** PRIMARY */
127
+
128
+ export const PrimarySolidDefaultRoundButton = (text: string): ButtonMetadata => {
129
+ return { ...SolidDefaultRoundButton(text), color: 'primary' };
130
+ };
131
+
132
+ export const PrimarySolidDefaultRoundIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
133
+ return { ...PrimarySolidDefaultRoundButton(text), icon };
134
+ };
135
+
136
+ export const PrimarySolidDefaultRoundHrefButton = (
137
+ text: string,
138
+ href: string,
139
+ target: '_blank' | '_self' | '_parent' | '_top',
140
+ ): ButtonMetadata => {
141
+ return { ...PrimarySolidDefaultRoundButton(text), href, target };
142
+ };
143
+
144
+ export const PrimarySolidDefaultRoundIconHrefButton = (
145
+ text: string,
146
+ icon: IconMetada,
147
+ href: string,
148
+ target: '_blank' | '_self' | '_parent' | '_top',
149
+ ): ButtonMetadata => {
150
+ return { ...PrimarySolidDefaultRoundIconButton(text, icon), href, target };
151
+ };
152
+
153
+ export const PrimarySolidSmallRoundButton = (text: string): ButtonMetadata => {
154
+ return { ...SolidSmallRoundButton(text), color: 'primary' };
155
+ };
156
+
157
+ export const PrimarySolidSmallRoundIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
158
+ return { ...PrimarySolidSmallRoundButton(text), icon };
159
+ };
160
+
161
+ export const PrimarySolidSmallRoundHrefButton = (
162
+ text: string,
163
+ href: string,
164
+ target: '_blank' | '_self' | '_parent' | '_top',
165
+ ): ButtonMetadata => {
166
+ return { ...PrimarySolidSmallRoundButton(text), href, target };
167
+ };
168
+
169
+ export const PrimarySolidSmallRoundIconHrefButton = (
170
+ text: string,
171
+ icon: IconMetada,
172
+ href: string,
173
+ target: '_blank' | '_self' | '_parent' | '_top',
174
+ ): ButtonMetadata => {
175
+ return { ...PrimarySolidSmallRoundIconButton(text, icon), href, target };
176
+ };
177
+
178
+ export const PrimarySolidLargeRoundButton = (text: string): ButtonMetadata => {
179
+ return { ...SolidLargeRoundButton(text), color: 'primary' };
180
+ };
181
+
182
+ export const PrimarySolidLargeRoundIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
183
+ return { ...PrimarySolidLargeRoundButton(text), icon };
184
+ };
185
+
186
+ export const PrimarySolidLargeRoundHrefButton = (
187
+ text: string,
188
+ href: string,
189
+ target: '_blank' | '_self' | '_parent' | '_top',
190
+ ): ButtonMetadata => {
191
+ return { ...PrimarySolidLargeRoundButton(text), href, target };
192
+ };
193
+
194
+ export const PrimarySolidLargeRoundIconHrefButton = (
195
+ text: string,
196
+ icon: IconMetada,
197
+ href: string,
198
+ target: '_blank' | '_self' | '_parent' | '_top',
199
+ ): ButtonMetadata => {
200
+ return { ...PrimarySolidLargeRoundIconButton(text, icon), href, target };
201
+ };
202
+
203
+ export const PrimarySolidBlockButton = (text: string): ButtonMetadata => {
204
+ return { ...SolidBlockButton(text), color: 'primary' };
205
+ };
206
+
207
+ export const PrimarySolidBlockIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
208
+ return { ...PrimarySolidBlockButton(text), icon };
209
+ };
210
+
211
+ export const PrimarySolidBlockHrefButton = (
212
+ text: string,
213
+ href: string,
214
+ target: '_blank' | '_self' | '_parent' | '_top',
215
+ ): ButtonMetadata => {
216
+ return { ...PrimarySolidBlockButton(text), href, target };
217
+ };
218
+
219
+ export const PrimarySolidBlockIconHrefButton = (
220
+ text: string,
221
+ icon: IconMetada,
222
+ href: string,
223
+ target: '_blank' | '_self' | '_parent' | '_top',
224
+ ): ButtonMetadata => {
225
+ return { ...PrimarySolidBlockIconButton(text, icon), href, target };
226
+ };
227
+
228
+ export const PrimarySolidFullButton = (text: string): ButtonMetadata => {
229
+ return { ...SolidFullButton(text), color: 'primary' };
230
+ };
231
+
232
+ export const PrimarySolidFullIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
233
+ return { ...PrimarySolidFullButton(text), icon };
234
+ };
235
+
236
+ export const PrimarySolidFullHrefButton = (
237
+ text: string,
238
+ href: string,
239
+ target: '_blank' | '_self' | '_parent' | '_top',
240
+ ): ButtonMetadata => {
241
+ return { ...PrimarySolidFullButton(text), href, target };
242
+ };
243
+
244
+ export const PrimarySolidFullIconHrefButton = (
245
+ text: string,
246
+ icon: IconMetada,
247
+ href: string,
248
+ target: '_blank' | '_self' | '_parent' | '_top',
249
+ ): ButtonMetadata => {
250
+ return { ...PrimarySolidFullIconButton(text, icon), href, target };
251
+ };
252
+
253
+ /** SECONDARY */
254
+
255
+ export const SecondarySolidDefaultRoundButton = (text: string): ButtonMetadata => {
256
+ return { ...SolidDefaultRoundButton(text), color: 'secondary' };
257
+ };
258
+
259
+ export const SecondarySolidDefaultRoundIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
260
+ return { ...SecondarySolidDefaultRoundButton(text), icon };
261
+ };
262
+
263
+ export const SecondarySolidDefaultRoundHrefButton = (
264
+ text: string,
265
+ href: string,
266
+ target: '_blank' | '_self' | '_parent' | '_top',
267
+ ): ButtonMetadata => {
268
+ return { ...SecondarySolidDefaultRoundButton(text), href, target };
269
+ };
270
+
271
+ export const SecondarySolidDefaultRoundIconHrefButton = (
272
+ text: string,
273
+ icon: IconMetada,
274
+ href: string,
275
+ target: '_blank' | '_self' | '_parent' | '_top',
276
+ ): ButtonMetadata => {
277
+ return { ...SecondarySolidDefaultRoundIconButton(text, icon), href, target };
278
+ };
279
+
280
+ export const SecondarySolidSmallRoundButton = (text: string): ButtonMetadata => {
281
+ return { ...SolidSmallRoundButton(text), color: 'secondary' };
282
+ };
283
+
284
+ export const SecondarySolidSmallRoundIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
285
+ return { ...SecondarySolidSmallRoundButton(text), icon };
286
+ };
287
+
288
+ export const SecondarySolidSmallRoundHrefButton = (
289
+ text: string,
290
+ href: string,
291
+ target: '_blank' | '_self' | '_parent' | '_top',
292
+ ): ButtonMetadata => {
293
+ return { ...SecondarySolidSmallRoundButton(text), href, target };
294
+ };
295
+
296
+ export const SecondarySolidSmallRoundIconHrefButton = (
297
+ text: string,
298
+ icon: IconMetada,
299
+ href: string,
300
+ target: '_blank' | '_self' | '_parent' | '_top',
301
+ ): ButtonMetadata => {
302
+ return { ...SecondarySolidSmallRoundIconButton(text, icon), href, target };
303
+ };
304
+
305
+ export const SecondarySolidLargeRoundButton = (text: string): ButtonMetadata => {
306
+ return { ...SolidLargeRoundButton(text), color: 'secondary' };
307
+ };
308
+
309
+ export const SecondarySolidLargeRoundIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
310
+ return { ...SecondarySolidLargeRoundButton(text), icon };
311
+ };
312
+
313
+ export const SecondarySolidLargeRoundHrefButton = (
314
+ text: string,
315
+ href: string,
316
+ target: '_blank' | '_self' | '_parent' | '_top',
317
+ ): ButtonMetadata => {
318
+ return { ...SecondarySolidLargeRoundButton(text), href, target };
319
+ };
320
+
321
+ export const SecondarySolidLargeRoundIconHrefButton = (
322
+ text: string,
323
+ icon: IconMetada,
324
+ href: string,
325
+ target: '_blank' | '_self' | '_parent' | '_top',
326
+ ): ButtonMetadata => {
327
+ return { ...SecondarySolidLargeRoundIconButton(text, icon), href, target };
328
+ };
329
+
330
+ export const SecondarySolidFullButton = (text: string): ButtonMetadata => {
331
+ return { ...SolidFullButton(text), color: 'secondary' };
332
+ };
333
+
334
+ export const SecondarySolidFullIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
335
+ return { ...SecondarySolidFullButton(text), icon };
336
+ };
337
+
338
+ export const SecondarySolidFullHrefButton = (
339
+ text: string,
340
+ href: string,
341
+ target: '_blank' | '_self' | '_parent' | '_top',
342
+ ): ButtonMetadata => {
343
+ return { ...SecondarySolidFullButton(text), href, target };
344
+ };
345
+
346
+ export const SecondarySolidFullIconHrefButton = (
347
+ text: string,
348
+ icon: IconMetada,
349
+ href: string,
350
+ target: '_blank' | '_self' | '_parent' | '_top',
351
+ ): ButtonMetadata => {
352
+ return { ...SecondarySolidFullIconButton(text, icon), href, target };
353
+ };
354
+
355
+ export const SecondarySolidBlockButton = (text: string): ButtonMetadata => {
356
+ return { ...SolidBlockButton(text), color: 'secondary' };
357
+ };
358
+
359
+ export const SecondarySolidBlockIconButton = (text: string, icon: IconMetada): ButtonMetadata => {
360
+ return { ...SecondarySolidBlockButton(text), icon };
361
+ };
362
+
363
+ export const SecondarySolidBlockHrefButton = (
364
+ text: string,
365
+ href: string,
366
+ target: '_blank' | '_self' | '_parent' | '_top',
367
+ ): ButtonMetadata => {
368
+ return { ...SecondarySolidBlockButton(text), href, target };
369
+ };
370
+
371
+ export const SecondarySolidBlockIconHrefButton = (
372
+ text: string,
373
+ icon: IconMetada,
374
+ href: string,
375
+ target: '_blank' | '_self' | '_parent' | '_top',
376
+ ): ButtonMetadata => {
377
+ return { ...SecondarySolidBlockIconButton(text, icon), href, target };
378
+ };
@@ -0,0 +1,22 @@
1
+ import { Color } from '@ionic/core';
2
+ import { ComponentState } from '../../types';
3
+
4
+ export interface IconMetada {
5
+ name: string;
6
+ slot: 'start' | 'end';
7
+ }
8
+
9
+ export interface ButtonMetadata {
10
+ expand?: 'full' | 'block';
11
+ href?: string;
12
+ target?: '_blank' | '_self' | '_parent' | '_top';
13
+ download?: string;
14
+ color: Color;
15
+ state: ComponentState;
16
+ text: string;
17
+ icon?: IconMetada;
18
+ shape?: 'round';
19
+ size?: 'small' | 'default' | 'large';
20
+ fill?: 'clear' | 'outline' | 'solid' | 'default';
21
+ type: 'button' | 'submit' | 'reset';
22
+ }
@@ -0,0 +1,5 @@
1
+ <ion-text [color]="color">
2
+ <p [class]="size">
3
+ {{ content }}
4
+ </p>
5
+ </ion-text>
@@ -0,0 +1,17 @@
1
+ @import '../../styles/typography.scss';
2
+
3
+ .small {
4
+ @include display-small;
5
+ }
6
+
7
+ .medium {
8
+ @include display-medium;
9
+ }
10
+
11
+ .large {
12
+ @include display-large;
13
+ }
14
+
15
+ .xlarge {
16
+ @include display-xlarge;
17
+ }
@@ -0,0 +1,20 @@
1
+ import { Component, Input, OnInit } from '@angular/core';
2
+ import { Color } from '@ionic/core';
3
+
4
+ @Component({
5
+ selector: 'val-display',
6
+ templateUrl: './display.component.html',
7
+ styleUrls: ['./display.component.scss'],
8
+ })
9
+ export class DisplayComponent implements OnInit {
10
+ @Input()
11
+ size: 'small' | 'medium' | 'large' | 'xlarge';
12
+ @Input()
13
+ color: Color;
14
+ @Input()
15
+ content: string;
16
+
17
+ constructor() {}
18
+
19
+ ngOnInit() {}
20
+ }
@@ -0,0 +1 @@
1
+ <div [ngClass]="['divider', size, color, fill]"></div>
@@ -0,0 +1,54 @@
1
+ @import '../../styles/mixins.scss';
2
+ @import '../../styles/variables.scss';
3
+
4
+ .solid {
5
+ border-top: pxToRem(1) solid $color-default-hr;
6
+ }
7
+
8
+ .gradient {
9
+ height: pxToRem(2);
10
+
11
+ &.primary {
12
+ background: linear-gradient(to right, var(--ion-color-primary), var(--ion-color-light));
13
+ }
14
+
15
+ &.secondary {
16
+ background: linear-gradient(to right, var(--ion-color-secondary), var(--ion-color-light));
17
+ }
18
+
19
+ &.dark {
20
+ background: linear-gradient(to right, var(--ion-color-dark), var(--ion-color-light));
21
+ }
22
+
23
+ &.light {
24
+ background: linear-gradient(to right, var(--ion-color-light), $color-classic-white);
25
+ }
26
+ }
27
+
28
+ .small {
29
+ margin: pxToRem(16);
30
+ }
31
+
32
+ .medium {
33
+ margin: pxToRem(24) pxToRem(16);
34
+ }
35
+
36
+ .large {
37
+ margin: pxToRem(36) pxToRem(16);
38
+ }
39
+
40
+ .primary {
41
+ border-color: var(--ion-color-primary);
42
+ }
43
+
44
+ .secondary {
45
+ border-color: var(--ion-color-secondary);
46
+ }
47
+
48
+ .dark {
49
+ border-color: var(--ion-color-dark);
50
+ }
51
+
52
+ .light {
53
+ border-color: var(--ion-color-light);
54
+ }