@leaflink/stash 43.5.1 → 44.0.0-beta.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/styles/base.css CHANGED
@@ -1,7 +1,14 @@
1
1
  @tailwind base;
2
-
3
2
  @tailwind components;
4
3
 
4
+ /*
5
+ NOTE: Commenting this out cause packaging tw classes inside of stash's build causes a
6
+ lot of duplication and order issues with downstream applications. You need to configure your
7
+ application downstream to analyze stash files to ensure they are included in your build.
8
+
9
+ @tailwind utilities;
10
+ */
11
+
5
12
  /**
6
13
  * This is a custom .container class that conflicts with tailwinds out of the box container class.
7
14
  * Placed here before tw utilities, and specifically not within @layer components, so that it is
@@ -15,19 +22,6 @@
15
22
  width: 100%;
16
23
  }
17
24
 
18
- /* helpful class to show an emdash when an element like a table cell is empty */
19
- .show-empty:empty::before {
20
- content: "—";
21
- }
22
-
23
- /*
24
- NOTE: Commenting this out cause packaging tw classes inside of stash's build causes a
25
- lot of duplication and order issues with downstream applications. You need to configure your
26
- application downstream to analyze stash files to ensure they are included in your build.
27
-
28
- @tailwind utilities;
29
- */
30
-
31
25
  /**
32
26
  * General styles and/or reset css could go here.
33
27
  */
