@pareto-engineering/design-system 2.0.0-alpha.13 → 2.0.0-alpha.14

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.
@@ -1,4 +1,5 @@
1
1
  /* @pareto-engineering/generator-front 1.0.12 */
2
+
2
3
  @use "@pareto-engineering/bem";
3
4
  @use "@aztlan/stylebook/src/mixins";
4
5
  @use "@aztlan/stylebook/src/globals" as *;
@@ -8,47 +9,153 @@ $default-conversation-background: var(--y);
8
9
  $default-message-max-width: calc(100% - #{$default-padding});
9
10
  $default-message-min-width: 12em;
10
11
  $default-message-border: var(--theme-border);
12
+ $triangle-border-size: 15px;
13
+ $triangle-border-style: $triangle-border-size solid;
14
+ $triangle-border-style-subtracted: ($triangle-border-size - 1px) solid;
15
+ $triangle-border1: $triangle-border-style var(--paragraph);
16
+ $triangle-border2: $triangle-border-style transparent;
17
+ $triangle-border3: $triangle-border-style-subtracted var(--x);
18
+ $triangle-border4: $triangle-border-style-subtracted transparent;
19
+ $triangle-before-side:24px;
20
+ $triangle-before-bottom:-30px;
21
+ $triangle-after-bottom:-27px;
22
+ $triangle-after-side:25px;
11
23
 
12
24
  .#{bem.$base}.conversation {
13
- display: flex;
14
- flex-direction: column;
15
- background-color: $default-conversation-background;
16
- padding: $default-padding;
25
+ background-color: $default-conversation-background;
26
+ border-radius: var(--theme-border-radius);
27
+ display: flex;
28
+ flex-direction: column;
29
+ padding: $default-padding;
30
+
31
+ >:not(:last-child) {
32
+ margin-bottom: $default-padding;
33
+ }
34
+
35
+ // >:nth-child(1) {
36
+ // animation-delay: 1s;
37
+ // }
38
+ // >:nth-child(2) {
39
+ // animation-delay: 3s;
40
+ // }
41
+
42
+ .#{bem.$base}.message {
43
+ align-self: flex-start;
44
+ background-color: var(--x);
45
+ // animation: fadeIn 1s ease-in both;
46
+ border: $default-message-border;
17
47
  border-radius: var(--theme-border-radius);
48
+ max-width: $default-message-max-width;
49
+ min-width: $default-message-min-width;
50
+ padding: $default-padding;
51
+ position: relative;
18
52
 
19
- >:not(:last-child) {
20
- margin-bottom: $default-padding;
21
- }
53
+ .#{bem.$element-content} {
54
+ display: flex;
55
+ flex-direction: column;
56
+
57
+ >p {
58
+ color: var(--on-x);
59
+ }
60
+
61
+ .sender {
62
+ font-weight: 800;
63
+ margin-bottom: .5em;
64
+ }
22
65
 
23
- .#{bem.$base}.message {
24
- min-width: $default-message-min-width;
25
- max-width: $default-message-max-width;
26
- padding: $default-padding;
27
- border-radius: var(--theme-border-radius);
28
- background-color: var(--x);
29
- align-self: flex-start;
30
- border: $default-message-border;
31
-
32
- .#{bem.$element-content} {
33
- display: flex;
34
- flex-direction: column;
35
-
36
- >p {
37
- color: var(--on-x);
38
- }
39
-
40
- .sender {
41
- font-weight: 800;
42
- margin-bottom: .5em;
43
- }
66
+ .attachment {
67
+ align-self: baseline;
68
+ background-color: var(--y);
69
+ display: flex;
70
+ flex-direction: row;
71
+ padding: .5em 1em;
72
+
73
+ > p {
74
+ margin-bottom: 0;
44
75
  }
45
- }
46
76
 
47
- .#{bem.$base}.ours {
48
- align-self: flex-end;
77
+ > img {
78
+ width: 40px;
79
+ }
80
+ }
81
+ }
82
+ &.#{bem.$base}.ours {
83
+ align-self: flex-end;
49
84
  }
50
85
 
