angular2-credit-card-draw 1.0.8 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { ModuleWithProviders } from "@angular/core";
2
- export * from './dist/card.component';
3
- export declare class CardModule {
4
- static forRoot(): ModuleWithProviders;
5
- }
package/dist/index.js DELETED
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- function __export(m) {
9
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
10
- }
11
- var core_1 = require("@angular/core");
12
- var common_1 = require("@angular/common");
13
- var card_component_1 = require("./dist/card.component");
14
- __export(require("./dist/card.component"));
15
- var CardModule = CardModule_1 = (function () {
16
- function CardModule() {
17
- }
18
- CardModule.forRoot = function () {
19
- return {
20
- ngModule: CardModule_1
21
- };
22
- };
23
- return CardModule;
24
- }());
25
- CardModule = CardModule_1 = __decorate([
26
- core_1.NgModule({
27
- imports: [
28
- common_1.CommonModule
29
- ],
30
- declarations: [
31
- card_component_1.CardDraw
32
- ],
33
- exports: [
34
- card_component_1.CardDraw
35
- ]
36
- })
37
- ], CardModule);
38
- exports.CardModule = CardModule;
39
- var CardModule_1;
40
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,sCAA4D;AAC5D,0CAA6C;AAC7C,wDAA+C;AAE/C,2CAAsC;AAatC,IAAa,UAAU;IAAvB;IAMA,CAAC;IALQ,kBAAO,GAAd;QACE,MAAM,CAAC;YACL,QAAQ,EAAE,YAAU;SACrB,CAAC;IACJ,CAAC;IACH,iBAAC;AAAD,CAAC,AAND,IAMC;AANY,UAAU;IAXtB,eAAQ,CAAC;QACR,OAAO,EAAE;YACP,qBAAY;SACb;QACD,YAAY,EAAE;YACZ,yBAAQ;SACT;QACD,OAAO,EAAE;YACP,yBAAQ;SACT;KACF,CAAC;GACW,UAAU,CAMtB;AANY,gCAAU"}
package/gulpfile.js DELETED
@@ -1,8 +0,0 @@
1
- var gulp = require('gulp');
2
- var embedTemplates = require('gulp-angular-embed-templates');
3
-
4
- gulp.task('js:build', function () {
5
- gulp.src('./src/card.component.ts') // also can use *.js files
6
- .pipe(embedTemplates({sourceType:'ts'}))
7
- .pipe(gulp.dest('./dist'));
8
- });
package/index.ts DELETED
@@ -1,24 +0,0 @@
1
- import {NgModule, ModuleWithProviders} from "@angular/core";
2
- import {CommonModule} from "@angular/common";
3
- import {CardDraw} from "./dist/card.component";
4
-
5
- export * from './dist/card.component';
6
-
7
- @NgModule({
8
- imports: [
9
- CommonModule
10
- ],
11
- declarations: [
12
- CardDraw
13
- ],
14
- exports: [
15
- CardDraw
16
- ]
17
- })
18
- export class CardModule {
19
- static forRoot(): ModuleWithProviders {
20
- return {
21
- ngModule: CardModule
22
- };
23
- }
24
- }
@@ -1,22 +0,0 @@
1
- import { Component,Input } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'card-draw',
5
- templateUrl:'./card.html'
6
- })
7
- export class CardDraw{
8
- @Input() number: string;
9
- @Input() name: string;
10
- @Input() expiration:string;
11
- @Input() ccv:string;
12
- @Input() background:string;
13
- @Input() height:string;
14
- @Input() width:string;
15
- @Input() toggle:boolean;
16
-
17
-
18
-
19
- constructor() {
20
-
21
- }
22
- }
package/src/card.html DELETED
@@ -1,389 +0,0 @@
1
- <div>
2
- <div class="checkout">
3
- <div class="credit-card-box {{toggle ? 'hover':''}}">
4
- <div class="flip">
5
- <div [style.width]="width" [style.height]="height" [style.background]="background" class="front">
6
- <div class="chip"></div>
7
- <div class="logo">
8
- <svg version="1.1" id="visa" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
9
- width="47.834px" height="47.834px" viewBox="0 0 47.834 47.834" style="enable-background:new 0 0 47.834 47.834;">
10
- <g>
11
- <g>
12
- <path d="M44.688,16.814h-3.004c-0.933,0-1.627,0.254-2.037,1.184l-5.773,13.074h4.083c0,0,0.666-1.758,0.817-2.143
13
- c0.447,0,4.414,0.006,4.979,0.006c0.116,0.498,0.474,2.137,0.474,2.137h3.607L44.688,16.814z M39.893,26.01
14
- c0.32-0.819,1.549-3.987,1.549-3.987c-0.021,0.039,0.317-0.825,0.518-1.362l0.262,1.23c0,0,0.745,3.406,0.901,4.119H39.893z
15
- M34.146,26.404c-0.028,2.963-2.684,4.875-6.771,4.875c-1.743-0.018-3.422-0.361-4.332-0.76l0.547-3.193l0.501,0.228
16
- c1.277,0.532,2.104,0.747,3.661,0.747c1.117,0,2.313-0.438,2.325-1.393c0.007-0.625-0.501-1.07-2.016-1.77
17
- c-1.476-0.683-3.43-1.827-3.405-3.876c0.021-2.773,2.729-4.708,6.571-4.708c1.506,0,2.713,0.31,3.483,0.599l-0.526,3.092
18
- l-0.351-0.165c-0.716-0.288-1.638-0.566-2.91-0.546c-1.522,0-2.228,0.634-2.228,1.227c-0.008,0.668,0.824,1.108,2.184,1.77
19
- C33.126,23.546,34.163,24.783,34.146,26.404z M0,16.962l0.05-0.286h6.028c0.813,0.031,1.468,0.29,1.694,1.159l1.311,6.304
20
- C7.795,20.842,4.691,18.099,0,16.962z M17.581,16.812l-6.123,14.239l-4.114,0.007L3.862,19.161
21
- c2.503,1.602,4.635,4.144,5.386,5.914l0.406,1.469l3.808-9.729L17.581,16.812L17.581,16.812z M19.153,16.8h3.89L20.61,31.066
22
- h-3.888L19.153,16.8z">
23
- </path>
24
- </g>
25
- </g>
26
- </svg>
27
- </div>
28
- <div class="number">{{number}}</div>
29
- <div class="card-holder">
30
- <label>Card holder</label>
31
- <div>{{name}}</div>
32
- </div>
33
- <div class="card-expiration-date">
34
- <label>Expires</label>
35
- <div>{{expiration}}</div>
36
- </div>
37
- </div>
38
- <div [style.width]="width" [style.height]="height" [style.background]="background" class="back">
39
- <div class="strip"></div>
40
- <div class="logo">
41
- <svg version="1.1" id="visa" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
42
- width="47.834px" height="47.834px" viewBox="0 0 47.834 47.834" style="enable-background:new 0 0 47.834 47.834;">
43
- <g>
44
- <g>
45
- <path d="M44.688,16.814h-3.004c-0.933,0-1.627,0.254-2.037,1.184l-5.773,13.074h4.083c0,0,0.666-1.758,0.817-2.143
46
- c0.447,0,4.414,0.006,4.979,0.006c0.116,0.498,0.474,2.137,0.474,2.137h3.607L44.688,16.814z M39.893,26.01
47
- c0.32-0.819,1.549-3.987,1.549-3.987c-0.021,0.039,0.317-0.825,0.518-1.362l0.262,1.23c0,0,0.745,3.406,0.901,4.119H39.893z
48
- M34.146,26.404c-0.028,2.963-2.684,4.875-6.771,4.875c-1.743-0.018-3.422-0.361-4.332-0.76l0.547-3.193l0.501,0.228
49
- c1.277,0.532,2.104,0.747,3.661,0.747c1.117,0,2.313-0.438,2.325-1.393c0.007-0.625-0.501-1.07-2.016-1.77
50
- c-1.476-0.683-3.43-1.827-3.405-3.876c0.021-2.773,2.729-4.708,6.571-4.708c1.506,0,2.713,0.31,3.483,0.599l-0.526,3.092
51
- l-0.351-0.165c-0.716-0.288-1.638-0.566-2.91-0.546c-1.522,0-2.228,0.634-2.228,1.227c-0.008,0.668,0.824,1.108,2.184,1.77
52
- C33.126,23.546,34.163,24.783,34.146,26.404z M0,16.962l0.05-0.286h6.028c0.813,0.031,1.468,0.29,1.694,1.159l1.311,6.304
53
- C7.795,20.842,4.691,18.099,0,16.962z M17.581,16.812l-6.123,14.239l-4.114,0.007L3.862,19.161
54
- c2.503,1.602,4.635,4.144,5.386,5.914l0.406,1.469l3.808-9.729L17.581,16.812L17.581,16.812z M19.153,16.8h3.89L20.61,31.066
55
- h-3.888L19.153,16.8z">
56
- </path>
57
- </g>
58
- </g>
59
- </svg>
60
-
61
- </div>
62
- <div class="ccv">
63
- <label>CCV</label>
64
- <div>{{ccv}}</div>
65
- </div>
66
- </div>
67
- </div>
68
- </div>
69
- </div>
70
- <style>
71
- *,
72
- *::before,
73
- *::after {
74
- box-sizing: border-box;
75
- }
76
-
77
- html,
78
- body {
79
- min-height: 100%;
80
- font-family: 'Open sans', sans-serif;
81
- }
82
-
83
- body {
84
- background: -webkit-linear-gradient(40deg, #f3c680, #a1e3e2);
85
- background: linear-gradient(50deg, #f3c680, #a1e3e2);
86
- }
87
-
88
- /*--------------------
89
- Buttons
90
- --------------------*/
91
- .btn {
92
- display: block;
93
- background: #bded7d;
94
- color: white;
95
- text-decoration: none;
96
- margin: 20px 0;
97
- padding: 15px 15px;
98
- border-radius: 5px;
99
- position: relative;
100
- }
101
- .btn::after {
102
- content: '';
103
- position: absolute;
104
- z-index: 1;
105
- top: 0;
106
- left: 0;
107
- width: 100%;
108
- height: 100%;
109
- -webkit-transition: all .2s ease-in-out;
110
- transition: all .2s ease-in-out;
111
- box-shadow: inset 0 3px 0 transparent, 0 3px 3px rgba(0, 0, 0, 0.2);
112
- border-radius: 5px;
113
- }
114
- .btn:hover::after {
115
- background: rgba(0, 0, 0, 0.1);
116
- box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.2);
117
- }
118
-
119
- /*--------------------
120
- Form
121
- --------------------*/
122
- .form fieldset {
123
- border: none;
124
- padding: 0;
125
- padding: 10px 0;
126
- position: relative;
127
- clear: both;
128
- }
129
- .form fieldset.fieldset-expiration {
130
- float: left;
131
- width: 60%;
132
- }
133
- .form fieldset.fieldset-expiration .select {
134
- width: 84px;
135
- margin-right: 12px;
136
- float: left;
137
- }
138
- .form fieldset.fieldset-ccv {
139
- clear: none;
140
- float: right;
141
- width: 86px;
142
- }
143
- .form fieldset label {
144
- display: block;
145
- text-transform: uppercase;
146
- font-size: 11px;
147
- color: rgba(0, 0, 0, 0.6);
148
- margin-bottom: 5px;
149
- font-weight: bold;
150
- font-family: Inconsolata;
151
- }
152
- .form fieldset input,
153
- .form fieldset .select {
154
- width: 100%;
155
- height: 38px;
156
- color: #333333;
157
- padding: 10px;
158
- border-radius: 5px;
159
- font-size: 15px;
160
- outline: none !important;
161
- border: 1px solid rgba(0, 0, 0, 0.3);
162
- box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
163
- }
164
- .form fieldset input.input-cart-number,
165
- .form fieldset .select.input-cart-number {
166
- width: 82px;
167
- display: inline-block;
168
- margin-right: 8px;
169
- }
170
- .form fieldset input.input-cart-number:last-child,
171
- .form fieldset .select.input-cart-number:last-child {
172
- margin-right: 0;
173
- }
174
- .form fieldset .select {
175
- position: relative;
176
- }
177
- .form fieldset .select::after {
178
- content: '';
179
- border-top: 8px solid #222;
180
- border-left: 4px solid transparent;
181
- border-right: 4px solid transparent;
182
- position: absolute;
183
- z-index: 2;
184
- top: 14px;
185
- right: 10px;
186
- pointer-events: none;
187
- }
188
- .form fieldset .select select {
189
- -webkit-appearance: none;
190
- -moz-appearance: none;
191
- appearance: none;
192
- position: absolute;
193
- padding: 0;
194
- border: none;
195
- width: 100%;
196
- outline: none !important;
197
- top: 6px;
198
- left: 6px;
199
- background: none;
200
- }
201
- .form fieldset .select select :-moz-focusring {
202
- color: transparent;
203
- text-shadow: 0 0 0 #000;
204
- }
205
- .form button {
206
- width: 100%;
207
- outline: none !important;
208
- background: -webkit-linear-gradient(top, #49a09b, #3d8291);
209
- background: linear-gradient(180deg, #49a09b, #3d8291);
210
- text-transform: uppercase;
211
- font-weight: bold;
212
- border: none;
213
- box-shadow: none;
214
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
215
- margin-top: 90px;
216
- }
217
- .form button .fa {
218
- margin-right: 6px;
219
- }
220
-
221
- /*--------------------
222
- Checkout
223
- --------------------*/
224
- .checkout {
225
- margin: 20px auto 0px;
226
- position: relative;
227
- max-width: 460px;
228
- border-radius: 15px;
229
- }
230
-
231
- /*--------------------
232
- Credit Card
233
- --------------------*/
234
- .credit-card-box {
235
- -webkit-perspective: 1000;
236
- perspective: 1000;
237
- width: 400px;
238
- height: 280px;
239
- position: relative;
240
- left: 50%;
241
- -webkit-transform: translateX(-50%);
242
- transform: translateX(-50%);
243
- }
244
- .credit-card-box:hover .flip, .credit-card-box.hover .flip {
245
- -webkit-transform: rotateY(180deg);
246
- transform: rotateY(180deg);
247
- }
248
- .credit-card-box .front,
249
- .credit-card-box .back {
250
- width: 400px;
251
- height: 250px;
252
- border-radius: 15px;
253
- -webkit-backface-visibility: hidden;
254
- backface-visibility: hidden;
255
- background: linear-gradient(135deg, #bd6772, #53223f);
256
- position: absolute;
257
- color: #fff;
258
- font-family: Inconsolata;
259
- top: 0;
260
- left: 0;
261
- text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
262
- box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
263
- }
264
- .credit-card-box .front::before,
265
- .credit-card-box .back::before {
266
- content: '';
267
- position: absolute;
268
- width: 100%;
269
- height: 100%;
270
- top: 0;
271
- left: 0;
272
- background: url("http://cdn.flaticon.com/svg/44/44386.svg") no-repeat center;
273
- background-size: cover;
274
- opacity: .05;
275
- }
276
- .credit-card-box .flip {
277
- -webkit-transition: 0.6s;
278
- transition: 0.6s;
279
- -webkit-transform-style: preserve-3d;
280
- transform-style: preserve-3d;
281
- position: relative;
282
- }
283
- .credit-card-box .logo {
284
- position: absolute;
285
- top: 9px;
286
- right: 20px;
287
- width: 60px;
288
- }
289
- .credit-card-box .logo svg {
290
- width: 100%;
291
- height: auto;
292
- fill: #fff;
293
- }
294
- .credit-card-box .front {
295
- z-index: 2;
296
- -webkit-transform: rotateY(0deg);
297
- transform: rotateY(0deg);
298
- }
299
- .credit-card-box .back {
300
- -webkit-transform: rotateY(180deg);
301
- transform: rotateY(180deg);
302
- }
303
- .credit-card-box .back .logo {
304
- top: 185px;
305
- }
306
- .credit-card-box .chip {
307
- position: absolute;
308
- width: 60px;
309
- height: 45px;
310
- top: 20px;
311
- left: 20px;
312
- background: -webkit-linear-gradient(315deg, #ddccf0 0%, #d1e9f5 44%, #f8ece7 100%);
313
- background: linear-gradient(135deg, #ddccf0 0%, #d1e9f5 44%, #f8ece7 100%);
314
- border-radius: 8px;
315
- }
316
- .credit-card-box .chip::before {
317
- content: '';
318
- position: absolute;
319
- top: 0;
320
- bottom: 0;
321
- left: 0;
322
- right: 0;
323
- margin: auto;
324
- border: 4px solid rgba(128, 128, 128, 0.1);
325
- width: 80%;
326
- height: 70%;
327
- border-radius: 5px;
328
- }
329
- .credit-card-box .strip {
330
- background: -webkit-linear-gradient(315deg, #404040, #1a1a1a);
331
- background: linear-gradient(135deg, #404040, #1a1a1a);
332
- position: absolute;
333
- width: 100%;
334
- height: 50px;
335
- top: 30px;
336
- left: 0;
337
- }
338
- .credit-card-box .number {
339
- position: absolute;
340
- margin: 0 auto;
341
- top: 103px;
342
- left: 19px;
343
- font-size: 30px;
344
- }
345
- .credit-card-box label {
346
- font-size: 10px;
347
- letter-spacing: 1px;
348
- text-shadow: none;
349
- text-transform: uppercase;
350
- font-weight: normal;
351
- opacity: 0.5;
352
- display: block;
353
- margin-bottom: 3px;
354
- }
355
- .credit-card-box .card-holder,
356
- .credit-card-box .card-expiration-date {
357
- position: absolute;
358
- margin: 0 auto;
359
- top: 180px;
360
- left: 19px;
361
- font-size: 22px;
362
- text-transform: capitalize;
363
- }
364
- .credit-card-box .card-expiration-date {
365
- text-align: right;
366
- left: auto;
367
- right: 20px;
368
- }
369
- .credit-card-box .ccv {
370
- height: 36px;
371
- background: #fff;
372
- width: 91%;
373
- border-radius: 5px;
374
- top: 110px;
375
- left: 0;
376
- right: 0;
377
- position: absolute;
378
- margin: 0 auto;
379
- color: #000;
380
- text-align: right;
381
- padding: 10px;
382
- }
383
- .credit-card-box .ccv label {
384
- margin: -25px 0 14px;
385
- color: #fff;
386
- }
387
-
388
- </style>
389
- </div>
package/tsconfig.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "noImplicitAny": true,
4
- "module": "commonjs",
5
- "target": "ES5",
6
- "emitDecoratorMetadata": true,
7
- "experimentalDecorators": true,
8
- "sourceMap": true,
9
- "declaration": true,
10
- "outDir": "./dist"
11
- },
12
- "files": [
13
- "typings/index.d.ts",
14
- "index.ts"
15
- ],
16
- "exclude": [
17
- "node_modules",
18
- "dist"
19
- ]
20
- }
package/tslint.json DELETED
@@ -1,110 +0,0 @@
1
- {
2
- "rulesDirectory": [
3
- "node_modules/codelyzer"
4
- ],
5
- "rules": {
6
- "class-name": true,
7
- "comment-format": [
8
- true,
9
- "check-space"
10
- ],
11
- "curly": true,
12
- "eofline": true,
13
- "forin": true,
14
- "indent": [
15
- true,
16
- "spaces"
17
- ],
18
- "label-position": true,
19
- "label-undefined": true,
20
- "max-line-length": [
21
- true,
22
- 140
23
- ],
24
- "member-access": false,
25
- "member-ordering": [
26
- true,
27
- "static-before-instance",
28
- "variables-before-functions"
29
- ],
30
- "no-arg": true,
31
- "no-bitwise": true,
32
- "no-console": [
33
- true,
34
- "debug",
35
- "info",
36
- "time",
37
- "timeEnd",
38
- "trace"
39
- ],
40
- "no-construct": true,
41
- "no-debugger": true,
42
- "no-duplicate-key": true,
43
- "no-duplicate-variable": true,
44
- "no-empty": false,
45
- "no-eval": true,
46
- "no-inferrable-types": true,
47
- "no-shadowed-variable": true,
48
- "no-string-literal": false,
49
- "no-switch-case-fall-through": true,
50
- "no-trailing-whitespace": true,
51
- "no-unused-expression": true,
52
- "no-unused-variable": true,
53
- "no-unreachable": true,
54
- "no-use-before-declare": true,
55
- "no-var-keyword": true,
56
- "object-literal-sort-keys": false,
57
- "one-line": [
58
- true,
59
- "check-open-brace",
60
- "check-catch",
61
- "check-else",
62
- "check-whitespace"
63
- ],
64
- "quotemark": [
65
- true,
66
- "single"
67
- ],
68
- "radix": true,
69
- "semicolon": [
70
- "always"
71
- ],
72
- "triple-equals": [
73
- true,
74
- "allow-null-check"
75
- ],
76
- "typedef-whitespace": [
77
- true,
78
- {
79
- "call-signature": "nospace",
80
- "index-signature": "nospace",
81
- "parameter": "nospace",
82
- "property-declaration": "nospace",
83
- "variable-declaration": "nospace"
84
- }
85
- ],
86
- "variable-name": false,
87
- "whitespace": [
88
- true,
89
- "check-branch",
90
- "check-decl",
91
- "check-operator",
92
- "check-separator",
93
- "check-type"
94
- ],
95
-
96
- "directive-selector-name": [true, "camelCase"],
97
- "component-selector-name": [true, "kebab-case"],
98
- "directive-selector-type": [true, "attribute"],
99
- "component-selector-type": [true, "element"],
100
- "use-input-property-decorator": true,
101
- "use-output-property-decorator": true,
102
- "use-host-property-decorator": true,
103
- "no-input-rename": true,
104
- "no-output-rename": true,
105
- "use-life-cycle-interface": true,
106
- "use-pipe-transform-interface": true,
107
- "component-class-suffix": true,
108
- "directive-class-suffix": true
109
- }
110
- }