@@ -35,6 +29,12 @@
35
29
  :root {
36
30
  --grid-gutter: 12px;
37
31
 
32
+ /* The tooltips position relative to the toggle element */
33
+ --tooltip-position: calc(100% + theme('spacing.3'));
34
+
35
+ /* Centers arrow horizontally or vertically along tooltip on arrow's center */
36
+ --arrow-position-centered: calc(50% - theme('spacing[1.5]'));
37
+
38
38
  @media screen(lg) {
39
39
  --grid-gutter: 24px;
40
40
  }
@@ -42,7 +42,7 @@
42
42
 
43
43
  @layer base {
44
44
  @font-face {
45
- font-family: 'Sofia';
45
+ font-family: Sofia;
46
46
  font-style: normal;
47
47
  font-weight: 400;
48
48
  src:
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  @font-face {
54
- font-family: 'Sofia';
54
+ font-family: Sofia;
55
55
  font-style: normal;
56
56
  font-weight: 500;
57
57
  src:
@@ -60,7 +60,7 @@
60
60
  }
61
61
 
62
62
  @font-face {
63
- font-family: 'Sofia';
63
+ font-family: Sofia;
64
64
  font-style: normal;
65
65
  font-weight: 600;
66
66
  src:
@@ -79,7 +79,7 @@
79
79
  body {
80
80
  @apply tw-leading-normal tw-text-ice-700 tw-bg-ice-100 tw-font-normal tw-text-sm;
81
81
 
82
- font-family: 'Sofia', sans-serif;
82
+ font-family: Sofia, sans-serif;
83
83
  min-height: 100vh;
84
84
  position: relative;
85
85
  }
@@ -128,7 +128,7 @@
128
128
 
129
129
  @media screen(md) {
130
130
  .heading-jumbo {
131
- font-size: theme(fontSize.5xl);
131
+ font-size: theme('fontSize.5xl');
132
132
  }
133
133
  }
134
134
 
@@ -142,6 +142,8 @@
142
142
 
143
143
  address {
144
144
  font-style: normal;
145
+ line-height: theme('spacing.6');
146
+ white-space: pre-line;
145
147
  }
146
148
 
147
149
  /**
@@ -258,6 +260,12 @@
258
260
  margin: 0; /* 2 */
259
261
  }
260
262
 
263
+ button {
264
+ display: inline-block;
265
+ font-size: 0.875rem;
266
+ vertical-align: middle;
267
+ }
268
+
261
269
  /**
262
270
  * Show the overflow in IE.
263
271
  * 1. Show the overflow in Edge.
@@ -395,4 +403,365 @@
395
403
  template {
396
404
  display: none;
397
405
  }
406
+
407
+ ul,
408
+ ol {
409
+ list-style-type: none;
410
+ margin: 0;
411
+ padding: 0;
412
+
413
+ &.bullets {
414
+ list-style-type: disc;
415
+ padding-left: theme('spacing.9');
416
+
417
+ li {
418
+ margin-bottom: theme('spacing.3');
419
+ }
420
+ }
421
+ }
422
+
423
+ table {
424
+ border-collapse: collapse;
425
+ border-spacing: 0;
426
+ max-width: 100%;
427
+ width: 100%;
428
+
429
+ td,
430
+ th {
431
+ border-top: 1px solid var(--color-ice-500);
432
+ padding: 0.766rem;
433
+ }
434
+
435
+ thead {
436
+ td,
437
+ th {
438
+ background-color: var(--color-ice-200);
439
+ border-bottom: 2px solid var(--color-ice-500);
440
+ border-top: none;
441
+ color: var(--color-ice-900);
442
+ font-weight: 500;
443
+ text-align: left;
444
+ user-select: none;
445
+ white-space: nowrap;
446
+ }
447
+ }
448
+
449
+ tbody {
450
+ td {
451
+ font-weight: 400;
452
+ }
453
+ }
454
+
455
+ tfoot {
456
+ tr {
457
+ td {
458
+ border: none;
459
+ }
460
+ }
461
+ }
462
+ }
463
+ }
464
+
465
+ /**
466
+ * Custom global classes.
467
+ *
468
+ * These are global classes that are not part of the tailwindcss framework. These should be created & used sparingly
469
+ * and only when using a global class is the best solution.
470
+ */
471
+
472
+ /* helpful class to show an emdash when an element like a table cell is empty */
473
+ .show-empty:empty::before {
474
+ content: "—";
475
+ }
476
+
477
+ /**
478
+ * Stash's v-tooltip styles.
479
+ */
480
+
481
+ .tooltip {
482
+ --offset: 0;
483
+
484
+ background: var(--color-ice-900);
485
+ border-radius: theme('borderRadius.DEFAULT');
486
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
487
+ color: var(--color-white);
488
+ font-size: 0.75rem;
489
+ line-height: calc(16 / 12);
490
+ opacity: 0;
491
+ padding: theme('spacing.3');
492
+ pointer-events: none; /* Tooltips should disappear once the user hovers away */
493
+ position: absolute;
494
+ text-align: center;
495
+ transition: opacity theme('transitionDuration.150') theme('transitionTimingFunction.swing'), visibility theme('transitionDuration.150') theme('transitionTimingFunction.swing');
496
+ visibility: hidden;
497
+ white-space: normal;
498
+ width: 148px;
499
+
500
+ &::after {
501
+ background-color: var(--color-ice-900);
502
+ border-radius: 0 2px 0 0;
503
+ clip-path: polygon(100% 0%, 100% 100%, 0% 0%);
504
+ content: '';
505
+ display: inline-block;
506
+ height: 12px;
507
+ position: absolute;
508
+ top: calc(-1 * theme('spacing[1.5]'));
509
+ transform: rotate(135deg);
510
+ z-index: theme('zIndex.behind');
511
+ width: 12px;
512
+ }
513
+
514
+ &--bottom,
515
+ &--top {
516
+ left: calc(50% + calc(var(--offset) * 1px));
517
+ transform: translateX(-50%);
518
+
519
+ &::after {
520
+ left: calc(#{$arrow-position-centered} + calc(var(--offset) * -1px));
521
+ }
522
+ }
523
+
524
+ &--bottom {
525
+ top: var(--tooltip-position);
526
+
527
+ &::after {
528
+ transform: rotate(-45deg);
529
+ }
530
+ }
531
+
532
+ &--top {
533
+ bottom: var(--tooltip-position);
534
+
535
+ &::after {
536
+ top: calc(100% - theme('spacing[1.5]'));
537
+ }
538
+ }
539
+
540
+ &--left,
541
+ &--right {
542
+ top: 50%;
543
+ transform: translateY(-50%);
544
+
545
+ &::after {
546
+ top: var(--arrow-position-centered);
547
+ }
548
+ }
549
+
550
+ &--left {
551
+ right: var(--tooltip-position);
552
+
553
+ &::after {
554
+ left: calc(100% - theme('spacing[1.5]'));
555
+ transform: rotate(45deg);
556
+ }
557
+ }
558
+
559
+ &--right {
560
+ left: var(--tooltip-position);
561
+
562
+ &::after {
563
+ left: calc(-1 * theme('spacing[1.5]'));
564
+ transform: rotate(-135deg);
565
+ }
566
+ }
567
+ }
568
+
569
+ .tooltip-toggle {
570
+ display: inline-block;
571
+ position: relative;
572
+ z-index: 0;
573
+
574
+ &:hover {
575
+ outline: none;
576
+ z-index: theme('zIndex.modal');
577
+
578
+ .tooltip {
579
+ opacity: 1;
580
+ visibility: visible;
581
+ }
582
+ }
583
+ }
584
+
585
+ /**
586
+ * Animations
587
+ *
588
+ * Todo: These should be moved to tailwind as custom animations.
589
+ */
590
+
591
+ @keyframes shake {
592
+ from,
593
+ to {
594
+ transform: translate3d(0, 0, 0);
595
+ }
596
+
597
+ 10%,
598
+ 30%,
599
+ 50%,
600
+ 70%,
601
+ 90% {
602
+ transform: translate3d(-10px, 0, 0);
603
+ }
604
+
605
+ 20%,
606
+ 40%,
607
+ 60%,
608
+ 80% {
609
+ transform: translate3d(10px, 0, 0);
610
+ }
611
+ }
612
+
613
+ .fx-shake {
614
+ animation: 2s shake 1;
615
+ }
616
+
617
+
618
+ @keyframes pulse {
619
+ from {
620
+ transform: scale3d(1, 1, 1);
621
+ }
622
+
623
+ 50% {
624
+ transform: scale3d(1.25, 1.25, 1.25);
625
+ }
626
+
627
+ to {
628
+ transform: scale3d(1, 1, 1);
629
+ }
630
+ }
631
+
632
+ .fx-pulse {
633
+ animation: 1s pulse;
634
+ }
635
+
636
+ @keyframes spin-loading {
637
+ 0% {
638
+ transform: rotate(0deg);
639
+ }
640
+
641
+ 65% {
642
+ transform: rotate(720deg);
643
+ }
644
+
645
+ 100% {
646
+ transform: rotate(720deg);
647
+ }
648
+ }
649
+
650
+ .fx-spin {
651
+ animation-duration: 1.5s;
652
+ animation-iteration-count: infinite;
653
+ animation-name: spin-loading;
654
+ animation-timing-function: ease-in-out;
655
+ }
656
+
657
+ @keyframes flash {
658
+ from {
659
+ opacity: 1;
660
+ }
661
+
662
+ 50% {
663
+ opacity: 0;
664
+ }
665
+
666
+ to {
667
+ opacity: 1;
668
+ }
669
+ }
670
+
671
+ .fx-flash {
672
+ animation: 0.5s flash;
673
+ }
674
+
675
+ /**
676
+ * Transitions
677
+ *
678
+ * Todo: These should be moved to tailwind as custom transitions.
679
+ * See: https://tailwindcss.com/docs/transition-property
680
+ */
681
+
682
+ .scale {
683
+ &-enter-active,
684
+ &-leave-active {
685
+ transition: theme('transitionDuration.300') theme('transitionTimingFunction.ease-in-out');
686
+ }
687
+
688
+ &-enter-from,
689
+ &-leave-from,
690
+ &-leave-to {
691
+ opacity: 0;
692
+ transform: scale(0);
693
+ }
694
+ }
695
+
696
+ .slide-y {
697
+ &-enter-active,
698
+ &-leave-active {
699
+ transition: theme('transitionDuration.150') theme('transitionTimingFunction.swing');
700
+ }
701
+
702
+ &-enter-from,
703
+ &-leave-to {
704
+ opacity: 0;
705
+ transform: translateY(-0.875rem);
706
+ }
707
+ }
708
+
709
+ .slide-x {
710
+ &-enter-active,
711
+ &-leave-active {
712
+ transition: theme('transitionDuration.150') theme('transitionTimingFunction.swing');
713
+ }
714
+
715
+ &-enter-from,
716
+ &-leave-to {
717
+ opacity: 0;
718
+ transform: translateX(-0.875rem);
719
+ }
720
+ }
721
+
722
+ .fade {
723
+ &-enter-active,
724
+ &-leave-active {
725
+ transition: opacity theme('transitionDuration.150') theme('transitionTimingFunction.swing');
726
+ }
727
+
728
+ &-enter-from,
729
+ &-leave-to {
730
+ opacity: 0;
731
+ }
732
+
733
+ &-enter-to {
734
+ opacity: 1;
735
+ }
736
+ }
737
+
738
+ .expand {
739
+ &-enter-active,
740
+ &-leave-active {
741
+ transition:
742
+ height theme('transitionDuration.300') theme('transitionTimingFunction.ease-in-out'),
743
+ opacity theme('transitionDuration.500') theme('transitionDuration.150'),
744
+ transform theme('transitionDuration.500') theme('transitionDuration.150');
745
+ }
746
+
747
+ &-enter-from,
748
+ &-leave-to {
749
+ height: 0;
750
+ opacity: 0;
751
+ transform: translateY(-0.875rem);
752
+ transition-delay: 0s;
753
+ }
754
+
755
+ &-leave-from,
756
+ &-enter-to {
757
+ height: auto;
758
+ opacity: 1;
759
+ transform: translateY(0);
760
+ }
761
+ }
762
+
763
+ .move {
764
+ &-move {
765
+ transition: transform theme('transitionDuration.150') theme('transitionTimingFunction.swing');
766
+ }
398
767
  }
@@ -1,14 +0,0 @@
1
- /**
2
-
3
- Components: specific UI components. This is where majority
4
- of our work takes place.
5
-
6
- Note: ideally (ie. eventually) this layer should
7
- be auto-generated by code from each Vue component.
8
-
9
- */
10
-
11
- @import 'box';
12
- @import 'item-list';
13
- @import 'sidebar';
14
- @import 'top-header';
@@ -1,13 +0,0 @@
1
- /**
2
- * Box: Emulated "ibox" style, from olden days. DEPRECATED!
3
- *
4
- * @deprecated rather than using the global .box class, please use the Box` component instead.
5
- */
6
-
7
- .box {
8
- @include elevation('low');
9
-
10
- background: var(--color-white);
11
- border-radius: $border-radius;
12
- padding: space(3) var(--grid-gutter);
13
- }
@@ -1,78 +0,0 @@
1
- /**
2
-
3
- Item List. (Item List?? This name is temporary)
4
-
5
- Styles to support lists of "items". These are generic items, the
6
- only distinguishing feature -- what makes it distinct from <table> --
7
- is that these "lists" are not tabular data. Tables, by contrast, are
8
- more for displaying large amounts of _data_ (ie. what is more
9
- prevalent on Reports pages, etc).
10
-
11
-
12
- examples:
13
- * Products in the Inventory,
14
- * Customers List
15
- * Items in an Order
16
- * Service items (on Browse Services)
17
- * Clients in the Contact List
18
-
19
-
20
- ◡◠ ✥ ◠◡
21
-
22
- Table of Contents:
23
-
24
- • Item List
25
-
26
- */
27
-
28
- /* ---------------------------------------
29
- Item List
30
- ---------------------------------------- */
31
- $border: border(thin, var(--color-ice));
32
-
33
- .item-list {
34
- border-bottom: $border;
35
- border-top: $border;
36
- margin-left: calc(var(--grid-gutter) * -1);
37
- margin-right: calc(var(--grid-gutter) * -1);
38
- min-width: 100%;
39
-
40
- &__header {
41
- background: var(--color-ice-200);
42
- border-bottom: $border;
43
- border-top-left-radius: $border-radius;
44
- border-top-right-radius: $border-radius;
45
- color: var(--color-ice-900);
46
- font-weight: 500;
47
- overflow: hidden;
48
- padding: space(2);
49
- }
50
-
51
- &__content {
52
- border-bottom-left-radius: $border-radius;
53
- border-bottom-right-radius: $border-radius;
54
- }
55
-
56
- &__row {
57
- background: var(--color-white);
58
- border-bottom: $border;
59
- padding: space(2);
60
-
61
- &:last-child {
62
- border-bottom: 0;
63
- border-bottom-left-radius: $border-radius;
64
- border-bottom-right-radius: $border-radius;
65
- }
66
- }
67
-
68
- @include breakpoint('md') {
69
- border: $border;
70
- border-radius: $border-radius;
71
- margin: 0;
72
-
73
- &__header,
74
- &__row {
75
- padding: space(1) space(2);
76
- }
77
- }
78
- }