51
- }
86
+ &.has-triangle {
87
+ ::before {
88
+ border-bottom: $triangle-border2;
89
+ border-left: $triangle-border2;
90
+ border-right: $triangle-border1;
91
+ border-top: $triangle-border1;
92
+ bottom: $triangle-before-bottom;
93
+ content: "";
94
+ height: 0;
95
+ position: absolute;
96
+ right: $triangle-before-side;
97
+ width: 0;
98
+ }
99
+
100
+ ::after {
101
+ border-bottom: $triangle-border4;
102
+ border-left: $triangle-border4;
103
+ border-right: $triangle-border3;
104
+ border-top: $triangle-border3;
105
+ bottom: $triangle-after-bottom;
106
+ content: "";
107
+ height: 0;
108
+ position: absolute;
109
+ right: $triangle-after-side;
110
+ width: 0;
111
+ }
112
+
113
+ &:not(.ours) {
114
+ ::before {
115
+ border-bottom: $triangle-border2;
116
+ border-left: $triangle-border1;
117
+ border-right: $triangle-border2;
118
+ border-top: $triangle-border1;
119
+ bottom: $triangle-before-bottom;
120
+ content: "";
121
+ height: 0;
122
+ left: $triangle-before-side;
123
+ position: absolute;
124
+ width: 0;
125
+ }
52
126
 
127
+ ::after {
128
+ border-bottom: $triangle-border4;
129
+ border-left: $triangle-border3;
130
+ border-right: $triangle-border4;
131
+ border-top: $triangle-border3;
132
+ bottom: $triangle-after-bottom;
133
+ content: "";
134
+ height: 0;
135
+ left: $triangle-after-side;
136
+ position: absolute;
137
+ width: 0;
138
+ }
139
+ }
140
+ }
53
141
 
142
+ // mobile style
143
+ @include mixins.media($to:$sm-md) {
144
+ .message {
145
+ margin-top: 2em;
146
+ }
147
+ }
148
+ }
149
+ }
54
150
 
151
+ //@keyframes fadeIn {
152
+ // from {
153
+ // opacity: 0;
154
+ // transform: translate3d(0, 50%, 0);
155
+ // }
156
+ //
157
+ // to {
158
+ // opacity: 1;
159
+ // transform: translate3d(0, 0, 0);
160
+ // }
161
+ //}
@@ -13,24 +13,23 @@ $default-margin:.5em;
13
13
  border: transparent;
14
14
  border-radius: var(--theme-border-radius);
15
15
  color: var(--on-x, var(--on-#{$default-color}));
16
+ display: inline-flex;
16
17
  font-weight: 600;
18
+ font-family: var(--theme-default-paragraph);
19
+ justify-content: space-between;
17
20
  padding: $default-padding;
18
21
  transition: all .25s;
19
22
 
20
- &.arrow-right{
23
+ &.arrow-right {
21
24
  &::after {
22
- content: "L";
23
- font-family: "icons";
24
- vertical-align: middle;
25
+ content: "-->";
25
26
  margin-left: $default-margin;
26
27
  }
27
28
  }
28
29
 
29
- &.arrow-left{
30
+ &.arrow-left {
30
31
  &::before {
31
- content: "H";
32
- font-family: "icons";
33
- vertical-align: middle;
32
+ content: "<--";
34
33
  margin-right: $default-margin;
35
34
  }
36
35
  }
@@ -41,6 +40,7 @@ $default-margin:.5em;
41
40
  &:hover {
42
41
  background: var(--light-x, var(--light-#{$default-color}));
43
42
  }
43
+
44
44
  &:focus {
45
45
  background: var(--dark-x, var(--dark-#{$default-color}));
46
46
  }
@@ -58,7 +58,7 @@ $default-margin:.5em;
58
58
 
59
59
  &:hover,
60
60
  &:focus,
61
- &:disabled{
61
+ &:disabled {
62
62
  background: transparent;
63
63
  }
64
64
 
@@ -74,7 +74,7 @@ $default-margin:.5em;
74
74
  }
75
75
  }
76
76
 
77
- &:disabled{
77
+ &:disabled {
78
78
  border: 1px solid var(--x, var(--#{$default-color}));
79
79
  color: var(--x, var(--#{$default-color}));
80
80
  }
@@ -83,8 +83,8 @@ $default-margin:.5em;
83
83
  &.#{bem.$modifier-simple} {
84
84
  background: transparent;
85
85
  border: 1px solid transparent;
86
- padding: 0;
87
86
  color: var(--x, var(--#{$default-color}));
87
+ padding: 0;
88
88
 
89
89
  &:disabled,
90
90
  &:hover,
@@ -93,13 +93,13 @@ $default-margin:.5em;
93
93
  }
94
94
 
95
95
  &:not(:disabled) {
96
- &:hover {
97
- color: var(--light-x, var(--light-#{$default-color}));
98
- }
96
+ &:hover {
97
+ color: var(--light-x, var(--light-#{$default-color}));
98
+ }
99
99
 
100
- &:focus {
101
- color: var(--dark-x, var(--dark-#{$default-color}));
102
- }
100
+ &:focus {
101
+ color: var(--dark-x, var(--dark-#{$default-color}));
102
+ }
103
103
  }
104
104
 
105
105
  &:disabled {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "2.0.0-alpha.13",
3
+ "version": "2.0.0-alpha.14",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",
@@ -79,7 +79,7 @@
79
79
  "stylelint-config-palantir": "^5.1.0"
80
80
  },
81
81
  "dependencies": {
82
- "@pareto-engineering/assets": "^2.0.0-alpha.5",
82
+ "@pareto-engineering/assets": "^2.0.0-alpha.8",
83
83
  "@pareto-engineering/bem": "^0.1.5",
84
84
  "@pareto-engineering/styles": "^2.0.0-alpha.8",
85
85
  "date-fns": "^2.22.1",
@@ -114,10 +114,10 @@ exports[`Storyshots a/ContentCard Content After 1`] = `
114
114
  </p>
115
115
  </div>
116
116
  <div
117
- className="base conversation illustration y-background u1"
117
+ className="base conversation illustration y-background2 u1"
118
118
  >
119
119
  <div
120
- className="base message x-main2 ours"
120
+ className="base message x-background1 ours v1"
121
121
  >
122
122
  <div
123
123
  className="elementContent"
@@ -134,7 +134,7 @@ exports[`Storyshots a/ContentCard Content After 1`] = `
134
134
  </div>
135
135
  </div>
136
136
  <div
137
- className="base message x-background2"
137
+ className="base message x-background1 v1"
138
138
  >
139
139
  <div
140
140
  className="elementContent"
@@ -151,7 +151,7 @@ exports[`Storyshots a/ContentCard Content After 1`] = `
151
151
  </div>
152
152
  </div>
153
153
  <div
154
- className="base message x-main2 ours"
154
+ className="base message x-background1 ours v1"
155
155
  >
156
156
  <div
157
157
  className="elementContent"
@@ -228,10 +228,10 @@ exports[`Storyshots a/ContentCard Layout Left 1`] = `
228
228
  </p>
229
229
  </div>
230
230
  <div
231
- className="base conversation illustration y-background u1"
231
+ className="base conversation illustration y-background2 u1"
232
232
  >
233
233
  <div
234
- className="base message x-main2 ours"
234
+ className="base message x-background1 ours v1"
235
235
  >
236
236
  <div
237
237
  className="elementContent"
@@ -248,7 +248,7 @@ exports[`Storyshots a/ContentCard Layout Left 1`] = `
248
248
  </div>
249
249
  </div>
250
250
  <div
251
- className="base message x-background2"
251
+ className="base message x-background1 v1"
252
252
  >
253
253
  <div
254
254
  className="elementContent"
@@ -265,7 +265,7 @@ exports[`Storyshots a/ContentCard Layout Left 1`] = `
265
265
  </div>
266
266
  </div>
267
267
  <div
268
- className="base message x-main2 ours"
268
+ className="base message x-background1 ours v1"
269
269
  >
270
270
  <div
271
271
  className="elementContent"
@@ -317,10 +317,10 @@ exports[`Storyshots a/ContentCard Layout Right 1`] = `
317
317
  </p>
318
318
  </div>
319
319
  <div
320
- className="base conversation illustration y-background u1"
320
+ className="base conversation illustration y-background2 u1"
321
321
  >
322
322
  <div
323
- className="base message x-main2 ours"
323
+ className="base message x-background1 ours v1"
324
324
  >
325
325
  <div
326
326
  className="elementContent"
@@ -337,7 +337,7 @@ exports[`Storyshots a/ContentCard Layout Right 1`] = `
337
337
  </div>
338
338
  </div>
339
339
  <div
340
- className="base message x-background2"
340
+ className="base message x-background1 v1"
341
341
  >
342
342
  <div
343
343
  className="elementContent"
@@ -354,7 +354,7 @@ exports[`Storyshots a/ContentCard Layout Right 1`] = `
354
354
  </div>
355
355
  </div>
356
356
  <div
357
- className="base message x-main2 ours"
357
+ className="base message x-background1 ours v1"
358
358
  >
359
359
  <div
360
360
  className="elementContent"
@@ -378,10 +378,10 @@ exports[`Storyshots a/ContentCard Layout Right 1`] = `
378
378
 
379
379
  exports[`Storyshots a/Conversation Base 1`] = `
380
380
  <div
381
- className="base conversation y-background u1"
381
+ className="base conversation y-background2 u1"
382
382
  >
383
383
  <div
384
- className="base message x-background2"
384
+ className="base message x-background1 v1"
385
385
  >
386
386
  <div
387
387
  className="elementContent"
@@ -398,7 +398,7 @@ exports[`Storyshots a/Conversation Base 1`] = `
398
398
  </div>
399
399
  </div>
400
400
  <div
401
- className="base message x-main2 ours"
401
+ className="base message x-background1 ours v1"
402
402
  >
403
403
  <div
404
404
  className="elementContent"
@@ -410,12 +410,12 @@ exports[`Storyshots a/Conversation Base 1`] = `
410
410
  :
411
411
  </p>
412
412
  <p>
413
- Hi Humbl, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.
413
+ Hi Morgan! Here is the database we prepared for you.
414
414
  </p>
415
415
  </div>
416
416
  </div>
417
417
  <div
418
- className="base message x-background2"
418
+ className="base message x-background1 v1"
419
419
  >
420
420
  <div
421
421
  className="elementContent"
@@ -431,6 +431,201 @@ exports[`Storyshots a/Conversation Base 1`] = `
431
431
  </p>
432
432
  </div>
433
433
  </div>
434
+ <div
435
+ className="base message x-background1 ours v1"
436
+ >
437
+ <div
438
+ className="elementContent"
439
+ >
440
+ <p
441
+ className="sender v25 mb-v s-1"
442
+ >
443
+ CAMILLE
444
+ :
445
+ </p>
446
+ <p>
447
+ Hi Morgan! Here is the database we prepared for you.
448
+ </p>
449
+ </div>
450
+ </div>
451
+ </div>
452
+ `;
453
+
454
+ exports[`Storyshots a/Conversation With Attachment 1`] = `
455
+ <div
456
+ className="base conversation y-background2 u1"
457
+ >
458
+ <div
459
+ className="base message x-background1 v1"
460
+ >
461
+ <div
462
+ className="elementContent"
463
+ >
464
+ <p
465
+ className="sender v25 mb-v s-1"
466
+ >
467
+ HUMBL
468
+ :
469
+ </p>
470
+ <p>
471
+ Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.
472
+ </p>
473
+ </div>
474
+ </div>
475
+ <div
476
+ className="base message x-background1 ours v1"
477
+ >
478
+ <div
479
+ className="elementContent"
480
+ >
481
+ <p
482
+ className="sender v25 mb-v s-1"
483
+ >
484
+ CAMILLE
485
+ :
486
+ </p>
487
+ <p>
488
+ Hi Morgan! Here is the database we prepared for you.
489
+ </p>
490
+ <div
491
+ className="attachment y-main4"
492
+ >
493
+ <span
494
+ className="f-icons"
495
+ >
496
+ A
497
+ </span>
498
+ <p
499
+ className="ml-v"
500
+ >
501
+ spreadsheet.xlsx
502
+ </p>
503
+ </div>
504
+ </div>
505
+ </div>
506
+ <div
507
+ className="base message x-background1 v1"
508
+ >
509
+ <div
510
+ className="elementContent"
511
+ >
512
+ <p
513
+ className="sender v25 mb-v s-1"
514
+ >
515
+ HUMBL
516
+ :
517
+ </p>
518
+ <p>
519
+ Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.
520
+ </p>
521
+ </div>
522
+ </div>
523
+ <div
524
+ className="base message x-background1 ours v1"
525
+ >
526
+ <div
527
+ className="elementContent"
528
+ >
529
+ <p
530
+ className="sender v25 mb-v s-1"
531
+ >
532
+ CAMILLE
533
+ :
534
+ </p>
535
+ <p>
536
+ Hi Morgan! Here is the database we prepared for you.
537
+ </p>
538
+ <div
539
+ className="attachment y-main4"
540
+ >
541
+ <span
542
+ className="f-icons"
543
+ >
544
+ A
545
+ </span>
546
+ <p
547
+ className="ml-v"
548
+ >
549
+ spreadsheet.xlsx
550
+ </p>
551
+ </div>
552
+ </div>
553
+ </div>
554
+ </div>
555
+ `;
556
+
557
+ exports[`Storyshots a/Conversation With Triangle 1`] = `
558
+ <div
559
+ className="base conversation y-background2 u1"
560
+ >
561
+ <div
562
+ className="base message x-background1 has-triangle v1"
563
+ >
564
+ <div
565
+ className="elementContent"
566
+ >
567
+ <p
568
+ className="sender v25 mb-v s-1"
569
+ >
570
+ HUMBL
571
+ :
572
+ </p>
573
+ <p>
574
+ Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.
575
+ </p>
576
+ </div>
577
+ </div>
578
+ <div
579
+ className="base message x-background1 ours has-triangle v1"
580
+ >
581
+ <div
582
+ className="elementContent"
583
+ >
584
+ <p
585
+ className="sender v25 mb-v s-1"
586
+ >
587
+ CAMILLE
588
+ :
589
+ </p>
590
+ <p>
591
+ Hi Morgan! Here is the database we prepared for you.
592
+ </p>
593
+ </div>
594
+ </div>
595
+ <div
596
+ className="base message x-background1 has-triangle v1"
597
+ >
598
+ <div
599
+ className="elementContent"
600
+ >
601
+ <p
602
+ className="sender v25 mb-v s-1"
603
+ >
604
+ HUMBL
605
+ :
606
+ </p>
607
+ <p>
608
+ Hi Camille, please compile an assesment of top 5 firms/brand providers for the listed fields in the US.
609
+ </p>
610
+ </div>
611
+ </div>
612
+ <div
613
+ className="base message x-background1 ours has-triangle v1"
614
+ >
615
+ <div
616
+ className="elementContent"
617
+ >
618
+ <p
619
+ className="sender v25 mb-v s-1"
620
+ >
621
+ CAMILLE
622
+ :
623
+ </p>
624
+ <p>
625
+ Hi Morgan! Here is the database we prepared for you.
626
+ </p>
627
+ </div>
628
+ </div>
434
629
  </div>
435
630
  `;
436
631
 
package/src/local.scss CHANGED
@@ -10,5 +10,6 @@
10
10
  html {
11
11
  font-family: var(--font-default);
12
12
  font-size: 18px;
13
+ font-feature-settings:'liga' on;
13
14
  }
14
15
 
@@ -13,9 +13,8 @@ export default {
13
13
  // storyfn => <div className="">{ storyfn() }</div>,
14
14
  ],
15
15
  argTypes:{
16
- verticalAlign:{ control: 'select' },
17
- height :{ control: 'text' },
18
- color :{ control: 'text' },
16
+ height:{ control: 'text' },
17
+ color :{ control: 'text' },
19
18
  },
20
19
  }
21
20